/* Justin — Portfolio. Galaxy / starfield theme. */

:root {
  --bg: #05060d;
  --bg-2: #0a0c18;
  --ink: #e8ecf5;         /* silver white */
  --ink-dim: #aab3c7;
  --ink-mute: #6c7691;
  --line: rgba(200, 210, 235, 0.12);
  --line-strong: rgba(200, 210, 235, 0.22);
  --chip-bg: rgba(200, 210, 235, 0.06);
  --accent: #e8ecf5;
  --accent-glow: rgba(180, 195, 230, 0.55);
  --silver-grad: linear-gradient(180deg, #ffffff 0%, #d3d9ea 45%, #9ca4bb 100%);
  --font-display: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
  --font-body: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* LIGHT variant */
body[data-theme='light'] {
  --bg: #f2eee6;
  --bg-2: #e8e2d4;
  --ink: #1a1b24;
  --ink-dim: #3c4258;
  --ink-mute: #6a7088;
  --line: rgba(20, 22, 40, 0.12);
  --line-strong: rgba(20, 22, 40, 0.22);
  --chip-bg: rgba(20, 22, 40, 0.04);
  --accent: #1a1b24;
  --accent-glow: rgba(30, 40, 70, 0.35);
  --silver-grad: linear-gradient(180deg, #2a2d3d 0%, #4a5068 55%, #1a1b24 100%);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Starfield canvas */
.starfield {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  z-index: 0; pointer-events: none;
  background:
    radial-gradient(1200px 800px at 20% 10%, rgba(50, 70, 130, 0.25), transparent 60%),
    radial-gradient(1400px 900px at 85% 80%, rgba(120, 80, 160, 0.18), transparent 60%),
    linear-gradient(180deg, #05060d 0%, #080a16 50%, #03040a 100%);
}
body[data-theme='light'] .starfield {
  background:
    radial-gradient(1200px 800px at 20% 10%, rgba(180, 170, 230, 0.25), transparent 60%),
    radial-gradient(1400px 900px at 85% 80%, rgba(210, 190, 160, 0.22), transparent 60%),
    linear-gradient(180deg, #f2eee6 0%, #e8e2d4 50%, #d6cfbe 100%);
  filter: saturate(0.9);
}

.app {
  position: relative; z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 48px;
}

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 0;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: linear-gradient(180deg, rgba(5,6,13,0.75), rgba(5,6,13,0.25));
  border-bottom: 1px solid var(--line);
}
body[data-theme='light'] .nav {
  background: linear-gradient(180deg, rgba(242,238,230,0.8), rgba(242,238,230,0.3));
}
body[data-theme='light'] .avatar {
  background: radial-gradient(circle at 30% 30%, #e8e2d4, #c8c0ac 70%);
}
.nav-brand {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.02em;
  display: flex; align-items: baseline; gap: 10px;
}
.nav-star { font-size: 14px; color: var(--ink-dim); }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color .2s;
}
.nav-links a:hover { color: var(--ink); }
.nav-ctrls { display: flex; gap: 8px; align-items: center; }
.nav-btn {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 7px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .2s;
  letter-spacing: 0.05em;
}
.nav-btn:hover { color: var(--ink); border-color: var(--ink-dim); }
.nav-btn.on { color: var(--ink); background: var(--chip-bg); }

/* HERO */
.hero {
  padding: 140px 0 120px;
  position: relative;
  overflow: visible;
}
.hero-inner { max-width: 920px; }
.kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 40px;
  display: flex; align-items: center; gap: 14px;
}
.kicker::before {
  content: ''; width: 36px; height: 1px; background: var(--ink-mute);
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(64px, 10vw, 148px);
  line-height: 0.95;
  margin: 0 0 32px;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.hero-greeting {
  display: block;
  font-size: 0.32em;
  font-family: var(--font-body);
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--ink-dim);
  margin-bottom: 18px;
  font-style: italic;
}
.hero-name {
  background: var(--silver-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}
.hero-tag {
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.4;
  color: var(--ink);
  max-width: 780px;
  margin: 0 0 18px;
  font-weight: 300;
}
.hero-sub {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  margin: 0 0 56px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Buttons */
.btn {
  font: inherit;
  font-size: 14px;
  letter-spacing: 0.05em;
  padding: 14px 26px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .25s;
  display: inline-flex; align-items: center; gap: 10px;
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.btn-primary:hover {
  box-shadow: 0 0 28px var(--accent-glow);
  transform: translateY(-1px);
}
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--ink-dim); background: var(--chip-bg); }
.arr { transition: transform .2s; }
.btn:hover .arr { transform: translateX(4px); }

/* Hero meta */
.hero-meta {
  margin-top: 100px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.meta-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 8px;
}
.meta-val { font-size: 14px; color: var(--ink-dim); }
.meta-status { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-dim); }
.pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: #b8ffcc;
  box-shadow: 0 0 0 0 rgba(184, 255, 204, 0.7);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(184, 255, 204, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(184, 255, 204, 0); }
  100% { box-shadow: 0 0 0 0 rgba(184, 255, 204, 0); }
}

/* Sections */
.sec {
  padding: 120px 0;
  border-top: 1px solid var(--line);
  position: relative;
}
.sec-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 24px;
}
.sec-title {
  font-family: var(--font-display);
  font-size: clamp(44px, 6vw, 76px);
  line-height: 1;
  margin: 0 0 48px;
  font-weight: 400;
  letter-spacing: -0.01em;
  max-width: 980px;
}
.sub-title {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 400;
  margin: 80px 0 32px;
  letter-spacing: -0.005em;
}
.sec-lead {
  font-size: 20px;
  color: var(--ink-dim);
  max-width: 780px;
  margin-bottom: 40px;
  font-weight: 300;
  line-height: 1.5;
}
.muted { color: var(--ink-mute); }
.mono { font-family: var(--font-mono); }

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 80px;
  align-items: start;
}
.about-avatar { display: flex; flex-direction: column; gap: 18px; }
.avatar-ring {
  width: 220px; height: 220px;
  border-radius: 50%;
  padding: 2px;
  background: conic-gradient(from 0deg, transparent, rgba(200,210,235,0.5), transparent, rgba(200,210,235,0.3), transparent);
  animation: spin 20s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.avatar {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #1a1f35, #05060d 70%);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 96px;
  font-weight: 400;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong);
  animation: spin-back 20s linear infinite;
}
@keyframes spin-back { to { transform: rotate(-360deg); } }
.avatar-q {
  cursor: pointer;
  padding: 0;
  outline: none;
  font-family: var(--font-display);
  letter-spacing: -0.04em;
  transition: border-color .3s, box-shadow .3s, color .3s;
}
.avatar-q:hover {
  border-color: var(--ink-dim);
  box-shadow: 0 0 0 1px var(--ink-dim) inset, 0 0 24px rgba(200,210,235,0.10);
  color: var(--ink);
}
.avatar-q:focus-visible {
  box-shadow: 0 0 0 2px var(--ink-dim) inset, 0 0 0 4px rgba(200,210,235,0.18);
}
.avatar-ring.is-revealed .avatar-q {
  border-color: var(--ink-dim);
}
.avatar-wrap { position: relative; width: max-content; }
.avatar-wrap.is-revealed { z-index: 50; }
.avatar-wrap.is-revealed .avatar-ring,
.avatar-wrap.is-revealed .avatar { animation-play-state: paused; }
/* Lift the entire avatar column above its sibling .about-body
   so the popover wins against later stacking contexts. */
.about-avatar:has(.avatar-wrap.is-revealed) {
  position: relative;
  z-index: 50;
}
.avatar-reveal {
  position: absolute;
  top: calc(100% + 18px);
  left: 0;
  min-width: 220px;
  max-width: 280px;
  padding: 16px 36px 16px 18px;
  background-color: var(--bg-2);
  background-image: linear-gradient(180deg, var(--bg-2), var(--bg-2));
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-dim);
  z-index: 60;
  isolation: isolate;
  animation: reveal-pop .25s ease-out;
  box-shadow: 0 12px 40px rgba(0,0,0,0.55), 0 0 0 1px var(--line-strong);
}
.avatar-reveal::before {
  content: '';
  position: absolute;
  top: -7px;
  left: 28px;
  width: 12px; height: 12px;
  transform: rotate(45deg);
  background: var(--bg-2);
  border-left: 1px solid var(--line-strong);
  border-top: 1px solid var(--line-strong);
  z-index: -1;
}
.avatar-reveal-text { white-space: pre-line; }
.avatar-reveal-close {
  position: absolute;
  top: 6px; right: 6px;
  width: 22px; height: 22px;
  border: none;
  background: transparent;
  color: var(--ink-mute);
  font-size: 12px;
  cursor: pointer;
  border-radius: 50%;
  display: grid; place-items: center;
  transition: color .2s, background .2s;
}
.avatar-reveal-close:hover { color: var(--ink); background: rgba(200,210,235,0.08); }
@keyframes reveal-pop {
  from { opacity: 0; transform: translateY(-6px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.avatar-hint {
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.1em;
  padding-left: 4px;
  margin-top: -6px;
  opacity: 0.8;
  transition: opacity .3s, color .3s;
}
.avatar-hint:empty { display: none; }
.avatar-ring { position: relative; }
.avatar-caption { font-family: var(--font-mono); font-size: 12px; padding-left: 4px; }
.about-body p {
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink-dim);
  margin: 0 0 20px;
  max-width: 680px;
}

/* Services */
.svc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.svc-card {
  padding: 48px;
  background: var(--bg);
  position: relative;
  transition: background .3s;
}
.svc-card:hover { background: var(--bg-2); }
.svc-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-mute);
  margin-bottom: 24px;
}
.svc-title {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 400;
  margin: 0 0 16px;
  letter-spacing: -0.005em;
}
.svc-desc { color: var(--ink-dim); margin: 0 0 24px; font-size: 16px; line-height: 1.6; }
.svc-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 5px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-dim);
  letter-spacing: 0.04em;
}

