/* ============ TOKENS ============ */
:root {
  --bg: #f7f5f0;
  --bg-2: #efece5;
  --ink: #1a1a1a;
  --ink-2: #3a3a38;
  --muted: #8a877f;
  --line: #d9d5cb;
  --accent: oklch(0.62 0.18 295);
  --accent-soft: oklch(0.92 0.06 295);
  --accent-ink: oklch(0.32 0.14 295);

  --serif: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;

  --radius: 18px;
  --radius-sm: 10px;
  --max: 1280px;
  --pad: clamp(20px, 4vw, 56px);

  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
/* Prevent stray horizontal overflow from triggering mobile shrink-to-fit,
   which would otherwise widen the layout viewport and skip mobile @media. */
html, body { overflow-x: clip; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }

::selection { background: var(--accent); color: white; }

/* ============ TYPOGRAPHY ============ */
.display {
  font-family: var(--display);
  font-weight: 600;
  font-style: normal;
  letter-spacing: -0.035em;
  line-height: 1.0;
  text-wrap: balance;
}
.display em {
  font-style: normal;
  font-weight: 600;
  color: var(--accent-ink);
}
h1.display { font-size: clamp(44px, 7.5vw, 104px); }
h2.display { font-size: clamp(32px, 5vw, 64px); }
h3.display { font-size: clamp(24px, 2.4vw, 36px); }

/* Click-to-zoom lightbox for gallery images. */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(20, 16, 12, 0.88);
  display: grid; place-items: center;
  z-index: 1000;
  cursor: zoom-out;
  opacity: 0;
  transition: opacity .25s var(--ease);
}
.lightbox.open { opacity: 1; }
.lightbox img {
  max-width: 92vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6);
  transform: scale(0.96);
  transition: transform .25s var(--ease);
}
.lightbox.open img { transform: scale(1); }
.lightbox-close {
  position: fixed; top: 20px; right: 24px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  color: #fdf9f0;
  font-size: 22px; line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255,255,255,0.2); }
.placeholder:has(img) img { cursor: zoom-in; }
body.lightbox-open { overflow: hidden; }

