:root {
  color-scheme: light;
  --page: #f2f0eb;
  --surface: #faf9f6;
  --surface-strong: #ffffff;
  --ink: #1e211f;
  --muted: #666a66;
  --faint: #8b8f8a;
  --line: #d9d8d2;
  --line-strong: #c4c5be;
  --accent: #b04f32;
  --accent-soft: #f0ded6;
  --accent-ink: #87351f;
  --shadow: 0 24px 70px rgba(39, 41, 38, 0.08);
  --shadow-hover: 0 32px 90px rgba(39, 41, 38, 0.13);
  --radius-lg: 30px;
  --radius-md: 18px;
  --content: min(1180px, calc(100% - 48px));
  --header-height: 82px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #171918;
  --surface: #1e211f;
  --surface-strong: #252825;
  --ink: #f1efe8;
  --muted: #b0b2ac;
  --faint: #8a8e88;
  --line: #343834;
  --line-strong: #494e49;
  --accent: #d47b5f;
  --accent-soft: #442a22;
  --accent-ink: #f2a98f;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
  --shadow-hover: 0 32px 90px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 28px);
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 82% 4%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 28rem),
    var(--page);
  color: var(--ink);
  font-family: "Inter", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  transition: background-color 240ms ease, color 240ms ease;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
  content: "";
  opacity: 0.035;
  pointer-events: none;
}

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

a,
button {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

button,
a {
  outline-offset: 4px;
}

:focus-visible {
  outline: 2px solid var(--accent);
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--page);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  width: 100%;
  min-height: var(--header-height);
  align-items: center;
  justify-content: space-between;
  padding: 14px max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  background: color-mix(in srgb, var(--page) 86%, transparent);
  backdrop-filter: blur(18px) saturate(135%);
}

.identity {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  text-decoration: none;
}