/* AI Corner */
.ai-demo {
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  padding: 36px;
  background: linear-gradient(180deg, rgba(200,210,235,0.03), rgba(200,210,235,0.01));
  backdrop-filter: blur(10px);
}
.ai-head {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.ai-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 12px var(--accent-glow);
  animation: pulse 2s infinite;
}
.ai-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 10px;
}
.ai-input-row { display: flex; gap: 10px; margin-bottom: 16px; }
.ai-input {
  flex: 1;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 14px 22px;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color .2s;
}
.ai-input:focus { border-color: var(--ink-dim); }
.ai-input::placeholder { color: var(--ink-mute); }
.ai-presets { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  background: var(--chip-bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--ink-dim);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: all .2s;
}
.chip:hover:not(:disabled) { color: var(--ink); border-color: var(--line-strong); }
.chip:disabled { opacity: 0.5; cursor: not-allowed; }
.ai-out {
  margin-top: 24px;
  padding: 22px;
  border-top: 1px solid var(--line);
  min-height: 60px;
}
.ai-thinking { display: flex; gap: 6px; }
.ai-thinking span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ink-dim);
  animation: bounce 1.2s infinite;
}
.ai-thinking span:nth-child(2) { animation-delay: .15s; }
.ai-thinking span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}
.ai-ans {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-dim);
  white-space: pre-wrap;
}
.ai-err { color: #ffb3b3; font-family: var(--font-mono); font-size: 13px; }

/* ── KI-Werkstatt / Creative section ── */
.creative-sec { position: relative; overflow: hidden; }
.creative-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.7;
}
.creative-stars .cs {
  position: absolute;
  font-family: var(--font-display);
  color: var(--ink-mute);
  user-select: none;
  animation: cs-twinkle 4s ease-in-out infinite;
}
.creative-stars .cs1 { top: 8%; left: 6%; font-size: 18px; animation-delay: 0s; }
.creative-stars .cs2 { top: 22%; right: 10%; font-size: 22px; animation-delay: 0.8s; }
.creative-stars .cs3 { top: 48%; left: 3%; font-size: 14px; animation-delay: 1.6s; }
.creative-stars .cs4 { top: 62%; right: 5%; font-size: 28px; animation-delay: 2.2s; }
.creative-stars .cs5 { bottom: 28%; left: 12%; font-size: 16px; animation-delay: 0.4s; }
.creative-stars .cs6 { bottom: 12%; right: 18%; font-size: 20px; animation-delay: 2.8s; }
.creative-stars .cs7 { top: 35%; left: 48%; font-size: 18px; animation-delay: 1.2s; }
.creative-stars .cs8 { bottom: 40%; right: 38%; font-size: 14px; animation-delay: 3.2s; }
@keyframes cs-twinkle {
  0%, 100% { opacity: 0.2; transform: scale(1); }
  50%      { opacity: 0.9; transform: scale(1.15); }
}
.creative-sec > .sec-kicker,
.creative-sec > .sec-title,
.creative-sec > .sec-lead,
.creative-sec > .creative-grid,
.creative-sec > .creative-tagline,
.creative-sec > .claude-badge,
.creative-sec > .creative-sub,
.creative-sec > .tips-grid { position: relative; z-index: 1; }

