/* ------------------------------------------------------------------
   Daniel Knauer — Freelance UX/UI Designer in Berlin
   Monochrome, editorial, motion-aware
------------------------------------------------------------------- */

/* Self-hosted fonts (no third-party requests) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('fonts/inter-300.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('fonts/inter-300-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/instrument-serif.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/instrument-serif-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/instrument-serif-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/instrument-serif-italic-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Press Start 2P';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/press-start-2p.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Press Start 2P';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/press-start-2p-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'VT323';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/vt323.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'VT323';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/vt323-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #f6f6f4;
  --bg-elev: #ffffff;
  --fg: #0a0a0a;
  --fg-muted: #5a5a58;
  --fg-subtle: #9a9a97;
  --line: rgba(10, 10, 10, 0.10);
  --line-strong: rgba(10, 10, 10, 0.22);
  --accent: #0a0a0a;
  --accent-fg: #f6f6f4;
  --grid-dot: rgba(10, 10, 10, 0.20);
  --grid-dot-glow: rgba(10, 10, 10, 0.85);
  --noise-opacity: 0.04;

  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  --radius: 999px;
  --container: 1240px;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

:root[data-theme="dark"] {
  --bg: #0a0a0a;
  --bg-elev: #121212;
  --fg: #f2f2f0;
  --fg-muted: #a5a5a2;
  --fg-subtle: #5a5a58;
  --line: rgba(242, 242, 240, 0.10);
  --line-strong: rgba(242, 242, 240, 0.22);
  --accent: #f2f2f0;
  --accent-fg: #0a0a0a;
  --grid-dot: rgba(242, 242, 240, 0.18);
  --grid-dot-glow: rgba(242, 242, 240, 0.95);
  --noise-opacity: 0.06;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0a0a0a;
    --bg-elev: #121212;
    --fg: #f2f2f0;
    --fg-muted: #a5a5a2;
    --fg-subtle: #5a5a58;
    --line: rgba(242, 242, 240, 0.10);
    --line-strong: rgba(242, 242, 240, 0.22);
    --accent: #f2f2f0;
    --accent-fg: #0a0a0a;
    --grid-dot: rgba(242, 242, 240, 0.18);
    --grid-dot-glow: rgba(242, 242, 240, 0.95);
    --noise-opacity: 0.06;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  overflow-x: hidden;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
}

/* Subtle film grain */
body::before {
  content: "";
  position: fixed;
  inset: -100%;
  pointer-events: none;
  z-index: 1;
  opacity: var(--noise-opacity);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.7 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
}
:root[data-theme="dark"] body::before {
  mix-blend-mode: screen;
}

#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background: var(--fg);
  color: var(--bg);
  z-index: 1000;
}

