/* ============================================================
   Aiden Lin — Independent project & account lead
   Editorial system: Newsreader / Inter / JetBrains Mono
   Warm ivory paper · single forest-green accent · no slop
   ============================================================ */

:root {
  /* Surfaces — warm neutral, two tones max */
  --paper:   #f7f5ef;
  --paper-2: #f1eee5;
  --band:    color-mix(in srgb, var(--accent) 13%, var(--paper));
  --card:    #fffdf8;
  --ink:     #1b201c;
  --ink-2:   #535a51;
  --ink-3:   #888e83;
  --line:    #e4e1d6;
  --line-2:  #d6d3c6;

  /* Single accent — overridable by tweaks */
  --accent:      #2f6b4f;
  --accent-d:    color-mix(in srgb, var(--accent) 76%, #000);
  --accent-soft: color-mix(in srgb, var(--accent) 10%, var(--paper));
  --accent-line: color-mix(in srgb, var(--accent) 26%, var(--line));
  --live:        #37a866;

  /* Type */
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:  'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;

  /* Type scale */
  --t-eyebrow: 0.75rem;
  --t-meta:    0.8125rem;
  --t-body:    1.0625rem;
  --t-lede:    1.1875rem;
  --t-h3:      1.3125rem;
  --t-h2:      clamp(2rem, 3.4vw, 2.85rem);
  --t-h1:      clamp(2.5rem, 5vw, 3.9rem);
  --t-display: clamp(3.4rem, 7vw, 5.2rem);

  /* Rhythm */
  --maxw: 1080px;
  --gut: clamp(1.25rem, 4vw, 3rem);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* , *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
svg.ico { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
::selection { background: var(--accent-soft); color: var(--accent-d); }

/* ---------- Shared ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); }
.section { padding: clamp(4rem, 9vw, 7.5rem) 0; }
.rule { height: 1px; background: var(--line); border: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.7rem;
  font-family: var(--mono); font-size: var(--t-eyebrow);
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 500;
}
.eyebrow::before { content: ''; width: 22px; height: 1px; background: var(--accent); }

.h2 {
  font-family: var(--serif); font-weight: 500; font-size: var(--t-h2);
  line-height: 1.08; letter-spacing: -0.018em; color: var(--ink);
  margin-top: 1.1rem; text-wrap: balance;
}
.h2 em { font-style: italic; color: var(--accent-d); }
.lede { font-size: var(--t-lede); line-height: 1.6; color: var(--ink-2); max-width: 54ch; }
.body-text { color: var(--ink-2); }
.body-text strong { color: var(--ink); font-weight: 600; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-weight: 600; font-size: var(--t-meta); color: var(--accent-d);
  border-bottom: 1px solid var(--accent-line); padding-bottom: 2px;
  transition: gap 0.2s var(--ease), border-color 0.2s var(--ease);
}
.link-arrow svg { width: 14px; height: 14px; }
.link-arrow:hover { gap: 0.7rem; border-color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.8rem 1.4rem; border-radius: 7px;
  font-size: var(--t-meta); font-weight: 600; font-family: var(--sans);
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.btn svg { width: 15px; height: 15px; transition: transform 0.2s var(--ease); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-d); }
.btn-primary:hover svg { transform: translateX(3px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-d); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--line); background: color-mix(in srgb, var(--paper) 93%, transparent); }
.nav-inner {
  max-width: 1240px; margin: 0 auto; padding: 1rem var(--gut);
  display: flex; align-items: center; justify-content: space-between;
}
.brand { font-family: var(--serif); font-weight: 600; font-size: 1.25rem; letter-spacing: -0.01em; display: flex; align-items: center; gap: 0.65rem; white-space: nowrap; flex-shrink: 0; }
.brand .cn { font-family: var(--sans); font-size: 0.8rem; color: var(--ink-3); font-weight: 400; letter-spacing: 0.04em; }
.brand-mark { flex-shrink: 0; transform: translateY(-2px); transition: opacity 0.2s var(--ease); }
.brand:hover .brand-mark { opacity: 0.75; }
.nav-links { display: flex; align-items: center; gap: 0.4rem; list-style: none; }
.nav-links > li > a {
  position: relative; font-size: var(--t-meta); color: var(--ink-2); font-weight: 500;
  padding: 0.4rem 0.8rem; border-radius: 6px; transition: color 0.2s var(--ease);
}
.nav-links > li > a:hover { color: var(--ink); }
.nav-links > li > a.active { color: var(--accent-d); }
.nav-links > li > a.active::after { content: ''; position: absolute; left: 0.8rem; right: 0.8rem; bottom: -1px; height: 2px; background: var(--accent); border-radius: 2px; }
.nav-cta { margin-left: 0.6rem; }
.nav-links .nav-cta .btn-primary { color: #fff; padding: 0.55rem 1.1rem; }
.nav-links .nav-cta .btn-primary:hover { color: #fff; }
.nav-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: 0; cursor: pointer; padding: 0.4rem; }
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero { padding: clamp(5.5rem, 9vw, 7.5rem) 0 0; position: relative; }
.hero-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 var(--gut);
  display: grid; grid-template-columns: minmax(0, 600px) minmax(300px, 420px); gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center; justify-content: center;
}
.hero-copy { padding-bottom: 0; max-width: 100%; align-self: center; }
.hero-status {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--mono); font-size: var(--t-eyebrow); letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-3);
}
.hero-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 3px color-mix(in srgb, var(--live) 22%, transparent); }
.hero h1 {
  font-family: var(--serif); font-weight: 500; font-size: var(--t-h1);
  line-height: 1.04; letter-spacing: -0.025em; color: var(--ink);
  margin: 1.4rem 0 1.5rem; text-wrap: balance;
}
.hero h1 em { font-style: italic; color: var(--accent-d); }
.hero-lede { font-size: var(--t-lede); line-height: 1.6; color: var(--ink-2); max-width: 50ch; }
.hero-lede strong { color: var(--ink); font-weight: 600; }
.hero-cta { display: flex; gap: 0.75rem; margin-top: 2rem; flex-wrap: wrap; }

.hero-photo { position: relative; align-self: end; justify-self: center; }
/* LAYER 1 — soft brand-green glow UNDER the figure (separate layer) */
.hero-photo .hero-stage {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 380%; height: 340%; z-index: 0; border-radius: 50%; pointer-events: none;
  background:
    radial-gradient(55% 55% at 50% 50%,
      color-mix(in srgb, var(--accent) 28%, transparent) 0%,
      color-mix(in srgb, var(--accent) 18%, transparent) 30%,
      color-mix(in srgb, var(--accent) 10%, transparent) 55%,
      color-mix(in srgb, var(--accent) 4%, transparent) 75%,
      transparent 92%);
  filter: blur(64px);
}
.hero-photo .plinth { display: none; }
.hero-photo .hero-floor {
  position: absolute; left: 50%; bottom: 2%; transform: translateX(-50%);
  width: 70%; height: 40px; z-index: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(ellipse at center,
    color-mix(in srgb, var(--accent-d) 22%, transparent) 0%,
    color-mix(in srgb, var(--accent-d) 8%, transparent) 48%,
    transparent 76%);
  filter: blur(16px);
}
/* LAYER 2 — the figure, fully opaque, always on top of the glow */
.hero-photo img { position: relative; z-index: 2; width: auto; height: min(64vh, 560px); max-width: 100%; filter: drop-shadow(0 12px 20px rgba(20,36,26,0.16)); }

/* proof strip */
.proof {
  border-top: 1px solid var(--line); margin-top: clamp(1.5rem, 4vw, 3rem);
}
.proof-inner {
  max-width: 1240px; margin: 0 auto; padding: 1.4rem var(--gut);
  display: flex; align-items: center; gap: 1.5rem 2.2rem; flex-wrap: wrap;
}
.proof-label { font-family: var(--mono); font-size: var(--t-eyebrow); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.proof-names { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; font-size: var(--t-meta); color: var(--ink-2); font-weight: 500; }
.proof-names span { position: relative; }
.proof-names span + span::before { content: '·'; position: absolute; left: -0.85rem; color: var(--ink-3); }

/* ---------- Section background rhythm ---------- */
.section.alt { background: var(--paper-2); }

/* ---------- Stats band (soft sage, harmonious) ---------- */
.stats { background: var(--band); color: var(--ink); border-top: 1px solid var(--accent-line); border-bottom: 1px solid var(--accent-line); }
.stats-inner {
  max-width: 1240px; margin: 0 auto; padding: clamp(1.7rem, 3vw, 2.3rem) var(--gut) clamp(0.9rem, 1.8vw, 1.2rem);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem;
}
.stat { padding-left: 1.5rem; border-left: 1px solid var(--accent-line); }
.stat:first-child { padding-left: 0; border-left: 0; }
.stat-val { font-family: var(--serif); font-weight: 500; font-size: clamp(2rem, 3.4vw, 2.7rem); line-height: 1; letter-spacing: -0.02em; color: var(--accent-d); }
.stat-lbl { font-size: var(--t-meta); color: var(--ink-2); margin-top: 0.5rem; line-height: 1.4; }
.stats-foot { max-width: 1240px; margin: 0 auto; padding: 0 var(--gut) clamp(1.4rem,2.6vw,1.9rem); }
.stats-foot p { font-family: var(--mono); font-size: var(--t-eyebrow); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }

/* ---------- Services ---------- */
.services-layout { display: grid; grid-template-columns: 320px 1fr; gap: clamp(2.5rem, 5vw, 5rem); align-items: start; }
.svc-head { display: flex; flex-direction: column; gap: 1.1rem; position: sticky; top: 96px; }
.svc-head .lede { margin-top: 0; }
.svc-list { display: grid; gap: 0; }
.svc {
  display: grid; grid-template-columns: 2.2rem 1fr; gap: 0 1.4rem;
  padding: clamp(1.6rem, 3vw, 2.2rem) 0; border-top: 1px solid var(--line);
  align-items: start;
}
.svc:first-child { padding-top: 0; border-top: 0; }
.svc-num { font-family: var(--mono); font-size: var(--t-meta); color: var(--accent); padding-top: 0.35rem; }
.svc-icon { display: none; }
.svc-main { display: flex; flex-direction: column; gap: 0.6rem; }
.svc h3 { font-family: var(--sans); font-weight: 600; font-size: var(--t-h3); letter-spacing: -0.01em; color: var(--ink); line-height: 1.25; }
.svc h3 .svc-ic { display: inline-flex; vertical-align: -3px; margin-right: 0.5rem; color: var(--accent); }
.svc h3 .svc-ic svg { width: 19px; height: 19px; }
.svc p { color: var(--ink-2); font-size: var(--t-body); line-height: 1.6; max-width: 60ch; }
.svc p strong { color: var(--ink); font-weight: 600; }
@media (max-width: 880px) { .services-layout { grid-template-columns: 1fr; gap: clamp(2rem,5vw,3rem); } .svc-head { position: static; } }

/* toolkit — grouped sentences (what + how I use each set) */
.toolkit { margin-top: clamp(3rem, 6vw, 4.5rem); border-top: 1px solid var(--line); padding-top: clamp(2.2rem, 4vw, 3rem); }
.toolkit-label { font-family: var(--mono); font-size: var(--t-eyebrow); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: clamp(1.6rem, 3vw, 2.2rem); }
.toolkit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.8rem, 4vw, 3.5rem); }
.tk-group { display: flex; flex-direction: column; gap: 0.7rem; }
.tk-group h4 { font-family: var(--sans); font-weight: 600; font-size: var(--t-body); color: var(--ink); letter-spacing: -0.01em; display: flex; align-items: center; gap: 0.6rem; }
.tk-group h4 .tk-ic { color: var(--accent); display: inline-flex; }
.tk-group h4 .tk-ic svg { width: 18px; height: 18px; }
.tk-use { font-size: var(--t-body); color: var(--ink-2); line-height: 1.62; overflow-wrap: anywhere; }
.tk-use b { color: var(--ink); font-weight: 600; }
@media (max-width: 820px) { .toolkit-grid { grid-template-columns: 1fr; gap: 1.8rem; } }

/* ---------- Selected work ---------- */
#work { padding-bottom: clamp(2rem, 3.5vw, 3rem); }
.work-list .work:last-child { border-bottom: 0; padding-bottom: 0; }
.work-head { max-width: 640px; margin-bottom: clamp(1rem, 2vw, 1.4rem); }
.work-head .h2 { margin-top: 0.9rem; }
.work-head .work-intro { margin-top: 1.1rem; font-size: var(--t-lede); line-height: 1.55; color: var(--ink-2); }
.work-list { border-top: 1px solid var(--line-2); }
.work {
  display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 0.6rem 3rem;
  padding: clamp(2rem, 4vw, 2.8rem) 0; border-bottom: 1px solid var(--line);
  align-items: start;
}
.work-meta { display: flex; flex-direction: column; gap: 0.5rem; }
.work-idx { font-family: var(--mono); font-size: var(--t-eyebrow); color: var(--ink-3); letter-spacing: 0.1em; }
.work-client { font-family: var(--serif); font-weight: 500; font-size: 1.65rem; line-height: 1.1; letter-spacing: -0.015em; color: var(--ink); }
.work-role { font-size: var(--t-meta); color: var(--accent-d); font-weight: 600; }
.work-where { font-family: var(--mono); font-size: var(--t-eyebrow); color: var(--ink-3); letter-spacing: 0.04em; }
.work-lead { margin-top: 0.6rem; font-size: var(--t-meta); color: var(--ink-2); line-height: 1.5; max-width: 34ch; }
.work-points { list-style: none; display: flex; flex-direction: column; gap: 0.8rem; }
.work-points li { position: relative; padding-left: 1.4rem; font-size: var(--t-body); color: var(--ink-2); line-height: 1.55; }
.work-points li::before { content: ''; position: absolute; left: 0; top: 0.62em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.work-points li strong { color: var(--ink); font-weight: 600; }
.work-visit { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 0.7rem; font-size: var(--t-meta); font-weight: 600; color: var(--accent-d); }
.work-visit .live-flag { display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--mono); font-size: var(--t-eyebrow); letter-spacing: 0.06em; text-transform: uppercase; }
.work-visit .live-flag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 3px color-mix(in srgb, var(--live) 22%, transparent); }
.work-visit .visit-link { display: inline-flex; align-items: center; gap: 0.35rem; border-bottom: 1px solid var(--accent-line); padding-bottom: 1px; transition: gap 0.2s var(--ease), border-color 0.2s var(--ease); }
.work-visit .visit-link svg { width: 13px; height: 13px; }
.work-visit:hover .visit-link { gap: 0.55rem; border-color: var(--accent); }
.work-body p { color: var(--ink-2); font-size: var(--t-body); line-height: 1.62; }
.work-body p strong { color: var(--ink); font-weight: 600; }
.work-body .work-foot { margin-top: 1.1rem; display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }

/* inline live indicator under a project */
.work-foot .live-flag { display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--mono); font-size: var(--t-eyebrow); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-d); }
.work-foot .live-flag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 3px color-mix(in srgb, var(--live) 22%, transparent); }

