/* ────────────────────────────────────────────────────────────────
 * devandart — stylesheet
 *
 * Self-hosted fonts expected at:
 *   fonts/Fraunces-VariableFont.woff2
 *   fonts/Fraunces-Italic-VariableFont.woff2
 *   fonts/InstrumentSans-VariableFont.woff2
 *   fonts/InstrumentSans-Italic-VariableFont.woff2
 *   fonts/JetBrainsMono-VariableFont.woff2
 *
 * If files are missing, the system fallback kicks in automatically.
 *
 * Free downloads (all SIL OFL):
 *   Fraunces:        https://fonts.google.com/specimen/Fraunces
 *   Instrument Sans: https://fonts.google.com/specimen/Instrument+Sans
 *   JetBrains Mono:  https://www.jetbrains.com/lp/mono/
 *
 * IMPORTANT (GDPR): host font files locally — never embed via
 * fonts.googleapis.com.
 * ──────────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Fraunces';
  src: url('../fonts/Fraunces-VariableFont.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('../fonts/Fraunces-Italic-VariableFont.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Sans';
  src: url('../fonts/InstrumentSans-VariableFont.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Sans';
  src: url('../fonts/InstrumentSans-Italic-VariableFont.woff2') format('woff2');
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/JetBrainsMono-VariableFont.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ── tokens ───────────────────────────────────────── */
:root {
  --bg:         #0F1417;
  --bg-elev:    #161B1E;
  --fg:         #E4E8E9;
  --fg-muted:   #98A0A3;
  --fg-dim:     #5D666A;
  --accent:     #3FCFAE;
  --accent-soft: rgba(63, 207, 174, 0.18);
  --line:        rgba(228, 232, 233, 0.10);
  --line-strong: rgba(228, 232, 233, 0.22);

  --font-display: 'Fraunces', 'Bodoni 72', 'Didot', 'Times New Roman', serif;
  --font-body:    'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  --gutter:    clamp(1.25rem, 4vw, 3rem);
  --max-width: 1440px;

  --ease:     cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── reset ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  /* Background lives on the separate .hero-bg element (see below)
   * so JS can animate a real parallax offset. The html base color
   * (var(--bg)) shows through wherever the hero layer is
   * transparent. */
  background-color: transparent;
}

/* ── hero parallax background ─────────────────────────
 * Dedicated element (not body background) so we can transform
 * the image independently of the content (see js/app.js →
 * setupParallax). Swap the image at img/hero-bg.jpg (same name).
 *   .hero-bg is 130vh tall so up to 30vh of extra image can be
 *   revealed during drift — its bottom edge always stays outside
 *   the viewport. */
.hero-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 130vh;
  z-index: -1;
  pointer-events: none;
  background-color: var(--bg);
  background-image:
    /* Readability gradient — bright at the top, near-black at the
     * bottom, so headline and body text have clear contrast against
     * the image. Tune the rgba alphas top → bottom to taste.        */
    linear-gradient(
      180deg,
      rgba(15, 20, 23, 0.45)  0%,
      rgba(15, 20, 23, 0.78) 50%,
      rgba(15, 20, 23, 0.94) 100%
    ),
    url('../img/hero-bg.jpg'),
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(63, 207, 174, 0.10), transparent 60%);
  background-size: cover, cover, auto;
  background-position: center, center, top;
  background-repeat: no-repeat;
  transform: translate3d(0, var(--parallax-y, 0), 0);
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg { transform: none !important; }
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--accent); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--fg);
  color: var(--bg);
  padding: 0.5rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  z-index: 1000;
}
.skip-link:focus { top: 1rem; }

/* ── grain overlay ────────────────────────────────── */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.6 0'/></filter><rect width='240' height='240' filter='url(%23n)'/></svg>");
}

/* ── header ───────────────────────────────────────── */
.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem var(--gutter);
  max-width: var(--max-width);
  margin-inline: auto;
  position: sticky;
  top: 0;
  z-index: 10;
  isolation: isolate;
}

/* Frosted-glass background — only visible once scrolled (the
 * .is-scrolled class is set in js/app.js). The ::before reaches
 * past the max-width to the viewport edge so the bar looks
 * continuous. */
