/* ============================================================
   DESIGN TOKENS — dark is the default; [data-theme="light"] overrides
   ============================================================ */
:root {
  --bg:            #000000;
  --bg-soft:       #1d1d1f;
  --text:          #f5f5f7;
  --text-soft:     #a1a1a6;
  --text-faint:    #86868b;
  --border:        #38383d;
  --accent:        #2997ff;
  --accent-hover:  #52a9ff;
  --card-bg:       #0d0d0f;
  --tag-bg:        #18181b;
  --shadow:        0 1px 2px rgba(0,0,0,.4), 0 12px 28px rgba(0,0,0,.45);
  --shadow-hover:  0 4px 10px rgba(0,0,0,.5), 0 24px 48px rgba(0,0,0,.55);

  --contact-bg:      #000000;
  --contact-text:    #ffffff;
  --contact-text-soft: #86868b;

  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  --font-body:    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --font-mono:    ui-monospace, "SF Mono", "Menlo", "Consolas", monospace;

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;

  --container: 1120px;
  --section-pad: clamp(40px, 7vw, 84px);
  --nav-height: 68px;
}

[data-theme="light"] {
  --bg:            #ffffff;
  --bg-soft:       #f5f5f7;
  --text:          #1d1d1f;
  --text-soft:     #6e6e73;
  --text-faint:    #86868b;
  --border:        #d2d2d7;
  --accent:        #0071e3;
  --accent-hover:  #0077ed;
  --card-bg:       #ffffff;
  --tag-bg:        #f5f5f7;
  --shadow:        0 1px 2px rgba(0,0,0,.05), 0 12px 28px rgba(0,0,0,.07);
  --shadow-hover:  0 4px 10px rgba(0,0,0,.07), 0 24px 48px rgba(0,0,0,.10);
}

/* ============================================================
   RESET / BASE
   ============================================================ */
* { box-sizing: border-box; }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  transition: background .35s ease, color .35s ease;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

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

main { padding-top: var(--nav-height); }

.section { padding: var(--section-pad) 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--text-soft);
  text-transform: uppercase;
  margin: 0 0 12px;
}

.section__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(26px, 3.6vw, 36px);
  letter-spacing: -0.02em;
  line-height: 1.15;
  max-width: 640px;
}

.section__subtitle {
  color: var(--text-soft);
  font-size: 17px;
  margin-top: 12px;
  max-width: 560px;
}

/* ============================================================
   PAGE / TAB SYSTEM — one section visible at a time
   ============================================================ */
.page { display: none; }
.page.is-active {
  display: block;
  animation: pageFade .45s cubic-bezier(.2,.7,.2,1);
}
.page.hero.is-active { display: flex; }
.page.contact.is-active { display: flex; flex-direction: column; justify-content: space-between; }
@keyframes pageFade {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .page.is-active { animation: none; }
}

/* ============================================================
   BUTTONS / TAGS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  transition: transform .25s ease, background .25s ease, box-shadow .25s ease;
  white-space: nowrap;
}
.btn--primary { background: var(--text); color: var(--bg); }
.btn--primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.btn--ghost { border: 1px solid var(--border); color: var(--text); }
.btn--ghost:hover { border-color: var(--text-faint); transform: translateY(-1px); }
.btn--lg { padding: 16px 32px; font-size: 17px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tags--lg .tag { font-size: 14px; padding: 9px 16px; }
.tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .01em;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--tag-bg);
  border: 1px solid var(--border);
  color: var(--text-soft);
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: transparent;
  transition: background .35s ease, border-color .35s ease, backdrop-filter .35s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom-color: var(--border);
}
.nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__brand {
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: .04em;
  font-size: 15px;
}
.nav__links {
  display: flex;
  gap: 22px;
}
.nav__links a {
  font-size: 13.5px;
  color: var(--text-soft);
  transition: color .2s ease;
  position: relative;
  white-space: nowrap;
}
.nav__links a:hover, .nav__links a.is-active { color: var(--text); }
.nav__actions { display: flex; align-items: center; gap: 14px; }

.theme-toggle {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
  transition: border-color .2s ease, transform .2s ease;
  flex-shrink: 0;
}
.theme-toggle:hover { transform: translateY(-1px); border-color: var(--text-faint); }
.theme-toggle .icon { width: 16px; height: 16px; }
.icon-sun { display: none; }
.icon-moon { display: block; }
[data-theme="light"] .icon-sun { display: block; }
[data-theme="light"] .icon-moon { display: none; }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 22px;
  flex-shrink: 0;
}
.nav__burger span { height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s ease, opacity .25s ease; }
.nav__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: calc(92vh - var(--nav-height));
  align-items: center;
  overflow: hidden;
  padding: 56px 24px 64px;
}
.hero__trajectory {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: .4;
}
[data-theme="light"] .hero__trajectory { opacity: .55; }
.hero__trajectory path {
  fill: none;
  stroke: var(--border);
  stroke-width: 1.5;
  stroke-dasharray: 6 6;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
}
.hero__name {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.02;
  font-size: clamp(40px, 7vw, 84px);
  margin: 0 0 24px;
}
.hero__tagline {
  font-size: clamp(17px, 2vw, 21px);
  color: var(--text-soft);
  max-width: 620px;
  line-height: 1.5;
  margin-bottom: 28px;
}
.hero__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--text-faint);
  text-transform: uppercase;
  display: flex;
  flex-wrap: wrap;
  row-gap: 6px;
  margin-bottom: 40px;
}
.hero__meta span { white-space: nowrap; }
.hero__meta span:not(:last-child)::after { content: "·"; margin: 0 10px; color: var(--border); }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* ============================================================
   ABOUT
   ============================================================ */
