/* ==========================================================================
   Jonas Primbs – Stylesheet
   ========================================================================== */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */

:root {
  color-scheme: dark;

  --bg: #07080f;
  --bg-elevated: #0d0f1a;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-strong: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eceef6;
  --text-muted: #9ba1b8;
  --text-faint: #6b7189;

  /* Akzentfarben, abgeleitet vom Logo-Orange #e64a19 */
  --primary: #ff6a2b;
  --secondary: #ffb340;
  --tertiary: #38bdf8;
  --on-primary: #fff;
  --gradient: linear-gradient(120deg, var(--primary) 0%, var(--secondary) 100%);
  --gradient-button: linear-gradient(120deg, #e64a19 0%, #ff7a2f 100%);

  --blob-1: rgba(255, 106, 43, 0.32);
  --blob-2: rgba(56, 189, 248, 0.16);
  --blob-3: rgba(255, 179, 64, 0.16);
  --grid-dot: rgba(255, 255, 255, 0.06);
  --glow: 0 0 0 1px var(--border), 0 20px 60px -20px rgba(255, 106, 43, 0.4);
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 20px;
  --radius-sm: 12px;
  --container: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 72px;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f6f6fb;
    --bg-elevated: #ffffff;
    --surface: rgba(255, 255, 255, 0.7);
    --surface-strong: rgba(255, 255, 255, 0.92);
    --border: rgba(16, 18, 40, 0.09);
    --border-strong: rgba(16, 18, 40, 0.18);
    --text: #0c0e1d;
    --text-muted: #4d5370;
    --text-faint: #7a809a;
    --primary: #e64a19;
    --secondary: #d97706;
    --tertiary: #0284c7;
    --blob-1: rgba(255, 106, 43, 0.2);
    --blob-2: rgba(56, 189, 248, 0.14);
    --blob-3: rgba(255, 179, 64, 0.16);
    --grid-dot: rgba(16, 18, 40, 0.07);
    --glow: 0 0 0 1px var(--border), 0 20px 50px -24px rgba(230, 74, 25, 0.3);
    --shadow: 0 30px 70px -35px rgba(30, 20, 80, 0.35);
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f6fb;
  --bg-elevated: #ffffff;
  --surface: rgba(255, 255, 255, 0.7);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --border: rgba(16, 18, 40, 0.09);
  --border-strong: rgba(16, 18, 40, 0.18);
  --text: #0c0e1d;
  --text-muted: #4d5370;
  --text-faint: #7a809a;
  --primary: #e64a19;
  --secondary: #d97706;
  --tertiary: #0284c7;
  --blob-1: rgba(255, 106, 43, 0.2);
  --blob-2: rgba(56, 189, 248, 0.14);
  --blob-3: rgba(255, 179, 64, 0.16);
  --grid-dot: rgba(16, 18, 40, 0.07);
  --glow: 0 0 0 1px var(--border), 0 20px 50px -24px rgba(230, 74, 25, 0.3);
  --shadow: 0 30px 70px -35px rgba(30, 20, 80, 0.35);
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  transition: background-color 0.4s ease, color 0.4s ease;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 700;
}

p {
  margin: 0;
}

::selection {
  background: var(--primary);
  color: var(--on-primary);
}

:focus-visible {
  outline: 2px solid var(--tertiary);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
}

.skip-link:focus {
  top: 16px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Background ---------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 100%);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
}

.blob--1 {
  width: 560px;
  height: 560px;
  top: -180px;
  left: -120px;
  background: var(--blob-1);
  animation: drift-1 22s ease-in-out infinite alternate;
}

.blob--2 {
  width: 480px;
  height: 480px;
  top: 10%;
  right: -160px;
  background: var(--blob-2);
  animation: drift-2 26s ease-in-out infinite alternate;
}

.blob--3 {
  width: 420px;
  height: 420px;
  top: 55%;
  left: 30%;
  background: var(--blob-3);
  animation: drift-3 30s ease-in-out infinite alternate;
}