/* ------------------------------------ Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 24px clamp(20px, 4vw, 48px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  mix-blend-mode: normal;
}

.logo {
  display: inline-flex;
  text-decoration: none;
  color: inherit;
}
.logo img {
  width: 40px;
  height: 40px;
  display: block;
  border-radius: 6px;
  transition: transform 0.5s var(--ease), filter 0.35s var(--ease);
}
.logo:hover img {
  transform: rotate(-6deg) scale(1.04);
}
:root[data-theme="dark"] .logo img {
  filter: invert(1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .logo img {
    filter: invert(1);
  }
}

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

.mute-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
  color: var(--fg);
  cursor: pointer;
  place-items: center;
  position: relative;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.3s var(--ease), transform 0.2s var(--ease);
}
html.party .mute-toggle { display: grid; }
.mute-toggle:hover { border-color: var(--fg); transform: scale(1.05); }
.mute-toggle:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
.mute-toggle .icon-muted { display: none; }
.mute-toggle[aria-pressed="true"] .icon-sound { display: none; }
.mute-toggle[aria-pressed="true"] .icon-muted { display: block; }

.party-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
  cursor: pointer;
  display: grid;
  place-items: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.3s var(--ease), transform 0.2s var(--ease);
}
.party-toggle:hover {
  border-color: var(--fg);
  transform: scale(1.05) rotate(6deg);
}
.party-toggle:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}
.party-toggle svg {
  transition: transform 0.4s var(--ease);
}
html.party .party-toggle {
  border-color: #ffcc00;
  animation: partyPulse 0.6s steps(2) infinite;
}
html.party .party-toggle svg {
  transform: rotate(45deg);
}
@keyframes partyPulse {
  0%, 100% { box-shadow: 0 0 0 0 #ff3366; }
  50% { box-shadow: 0 0 0 4px #00d4ff; }
}

.lang-toggle {
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
  color: var(--fg-muted);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.3s var(--ease), transform 0.2s var(--ease);
}
.lang-toggle:hover {
  border-color: var(--fg);
  transform: scale(1.03);
}
.lang-toggle:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}
.lang-toggle .lang-sep {
  color: var(--fg-subtle);
  font-weight: 300;
}
html[lang="de"] .lang-toggle .lang-de {
  color: var(--fg);
}
html[lang="en"] .lang-toggle .lang-en {
  color: var(--fg);
}

/* Language visibility */
html[lang="de"] .t-en { display: none !important; }
html[lang="en"] .t-de { display: none !important; }

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
  color: var(--fg);
  cursor: pointer;
  display: grid;
  place-items: center;
  position: relative;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease), transform 0.2s var(--ease);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.theme-toggle:hover {
  border-color: var(--fg);
  transform: scale(1.05);
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}
.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  position: absolute;
  transition: opacity 0.35s var(--ease), transform 0.5s var(--ease);
}
.theme-toggle .icon-sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0.6);
}
.theme-toggle .icon-moon {
  opacity: 1;
  transform: rotate(0) scale(1);
}
:root[data-theme="dark"] .theme-toggle .icon-sun {
  opacity: 1;
  transform: rotate(0) scale(1);
}
:root[data-theme="dark"] .theme-toggle .icon-moon {
  opacity: 0;
  transform: rotate(90deg) scale(0.6);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle .icon-sun {
    opacity: 1;
    transform: rotate(0) scale(1);
  }
  :root:not([data-theme]) .theme-toggle .icon-moon {
    opacity: 0;
    transform: rotate(90deg) scale(0.6);
  }
}

/* ------------------------------------ Layout */
main {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

section {
  position: relative;
  padding: clamp(80px, 14vh, 160px) 0;
}

/* ------------------------------------ Hero */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 140px;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 32px;
}
.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fg);
  box-shadow: 0 0 0 0 var(--fg);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(10, 10, 10, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(10, 10, 10, 0); }
}
:root[data-theme="dark"] .eyebrow .dot {
  animation: pulseDark 2.4s ease-in-out infinite;
}
@keyframes pulseDark {
  0%, 100% { box-shadow: 0 0 0 0 rgba(242, 242, 240, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(242, 242, 240, 0); }
}

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(56px, 11vw, 168px);
  line-height: 0.92;
  letter-spacing: -0.03em;
  margin: 0 0 48px;
  color: var(--fg);
}
.display .line {
  display: block;
}
.display em {
  font-style: italic;
  color: var(--fg-muted);
}

.display-alt {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(48px, 9vw, 128px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0 0 32px;
  color: var(--fg);
}
.display-alt em {
  font-style: italic;
  color: var(--fg-muted);
}

.lede {
  font-family: var(--sans);
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.5;
  color: var(--fg-muted);
  max-width: 640px;
  margin: 0 0 48px;
  letter-spacing: -0.01em;
}
.lede strong {
  color: var(--fg);
  font-weight: 500;
}
.lede .highlight {
  color: var(--fg);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.08em;
}

.lede-center {
  font-family: var(--sans);
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--fg-muted);
  max-width: 560px;
  margin: 0 auto 48px;
  text-align: center;
  letter-spacing: -0.01em;
}