/* ---------- About ---------- */
.about { background: transparent; }
.about-mob-eyebrow { display: none; }
.about-grid { display: grid; grid-template-columns: 300px 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.about-aside { display: flex; flex-direction: column; gap: 1.4rem; position: sticky; top: 96px; }
.about-photo { position: relative; margin: 0; }
.about-photo .photo-frame {
  border-radius: 16px; overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line-2);
  box-shadow: 0 24px 44px -26px rgba(27,32,28,0.28);
  aspect-ratio: 4 / 4.4;
}
.about-photo .photo-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 8%; display: block; }
.about-photo figcaption { font-family: var(--mono); font-size: var(--t-eyebrow); letter-spacing: 0.06em; color: var(--ink-3); margin-top: 0.8rem; }
.about-body .h2 { margin-bottom: 1.4rem; }
.about-body p { color: var(--ink-2); font-size: var(--t-body); line-height: 1.7; margin-bottom: 1.1rem; max-width: 58ch; }
.about-body p + p { margin-top: 0; }
.about-body p strong { color: var(--ink); font-weight: 600; }
.about-skills { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 1.8rem; border-top: 1px solid var(--line); }
.about-skill { padding: 1.2rem 1.6rem 1.2rem 0; border-bottom: 1px solid var(--line); }
.about-skill:nth-child(odd) { padding-right: 2rem; border-right: 1px solid var(--line); }
.about-skill:nth-child(even) { padding-left: 1.8rem; }
.about-skill:nth-last-child(-n+2) { border-bottom: 0; }
.as-label { display: block; font-family: var(--sans); font-weight: 600; font-size: var(--t-body); color: var(--ink); letter-spacing: -0.01em; margin-bottom: 0.35rem; }
.about-skill p { font-size: var(--t-meta); color: var(--ink-2); line-height: 1.5; margin: 0; max-width: none; }
@media (max-width: 520px) {
  .about-skills { grid-template-columns: 1fr; }
  .about-skill, .about-skill:nth-child(odd) { padding: 1rem 0; border-right: 0; }
  .about-skill:nth-child(even) { padding-left: 0; }
  .about-skill:nth-last-child(2) { border-bottom: 1px solid var(--line); }
}
.about-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.4rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.fact-label { font-family: var(--mono); font-size: var(--t-eyebrow); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 0.3rem; }
.fact-val { font-size: var(--t-meta); color: var(--ink); font-weight: 500; line-height: 1.4; }

