/* ============================================================
   NEO-CLASSICAL TECH — Design System
   Zeno Marquis Personal Site
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; background: none; border: none; }

/* ---------- Tokens ---------- */
:root {
  /* Palette */
  --bg:              #fbf9f4;
  --bg-warm:         #f5f3ee;
  --surface:         #f0eee9;
  --surface-high:    #e4e2dd;
  --text:            #1b1c19;
  --text-dim:        #444748;
  --text-faint:      #747878;
  --gold:            #775a19;
  --gold-mid:        #a07828;
  --gold-light:      #e9c176;
  --gold-pale:       #ffdea5;
  --sage:            #3b5740;
  --sage-mid:        #758978;
  --sage-light:      #b7ccb9;
  --outline:         #c4c7c7;
  --outline-strong:  #9ca0a0;

  /* Typography */
  --serif: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --sans:  'Inter', system-ui, -apple-system, sans-serif;
  --mono:  'JetBrains Mono', 'Courier New', monospace;

  /* Easing */
  --ease-fast:   150ms ease;
  --ease-base:   260ms cubic-bezier(0.4, 0, 0.2, 1);
  --ease-slow:   420ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --max-w:     1120px;
  --pad:       40px;
  --pad-sm:    20px;

  /* Space scale (8px base) */
  --s1:   8px;
  --s2:  16px;
  --s3:  24px;
  --s4:  32px;
  --s6:  48px;
  --s8:  64px;
  --s12: 96px;
  --s16: 128px;
}

/* ---------- Base ---------- */
body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Layout ---------- */
.wrap {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section {
  padding-block: var(--s16);
}

/* ---------- Typography helpers ---------- */
.t-display {
  font-family: var(--serif);
  font-size: clamp(54px, 9vw, 92px);
  font-weight: 500;
  line-height: 0.93;
  letter-spacing: -0.03em;
}

.t-hl {
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.t-hm {
  font-family: var(--serif);
  font-size: clamp(20px, 2.4vw, 27px);
  font-weight: 500;
  line-height: 1.25;
}

.t-body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-dim);
}

.t-body-sm {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-dim);
}

.t-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.t-quote {
  font-family: var(--serif);
  font-size: clamp(20px, 2.6vw, 27px);
  font-style: italic;
  line-height: 1.55;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: var(--max-w);
  z-index: 1000;
  background: rgba(251, 249, 244, 0.82);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(196, 199, 199, 0.38);
  border-radius: 100px;
  box-shadow: 0 4px 24px rgba(27, 28, 25, 0.05), 0 1px 4px rgba(27, 28, 25, 0.04);
  transition: background var(--ease-base), border-color var(--ease-base),
              box-shadow var(--ease-base);
}

.nav.scrolled {
  background: rgba(251, 249, 244, 0.97);
  border-color: rgba(156, 160, 160, 0.45);
  box-shadow: 0 8px 40px rgba(27, 28, 25, 0.09);
}

.nav-inner {
  padding: 10px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
  transition: opacity var(--ease-fast);
}
.nav-logo:hover { opacity: 0.6; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 6px 12px;
  border-radius: 100px;
  transition: color var(--ease-fast), background var(--ease-fast);
}
.nav-link:hover {
  color: var(--text);
  background: rgba(240, 238, 233, 0.85);
}
.nav-link.active {
  color: var(--text);
  background: none;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 1px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}
.nav-toggle span {
  width: 22px;
  height: 1.5px;
  background: var(--text);
  display: block;
  transition: transform var(--ease-base), opacity var(--ease-base);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding-top: 96px;
}

.hero-ghost {
  position: absolute;
  top: 50%;
  right: -4%;
  transform: translateY(-50%);
  font-family: var(--serif);
  font-size: clamp(200px, 32vw, 420px);
  font-weight: 500;
  color: transparent;
  -webkit-text-stroke: 1px rgba(27, 28, 25, 0.05);
  pointer-events: none;
  user-select: none;
  line-height: 1;
  letter-spacing: -0.06em;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  margin-bottom: var(--s6);
  opacity: 0;
  animation: fadeUp 0.7s ease 0.1s forwards;
}