/* Waving-hand emoji — short wave burst with a rest pause between cycles. */
.wave {
  display: inline-block;
  transform-origin: 70% 80%;
  animation: wave 2.6s ease-in-out 0.8s infinite;
}
@keyframes wave {
  0%, 55%, 100% { transform: rotate(0deg); }
  10% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  30% { transform: rotate(14deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
}
@media (prefers-reduced-motion: reduce) {
  .wave { animation: none; }
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.lead {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.005em;
  color: var(--ink-2);
  max-width: 44ch;
  text-wrap: pretty;
}

.body p { color: var(--ink-2); max-width: 60ch; }

/* ============ LAYOUT ============ */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ============ NAV ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  background: color-mix(in oklab, var(--bg) 72%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.nav.scrolled {
  border-bottom-color: var(--line);
  background: color-mix(in oklab, var(--bg) 88%, transparent);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  box-shadow: 0 0 0 4px color-mix(in oklch, var(--accent) 18%, transparent);
}
.nav-links {
  display: flex;
  gap: 2px;
  font-size: 13.5px;
  font-weight: 500;
  align-items: center;
  padding: 5px;
  background: color-mix(in oklab, var(--bg-2) 60%, transparent);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.4);
}
.nav-links a {
  position: relative;
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--ink-2);
  letter-spacing: -0.005em;
  transition: color .25s var(--ease), background .25s var(--ease);
}
.nav-links a:hover { color: var(--ink); background: color-mix(in oklab, var(--bg) 80%, transparent); }
.nav-links a.active {
  color: var(--bg);
  background: var(--ink);
  box-shadow: 0 6px 14px -8px rgba(20, 0, 40, 0.4);
}
.nav-links a.active:hover {
  color: var(--bg);
  background: var(--ink);
}

/* Hamburger button — hidden on desktop, shown on mobile via @media block */
/* Mirrors .nav-links pill: same surface, border, inset highlight, mono feel. */
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  background: color-mix(in oklab, var(--bg-2) 60%, transparent);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.4);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.nav-toggle:hover { border-color: var(--ink); }
.nav-toggle-bar {
  width: 16px;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.nav-open .nav-toggle-bar:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle-bar:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
body.nav-lock { overflow: hidden; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: all .3s var(--ease);
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover { background: var(--accent-ink); transform: translateY(-2px); }
.btn-ghost {
  border-color: var(--line);
  color: var(--ink);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--ink); }
.btn .arrow {
  display: inline-block;
  transition: transform .35s var(--ease);
}
.btn:hover .arrow { transform: translateX(4px); }

/* ============ HERO ============ */
.hero {
  padding-top: clamp(40px, 8vh, 90px);
  padding-bottom: clamp(60px, 10vh, 120px);
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.hero h1.display { margin: 0; }
.hero h1 .row,
.about-head h1 .row {
  display: block;
  overflow: hidden;
  /* Italic ascenders/descenders clip against overflow:hidden + line-height:1; padding+negative margin keeps layout unchanged. */
  padding: 0.12em 0.04em;
  margin: -0.12em -0.04em;
}
.hero h1 .word,
.about-head h1 .word {
  display: inline-block;
  transform: translateY(105%);
  opacity: 0;
  animation: rise 1.2s cubic-bezier(.16, 1, .3, 1) forwards;
}
.hero h1 .row:nth-child(1) .word,
.about-head h1 .row:nth-child(1) .word { animation-delay: .15s; }
.hero h1 .row:nth-child(2) .word,
.about-head h1 .row:nth-child(2) .word { animation-delay: .25s; }
.hero h1 .row:nth-child(3) .word,
.about-head h1 .row:nth-child(3) .word { animation-delay: .35s; }
@keyframes rise {
  to { transform: translateY(0); opacity: 1; }
}

.hero-in {
  opacity: 0;
  transform: translateY(20px);
  animation: heroIn 1s cubic-bezier(.16, 1, .3, 1) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes heroIn {
  to { opacity: 1; transform: translateY(0); }
}

.hero .portrait {
  opacity: 0;
  --pr-init: -8deg;
  --pr: -1.5deg;
  animation: portraitIn 1.4s cubic-bezier(.16, 1, .3, 1) .15s forwards;
}
@keyframes portraitIn {
  0% { opacity: 0; transform: translate(0, 30px) rotate(-8deg) scale(0.94); }
  100% { opacity: 1; transform: translate(var(--px), var(--py)) rotate(var(--pr)) scale(var(--ps)); }
}

.hero-meta {
  display: grid;
  gap: 28px;
}
.portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  width: 100%;
  max-width: 420px;
  margin-left: auto;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-2);
  box-shadow: 0 30px 60px -30px rgba(60, 30, 80, 0.18);
  --px: 0px;
  --py: 0px;
  --pr: -1.5deg;
  --ps: 1;
  transform: translate(var(--px), var(--py)) rotate(var(--pr)) scale(var(--ps));
  transition: box-shadow .5s var(--ease);
  will-change: transform;
}
.portrait:hover { box-shadow: 0 40px 80px -30px rgba(60, 30, 80, 0.28); }
.portrait img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.portrait::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(20, 0, 40, 0.06));
  pointer-events: none;
}
.portrait-tag {
  position: absolute;
  bottom: 14px; left: 14px;
  background: rgba(247, 245, 240, 0.92);
  backdrop-filter: blur(8px);
  padding: 8px 12px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.portrait-tag .live {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
  vertical-align: 1px;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-tail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: clamp(40px, 8vh, 80px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.hero-tail-meta {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
}
.hero-tail-meta div { display: grid; gap: 4px; }
.hero-tail-meta .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.hero-tail-meta .v { font-family: var(--sans); font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }

/* ============ SECTIONS ============ */
.section {
  padding: clamp(60px, 10vh, 130px) 0;
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(32px, 5vh, 60px);
}
.section-head .left { display: grid; gap: 14px; }

/* ============ WORKS GRID ============ */
.works {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 3vw, 36px);
}
.works-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .5s var(--ease);
}
.card:hover { transform: translateY(-4px); }
.card-cover {
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}
.card-cover .art {
  position: absolute; inset: 0;
  transition: transform .8s var(--ease), filter .5s var(--ease);
}
.card:hover .card-cover .art { transform: scale(1.04); }
.card-cover .badge {
  position: absolute;
  top: 14px; left: 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(247, 245, 240, 0.94);
  padding: 6px 10px;
  border-radius: 999px;
}
.card-cover .num {
  position: absolute;
  top: 14px; right: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.85);
  mix-blend-mode: difference;
}
.card-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 4px 4px;
}
.card-title {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.card-title .arrow {
  display: inline-block;
  margin-left: 6px;
  transition: transform .4s var(--ease);
  color: var(--muted);
}
.card:hover .card-title .arrow { transform: translate(4px, -4px); color: var(--accent-ink); }
.card-tags {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
  text-align: right;
  white-space: nowrap;
}

/* artwork placeholders — abstract brand-style covers built in CSS */
.art {
  width: 100%; height: 100%;
  background: var(--c1, #d8c8b8);
}
.art-1 {
  background: url('assets/project_1.png') center/cover no-repeat;
}

.art-2 {
  background: url('assets/project_2.png') center/cover no-repeat;
}

.art-3 {
  background: url('assets/project_3.png') center/cover no-repeat;
}

.art-4 {
  background: url('assets/project_4.png') center/cover no-repeat;
}

.art-5 {
  background: url('assets/project_5.png') center/cover no-repeat;
}

.art-6 {
  background: linear-gradient(140deg, #f7eed8 0%, #efd9b0 100%);
}
.art-6::before {
  content: ""; position: absolute;
  left: 12%; right: 12%; top: 18%; bottom: 18%;
  background:
    linear-gradient(90deg, #2a1f12 0 6px, transparent 6px),
    linear-gradient(90deg, transparent calc(100% - 6px), #2a1f12 calc(100% - 6px));
  border-top: 6px solid #2a1f12;
  border-bottom: 6px solid #2a1f12;
}
.art-6::after {
  content: "Atelier"; position: absolute;
  inset: 0; display: grid; place-items: center;
  font-family: var(--sans); font-weight: 600; font-size: 48px;
  color: #2a1f12; letter-spacing: -0.03em;
}

/* ============ MARQUEE ============ */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
  background: var(--bg-2);
}
.marquee-track {
  display: flex;
  gap: 40px;
  animation: scroll 38s linear infinite;
  width: max-content;
  align-items: center;
}
.marquee-track span {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -0.005em;
  color: var(--ink);
  white-space: nowrap;
}
.marquee-track .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}
@keyframes scroll {
  to { transform: translateX(-50%); }
}

/* ============ ABOUT PAGE ============ */
.about-head {
  padding: clamp(40px, 8vh, 100px) 0 clamp(40px, 6vh, 80px);
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: end;
}
.about-head .portrait-sm {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-2);
  aspect-ratio: 4 / 5;
  max-width: 380px;
  margin-left: auto;
  box-shadow: 0 30px 60px -30px rgba(60, 30, 80, 0.18);
}
.about-head .portrait-sm img { width: 100%; height: 100%; object-fit: cover; }

.about-section {
  padding: clamp(40px, 6vh, 80px) 0;
  border-top: 1px solid var(--line);
}
.about-section-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 60px;
  align-items: start;
}
.about-section-grid h2 { margin: 0; }
.about-body p {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 60ch;
  margin: 0 0 16px;
}
.about-body p:last-child { margin-bottom: 0; }
.about-body p strong { color: var(--ink); font-weight: 500; }

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.value-card {
  padding: 24px 24px 28px;
  border-radius: var(--radius);
  background: var(--bg-2);
  display: grid;
  gap: 10px;
  align-content: start;
}
.value-card .n {
  font-family: var(--mono); font-size: 11px;
  color: var(--muted); letter-spacing: 0.1em;
}
.value-card h3 {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.015em;
}
.value-card p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.clients-grid .c {
  padding: 22px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  min-height: 70px;
  display: flex; align-items: center;
}
.signature {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--accent-ink);
  margin-top: 16px;
}

