:root {
  --font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
  --font-serif: 'Instrument Serif', Georgia, serif;

  --radius-lg: 14px;
  --radius: 10px;
  --radius-sm: 6px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 72px;
}

:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #13110f;
  --bg-elev: #1c1916;
  --surface: rgba(237, 222, 200, .035);
  --surface-2: rgba(237, 222, 200, .065);
  --border: rgba(237, 222, 200, .09);
  --border-strong: rgba(237, 222, 200, .18);
  --text: #ede4d6;
  --text-muted: #ab9f8f;
  --text-faint: #7a6f62;
  --accent: #d9783f;
  --accent-ink: #e8925c;
  --on-accent: #1e0e04;
  --accent-soft: rgba(217, 120, 63, .14);
  --accent-glow: rgba(217, 120, 63, .45);
  --accent-2: #a3ab7f;
  --accent-2-soft: rgba(163, 171, 127, .16);
  --ok: #a3ab7f;
  --glow-1: rgba(217, 120, 63, .16);
  --glow-2: rgba(120, 112, 100, .18);
  --grid-line: rgba(237, 222, 200, .03);
  --shadow: 0 1px 0 rgba(237, 222, 200, .04) inset, 0 20px 50px -20px rgba(0, 0, 0, .7);
  --spot: rgba(217, 120, 63, .1);
  --header-bg: rgba(19, 17, 15, .65);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #ece5d8;
  --bg-elev: #f6f1e8;
  --surface: rgba(250, 246, 239, .7);
  --surface-2: rgba(40, 30, 20, .05);
  --border: rgba(40, 30, 20, .11);
  --border-strong: rgba(40, 30, 20, .22);
  --text: #1f1b17;
  --text-muted: #5c5248;
  --text-faint: #8c8174;
  --accent: #b5582a;
  --accent-ink: #9c4a20;
  --on-accent: #fbf5ec;
  --accent-soft: rgba(181, 88, 42, .12);
  --accent-glow: rgba(181, 88, 42, .35);
  --accent-2: #5f6a43;
  --accent-2-soft: rgba(95, 106, 67, .14);
  --ok: #5f6a43;
  --glow-1: rgba(217, 120, 63, .22);
  --glow-2: rgba(120, 112, 100, .2);
  --grid-line: rgba(40, 30, 20, .045);
  --shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 20px 40px -24px rgba(50, 35, 20, .3);
  --spot: rgba(181, 88, 42, .08);
  --header-bg: rgba(236, 229, 216, .75);
}

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

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  min-height: 100vh;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
em { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: 0; }
::selection { background: var(--accent); color: var(--on-accent); }

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

.i18n-pending body { visibility: hidden; }
main:focus { outline: none; }

.skip-link {
  position: absolute; top: -100px; left: 16px; z-index: 200;
  padding: 10px 18px; border-radius: var(--radius-sm);
  background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 14px;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

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

.backdrop { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.backdrop-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}
.backdrop-glow {
  position: absolute; border-radius: 50%; filter: blur(90px);
  animation: drift 22s ease-in-out infinite alternate;
}
.glow-1 { width: 620px; height: 620px; top: -220px; left: -120px; background: var(--glow-1); }
.glow-2 { width: 560px; height: 560px; top: 30%; right: -200px; background: var(--glow-2); animation-delay: -8s; }
.backdrop-noise {
  position: absolute; inset: -50%;
  opacity: .05;
  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='.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(80px, 60px) scale(1.15); }
}

.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 120; }
.scroll-progress span {
  display: block; height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform-origin: left; transform: scaleX(0);
}

.topbar {
  position: fixed; z-index: 100;
  top: 12px; left: 50%; transform: translateX(-50%);
  width: min(calc(100% - 24px), 1180px);
  height: 56px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 8px 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--header-bg);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  transition: box-shadow .3s ease, border-color .3s ease;
}
.topbar.scrolled { box-shadow: 0 10px 40px -12px rgba(0, 0, 0, .35); border-color: var(--border-strong); }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -.01em; }
.brand-mark {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  background: var(--accent); color: var(--on-accent);
  font-size: 13px; font-weight: 700; letter-spacing: .02em;
}
.brand-name { font-size: 15px; }