.hero-eyebrow-badge {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 6px 14px;
  border: 1px solid rgba(119, 90, 25, 0.28);
  border-radius: 100px;
  background: rgba(233, 193, 118, 0.08);
}

.hero-name {
  margin-bottom: var(--s4);
  opacity: 0;
  animation: fadeUp 0.8s ease 0.2s forwards;
}
.hero-name-first {
  display: block;
  color: var(--text-dim);
}
.hero-name-last {
  display: block;
  color: var(--text);
  position: relative;
}

.hero-rule {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--s4);
  opacity: 0;
  animation: fadeUp 0.7s ease 0.35s forwards;
  max-width: 500px;
}
.hero-rule-line {
  flex: 1;
  height: 0.5px;
  background: var(--gold);
}
.hero-rule-gem {
  font-size: 7px;
  color: var(--gold);
}

.hero-disciplines {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: var(--s3);
  opacity: 0;
  animation: fadeUp 0.7s ease 0.45s forwards;
}
.hero-disc {
  font-family: var(--serif);
  font-size: clamp(16px, 2.1vw, 22px);
  font-style: italic;
  color: var(--text-dim);
}
.hero-disc-sep {
  font-family: var(--serif);
  color: var(--gold);
  margin-inline: 10px;
  font-style: normal;
}

.hero-sub {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: var(--s4);
  opacity: 0;
  animation: fadeUp 0.7s ease 0.55s forwards;
}

.hero-bio {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.78;
  color: var(--text-dim);
  margin-bottom: var(--s6);
  max-width: 520px;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.63s forwards;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.65s forwards;
}
.hero-cta-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  border-bottom: 1px solid var(--text);
  padding-bottom: 2px;
  transition: color var(--ease-fast), border-color var(--ease-fast);
}
.hero-cta-circle {
  width: 34px;
  height: 34px;
  border: 1px solid var(--outline);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background var(--ease-base), border-color var(--ease-base),
              transform var(--ease-base);
}
.hero-cta:hover .hero-cta-label {
  color: var(--gold);
  border-bottom-color: var(--gold);
}
.hero-cta:hover .hero-cta-circle {
  background: var(--gold-pale);
  border-color: var(--gold-light);
  transform: translateY(4px);
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: var(--s4);
  opacity: 0;
  animation: fadeUp 0.7s ease 0.65s forwards;
}

.hero-cta {
  opacity: 1;
  animation: none;
}

.hero-btn-ghost {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 9px 20px;
  border: 1px solid var(--outline);
  transition: color var(--ease-fast), border-color var(--ease-fast), background var(--ease-fast);
}
.hero-btn-ghost:hover {
  color: var(--text);
  border-color: var(--outline-strong);
  background: var(--surface);
}

.hero-scroll {
  position: absolute;
  bottom: var(--s4);
  right: var(--pad);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  animation: fadeIn 1s ease 1.3s forwards;
}
.hero-scroll-line {
  width: 1px;
  height: 52px;
  background: linear-gradient(to bottom, var(--gold) 0%, transparent 100%);
}

/* Hero two-column inner grid */
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--s8);
  align-items: center;
}

/* Hero photo column */
.hero-photo-wrap {
  opacity: 0;
  animation: fadeUp 0.8s ease 0.35s forwards;
  align-self: center;
}

.hero-photo-frame {
  position: relative;
  margin-bottom: var(--s3);
}
.hero-photo-frame::after {
  content: '';
  position: absolute;
  inset: 10px -10px -10px 10px;
  border: 1px solid var(--gold-light);
  pointer-events: none;
  z-index: 0;
}
.hero-photo-img {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: 420px;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(10%);
  transition: filter var(--ease-slow);
  display: block;
}
.hero-photo-img:hover { filter: grayscale(0%); }