@keyframes drift-1 {
  to { transform: translate(140px, 120px) scale(1.15); }
}

@keyframes drift-2 {
  to { transform: translate(-160px, 160px) scale(0.9); }
}

@keyframes drift-3 {
  to { transform: translate(-120px, -140px) scale(1.2); }
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  transition: background-color 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom-color: var(--border);
}

.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.brand__logo {
  height: clamp(38px, 4vw, 46px);
  width: auto;
  overflow: visible;
}

.logo__name { fill: var(--text); }
.logo__sub { fill: var(--text-muted); }

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__links a {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav__links a:hover {
  color: var(--text);
  background: var(--surface-strong);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.icon-button:hover {
  border-color: var(--border-strong);
  background: var(--surface-strong);
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="dark"]) .theme-toggle .icon-moon { display: none; }
}

.nav-toggle {
  display: none;
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-grid;
  }

  .nav__links {
    position: absolute;
    top: calc(var(--header-h) - 4px);
    left: var(--gutter);
    right: var(--gutter);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }

  .nav__links a {
    padding: 12px 14px;
    border-radius: 8px;
  }

  .nav.is-open .nav__links {
    opacity: 1;
    transform: none;
    pointer-events: auto;
    visibility: visible;
  }
}

/* ---------- Buttons ---------- */

.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.25s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  border-color: var(--text-faint);
  background: var(--surface-strong);
}

.button svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.button--primary {
  border: 0;
  background: var(--gradient-button);
  background-size: 160% 100%;
  color: var(--on-primary);
  box-shadow: 0 10px 30px -10px rgba(230, 74, 25, 0.7);
  transition: transform 0.2s ease, box-shadow 0.25s ease, background-position 0.5s ease;
}

.button--primary:hover {
  background: var(--gradient-button);
  background-size: 160% 100%;
  background-position: 100% 0;
  box-shadow: 0 16px 40px -12px rgba(255, 122, 47, 0.6);
}

.button .arrow {
  transition: transform 0.2s ease;
}

.button:hover .arrow {
  transform: translateX(3px);
}

/* ---------- Sections ---------- */

.section {
  position: relative;
  padding-block: clamp(80px, 11vw, 140px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--gradient);
}

.section__head {
  max-width: 720px;
  margin-bottom: clamp(40px, 6vw, 64px);
}

.section__title {
  font-size: clamp(2rem, 4.6vw, 3.25rem);
}

.section__lead {
  margin-top: 20px;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--text-muted);
}

/* ---------- Hero ---------- */

.hero {
  padding-block: clamp(48px, 8vw, 96px) clamp(64px, 9vw, 120px);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(40px, 6vw, 80px);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 10px;
  margin-bottom: 28px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.status-pill__dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
}

.status-pill__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #34d399;
  animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
  75%, 100% { transform: scale(2.6); opacity: 0; }
}

.hero__title {
  font-size: clamp(2.6rem, 7vw, 5.25rem);
  font-weight: 750;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.hero__lead {
  margin-top: 28px;
  max-width: 580px;
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  color: var(--text-muted);
}

.hero__lead strong {
  color: var(--text);
  font-weight: 600;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 40px;
}

.portrait {
  position: relative;
  justify-self: center;
  width: min(100%, 400px);
  aspect-ratio: 1;
}

.portrait__ring {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--primary), var(--secondary), var(--primary));
  animation: spin 14s linear infinite;
  filter: blur(0.5px);
}

.portrait__ring::before {
  content: "";
  position: absolute;
  inset: -30px;
  border-radius: 50%;
  background: inherit;
  filter: blur(50px);
  opacity: 0.55;
}

.portrait__ring::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--bg);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.portrait__img {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--bg-elevated) 75%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  animation: float 6s ease-in-out infinite;
}