.creative-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 40px;
}
.creative-card {
  position: relative;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(200,210,235,0.02);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color .3s, transform .3s, background .3s;
  overflow: hidden;
}
.creative-card::before {
  content: '✦';
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 14px;
  color: var(--ink-mute);
  opacity: 0.4;
  transition: opacity .3s, transform .3s;
}
.creative-card:hover { border-color: var(--line-strong); transform: translateY(-3px); background: rgba(200,210,235,0.04); }
.creative-card:hover::before { opacity: 0.9; transform: rotate(45deg); }
.creative-ic {
  font-size: 28px;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 6px;
}
.creative-t {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.creative-d {
  color: var(--ink-dim);
  font-size: 15px;
  line-height: 1.6;
}
.creative-card.has-video { grid-column: span 1; }

.creative-video {
  display: block;
  position: relative;
  margin-top: 14px;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #000;
  text-decoration: none;
  color: var(--ink);
  transition: border-color .3s;
}
.creative-video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease, opacity .3s;
  opacity: 0.85;
}
.creative-video:hover { border-color: var(--ink-dim); }
.creative-video:hover img { transform: scale(1.04); opacity: 1; }
.creative-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 54px; height: 54px;
  border-radius: 50%;
  background: rgba(10, 12, 22, 0.78);
  border: 1px solid rgba(255,255,255,0.5);
  color: #fff;
  display: grid; place-items: center;
  font-size: 18px;
  padding-left: 4px;
  backdrop-filter: blur(6px);
  transition: background .25s, transform .25s;
}
.creative-video:hover .creative-play { background: rgba(20, 24, 40, 0.95); transform: translate(-50%, -50%) scale(1.08); }
.creative-video-label {
  position: absolute;
  left: 12px; bottom: 10px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.45);
  padding: 4px 8px;
  border-radius: 4px;
}
.creative-video-note {
  margin-top: 8px;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  line-height: 1.5;
  opacity: 0.85;
}

