:root {
  color-scheme: dark;
  --background: 216 13% 7%;
  --foreground: 220 10% 94%;
  --card: 214 13% 10%;
  --card-foreground: 220 10% 94%;
  --popover: 214 13% 11%;
  --popover-foreground: 220 10% 94%;
  --primary: 27 100% 61%;
  --primary-foreground: 216 20% 8%;
  --muted: 215 11% 13%;
  --muted-foreground: 218 8% 72%;
  --border: 215 9% 26%;
  --accent: 216 12% 15%;
  --accent-foreground: 220 10% 94%;
  --ring: 27 100% 61%;
  --radius: .75rem;
  --site-width: 1400px;
  --site-gutter: clamp(22px, 4.5vw, 72px);
  --hairline: rgb(220 226 233 / 17%);
  --frame-line: rgb(222 227 234 / 51%);
  --ink: hsl(var(--foreground));
  --orange: hsl(var(--primary));
}

html { scroll-padding-top: 95px; }
body { background: hsl(var(--background)); }
::selection { background: #d25300; color: #fff; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; }

.design-container {
  width: min(var(--site-width), 100% - var(--site-gutter) * 2);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 60;
  inset: 10px auto auto 10px;
  padding: 12px 18px;
  background: var(--ink);
  color: #101114;
  transform: translateY(-150%);
}
.skip-link:focus { transform: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--hairline);
  background: rgb(14 16 18 / 94%);
  backdrop-filter: blur(16px);
}
.site-header-inner {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
}
.site-monogram {
  font-size: 2.45rem;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -.095em;
}
.site-menu {
  display: flex;
  align-items: center;
  gap: clamp(24px, 4vw, 62px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-menu a {
  padding-block: 8px;
  font-size: 1.02rem;
  font-weight: 520;
  transition: color 150ms ease;
}
.site-menu a:hover, .site-menu a[aria-current] { color: var(--orange); }
.site-menu-toggle { display: none; }

.home-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: radial-gradient(ellipse at 69% 38%, #171b1d 0%, #121517 39%, transparent 75%);
}
.home-hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: linear-gradient(to right, rgb(178 198 206 / 10%) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(178 198 206 / 10%) 1px, transparent 1px);
  background-size: 40px 40px;
  content: "";
  mask-image: linear-gradient(180deg, #000 0%, rgb(0 0 0 / 80%) 65%, transparent 100%);
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  min-height: clamp(290px, 23vw, 370px);
}
.hero-portrait {
  justify-self: center;
  width: min(100%, clamp(290px, 23vw, 370px));
  height: auto;
  mask-image: linear-gradient(90deg, transparent, #000 17%, #000 83%, transparent),
    linear-gradient(180deg, transparent, #000 8%, #000 94%, transparent);
  mask-composite: intersect;
}
.hero-copy {
  position: relative;
  z-index: 1;
  padding-block: 44px 52px;
}
.design-kicker {
  margin-bottom: 24px;
  color: var(--orange);
  font-size: clamp(.77rem, 1.28vw, 1.18rem);
  font-weight: 550;
  letter-spacing: .045em;
  line-height: 1.35;
  text-transform: uppercase;
}
.hero-copy h1 {
  margin: 0;
  font-size: clamp(3.4rem, 6vw, 6.25rem);
  font-weight: 610;
  letter-spacing: -.05em;
  line-height: 1.01;
}
.hero-subtitle {
  margin: 12px 0 0;
  color: hsl(var(--muted-foreground));
  font-size: clamp(1.16rem, 2.15vw, 1.85rem);
  font-weight: 430;
  line-height: 1.26;
  letter-spacing: -.018em;
}
.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(12px, 1.8vw, 28px);
  margin-top: clamp(24px, 2.4vw, 37px);
}
.home-button {
  display: inline-flex;
  min-width: 130px;
  min-height: 55px;
  align-items: center;
  justify-content: center;
  gap: 17px;
  padding: 11px 27px;
  border: 1px solid var(--frame-line);
  background: rgb(17 19 21 / 46%);
  color: #f8f6f4;
  font-size: clamp(.95rem, 1.25vw, 1.25rem);
  font-weight: 540;
  white-space: nowrap;
  transition: border-color 160ms ease, background 160ms ease;
}
.home-button:hover { border-color: var(--orange); background: #1e2022; }

.featured-work { padding-top: 5px; }
.design-section-title {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 32px);
  margin: 0 0 20px;
  font-size: clamp(1.35rem, 1.67vw, 1.65rem);
  font-weight: 575;
  letter-spacing: -.032em;
  line-height: 1.2;
}
.design-section-title::after {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, var(--frame-line), var(--hairline));
  content: "";
}
.featured-case, .work-tile {
  position: relative;
  display: block;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--frame-line);
  background: #14171a;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.featured-case:hover, .work-tile:hover {
  border-color: var(--orange);
  box-shadow: 0 0 0 1px rgb(255 139 52 / 12%);
}
.featured-case {
  min-height: clamp(146px, 11vw, 174px);
  background: radial-gradient(ellipse at 17% 15%, #181b1d, #111315 74%);
}
.featured-case-copy {
  position: relative;
  z-index: 1;
  padding: clamp(21px, 1.55vw, 26px) clamp(22px, 3.4vw, 52px);
}
.featured-badge {
  display: inline-block;
  margin-bottom: 10px;
  padding: 2px 10px;
  border: 1px solid #e1772b;
  color: var(--orange);
  font-size: .83rem;
  font-weight: 560;
  text-transform: uppercase;
}
.featured-case h3 {
  font-size: clamp(1.55rem, 2.5vw, 2.45rem);
  font-weight: 590;
  letter-spacing: -.045em;
  line-height: 1.1;
}
.featured-case p {
  margin-top: 7px;
  color: #d2d4d6;
  font-size: clamp(.86rem, 1.34vw, 1.23rem);
}
.featured-case-arrow {
  position: absolute;
  z-index: 2;
  bottom: 30px;
  left: 41%;
  transition: transform 180ms ease;
}
.featured-case:hover .featured-case-arrow,
.work-tile:hover svg { transform: translateX(4px); }
.featured-wheel-photo {
  position: absolute;
  inset: 0 0 0 auto;
  z-index: -1;
  width: min(45%, 452px);
  height: 100%;
  object-fit: cover;
  object-position: center 34%;
  mask-image: linear-gradient(90deg, transparent, #000 12%);
}
.featured-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 25px);
  margin-top: clamp(14px, 1.55vw, 24px);
}
.work-tile { aspect-ratio: 2.42; }
.work-tile img {
  position: absolute;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 240ms ease;
}
.work-tile::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgb(11 12 14 / 18%) 46%, rgb(11 12 14 / 91%) 100%);
  content: "";
}
.work-tile:hover img { transform: scale(1.045); }
.work-tile-title {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: clamp(12px, 1.55vw, 24px);
  font-size: clamp(.95rem, 1.45vw, 1.35rem);
  font-weight: 580;
  letter-spacing: -.025em;
}
.work-tile-title svg { flex: none; transition: transform 180ms ease; }

