@font-face {
  font-family: "Manrope";
  src: url("/assets/manrope.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/instrument-serif.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/instrument-serif-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --paper: #111825;
  --glow: #1c2940;
  --ink: #e9e5db;
  --gold: #d6b779;
  --muted: #a4afc1;
  --line: #2b3649;
  --control-hover: #ffffff0a;
  --logo-light: 0;
  --logo-dark: 1;
  --theme-duration: 280ms;
  --thumb-duration: 180ms;
  --theme-ease: cubic-bezier(0.4, 0, 0.2, 1);
  font-family: "Manrope", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  background-color: var(--paper);
  color: var(--ink);
  transition: background-color var(--theme-duration) var(--theme-ease), color var(--theme-duration) var(--theme-ease);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --paper: #f3f1eb;
    --glow: #faf9f5;
    --ink: #263d77;
    --gold: #b79c60;
    --muted: #626b7e;
    --line: #d9dcd9;
    --control-hover: #263d770a;
    --logo-light: 1;
    --logo-dark: 0;
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --paper: #f3f1eb;
  --glow: #faf9f5;
  --ink: #263d77;
  --gold: #b79c60;
  --muted: #626b7e;
  --line: #d9dcd9;
  --control-hover: #263d770a;
  --logo-light: 1;
  --logo-dark: 0;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-width: 280px; }
body {
  position: relative;
  isolation: isolate;
  background: radial-gradient(ellipse at 50% 36%, #1c2940 0, #111825 72%);
}
body::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 36%, #faf9f5 0, #f3f1eb 72%);
  opacity: var(--logo-light);
  transition: opacity var(--theme-duration) var(--theme-ease);
}
::selection { color: var(--paper); background: var(--ink); }

.page {
  width: min(100%, 1920px);
  min-height: 100svh;
  margin: auto;
  padding: 38px 56px 24px;
  display: flex;
  flex-direction: column;
}

.studio {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 500px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(20px, 3vw, 48px);
  width: min(100%, 1240px);
  margin-inline: auto;
  padding: 16px 0 24px;
}
.hero { min-width: 0; display: flex; flex-direction: column; align-items: center; }
.brand-lockup { display: grid; width: min(500px, 64svh, calc(100svh - 300px), 100%); margin: 0; line-height: 0; }
.brand-lockup img { grid-area: 1 / 1; display: block; width: 100%; height: auto; transition: opacity var(--theme-duration) var(--theme-ease); }
.logo-light { opacity: var(--logo-light); }
.logo-dark { opacity: var(--logo-dark); }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.tagline {
  max-width: 100%;
  margin: 24px 0 0;
  font-size: 13px;
  line-height: 1.9;
  letter-spacing: 0.01em;
  color: var(--muted);
  text-wrap: pretty;
  text-align: center;
  transition: color var(--theme-duration) var(--theme-ease);
}
.contact {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 10px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.5;
  text-decoration-color: var(--line);
  text-underline-offset: 5px;
  transition: color var(--theme-duration) var(--theme-ease), text-decoration-color var(--theme-duration) var(--theme-ease);
}
.contact:hover { text-decoration-color: var(--gold); }
.contact:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; border-radius: 2px; }
.work { width: min(100%, 66svh, 620px); min-width: 0; justify-self: start; }
.work h2 {
  margin: 0 0 0 27.75%;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: color var(--theme-duration) var(--theme-ease);
}
.orbit-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  outline: none;
  touch-action: pan-y;
}
.orbit-stage:focus-visible { outline: 1px solid var(--line); outline-offset: 4px; border-radius: 3px; }
.orbit-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; display: none; }
.orbit-line { stroke: var(--gold); opacity: 0.42; vector-effect: non-scaling-stroke; stroke-width: 1; transition: stroke var(--theme-duration) var(--theme-ease); }
.project-star {
  display: none;
  position: absolute;
  width: 24px;
  height: 31px;
  pointer-events: none;
  color: var(--gold);
  transform: translate(-50%, -50%) scale(var(--star-scale, 1));
  opacity: var(--star-opacity, 1);
  transition: color var(--theme-duration) var(--theme-ease);
}
.project-star svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.project-focus { padding: 30px 0; }
.project + .project { margin-top: 32px; }
.project { font-size: clamp(29px, 3.2vw, 42px); }
.project-number {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0.15em;
  transition: color var(--theme-duration) var(--theme-ease);
}
.project h3 { margin: 0; font-family: "Instrument Serif", Georgia, serif; font-size: inherit; font-weight: 400; line-height: 1.15; }
.project-select { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; line-height: inherit; text-align: left; cursor: pointer; }
.project-select:focus-visible { outline: 1px solid var(--gold); outline-offset: 6px; border-radius: 2px; }
.project-select[aria-pressed="true"] { cursor: default; }
.project-description { margin: 14px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; transition: color var(--theme-duration) var(--theme-ease); }
.project-action { display: flex; min-height: 44px; margin-top: 20px; }
.project-action a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); font-size: 11px; text-decoration: none; }
.project-action a svg { width: 16px; height: 16px; }
.project-action a:hover { color: var(--gold); }
.project-action a:focus-visible { outline: 1px solid var(--gold); outline-offset: 5px; border-radius: 2px; }
.is-ready .orbit-lines, .is-ready .project-star { display: block; }
.is-ready .project-focus { position: absolute; inset: 0; padding: 0; pointer-events: none; }
.is-ready .project {
  position: absolute;
  width: 71%;
  margin: 0;
  opacity: var(--project-opacity, 1);
  transform: translateY(-0.575em) scale(var(--project-scale, 1));
  transform-origin: left 0.575em;
  pointer-events: auto;
}
.is-ready .project-number { position: absolute; top: -27px; margin: 0; opacity: var(--detail-opacity, 1); }
.is-ready .project-details { opacity: var(--detail-opacity, 1); }
.orbit-controls { display: flex; align-items: center; gap: 8px; margin: 0 0 0 calc(27.75% - 16px); }
.orbit-controls button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color var(--theme-duration) var(--theme-ease), background-color var(--theme-duration) var(--theme-ease);
}
.orbit-controls button:hover:not(:disabled) { color: var(--gold); background-color: var(--control-hover); }
.orbit-controls button:focus-visible { outline: 1px solid var(--gold); outline-offset: 2px; }
.orbit-controls button:disabled { opacity: 0.25; cursor: default; }
.orbit-controls svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.2; }
.project-count { min-width: 58px; display: flex; justify-content: center; gap: 10px; font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.count-divider { opacity: 0.45; }
.orbit-controls[hidden] { display: none; }

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  padding-top: 19px;
  font-size: 11px;
  letter-spacing: 0.025em;
  color: var(--muted);
  transition: color var(--theme-duration) var(--theme-ease), border-color var(--theme-duration) var(--theme-ease);
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: transparent;
  color: var(--paper);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--theme-duration) var(--theme-ease);
}
.theme-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.theme-track {
  position: relative;
  display: block;
  width: 52px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--control-hover);
  transition: background-color var(--theme-duration) var(--theme-ease), border-color var(--theme-duration) var(--theme-ease);
}
.theme-toggle:hover .theme-track { border-color: var(--muted); }
.theme-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ink);
  transition: transform var(--thumb-duration) var(--theme-ease), background-color var(--theme-duration) var(--theme-ease);
}
.theme-toggle[aria-checked="true"] .theme-thumb { transform: translateX(22px); }
.theme-icon { grid-area: 1 / 1; display: block; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: opacity var(--thumb-duration) var(--theme-ease); }
.theme-icon-light { opacity: var(--logo-light); }
.theme-icon-dark { opacity: var(--logo-dark); }
.theme-toggle[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  :root { --theme-duration: 0ms; --thumb-duration: 0ms; }
}

@media (min-width: 1600px) { .page { padding-inline: 72px; } }

@media (max-width: 760px) {
  .page { padding: 25px 25px 20px; }
  .studio { grid-template-columns: minmax(0, 1fr); gap: 30px; padding: 16px 0 28px; }
  .brand-lockup { width: min(340px, 44svh, 100%); }
  .tagline { font-size: 12px; margin-top: 16px; line-height: 1.8; }
  .contact { margin-top: 4px; font-size: 11px; }
  .work { width: min(100%, 420px); justify-self: center; }
  .work h2 { font-size: 9px; }
  .project { font-size: 30px; }
  .project-description { margin-top: 10px; font-size: 10px; }
  .project-action { margin-top: 12px; }
  .project-action a { font-size: 10px; }
  .project-star { width: 19px; height: 25px; }
  .footer { font-size: 10px; padding-top: 14px; }
}

@media (max-height: 740px) and (min-width: 761px) {
  .page { padding-top: 24px; }
  .studio { padding: 12px 0 20px; }
  .brand-lockup { width: min(500px, 54svh, 100%); }
  .tagline { margin-top: 16px; }
}