/* education block (sits under About, same section) */
.edu { margin-top: clamp(2.5rem, 5vw, 3.5rem); padding-top: clamp(2.5rem, 5vw, 3.5rem); border-top: 1px solid var(--line); }
.edu-head { margin-bottom: clamp(1.6rem, 3vw, 2.4rem); }
.edu-title { font-family: var(--serif); font-weight: 500; font-size: var(--t-h3); line-height: 1.15; letter-spacing: -0.012em; color: var(--ink); margin-top: 0.9rem; text-wrap: balance; }
.edu-list { border-top: 1px solid var(--line); }
.edu-row {
  display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 0.5rem 3rem;
  padding: clamp(1.6rem, 3vw, 2.2rem) 0; border-bottom: 1px solid var(--line);
  align-items: start;
}
.edu-meta { display: flex; flex-direction: column; gap: 0.4rem; }
.edu-deg { font-size: var(--t-body); font-weight: 600; color: var(--ink); line-height: 1.3; }
.edu-field { font-size: var(--t-meta); color: var(--accent-d); font-weight: 500; }
.edu-where { font-family: var(--mono); font-size: var(--t-eyebrow); color: var(--ink-3); letter-spacing: 0.04em; }
.edu-grade { font-family: var(--mono); font-size: var(--t-eyebrow); color: var(--ink-2); font-weight: 500; letter-spacing: 0.04em; }
.edu-body p { color: var(--ink-2); font-size: var(--t-meta); line-height: 1.62; }
.edu-body p strong { color: var(--ink); font-weight: 600; }