/* ------------------------------------ Button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 28px;
  background: var(--accent);
  color: var(--accent-fg);
  text-decoration: none;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.01em;
  border: 1px solid var(--accent);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  cursor: pointer;
  width: fit-content;
}
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bg);
  color: var(--fg);
  transform: translateY(101%);
  transition: transform 0.5s var(--ease);
  z-index: -1;
}
.btn-primary:hover {
  color: var(--fg);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(10, 10, 10, 0.18);
}
.btn-primary:hover::before {
  transform: translateY(0);
}
.btn-primary:hover svg {
  transform: translateX(4px);
}
.btn-primary svg {
  transition: transform 0.35s var(--ease);
}
.btn-primary:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 4px;
}

.btn-large {
  padding: 22px 36px;
  font-size: 16px;
}

/* ------------------------------------ About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 80px;
  align-items: start;
}
.about-body {
  max-width: 720px;
}
.about-body p {
  font-family: var(--sans);
  font-size: clamp(18px, 1.8vw, 24px);
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--fg);
  margin: 0 0 24px;
}
.about-body strong {
  font-weight: 500;
}

.portrait {
  margin: 0;
  position: relative;
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}
.portrait img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: grayscale(1) contrast(1.02);
  transition: filter 0.6s var(--ease);
}
.portrait:hover img {
  filter: grayscale(1) contrast(1.08) brightness(1.04);
}
.portrait figcaption {
  position: absolute;
  left: 14px;
  bottom: 14px;
  right: 14px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f2f2f0;
  display: flex;
  align-items: center;
  gap: 10px;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
  mix-blend-mode: difference;
}
.portrait figcaption::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  display: inline-block;
  flex-shrink: 0;
  opacity: 0.8;
}
.portrait figcaption em {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  letter-spacing: -0.01em;
  text-transform: none;
}



.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0 0 40px;
  color: var(--fg);
}
.section-title em {
  font-style: italic;
  color: var(--fg-muted);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 72px;
}
.section-index {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}

/* ------------------------------------ Expertise */
.expertise-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.expertise-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 80px;
  row-gap: 14px;
  align-items: start;
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
  cursor: default;
}
.expertise-list li:last-child {
  border-bottom: none;
}
.expertise-list .num {
  grid-column: 1 / -1;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-subtle);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.expertise-list h3 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(24px, 2.6vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--fg);
  margin: 0;
}
.expertise-list p {
  font-family: var(--sans);
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.55;
  color: var(--fg-muted);
  margin: 0;
  max-width: 560px;
}

/* ------------------------------------ CTA */
.cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.cta .display-alt {
  margin: 0 0 40px;
}
.cta .lede {
  max-width: 560px;
  margin: 0 0 40px;
}

/* ------------------------------------ Footer */
.site-footer {
  position: relative;
  z-index: 2;
  padding: 40px clamp(20px, 4vw, 48px);
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--fg-muted);
}
.copyright {
  margin: 0;
  font-family: var(--sans);
  letter-spacing: -0.005em;
}
.footer-nav {
  display: flex;
  gap: 28px;
}
.footer-nav a {
  color: var(--fg-muted);
  text-decoration: none;
  position: relative;
  padding: 4px 0;
  transition: color 0.3s var(--ease);
}
.footer-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--fg);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.footer-nav a:hover {
  color: var(--fg);
}
.footer-nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ------------------------------------ Legal pages */
.legal-page {
  position: relative;
  z-index: 2;
  max-width: 820px;
  margin: 0 auto;
  padding: 160px clamp(20px, 4vw, 48px) 80px;
}
.legal-page h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 6vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin: 0 0 48px;
}
.legal-page h2 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(22px, 2.2vw, 30px);
  margin: 48px 0 16px;
  letter-spacing: -0.015em;
}
.legal-page h3 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 17px;
  margin: 32px 0 8px;
  letter-spacing: -0.01em;
}
.legal-page p,
.legal-page li {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--fg-muted);
  margin: 0 0 16px;
}
.legal-page strong {
  color: var(--fg);
  font-weight: 500;
}
.legal-page a {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.3s var(--ease);
}
.legal-page a:hover {
  text-decoration-color: var(--fg);
}
.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 48px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.3s var(--ease);
}
.legal-back:hover {
  color: var(--fg);
}
.legal-back svg {
  transition: transform 0.3s var(--ease);
}
.legal-back:hover svg {
  transform: translateX(-4px);
}

/* ------------------------------------ Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ------------------------------------ Responsive */
@media (max-width: 960px) {
  .about-grid {
    grid-template-columns: 1fr 240px;
    gap: 48px;
  }
}

@media (max-width: 820px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .portrait {
    max-width: 280px;
  }
  .expertise-list li {
    grid-template-columns: 1fr;
    row-gap: 12px;
  }
  .hero {
    padding-top: 120px;
  }
  .section-head {
    gap: 10px;
    margin-bottom: 36px;
  }
}

@media (max-width: 560px) {
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ------------------------------------ Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
  #bg-canvas {
    display: none;
  }
}

::selection {
  background: var(--fg);
  color: var(--bg);
}

/* ==================================================================
   PARTY PIXEL MODE — Tetris Style
   Activated via html.party
================================================================== */

#party-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

