/* ==========================================================================
   janik wahrheit — portfolio
   Light & airy: soft blue mesh background, frosted-glass surfaces,
   blue gradient accents. Inter for body/UI, JetBrains Mono only
   for small label-style accents.
   ========================================================================== */

:root {
  /* type */
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* layout */
  --wrap: 1120px;
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 72px;

  /* palette */
  --bg: #f6f8fb;
  --bg-card: rgba(255, 255, 255, .58);
  --glass-border: rgba(255, 255, 255, .78);
  --glass-blur: blur(18px) saturate(160%);
  --text: #1e2530;
  --text-muted: #667085;
  --border-soft: #e4e8ef;

  --accent: #2563eb;
  --accent-2: #3b82f6;
  --accent-dark: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, .1);
  --accent-ring: #bfdbfe;
  --logo-blue: #3768bc;
  --accent-grad: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);

  /* glass: a bright hairline edge + a soft, cool drop shadow */
  --shadow-sm: inset 0 0 0 1px var(--glass-border), 0 10px 30px -22px rgba(15, 35, 80, .35);
  --shadow-md: inset 0 0 0 1px var(--glass-border), 0 14px 34px -20px rgba(15, 35, 80, .4);
  --shadow-lg: inset 0 0 0 1px rgba(191, 219, 254, .9), 0 22px 44px -22px rgba(37, 99, 235, .45);

  --media-bg: rgba(37, 99, 235, .06);
  --media-line: #94a0b4;
  --media-node: #2563eb;

  --on-dark: #f5f9ff;
  --on-dark-muted: rgba(224, 236, 255, .86);

  color-scheme: light;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  overflow-x: hidden;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
::selection { background: var(--accent); color: #fff; }

/* fine film grain over the whole page */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 300;
  pointer-events: none;
  opacity: .03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* soft mesh behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(55% 45% at 8% 0%, rgba(59, 130, 246, .2), transparent 70%),
    radial-gradient(45% 40% at 96% 12%, rgba(56, 189, 248, .22), transparent 70%),
    radial-gradient(55% 45% at 60% 100%, rgba(125, 211, 252, .12), transparent 70%);
}

/* frosted glass surfaces */
.teaser, .tech-tile, .timeline-card, .timeline-marker,
.project-card, .social-row a, .btn-secondary, .lang-toggle, .nav-toggle, .eyebrow {
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 max(24px, env(safe-area-inset-right)) 0 max(24px, env(safe-area-inset-left));
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--bg-card);
  color: var(--text);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  z-index: 1000;
}
.skip-link:focus { left: 16px; top: 16px; }

.icon { width: 20px; height: 20px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 16px;
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-grad);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, translate .35s cubic-bezier(.2,.7,.2,1), box-shadow .15s ease, background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn.is-magnet { transition-duration: .15s, .08s, .15s, .15s, .15s, .15s; }
.btn-primary {
  background: var(--accent-grad);
  color: #fff;
  box-shadow: 0 8px 22px -12px rgba(37, 99, 235, .7), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px -12px rgba(37, 99, 235, .75), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--glass-border);
  box-shadow: 0 8px 22px -18px rgba(15, 35, 80, .4);
}
.btn-secondary:hover { border-color: var(--accent-ring); color: var(--accent); transform: translateY(-1px); }
.btn-sm { padding: 9px 18px; font-size: 0.85rem; }

