:root {
  --bg: #07090c;
  --bg-soft: #0a0d11;
  --panel: #0c1117;
  --panel-2: #0e141b;
  --text: #e8f2ff;
  --muted: #8f98a5;
  --muted-2: #626b77;
  --line: rgba(210, 232, 255, .08);
  --line-strong: rgba(210, 232, 255, .14);
  --accent: #24d6d6;
  --accent-2: #2e9fff;
  --accent-soft: rgba(36, 214, 214, .12);
  --radius: 28px;
  --max: 1440px;
  --header-h: 92px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }

::selection { background: rgba(36, 214, 214, .25); color: white; }

.ambient, .grid-glow { position: fixed; inset: auto; pointer-events: none; z-index: 0; }
.ambient { width: 520px; height: 520px; border-radius: 50%; filter: blur(130px); opacity: .13; }
.ambient-a { right: -220px; top: 120px; background: var(--accent-2); }
.ambient-b { left: -220px; top: 820px; background: var(--accent); opacity: .09; }
.grid-glow {
  inset: 0;
  opacity: .23;
  background-image:
    linear-gradient(rgba(255,255,255,.017) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.017) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: linear-gradient(to bottom, black 0, transparent 780px);
}

.site-header {
  position: relative;
  z-index: 10;
  width: min(calc(100% - 64px), var(--max));
  height: var(--header-h);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 12px; width: max-content; font-weight: 720; letter-spacing: -.02em; }
.brand img { width: 42px; height: 42px; border-radius: 11px; box-shadow: 0 8px 28px rgba(38, 157, 255, .14); }
.nav { display: flex; align-items: center; gap: 34px; font-size: 14px; color: var(--muted); }
.nav a { transition: color .2s ease; }
.nav a:hover { color: var(--text); }
.language-toggle {
  justify-self: end;
  border: 1px solid var(--line-strong);
  background: rgba(12, 17, 23, .72);
  color: var(--muted-2);
  padding: 9px 12px;
  border-radius: 999px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(14px);
}
.language-toggle [data-lang] { transition: color .2s ease; }
.language-toggle [data-lang].active { color: var(--text); }
.language-toggle .separator { margin: 0 5px; opacity: .35; }

.section-shell { position: relative; z-index: 1; width: min(calc(100% - 64px), var(--max)); margin-left: auto; margin-right: auto; }

.hero {
  min-height: 690px;
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  align-items: center;
  gap: 72px;
  padding: 74px 0 88px;
}
.eyebrow, .section-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .13em;
  font-size: 12px;
  font-weight: 750;
}
.signal-dot { width: 6px; height: 6px; background: var(--accent); border-radius: 999px; box-shadow: 0 0 18px rgba(36,214,214,.9); flex: 0 0 auto; }
.hero h1 {
  margin: 0;
  font-size: clamp(72px, 7.6vw, 124px);
  line-height: .79;
  letter-spacing: -.075em;
  font-weight: 820;
}
.hero h1 span {
  color: transparent;
  -webkit-text-stroke: 1px rgba(224, 241, 255, .35);
  text-stroke: 1px rgba(224, 241, 255, .35);
}
.hero-actions { margin-top: 56px; display: flex; flex-wrap: wrap; gap: 12px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-width: 190px;
  padding: 15px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  font-size: 14px;
  font-weight: 720;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--text); color: #071016; border-color: var(--text); box-shadow: 0 14px 42px rgba(94, 183, 255, .12); }
.button-primary:hover { background: #fff; }
.button-ghost { background: rgba(255,255,255,.018); }
.button-ghost:hover { border-color: rgba(36,214,214,.28); background: rgba(36,214,214,.055); }
.button-large { min-width: 230px; padding: 18px 20px; }

.hero-mark { position: relative; display: grid; place-items: center; min-height: 500px; }
.logo-frame {
  width: min(68%, 390px);
  aspect-ratio: 1;
  border-radius: 42px;
  overflow: hidden;
  box-shadow: 0 36px 130px rgba(31, 140, 255, .22), 0 0 0 1px rgba(255,255,255,.07);
  transform: rotate(2.4deg);
  position: relative;
  z-index: 2;
}
.logo-frame img { width: 100%; height: 100%; object-fit: cover; }
.logo-orbit { position: absolute; width: 84%; aspect-ratio: 1; border-radius: 50%; border: 1px solid rgba(36,214,214,.14); box-shadow: inset 0 0 100px rgba(36,214,214,.03); }
.logo-orbit::before, .logo-orbit::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(46,159,255,.08); }
.logo-orbit::before { inset: 10%; }
.logo-orbit::after { inset: 24%; }
.orbit-label { position: absolute; z-index: 3; font: 650 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .15em; color: rgba(221, 237, 255, .42); }
.orbit-label-top { right: 8%; top: 13%; }
.orbit-label-bottom { left: 8%; bottom: 14%; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(7,9,12,.36);
}
.stat {
  min-width: 0;
  padding: 38px 36px 40px;
  border-right: 1px solid var(--line);
}
.stat:last-child { border-right: 0; }
.stat-value { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; min-width: 0; }
.stat-value strong { font-size: clamp(40px, 4vw, 64px); line-height: .9; letter-spacing: -.055em; }
.stat-value em { font-style: normal; color: var(--text); font-size: clamp(14px, 1.2vw, 19px); font-weight: 700; white-space: nowrap; }
.stat > span { display: block; margin-top: 10px; color: var(--muted); font-size: 14px; line-height: 1.35; }