.creative-tagline {
  margin: 56px auto 12px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 22px;
  font-style: italic;
  color: var(--ink-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  max-width: 820px;
  line-height: 1.4;
}
.creative-tagline .ct-star {
  font-size: 18px;
  color: var(--ink);
  animation: cs-twinkle 3s ease-in-out infinite;
  font-style: normal;
}
.creative-sub { margin-top: 72px; }

.claude-badge {
  margin: 18px auto 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(200,210,235,0.04);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
  width: fit-content;
  /* center the inline-flex inside its full-width parent */
  display: flex;
  width: max-content;
  max-width: calc(100% - 32px);
  margin-left: auto;
  margin-right: auto;
  transition: border-color .3s, background .3s, color .3s, transform .3s;
}
.claude-badge:hover {
  border-color: var(--ink-dim);
  background: rgba(200,210,235,0.07);
  color: var(--ink);
  transform: translateY(-1px);
}
.claude-badge .cb-dot {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--ink);
  animation: cs-twinkle 2.4s ease-in-out infinite;
}
.claude-badge .cb-text { white-space: normal; text-align: center; line-height: 1.4; }

@media (max-width: 960px) {
  .creative-grid { grid-template-columns: repeat(2, 1fr); }
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.tip-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(200,210,235,0.02);
  transition: border-color .3s, transform .3s;
}
.tip-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.tip-n {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-mute);
  margin-bottom: 14px;
}
.tip-t {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  margin-bottom: 10px;
}
.tip-d { color: var(--ink-dim); font-size: 15px; line-height: 1.6; }

