@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/geist-mono-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #242424;
  --muted: rgb(0 0 0 / 20%);
  --line: rgba(0, 0, 0, 0.065);
  --blue: #dff7fc;
  /* Desktop design dimensions stay fixed; only column widths are fluid. */
  --gutter: 20px;
  --page-padding: 20px;
  --masthead-height: 213px;
  --type: 20px;
  --font-mono: "Geist Mono", "PingFang SC", monospace;
  font-family: Arial, Helvetica, "PingFang SC", sans-serif;
  color: var(--ink);
  background: #fff;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; }
body.dialog-open { overflow: hidden; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; font: inherit; border: 0; padding: 0; background: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
button:focus-visible, a:focus-visible { outline: 2px solid #4ba6b9; outline-offset: 4px; }
::selection { background: var(--blue); color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 10; top: -80px; left: 20px; padding: 12px 18px; background: var(--blue); }
.skip-link:focus { top: 12px; }

/* Eight fluid columns: navigation spans two, content spans the remaining six. */
.portfolio { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); align-items: start; gap: var(--gutter); min-height: 100dvh; padding: var(--page-padding); }
.content { grid-column: span 6; min-width: 0; }
.identity { display: flex; align-self: start; align-items: flex-start; justify-content: space-between; gap: 12px; font-size: var(--type); line-height: 1.2; }
.name h1 { font-size: inherit; line-height: inherit; margin: 0; font-weight: 400; }
.name > span { display: block; line-height: 1.4; }
.about-link { display: inline-flex; align-items: center; line-height: 24px; white-space: nowrap; }
/* Original Figma outline: only its color changes on hover or keyboard focus. */
.about-icon { flex: none; width: 27px; height: 24px; color: var(--muted); transition: color 160ms ease; }
.about-link:hover .about-icon, .about-link:focus-visible .about-icon { color: inherit; }
.introduction { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; min-height: var(--masthead-height); gap: var(--gutter); font-size: var(--type); line-height: 1.15; color: var(--muted); }
.introduction p { margin: 0; }
.introduction em { font-style: normal; color: var(--ink); }
.philosophy { display: grid; grid-template-columns: minmax(0, 1fr) min(30.66%, 157px); gap: var(--gutter); }
.portrait { width: 100%; aspect-ratio: 1; background: #e5f9ff; overflow: hidden; border: 1px solid rgba(0,0,0,.04); }
.portrait img { width: 100%; height: 100%; object-fit: cover; transition: transform 260ms ease; }
.portrait:hover img { transform: rotate(-4deg) scale(1.025); }

/* Keep both ends of the left column pinned; only the middle can overflow.
   The document keeps its native scrolling/anchor behavior on the right. */
.sidebar { grid-column: span 2; position: sticky; top: var(--page-padding); display: grid; grid-template-rows: var(--masthead-height) minmax(0, 1fr) auto; height: calc(100dvh - 2 * var(--page-padding)); min-width: 0; }
.work-nav { min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; scrollbar-width: thin; font-size: var(--type); line-height: 1.15; }
.work-nav :is(button, a):focus-visible { outline-offset: -2px; }
/* Navigation rows hug their text, including wrapped titles, with 9px at each end. */
.category { display: flex; align-items: center; width: 100%; padding: 9px 0; text-align: left; border-bottom: 1px solid var(--line); transition: background 180ms ease; }
.category:first-child { border-top: 1px solid var(--line); }
.category.is-active { background: var(--blue); }
.category:hover:not(.is-active) { background: #f5fafb; }
.project-index { list-style: none; padding: 0; margin: 0; }
.index-link { display: flex; align-items: center; gap: 7px; width: 100%; padding: 9px 0; border-bottom: 1px solid var(--line); text-align: left; font-size: inherit; transition: background 160ms ease; }
.index-number, .sidebar-footer, .card-tags { font: normal 400 14px/16px var(--font-mono); color: rgb(0 0 0 / 30%); }
.index-link:hover { background: #f1fafc; }
.index-link.is-current { background: #f1fafc; }
/* The sidebar already ends 20px above the viewport: add no bottom inset
   to the footer or its text controls. Keep only the gap above the footer. */
.sidebar-footer { display: flex; justify-content: space-between; align-items: center; padding: 24px 0 0; }
.language-switch { display: flex; gap: 10px; align-items: center; }
.language-switch button { color: inherit; padding: 0; font: inherit; }
.language-switch button[aria-pressed="true"] { color: #555; }
.language-switch button:hover { color: #111; }
#clock { font-variant-numeric: tabular-nums; white-space: nowrap; }

main { min-width: 0; outline: none; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 22px; }
.project-card { min-width: 0; }
.card-button { display: block; width: 100%; text-align: left; }
.project-art { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: #f4f7f8; }
/* Draw the stroke over the image, inside the frame, without affecting layout. */
.project-art::after { content: ""; position: absolute; inset: 0; z-index: 1; box-shadow: inset 0 0 0 1px rgba(0,0,0,.04); pointer-events: none; }
.project-art img { width: 100%; height: 100%; object-fit: cover; transition: transform 450ms cubic-bezier(.2,.65,.3,1); }
.card-button:hover .project-art img { transform: scale(1.018); }
.card-caption { display: block; padding-top: 9px; }
.card-title { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; line-height: 19px; font-weight: 400; }
.card-arrow { opacity: 0; transform: translate(-4px, 4px); transition: opacity 160ms ease, transform 160ms ease; }
.card-button:hover .card-arrow, .card-button:focus-visible .card-arrow { opacity: 1; transform: translate(0,0); }
.card-tags { display: block; margin-top: 1px; }
.photo-grid .project-art { background: #f7f7f5; }
.photo-grid .project-art img { object-fit: contain; }
.play-label { position: absolute; bottom: 16px; right: 16px; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgb(255 255 255 / .9); font-size: 14px; }
.empty-state { grid-column: 1 / -1; min-height: 510px; padding: 60px 36px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; background: #f5fbfc; }
.empty-state .eyebrow { font: 12px var(--font-mono); color: #7e9296; }
.empty-state h3 { margin: 24px 0 16px; font-weight: 400; font-size: clamp(28px, 3.2vw, 48px); letter-spacing: -.05em; }
.empty-state p { max-width: 450px; font-size: 18px; line-height: 1.5; color: #7b8587; }
.text-link { display: inline-block; border-bottom: 1px solid #555; padding-bottom: 4px; margin-top: 24px; text-align: left; }

.detail-dialog { padding: 0; border: 0; width: min(1080px, calc(100% - 64px)); max-height: calc(100svh - 64px); color: var(--ink); background: #fff; }
.detail-dialog::backdrop { background: rgba(19, 25, 28, .36); backdrop-filter: blur(5px); }
.dialog-shell { position: relative; padding: 40px; }
.dialog-close { position: sticky; z-index: 1; top: 0; float: right; display: grid; place-items: center; width: 36px; height: 36px; margin: -24px -24px 0 0; background: #fff; border-radius: 50%; }
.dialog-close svg { width: 24px; height: 24px; }
.dialog-project { display: grid; grid-template-columns: 1.15fr 1fr; gap: 36px; align-items: center; }
.dialog-project > img, .dialog-project > video { width: 100%; aspect-ratio: 1; object-fit: cover; background: #f0f9fc; }
.dialog-project > video { object-fit: contain; }
.dialog-eyebrow { display: block; font: 11px/1.6 var(--font-mono); letter-spacing: .04em; color: #969696; }
.dialog-project h2, .about-content h2 { margin: 16px 0 24px; font-weight: 400; font-size: clamp(28px, 3vw, 40px); letter-spacing: -.055em; line-height: 1.08; }
.dialog-copy { font-size: 18px; line-height: 1.5; color: #777; }
.case-note { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 32px; font-size: 13px; color: #999; }
.about-content { max-width: 780px; padding: 20px; }
.about-content .about-portrait { float: right; width: 126px; margin: 0 0 24px 28px; background: #e5f9ff; }
.about-content h2 { max-width: 450px; font-size: clamp(32px, 4.5vw, 64px); }
.about-content p { font-size: 20px; line-height: 1.5; color: #888; }
.about-footer { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font: 12px var(--font-mono); color: #aaa; }
.photo-dialog img { width: 100%; max-height: 70svh; object-fit: contain; }
.photo-dialog h2 { font-size: 14px; font-weight: 400; }

@media (max-width: 760px) {
  :root { --type: 20px; --gutter: 16px; --page-padding: 16px; }
  .portfolio { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .sidebar, .content { display: contents; }
  .identity { order: 0; align-self: stretch; margin-bottom: 32px; }
  .introduction { order: 1; min-height: auto; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; font-size: 19px; line-height: 1.25; }
  .philosophy { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
  .portrait { width: 86px; }
  .work-nav { order: 2; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 36px; overflow: visible; font-size: 18px; }
  .category, .category:first-child { border: 0; border-bottom: 1px solid var(--line); min-height: 44px; justify-content: center; }
  .project-index { display: none; }
  .sidebar-footer { order: 3; padding: 18px 0 0; }
  .language-switch button { padding: 5px 0; }
  #work { order: 4; margin-top: 20px; }
  .project-grid { gap: 24px 16px; }
  .card-title { font-size: 13px; line-height: 17px; }
  .card-arrow { display: none; }
  .detail-dialog { width: calc(100% - 24px); max-height: calc(100svh - 24px); }
  .dialog-shell { padding: 24px; }
  .dialog-close { margin: -14px -14px 4px 0; }
  .dialog-project { display: flex; flex-direction: column; align-items: stretch; gap: 24px; }
  .dialog-project > img, .dialog-project > video { max-height: 48svh; object-fit: contain; }
  .dialog-project h2 { margin-top: 12px; margin-bottom: 16px; }
  .dialog-copy { font-size: 16px; }
  .about-content { padding: 16px 0 0; }
  .about-content .about-portrait { width: 80px; }
  .about-content p { font-size: 17px; }
  .about-footer { line-height: 1.8; }
  .empty-state { min-height: 400px; padding: 32px 24px; }
}

@media (max-width: 480px) {
  .introduction { gap: 20px; grid-template-columns: 1.2fr 1fr; font-size: 17px; }
  .portrait { width: 80px; }
  .project-grid { grid-template-columns: 1fr; row-gap: 28px; }
  .card-title { font-size: 14px; line-height: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0s !important; animation: none !important; }
}