.about__grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 60px;
  align-items: start;
}
.about__avatar {
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-soft);
  box-shadow: var(--shadow);
}
.about__avatar img { width: 100%; height: 100%; object-fit: cover; }
.about__text {
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.6;
  margin-top: 16px;
}
.about__text:first-of-type { margin-top: 18px; }
.about__facts { margin-top: 26px; display: flex; flex-direction: column; gap: 12px; }
.about__facts li {
  font-size: 14.5px;
  color: var(--text);
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.about__facts li span {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-faint);
  margin-bottom: 4px;
}

/* ============================================================
   PROJECTS
   ============================================================ */
.projects__grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.project-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
}
.project-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.project-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--bg-soft);
}
.project-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.1s ease;
}
.project-card__media img.is-active { opacity: 1; }
.project-card__body { padding: 20px 22px 22px; flex: 1; display: flex; flex-direction: column; }
.project-card__dates {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 8px;
}
.project-card__title { font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.project-card__subtitle { color: var(--accent); font-size: 13.5px; margin-top: 3px; font-weight: 500; }
.project-card__desc { color: var(--text-soft); font-size: 14px; line-height: 1.5; margin-top: 10px; }
.project-card__link {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  width: fit-content;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--text);
}
.project-card__link .icon { width: 15px; height: 15px; }
.project-card__link--soon { color: var(--text-faint); border-bottom-color: var(--border); }

/* ============================================================
   TIMELINE (experience)
   ============================================================ */
.timeline {
  margin-top: 40px;
  position: relative;
  padding-left: 26px;
  border-left: 1px solid var(--border);
}
.timeline__item { position: relative; padding-bottom: 38px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__marker {
  position: absolute;
  left: -31px;
  top: 6px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg);
}
.timeline__dates {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 6px;
}
.timeline__role { font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.timeline__org { color: var(--accent); font-size: 14px; margin-top: 3px; font-weight: 500; }
.timeline__bullets { margin-top: 12px; display: flex; flex-direction: column; gap: 7px; max-width: 640px; }
.timeline__bullets li {
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.5;
  padding-left: 16px;
  position: relative;
}
.timeline__bullets li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--border);
}

/* ============================================================
   EDUCATION
   ============================================================ */
.edu__grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.edu-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform .3s ease, box-shadow .3s ease;
}
.edu-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.edu-card__dates {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-faint);
  margin-bottom: 8px;
}
.edu-card__school { font-family: var(--font-display); font-size: 18px; font-weight: 600; letter-spacing: -.01em; line-height: 1.28; }
.edu-card__degree { color: var(--accent); font-size: 13.5px; margin-top: 5px; font-weight: 500; }
.edu-card__detail { color: var(--text-soft); font-size: 13.5px; margin-top: 6px; }
.edu-card__label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-faint);
  margin-top: 16px;
  margin-bottom: 2px;
}

/* ============================================================
   RECOGNITION / SKILLS
   ============================================================ */
.recognition__grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 60px;
}
.honors { margin-top: 28px; display: flex; flex-direction: column; gap: 20px; }
.honors__item h3 { font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.honors__issuer {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-faint);
  margin-top: 5px;
}
.honors__detail { color: var(--text-soft); font-size: 14px; line-height: 1.5; margin-top: 6px; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  padding: var(--section-pad) 0 0;
  text-align: center;
  background: var(--contact-bg);
  color: var(--contact-text);
  min-height: calc(100vh - var(--nav-height));
}
.contact .eyebrow { color: var(--contact-text-soft); }
.contact__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 4.6vw, 44px);
  letter-spacing: -0.02em;
}
.contact__subtitle { color: var(--contact-text-soft); font-size: 16px; margin-top: 14px; max-width: 480px; margin-left: auto; margin-right: auto; }
.contact__actions { margin-top: 32px; }
.contact .btn--primary { background: var(--contact-text); color: var(--contact-bg); }
.contact__social { margin-top: 26px; display: flex; gap: 26px; justify-content: center; }
.social-link { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--contact-text-soft); transition: color .2s ease; }
.social-link:hover { color: var(--contact-text); }
.social-link svg { width: 18px; height: 18px; }

.footer__inner {
  padding: 40px 24px 26px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--contact-text-soft);
  border-top: 1px solid rgba(255,255,255,.12);
  margin-top: 40px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .about__grid { grid-template-columns: 1fr; gap: 32px; }
  .about__avatar { max-width: 200px; }
  .recognition__grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 880px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .nav__links.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--bg);
    padding: 20px 24px 28px;
    gap: 18px;
    border-bottom: 1px solid var(--border);
  }
  .nav__links.is-open a { font-size: 15px; }
  .hero { min-height: auto; padding-top: 48px; }
  .footer__inner { flex-direction: column; gap: 6px; }
}
