/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* dark mode (default) */
  --bg: #070f20;
  --bg-alt: #0c1a33;
  --surface: #10203f;
  --surface-2: #142748;
  --line: rgba(246, 244, 238, 0.12);
  --ink: #f3f0e6;
  --ink-dim: rgba(243, 240, 230, 0.68);
  --ink-faint: rgba(243, 240, 230, 0.42);
  --accent: #9fc6e8;       /* cool sky highlight */
  --accent-2: #6d7fc0;     /* indigo watercolor */
  --brass: #c7a568;        /* warm premium accent, used sparingly */
  --brass-ink: #1a1206;

  --font-display: "Fraunces", "Iowan Old Style", ui-serif, Georgia, serif;
  --font-body: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --container: 1180px;
  --radius: 18px;
  --radius-sm: 10px;
  --ease: cubic-bezier(.22,.75,.28,1);
}

[data-theme="light"] {
  --bg: #f7f4ec;
  --bg-alt: #f0ecdf;
  --surface: #ffffff;
  --surface-2: #fbf9f2;
  --line: rgba(11, 27, 51, 0.12);
  --ink: #0b1b33;
  --ink-dim: rgba(11, 27, 51, 0.68);
  --ink-faint: rgba(11, 27, 51, 0.46);
  --accent: #2f5f8a;
  --accent-2: #4c5aa0;
  --brass: #9c7a3d;
  --brass-ink: #fbf6ea;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
}

body {
  margin: 0;
  width: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .5s var(--ease), color .5s var(--ease);
  overflow-x: hidden;
  position: relative;
}

section { overflow: hidden; }

::selection { background: var(--accent-2); color: #fff; }

a { color: inherit; text-decoration: none; }

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: -60px; left: 16px; z-index: 999;
  background: var(--surface); color: var(--ink);
  padding: 10px 16px; border-radius: 8px;
  transition: top .2s;
  border: 1px solid var(--line);
}
.skip-link:focus { top: 16px; }

/* ============================================================
   TYPE SYSTEM
   ============================================================ */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--accent);
  display: inline-block;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  margin: 0;
  letter-spacing: -0.01em;
}

h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 500; }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); font-weight: 500; }

p { margin: 0 0 1em; color: var(--ink-dim); }
p:last-child { margin-bottom: 0; }

.section-head {
  max-width: 680px;
  margin-bottom: 56px;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

section { position: relative; padding: 120px 0; }
@media (max-width: 720px) { section { padding: 80px 0; } }

.section-line {
  border: none; border-top: 1px solid var(--line);
  margin: 0;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 18px 0;
  backdrop-filter: blur(14px) saturate(140%);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav .container { display: flex; align-items: center; justify-content: space-between; }

.logo {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  position: relative;
  cursor: pointer;
  user-select: none;
}
.logo .dot { color: var(--brass); }

.nav-links {
  display: flex; gap: 34px; align-items: center;
  font-size: 14.5px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.nav-links a { color: var(--ink-dim); position: relative; padding: 4px 0; }
.nav-links a:hover, .nav-links a:focus-visible { color: var(--ink); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 0; height: 1px; background: var(--accent);
  transition: width .25s var(--ease);
}
.nav-links a:hover::after { width: 100%; }

.nav-right { display: flex; align-items: center; gap: 18px; }

.theme-toggle {
  width: 44px; height: 26px; border-radius: 20px;
  background: var(--surface-2); border: 1px solid var(--line);
  position: relative; cursor: pointer;
  display: inline-flex; align-items: center; padding: 3px;
}
.theme-toggle .knob {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent);
  transition: transform .3s var(--ease);
}
[data-theme="light"] .theme-toggle .knob { transform: translateX(18px); background: var(--brass); }

.nav-cta {
  font-family: var(--font-mono);
  font-size: 13px;
  border: 1px solid var(--line);
  padding: 9px 16px;
  border-radius: 999px;
  transition: border-color .25s, background .25s;
  display: none;
}
.nav-cta:hover { border-color: var(--accent); background: var(--surface); }
@media (min-width: 720px) { .nav-cta { display: inline-block; } }

.menu-btn { display: none; background: none; border: none; color: var(--ink); font-size: 22px; cursor: pointer; }

.nav-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(3, 7, 15, 0.45);
  backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease);
}
.nav-backdrop.show { opacity: 1; pointer-events: auto; }