.site-header::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left:  calc((100vw - 100%) / -2);
  right: calc((100vw - 100%) / -2);
  z-index: -1;
  pointer-events: none;
  background-color: transparent;
  border-bottom: 1px solid transparent;
  -webkit-backdrop-filter: blur(0) saturate(100%);
          backdrop-filter: blur(0) saturate(100%);
  transition:
    background-color 350ms var(--ease),
    border-color     350ms var(--ease),
    -webkit-backdrop-filter 350ms var(--ease),
            backdrop-filter 350ms var(--ease);
}
.site-header.is-scrolled::before {
  background-color: rgba(15, 20, 23, 0.62);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
          backdrop-filter: blur(16px) saturate(140%);
}

.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: baseline;
  gap: 0.6em;
  font-variation-settings: 'opsz' 14, 'SOFT' 50;
}
.brand small {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--fg-dim);
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.nav a {
  position: relative;
  color: var(--fg-muted);
  transition: color 300ms var(--ease);
  padding-block: 0.25em;
}
.nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 450ms var(--ease-out);
}
.nav a:hover { color: var(--fg); }
.nav a:hover::after { transform: scaleX(1); transform-origin: left center; }

.header-right {
  display: flex;
  align-items: baseline;
  gap: 1.75rem;
}

/* ── language toggle ──────────────────────────────── */
.lang-toggle {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
}
.lang-btn {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: 0;
  padding: 0.25em 0;
  margin: 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: uppercase;
  color: var(--fg-dim);
  cursor: pointer;
  transition: color 300ms var(--ease);
}
.lang-btn:hover                  { color: var(--fg); }
.lang-btn[aria-pressed="true"]   { color: var(--fg); }
.lang-sep                        { color: var(--fg-dim); user-select: none; }

@media (max-width: 640px) {
  .site-header { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
  .nav { gap: 1.1rem; flex-wrap: wrap; }
  .header-right { flex-direction: column; align-items: flex-start; gap: 1rem; width: 100%; }
}

/* ── main / sections ──────────────────────────────── */
main > section {
  max-width: var(--max-width);
  margin-inline: auto;
  padding: clamp(4rem, 10vw, 7rem) var(--gutter);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin: 0 0 clamp(2rem, 4vw, 3rem);
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

/* ── hero ─────────────────────────────────────────── */
.hero {
  padding-block: clamp(3rem, 12vh, 8rem) clamp(5rem, 16vh, 11rem) !important;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  margin: 0 0 clamp(2rem, 5vw, 3.5rem);
  animation: fade-up 800ms var(--ease-out) 100ms backwards;
}
.dot {
  width: 0.55em;
  height: 0.55em;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  position: relative;
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 var(--accent-soft); }
  70%  { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.hero-title {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: clamp(2.25rem, 8vw, 7.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0;
}
.hero-title em {
  font-style: normal;
  font-weight: 400;
  color: var(--accent);
}

.hero-meta {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--fg-muted);
  max-width: 32ch;
  line-height: 1.7;
}

/* reveal mask animation */
.reveal {
  display: block;
  overflow: hidden;
  padding-bottom: 0.15em;
}
.reveal > span {
  display: block;
  transform: translateY(110%);
  animation: reveal 1100ms var(--ease-out) forwards;
}
.hero-title .reveal:nth-of-type(1) > span { animation-delay: 280ms; }
.hero-title .reveal:nth-of-type(2) > span { animation-delay: 420ms; }
.hero-title .reveal:nth-of-type(3) > span { animation-delay: 560ms; }
.hero-meta.reveal > span { animation-delay: 800ms; }

@keyframes reveal { to { transform: translateY(0); } }
@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── about ────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
@media (max-width: 720px) {
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .portrait   { max-width: 360px; }
}

.about-body {
  max-width: 70ch;
}

/* ── portrait ─────────────────────────────────────── */
/* "Coder-style" image card: filename as a code comment on top,
 * a faint line-number gutter on the left (generated via ::before,
 * so purely decorative and not in the DOM), and a tag footer at
 * the bottom. The image is slightly desaturated by default and
 * returns to full color on hover. */
.portrait {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: sticky;
  top: 2rem;
}

.portrait-meta,
.portrait-tags {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--fg-dim);
  text-transform: lowercase;
  margin: 0;
}

.portrait-comment { color: var(--fg-dim); }
.portrait-file    { color: var(--accent); }
.portrait-dot     { color: var(--fg-dim); user-select: none; }

.portrait-frame {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(228, 232, 233, 0.02);
  padding: 0.6rem 0.6rem 0.6rem 2.4rem;
  overflow: hidden;
  transition: border-color 500ms var(--ease);
}
.portrait-frame:hover { border-color: var(--line-strong); }

/* Line-number gutter on the left (purely decorative).
 * \A produces line breaks inside the content string. */
.portrait-frame::before {
  content: "01\A 02\A 03\A 04\A 05\A 06\A 07\A 08\A 09\A 10\A 11\A 12\A 13\A 14\A 15\A 16";
  white-space: pre;
  position: absolute;
  top: 0.6rem;
  bottom: 0.6rem;
  left: 0.55rem;
  width: 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: var(--fg-dim);
  opacity: 0.45;
  text-align: right;
  pointer-events: none;
  user-select: none;
}

.portrait-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1px;
  filter: grayscale(0.85) contrast(1.05) brightness(0.92);
  transition: filter 700ms var(--ease-out);
}
.portrait-frame:hover img {
  filter: grayscale(0) contrast(1) brightness(1);
}

@media (prefers-reduced-motion: reduce) {
  .portrait-frame img { transition: none; }
}

.about-body .lede {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.8vw, 2.5rem);
  font-weight: 360;
  line-height: 1.28;
  letter-spacing: -0.018em;
  font-variation-settings: 'opsz' 36, 'SOFT' 60;
  color: var(--fg);
  margin: 0 0 1.75rem;
  max-width: 26ch;
}
.about-body .lede em {
  font-style: normal;
  color: var(--accent);
}