.identity-name {
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.identity-role {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.button,
.theme-toggle {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.button:hover,
.theme-toggle:hover {
  transform: translateY(-2px);
}

.button-primary {
  gap: 8px;
  padding: 0 18px;
  background: var(--ink);
  color: var(--page);
  text-decoration: none;
}

.button-primary svg {
  width: 16px;
}

.theme-toggle {
  position: relative;
  width: 44px;
  padding: 0;
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.theme-icon {
  position: absolute;
  width: 18px;
  transition: opacity 180ms ease, transform 180ms ease;
}

.theme-icon-moon,
:root[data-theme="dark"] .theme-icon-sun {
  opacity: 0;
  transform: rotate(30deg) scale(0.6);
}

:root[data-theme="dark"] .theme-icon-moon {
  opacity: 1;
  transform: rotate(0) scale(1);
}

main,
.site-footer {
  width: var(--content);
  margin-inline: auto;
}

.hero {
  display: grid;
  gap: clamp(26px, 4vw, 46px);
  padding: clamp(38px, 5vw, 64px) 0 clamp(72px, 8vw, 108px);
}

.hero-copy {
  display: grid;
  grid-template-columns: minmax(270px, 0.8fr) minmax(300px, 1.2fr);
  align-items: center;
  gap: 12px clamp(32px, 6vw, 86px);
}

.eyebrow,
.project-kicker,
.case-study-heading > p {
  margin: 0;
  color: var(--accent-ink);
  font-family: "Roboto Mono", monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1.45;
  text-transform: uppercase;
}

.hero-copy > .eyebrow {
  grid-column: 1;
}

.hero h1 {
  margin: 0;
  max-width: 650px;
  font-size: clamp(2.3rem, 4.5vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1;
}

.hero-intro {
  grid-column: 2;
  grid-row: 1 / span 2;
  margin: 0;
  max-width: 36rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.3vw, 1.16rem);
  line-height: 1.65;
}

.specialties {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 10px;
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.specialties span:not(:last-child)::after {
  margin-left: 18px;
  color: var(--accent);
  content: "•";
}

.reel-shell {
  position: relative;
  overflow: hidden;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.media-label {
  display: flex;
  justify-content: space-between;
  padding: 5px 8px 13px;
  color: var(--muted);
  font-family: "Roboto Mono", monospace;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

video,
iframe {
  display: block;
  width: 100%;
  border: 0;
}

video {
  background: #111;
  object-fit: cover;
}

.hero-video,
.media-frame video,
.media-frame iframe {
  aspect-ratio: 16 / 9;
  border-radius: calc(var(--radius-lg) - 10px);
}

.work-index {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(40px, 7vw, 100px);
  align-items: start;
  padding: 36px 0 110px;
  border-top: 1px solid var(--line-strong);
}

.work-index-copy {
  max-width: 420px;
  margin: 18px 0 0;
  color: var(--muted);
}

.project-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.project-links a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 17px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 180ms ease, padding-left 180ms ease;
}

.project-links a:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.project-links a:hover {
  padding-left: 18px;
  color: var(--accent-ink);
}

.project-links span {
  color: var(--faint);
  font-family: "Roboto Mono", monospace;
  font-size: 0.65rem;
}

.projects {
  display: grid;
  gap: 42px;
  padding-bottom: 120px;
}

.project-card {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 68px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 300ms ease, border-color 300ms ease, box-shadow 300ms ease, background-color 240ms ease;
}

.project-card::before {
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 4px;
  background: var(--accent);
  content: "";
  transform: scaleX(0.28);
  transform-origin: right;
  transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.project-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-hover);
  transform: translateY(-5px);
}

.project-card:hover::before {
  transform: scaleX(1);
}

.project-card.focus-flash {
  animation: focus-flash 900ms ease;
}

@keyframes focus-flash {
  0%, 100% { border-color: var(--line); }
  35% { border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft), var(--shadow-hover); }
}

.project-header {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.project-number {
  padding-top: 10px;
  color: var(--faint);
  font-family: "Roboto Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.project-title-group h2 {
  margin: 9px 0 8px;
  font-size: clamp(2.4rem, 6vw, 5.9rem);
  font-weight: 800;
  letter-spacing: -0.065em;
  line-height: 0.98;
  text-transform: uppercase;
}

.project-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.96rem, 1.4vw, 1.12rem);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 30px 0 42px 90px;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}

.media-frame {
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  transition: transform 250ms ease, box-shadow 250ms ease;
}

.media-frame:hover {
  box-shadow: 0 24px 58px rgba(26, 28, 26, 0.14);
  transform: scale(1.005);
}

.case-study + .case-study {
  margin-top: 74px;
  padding-top: 68px;
  border-top: 1px solid var(--line);
}

.case-study-heading {
  display: grid;
  grid-template-columns: minmax(100px, 0.28fr) minmax(0, 0.72fr);
  gap: 26px;
  align-items: baseline;
  margin: 0 0 24px;
}

.case-study-heading h3 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.45rem);
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.project-copy {
  max-width: 760px;
  margin: 34px auto 0;
  color: var(--muted);
  font-size: clamp(0.96rem, 1.25vw, 1.06rem);
}

.project-copy p {
  margin: 0;
}

.project-copy p + p {
  margin-top: 20px;
}

.project-copy strong,
.project-copy em {
  color: var(--ink);
}

.media-note {
  padding-left: 18px;
  border-left: 2px solid var(--accent);
  color: var(--faint);
  font-size: 0.88rem;
}

.steam-panel {
  display: grid;
  grid-template-columns: minmax(160px, 0.35fr) minmax(0, 0.65fr);
  gap: 28px;
  align-items: center;
  margin-top: 48px;
  padding-top: 38px;
  border-top: 1px solid var(--line);
}

.steam-panel p {
  margin: 8px 0 0;
  color: var(--muted);
}

.steam-link-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  width: 100%;
  max-width: 646px;
  min-height: 112px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface-strong) 92%, var(--accent-soft)), var(--surface-strong));
  color: var(--ink);
  text-decoration: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.steam-link-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 18px 40px rgba(26, 28, 26, 0.1);
  transform: translateY(-2px);
}