@media (max-width: 860px) {
  .nav-links {
    position: fixed; top: 70px; right: 16px; left: auto; bottom: auto;
    z-index: 95;
    width: min(280px, calc(100vw - 32px));
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 24px 60px -16px rgba(0,0,0,.45);
    flex-direction: column; justify-content: flex-start;
    padding: 10px; gap: 0; font-size: 16px;
    opacity: 0; transform: translateY(-8px) scale(.97);
    transform-origin: top right;
    pointer-events: none;
    transition: opacity .25s var(--ease), transform .25s var(--ease);
  }
  .nav-links.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
  .nav-links a {
    display: block;
    padding: 14px 14px;
    border-radius: 10px;
    color: var(--ink);
  }
  .nav-links a:hover, .nav-links a:focus-visible { background: var(--surface-2); color: var(--ink); }
  .nav-links a::after { display: none; }
  .nav-links a + a { margin-top: 2px; }
  .menu-btn { display: block; }
}

/* ============================================================
   MOBILE CENTERING — keep hero & section intros balanced on phone
   ============================================================ */
@media (max-width: 720px) {
  .hero-grid > div:first-child {
    text-align: center;
    display: flex; flex-direction: column; align-items: center;
  }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .eyebrow { justify-content: center; }

  .section-head { text-align: center; margin-left: auto; margin-right: auto; }

  #aboutCopy > .eyebrow,
  #aboutCopy > h2 { text-align: center; }
  .about-grid { text-align: left; }
}

/* ============================================================
   WATERCOLOR BACKGROUND ART
   ============================================================ */
.wash {
  position: absolute; pointer-events: none; z-index: 0;
  filter: blur(2px);
  opacity: 0.55;
  mix-blend-mode: normal;
}
[data-theme="light"] .wash { opacity: 0.4; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100svh;
  display: flex; align-items: center;
  padding-top: 120px;
  padding-bottom: 60px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: 48px; align-items: center; position: relative; z-index: 2;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 56px; } }

.hero h1 {
  font-size: clamp(2.7rem, 6.4vw, 5.1rem);
  font-weight: 500;
}
.hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line span {
  display: inline-block;
  transform: translateY(110%);
  animation: lineUp .9s var(--ease) forwards;
}

@keyframes lineUp { to { transform: translateY(0); } }

.hero-sub {
  margin-top: 26px; max-width: 480px;
  font-size: 1.05rem;
  opacity: 0; animation: fadeUp .8s var(--ease) forwards; animation-delay: 1s;
}
.hero-actions {
  display: flex; gap: 16px; margin-top: 38px; flex-wrap: wrap;
  opacity: 0; animation: fadeUp .8s var(--ease) forwards; animation-delay: 1.15s;
}

@keyframes fadeUp { from { opacity: 0; transform: translateY(14px);} to { opacity: 1; transform: translateY(0);} }

.btn {
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing: 0.03em;
  padding: 14px 26px;
  border-radius: 999px;
  display: inline-flex; align-items: center; gap: 10px;
  transition: transform .3s var(--ease), background .3s, border-color .3s, color .3s;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
[data-theme="light"] .btn-primary { background: var(--ink); color: var(--surface); }
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost {
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--accent); transform: translateY(-2px); }
.btn svg { width: 14px; height: 14px; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translate(3px, -3px); }