.about-body p {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--fg-muted);
  margin: 0 0 1.25rem;
  max-width: 56ch;
}

.about-body .signature {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-top: 3rem;
}

/* ── projects ─────────────────────────────────────── */
.projects {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.project {
  display: grid;
  grid-template-columns: 7rem 1fr 12rem;
  grid-template-areas:
    "no    title type"
    ".     desc  desc"
    ".     tags  tags";
  gap: 0.5rem 2rem;
  padding: clamp(1.75rem, 3.2vw, 2.5rem) 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
  position: relative;
  transition: border-color 400ms var(--ease);
}
.project::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 700ms var(--ease-out);
}
.project:hover::before {
  transform: scaleX(1);
  transform-origin: left center;
}

.project-no {
  grid-area: no;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  color: var(--fg-dim);
  white-space: nowrap;
}

.project-heading {
  grid-area: title;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 380;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variation-settings: 'opsz' 36;
}
.project-title {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35em;
  transition: color 400ms var(--ease);
}
.project-title .arrow {
  font-size: 0.6em;
  display: inline-block;
  transition: transform 400ms var(--ease-out), color 400ms var(--ease);
  color: var(--fg-dim);
}
.project:hover .project-title { color: var(--accent); }
.project:hover .project-title .arrow {
  transform: translate(4px, -4px);
  color: var(--accent);
}

.project-type {
  grid-area: type;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg-muted);
  text-align: right;
}

.project-desc {
  grid-area: desc;
  margin: 0.5rem 0 0;
  color: var(--fg-muted);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 60ch;
}

.project-tags {
  grid-area: tags;
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.project-tags li {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg-dim);
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}

@media (max-width: 720px) {
  .project {
    grid-template-columns: 1fr;
    grid-template-areas:
      "no"
      "title"
      "type"
      "desc"
      "tags";
    gap: 0.4rem;
  }
  .project-type { text-align: left; }
}