.steam-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 50%;
  background: #202b3c;
  color: #f4f7fb;
}

.steam-icon img {
  display: block;
  width: 30px;
  height: 30px;
}

.steam-link-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.steam-link-copy strong {
  font-size: 1rem;
  line-height: 1.3;
}

.steam-link-copy small {
  color: var(--muted);
  font-size: 0.78rem;
}

.steam-link-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-ink);
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
  text-transform: uppercase;
}

.steam-link-action svg {
  width: 16px;
}

.site-footer {
  display: grid;
  justify-items: center;
  padding: 86px 0 56px;
  border-top: 1px solid var(--line-strong);
  text-align: center;
}

.footer-mark {
  display: flex;
  height: 28px;
  align-items: center;
  gap: 4px;
  margin-bottom: 20px;
}

.footer-mark span {
  display: block;
  width: 3px;
  border-radius: 3px;
  background: var(--accent);
}

.footer-mark span:nth-child(1),
.footer-mark span:nth-child(5) { height: 10px; }
.footer-mark span:nth-child(2),
.footer-mark span:nth-child(4) { height: 19px; }
.footer-mark span:nth-child(3) { height: 28px; }

.site-footer > p {
  margin: 0;
  font-weight: 800;
}

.site-footer .footer-meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.site-footer a {
  margin-top: 25px;
  color: var(--accent-ink);
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--ink);
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  backdrop-filter: blur(12px);
  transition: opacity 180ms ease, transform 180ms ease, background-color 180ms ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--ink);
  color: var(--page);
  transform: translateY(-3px);
}

.back-to-top svg {
  width: 20px;
}

.js .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  :root {
    --content: min(100% - 32px, 760px);
  }

  .hero {
    padding-top: 48px;
  }

  .hero-copy,
  .work-index {
    grid-template-columns: 1fr;
  }

  .hero-intro {
    grid-column: 1;
    grid-row: auto;
    max-width: 620px;
  }

  .specialties {
    grid-column: 1;
    margin-top: 6px;
  }

  .work-index {
    gap: 34px;
  }

  .project-card {
    padding: 34px 26px;
  }

  .tag-list {
    margin-left: 0;
  }

  .steam-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  :root {
    --header-height: 72px;
    --radius-lg: 22px;
  }

  .site-header {
    padding-inline: 16px;
  }

  .identity-role {
    display: none;
  }

  .button-primary {
    min-height: 40px;
    padding-inline: 14px;
    font-size: 0.75rem;
  }

  .theme-toggle {
    width: 40px;
    min-height: 40px;
  }

  .hero {
    gap: 34px;
    padding: 42px 0 76px;
  }

  .hero-copy {
    gap: 23px;
  }

  .hero h1 {
    font-size: clamp(2.25rem, 12vw, 3.5rem);
    letter-spacing: -0.055em;
  }

  .specialties {
    display: grid;
    gap: 5px;
  }

  .specialties span::after {
    display: none;
  }

  .reel-shell {
    padding: 8px;
  }

  .media-label {
    padding: 5px 6px 10px;
  }

  .work-index {
    padding-bottom: 76px;
  }

  .project-links {
    grid-template-columns: 1fr;
  }

  .project-links a:nth-child(odd) {
    border-right: 0;
  }

  .projects {
    gap: 24px;
    padding-bottom: 82px;
  }

  .project-card {
    padding: 30px 18px;
  }

  .project-header {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .project-number {
    padding-top: 0;
  }

  .project-title-group h2 {
    font-size: clamp(2.2rem, 13vw, 3.8rem);
  }

  .tag-list {
    margin-top: 24px;
    margin-bottom: 32px;
  }

  .case-study-heading {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .case-study + .case-study {
    margin-top: 52px;
    padding-top: 48px;
  }

  .media-frame {
    padding: 6px;
  }

  .project-copy {
    margin-top: 27px;
  }

  .steam-link-card {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    padding: 17px;
  }

  .steam-link-action {
    grid-column: 2;
    justify-self: start;
  }

  .back-to-top {
    right: 14px;
    bottom: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