/* ============ FOOTER ============ */
.footer {
  border-top: 1px solid var(--line);
  padding: clamp(48px, 8vh, 90px) 0 32px;
  margin-top: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer h3.display { font-size: clamp(36px, 5vw, 64px); margin: 0; }
.footer-link-group { display: grid; gap: 8px; align-self: start; align-content: start; }
.footer-link-group .eyebrow { margin-bottom: 6px; }
.footer-link-group a {
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), padding .3s var(--ease);
}
.footer-link-group a:hover { border-bottom-color: var(--ink); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ============ RESUME ============ */
.resume-head {
  padding: clamp(40px, 8vh, 100px) 0 clamp(40px, 6vh, 70px);
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 60px;
  align-items: start;
}
.resume-aside {
  display: grid;
  gap: 28px;
  align-self: start;
}
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.stat {
  padding: 18px 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 4px;
  align-content: space-between;
  min-height: 96px;
}
.stat .v {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 40px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.stat .k {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.pullquote {
  margin: 0;
  padding: 22px 24px;
  background: var(--bg-2);
  border-radius: var(--radius);
  position: relative;
}
.pullquote::before {
  content: "“";
  position: absolute;
  top: -8px; left: 14px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 56px;
  line-height: 1;
  color: var(--accent);
}
.pullquote p {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin: 0 0 12px;
}
.pullquote figcaption {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.focus-list .eyebrow { margin: 0 0 12px; }
.focus-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}
.focus-list li {
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
}
.focus-list li::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.focus-list li:first-child { border-top: 1px solid var(--line); }
.resume-head .meta {
  display: grid; gap: 16px;
  font-size: 14px;
}
.resume-head .meta-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.resume-head .meta-row .k {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted);
}

.resume-section { padding: clamp(40px, 6vh, 70px) 0; border-top: 1px solid var(--line); }
.resume-section-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 60px;
}
.resume-section-grid h2 { margin: 0; }
.resume-list { display: grid; gap: 36px; }
.resume-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.resume-item:last-child { border-bottom: 0; padding-bottom: 0; }
.resume-item h3 {
  font-family: var(--sans);
  font-size: 21px;
  font-weight: 500;
  margin: 0 0 4px;
  letter-spacing: -0.015em;
}
.resume-item .role-meta {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.resume-item p { margin: 0; max-width: 56ch; }
.resume-item .date {
  font-family: var(--mono); font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.skills {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 32px;
}
.skill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.skill .level {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  letter-spacing: 0.08em;
}

/* ============ WORKS PAGE ============ */
.works-head {
  padding: clamp(40px, 8vh, 100px) 0 clamp(40px, 6vh, 70px);
}
.works-head-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: end;
}
.works-head .display { max-width: 14ch; }
.works-toc {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}
.works-toc-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
  text-decoration: none;
  color: var(--ink);
  transition: padding .25s var(--ease), color .25s var(--ease);
}
.works-toc-row:hover { padding-left: 8px; color: var(--accent-ink); }
.works-toc-row .n {
  font-family: var(--mono); font-size: 11px;
  color: var(--muted); letter-spacing: 0.08em;
}
.works-toc-row .t {
  font-family: var(--sans); font-size: 16px;
  font-weight: 500; letter-spacing: -0.01em;
}
.works-toc-row .y {
  font-family: var(--mono); font-size: 11px;
  color: var(--muted); letter-spacing: 0.08em;
}

/* ============ FADE-IN ============ */
.fade { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.fade.in { opacity: 1; transform: translateY(0); }

/* Pronounced reveal for project grids — per-card observation */
.reveal-stagger .card {
  opacity: 0;
  transform: translateY(60px) scale(0.96);
  transition: opacity 1.1s cubic-bezier(.16, 1, .3, 1), transform 1.1s cubic-bezier(.16, 1, .3, 1);
}
.reveal-stagger .card.in { opacity: 1; transform: translateY(0) scale(1); }
/* Within-row stagger: even-indexed siblings lag slightly */
.reveal-stagger .card:nth-child(2n).in { transition-delay: .12s; }

.reveal-head { opacity: 0; transform: translateY(36px); transition: opacity 1.1s cubic-bezier(.16, 1, .3, 1), transform 1.1s cubic-bezier(.16, 1, .3, 1); }
.reveal-head.in { opacity: 1; transform: translateY(0); }
.reveal-head.in .display .em-underline { animation: emUnderline 1.2s cubic-bezier(.16, 1, .3, 1) .3s forwards; }

/* Two-column section reveal — heading first, body follows */
.reveal-section > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s cubic-bezier(.16, 1, .3, 1), transform 1s cubic-bezier(.16, 1, .3, 1);
}
.reveal-section.in > *:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0s; }
.reveal-section.in > *:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: .15s; }