.hero-portrait {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: 26px;
  overflow: hidden;
  isolation: isolate;
  opacity: 0; animation: fadeUp 1s var(--ease) forwards; animation-delay: .5s;
}
.hero-portrait img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(1.02);
}
.hero-portrait::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(6,15,32,.55) 100%);
  z-index: 1;
}
.hero-portrait::before {
  content: "";
  position: absolute; inset: -3px;
  border-radius: 28px;
  border: 1px solid var(--line);
  z-index: 2;
  pointer-events: none;
}
.hero-tag {
  position: absolute; left: 22px; bottom: 20px; z-index: 3;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em;
  color: #f3f0e6; text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
}
.hero-tag .pulse {
  width: 7px; height: 7px; border-radius: 50%; background: #7fd48a;
  box-shadow: 0 0 0 0 rgba(127,212,138,.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(127,212,138,.5); }
  70% { box-shadow: 0 0 0 8px rgba(127,212,138,0); }
  100% { box-shadow: 0 0 0 0 rgba(127,212,138,0); }
}

.scroll-cue {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  letter-spacing: .1em; text-transform: uppercase; z-index: 2;
}
.scroll-cue::after {
  content: ""; width: 1px; height: 34px; background: var(--line);
  position: relative; overflow: hidden;
}
.scroll-cue::before {
  content: ""; position: absolute; bottom: 0; width: 1px; height: 10px;
  background: var(--accent); left: 50%;
  animation: scrollLine 2.2s var(--ease) infinite;
}
@keyframes scrollLine {
  0% { transform: translateY(-4px); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: translateY(36px); opacity: 0; }
}

/* ============================================================
   REVEAL ON SCROLL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-stagger > * {
  opacity: 0; transform: translateY(22px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal-stagger.in > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(1) { transition-delay: .02s; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: .1s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: .18s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: .26s; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: .34s; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: .42s; }
.reveal-stagger.in > *:nth-child(7) { transition-delay: .5s; }

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
  display: grid; grid-template-columns: 1fr 0.85fr; gap: 64px;
}
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 40px; } }

.about-copy p { font-size: 1.04rem; }
.about-copy p:first-of-type {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--ink);
  font-weight: 400;
  line-height: 1.5;
}

.highlight-list { display: flex; flex-direction: column; }
.highlight-item {
  padding: 20px 0;
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px;
}
.highlight-item:last-child { border-bottom: 1px solid var(--line); }
.highlight-item .label {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-faint);
}
.highlight-item .value { font-size: .95rem; color: var(--ink); }

/* ============================================================
   EDUCATION
   ============================================================ */
.edu-list { display: flex; flex-direction: column; margin-top: 8px; }
.edu-item {
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 8px 24px;
  padding: 26px 0; border-top: 1px solid var(--line);
}
.edu-list .edu-item:last-child { border-bottom: 1px solid var(--line); }
.edu-main h4 { font-size: 1.15rem; font-weight: 600; margin-bottom: 6px; }
.edu-school { font-size: .95rem; color: var(--ink-dim); margin: 0; }
.edu-meta {
  font-family: var(--font-mono); font-size: 12px; color: var(--accent);
  white-space: nowrap; padding-top: 4px; margin: 0;
}
@media (max-width: 560px) { .edu-meta { white-space: normal; } }

/* ============================================================
   OTHER PROJECTS
   ============================================================ */
.other-projects {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 28px;
}
@media (max-width: 720px) { .other-projects { grid-template-columns: 1fr; } }
.other-project-card {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 28px; background: var(--surface);
}
.other-project-card h4 { font-size: 1.05rem; margin-bottom: 10px; font-weight: 600; }
.other-project-card p { font-size: .92rem; }
.other-project-link {
  display: inline-block; margin-top: 14px;
  font-family: var(--font-mono); font-size: 12.5px; color: var(--accent);
  border-bottom: 1px solid currentColor;
}

/* ============================================================
   EXPERIENCE
   ============================================================ */
.experience-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 720px) { .experience-grid { grid-template-columns: 1fr; } }
.experience-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; background: var(--surface);
}
.experience-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 16px; }
.experience-card h4 { font-size: 1.2rem; margin-bottom: 4px; }
.experience-org { font-family: var(--font-mono); font-size: 12.5px; color: var(--accent); margin: 0; }
.period-pill {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase;
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; color: var(--ink-faint);
  white-space: nowrap;
}
.experience-card p { font-size: .95rem; }

