@font-face {
  font-family: Space;
  src: url('./assets/fonts/space-grotesk-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Space;
  src: url('./assets/fonts/space-grotesk-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: Space;
  src: url('./assets/fonts/space-grotesk-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: Silkscreen;
  src: url('./assets/fonts/silkscreen-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0b0d0d;
  --surface: #151915;
  --line: #303633;
  --ink: #f1f2ed;
  --muted: #a9b0aa;
  --accent: #ff5a20;
  --content: 1430px;
  --radius: 4px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Space, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: .16;
  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='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.2'/%3E%3C/svg%3E");
}
::selection { background: var(--accent); color: var(--bg); }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.skip-link { position: absolute; top: -60px; left: 18px; z-index: 30; padding: 10px 14px; background: var(--accent); color: var(--bg); }
.skip-link:focus { top: 10px; }
.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; }

.site-header {
  height: 78px;
  padding: 0 clamp(24px, 5vw, 88px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  position: relative;
  z-index: 15;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 13, 13, .92);
}
.brand { font-size: 26px; font-weight: 700; letter-spacing: -.09em; line-height: 1; }
.brand-mark { color: var(--accent); padding-left: 2px; }
.site-header nav, .header-actions { display: flex; align-items: center; gap: clamp(20px, 2.5vw, 40px); }
.site-header nav a, .header-contact, .language-toggle {
  font-family: Silkscreen, monospace;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.site-header nav a { color: var(--muted); transition: color .25s; }
.site-header nav a:hover { color: var(--ink); }
.header-actions { gap: 20px; }
.language-toggle { padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: none; color: var(--ink); cursor: pointer; }
.language-toggle:hover { border-color: var(--accent); }
.header-contact { padding: 13px 16px; border-radius: var(--radius); background: var(--accent); color: var(--bg); font-weight: 700; transition: transform .25s, background .25s; }
.header-contact:hover, .button-primary:hover { transform: translateY(-3px); background: #ff7343; }
.header-contact:active, .button-primary:active { transform: translateY(1px); }

.hero {
  min-height: max(790px, calc(100dvh - 78px));
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid var(--line);
  background: #0a100b;
}
.hero::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(9, 12, 10, .98) 0%, rgba(9, 12, 10, .91) 25%, rgba(9, 12, 10, .5) 48%, transparent 76%); }
.hero-stage { width: min(var(--content), 100%); min-height: inherit; margin: auto; padding: 80px clamp(24px, 5vw, 88px) 130px; display: flex; align-items: center; position: relative; z-index: 2; pointer-events: none; }
.hero-copy { max-width: 650px; position: relative; pointer-events: auto; }
.hero-kicker, .section-tag, .identity-strip, .game-hud, .game-controls, .work-number, .work-tags, .timeline-row > b, .site-footer {
  font-family: Silkscreen, monospace;
  font-size: 11px;
  letter-spacing: .06em;
}
.hero-kicker { margin: 0 0 24px; color: var(--accent); }
.hero h1 {
  margin: 0;
  max-width: 850px;
  font-size: clamp(80px, 8vw, 133px);
  font-weight: 500;
  letter-spacing: -.075em;
  line-height: .95;
}
.hero h1 em, .section h2 em, .contact-section h2 em { color: var(--accent); font-style: normal; }
.hero-summary { max-width: 580px; margin: 33px 0 34px; color: #c8cec8; font-size: clamp(18px, 1.4vw, 22px); line-height: 1.5; }
.hero-links { display: flex; align-items: center; flex-wrap: wrap; gap: 30px; }
.button-primary { display: inline-flex; align-items: center; justify-content: space-between; gap: 28px; padding: 17px 22px; border-radius: var(--radius); background: var(--accent); color: var(--bg); font-size: 15px; font-weight: 700; white-space: nowrap; transition: transform .25s, background .25s; }
.text-link { padding-bottom: 5px; border-bottom: 1px solid var(--muted); font-size: 14px; white-space: nowrap; transition: color .25s, border-color .25s; }
.text-link:hover { color: var(--accent); border-color: var(--accent); }

.game-canvas { width: 100%; height: 100%; display: block; position: absolute; inset: 0; z-index: 0; image-rendering: pixelated; touch-action: manipulation; cursor: crosshair; }
.game-hud { width: 260px; position: absolute; right: max(5vw, calc((100vw - var(--content)) / 2 + 88px)); top: 68px; z-index: 3; color: #c1cfc1; pointer-events: none; text-shadow: 0 1px 4px #0b0d0d; }
.game-hud-title, .game-readouts, .game-core { display: flex; justify-content: space-between; gap: 15px; }
.game-hud-title { color: var(--accent); }
.game-live { color: #d1ded0; white-space: nowrap; }
.game-live i { width: 6px; height: 6px; display: inline-block; margin-right: 6px; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.game-readouts { margin-top: 17px; color: var(--ink); }
.game-core { margin-top: 12px; font-size: 9px; }
.game-meter { height: 5px; margin-top: 7px; border: 1px solid #708071; background: #182019; }
.game-meter span { width: 100%; height: 100%; display: block; background: var(--accent); transition: width .2s linear; }
.game-status { margin: 11px 0 0; color: var(--accent); font-size: 10px; }
.game-status::before { content: '▸ '; }
.game-controls { position: absolute; right: max(5vw, calc((100vw - var(--content)) / 2 + 88px)); bottom: 42px; z-index: 3; display: flex; align-items: center; gap: 18px; color: var(--ink); }
.game-controls p { max-width: 240px; margin: 0; font-size: 10px; line-height: 1.6; text-shadow: 0 1px 5px #0b0d0d; }
.game-shield { padding: 11px 13px; border: 1px solid var(--accent); border-radius: 2px; background: rgba(11, 17, 13, .85); color: var(--ink); font-family: inherit; font-size: 10px; cursor: pointer; white-space: nowrap; transition: background .2s, transform .2s; }
.game-shield:hover { background: #49291e; transform: translateY(-2px); }
.game-shield:disabled { opacity: .55; cursor: default; }

.identity-strip {
  max-width: var(--content);
  margin: auto;
  padding: 26px clamp(24px, 5vw, 88px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: #c3cbc3;
}
.identity-strip span:nth-child(2) { text-align: center; }
.identity-strip span:nth-child(3) { text-align: right; }

.section { max-width: var(--content); margin: auto; padding: clamp(105px, 10vw, 180px) clamp(24px, 5vw, 88px); }
.section-heading { max-width: 1100px; }
.section-tag { margin: 0 0 28px; color: var(--accent); }
.section h2, .contact-section h2 { margin: 0; font-size: clamp(48px, 6vw, 96px); font-weight: 500; letter-spacing: -.065em; line-height: 1.04; }
.approach-section { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.approach-section h2 { font-size: clamp(48px, 5.2vw, 78px); }
.approach-body { padding-top: 52px; }
.approach-lead { max-width: 600px; margin: 0 0 20px; color: #d0d5ce; font-size: clamp(20px, 2vw, 29px); line-height: 1.35; letter-spacing: -.03em; }
.approach-detail { max-width: 590px; margin: 0 0 54px; color: var(--muted); font-size: 17px; line-height: 1.6; }
.principle { display: grid; grid-template-columns: 60px 1fr; gap: 20px; padding: 23px 0; border-top: 1px solid var(--line); }
.principle > span { padding-top: 5px; color: var(--accent); font-family: Silkscreen, monospace; font-size: 13px; }
.principle h3 { margin: 0 0 8px; font-size: 19px; font-weight: 500; }
.principle p { max-width: 470px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }

.work-section { padding-top: 65px; }
.work-list { margin-top: 74px; border-top: 1px solid var(--line); }
.work-item { min-height: 265px; padding: 41px 0; display: grid; grid-template-columns: 165px minmax(0, 1fr) 170px; align-items: start; gap: 30px; border-bottom: 1px solid var(--line); }
.work-number { padding-top: 10px; color: var(--accent); }
.work-main h3 { margin: 0 0 19px; font-size: clamp(29px, 3.2vw, 51px); font-weight: 500; letter-spacing: -.055em; line-height: 1.07; }
.work-main p { max-width: 750px; margin: 0 0 28px; color: var(--muted); font-size: 16px; line-height: 1.55; }
.work-tags { display: flex; flex-wrap: wrap; gap: 19px; color: #b8c0b8; font-size: 10px; }
.work-scene { width: 160px; height: 145px; justify-self: end; align-self: center; image-rendering: pixelated; }

.experience-section { display: grid; grid-template-columns: .8fr 1.2fr; gap: 80px; padding-top: 100px; padding-bottom: 160px; }
.experience-intro h2 { font-size: clamp(46px, 4.3vw, 67px); }
.experience-intro > p:last-child { max-width: 400px; margin-top: 26px; color: var(--muted); font-size: 17px; line-height: 1.6; }
.timeline-wrap { min-width: 0; position: relative; }
.timeline { max-height: 430px; overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: var(--accent) #202724; mask-image: linear-gradient(to bottom, transparent, black 18px, black calc(100% - 18px), transparent); }
.timeline:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.timeline::-webkit-scrollbar { width: 6px; }
.timeline::-webkit-scrollbar-track { background: #202724; }
.timeline::-webkit-scrollbar-thumb { background: var(--accent); }
.timeline-row { padding: 24px 12px 24px 0; display: grid; grid-template-columns: 145px minmax(0, 1fr) 85px; align-items: start; gap: 16px; border-bottom: 1px solid var(--line); transition: background-color .35s ease, padding-left .35s ease; }
.timeline-row:hover, .timeline-row:focus-within { padding-left: 8px; background: rgba(255, 89, 40, .035); }
.timeline-row > span { white-space: nowrap; }
.timeline-row > span, .timeline-row > b { padding-top: 7px; color: var(--muted); font-family: Silkscreen, monospace; font-size: 10px; font-weight: 400; }
.timeline-row > b { color: var(--accent); text-align: right; }
.timeline-row h3 { margin: 0 0 5px; font-size: 25px; font-weight: 500; letter-spacing: -.035em; }
.timeline-row p { margin: 0; color: var(--muted); font-size: 15px; }
.timeline-hint { margin: 13px 0 0; color: var(--accent); font-family: Silkscreen, monospace; font-size: 10px; letter-spacing: .06em; }

.contact-section { min-height: 590px; position: relative; overflow: hidden; display: flex; align-items: center; border-top: 1px solid #373e38; border-bottom: 1px solid #373e38; background: var(--surface); }
.contact-content { width: min(var(--content), 100%); margin: auto; padding: 115px clamp(24px, 5vw, 88px); position: relative; z-index: 1; }
.contact-section h2 { max-width: 1050px; }
.contact-content > p:not(.section-tag) { max-width: 650px; margin: 28px 0; color: #c0c8c0; font-size: 18px; line-height: 1.5; }
.contact-email { padding-bottom: 7px; display: inline-flex; align-items: center; gap: 30px; border-bottom: 1px solid var(--accent); font-size: clamp(24px, 3vw, 43px); font-weight: 500; letter-spacing: -.045em; transition: color .25s; }
.contact-email:hover { color: var(--accent); }
.contact-email span { font-size: 25px; }
.contact-canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.contact-section::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(17, 24, 22, .96) 0%, rgba(17, 24, 22, .82) 43%, transparent 76%); }
.contact-content { z-index: 2; }
.site-footer { max-width: var(--content); min-height: 110px; margin: auto; padding: 25px clamp(24px, 5vw, 88px); display: flex; align-items: center; justify-content: space-between; gap: 25px; color: var(--muted); }
.site-footer div { display: flex; gap: 30px; }
.site-footer a:hover { color: var(--accent); }
.site-footer button { padding: 0; border: 0; background: none; color: inherit; font-family: inherit; font-size: inherit; letter-spacing: inherit; cursor: pointer; }
.site-footer button:hover { color: var(--accent); }
.analytics-consent { position: fixed; z-index: 40; left: 24px; bottom: 24px; width: min(390px, calc(100vw - 48px)); padding: 22px; border: 1px solid #56675a; background: #161d19; box-shadow: 0 18px 60px rgba(0, 0, 0, .45); }
.analytics-consent[hidden] { display: none; }
.analytics-consent p { margin: 0 0 18px; color: #d7ded6; font-size: 14px; line-height: 1.5; }
.analytics-consent > div { display: flex; flex-wrap: wrap; gap: 10px; }
.analytics-consent button { padding: 11px 14px; border: 1px solid #68776d; background: transparent; color: var(--ink); font-family: Silkscreen, monospace; font-size: 10px; cursor: pointer; }
.analytics-consent .analytics-allow { border-color: var(--accent); background: var(--accent); color: var(--bg); }
.analytics-consent button:hover { filter: brightness(1.2); }

.reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .reveal:not(.is-visible) { opacity: 0; transform: translateY(26px); }
  .reveal { transition: opacity .7s ease, transform .7s cubic-bezier(.16, 1, .3, 1); }
  .hero-copy { animation: enter .8s cubic-bezier(.16, 1, .3, 1) both; }
  .game-hud, .game-controls { animation: enter 1s .15s cubic-bezier(.16, 1, .3, 1) both; }
}
@keyframes enter { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1100px) {
  .site-header nav { gap: 17px; }
  .hero-copy { max-width: 570px; }
  .hero h1 { font-size: clamp(70px, 7vw, 95px); }
  .approach-section { gap: 40px; }
  .work-item { grid-template-columns: 115px 1fr 130px; }
  .work-scene { width: 140px; height: 127px; }
}

@media (max-width: 900px) {
  .site-header { height: 68px; padding: 0 20px; gap: 12px; }
  .site-header nav { display: none; }
  .header-actions { gap: 10px; }
  .header-contact { padding: 11px; font-size: 10px; }
  .language-toggle { padding: 8px; }
  .hero { min-height: max(950px, calc(100dvh - 68px)); }
  .hero::after { background: linear-gradient(180deg, rgba(9, 12, 10, .96) 0%, rgba(9, 12, 10, .84) 36%, rgba(9, 12, 10, .12) 65%, rgba(9, 12, 10, .3) 100%); }
  .hero-stage { min-height: auto; padding: 71px 20px 0; display: block; }
  .hero-copy { max-width: 570px; }
  .hero h1 { font-size: clamp(68px, 12vw, 90px); }
  .hero-summary { max-width: 550px; font-size: 18px; }
  .game-hud { top: auto; right: 20px; bottom: 129px; width: 220px; }
  .game-controls { right: 20px; bottom: 29px; left: 20px; justify-content: flex-end; }
  .game-controls p { max-width: 280px; }
  .identity-strip { padding: 24px 20px; }
  .section { padding: 90px 20px; }
  .section h2, .contact-section h2 { font-size: clamp(47px, 9vw, 70px); }
  .approach-section, .experience-section { display: block; }
  .approach-body { padding-top: 45px; }
  .work-section { padding-top: 20px; }
  .work-list { margin-top: 45px; }
  .work-item { min-height: 260px; padding: 30px 0; grid-template-columns: 1fr 100px; gap: 15px; }
  .work-number { grid-column: 1 / 3; padding: 0; }
  .work-main h3 { font-size: 34px; }
  .work-scene { width: 110px; height: 100px; }
  .work-tags { gap: 10px; }
  .experience-section { padding-top: 85px; padding-bottom: 100px; }
  .timeline { margin-top: 43px; max-height: 440px; }
  .contact-section { min-height: 500px; }
  .contact-content { padding: 92px 20px; }
  .site-footer { padding: 28px 20px; align-items: start; flex-direction: column; gap: 20px; }
  .site-footer div { gap: 24px; }
  .analytics-consent { left: 12px; bottom: 12px; width: calc(100vw - 24px); }
}

@media (max-width: 600px) {
  .hero { min-height: 1100px; }
  .identity-strip { grid-template-columns: 1fr; gap: 11px; }
  .identity-strip span:nth-child(2), .identity-strip span:nth-child(3) { text-align: left; }
}

@media (max-width: 430px) {
  .hero h1 { font-size: clamp(64px, 17vw, 78px); }
  .hero-links { gap: 20px; }
  .button-primary { padding: 16px 18px; }
  .game-hud { left: 20px; right: auto; bottom: 161px; }
  .game-controls { align-items: flex-start; flex-direction: column; gap: 12px; }
  .game-controls p { max-width: 320px; }
  .work-item { grid-template-columns: 1fr; }
  .work-number { grid-column: auto; }
  .work-scene { width: 160px; height: 145px; justify-self: start; }
  .timeline-row { grid-template-columns: 108px minmax(0, 1fr); gap: 12px; }
  .timeline-row > span { white-space: normal; }
  .timeline-row > b { display: none; }
  .contact-email { font-size: 23px; }
  .contact-section::after { background: linear-gradient(90deg, rgba(17, 24, 22, .93), rgba(17, 24, 22, .52)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .timeline { scroll-behavior: auto; }
  .timeline-row { transition: none; }
  .hero-copy, .game-hud, .game-controls { animation: none !important; }
}