/* Projects */
.proj-list { display: flex; flex-direction: column; }
.proj-row {
  display: grid;
  grid-template-columns: 100px 1fr 40px;
  gap: 40px;
  padding: 36px 0;
  border-top: 1px solid var(--line);
  align-items: start;
  cursor: default;
  transition: background .3s;
}
.proj-row:last-child { border-bottom: 1px solid var(--line); }
.proj-row:hover { background: rgba(200,210,235,0.02); }
.proj-row:hover .proj-arr { transform: translate(4px, -4px); color: var(--ink); }
.proj-y {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-mute);
  letter-spacing: 0.1em;
  padding-top: 8px;
}
.proj-t {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  margin-bottom: 8px;
  letter-spacing: -0.005em;
}
.proj-d { color: var(--ink-dim); font-size: 16px; margin-bottom: 12px; max-width: 720px; line-height: 1.6; }
.proj-stack { font-size: 12px; color: var(--ink-mute); letter-spacing: 0.08em; }
.proj-arr {
  font-size: 24px;
  color: var(--ink-mute);
  transition: all .3s;
  padding-top: 8px;
}

/* CV */
.cv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}
.cv-h {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.cv-list { list-style: none; padding: 0; margin: 0; }
.cv-list li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--line);
}
.cv-t { color: var(--ink); font-size: 17px; }
.cv-n { font-size: 12px; color: var(--ink-mute); letter-spacing: 0.08em; }

/* Contact */
.contact-grid-simple {
  display: grid;
  grid-template-columns: minmax(0, 620px);
  justify-content: start;
  gap: 24px;
  margin-top: 40px;
}
.contact-side-full { width: 100%; }
.contact-side-full .contact-note { margin-top: 8px; }
.contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 64px;
  margin-top: 40px;
}
.contact-form { display: flex; flex-direction: column; gap: 18px; }
.contact-form label { display: flex; flex-direction: column; gap: 8px; }
.contact-form label span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.contact-form input, .contact-form textarea {
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 14px 18px;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color .2s;
  resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--ink-dim); }
.contact-form button { align-self: flex-start; margin-top: 8px; }
.contact-form button:disabled { opacity: 0.4; }
.contact-note { font-size: 11px; color: var(--ink-mute); margin-top: 4px; letter-spacing: 0.05em; }
.contact-sent { padding: 40px; text-align: center; border: 1px dashed var(--line-strong); border-radius: 16px; }
.sent-icon { font-size: 48px; color: var(--ink); margin-bottom: 12px; }

.contact-side { display: flex; flex-direction: column; gap: 14px; }
.ch-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 14px; align-items: center;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  text-decoration: none;
  transition: all .25s;
}
.ch-row:hover { border-color: var(--line-strong); background: rgba(200,210,235,0.03); transform: translateX(3px); }
.ch-ic { font-size: 18px; color: var(--ink-dim); }
.ch-lbl { font-size: 15px; }
.ch-val { font-size: 12px; color: var(--ink-mute); letter-spacing: 0.04em; }
.ch-quote {
  margin-top: 12px;
  padding: 24px;
  border-left: 1px solid var(--line-strong);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-dim);
  position: relative;
}
.quote-mark {
  font-size: 52px;
  font-family: var(--font-display);
  color: var(--ink-mute);
  line-height: 0.5;
  margin-bottom: 8px;
}