/* ---------- Contact (final CTA, centered) ---------- */
.contact { text-align: center; background: var(--paper-2); border-top: 1px solid var(--line); }
.contact-inner { max-width: 640px; margin: 0 auto; }
.contact .h2 { margin: 1rem 0 1.2rem; }
.contact .lede { margin: 0 auto; }
.contact-actions { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; margin-top: 2.4rem; }
.contact-email { font-family: var(--serif); font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 500; color: var(--accent-d); border-bottom: 1px solid var(--accent-line); padding-bottom: 3px; letter-spacing: -0.01em; }
.contact-email:hover { border-color: var(--accent); }
.contact-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; justify-content: center; }
.contact-link { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1rem; border: 1px solid var(--line-2); border-radius: 7px; font-size: var(--t-meta); font-weight: 500; color: var(--ink); white-space: nowrap; transition: border-color 0.2s var(--ease), color 0.2s var(--ease); }
.contact-link:hover { border-color: var(--accent); color: var(--accent-d); }
.contact-link svg { width: 17px; height: 17px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); }
.footer-inner { max-width: 1240px; margin: 0 auto; padding: 2rem var(--gut); display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.footer-inner p { font-size: var(--t-meta); color: var(--ink-3); }
.footer-inner .mono { font-family: var(--mono); font-size: var(--t-eyebrow); letter-spacing: 0.06em; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  /* Keep text-left / photo-right layout — mirrors desktop */
  .hero { padding-top: clamp(6rem, 12vw, 8rem); }
  .hero-inner {
    grid-template-columns: 1fr minmax(0, 44%);
    gap: clamp(0.75rem, 2.5vw, 2rem);
    align-items: end;
  }
  .hero-photo { display: block; order: 0; justify-self: center; margin-bottom: 0; }
  .hero-photo img { height: min(56vh, 440px); width: auto; max-width: 100%; }
  .hero-photo .hero-stage { width: 260%; height: 260%; filter: blur(48px); }
  .hero-copy { max-width: 100%; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); gap: 2rem 1.5rem; }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .svc-main { grid-template-columns: 1fr; gap: 0.5rem; }
  .work { grid-template-columns: 1fr; gap: 1rem; }
  .edu-row { grid-template-columns: 1fr; gap: 0.7rem; }
  .about-mob-eyebrow { display: inline-flex; margin-bottom: 1.5rem; }
  .about-body > .eyebrow { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .about-aside { position: static; flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 1.5rem 2rem; border-bottom: 1px solid var(--line); padding-bottom: 1.75rem; margin-bottom: 0.25rem; }
  .about-photo { max-width: 280px; flex: 0 0 240px; }
  .about-aside .about-facts { flex: 1; min-width: 240px; align-content: start; }
}
@media (max-width: 600px) {
  /* Nav */
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; background: color-mix(in srgb, var(--paper) 97%, transparent); backdrop-filter: blur(12px); padding: 0.8rem var(--gut) 1.2rem; gap: 0.2rem; border-bottom: 1px solid var(--line); }
  .nav-links.open { display: flex; }
  .nav-links > li > a { padding: 0.7rem 0.6rem; }
  .nav-links > li > a.active::after { display: none; }
  .nav-cta { margin: 0.4rem 0 0; }
  .brand { font-size: 1.1rem; }
  .nav-cta .btn { width: 100%; justify-content: center; }
  .nav-toggle { display: flex; }
  /* Align every section to the SAME left gutter on mobile (some have inline 44px padding) */
  .nav-inner, .stats-inner, .stats-foot { padding-left: var(--gut) !important; padding-right: var(--gut) !important; }

  /* HERO — stack vertically on phones so the text gets full width and stays readable */
  .hero { padding-top: clamp(4.5rem, 16vw, 6rem); }
  .hero-inner { grid-template-columns: 1fr; gap: clamp(1.75rem, 7vw, 2.5rem); align-items: start; }
  .hero-copy { order: 1; max-width: 100%; }
  .hero-photo { order: 2; justify-self: center; align-self: start; }
  .hero-photo img { height: min(52vh, 400px); width: auto; max-width: 100%; }
  .hero-photo .hero-stage { width: 200%; height: 200%; filter: blur(44px); }
  .hero h1 { font-size: clamp(2rem, 9vw, 2.7rem); margin: 1rem 0 1.1rem; line-height: 1.08; }
  .hero-lede { font-size: var(--t-body); line-height: 1.6; max-width: 100%; }
  .hero-status { font-size: var(--t-eyebrow); }
  /* CTA — full-width, evenly split tap targets */
  .hero-cta { flex-direction: row; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.6rem; }
  .hero-cta .btn { flex: 1 1 140px; justify-content: center; padding: 0.9rem 1.2rem; font-size: var(--t-meta); }

  /* Stats — single clean stacked list (number + label per row) */
  .stats-inner { grid-template-columns: 1fr; gap: 0; }
  .stat { padding: 1.1rem 0 0; border-left: 0; border-top: 1px solid var(--accent-line); }
  .stat:first-child { padding-top: 0; border-top: 0; }
  .stat-val { font-size: 2.1rem; }
  .stat-lbl { margin-top: 0.25rem; }

  /* About — stack photo above facts, both full width */
  .about-facts { grid-template-columns: 1fr 1fr; }
  .about-aside { flex-direction: column; gap: 1.5rem; }
  .about-photo { max-width: 320px; flex: 0 0 auto; width: 100%; }
  .about-aside .about-facts { min-width: 0; width: 100%; }
  .about-photo .photo-frame img { width: 100% !important; height: 100% !important; }

  /* Proof strip — drop the floating separator dots when names wrap */
  .proof-names { gap: 0.4rem 1.1rem; }
  .proof-names span + span::before { display: none; }

  /* Reduce section top/bottom padding on mobile (inline styles are desktop-tuned) */
  .section.about   { padding-top: 55px !important; padding-bottom: 40px !important; }
  section#services { padding-top: 50px !important; padding-bottom: 40px !important; }
  section#work     { padding-top: 50px !important; padding-bottom: 28px !important; }
}
/* Very small phones — final type + spacing tuning */
@media (max-width: 400px) {
  .hero h1 { font-size: clamp(1.85rem, 10vw, 2.3rem); }
  .about-facts, .about-aside .about-facts { grid-template-columns: 1fr; }
}
/* Landscape / short-viewport — keep everything below the fixed nav and above the fold */
@media (max-height: 600px) and (orientation: landscape) {
  .hero { padding-top: clamp(4.75rem, 14vh, 6rem); }
  .hero-inner { align-items: end; }
  .hero h1 { font-size: clamp(1.1rem, 3.5vw, 1.65rem); margin: 0.35rem 0 0.4rem; line-height: 1.15; }
  .hero-lede { font-size: 0.8rem; line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .hero-status { font-size: 0.62rem; letter-spacing: 0.07em; }
  .hero-cta { flex-direction: row; flex-wrap: nowrap; gap: 0.5rem; margin-top: 0.6rem; }
  .hero-cta .btn { padding: 0.5rem 0.85rem; font-size: 0.78rem; }
  .hero-photo { align-self: end; }
  .hero-photo img { height: min(58vh, 220px); }
  .proof { margin-top: 0.6rem; }
  .proof-inner { padding-top: 0.85rem; padding-bottom: 0.85rem; }
}