.home-archive { padding-top: clamp(54px, 6vw, 96px); }
.home-section-heading { display: flex; align-items: center; gap: 24px; margin-bottom: 23px; }
.home-section-heading .design-section-title { flex: 1; margin: 0; }
.design-text-link { display: inline-flex; align-items: center; gap: 10px; color: var(--orange); font-size: .9rem; }
.design-text-link:hover { text-decoration: underline; }
.home-about { padding-block: clamp(54px, 7vw, 100px) 0; }
.about-panel {
  padding: clamp(24px, 4.2vw, 65px);
  border: 1px solid var(--hairline);
  background: radial-gradient(ellipse at 12% 0%, #232226, #141619 64%);
}
.about-panel .design-kicker { margin-bottom: 12px; }
.about-panel h2 { font-size: clamp(2rem, 4vw, 3.6rem); font-weight: 610; line-height: 1.04; letter-spacing: -.05em; }
.about-description { max-width: 60ch; margin-top: 18px; color: hsl(var(--muted-foreground)); font-size: 1.02rem; line-height: 1.65; }
.about-links .home-button { min-height: 45px; font-size: .96rem; }

.site-main > .max-w-7xl { max-width: calc(var(--site-width) + var(--site-gutter) * 2); padding-inline: var(--site-gutter); }
.site-main > :not(.home-page) { padding-top: clamp(32px, 4.2vw, 65px); }
.archive-title { font-size: clamp(2.65rem, 5vw, 4.65rem); font-weight: 610; letter-spacing: -.055em; line-height: 1.02; }
.archive-heading > p { max-width: 62ch; font-size: clamp(.96rem, 1.25vw, 1.13rem); }
.archive-card:hover { border-color: var(--orange); }
.archive-card > div:first-child { border-bottom: 1px solid var(--hairline); }
.archive-card h3 { font-size: 1.14rem; font-weight: 620; }
.archive-card > div:nth-child(2) { padding: clamp(16px, 1.6vw, 24px); }
.site-main > :not(.home-page) h1.font-black { font-weight: 620; line-height: 1.04; }
.case-study-section h2 { font-weight: 620; letter-spacing: -.04em; }
.schoolwork-card { max-width: 430px; }
.schoolwork-card > div:first-child { background: #050505; }
.school-project { max-width: 1160px; }
.school-project-back { margin-bottom: 24px; }
.school-study {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: clamp(20px, 4vw, 64px);
  align-items: start;
  padding-block: clamp(24px, 4vw, 56px);
  border-top: 1px solid var(--hairline);
}
.school-study .design-kicker { margin-bottom: 8px; }
.school-study h2 { font-size: clamp(1.55rem, 3vw, 2.35rem); line-height: 1.12; }
.school-study-copy { margin-top: 12px; color: hsl(var(--muted-foreground)); line-height: 1.65; }
.school-study a { display: block; }
.school-study img { width: 100%; height: auto; border: 1px solid var(--hairline); }
.school-study figcaption { margin-top: 8px; color: hsl(var(--muted-foreground)); font-size: .85rem; }
.game-card { max-width: 460px; padding: clamp(20px, 4vw, 38px); }
.game-card:hover { border-color: var(--orange); }
.game-card .design-kicker { margin-bottom: 10px; }
.game-card h2 { font-size: clamp(1.65rem, 3vw, 2.35rem); font-weight: 620; letter-spacing: -.04em; }
.game-description { margin-block: 8px 20px; color: hsl(var(--muted-foreground)); }
.game-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  margin-bottom: 12px;
  color: hsl(var(--muted-foreground));
  font-size: .9rem;
}
.game-frame {
  display: block;
  width: 100%;
  height: clamp(540px, 82svh, 880px);
  border: 1px solid var(--hairline);
  background: #234b36;
}
.study-app-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(100px, 240px);
  align-items: center;
  gap: clamp(12px, 4vw, 48px);
  max-width: 800px;
  padding: clamp(20px, 5vw, 56px);
  border: 1px solid var(--frame-line);
  background: radial-gradient(ellipse at 76% 50%, #172847, #14171c 68%);
  transition: border-color 160ms ease;
}
.study-app-card:hover { border-color: var(--orange); }
.study-app-logo { width: min(100%, 288px); height: auto; }
.study-app-mascot { width: 100%; height: auto; }
.study-app-card p { margin-block: 15px 20px; color: hsl(var(--muted-foreground)); }
.social-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: none;
  place-items: center;
  border: 1px solid var(--hairline);
  background: hsl(var(--muted));
  color: var(--ink);
}
.site-footer {
  margin-top: clamp(54px, 7vw, 100px);
  border-top: 1px solid var(--hairline);
  background: #101215;
}
.site-footer-inner {
  display: flex;
  min-height: 120px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 20px;
  color: hsl(var(--muted-foreground));
  font-size: .87rem;
}
.footer-brand { display: inline-flex; align-items: center; gap: 16px; color: var(--ink); }
.footer-brand .site-monogram { font-size: 1.95rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: clamp(12px, 2vw, 30px); }
.site-footer nav a:hover { color: var(--orange); }