.hero-photo-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ============================================================
   SECTION HEADER
   ============================================================ */
.sec-head {
  display: flex;
  align-items: baseline;
  gap: var(--s3);
  margin-bottom: var(--s8);
}
.sec-num {
  /* .t-label */
  flex-shrink: 0;
  padding-bottom: 6px;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s12);
  align-items: start;
  max-width: 720px;
}

.about-lead {
  font-family: var(--serif);
  font-size: clamp(21px, 2.6vw, 27px);
  line-height: 1.55;
  color: var(--text);
  margin-bottom: var(--s4);
}

.about-body {
  /* .t-body */
  margin-bottom: var(--s6);
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s2) var(--s4);
  padding-top: var(--s4);
  border-top: 1px solid var(--outline);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.stat-label { /* .t-label */ }
.stat-value {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--text);
}

/* About visual */
.about-visual { position: sticky; top: 88px; }

.headshot-frame {
  position: relative;
  margin-bottom: var(--s4);
}
.headshot-frame::after {
  content: '';
  position: absolute;
  inset: 10px -10px -10px 10px;
  border: 1px solid var(--gold-light);
  pointer-events: none;
  z-index: 0;
}
.headshot {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(15%);
  transition: filter var(--ease-slow);
}
.headshot:hover { filter: grayscale(0%); }

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ============================================================
   TAGS / CHIPS
   ============================================================ */
.chip {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 10px;
  border: 1px solid var(--outline);
  color: var(--text-faint);
  transition: border-color var(--ease-fast), color var(--ease-fast),
              background var(--ease-fast);
}
.chip:hover {
  border-color: var(--outline-strong);
  color: var(--text-dim);
}
.chip-gold {
  border-color: var(--gold-light);
  color: var(--gold);
  background: rgba(233, 193, 118, 0.1);
}
.chip-sage {
  border-color: var(--sage-light);
  color: var(--sage);
  background: rgba(183, 204, 185, 0.12);
}

/* ============================================================
   SELECTED WORK
   ============================================================ */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--outline);
  border: 1px solid var(--outline);
}

.project {
  background: var(--bg);
  padding: var(--s6);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  position: relative;
  transition: background var(--ease-base);
}
.project::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: var(--surface-high);
  transition: background var(--ease-base);
}
.project:hover { background: var(--surface); }
.project:hover::before { background: var(--outline-strong); }

/* Gold accent card */
.project--gold::before { background: rgba(233, 193, 118, 0.8); }
.project--gold:hover::before { background: var(--gold); }

/* Sage accent card */
.project--sage::before { background: rgba(183, 204, 185, 0.9); }
.project--sage:hover::before { background: var(--sage-mid); }

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.project-link {
  width: 30px;
  height: 30px;
  border: 1px solid var(--outline);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-dim);
  flex-shrink: 0;
  transition: background var(--ease-fast), border-color var(--ease-fast),
              color var(--ease-fast), transform var(--ease-base);
}
.project:hover .project-link {
  background: var(--surface-high);
  border-color: var(--outline-strong);
  color: var(--text-dim);
  transform: rotate(45deg);
}

.project-title {
  /* .t-hm */
  flex: 0 0 auto;
}

.project-desc {
  /* .t-body-sm */
  flex: 1;
}

.project-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: var(--s3);
  border-top: 1px solid var(--outline);
}

/* ============================================================
   INTERESTS
   ============================================================ */
.interests-list { display: flex; flex-direction: column; }

.interest {
  display: grid;
  grid-template-columns: 160px 1fr 1fr;
  gap: var(--s6);
  align-items: start;
  padding-block: var(--s6);
  border-bottom: 1px solid var(--outline);
  transition: background var(--ease-base), padding-inline var(--ease-base);
}
.interest:first-child { border-top: 1px solid var(--outline); }
.interest:hover {
  background: var(--surface);
  padding-inline: var(--s3);
  margin-inline: calc(-1 * var(--s3));
}