html.party {
  --bg: #0a0014;
  --bg-elev: #140028;
  --fg: #ffffff;
  --fg-muted: #00d4ff;
  --fg-subtle: #ffcc00;
  --line: rgba(255, 255, 255, 0.20);
  --line-strong: rgba(255, 255, 255, 0.45);
  --accent: #ff3366;
  --accent-fg: #ffffff;
  --serif: "Press Start 2P", monospace;
  --sans: "VT323", "Press Start 2P", monospace;
  --radius: 0px;
}

html.party body {
  background: #0a0014;
  letter-spacing: 0;
}
html.party body::before { display: none; }
html.party #bg-canvas { display: none; }
html.party #party-canvas { display: block; }

/* Pixel-perfect rendering everywhere */
html.party * {
  image-rendering: pixelated;
  text-rendering: geometricPrecision;
}

html.party .logo img {
  border-radius: 0;
  image-rendering: pixelated;
  animation: partyLogo 1.6s steps(5) infinite;
}
@keyframes partyLogo {
  0%   { filter: invert(1) sepia(1) saturate(12) hue-rotate(300deg) drop-shadow(2px 2px 0 #0a0014); }
  20%  { filter: invert(1) sepia(1) saturate(12) hue-rotate(0deg)   drop-shadow(2px 2px 0 #0a0014); }
  40%  { filter: invert(1) sepia(1) saturate(12) hue-rotate(150deg) drop-shadow(2px 2px 0 #0a0014); }
  60%  { filter: invert(1) sepia(1) saturate(12) hue-rotate(60deg)  drop-shadow(2px 2px 0 #0a0014); }
  80%  { filter: invert(1) sepia(1) saturate(12) hue-rotate(220deg) drop-shadow(2px 2px 0 #0a0014); }
  100% { filter: invert(1) sepia(1) saturate(12) hue-rotate(300deg) drop-shadow(2px 2px 0 #0a0014); }
}

/* Typography → pixel */
html.party .display {
  font-family: "Press Start 2P", monospace;
  font-size: clamp(24px, 5vw, 72px);
  line-height: 1.25;
  letter-spacing: 0;
  color: #ffffff;
  text-shadow:
    3px 3px 0 #ff3366,
    6px 6px 0 #00d4ff;
  animation: partyHue 3s linear infinite;
}
html.party .display em {
  font-style: normal;
  color: #ffcc00;
}
@keyframes partyHue {
  0%   { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

html.party .display-alt {
  font-family: "Press Start 2P", monospace;
  font-size: clamp(20px, 4vw, 48px);
  line-height: 1.3;
  letter-spacing: 0;
  color: #ffffff;
  text-shadow: 3px 3px 0 #7ee600;
}
html.party .display-alt em {
  font-style: normal;
  color: #00d4ff;
}

html.party .section-title {
  font-family: "Press Start 2P", monospace;
  font-size: clamp(18px, 2.6vw, 28px);
  line-height: 1.35;
  letter-spacing: 0;
  color: #ffffff;
  text-shadow: 2px 2px 0 #ff3366;
}
html.party .section-title em {
  font-style: normal;
  color: #ffcc00;
}

html.party .eyebrow,
html.party .section-index {
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  letter-spacing: 0.02em;
  color: #00d4ff;
  text-shadow: 1px 1px 0 #0a0014;
}
html.party .eyebrow .dot {
  background: #ff3366;
  border-radius: 0;
  width: 8px;
  height: 8px;
  animation: partyBlink 0.4s steps(2) infinite;
}
@keyframes partyBlink {
  0%, 49%   { background: #ff3366; }
  50%, 100% { background: #ffcc00; }
}

html.party .lede,
html.party .about-body p,
html.party .expertise-list p {
  font-family: "VT323", monospace;
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.4;
  letter-spacing: 0;
  color: #ffffff;
}
html.party .lede strong,
html.party .about-body strong {
  color: #ffcc00;
  font-weight: 400;
}
html.party .lede .highlight {
  font-family: "Press Start 2P", monospace;
  font-size: 0.6em;
  color: #ff3366;
  font-style: normal;
}

html.party .expertise-list .num {
  font-family: "Press Start 2P", monospace;
  color: #7ee600;
  font-size: 10px;
  letter-spacing: 0.02em;
}
html.party .expertise-list h3 {
  font-family: "Press Start 2P", monospace;
  font-style: normal;
  font-size: clamp(14px, 1.6vw, 18px);
  line-height: 1.4;
  letter-spacing: 0;
  color: #00d4ff;
  text-shadow: 2px 2px 0 #0a0014;
}
html.party .expertise-list li {
  border-bottom: 2px dashed rgba(255, 255, 255, 0.15);
}
html.party .expertise-list li:last-child {
  border-bottom: none;
}

/* Button → chunky 8-bit */
html.party .btn-primary {
  font-family: "Press Start 2P", monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 16px 22px;
  border-radius: 0;
  background: #ffcc00;
  color: #0a0014;
  border: 3px solid #0a0014;
  box-shadow: 6px 6px 0 #ff3366;
  transition: transform 0.12s steps(1), box-shadow 0.12s steps(1), background 0.12s steps(1);
}
html.party .btn-primary::before { display: none; }
html.party .btn-primary:hover {
  transform: translate(3px, 3px);
  box-shadow: 3px 3px 0 #ff3366;
  background: #00d4ff;
  color: #0a0014;
}
html.party .btn-primary:active {
  transform: translate(6px, 6px);
  box-shadow: 0 0 0 #ff3366;
}
html.party .btn-large {
  font-size: 14px;
  padding: 20px 28px;
}

/* Controls → chunky */
html.party .lang-toggle,
html.party .theme-toggle {
  border-radius: 0;
  border: 2px solid #ffffff;
  background: #0a0014;
  color: #ffffff;
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  box-shadow: 3px 3px 0 #ff3366;
}
html.party .theme-toggle {
  width: 40px;
  height: 40px;
}
html.party .party-toggle {
  border-radius: 0;
  background: #ffffff;
  border: 2px solid #0a0014;
  box-shadow: 3px 3px 0 #ffcc00;
}
html.party .mute-toggle {
  border-radius: 0;
  border: 2px solid #ffffff;
  background: #0a0014;
  color: #ffffff;
  box-shadow: 3px 3px 0 #7ee600;
}

/* Portrait → pixelated canvas */
.portrait-pixel {
  display: none;
  width: 100%;
  aspect-ratio: 4 / 5;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
html.party .portrait img { display: none; }
html.party .portrait .portrait-pixel {
  display: block;
  filter: saturate(1.4) contrast(1.15);
  border: 3px solid #ffffff;
  box-shadow: 8px 8px 0 #ff3366, 16px 16px 0 #00d4ff;
  animation: partyFrame 4s steps(4) infinite;
}
@keyframes partyFrame {
  0%   { border-color: #ffffff; box-shadow: 8px 8px 0 #ff3366, 16px 16px 0 #00d4ff; }
  25%  { border-color: #ffcc00; box-shadow: 8px 8px 0 #00d4ff, 16px 16px 0 #7ee600; }
  50%  { border-color: #00d4ff; box-shadow: 8px 8px 0 #7ee600, 16px 16px 0 #ff3366; }
  75%  { border-color: #7ee600; box-shadow: 8px 8px 0 #ffcc00, 16px 16px 0 #ff3366; }
  100% { border-color: #ffffff; box-shadow: 8px 8px 0 #ff3366, 16px 16px 0 #00d4ff; }
}

/* Footer */
html.party .site-footer,
html.party .footer-inner {
  color: #ffffff;
  font-family: "VT323", monospace;
  font-size: 18px;
}
html.party .footer-nav a {
  color: #00d4ff;
  font-family: "VT323", monospace;
  font-size: 18px;
}
html.party .footer-nav a:hover {
  color: #ffcc00;
}

/* Legal pages in party mode */
html.party .legal-page h1,
html.party .legal-page h2,
html.party .legal-page h3 {
  font-family: "Press Start 2P", monospace;
  font-style: normal;
  line-height: 1.4;
  letter-spacing: 0;
  color: #ffffff;
  text-shadow: 2px 2px 0 #ff3366;
}
html.party .legal-page h1 { font-size: clamp(20px, 3vw, 32px); text-shadow: 3px 3px 0 #00d4ff; }
html.party .legal-page h2 { font-size: 14px; color: #ffcc00; }
html.party .legal-page h3 { font-size: 11px; color: #00d4ff; }
html.party .legal-page p,
html.party .legal-page li {
  font-family: "VT323", monospace;
  font-size: 20px;
  line-height: 1.4;
  color: #ffffff;
}
html.party .legal-page strong { color: #ffcc00; font-weight: 400; }
html.party .legal-page a { color: #00d4ff; }

html.party ::selection {
  background: #ffcc00;
  color: #0a0014;
}