.nav { display: flex; gap: 2px; }
.nav a {
  position: relative;
  padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: 14px; color: var(--text-muted);
  transition: color .2s ease, background-color .2s ease;
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.active { color: var(--text); background: var(--surface-2); }
.nav a.active::after {
  content: ''; position: absolute; left: 50%; bottom: 3px;
  width: 4px; height: 4px; margin-left: -2px; border-radius: 50%;
  background: var(--accent-ink);
}

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

.lang-switch {
  display: flex; padding: 3px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border);
}
.lang-btn {
  padding: 5px 10px; border-radius: var(--radius-sm);
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  color: var(--text-muted); transition: all .2s ease;
}
.lang-btn:hover { color: var(--text); }
.lang-btn.active { background: var(--text); color: var(--bg); }

.icon-btn {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  transition: background-color .2s ease, transform .2s ease;
}
.icon-btn:hover { background: var(--surface); transform: rotate(-8deg); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
[data-theme="dark"] .i-sun { display: none; }
[data-theme="light"] .i-moon { display: none; }

.menu-toggle { display: none; position: relative; }
.menu-toggle:hover { transform: none; }
.menu-toggle span {
  position: absolute; left: 50%; width: 16px; height: 1.6px; margin-left: -8px;
  background: currentColor; border-radius: 2px;
  transition: transform .35s var(--ease), top .35s var(--ease);
}
.menu-toggle span:nth-child(1) { top: 16px; }
.menu-toggle span:nth-child(2) { top: 22px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { top: 19px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 90;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 100px var(--gutter) calc(32px + env(safe-area-inset-bottom));
  background: var(--bg);
  opacity: 0; visibility: hidden;
  transition: opacity .35s var(--ease), visibility .35s;
}
.mobile-menu.open { opacity: 1; visibility: visible; }
.mobile-menu[hidden] { display: none; }
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu nav a {
  display: flex; align-items: baseline; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--border);
  font-size: clamp(32px, 9vw, 48px); font-weight: 500; letter-spacing: -.03em; line-height: 1.1;
  transform: translateY(20px); opacity: 0;
  transition: transform .5s var(--ease), opacity .5s var(--ease), color .2s;
}
.mobile-menu.open nav a { transform: none; opacity: 1; }
.mobile-menu.open nav a:nth-child(2) { transition-delay: .04s; }
.mobile-menu.open nav a:nth-child(3) { transition-delay: .08s; }
.mobile-menu.open nav a:nth-child(4) { transition-delay: .12s; }
.mobile-menu.open nav a:nth-child(5) { transition-delay: .16s; }
.mobile-menu nav a:active { color: var(--accent-ink); }
.mm-num { font-family: var(--font-mono); font-size: 13px; color: var(--text-faint); letter-spacing: 0; }
.mobile-menu-foot { display: flex; flex-direction: column; gap: 10px; font-size: 15px; color: var(--text-muted); }
.mm-socials { display: flex; gap: 20px; }
body.menu-open { overflow: hidden; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 500;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease, transform .3s var(--ease);
  will-change: transform;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
.btn-primary {
  background: var(--accent); color: var(--on-accent);
  box-shadow: 0 0 0 0 var(--accent-soft), 0 10px 30px -10px var(--accent-glow);
}
.btn-primary:hover { box-shadow: 0 0 0 6px var(--accent-soft), 0 14px 34px -10px var(--accent-glow); }
.btn-primary:hover svg { transform: translateX(3px); }
.btn-ghost { border: 1px solid var(--border-strong); background: var(--surface); }
.btn-ghost:hover { border-color: var(--text); }
.btn-ghost:hover svg { transform: translateY(2px); }

.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 48px) 0 96px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.status-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px 7px 12px; margin-bottom: 28px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 13px; color: var(--text-muted);
}
.status-sep { color: var(--text-faint); }
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.pulse::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: var(--ok); animation: pulse 2s ease-out infinite;
}
@keyframes pulse { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(3); opacity: 0; } }