.interest-tag { /* .t-label */ padding-top: 3px; }
.interest-title { /* .t-hm */ }
.interest-desc { /* .t-body-sm */ }

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  text-align: center;
  padding-block: var(--s16);
}
.contact-inner { max-width: 600px; margin-inline: auto; }

.contact-eyebrow {
  margin-bottom: var(--s4);
}

.contact-heading {
  /* .t-hl */
  margin-bottom: var(--s4);
}

.contact-copy {
  /* .t-quote */
  color: var(--text-dim);
  margin-bottom: var(--s8);
}

.contact-email {
  display: inline-block;
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 32px);
  color: var(--text);
  border-bottom: 1px solid var(--outline);
  padding-bottom: 4px;
  transition: color var(--ease-base), border-color var(--ease-base);
}
.contact-email:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.contact-socials {
  display: flex;
  justify-content: center;
  gap: var(--s4);
  margin-top: var(--s6);
}
.contact-social {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color var(--ease-fast);
}
.contact-social:hover { color: var(--text); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--outline);
  padding-block: var(--s4);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-copy { /* .t-label */ }
.footer-links { display: flex; gap: var(--s4); }
.footer-link {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  transition: color var(--ease-fast);
}
.footer-link:hover { color: var(--text); }

/* ============================================================
   DIVIDERS
   ============================================================ */
.rule {
  width: 100%;
  height: 1px;
  background: var(--outline);
  border: none;
}
.rule-gold {
  height: 0.5px;
  background: linear-gradient(to right, var(--gold), transparent 80%);
}

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ============================================================
   KEYFRAMES
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: var(--s6);
  }
  .hero-photo-wrap { display: none; }

  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-visual {
    position: static;
    max-width: 340px;
  }
  .interest {
    grid-template-columns: 1fr;
    gap: var(--s2);
  }
  .interest:hover {
    padding-inline: 0;
    margin-inline: 0;
    background: transparent;
  }
  .work-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --pad: var(--pad-sm);
  }

  /* Revert pill nav to full-width flat bar on mobile */
  .nav {
    top: 0;
    left: 0;
    transform: none;
    width: 100%;
    max-width: none;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--outline);
    box-shadow: none;
    background: rgba(251, 249, 244, 0.95);
  }
  .nav.scrolled {
    box-shadow: 0 1px 20px rgba(27, 28, 25, 0.05);
    border-bottom-color: var(--outline-strong);
    background: rgba(251, 249, 244, 0.99);
  }
  .nav-inner {
    padding: 0 var(--pad-sm);
    height: 60px;
  }

  .section { padding-block: var(--s8); }
  .sec-head {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s1);
    margin-bottom: var(--s6);
  }
  .hero { padding-top: 76px; }
  .hero-disciplines { flex-direction: column; }
  .hero-disc-sep { display: none; }
  .hero-scroll { display: none; }
  .hero-ctas { flex-direction: column; align-items: flex-start; }
  .nav-links {
    display: none;
    flex-direction: column;
    position: fixed;
    inset: 60px 0 0;
    background: var(--bg);
    padding: var(--s4) var(--pad-sm);
    gap: var(--s3);
    border-top: 1px solid var(--outline);
    z-index: 999;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links .nav-link {
    font-size: 13px;
    padding: 8px 0;
    border-radius: 0;
    background: none !important;
  }
  .nav-toggle { display: flex; }
  .about-stats { grid-template-columns: 1fr; }
  .footer-inner {
    flex-direction: column;
    gap: var(--s2);
    text-align: center;
  }
  .footer-links {
    justify-content: center;
  }
  .contact-socials {
    flex-direction: column;
    align-items: center;
    gap: var(--s2);
  }
}