/* Rocket */
:root {
  --rocket-body: rgba(200, 210, 235, 0.12);
  --rocket-shine: rgba(255,255,255,0.25);
  --rocket-stroke: rgba(200, 210, 235, 0.55);
  --rocket-fin: rgba(180, 195, 225, 0.15);
  --rocket-window-bg: rgba(100, 130, 200, 0.18);
  --rocket-window: rgba(140, 180, 255, 0.35);
  --rocket-exhaust-outer: rgba(180, 195, 225, 0.3);
  --rocket-flame-1: rgba(255, 200, 100, 0.75);
  --rocket-flame-2: rgba(255, 255, 200, 0.9);
}
body[data-theme='light'] {
  --rocket-body: rgba(40, 40, 80, 0.08);
  --rocket-shine: rgba(255,255,255,0.45);
  --rocket-stroke: rgba(60, 70, 120, 0.4);
  --rocket-fin: rgba(60, 70, 120, 0.1);
  --rocket-window-bg: rgba(100, 120, 200, 0.15);
  --rocket-window: rgba(120, 160, 230, 0.4);
  --rocket-exhaust-outer: rgba(80, 90, 150, 0.2);
  --rocket-flame-1: rgba(255, 160, 60, 0.8);
  --rocket-flame-2: rgba(255, 230, 150, 0.95);
}
.hero-rocket {
  position: absolute;
  right: clamp(80px, 12vw, 220px);
  top: 50%;
  transform: translateY(-55%);
  width: clamp(100px, 10vw, 160px);
  pointer-events: none;
  animation: rocket-float 6s ease-in-out infinite;
  filter: drop-shadow(0 0 28px var(--accent-glow));
}
.rocket-svg { width: 100%; height: auto; display: block; }
@keyframes rocket-float {
  0%, 100% { transform: translateY(-55%) rotate(-3deg); }
  50%       { transform: translateY(-62%) rotate(3deg); }
}
.rocket-flame {
  transform-origin: 80px 152px;
  animation: flame-flicker 0.4s ease-in-out infinite alternate;
}
.rocket-flame-inner {
  transform-origin: 80px 152px;
  animation: flame-flicker 0.25s ease-in-out infinite alternate-reverse;
}
@keyframes flame-flicker {
  from { transform: scaleY(1) scaleX(1); opacity: 0.8; }
  to   { transform: scaleY(1.18) scaleX(0.88); opacity: 1; }
}
.spark { animation: spark-twinkle 3s ease-in-out infinite; }
.s1 { animation-delay: 0s; }
.s2 { animation-delay: 0.8s; }
.s3 { animation-delay: 1.6s; }
.s4 { animation-delay: 2.4s; }
@keyframes spark-twinkle {
  0%, 100% { opacity: 0.15; r: 1; }
  50%       { opacity: 0.6; r: 2.5; }
}
body[data-anim='off'] .hero-rocket,
body[data-anim='off'] .rocket-flame,
body[data-anim='off'] .rocket-flame-inner,
body[data-anim='off'] .spark { animation: none; }

/* AI-built badge */
.ai-built-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 40px;
  padding: 10px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-dim);
  letter-spacing: 0.04em;
  background: rgba(200,210,235,0.03);
}
.ai-built-dot {
  color: var(--ink);
  text-shadow: 0 0 12px var(--accent-glow);
  animation: twinkle 3s infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}
body[data-anim='off'] .ai-built-dot { animation: none; }

/* Footer */
.footer {
  padding: 60px 0 80px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.08em;
}
.footer-links { display: flex; align-items: center; gap: 10px; }
.footer-links a {
  color: var(--ink-dim);
  text-decoration: none;
  transition: color .2s;
  cursor: pointer;
}
.footer-links a:hover { color: var(--ink); }
.footer-dot { opacity: 0.5; }