.chip svg {
  width: 16px;
  height: 16px;
}

.chip--ai { top: 6%; left: -10%; color: var(--primary); }
.chip--id { top: 60%; right: -14%; color: var(--secondary); animation-delay: -2s; }
.chip--web { bottom: 4%; left: -2%; color: var(--tertiary); animation-delay: -4s; }

.chip span {
  color: var(--text);
}

@keyframes float {
  50% { transform: translateY(-10px); }
}

/* ---------- Marquee ---------- */

.marquee {
  position: relative;
  overflow: hidden;
  padding-block: 22px;
  border-block: 1px solid var(--border);
  background: var(--surface);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee__track {
  display: flex;
  width: max-content;
  gap: 48px;
  margin: 0;
  padding: 0;
  list-style: none;
  animation: marquee 40s linear infinite;
}

.marquee__track li {
  display: inline-flex;
  align-items: center;
  gap: 48px;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.marquee__track li::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gradient);
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ---------- Cards ---------- */

.card {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  isolation: isolate;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, -20%), color-mix(in srgb, var(--primary) 16%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, -20%), var(--primary), var(--secondary) 40%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.card:hover::before,
.card:hover::after {
  opacity: 1;
}

/* ---------- Services ---------- */

.services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.service {
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 3vw, 36px);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.service:hover {
  transform: translateY(-6px);
  box-shadow: var(--glow);
}

.service__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 32px;
}

.service__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, transparent), color-mix(in srgb, var(--accent) 6%, transparent));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  color: var(--accent);
}

.service__icon svg {
  width: 26px;
  height: 26px;
}

.service__num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-faint);
}

.service--ai { --accent: var(--primary); }
.service--id { --accent: var(--secondary); }
.service--web { --accent: var(--tertiary); }

.service__title {
  font-size: 1.45rem;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.service__text {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 1rem;
}

.service__list {
  display: grid;
  gap: 10px;
  margin: 28px 0 0;
  padding: 24px 0 0;
  border-top: 1px solid var(--border);
  list-style: none;
  font-size: 0.95rem;
}

.service__list li {
  display: flex;
  gap: 12px;
  align-items: baseline;
}

.service__list li::before {
  content: "";
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--accent);
  transform: translateY(-2px) rotate(45deg);
}

/* ---------- About ---------- */

.about {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}

.about__text p + p {
  margin-top: 18px;
}

.about__text p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.about__text strong {
  color: var(--text);
  font-weight: 600;
}

.stack {
  margin-top: 40px;
}

.stack__label {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.tags li:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.timeline {
  position: relative;
  margin: 0;
  padding: 32px;
  list-style: none;
}

.timeline__item {
  position: relative;
  padding-left: 32px;
  padding-bottom: 28px;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 12px;
  bottom: -12px;
  width: 1px;
  background: linear-gradient(var(--border-strong), var(--border));
}

.timeline__item:last-child::before {
  display: none;
}

.timeline__item::after {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--text-faint);
  background: var(--bg);
}

.timeline__item--now::after {
  border: 0;
  background: var(--gradient);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 25%, transparent), 0 0 18px var(--primary);
}

.timeline__date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
}