/* ============================================================
   ACHIEVEMENTS (card grid)
   ============================================================ */
.achieve-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; margin-top: 8px;
}
@media (max-width: 860px) { .achieve-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .achieve-grid { grid-template-columns: 1fr; } }
.achieve-item {
  background: var(--surface); padding: 30px 26px; transition: background .3s;
}
.achieve-item:hover { background: var(--surface-2); }
.achieve-item h4 { font-size: 1.02rem; font-weight: 600; margin-bottom: 10px; }
.achieve-item p { font-size: .9rem; }

/* ============================================================
   PROJECT — FEATURED
   ============================================================ */
.project-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(28px, 4vw, 56px);
  position: relative;
  overflow: hidden;
}
.project-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 24px; flex-wrap: wrap; margin-bottom: 24px;
}
.project-name { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: 10px; }
.project-statement { font-family: var(--font-display); font-style: italic; color: var(--accent); font-size: 1.2rem; }
.status-pill {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .05em;
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px;
  color: var(--ink-dim); white-space: nowrap;
}
.status-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brass); display: inline-block; margin-right: 7px; }

.project-desc { max-width: 680px; font-size: 1.02rem; margin-bottom: 6px; }
.project-role {
  font-size: .92rem; color: var(--ink-faint); margin-bottom: 32px;
  border-left: 2px solid var(--brass); padding-left: 14px;
}

.mockup-tabs { display: flex; gap: 10px; margin-bottom: 16px; }
.mockup-tab {
  font-family: var(--font-mono); font-size: 12px; padding: 8px 14px;
  border-radius: 999px; border: 1px solid var(--line); cursor: pointer;
  color: var(--ink-dim); background: transparent;
}
.mockup-tab.active { color: var(--ink); border-color: var(--accent); background: var(--surface-2); }

.browser-mockup {
  border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-alt);
  box-shadow: 0 30px 70px -30px rgba(0,0,0,.5);
}
.browser-body img { width: 100%; display: block; }

.feature-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 22px; margin-top: 40px;
}
@media (max-width: 640px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-item {
  padding-top: 18px; border-top: 1px solid var(--line);
}
.feature-item h4 { font-size: 1rem; margin-bottom: 8px; font-weight: 600; }
.feature-item p { font-size: .92rem; }

.stack-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.stack-chip {
  font-family: var(--font-mono); font-size: 11.5px;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 13px; color: var(--ink-dim);
}

/* ============================================================
   SKILLS
   ============================================================ */
.skill-groups { display: flex; flex-direction: column; gap: 34px; }
.skill-group-label {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: 14px;
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 12px; }
.skill-tag {
  font-family: var(--font-display); font-size: 1.05rem;
  padding: 10px 20px; border-radius: 999px;
  border: 1px solid var(--line);
  transition: border-color .25s, transform .25s, background .25s;
}
.skill-tag:hover { border-color: var(--accent); transform: translateY(-2px); background: var(--surface); }

/* ============================================================
   RESUME strip
   ============================================================ */
.resume-strip {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px clamp(22px, 4vw, 44px);
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  background: var(--surface);
}
.resume-strip h4 { font-size: 1.15rem; margin-bottom: 6px; }
.resume-strip p { font-size: .9rem; margin: 0; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-wrap { text-align: center; max-width: 720px; margin: 0 auto; }
.contact-wrap h2 { margin-bottom: 20px; }
.contact-wrap p { font-size: 1.08rem; max-width: 520px; margin: 0 auto 44px; }

.contact-links {
  display: flex; justify-content: center; gap: 14px; flex-wrap: wrap;
}
.contact-pill {
  font-family: var(--font-mono); font-size: 13.5px;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 14px 24px; display: inline-flex; align-items: center; gap: 10px;
  transition: border-color .25s, transform .25s, background .25s;
}
.contact-pill:hover { border-color: var(--accent); transform: translateY(-3px); background: var(--surface); }
.contact-pill svg { width: 16px; height: 16px; }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  padding: 44px 0 80px;
  border-top: 1px solid var(--line);
}
.footer-row {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint);
}