/* About hero portrait — fade up + slight rotate */
.about-head .portrait-sm {
  opacity: 0;
  transform: translateY(28px) rotate(-3deg) scale(0.97);
  animation: portraitSmIn 1.2s cubic-bezier(.16, 1, .3, 1) .2s forwards;
}
@keyframes portraitSmIn {
  to { opacity: 1; transform: translateY(0) rotate(0) scale(1); }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-meta { justify-items: center; width: 100%; }
  .portrait {
    width: min(300px, 80%);
    max-width: none;
    margin: 0 auto;
    --pr: -1deg;
    --pr-init: -4deg;
  }
  .works, .works-3 { grid-template-columns: 1fr; }
  .resume-head { grid-template-columns: 1fr; }
  .resume-section-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; align-items: flex-start; }
  .skills { grid-template-columns: 1fr; }
  .nav-links a { padding: 8px 10px; }
  .works-head-grid { grid-template-columns: 1fr; gap: 32px; align-items: start; }
  .about-head { grid-template-columns: 1fr; gap: 32px; align-items: start; }
  .about-head .portrait-sm { margin-left: 0; max-width: 280px; }
  .about-section-grid { grid-template-columns: 1fr; gap: 24px; }
  .values-grid { grid-template-columns: 1fr; }
  .clients-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile: hamburger nav + override inline grid-column / aspect-ratio on featured card. */
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: var(--pad);
    left: var(--pad);
    flex-direction: column;
    gap: 4px;
    padding: 10px;
    background: color-mix(in oklab, var(--bg) 96%, transparent);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 20px 40px -20px rgba(20, 0, 40, 0.18);
  }
  .nav-open .nav-links { display: flex; }
  .nav-links a {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 15px;
  }

  /* grid items need min-width:0 so nowrap children can't blow out a column */
  .works > .card { min-width: 0; grid-column: auto !important; }
  .works > .card .card-cover { aspect-ratio: 4 / 3 !important; }

  /* stack title above tags so long tag strings don't fight the title */
  .card-meta { flex-direction: column; align-items: flex-start; gap: 6px; }
  .card-tags { white-space: normal; text-align: left; }
}