.hero-name {
  font-size: clamp(56px, 10.5vw, 148px);
  font-weight: 600;
  line-height: .9;
  letter-spacing: -.055em;
  margin-bottom: 28px;
}
.hero-name .line { display: block; }
.hero-name .line:nth-child(2) { padding-left: .5em; }
.hero-name .dot { color: var(--accent-ink); }

.hero-role {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--text-muted);
  margin-bottom: 10px;
}
.hero-role strong { color: var(--text); font-weight: 500; font-family: var(--font-mono); font-size: .92em; white-space: nowrap; }

.hero-tagline {
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.15;
  letter-spacing: -.025em;
  font-weight: 500;
  margin-bottom: 40px;
  max-width: 18ch;
}
.hero-tagline em { color: var(--accent-ink); }

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-visual { position: relative; }
.system-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
}
.window-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.wdot { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.wdot:first-child { background: #ff5f57; }
.wdot:nth-child(2) { background: #febc2e; }
.wdot:nth-child(3) { background: #28c840; }
.window-title { margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); }

.system-svg { width: 100%; height: auto; padding: 12px 8px 0; }
.gs { stop-color: var(--accent-ink); stop-opacity: .9; }
.gs-edge { stop-opacity: .15; }
.system-svg .link { fill: none; stroke: url(#lineGrad); stroke-width: 2; }
.system-svg .link-ws { stroke-dasharray: 5 6; animation: dash 1.2s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -22; } }
.packet { fill: var(--accent); filter: drop-shadow(0 0 6px var(--accent)); }
.packet-alt { fill: var(--accent-2); filter: drop-shadow(0 0 6px var(--accent-2)); }
.node rect:first-child { fill: var(--bg-elev); stroke: var(--border-strong); }
.node .bar { fill: var(--surface-2); stroke: none; }
.node .rack { fill: var(--surface-2); stroke: var(--border); }
.node-title { fill: var(--text); font: 600 15px var(--font); text-anchor: middle; }
.node-sub { fill: var(--text-faint); font: 400 11px var(--font-mono); text-anchor: middle; }
.link-label { fill: var(--text-muted); font: 500 11px var(--font-mono); text-anchor: middle; letter-spacing: .04em; }
.led { fill: var(--ok); animation: blink 1.4s steps(2) infinite; }
.led-2 { animation-delay: .4s; fill: var(--accent); }
.led-3 { animation-delay: .9s; }
@keyframes blink { 50% { opacity: .25; } }

.log {
  padding: 14px 20px 20px;
  font-family: var(--font-mono); font-size: 12.5px; color: var(--text-muted);
  display: flex; flex-direction: column; gap: 4px; min-height: 92px;
}
.log li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: logIn .5s var(--ease) both; }
.log-t { color: var(--accent-ink); display: inline-block; width: 1.4em; }
.log-k { color: var(--text); }
.log-ok { color: var(--ok); }
@keyframes logIn { from { opacity: 0; transform: translateY(6px); } }

.floating-chip {
  position: absolute;
  padding: 8px 14px; border-radius: 12px;
  font-family: var(--font-mono); font-size: 13px; font-weight: 500;
  background: var(--bg-elev); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  animation: float 6s ease-in-out infinite;
}
.chip-a { top: -18px; left: 12%; color: var(--accent-2); }
.chip-b { bottom: 22%; right: -22px; color: var(--accent-ink); animation-delay: -2s; }
.chip-c { bottom: -16px; left: -18px; animation-delay: -4s; }
@keyframes float { 50% { transform: translateY(-10px); } }

.scroll-hint {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  width: 26px; height: 42px; border: 1.5px solid var(--border-strong); border-radius: 999px;
}
.scroll-hint span {
  position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px;
  border-radius: 2px; background: var(--text-muted);
  animation: scrollHint 1.8s var(--ease) infinite;
}
@keyframes scrollHint { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

.marquee {
  overflow: hidden;
  border-block: 1px solid var(--border);
  padding: 22px 0;
  background: var(--surface);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track {
  display: flex; align-items: center; gap: 36px; width: max-content;
  animation: marquee 40s linear infinite;
  font-size: clamp(20px, 2.4vw, 30px); font-weight: 500; letter-spacing: -.02em; white-space: nowrap;
}
.marquee-track i { font-style: normal; color: var(--accent-ink); font-size: .6em; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

.section { padding: clamp(80px, 12vw, 150px) 0 0; }
.section-head { margin-bottom: clamp(36px, 5vw, 64px); max-width: 860px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 13px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-muted); margin-bottom: 18px;
}
.eyebrow span:first-child {
  padding: 3px 8px; border-radius: 6px;
  background: var(--accent-soft); color: var(--accent-ink);
}
.section-title {
  font-size: clamp(32px, 5vw, 60px);
  font-weight: 500; line-height: 1.05; letter-spacing: -.04em;
  text-wrap: balance;
}
.section-title em { color: var(--accent-ink); }

.lede { font-size: clamp(18px, 1.7vw, 21px); line-height: 1.55; color: var(--text); letter-spacing: -.01em; }

.spotlight { position: relative; isolation: isolate; }
.spotlight::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: -1;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), var(--spot), transparent 45%);
  opacity: 0; transition: opacity .4s ease;
  pointer-events: none;
}
.spotlight:hover::before { opacity: 1; }

.profil-grid {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: start;
}
.profil-text p + p { margin-top: 20px; color: var(--text-muted); font-size: 17px; }
.facts { margin-top: 36px; border-top: 1px solid var(--border); }
.facts li {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 15px;
}
.facts span { color: var(--text-faint); font-family: var(--font-mono); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; padding-top: 2px; }
.facts strong { font-weight: 500; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stat {
  padding: 26px 24px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
  transition: border-color .3s ease, transform .4s var(--ease);
}
.stat:hover { border-color: var(--border-strong); transform: translateY(-4px); }
.stat-num {
  font-size: clamp(48px, 5.5vw, 72px); font-weight: 600; letter-spacing: -.05em; line-height: 1;
  margin-bottom: 14px; font-variant-numeric: tabular-nums;
}
.stat-num small { font-size: .45em; color: var(--accent-ink); margin-left: 4px; letter-spacing: -.02em; }
.stat:nth-child(1) .stat-num span { color: var(--accent-ink); }
.stat-label { font-size: 14.5px; color: var(--text-muted); line-height: 1.45; }

.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
.tile {
  padding: 28px; border-radius: var(--radius-lg);
  border: 1px solid var(--border); background: var(--surface);
  display: flex; flex-direction: column; gap: 18px;
  transition: border-color .3s ease, transform .4s var(--ease);
  overflow: hidden;
}
.tile:hover { border-color: var(--border-strong); }
.tile-backend { grid-column: span 3; }
.tile-web { grid-column: span 3; }
.tile-db { grid-column: span 2; }
.tile-tools { grid-column: span 2; }
.tile-method { grid-column: span 2; }
.tile-soft { grid-column: span 6; }
.tile-head { display: flex; align-items: center; gap: 14px; }
.tile-head h3 { font-size: 20px; font-weight: 500; letter-spacing: -.02em; }
.tile-icon {
  display: grid; place-items: center; flex-shrink: 0;
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent-ink);
}
.tile-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tile-desc { color: var(--text-muted); font-size: 16px; max-width: 46ch; }
.tile-backend .chips .chip, .tile-web .chips .chip { font-size: 15px; padding: 8px 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 13px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-2);
  font-size: 13.5px; color: var(--text-muted);
  transition: color .2s ease, border-color .2s ease, transform .2s ease;
}
.chip:hover { transform: translateY(-2px); color: var(--text); border-color: var(--border-strong); }
.chip-strong { color: var(--text); border-color: var(--border-strong); }

.tile-code {
  margin-top: auto;
  padding: 18px 20px; border-radius: var(--radius-sm);
  background: var(--bg-elev); border: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 13px; line-height: 1.7; color: var(--text-muted);
  overflow-x: auto;
}
.tile-code code { white-space: nowrap; font-family: inherit; }
.c-k { color: var(--accent-2); }
.c-t { color: var(--accent-ink); }
.c-f { color: var(--text); }

.projects {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.project {
  display: flex; flex-direction: column;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border); background: var(--surface);
  overflow: hidden;
  transition: border-color .3s ease, transform .5s var(--ease);
}
.project:hover { border-color: var(--border-strong); transform: translateY(-6px); }
.project-featured {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: 1.15fr 1fr;
}
.project-visual {
  position: relative;
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(120% 120% at 0% 0%, var(--accent-soft), transparent 60%),
    radial-gradient(120% 120% at 100% 100%, var(--accent-2-soft), transparent 60%),
    var(--bg-elev);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.project-featured .project-visual { aspect-ratio: auto; min-height: 340px; border-bottom: 0; border-right: 1px solid var(--border); }
.project-visual svg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  transition: transform .8s var(--ease);
}
.project:hover .project-visual svg { transform: scale(1.04); }

.project-badge {
  position: absolute; top: 16px; left: 16px;
  padding: 5px 11px; border-radius: var(--radius-sm);
  background: var(--accent); color: var(--on-accent);
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
}

.project-visual svg rect, .project-visual svg circle, .project-visual svg path { stroke-width: 1.5; }
.v-screen > rect:first-child, .v-rack > rect:first-child, .v-browser > rect:first-child,
.v-products > rect, .v-pin > rect, .v-window > rect:first-child, .v-list > rect, .v-table rect {
  fill: var(--bg); stroke: var(--border-strong);
}
.v-unit, .v-thumb, .v-titlebar, .v-th { fill: var(--surface-2); stroke: var(--border); }
.v-thumb-live { fill: var(--accent-soft); stroke: var(--accent-ink); }
.v-line { fill: var(--border-strong); stroke: none !important; }
.v-rec { fill: #ef4444; animation: blink 1.2s steps(2) infinite; }
.v-wave path { fill: none; stroke: var(--accent-ink); opacity: .35; }
.v-wave path:nth-child(2) { stroke: var(--accent-2); opacity: .3; }
.v-link { fill: none; stroke: var(--accent-ink); stroke-dasharray: 4 5; animation: dash 1s linear infinite; }
.v-sep { stroke: var(--border-strong); }
.v-dot { fill: var(--border-strong); stroke: none !important; }
.v-url { fill: var(--surface-2); stroke: var(--border); }
.v-img { fill: var(--accent-soft) !important; stroke: none !important; }
.v-img-2 { fill: var(--accent-2-soft) !important; }
.v-btn { fill: var(--surface-2); stroke: var(--border-strong); }
.v-btn-accent { fill: var(--accent); stroke: none !important; }
.v-pin-shape { fill: var(--accent-2); stroke: none; transform-origin: 366px 162px; animation: bob 2.4s ease-in-out infinite; }
.v-pin-hole { fill: var(--bg); stroke: none; transform-origin: 366px 162px; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }
.v-row-hi { fill: var(--accent-soft) !important; stroke: var(--accent-ink) !important; }
.v-bike circle, .v-bike path { fill: none; stroke: var(--accent-ink); stroke-width: 3 !important; stroke-linecap: round; stroke-linejoin: round; }
.v-bike circle { animation: spin 3s linear infinite; transform-box: fill-box; transform-origin: center; stroke-dasharray: 8 6; }
@keyframes spin { to { transform: rotate(360deg); } }
.v-check { fill: none; stroke: var(--border-strong); }
.v-check.on { fill: var(--accent); stroke: none; }
.v-gift rect { fill: var(--accent-2); stroke: none; opacity: .85; }
.v-gift .v-lid { opacity: 1; }
.v-gift .v-ribbon { fill: var(--accent); opacity: 1; }
.v-gift .v-bow { fill: none; stroke: var(--accent-ink); stroke-width: 3 !important; }
.v-gift-float { animation: float 5s ease-in-out infinite; }

.project-body {
  display: flex; flex-direction: column; gap: 14px;
  padding: 26px 26px 28px; flex: 1;
}
.project-featured .project-body { padding: clamp(28px, 4vw, 44px); justify-content: center; }
.project-meta { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-faint); letter-spacing: .02em; }
.project-meta a { color: var(--text-muted); border-bottom: 1px solid var(--border-strong); transition: color .2s, border-color .2s; }
.project-meta a:hover { color: var(--accent-ink); border-color: var(--accent-ink); }
.project h3 { font-size: clamp(22px, 2.2vw, 28px); font-weight: 500; letter-spacing: -.03em; line-height: 1.15; }
.project-featured h3 { font-size: clamp(26px, 3vw, 38px); }
.project-body > p:not(.project-meta) { color: var(--text-muted); font-size: 15.5px; }
.project-points { display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.project-points li { display: flex; gap: 10px; }
.project-points li::before { content: '→'; color: var(--accent-ink); font-family: var(--font-mono); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  padding: 4px 10px; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 12px; color: var(--text-muted);
}

.project-link {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  margin-top: auto; padding: 10px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); font-size: 14px; font-weight: 500;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.project-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.project-link .arrow { transition: transform .3s var(--ease); }
.project-link:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.project-link:hover .arrow { transform: translate(2px, -2px); }

.more-link {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 36px;
  font-size: 17px; font-weight: 500;
  border-bottom: 1px solid var(--border-strong); padding-bottom: 4px;
  transition: color .2s ease, border-color .2s ease;
}
.more-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform .3s var(--ease); }
.more-link:hover { color: var(--accent-ink); border-color: var(--accent-ink); }
.more-link:hover svg { transform: translate(3px, -3px); }

.path-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(32px, 5vw, 64px); }
.path-col-title {
  font-family: var(--font-mono); font-size: 13px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint);
  margin-bottom: 20px;
}
.timeline { position: relative; display: flex; flex-direction: column; gap: 14px; padding-left: 28px; }
.timeline::before {
  content: ''; position: absolute; left: 5px; top: 10px; bottom: 10px; width: 1px;
  background: linear-gradient(var(--accent-ink), var(--border) 60%, transparent);
}
.tl-item { position: relative; }
.tl-item::before {
  content: ''; position: absolute; left: -28px; top: 26px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent-ink);
}
.tl-item:first-child::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.tl-date {
  display: inline-block; margin-bottom: 8px;
  font-family: var(--font-mono); font-size: 12.5px; color: var(--accent-ink);
}
.tl-body {
  padding: 22px 24px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
  transition: border-color .3s ease;
}
.tl-body:hover { border-color: var(--border-strong); }
.tl-body h4 { font-size: 18px; font-weight: 500; letter-spacing: -.02em; line-height: 1.3; }
.tl-body h4 a { border-bottom: 1px solid var(--border-strong); transition: color .2s, border-color .2s; }
.tl-body h4 a:hover { color: var(--accent-ink); border-color: var(--accent-ink); }
.tl-role { font-size: 14px; color: var(--text-faint); margin: 2px 0 10px; }
.tl-body p:last-child { color: var(--text-muted); font-size: 15px; }