/* ---------- header ---------- */
/* invisible at the top; a full-width frosted bar once the page scrolls */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid transparent;
  transition: background-color .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-bottom-color: rgba(255, 255, 255, .75);
  box-shadow: 0 10px 30px -24px rgba(15, 35, 80, .35);
}
.site-header::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 160px;
  pointer-events: none;
  transition: background-color .3s ease;
}
.site-header.is-scrolled::before {
  background: rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--accent-grad);
  transform: scaleX(var(--scroll-progress, 0));
  transform-origin: left;
  pointer-events: none;
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);
}
.brand-word {
  font-family: var(--font);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.025em;
  color: #222;
}
.brand-accent { color: var(--logo-blue); }
.brand-mark { display: none; height: 38px; width: auto; }
.nav {
  display: flex;
  gap: 32px;
  flex: 1;
  justify-content: center;
}
.nav a {
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 4px 2px;
  transition: color .15s ease;
}
.nav a:hover,
.nav a.active { color: var(--text); }
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -4px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent-grad);
  transition: right .2s ease;
}
.nav a:hover::after,
.nav a.active::after { right: 0; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-toggle {
  border: 1px solid var(--border-soft);
  background: var(--bg-card);
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.lang-toggle:hover { border-color: var(--accent); color: var(--accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border-soft);
  border-radius: 50%;
  background: var(--bg-card);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 14px;
  height: 1.6px;
  margin: 0 auto;
  background: var(--text);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }

/* ---------- page header (About) ---------- */
.page-header {
  padding: 64px 0 8px;
  text-align: center;
}
.page-header h1 {
  font-size: clamp(2.2rem, 4.4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.page-header p {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ---------- sections ---------- */
.section { padding: 112px 0; }
.section--alt { background: linear-gradient(rgba(255, 255, 255, .45), rgba(255, 255, 255, .15)); }
.section-head { max-width: 620px; margin: 0 auto 48px; text-align: center; }
.section-head h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-wrap: balance;
}
.section-head p { margin-top: 12px; color: var(--text-muted); font-size: 1.05rem; }

/* ==========================================================================
   HOME
   ========================================================================== */

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 120px 0 72px;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 560px;
  height: 560px;
  background:
    radial-gradient(circle at 30% 35%, #93c5fd, transparent 60%),
    radial-gradient(circle at 70% 65%, #bae6fd, transparent 60%);
  opacity: .42;
  filter: blur(90px);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  translate: var(--gx, 0px) var(--gy, 0px);
  pointer-events: none;
  z-index: 0;
  animation: blob-drift 18s ease-in-out infinite alternate;
}
@keyframes blob-drift {
  0%   { transform: translate(-58%, -52%) scale(1); }
  50%  { transform: translate(-44%, -46%) scale(1.08); }
  100% { transform: translate(-52%, -56%) scale(.96); }
}
.hero-inner { position: relative; z-index: 1; max-width: 860px; }
.hero h1 {
  font-size: clamp(2.5rem, 5.2vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.08;
  color: var(--text);
}
/* accent words: blue gradient text with a soft translucent underline */
.hero h1 .accent-text {
  background: linear-gradient(100deg, #1d4ed8 0%, #2563eb 50%, #3b82f6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-decoration: underline;
  text-decoration-color: rgba(37, 99, 235, .22);
  text-decoration-thickness: .06em;
  text-underline-offset: .14em;
}
/* rotating word: JS swaps the text and animates width so the line doesn't jump */
.rotator {
  display: inline-block;
  white-space: nowrap;
  vertical-align: bottom;
  transition: opacity .3s ease, transform .3s ease, filter .3s ease, width .45s cubic-bezier(.2,.7,.2,1);
}
.rotator.is-out { opacity: 0; transform: translateY(-0.28em); filter: blur(6px); }
.rotator.is-in { opacity: 0; transform: translateY(0.28em); filter: blur(6px); transition: width .45s cubic-bezier(.2,.7,.2,1); }
.hero-sub {
  margin: 22px auto 0;
  max-width: 600px;
  font-size: 1.15rem;
  color: var(--text-muted);
}
.hero-cta {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 38px;
  flex-wrap: wrap;
}

/* staggered entrance */
.hero-inner > * { animation: hero-rise .8s cubic-bezier(.2,.7,.2,1) both; }
.hero-inner > :nth-child(2) { animation-delay: .08s; }
.hero-inner > :nth-child(3) { animation-delay: .18s; }
.hero-inner > :nth-child(4) { animation-delay: .28s; }
@keyframes hero-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- about teaser ---------- */
.teaser {
  display: flex;
  align-items: center;
  gap: 40px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 44px;
}
.teaser-avatar-wrap { position: relative; flex: 0 0 auto; }
.wave-badge {
  position: absolute;
  right: -6px;
  bottom: -2px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px var(--border-soft), 0 6px 14px -6px rgba(16, 24, 40, .3);
  font-size: 1.1rem;
  line-height: 1;
  transform-origin: 70% 75%;
}
.teaser:hover .wave-badge { animation: wave 1.3s ease-in-out; }
@keyframes wave {
  0%, 100% { transform: rotate(0); }
  15% { transform: rotate(16deg); }
  30% { transform: rotate(-10deg); }
  45% { transform: rotate(14deg); }
  60% { transform: rotate(-6deg); }
  75% { transform: rotate(8deg); }
}
.teaser-avatar {
  flex: 0 0 auto;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.teaser-avatar { background: #fff; }
/* memoji PNG has generous white padding — zoom so the face fills the circle */
.teaser-avatar img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.7) translateY(2%); }
.teaser-text p { color: var(--text-muted); font-size: 1rem; }
.teaser-text p + p { margin-top: 10px; }
.teaser-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}
.teaser-link:hover { color: var(--accent-dark); }

/* ---------- contact ---------- */
.contact { text-align: center; background: transparent; }
.contact-card {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 72px 40px 60px;
  border-radius: 32px;
  overflow: hidden;
  background:
    radial-gradient(60% 90% at 100% 0%, rgba(59, 130, 246, .55), transparent 65%),
    radial-gradient(55% 80% at 0% 100%, rgba(56, 189, 248, .28), transparent 65%),
    linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 40px 80px -40px rgba(15, 35, 80, .7);
}
.contact-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: .01em;
  color: var(--on-dark-muted);
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .16);
  padding: 7px 16px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.status-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: #34d399;
  animation: status-pulse 2.2s ease-out infinite;
}
@keyframes status-pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .45); }
  70% { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
.contact-card h2 { color: var(--on-dark); font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 700; letter-spacing: -0.03em; }
.contact-card p { max-width: 580px; margin: 12px auto 0; color: var(--on-dark-muted); font-size: 1.02rem; }
.contact-cta {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.contact .btn-secondary {
  background: rgba(255, 255, 255, .08);
  color: var(--on-dark);
  border-color: rgba(255, 255, 255, .3);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.contact .btn-secondary:hover { border-color: var(--accent-ring); color: #fff; }
.contact .btn-primary { background: #fff; color: var(--accent-dark); box-shadow: 0 12px 28px -14px rgba(0, 0, 0, .5); }

/* ==========================================================================
   ABOUT
   ========================================================================== */

.about-content { max-width: 700px; margin: 0 auto; }
.about-photo {
  width: 168px;
  height: 168px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 28px;
  box-shadow: var(--shadow-lg);
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-content p { margin-bottom: 16px; color: var(--text-muted); font-size: 1.02rem; }
.about-content p.wave { font-size: 1.15rem; color: var(--text); }
.about-content a { color: var(--accent); font-weight: 600; text-decoration: none; }
.about-content a:hover { color: var(--accent-dark); }

.social-row {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  justify-content: center;
}
.social-row a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, color .15s ease;
}
.social-row a:hover { color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* ---------- tech stack ---------- */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 820px;
  margin: 0 auto;
}
.tech-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 22px 12px;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.tech-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.tech-tile-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tech-tile-icon { transition: background-color .25s ease, color .25s ease; }
.tech-tile-icon .icon { width: 20px; height: 20px; transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.tech-tile:hover .tech-tile-icon { background: var(--accent-grad); color: #fff; }
.tech-tile:hover .tech-tile-icon .icon { transform: scale(1.1); }
.tech-tile span { font-size: 0.85rem; font-weight: 500; text-align: center; }

/* ---------- CV timeline ---------- */
.timeline {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 0;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 28px;
  width: 2px;
  background: var(--border-soft);
  z-index: 0;
}
.timeline::after {
  content: "";
  position: absolute;
  top: 0;
  left: 28px;
  width: 2px;
  height: 100%;
  background: linear-gradient(#93c5fd, #2563eb);
  transform: scaleY(var(--timeline-progress, 0));
  transform-origin: top;
  transition: transform .1s linear;
  z-index: 0;
}

.timeline-item {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 56px 1fr;
  column-gap: 20px;
  align-items: start;
  margin-bottom: 28px;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-marker {
  grid-column: 1;
  grid-row: 1;
  z-index: 1;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.timeline-marker span {
  display: block;
  font-size: 1.4rem;
  line-height: 1;
  transform: translateY(0.05em);
}

.timeline-card {
  min-width: 0;
  overflow-wrap: anywhere;
  grid-column: 2;
  grid-row: 1;
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 18px 22px;
  box-shadow: var(--shadow-sm);
}
.timeline-date {
  display: inline-block;
  font-family: var(--font);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--accent);
  margin-bottom: 6px;
  text-transform: uppercase;
}
.timeline-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; }
.timeline-card p { color: var(--text-muted); font-size: 0.92rem; }

@media (min-width: 720px) {
  .timeline::before,
  .timeline::after { left: 50%; transform: translateX(-50%); }
  .timeline::after { transform: translateX(-50%) scaleY(var(--timeline-progress, 0)); }

  .timeline-item {
    grid-template-columns: 1fr 56px 1fr;
    column-gap: 24px;
  }
  .timeline-marker { grid-column: 2; justify-self: center; }

  .timeline-item:nth-child(odd) .timeline-card { grid-column: 1; text-align: right; }
  .timeline-item:nth-child(even) .timeline-card { grid-column: 3; text-align: left; }
}

.timeline-item.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s ease, transform .55s ease;
  transition-delay: var(--reveal-delay, 0s);
}
.timeline-item.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (min-width: 720px) {
  .timeline-item:nth-child(odd).reveal { transform: translate(-22px, 10px); }
  .timeline-item:nth-child(even).reveal { transform: translate(22px, 10px); }
  .timeline-item.reveal.is-visible { transform: translate(0, 0); }
}

.timeline-marker.reveal {
  opacity: 0;
  transform: scale(0.5);
  transition: opacity .4s ease, transform .4s ease;
  transition-delay: calc(var(--reveal-delay, 0s) + .1s);
}
.timeline-marker.reveal.is-visible { opacity: 1; transform: scale(1); }

@media (prefers-reduced-motion: reduce) {
  .timeline::after { transition: none; }
  .timeline-item.reveal,
  .timeline-marker.reveal { transition: none; }
}

/* ---------- projects (About: Other Projects) ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.project-card {
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.project-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.project-card h3 { font-size: 1.05rem; font-weight: 600; }
.project-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
  margin-top: -6px;
}

.project-card--link { justify-content: flex-start; }
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--accent);
  align-self: flex-start;
}
.project-link:hover { color: var(--accent-dark); }

.project-media {
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 300 / 170;
  background: var(--media-bg);
  box-shadow: inset 0 0 0 1px var(--border-soft);
}
.project-svg { width: 100%; height: 100%; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.project-card:hover .project-svg { transform: scale(1.04); }

/* cover micro-animations: key line redraws on hover, signal pings loop */
.cv-draw { stroke-dasharray: 420; stroke-dashoffset: 0; }
.project-card:hover .cv-draw { animation: cv-draw 1.2s cubic-bezier(.4, 0, .2, 1) both; }
@keyframes cv-draw { from { stroke-dashoffset: 420; } to { stroke-dashoffset: 0; } }
.cv-ping { transform-box: fill-box; transform-origin: center; animation: cv-ping 2.6s ease-out infinite; }
@keyframes cv-ping { 0% { transform: scale(.5); opacity: .9; } 100% { transform: scale(1.9); opacity: 0; } }

.tech-label {
  display: block;
  font-family: var(--font);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.83rem;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent-dark);
}
.badge .icon { width: 15px; height: 15px; }

.tag {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ---------- footer ---------- */
.site-footer {
  color: var(--text);
  padding: 52px 24px calc(36px + env(safe-area-inset-bottom, 0px));
  text-align: center;
  border-top: 1px solid rgba(37, 99, 235, .1);
  background: linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, .5));
}
.footer-nav {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color .15s ease;
}
.footer-nav a:hover { color: var(--accent); }
.social-row--footer a:hover { background: var(--accent-grad); color: #fff; }
.made-by {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: .85;
}
.made-by-mark { height: 22px; width: auto; transition: transform .25s ease; }
.made-by:hover .made-by-mark { transform: rotate(-6deg) scale(1.08); }
.footer-name {
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* ---------- cursor spotlight on cards ---------- */
.spotlight { position: relative; overflow: hidden; }
.spotlight::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(37, 99, 235, .1), transparent 70%);
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
.spotlight:hover::after { opacity: 1; }

/* ---------- scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .hero-inner > * { animation: none; }
  .status-dot { animation: none; }
  .tech-tile-icon, .tech-tile-icon .icon { transition: none; }
  .hero::before { animation: none; }
  .cv-ping, .project-card:hover .cv-draw { animation: none; }
  .teaser:hover .wave-badge { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .tech-grid { grid-template-columns: repeat(3, 1fr); }

  .hero { padding: 80px 0 88px; }
}

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

@media (max-width: 720px) {
  .teaser { flex-direction: column; text-align: center; padding: 32px 26px; }
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 64px 0; }
}

@media (max-width: 680px) {
  .nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 12px;
    right: 12px;
    flex-direction: column;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 0 0 1px var(--border-soft), 0 24px 48px -20px rgba(15, 35, 80, .35);
    padding: 8px 24px 16px;
    gap: 4px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
  }
  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav a { padding: 10px 0; }
  .site-header.is-scrolled,
  .site-header.is-scrolled::before {
    background: rgba(246, 248, 252, .94);
  }
  .site-header.is-scrolled { border-bottom-color: rgba(147, 197, 253, .45); }
  .nav-toggle { display: flex; }
  .brand-word { display: none; }
  .brand-mark { display: block; }
}
