:root {
  --page-gutter: 16px;
  --chapter-inset: 80px;
  --nav-height: 72px;
  color-scheme: light;
  background: var(--site-bg);
  color: var(--site-fg);
  font: 16px/1.6 var(--site-font);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body, h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; text-underline-offset: .25em; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--site-fg); outline-offset: 4px; }
.wrap { width: min(calc(100% - 2 * var(--page-gutter)), 1024px); margin-inline: auto; }
/* The reference showcase spans 400 + 64 + 640px at laptop widths.
   The wide résumé artboard expands to 1328px; both sections use the same edges. */
.portfolio-grid {
  --detail-size: clamp(.75rem, .833333vw, 1rem);
  display: grid;
  width: min(85%, max(69.16667%, 1104px), 1328px);
  margin-inline: auto;
  grid-template-columns: minmax(0, 530fr) minmax(0, 678fr);
  column-gap: min(6.25vw, 120px);
}
@media (max-width: 760px) {
  .portfolio-grid {
    --detail-size: 1rem;
    width: min(calc(100% - 2 * var(--page-gutter)), 560px);
  }
}
.reader-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; top: 6px; left: 12px; z-index: 15; padding: 7px 14px; background: white; }
#work, #about { scroll-margin-top: 82px; }
.topbar { position: sticky; top: 0; z-index: 6; isolation: isolate; background: var(--site-bg); }
@supports ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
  .topbar { background: rgb(255 255 255 / 85%); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
}
.nav-inner { position: relative; display: flex; align-items: center; gap: 12px; width: calc(100% - 32px); min-height: var(--nav-height); }
.nav-inner::after { content: ""; position: absolute; inset: auto 0 0; height: 1px; background: var(--site-rule); opacity: 0; pointer-events: none; }
.topbar[data-scrolled] .nav-inner::after { opacity: 1; }
.wordmark { display: inline-flex; align-items: center; min-height: 44px; gap: 5px; font: 500 18px/27px "Helvetica Neue", Helvetica, Arial, sans-serif; letter-spacing: 0; text-decoration: none; white-space: nowrap; }
.wordmark img { width: 27px; height: 27px; }
.main-nav { margin-left: auto; }
.main-nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding-inline: 12px; font-size: 14px; line-height: 24px; font-weight: 500; color: var(--site-muted); text-decoration: none; }
.main-nav a:hover, .main-nav a:focus-visible { color: var(--site-fg); }
.topbar :focus-visible { outline-color: currentColor; }
@media (prefers-reduced-motion: no-preference) {
  .nav-inner::after { transition: opacity 180ms ease; }
  .main-nav a { transition: color 200ms ease-out; }
}
@media (min-width: 896px) {
  :root { --nav-height: 64px; }
  .nav-inner { width: min(100%, 1280px); padding-inline: 24px; gap: 48px; }
}
.paper-hero { padding: clamp(58px, 6.8vw, 104px) 20px clamp(41px, 4.6vw, 70px); text-align: center; }
.byline { display: flex; align-items: baseline; justify-content: center; gap: 10px; color: var(--site-muted); font-size: 14px; }
.byline span { color: #848480; }
.paper-hero h1 { display: flex; justify-content: center; align-items: center; gap: .08em; margin: 17px 0 14px; font-size: clamp(48px, 5.1vw, 78px); letter-spacing: -.055em; line-height: 1.08; font-weight: 500; }
.doudou-art { display: inline-block; flex: none; width: 1.03em; height: 1.03em; margin-inline: .015em; color: var(--site-fg); }
.doudou-mark { display: block; width: 100%; height: auto; }
.intro-copy { max-width: 38em; margin-inline: auto; font-size: clamp(16px, 1.38vw, 20px); line-height: 1.6; color: var(--site-muted); }
.about { padding-block: clamp(30px, 5vw, 80px); border-top: 1px solid var(--site-rule); display: grid; grid-template-columns: .8fr 1.1fr auto; gap: clamp(20px, 4.5vw, 68px); }
.about-head p { color: var(--site-muted); font-size: 14px; }
.about-head h2 { margin-top: 4px; font-weight: 520; font-size: clamp(30px, 3vw, 46px); line-height: 1.2; letter-spacing: -.05em; }
.about-text p { color: var(--site-secondary); font-size: clamp(16px, 1.3vw, 21px); line-height: 1.7; }
.about-text a { display: inline-block; margin-top: 18px; font-size: 14px; }
.about img { width: clamp(72px, 7vw, 115px); height: auto; border-radius: 8px; }
.footer { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 23px; border-top: 1px solid var(--site-rule); padding-block: 22px; color: var(--site-muted); font-size: 13px; }
.footer span { margin-right: auto; }
.footer a { text-decoration: none; padding-block: 4px; }
.footer a:hover { text-decoration: underline; }
@media (min-width: 640px) {
  :root { --page-gutter: 24px; --chapter-inset: 112px; }
}
@media (max-width: 740px) {
  .about { grid-template-columns: 1fr auto; }
  .about-text { grid-row: 2; grid-column: 1 / -1; }
  .about img { grid-row: 1; grid-column: 2; width: 64px; }
}
@media (max-width: 430px) {
  .paper-hero { padding: 44px 15px 34px; }
  .paper-hero h1 { font-size: clamp(41px, 11.2vw, 48px); }
  .intro-copy { font-size: 1rem; line-height: 1.5; }
  .footer { gap: 8px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

.project-stage {
  border: 1px solid var(--site-rule, #e6e5e2);
  border-radius: 20px;
  overflow: clip;
  background: var(--site-bg, #fff);
  color: var(--site-fg, #0a0a0a);
  scroll-margin-top: 80px;
}
.project-stage-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 8px clamp(14px, 1.8vw, 24px);
  background: var(--site-bg, #fff);
  border-bottom: 1px solid var(--site-rule, #e6e5e2);
}
.project-stage-toolbar h2 { margin: 0; font: 540 15px/1.4 var(--site-font, sans-serif); letter-spacing: -.015em; }
.project-stage-panel {
  display: grid; grid-template-columns: minmax(0, .72fr) minmax(0, 1.45fr);
  align-items: center; gap: clamp(16px, 3vw, 38px);
  padding: clamp(16px, 2vw, 28px); background: var(--site-surface); scroll-margin-top: 142px;
}
.project-stage-panel + .project-stage-panel { border-top: 1px solid var(--site-rule, #e6e5e2); }
.project-stage-panel[hidden] { display: none; }
.project-stage-panel[role="tabpanel"] { border: 0; }
.project-stage-copy { padding-left: clamp(0px, .7vw, 9px); }
.project-stage-category { margin: 0 0 12px; color: var(--site-muted, #62625f); font-size: 13px; line-height: 1.5; }
.project-stage-copy h3 { margin: 0; font-size: clamp(24px, 2.65vw, 38px); font-weight: 520; line-height: 1.22; letter-spacing: -.045em; }
.project-stage-summary { margin: 12px 0 0; max-width: 17em; font-size: 1rem; line-height: 1.625; color: var(--site-secondary, #333); }
.project-stage-visual { min-width: 0; overflow: hidden; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px #1717140c; }
.project-stage-visual img { display: block; width: 100%; height: auto; aspect-ratio: 1.6; object-fit: contain; }
@media (prefers-reduced-motion: no-preference) {
  .project-stage-panel[data-entering] .project-stage-visual { animation: project-stage-change 180ms ease-out; }
  @keyframes project-stage-change { from { opacity: .72; } to { opacity: 1; } }
}
@media (max-width: 680px) {
  .project-stage { border-radius: 16px; }
  .project-stage-toolbar { min-height: 54px; }
  .project-stage-toolbar h2 { font-size: 14px; }
  .project-stage-panel { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 12px; }
  .project-stage-visual { order: -1; border-radius: 8px; }
  .project-stage-copy { padding: 16px 5px 1px; }
  .project-stage-category { margin-bottom: 5px; }
  .project-stage-copy h3 { font-size: 23px; }
  .project-stage-copy h3 br { display: none; }
  .project-stage-summary { max-width: 33em; margin-top: 8px; line-height: 1.5; }
}