.interests { margin-top: 40px; }
.interest-list { display: flex; flex-wrap: wrap; gap: 10px; }
.interest-list li {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px 10px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface);
  font-size: 14.5px;
}
.interest-list svg { width: 18px; height: 18px; fill: none; stroke: var(--accent-ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.section-contact { padding-bottom: clamp(60px, 8vw, 100px); }
.contact-card {
  position: relative; overflow: hidden;
  padding: clamp(36px, 7vw, 88px) clamp(24px, 6vw, 80px);
  border-radius: clamp(24px, 3vw, 40px);
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(80% 120% at 100% 0%, var(--glow-2), transparent 55%),
    radial-gradient(80% 120% at 0% 100%, var(--glow-1), transparent 55%),
    var(--surface);
  text-align: center;
}
.contact-card .eyebrow { justify-content: center; }
.contact-title {
  font-size: clamp(38px, 7vw, 92px);
  font-weight: 500; line-height: 1; letter-spacing: -.05em;
  margin: 0 auto 24px; max-width: 14ch; text-wrap: balance;
}
.contact-title em { color: var(--accent-ink); }
.contact-card .lede { color: var(--text-muted); max-width: 52ch; margin: 0 auto 40px; }

.contact-mail {
  display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center;
  padding: 6px 6px 6px 22px; border-radius: var(--radius-sm);
  background: var(--bg-elev); border: 1px solid var(--border-strong);
  margin-bottom: 28px; max-width: 100%;
}
.mail-link {
  font-size: clamp(15px, 2.2vw, 22px); font-weight: 500; letter-spacing: -.02em;
  overflow-wrap: anywhere;
}
.mail-link:hover { color: var(--accent-ink); }
.copy-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--radius-sm);
  background: var(--accent); color: var(--on-accent);
  font-size: 14px; font-weight: 600;
  transition: transform .2s ease;
}
.copy-btn:active { transform: scale(.96); }
.copy-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.contact-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.social {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface);
  font-size: 15px; font-weight: 500;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease, transform .3s var(--ease);
}
.social svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.social:hover { background: var(--text); color: var(--bg); border-color: var(--text); }