/* Consent on form */
.consent-row {
  display: flex !important;
  flex-direction: row !important;
  gap: 12px !important;
  align-items: flex-start;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-dim) !important;
  font-family: var(--font-body);
  letter-spacing: 0 !important;
  text-transform: none !important;
}
.consent-row input[type='checkbox'] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px; height: 18px;
  min-width: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  margin: 2px 0 0;
  cursor: pointer;
  position: relative;
  background: transparent;
  transition: all .2s;
}
.consent-row input[type='checkbox']:hover { border-color: var(--ink-dim); }
.consent-row input[type='checkbox']:checked {
  background: var(--ink);
  border-color: var(--ink);
}
.consent-row input[type='checkbox']:checked::after {
  content: '';
  position: absolute;
  left: 5px; top: 1px;
  width: 5px; height: 10px;
  border: solid var(--bg);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.consent-text { flex: 1; }
.consent-text a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.consent-err {
  color: #ffb3b3;
  font-size: 11px;
  margin-top: -4px;
  letter-spacing: 0.04em;
}
body[data-theme='light'] .consent-err { color: #b8230a; }

/* Cookie banner */
.cookie-banner {
  position: fixed;
  left: 24px; right: 24px; bottom: 24px;
  z-index: 100;
  display: flex; justify-content: center;
  animation: cookie-rise .5s cubic-bezier(.2,.7,.3,1);
}
@keyframes cookie-rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cookie-inner {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 18px;
  align-items: center;
  max-width: 900px;
  width: 100%;
  padding: 18px 22px;
  background: linear-gradient(180deg, rgba(15, 18, 35, 0.95), rgba(8, 10, 22, 0.95));
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 40px var(--accent-glow);
}
body[data-theme='light'] .cookie-inner {
  background: linear-gradient(180deg, rgba(248, 244, 236, 0.95), rgba(238, 232, 220, 0.95));
  box-shadow: 0 20px 60px rgba(80, 60, 30, 0.18);
}
.cookie-ic {
  font-size: 22px;
  color: var(--ink);
  text-shadow: 0 0 14px var(--accent-glow);
  animation: twinkle 3s infinite;
}
.cookie-title {
  font-family: var(--font-display);
  font-size: 19px;
  margin-bottom: 4px;
  color: var(--ink);
}
.cookie-text {
  font-size: 13px;
  color: var(--ink-dim);
  line-height: 1.5;
}
.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-actions .btn { padding: 10px 18px; font-size: 13px; }
.cookie-link { background: transparent; }

/* Legal modal */
.legal-overlay {
  position: fixed; inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: rgba(5, 6, 13, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fade-in .3s ease;
}
body[data-theme='light'] .legal-overlay { background: rgba(40, 30, 20, 0.4); }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.legal-modal {
  width: 100%;
  max-width: 720px;
  max-height: 84vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.55);
  overflow: hidden;
  animation: modal-rise .35s cubic-bezier(.2,.7,.3,1);
}
@keyframes modal-rise {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.legal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  border-bottom: 1px solid var(--line);
}
.legal-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.legal-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink-dim);
  cursor: pointer;
  font-size: 14px;
  transition: all .2s;
}
.legal-close:hover { color: var(--ink); border-color: var(--ink-dim); }
.legal-body {
  overflow-y: auto;
  padding: 22px 28px 32px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.legal-intro {
  font-size: 15px;
  color: var(--ink-dim);
  line-height: 1.65;
  margin: 0 0 26px;
  padding-bottom: 22px;
  border-bottom: 1px dashed var(--line);
}
.legal-sec { margin-bottom: 22px; }
.legal-sec h4 {
  margin: 0 0 8px;
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 600;
}
.legal-sec p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-dim);
  white-space: pre-line;
}
.legal-update {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.08em;
}

@media (max-width: 700px) {
  .cookie-banner { left: 12px; right: 12px; bottom: 12px; }
  .cookie-inner {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px;
  }
  .cookie-ic { display: none; }
  .cookie-actions { flex-direction: column; }
  .cookie-actions .btn { width: 100%; }
  .legal-head { padding: 18px 20px; }
  .legal-head h3 { font-size: 22px; }
  .legal-body { padding: 18px 20px 24px; }
}

/* Reveal animations */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s cubic-bezier(.2,.7,.3,1), transform .9s cubic-bezier(.2,.7,.3,1); }
.reveal.is-in { opacity: 1; transform: translateY(0); }
body[data-anim='low'] .reveal { transition-duration: .3s; transform: none; }
body[data-anim='off'] .reveal { opacity: 1; transform: none; transition: none; }
body[data-anim='off'] .avatar-ring,
body[data-anim='off'] .avatar { animation: none; }
body[data-anim='off'] .pulse,
body[data-anim='off'] .ai-dot { animation: none; }

/* Sectioned layout (tabbed) */
body[data-layout='sectioned'] .sec { display: none; }
body[data-layout='sectioned'] .sec.is-active { display: block; }
body[data-layout='sectioned'] .hero { padding-bottom: 40px; }
body[data-layout='sectioned'] .nav-links a.active { color: var(--ink); }
body[data-layout='sectioned'] .nav-links a.active::after {
  content: ''; display: block; width: 6px; height: 6px; background: var(--ink);
  border-radius: 50%; margin: 4px auto 0;
}

/* Responsive */
@media (max-width: 860px) {
  .app { padding: 0 24px; }
  .nav-links { display: none; }
  .hero { padding: 80px 0 60px; }
  .hero-meta { grid-template-columns: 1fr 1fr; gap: 20px; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .avatar-ring { width: 160px; height: 160px; }
  .svc-grid, .tips-grid, .cv-grid, .contact-grid { grid-template-columns: 1fr; }
  .creative-grid { grid-template-columns: 1fr; }
  .creative-tagline { font-size: 18px; gap: 12px; padding: 0 12px; }
  .proj-row { grid-template-columns: 70px 1fr 28px; gap: 16px; }
  .proj-t { font-size: 24px; }
  .sec { padding: 80px 0; }
}