/* ── stack / marquee ──────────────────────────────── */
.marquee {
  margin-inline: calc(var(--gutter) * -1);
  margin-top: 1rem;
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding-block: clamp(1.5rem, 3vw, 2.5rem);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}
.marquee-track {
  display: inline-flex;
  gap: 1.75rem;
  white-space: nowrap;
  width: max-content;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5.5vw, 4.5rem);
  font-weight: 360;
  font-style: italic;
  letter-spacing: -0.02em;
  color: var(--fg);
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
  animation: marquee 42s linear infinite;
}
.marquee-track span:nth-child(even) {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.45em;
  color: var(--accent);
  align-self: center;
  letter-spacing: 0;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

.stack-note {
  margin: 2.5rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--fg-dim);
  max-width: 50ch;
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* ── contact ──────────────────────────────────────── */
.contact-title {
  font-family: var(--font-mono);
  font-size: clamp(2.25rem, 7vw, 5.75rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0 0 2rem;
}
.contact-title em {
  font-style: normal;
  color: var(--accent);
}
.contact-body {
  max-width: 50ch;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--fg-muted);
  margin: 0 0 3rem;
}
.contact-link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5em;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.8vw, 2.25rem);
  font-weight: 380;
  letter-spacing: -0.02em;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 0.2em;
  transition: color 300ms var(--ease), border-color 300ms var(--ease);
  font-variation-settings: 'opsz' 72;
}
.contact-link .arrow {
  font-size: 0.65em;
  display: inline-block;
  transition: transform 400ms var(--ease-out);
}
.contact-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.contact-link:hover .arrow {
  transform: translate(5px, -5px);
}

/* ── footer ───────────────────────────────────────── */
.site-footer {
  max-width: var(--max-width);
  margin: 4rem auto 0;
  padding: 2.5rem var(--gutter) 3rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.footer-brand {
  font-family: var(--font-display);
  text-transform: none;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  color: var(--fg);
  margin: 0;
}
.footer-nav {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}
.footer-nav a { transition: color 300ms var(--ease); }
.footer-nav a:hover,
.footer-nav a[aria-current="page"] { color: var(--fg); }
.copy { margin: 0; text-align: right; }

@media (max-width: 640px) {
  .site-footer {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-nav, .copy { text-align: center; justify-content: center; }
}

/* ── scroll reveal ────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out);
}
.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* projects fade slightly slower as they enter */
.project.fade-in {
  transition-duration: 700ms;
}

@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1; transform: none; transition: none; }
  .reveal > span { transform: none; animation: none; }
  .kicker { animation: none; opacity: 1; transform: none; }
  .dot { animation: none; }
}

/* ── legal pages ──────────────────────────────────── */
.legal {
  max-width: 70ch;
  margin: 0 auto;
  padding-block: clamp(3rem, 8vw, 6rem);
}
.legal h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 360;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 3rem;
  font-variation-settings: 'opsz' 144, 'SOFT' 60;
}
.legal h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 2.75rem 0 0.75rem;
  color: var(--fg);
  font-variation-settings: 'opsz' 24;
}
.legal p,
.legal ul {
  color: var(--fg-muted);
  font-size: 1rem;
  line-height: 1.7;
  margin: 0 0 1rem;
}
.legal a {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
  transition: text-decoration-color 300ms var(--ease), color 300ms var(--ease);
}
.legal a:hover {
  text-decoration-color: var(--accent);
  color: var(--accent);
}
.legal ul {
  padding-inline-start: 1.4rem;
}
.legal ul li { margin-bottom: 0.4rem; }
.legal-note {
  margin-top: 4rem;
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 0.92rem;
  color: var(--fg-dim);
  font-style: italic;
  background: rgba(244, 239, 230, 0.02);
}

/* Notice for English-speaking visitors: legal-page content stays
 * German (GDPR practice). Only shown when html[lang="en"]. */
.legal-lang-note {
  display: none;
  margin: 0 0 2.5rem;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--fg-dim);
}
html[lang="en"] .legal-lang-note { display: block; }

/* ── print ────────────────────────────────────────── */
@media print {
  .grain, .nav, .marquee, .site-footer, .skip-link { display: none; }
  body { background: white; color: black; }
  a { color: black; text-decoration: underline; }
  .hero-title em, .contact-title em, .lede em { color: black; }
}