.timeline__title {
  margin-top: 2px;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.timeline__meta {
  font-size: 0.93rem;
  color: var(--text-muted);
}

/* ---------- Research ---------- */

.research {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
  padding: clamp(32px, 5vw, 56px);
}

.research__text p {
  color: var(--text-muted);
}

.research__text p + p {
  margin-top: 16px;
}

.research__title {
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  margin-bottom: 20px;
}

.research__actions {
  display: grid;
  gap: 12px;
}

.link-tile {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.link-tile:hover {
  border-color: var(--border-strong);
  background: var(--surface-strong);
  transform: translateX(4px);
}

.link-tile__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
}

.link-tile__icon svg {
  width: 22px;
  height: 22px;
}

.link-tile__body {
  flex: 1;
  min-width: 0;
}

.link-tile__title {
  display: block;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.link-tile__meta {
  display: block;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.link-tile__arrow {
  width: 18px;
  height: 18px;
  color: var(--text-faint);
  flex-shrink: 0;
}

/* ---------- Contact ---------- */

.contact {
  position: relative;
  padding: clamp(40px, 7vw, 88px) clamp(24px, 6vw, 72px);
  text-align: center;
}

.contact::before {
  opacity: 1;
  background:
    radial-gradient(600px circle at 15% 0%, color-mix(in srgb, var(--primary) 22%, transparent), transparent 60%),
    radial-gradient(600px circle at 85% 100%, color-mix(in srgb, var(--tertiary) 18%, transparent), transparent 60%);
}

.contact .eyebrow {
  justify-content: center;
}

.contact__title {
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  letter-spacing: -0.04em;
}

.contact__lead {
  max-width: 560px;
  margin: 20px auto 0;
  color: var(--text-muted);
  font-size: 1.15rem;
}

.contact__mail {
  display: inline-block;
  margin-top: 36px;
  font-size: clamp(1.25rem, 4vw, 2.25rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  word-break: break-word;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 100% 2px;
  position: relative;
}

.contact__mail::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  background: var(--gradient);
  transform: scaleX(0.2);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.contact__mail:hover::after {
  transform: scaleX(1);
}

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 40px;
}

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 40px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.92rem;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__links a:hover {
  color: var(--text);
}

.socials {
  display: flex;
  gap: 8px;
}

/* ---------- Legal pages ---------- */

.legal {
  padding-block: clamp(48px, 8vw, 96px) clamp(80px, 10vw, 120px);
}

.legal__inner {
  max-width: 760px;
  margin-inline: auto;
}

.legal__title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  letter-spacing: -0.045em;
}

.legal__intro {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.legal__body {
  margin-top: 48px;
}

.legal__body section {
  padding: 28px 0;
  border-top: 1px solid var(--border);
}

.legal__body h2 {
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.legal__body h3 {
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  margin: 20px 0 8px;
}

.legal__body p,
.legal__body li {
  color: var(--text-muted);
}

.legal__body p + p {
  margin-top: 12px;
}

.legal__body ul {
  margin: 12px 0 0;
  padding-left: 1.2em;
}

.legal__body ul + p {
  margin-top: 12px;
}

.legal__body li + li {
  margin-top: 6px;
}

.legal__body a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--primary);
  text-underline-offset: 3px;
}

.legal__body a:hover {
  text-decoration-color: var(--tertiary);
}

.legal__card {
  padding: 28px;
  margin-top: 8px;
}

.legal__card address {
  font-style: normal;
  color: var(--text);
  line-height: 1.8;
}

.legal__card dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 20px;
  margin: 16px 0 0;
}

.legal__card dt {
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding-top: 2px;
}

.legal__card dd {
  margin: 0;
}

.back-link {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.back-link:hover {
  color: var(--text);
}

.back-link svg {
  width: 16px;
  height: 16px;
}

/* ---------- Reveal ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--delay, 0s);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .services {
    grid-template-columns: 1fr;
  }

  .about,
  .research {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }

  .portrait {
    order: -1;
    width: min(72vw, 320px);
    margin-top: 16px;
  }

  .chip--ai { left: -18%; }
  .chip--id { right: -20%; }
}

@media (max-width: 480px) {
  body {
    font-size: 1rem;
  }

  .chip {
    font-size: 0.72rem;
    padding: 7px 11px;
  }

  .chip--ai { left: -8%; top: 0; }
  .chip--id { right: -10%; }
  .chip--web { left: 0; bottom: 0; }

  .hero__actions .button {
    flex: 1 1 100%;
  }

  .timeline {
    padding: 24px;
  }

  .legal__card dl {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .legal__card dd + dt {
    margin-top: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