.footer { border-top: 1px solid var(--border); padding: 28px 0 calc(28px + env(safe-area-inset-bottom)); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--text-faint); }
.to-top:hover { color: var(--text); }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 150;
  transform: translate(-50%, 20px); opacity: 0;
  padding: 12px 20px; border-radius: var(--radius-sm);
  background: var(--text); color: var(--bg); font-size: 14px; font-weight: 500;
  transition: opacity .3s ease, transform .4s var(--ease);
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .hero .reveal { transition-duration: 1.1s; }

@media (max-width: 1080px) {
  .nav a { padding: 8px 10px; }
  .projects { grid-template-columns: 1fr 1fr; }
  .tile-backend, .tile-web, .tile-soft { grid-column: span 6; }
  .tile-db, .tile-tools, .tile-method { grid-column: span 2; }
}

@media (max-width: 920px) {
  .nav, .brand-name { display: none; }
  .menu-toggle { display: grid; }

  .hero { min-height: auto; padding-top: calc(var(--header-h) + 56px); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 560px; width: 100%; margin: 24px auto 0; }
  .scroll-hint { display: none; }

  .profil-grid, .path-grid { grid-template-columns: 1fr; }
  .project-featured { grid-template-columns: 1fr; }
  .project-featured .project-visual { aspect-ratio: 16 / 10; min-height: 0; border-right: 0; border-bottom: 1px solid var(--border); }
}