.work, .links-section { padding-top: 132px; }
.section-heading { max-width: 1000px; margin-bottom: 48px; }
.compact-heading { margin-bottom: 30px; }
.section-heading h2, .contact-card h2 {
  margin: 14px 0 0;
  font-size: clamp(48px, 6vw, 92px);
  line-height: .97;
  letter-spacing: -.055em;
}

.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.project-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(14,20,27,.97), rgba(9,13,18,.97));
  box-shadow: 0 28px 80px rgba(0,0,0,.16);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.project-card:hover { transform: translateY(-3px); border-color: rgba(85,183,255,.18); box-shadow: 0 34px 90px rgba(0,0,0,.24); }
.project-card-wide { grid-column: 1 / -1; }

.project-media { position: relative; height: 250px; display: grid; overflow: hidden; background: #05070a; border-bottom: 1px solid var(--line); }
.project-media img { width: 100%; height: 100%; min-width: 0; object-fit: cover; transition: transform .45s ease, filter .45s ease; filter: saturate(.78) contrast(1.02) brightness(.82); }
.project-card:hover .project-media img { transform: scale(1.025); filter: saturate(.92) contrast(1.04) brightness(.9); }
.media-pair { grid-template-columns: 1fr 1fr; gap: 2px; }
.media-triptych { grid-template-columns: repeat(3, 1fr); gap: 2px; }
.media-portrait img { object-position: center 25%; }
.media-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(5,8,12,.75) 0%, transparent 52%), linear-gradient(90deg, rgba(4,8,12,.08), transparent); pointer-events: none; }
.media-badge { position: absolute; left: 18px; top: 18px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.12); background: rgba(7,10,14,.68); backdrop-filter: blur(12px); font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase; letter-spacing: .08em; color: #b7c3cf; }
.status-live { color: #92f8f2; border-color: rgba(36,214,214,.22); }

.project-content { padding: 26px 30px 30px; display: flex; flex-direction: column; min-height: 335px; }
.project-topline { display: flex; justify-content: space-between; align-items: center; gap: 20px; color: var(--muted-2); font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; text-transform: uppercase; }
.project-index { color: #a9b5c2; }
.project-content h3 { margin: 34px 0 16px; font-size: clamp(34px, 3.6vw, 58px); line-height: .95; letter-spacing: -.052em; }
.project-content p { margin: 0; color: #a2a9b1; font-size: 15px; line-height: 1.65; }
.project-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.project-meta span { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: #929ba6; font: 650 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.project-link { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: auto; padding-top: 30px; color: #dbe8f7; font-size: 14px; font-weight: 720; border-top: 1px solid var(--line); }
.project-meta + .project-link { margin-top: 30px; }
.project-link span:last-child { color: var(--accent-2); font-size: 18px; transition: transform .2s ease; }
.project-link:hover span:last-child { transform: translate(3px, -3px); }

.archive-card { position: relative; }
.archive-visual { position: relative; height: 250px; overflow: hidden; border-bottom: 1px solid var(--line); background: radial-gradient(circle at 66% 18%, rgba(36,214,214,.13), transparent 36%), linear-gradient(135deg, #0b1218, #080b0f 62%); }
.archive-word { position: absolute; left: 28px; bottom: 16px; z-index: 2; font-size: 104px; font-weight: 850; line-height: .8; letter-spacing: -.08em; color: rgba(231,243,255,.95); }
.archive-stack { position: absolute; right: 30px; top: 28px; display: grid; grid-template-columns: repeat(3, 58px); gap: 9px; transform: rotate(-6deg); }
.archive-stack span { aspect-ratio: 1; display: grid; place-items: center; border-radius: 14px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.08); color: rgba(204,225,245,.45); font: 760 12px/1 ui-monospace, monospace; }
.archive-stack span:nth-child(2), .archive-stack span:nth-child(5) { color: var(--accent); border-color: rgba(36,214,214,.16); background: rgba(36,214,214,.045); }
.archive-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-size: 32px 32px; mask-image: linear-gradient(90deg, transparent, black); }

.links-section { padding-bottom: 40px; }
.social-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.social-card {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 112px;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: rgba(11,15,20,.68);
  transition: transform .22s ease, border-color .22s ease, background .22s ease;
}
.social-card:hover { transform: translateY(-3px); border-color: rgba(36,214,214,.2); background: rgba(13,20,26,.94); }
.social-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; border: 1px solid var(--line-strong); background: rgba(255,255,255,.025); color: #d8e7f4; }
.social-icon svg { width: 23px; height: 23px; fill: currentColor; }
.itch-icon b { font-size: 12px; letter-spacing: -.04em; }
.social-copy { min-width: 0; }
.social-copy strong { display: block; font-size: 16px; }
.social-copy small { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.social-arrow { color: var(--accent-2); font-size: 18px; transition: transform .2s ease; }
.social-card:hover .social-arrow { transform: translate(3px,-3px); }
.social-card:hover .social-icon { color: var(--accent); }

.contact-section { padding-top: 108px; padding-bottom: 108px; }
.contact-card { padding: 44px; display: flex; align-items: end; justify-content: space-between; gap: 42px; border: 1px solid rgba(36,214,214,.12); border-radius: 28px; background: radial-gradient(circle at 88% 20%, rgba(46,159,255,.13), transparent 31%), linear-gradient(135deg, rgba(13,20,27,.94), rgba(8,12,16,.94)); }
.contact-card h2 { font-size: clamp(30px, 4vw, 58px); max-width: 820px; overflow-wrap: anywhere; }
.contact-copy { min-width: 0; }

.site-footer { min-height: 94px; display: flex; align-items: center; justify-content: space-between; gap: 30px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 12px; }
.site-footer a:hover { color: var(--text); }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* Privacy policy */
.legal-page { background: #101315; color: #e7e9eb; }
.legal-page .ambient, .legal-page .grid-glow { display: none; }
.legal-wrap { width: min(calc(100% - 48px), 1080px); margin: 0 auto; padding: 34px 0 80px; }
.legal-nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-bottom: 25px; border-bottom: 1px solid rgba(255,255,255,.12); color: #989fa6; font-size: 13px; }
.legal-nav a { display: flex; align-items: center; gap: 10px; color: #35a9ff; }
.legal-nav img { width: 30px; height: 30px; border-radius: 7px; }
.legal-article { margin-top: 24px; font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.68; color: #d8dbde; }
.legal-article h1 { font-size: 18px; margin: 0 0 22px; }
.legal-article h2 { font-size: 16px; margin: 28px 0 12px; }
.legal-article p { margin: 0 0 17px; }
.legal-article ul { margin: 0 0 20px; padding-left: 28px; }
.legal-article a { color: #4caaf5; }
.legal-article hr { border: 0; border-top: 1px solid rgba(255,255,255,.12); margin: 30px 0; }

@media (max-width: 1100px) {
  .hero { min-height: auto; grid-template-columns: 1fr .82fr; gap: 28px; }
  .hero h1 { font-size: clamp(68px, 9.6vw, 108px); }
  .logo-frame { width: min(78%, 350px); }
  .social-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  :root { --header-h: 74px; --radius: 22px; }
  .site-header, .section-shell { width: min(calc(100% - 34px), var(--max)); }
  .site-header { grid-template-columns: 1fr auto; }
  .nav { display: none; }
  .hero { grid-template-columns: 1fr; padding: 60px 0 74px; gap: 36px; }
  .hero-mark { min-height: 360px; order: -1; }
  .logo-frame { width: min(68vw, 315px); border-radius: 34px; }
  .logo-orbit { width: min(82vw, 390px); }
  .hero h1 { font-size: clamp(52px, 16vw, 82px); }
  .hero-actions { margin-top: 40px; }
  .stats { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); padding: 26px 10px; display: grid; grid-template-columns: minmax(145px, auto) 1fr; align-items: center; gap: 18px; }
  .stat:last-child { border-bottom: 0; }
  .stat > span { margin: 0; }
  .work, .links-section { padding-top: 92px; }
  .section-heading { margin-bottom: 34px; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card-wide { grid-column: auto; }
  .project-media, .archive-visual { height: 230px; }
  .project-content { padding: 24px; min-height: 0; }
  .project-content h3 { font-size: clamp(38px, 11vw, 56px); }
  .project-link { margin-top: 28px; }
  .contact-card { align-items: stretch; flex-direction: column; padding: 30px 24px; }
  .button-large { width: 100%; }
  .site-footer { min-height: 118px; align-items: flex-start; justify-content: center; flex-direction: column; gap: 10px; }
}

@media (max-width: 560px) {
  .brand span { font-size: 14px; }
  .brand img { width: 36px; height: 36px; border-radius: 9px; }
  .language-toggle { padding: 8px 10px; }
  .hero { padding-top: 42px; }
  .hero-mark { min-height: 310px; }
  .hero-actions { flex-direction: column; }
  .button { width: 100%; }
  .stat { grid-template-columns: 130px 1fr; }
  .stat-value { gap: 6px; }
  .stat-value strong { font-size: 42px; }
  .stat-value em { font-size: 13px; }
  .section-heading h2 { font-size: 44px; }
  .media-pair { grid-template-columns: 1fr 1fr; }
  .media-triptych { grid-template-columns: repeat(3, 1fr); }
  .project-media { height: 205px; }
  .archive-word { font-size: 82px; }
  .archive-stack { right: 20px; grid-template-columns: repeat(3, 45px); }
  .social-grid { grid-template-columns: 1fr; }
  .social-card { min-height: 94px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
