/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --bg:          #0c0c0c;
  --surface:     #141414;
  --border:      #2a2a2a;
  --text:        #e8e8e8;
  --text-muted:  #666666;
  --accent:      #00d4ff;
  --accent-dim:  #00d4ff33;

  --font: 'JetBrains Mono', monospace;

  --radius: 4px;
  --nav-h:  56px;
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: clamp(13px, 1.4vw, 15px);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover { text-decoration: underline; }

/* ============================================================
   SCANLINE TEXTURE
   ============================================================ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0,0,0,0.06) 3px,
    rgba(0,0,0,0.06) 4px
  );
  z-index: 9999;
}

/* ============================================================
   SHARED SECTION STYLES
   ============================================================ */
.section {
  padding: clamp(64px, 10vw, 120px) clamp(20px, 6vw, 80px);
  max-width: 960px;
  margin: 0 auto;
}

.section-label {
  color: var(--accent);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.section-label::before { content: '## '; color: var(--text-muted); }

/* ============================================================
   TERMINAL WINDOW CHROME
   ============================================================ */
.term-window {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.term-titlebar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #1a1a1a;
  border-bottom: 1px solid var(--border);
}

.term-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.term-dot.red    { background: #ff5f57; }
.term-dot.yellow { background: #ffbd2e; }
.term-dot.green  { background: #28c840; }

.term-title {
  margin-left: 8px;
  font-size: 0.72rem;
  color: var(--text-muted);
  flex: 1;
  text-align: center;
}

.term-body {
  padding: clamp(20px, 3vw, 32px);
}

/* ============================================================
   TECH PILLS / BADGES
   ============================================================ */
.pill {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.72rem;
  color: var(--text-muted);
  transition: border-color 0.2s, color 0.2s;
}

.pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ============================================================
   SCROLL FADE-IN
   ============================================================ */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in-stagger.visible > *:nth-child(1)  { transition-delay: 0.05s; opacity: 1; transform: none; }
.fade-in-stagger.visible > *:nth-child(2)  { transition-delay: 0.12s; opacity: 1; transform: none; }
.fade-in-stagger.visible > *:nth-child(3)  { transition-delay: 0.19s; opacity: 1; transform: none; }
.fade-in-stagger.visible > *:nth-child(4)  { transition-delay: 0.26s; opacity: 1; transform: none; }
.fade-in-stagger.visible > *:nth-child(5)  { transition-delay: 0.33s; opacity: 1; transform: none; }
.fade-in-stagger.visible > *:nth-child(6)  { transition-delay: 0.40s; opacity: 1; transform: none; }
.fade-in-stagger.visible > *:nth-child(n+7){ transition-delay: 0.47s; opacity: 1; transform: none; }

/* ============================================================
   KEYFRAMES
   ============================================================ */
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* ============================================================
   SHARED PROMPT COLOR
   ============================================================ */
.prompt { color: var(--accent); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 60px);
  background: rgba(12, 12, 12, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.logo-name { color: var(--text-muted); }
.logo-tld  { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--accent); }

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-muted);
  transition: background 0.2s;
}

.nav-burger:hover span { background: var(--accent); }

@media (max-width: 600px) {
  .nav-burger { display: flex; }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: #0f0f0f;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
  }

  .nav-links.open { max-height: 200px; }

  .nav-links li { border-top: 1px solid var(--border); }

  .nav-links a {
    display: block;
    padding: 14px 24px;
    font-size: 0.9rem;
  }
}

/* ============================================================
   HERO
   ============================================================ */

/* Pun rotation fade */
#egg-pun {
  transition: opacity 0.4s ease;
}

#egg-pun.pun-fade-out {
  opacity: 0;
}

.hero {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 clamp(20px, 6vw, 80px);
  padding-top: var(--nav-h);
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
}

.hero-domain-egg {
  font-size: 0.75rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.egg-tld  { color: var(--accent); }
.egg-comment { font-size: 0.7rem; color: var(--text-muted); }
#egg-pun     { font-size: 0.7rem; color: var(--text-muted); }

.hero-name {
  font-size: clamp(2.4rem, 7vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.cursor {
  display: inline-block;
  color: var(--accent);
  animation: blink 1s step-end infinite;
  margin-left: 2px;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--text-muted);
  margin-bottom: 3rem;
  min-height: 1.7em;
}

.tw-cursor {
  color: var(--accent);
  animation: blink 0.7s step-end infinite;
  margin-left: 1px;
}

.hero-ctas {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cta-link {
  color: var(--text-muted);
  font-size: 0.85rem;
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.cta-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
  text-decoration: none;
}

/* ============================================================
   ABOUT
   ============================================================ */
.cmd {
  margin-bottom: 1.2rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.about-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.85rem;
}

.about-table tr + tr td { padding-top: 4px; }

.field-key {
  color: var(--accent);
  width: 90px;
  vertical-align: top;
  white-space: nowrap;
}

.field-sep {
  color: var(--text-muted);
  padding: 0 12px;
  vertical-align: top;
}

.field-val { color: var(--text); }
.field-accent { color: var(--accent); }

.about-prose {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  max-width: 680px;
}

.about-prose .highlight { color: var(--text-muted); }
.about-prose .accent    { color: var(--accent); }

code {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 3px;
  font-family: var(--font);
  font-size: 0.85em;
  color: var(--accent);
}

/* ============================================================
   SKILLS
   ============================================================ */
.skills-cmd {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.cat-comment {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}

/* ============================================================
   PROJECTS
   ============================================================ */
.projects-cmd {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project-card {
  transition: box-shadow 0.2s, border-color 0.2s;
}

.project-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--accent-dim);
}

.proj-status {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-left: auto;
}

.proj-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.6rem;
}

.proj-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.proj-footer {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.proj-link {
  font-size: 0.78rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.proj-link:hover { color: var(--accent); text-decoration: none; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem clamp(20px, 6vw, 80px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-exit {
  font-size: 0.78rem;
  color: var(--text);
}

.muted { color: var(--text-muted); }

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--accent); }
