/* ============ Tokens ============ */
:root {
  --bg: #111110;
  --surface: #191918;
  --surface-2: #20201e;
  --line: #2a2a28;
  --line-2: #3a3a37;
  --text: #f2f1ed;
  --muted: #8d8c86;
  --accent: #ff3b30;        /* Schweizer Rot */
  --accent-soft: rgba(255, 59, 48, 0.1);
  --inv-bg: #f2f1ed;
  --inv-text: #111110;
  --dot-rgb: 242, 241, 237;
  --accent-rgb: 255, 59, 48;
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.7);
  --radius: 14px;
  --max: 1160px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f4f3ef;
  --surface: #ffffff;
  --surface-2: #ecebe6;
  --line: #dddcd5;
  --line-2: #c7c6be;
  --text: #121211;
  --muted: #6b6a64;
  --accent: #da291c;
  --accent-soft: rgba(218, 41, 28, 0.08);
  --inv-bg: #121211;
  --inv-text: #f4f3ef;
  --dot-rgb: 18, 18, 17;
  --accent-rgb: 218, 41, 28;
  --shadow: 0 24px 50px -30px rgba(0, 0, 0, 0.22);
  color-scheme: light;
}

/* ============ Base ============ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  background: var(--bg); color: var(--text);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  transition: background .4s, color .4s;
}
h1, h2, h3, .big, .logo, .btn, .nav-cta { font-family: "Inter Tight", "Inter", system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
.mono, code, kbd { font-family: "JetBrains Mono", ui-monospace, monospace; }
kbd { font-size: 11px; padding: 2px 6px; border-radius: 5px; border: 1px solid var(--line-2); background: var(--surface); margin: 0 2px; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: 50; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }

/* ============ Nav ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px max(24px, calc((100% - var(--max)) / 2 + 24px));
  border-bottom: 1px solid transparent; transition: background .3s, border-color .3s;
}
.nav.scrolled { background: color-mix(in srgb, var(--bg) 82%, transparent); border-color: var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
.logo-mark { width: 28px; height: 28px; flex: none; margin-left: -4px; }
.logo-mark path { stroke-dasharray: 1; stroke-dashoffset: 0; }
.logo-mark path:last-child { animation-delay: .35s; }
.logo:hover .logo-mark path, .logo-mark.intro path { animation: draw 1s cubic-bezier(.65,0,.35,1) backwards; }
.logo:hover .logo-mark path:last-child, .logo-mark.intro path:last-child { animation-delay: .35s; }
@keyframes draw { from { stroke-dashoffset: 1; } }
.nav-links { display: flex; gap: 4px; }
.nav-links a { position: relative; font-size: 14px; color: var(--muted); padding: 6px 12px; transition: color .2s; }
.nav-links a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .3s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-actions { display: flex; gap: 6px; align-items: center; }
.kbd-btn, .icon-btn { height: 34px; min-width: 34px; padding: 0 9px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); font-size: 12px; color: var(--muted); transition: color .2s, border-color .2s; }
.kbd-btn:hover, .icon-btn:hover { color: var(--text); border-color: var(--line-2); }
.icon-btn .moon { display: none; }
:root[data-theme="light"] .icon-btn .sun { display: none; }
:root[data-theme="light"] .icon-btn .moon { display: block; }
.nav-cta { height: 34px; display: grid; place-items: center; padding: 0 14px; border-radius: 8px; background: var(--inv-bg); color: var(--inv-text); font-weight: 600; font-size: 14px; transition: opacity .2s; }
.nav-cta:hover { opacity: .85; }

main { position: relative; z-index: 1; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ============ Hero ============ */
.hero { padding: 130px 0 80px; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; }
.hero-meta { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); padding-bottom: 16px; border-bottom: 1px solid var(--line); text-transform: uppercase; letter-spacing: .06em; }
.hero-meta > span { display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #34c759; animation: pulse 2.4s infinite; flex: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52,199,89,.5); } 70% { box-shadow: 0 0 0 8px rgba(52,199,89,0); } 100% { box-shadow: 0 0 0 0 rgba(52,199,89,0); } }

.hero-title { margin: 28px 0 36px; font-weight: 800; letter-spacing: -0.055em; line-height: .88; }
.name { display: block; font-size: clamp(58px, 13vw, 176px); }
.name .word { display: inline-block; white-space: nowrap; }
.name .ch { display: inline-block; animation: rise .9s cubic-bezier(.2,.8,.2,1) backwards; transition: transform .3s, color .3s; }
.name .ch:hover { transform: translateY(-6%); color: var(--accent); }
@keyframes rise { from { opacity: 0; transform: translateY(55%) rotate(5deg); } }

.hero-row { display: grid; grid-template-columns: 1fr 1.15fr; gap: 48px; align-items: start; }
.role { font-family: "Inter Tight", sans-serif; font-size: clamp(20px, 2.2vw, 26px); font-weight: 600; letter-spacing: -0.02em; min-height: 1.4em; }
.caret { display: inline-block; width: 2px; height: 1em; background: var(--accent); margin-left: 3px; vertical-align: -0.12em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.tagline { margin-top: 14px; color: var(--muted); font-size: 18px; max-width: 460px; }
.hero-actions { display: flex; gap: 10px; margin-top: 32px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 20px; border-radius: 10px; font-weight: 600; font-size: 15px; border: 1px solid var(--line-2); background: var(--surface); transition: border-color .2s, background .2s, transform .25s cubic-bezier(.2,.8,.2,1); will-change: transform; }
.btn:hover { border-color: var(--text); }
.btn.primary { background: var(--inv-bg); color: var(--inv-text); border-color: var(--inv-bg); }
.btn.primary span { transition: transform .25s; }
.btn.primary:hover span { transform: translateX(3px); }

/* ============ Terminal (Hero) ============ */
.hero-term { position: relative; }
.term {
  --t-bg: #121212; --t-bar: #1b1b1b; --t-line: #2a2a2a; --t-text: #e8e8e3; --t-dim: #7d7d77;
  border-radius: 12px; border: 1px solid var(--t-line); background: var(--t-bg); color: var(--t-text);
  box-shadow: var(--shadow); overflow: hidden;
  transition: transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .4s;
}
.term.focused { box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; background: var(--t-bar); border-bottom: 1px solid var(--t-line); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.term-bar i:nth-child(2) { background: #febc2e; }
.term-bar i:nth-child(3) { background: #28c840; }
.term-bar > span:not(.term-badge) { margin-left: 10px; font-size: 12px; color: var(--t-dim); }
.term-badge { margin-left: auto; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); padding: 2px 8px; border-radius: 99px; }
.term-body { padding: 16px 18px; height: 330px; overflow-y: auto; font-size: 13.5px; line-height: 1.7; cursor: text; scrollbar-width: thin; scrollbar-color: #333 transparent; }
.t-user { color: var(--t-text); font-weight: 700; }
.t-dim { color: var(--t-dim); }
.t-path { color: #7aa2f7; }
.t-acc { color: var(--accent); font-weight: 700; }
.t-ok { color: #9ece6a; }
.t-key { color: #e0af68; }
.term-out-line { white-space: pre-wrap; word-break: break-word; }
.term-out-line.muted { color: var(--t-dim); }
.term-out-line.err { color: #ff7b72; }
.term-out-line a { color: var(--t-text); text-decoration: underline; text-underline-offset: 3px; }
.term-out-line + .term-out-line.cmd { margin-top: 8px; }
.term-line { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.term-line label { white-space: nowrap; }
.term-line input { flex: 1; min-width: 0; background: transparent; border: none; outline: none; color: var(--t-text); font: inherit; caret-color: var(--accent); }
.term-line input::placeholder { color: #55554f; }
.term-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.chips-label { font-size: 12px; color: var(--muted); margin-right: 2px; }
.chip-btn { font-family: "JetBrains Mono", monospace; font-size: 12.5px; padding: 6px 11px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); transition: border-color .2s, background .2s, transform .2s; }
.chip-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.chip-btn:active { transform: translateY(0); }

/* ============ Marquee ============ */
.marquee { position: relative; z-index: 1; overflow: hidden; border-block: 1px solid var(--line); padding: 20px 0; margin: 0 calc(50% - 50vw); background: var(--bg); }
.marquee-track { display: flex; width: max-content; animation: scroll 45s linear infinite; font-family: "Inter Tight", sans-serif; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; color: var(--muted); }
.marquee-track span { display: inline-flex; align-items: center; white-space: nowrap; }
.marquee-track span::after { content: "/"; margin: 0 28px; color: var(--line-2); font-weight: 400; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ============ Sections ============ */
.section { padding: 110px 0 30px; }
.section-head { display: grid; grid-template-columns: 80px 1fr auto; align-items: baseline; gap: 16px; padding-top: 18px; margin-bottom: 44px; border-top: 1px solid var(--text); }
.section-head h2 { font-size: clamp(32px, 5vw, 56px); font-weight: 700; letter-spacing: -0.045em; line-height: 1; }
.idx { font-size: 13px; color: var(--muted); }
.live { display: inline-flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

.grid { display: grid; gap: 14px; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.four { grid-template-columns: repeat(4, 1fr); }

.card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  transition: border-color .3s, transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .4s;
}
.card:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.card h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; }
.card p { color: var(--muted); font-size: 15px; }
.chip { display: inline-block; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 20px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.todo { opacity: .5; }
.card.todo { border-style: dashed; }
.todo-badge { display: inline-block; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; padding: 2px 7px; border-radius: 99px; border: 1px dashed var(--line-2); color: var(--muted); margin-left: 8px; vertical-align: middle; font-family: "JetBrains Mono", monospace; font-weight: 400; }

/* About */
.about-grid { display: grid; grid-template-columns: 80px 1.6fr 1fr; gap: 16px 40px; align-items: start; }
.about-text { grid-column: 2; }
.stats { grid-column: 3; }
.about-text p { font-family: "Inter Tight", sans-serif; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.3; letter-spacing: -0.025em; font-weight: 500; }
.about-text p + p { margin-top: 18px; color: var(--muted); font-size: clamp(17px, 1.8vw, 20px); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stats:has(.stat:only-child) { grid-template-columns: 1fr; }
.stat b { display: block; font-family: "Inter Tight", sans-serif; font-size: 46px; font-weight: 700; letter-spacing: -0.05em; line-height: 1; margin-bottom: 6px; }
.stat b em { font-style: normal; color: var(--accent); }
.stat > span { font-size: 13px; color: var(--muted); }

/* Skills */
.skill-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.skill-head h3 { margin: 0; }
.skill-head .ico { font-size: 12px; color: var(--muted); }
.skill { padding: 11px 0; border-top: 1px solid var(--line); font-size: 15px; }
.skill-row { display: flex; justify-content: space-between; margin-bottom: 8px; }
.skill-row small { color: var(--muted); font-family: "JetBrains Mono", monospace; font-size: 12px; }
.meter { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.meter i { height: 4px; border-radius: 2px; background: var(--line); position: relative; overflow: hidden; }
.meter i::after { content: ""; position: absolute; inset: 0; background: var(--text); transform: scaleX(0); transform-origin: left; transition: transform .5s cubic-bezier(.2,.8,.2,1); transition-delay: var(--md, 0s); }
.meter i.on.last::after { background: var(--accent); }
.in .meter i.on::after { transform: scaleX(1); }

/* Timeline */
.timeline { list-style: none; }
.timeline li { display: grid; grid-template-columns: 80px 140px 1fr; gap: 16px; padding: 22px 0; border-top: 1px solid var(--line); transition: background .3s; }
.timeline li:last-child { border-bottom: 1px solid var(--line); }
.timeline li:hover { background: linear-gradient(90deg, var(--accent-soft), transparent 60%); }
.timeline .tdot { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--text); margin-top: 9px; }
.timeline li:first-child .tdot { background: var(--accent); border-color: var(--accent); }
.timeline .when { font-size: 13px; color: var(--muted); padding-top: 3px; }
.timeline h3 { font-size: 22px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.2; }
.timeline p { color: var(--muted); max-width: 620px; margin-top: 4px; }

/* Certificates */
.certs { border-top: 1px solid var(--line); }
.cert { display: grid; grid-template-columns: 80px 1fr auto 80px; gap: 16px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--line); transition: background .3s; }
.cert:hover { background: linear-gradient(90deg, var(--accent-soft), transparent 60%); }
.cert .seal { font-size: 13px; color: var(--muted); }
.cert .cname { font-family: "Inter Tight", sans-serif; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.cert .issuer { color: var(--muted); font-size: 15px; }
.cert .year { color: var(--text); font-size: 14px; text-align: right; }
.cert .cname small { display: block; font-family: "Inter", sans-serif; font-size: 13px; font-weight: 400; color: var(--muted); letter-spacing: 0; margin-top: 2px; }
.cert-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.filter-btn { font-size: 14px; padding: 7px 14px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); transition: background .2s, color .2s, border-color .2s; }
.filter-btn small { color: var(--muted); font-family: "JetBrains Mono", monospace; font-size: 11px; margin-left: 4px; }
.filter-btn:hover { border-color: var(--text); }
.filter-btn.on { background: var(--inv-bg); color: var(--inv-text); border-color: var(--inv-bg); }
.filter-btn.on small { color: inherit; opacity: .6; }

/* Projects */
.projects { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.project { display: flex; flex-direction: column; min-height: 240px; }
.project.featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1.15fr; gap: 36px; align-items: center; min-height: 0; padding: 32px; }
.project .top { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.project h3 { font-size: 24px; }
.project.featured h3 { font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -0.04em; line-height: 1.05; }
.project .pbody { display: flex; flex-direction: column; height: 100%; }
.project .pmeta { display: block; font-size: 12px; color: var(--muted); margin: 2px 0 10px; }
.project.featured .pmeta { font-size: 13px; margin: 8px 0 14px; }
.bullets { list-style: none; margin: 16px 0 4px; display: grid; gap: 8px; }
.bullets li { position: relative; padding-left: 20px; font-size: 14.5px; color: var(--muted); line-height: 1.5; }
.bullets li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 1.5px; background: var(--text); }
.project.featured .bullets li { font-size: 15px; color: var(--text); }
.dot.ok { background: #34c759; }
.gallery { display: flex; flex-direction: column; gap: 12px; }
.shot-stage { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.shot-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.04); transition: opacity .7s ease, transform 1.2s cubic-bezier(.2,.8,.2,1); }
.shot-stage img.on { opacity: 1; transform: scale(1); }
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.thumb { border-radius: 8px; overflow: hidden; border: 1.5px solid var(--line); opacity: .55; transition: opacity .25s, border-color .25s, transform .25s; aspect-ratio: 16 / 10; padding: 0; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb:hover { opacity: .85; transform: translateY(-2px); }
.thumb.on { opacity: 1; border-color: var(--text); }
.caption { font-size: 12px; color: var(--muted); min-height: 1.4em; }
.sub-head { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 500; margin: 56px 0 16px; }
.strength h3 { font-size: 18px; }

/* Process */
.section-lead { font-family: "Inter Tight", sans-serif; font-size: clamp(20px, 2.4vw, 26px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.35; max-width: 760px; margin: -12px 0 40px; }
.process { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); }
.step { position: relative; padding: 26px 24px 8px 0; }
.step + .step { padding-left: 24px; border-left: 1px solid var(--line); }
.step-n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--text); font-size: 12px; font-weight: 700; margin-bottom: 18px; transition: background .3s, color .3s, border-color .3s; }
.step:last-child .step-n { background: var(--accent); border-color: var(--accent); color: #fff; }
.step:hover .step-n { background: var(--inv-bg); color: var(--inv-text); }
.step h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 15px; }
.step::after { content: "→"; position: absolute; top: 31px; right: -9px; z-index: 1; width: 18px; text-align: center; color: var(--muted); background: var(--bg); font-size: 14px; }
.step:last-child::after { display: none; }
.project .status { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 14px; }
.project .cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 24px; width: fit-content; padding: 11px 18px; border-radius: 10px; background: var(--inv-bg); color: var(--inv-text); font-family: "Inter Tight", sans-serif; font-weight: 600; font-size: 15px; }
.project .cta span { transition: transform .25s; }
.project:hover .cta span { transform: translateX(3px); }
.shot { border-radius: 10px; border: 1px solid var(--line); overflow: hidden; background: #000; box-shadow: var(--shadow); transform: perspective(1000px) rotateY(-7deg) rotateX(3deg); transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.project.featured:hover .shot { transform: perspective(1000px) rotateY(0) rotateX(0); }
.shot img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.project.featured:hover .shot img { transform: scale(1.03); }
.project .arrow { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; transition: transform .3s, background .3s, color .3s, border-color .3s; flex: none; }
.project:hover .arrow { transform: rotate(-45deg); background: var(--accent); color: #fff; border-color: var(--accent); }
.project p { margin-top: 6px; flex: 1; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 22px; }
.tags span { font-size: 12px; padding: 3px 9px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.mock { border-radius: 10px; border: 1px solid var(--line); background: var(--bg); overflow: hidden; box-shadow: var(--shadow); transform: perspective(1000px) rotateY(-7deg) rotateX(3deg); transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.project.featured:hover .mock { transform: perspective(1000px) rotateY(0) rotateX(0); }
.mock-bar { display: flex; gap: 6px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.mock-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.mock-bar span { margin-left: 10px; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mock-body { padding: 24px 22px 30px; }
.mock-body .m1 { font-size: 10px; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 8px; display: flex; justify-content: space-between; }
.mock-body .m2 { font-family: "Inter Tight", sans-serif; font-size: 40px; font-weight: 800; letter-spacing: -0.05em; line-height: .95; margin: 14px 0 16px; }
.mock-body .m3 { height: 7px; width: 70%; border-radius: 9px; background: var(--line); margin-bottom: 8px; }
.mock-body .m3.s { width: 45%; }
.mock-body .m4 { display: flex; gap: 8px; margin-top: 18px; }
.mock-body .m4 i { height: 24px; width: 86px; border-radius: 6px; background: var(--text); }
.mock-body .m4 i + i { background: transparent; border: 1px solid var(--line-2); width: 70px; }

/* Uses */
.uses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.use { padding: 18px 20px; display: flex; gap: 14px; align-items: center; }
.use .ini { width: 40px; height: 40px; border-radius: 10px; flex: none; display: grid; place-items: center; font-family: "Inter Tight", sans-serif; font-weight: 700; background: var(--surface-2); color: var(--text); }
.use h3 { font-size: 16px; margin: 0; }
.use p { font-size: 13px; }

/* Contact */
.contact { padding-bottom: 130px; }
.big { font-size: clamp(50px, 10vw, 140px); font-weight: 800; letter-spacing: -0.06em; line-height: .9; }
.acc { color: var(--accent); }
.contact-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 40px; align-items: center; }
.contact-note { color: var(--muted); }
.contact-row { display: block; }
.contact-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ccard { display: flex; flex-direction: column; gap: 6px; padding: 26px; }
.clabel { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.cvalue { font-family: "Inter Tight", sans-serif; font-size: clamp(20px, 2.4vw, 28px); font-weight: 600; letter-spacing: -0.02em; word-break: break-all; width: fit-content; }
a.cvalue { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .3s; }
a.cvalue:hover { background-size: 100% 1px; }
.cactions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.contact-row-2 { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

/* Footer */
.footer { position: relative; z-index: 1; max-width: var(--max); margin: 0 auto; padding: 24px 24px 36px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }

/* Palette */
.palette { position: fixed; inset: 0; z-index: 100; display: grid; place-items: start center; padding: 14vh 16px 16px; }
.palette-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade .2s; }
.palette-box { position: relative; width: min(580px, 100%); border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); box-shadow: 0 40px 100px -20px rgba(0,0,0,.5); overflow: hidden; animation: pop .25s cubic-bezier(.2,.8,.2,1); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
.palette-input { width: 100%; padding: 18px 20px; font: inherit; font-size: 17px; background: transparent; border: none; outline: none; color: var(--text); border-bottom: 1px solid var(--line); }
.palette-list { list-style: none; max-height: 340px; overflow-y: auto; padding: 6px; }
.palette-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; cursor: pointer; font-size: 15px; }
.palette-list li .pi { width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-size: 12px; }
.palette-list li small { margin-left: auto; color: var(--muted); font-size: 12px; }
.palette-list li[aria-selected="true"] { background: var(--surface-2); }
.palette-list li[aria-selected="true"] .pi { background: var(--accent); color: #fff; }
.palette-foot { display: flex; gap: 18px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }

/* Toast */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); z-index: 120; padding: 11px 18px; border-radius: 10px; background: var(--inv-bg); color: var(--inv-text); font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s cubic-bezier(.2,.8,.2,1), transform .9s cubic-bezier(.2,.8,.2,1); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* Confetti */
.confetti { position: fixed; top: -10px; width: 8px; height: 14px; z-index: 200; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

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

/* ============ Responsive ============ */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .hero-row { grid-template-columns: 1fr; gap: 36px; }
  .grid.three, .grid.four, .process { grid-template-columns: 1fr 1fr; }
  .step:nth-child(3) { padding-left: 0; border-left: 0; }
  .step:nth-child(2)::after { display: none; }
  .uses { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-text, .stats { grid-column: auto; }
  .project.featured { grid-template-columns: 1fr; }
  .section-head { grid-template-columns: 48px 1fr auto; }
  .timeline li { grid-template-columns: 24px 110px 1fr; }
  .cert { grid-template-columns: 48px 1fr auto; }
  .cert .year { grid-column: 3; grid-row: 1; }
  .cert .issuer { grid-column: 2; grid-row: 2; margin-top: -12px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav { padding: 12px 16px; }
  .logo-text { display: none; }
  .kbd-btn { display: none; }
  main { padding: 0 16px; }
  .hero { padding-top: 96px; min-height: 0; }
  .hero-meta { font-size: 11px; }
  .hero-title { margin: 22px 0 26px; }
  .grid.three, .grid.four, .projects, .uses, .contact-cards, .process { grid-template-columns: 1fr; }
  .step, .step + .step, .step:nth-child(3) { padding: 22px 0 14px; border-left: 0; border-bottom: 1px solid var(--line); }
  .step::after { display: none; }
  .shot { transform: none; }
  .section { padding-top: 80px; }
  .section-head { grid-template-columns: 36px 1fr; margin-bottom: 30px; }
  .section-head .live { grid-column: 2; }
  .timeline li { grid-template-columns: 20px 1fr; gap: 4px 12px; }
  .timeline .when { grid-column: 2; }
  .timeline li > div { grid-column: 2; }
  .term-body { height: 300px; font-size: 12.5px; padding: 14px; }
  .term-bar > span:not(.term-badge) { display: none; }
  .footer { padding: 22px 16px 30px; }
  .footer-mid { display: none; }
  .mock { transform: none; }
  .project.featured { padding: 24px; }
}

/* Grid-Kinder dürfen schrumpfen (verhindert Überlauf auf dem Handy) */
.project, .project > *, .gallery, .shot, .pbody { min-width: 0; }
@media (max-width: 960px) { .project.featured { grid-template-columns: minmax(0, 1fr); } }
.contact-cards:has(.ccard:only-child) { grid-template-columns: minmax(0, 1fr); max-width: 640px; }