@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .topbar { top: 8px; width: calc(100% - 16px); height: 54px; }
  .hero { padding-top: calc(var(--header-h) + 40px); padding-bottom: 64px; }
  .hero-name .line:nth-child(2) { padding-left: 0; }
  .hero-cta .btn { flex: 1 1 100%; }
  .chip-b { right: -6px; }
  .chip-c { left: -6px; }
  .floating-chip { font-size: 12px; padding: 6px 11px; }

  .stats { gap: 10px; }
  .stat { padding: 20px 18px; }
  .stat-label { font-size: 13.5px; }

  .bento { grid-template-columns: 1fr; gap: 12px; }
  .bento > .tile { grid-column: auto; }
  .tile { padding: 22px; }
  .tile-code { font-size: 12px; padding: 14px 16px; }
  .tile-code code { white-space: normal; }

  .projects { grid-template-columns: 1fr; }
  .project-body { padding: 22px; }

  .contact-mail { padding: 14px; border-radius: var(--radius); flex-direction: column; width: 100%; }
  .copy-btn { width: 100%; justify-content: center; }
  .contact-links .social { flex: 1 1 calc(50% - 10px); justify-content: center; }

  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 380px) {
  .lang-btn { padding: 5px 8px; }
  .stats { grid-template-columns: 1fr; }
}

@media (hover: none) {
  .project:hover, .stat:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
}