@media (max-width: 1020px) {
  .home-button { min-width: 104px; min-height: 49px; padding-inline: 17px; }
  .featured-case-arrow { left: auto; right: 50%; }
  .featured-wheel-photo { object-position: center 40%; }
}

@media (max-width: 680px) {
  .school-study { grid-template-columns: 1fr; }
  html { scroll-padding-top: 76px; }
  .site-header-inner { min-height: 58px; }
  .site-monogram { font-size: 2.06rem; }
  .site-menu-toggle { display: grid; width: 44px; height: 44px; place-items: center; }
  .site-menu {
    position: absolute;
    inset: 100% 0 auto;
    display: none;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--site-gutter) 15px;
    border-bottom: 1px solid var(--hairline);
    background: #111316;
  }
  .site-menu[data-open="true"] { display: grid; }
  .site-menu li + li { border-top: 1px solid var(--hairline); }
  .site-menu a { display: block; padding: 12px 0; }
  .hero-inner { grid-template-columns: 1fr; min-height: auto; }
  .hero-copy { padding-block: 36px 32px; }
  .hero-portrait { width: min(100%, 240px); margin-bottom: 16px; }
  .hero-copy h1 { font-size: clamp(2.7rem, 10vw, 4.2rem); }
  .design-kicker { margin-bottom: 15px; }
  .featured-work { padding-top: 12px; }
  .featured-case { min-height: 138px; }
  .featured-case-copy { max-width: 89%; }
  .featured-case-arrow { inset: 89px 15px auto auto; width: 19px; }
  .featured-wheel-photo { position: relative; inset: auto; width: 100%; height: 165px; mask-image: none; }
  .featured-tiles { grid-template-columns: 1fr; }
  .work-tile-title { padding: 14px 17px; font-size: 1.1rem; }
  .site-footer-inner { align-items: flex-start; flex-direction: column; gap: 16px; }
}

@media (max-width: 420px) {
  .study-app-card { grid-template-columns: 1fr; }
  .study-app-mascot { width: 150px; justify-self: center; }
}

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