/* ============================================
   PETTER — Super Flashy Personal Website
   ============================================ */

:root,
[data-theme="lime"] {
  --bg: #0a0a0a;
  --bg-alt: #111111;
  --text: #f0f0f0;
  --text-muted: #888888;
  --accent: #c8ff00;
  --accent-alt: #00ffc8;
  --accent-glow: rgba(200, 255, 0, 0.15);
  --gradient: linear-gradient(135deg, var(--accent), var(--accent-alt));
  --font-display: 'Syne', sans-serif;
  --font-body: 'Space Grotesk', sans-serif;
  --section-padding: clamp(4rem, 10vw, 8rem);
  --gap: clamp(1rem, 3vw, 2rem);
}

[data-theme="purple"] {
  --accent: #b388ff;
  --accent-alt: #ff80ab;
  --accent-glow: rgba(179, 136, 255, 0.15);
  --gradient: linear-gradient(135deg, #b388ff, #ff80ab);
}

[data-theme="fire"] {
  --accent: #ff6d00;
  --accent-alt: #ff1744;
  --accent-glow: rgba(255, 109, 0, 0.15);
  --gradient: linear-gradient(135deg, #ff6d00, #ff1744);
}

[data-theme="ice"] {
  --accent: #40c4ff;
  --accent-alt: #e0e0e0;
  --accent-glow: rgba(64, 196, 255, 0.15);
  --gradient: linear-gradient(135deg, #40c4ff, #e0e0e0);
}

[data-theme="gold"] {
  --accent: #ffd600;
  --accent-alt: #ff9100;
  --accent-glow: rgba(255, 214, 0, 0.15);
  --gradient: linear-gradient(135deg, #ffd600, #ff9100);
}

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

::selection {
  background: var(--accent);
  color: var(--bg);
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--bg);
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

/* ---- Particle Canvas ---- */
#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ---- Theme Switcher ---- */
.theme-switcher {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  z-index: 10002;
  display: none; /* hidden for now — change to flex to re-enable */
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(17, 17, 17, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-top: none;
  border-radius: 0 0 12px 12px;
  backdrop-filter: blur(20px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.theme-switcher.visible {
  transform: translateX(-50%) translateY(0);
}

.theme-switcher-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-right: 0.25rem;
}

.theme-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: none;
  padding: 2px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-btn span {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
}

.theme-btn:hover {
  transform: scale(1.2);
}

.theme-btn.active {
  border-color: var(--text);
}

/* ---- Ripple Effect ---- */
.ripple-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}

.ripple {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--accent);
  animation: rippleOut 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: none;
}

@keyframes rippleOut {
  0% {
    width: 0;
    height: 0;
    opacity: 0.5;
  }
  100% {
    width: 200px;
    height: 200px;
    opacity: 0;
  }
}

/* ---- Loading Screen ---- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  transition: clip-path 1s cubic-bezier(0.76, 0, 0.24, 1);
  clip-path: inset(0 0 0 0);
}

.loader.hidden {
  clip-path: inset(0 0 100% 0);
}

.loader-bar {
  width: 200px;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  order: 3;
}

.loader-bar-fill {
  width: 0%;
  height: 100%;
  background: var(--gradient);
  transition: width 0.1s linear;
}

/* Same rule as the hero title: one word, one line. The flex row can't wrap, so the
   only failure mode is overflow — the old 3rem floor pushed the six letters past a
   320px viewport and gave the whole page a horizontal scrollbar. 10vw fits (letters
   + gaps ≈ 7.5em), and the 2rem floor only kicks in below 320px. */
.loader-text {
  display: flex;
  gap: 0.15em;
  font-family: var(--font-display);
  font-size: clamp(2rem, 10vw, 8rem);
  font-weight: 800;
  text-transform: uppercase;
}

.loader-text span {
  display: inline-block;
  opacity: 0;
  transform: translateY(100%) rotateX(90deg);
  animation: letterIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.loader-text span:nth-child(1) { animation-delay: 0.1s; }
.loader-text span:nth-child(2) { animation-delay: 0.17s; }
.loader-text span:nth-child(3) { animation-delay: 0.24s; }
.loader-text span:nth-child(4) { animation-delay: 0.31s; }
.loader-text span:nth-child(5) { animation-delay: 0.38s; }
.loader-text span:nth-child(6) { animation-delay: 0.45s; }

.loader-percent {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.3em;
  order: 4;
}

/* Escape hatch: jump straight to projects without waiting for the intro */
.loader-skip {
  order: 5;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.6rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  opacity: 0;
  animation: skipFadeIn 0.5s ease 0.9s forwards;
  transition: color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

@keyframes skipFadeIn {
  to { opacity: 1; }
}

.loader-skip:hover {
  color: var(--text);
  border-color: var(--accent, rgba(200, 255, 0, 0.5));
  transform: translateY(-2px);
}

@keyframes letterIn {
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
  }
}

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem clamp(1.5rem, 4vw, 3rem);
  backdrop-filter: blur(20px);
  background: rgba(10, 10, 10, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transform: translateY(-100%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.3s ease;
}

.nav.visible {
  transform: translateY(0);
}

.nav.scrolled {
  background: rgba(10, 10, 10, 0.9);
  border-bottom: 1px solid rgba(200, 255, 0, 0.1);
}

/* Glitch text effect */
[data-glitch] {
  position: relative;
}

[data-glitch]:hover::before,
[data-glitch]:hover::after {
  content: attr(data-glitch);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

[data-glitch]:hover::before {
  color: var(--accent);
  animation: glitch1 0.3s infinite;
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
  -webkit-text-fill-color: unset;
}

[data-glitch]:hover::after {
  color: var(--accent-alt);
  animation: glitch2 0.3s infinite;
  clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
  -webkit-text-fill-color: unset;
}

@keyframes glitch1 {
  0% { transform: translate(0); }
  20% { transform: translate(-3px, 2px); }
  40% { transform: translate(3px, -2px); }
  60% { transform: translate(-2px, -1px); }
  80% { transform: translate(2px, 1px); }
  100% { transform: translate(0); }
}

@keyframes glitch2 {
  0% { transform: translate(0); }
  20% { transform: translate(3px, -2px); }
  40% { transform: translate(-3px, 2px); }
  60% { transform: translate(2px, 1px); }
  80% { transform: translate(-2px, -1px); }
  100% { transform: translate(0); }
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  white-space: nowrap;
  letter-spacing: 0.15em;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover {
  color: var(--accent);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  z-index: 1001;
  cursor: pointer;
}

.nav-hamburger span {
  width: 28px;
  height: 2px;
  background: var(--text);
  transition: all 0.3s ease;
}

.nav-hamburger.active span:first-child {
  transform: rotate(45deg) translate(3px, 3px);
}

.nav-hamburger.active span:last-child {
  transform: rotate(-45deg) translate(3px, -3px);
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.mobile-menu.open {
  opacity: 1;
  visibility: visible;
}

.mobile-link {
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 4rem);
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.3s ease;
  opacity: 0;
  transform: translateY(30px);
}

.mobile-menu.open .mobile-link {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s ease;
}

.mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.3s; }
.mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.4s; }

.mobile-link:hover {
  color: var(--accent);
}

/* ---- Hero Section ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg-text {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: clamp(5rem, 18vw, 16rem);
  font-weight: 800;
  color: rgba(255, 255, 255, 0.02);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

/* Floating orb in hero */
.hero-orb {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%,
    rgba(200, 255, 0, 0.12),
    rgba(0, 255, 200, 0.06) 50%,
    transparent 70%
  );
  filter: blur(60px);
  pointer-events: none;
  animation: orbFloat 8s ease-in-out infinite;
  z-index: 1;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  33% { transform: translate(-30%, -60%) scale(1.1); }
  66% { transform: translate(-70%, -40%) scale(0.9); }
}

.marquee {
  display: flex;
  animation: marquee 20s linear infinite;
}

.marquee span {
  flex-shrink: 0;
}

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

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 var(--gap);
}

.hero-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s 1.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-label-line {
  width: 40px;
  height: 1px;
  background: var(--accent);
}

.hero-label span {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 0.85;
  letter-spacing: -0.03em;
}

/* The name is one word and must render as one word at every width. The six chars
   are separate inline-blocks (each one animates in), so the line is a normal wrap
   opportunity between every letter — hence the explicit nowrap. The size cap is
   what keeps nowrap from overflowing instead: "PETTER" in Syne 800 measures ~6.9em
   wide, and the hero content box is ~0.94 × viewport (capped at 1648px), so the
   font-size ceiling is 0.94vw/6.9 ≈ 13.6vw and 1648/6.9 ≈ 14.9rem. Both bounds
   below stay under that with margin — don't raise them without re-measuring. */
.hero-line {
  display: block;
  overflow: hidden;
  white-space: nowrap;
}

.split-char {
  display: inline-block;
  font-size: clamp(2rem, 12.5vw, 14rem);
  opacity: 0;
  transform: translateY(120%);
  animation: charReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 60px var(--accent-glow));
  transition: transform 0.3s ease;
}

.split-char:hover {
  transform: translateY(-10px) scale(1.1) !important;
  filter: drop-shadow(0 0 80px rgba(200, 255, 0, 0.4));
}

.split-char:nth-child(1) { animation-delay: 1.2s; }
.split-char:nth-child(2) { animation-delay: 1.28s; }
.split-char:nth-child(3) { animation-delay: 1.36s; }
.split-char:nth-child(4) { animation-delay: 1.44s; }
.split-char:nth-child(5) { animation-delay: 1.52s; }
.split-char:nth-child(6) { animation-delay: 1.6s; }

@keyframes charReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  color: var(--text-muted);
  margin-top: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s 2.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  letter-spacing: 0.05em;
  min-height: 1.5em;
}

/* Typed cursor blink */
.hero-subtitle::after {
  content: '|';
  color: var(--accent);
  animation: blink 0.8s step-end infinite;
  margin-left: 2px;
}

.hero-subtitle.done::after {
  animation: blink 0.8s step-end infinite 3s;
  animation-fill-mode: forwards;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-cta {
  margin-top: 2.5rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s 3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2.5rem;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 100px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: -1;
}

.btn-primary:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

.btn-primary:hover {
  color: var(--bg);
  box-shadow: 0 0 40px var(--accent-glow), 0 0 80px rgba(200, 255, 0, 0.1);
}

.btn-arrow {
  transition: transform 0.3s ease;
}

.btn-primary:hover .btn-arrow {
  transform: translateX(4px);
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll indicator - mouse icon */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
  animation: fadeUp 0.8s 3.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.scroll-mouse {
  width: 24px;
  height: 38px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  position: relative;
}

.scroll-wheel {
  width: 3px;
  height: 8px;
  background: var(--accent);
  border-radius: 3px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollWheel 1.5s ease-in-out infinite;
}

@keyframes scrollWheel {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(14px); }
}

.scroll-indicator span {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---- Sections ---- */
.section {
  padding: var(--section-padding) clamp(1.5rem, 5vw, 6rem);
  position: relative;
  z-index: 2;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.label-number {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.1em;
}

.label-line-animated {
  width: 40px;
  height: 1px;
  background: var(--gradient);
  position: relative;
  overflow: hidden;
}

.label-line-animated::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.6);
  animation: lineSweep 3s ease-in-out infinite;
}

@keyframes lineSweep {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

.label-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 3rem;
}

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

/* Reveal animation */
.reveal-up {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--delay, 0s);
}

.reveal-up.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ---- About Section ---- */
.about {
  background: var(--bg-alt);
  position: relative;
  overflow: hidden;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 6rem);
  align-items: start;
}

.about-text {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.about-stats {
  display: flex;
  gap: 3rem;
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-value {
  display: flex;
  align-items: baseline;
  white-space: nowrap;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-suffix {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.25rem;
}

/* ---- Journey / Timeline ---- */
.journey {
  background: var(--bg);
}

/* Base = narrow screens: a compact left rail. From 769px up the whole thing
   flips to a single horizontal row of cards so the section stays short —
   see the min-width block below. `--fill` is set on .timeline-line by script.js. */
.timeline {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
}

.timeline-line {
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.06);
}

.timeline-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--fill, 0%);
  background: var(--gradient);
  transition: height 0.05s linear;
}

.timeline-item {
  position: relative;
  margin-left: 50px;
  margin-bottom: 1.25rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  top: 0.4rem;
  left: -36px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  z-index: 2;
  transition: all 0.3s ease;
  box-shadow: 0 0 0 0 rgba(200, 255, 0, 0);
}

.timeline-item:hover .timeline-dot {
  background: var(--accent);
  box-shadow: 0 0 20px rgba(200, 255, 0, 0.4);
  transform: scale(1.3);
}

.timeline-card {
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  background: var(--bg-alt);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-card:hover {
  border-color: rgba(200, 255, 0, 0.15);
  transform: translateY(-4px);
  box-shadow: 0 10px 40px rgba(200, 255, 0, 0.05);
}

.timeline-year {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.timeline-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0.4rem 0;
}

.timeline-text {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

/* Horizontal timeline: one row, dots hanging off a single rail. */
@media (min-width: 769px) {
  .timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
  }

  /* The rail spans dot-centre to dot-centre (dots are 14px, pinned left: 0). */
  .timeline-line {
    left: 7px;
    right: 7px;
    top: 7px;
    bottom: auto;
    width: auto;
    height: 2px;
  }

  .timeline-line::after {
    width: var(--fill, 0%);
    height: 100%;
    transition: width 0.05s linear;
  }

  .timeline-item {
    margin: 0;
    padding-top: 1.75rem;
  }

  .timeline-dot {
    top: 0;
    left: 0;
  }

  .timeline-title {
    font-size: 1.05rem;
  }

  .timeline-text {
    font-size: 0.8rem;
  }
}

/* horizontal progress - unused, keep for compat */
.horizontal-progress {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.horizontal-progress.visible {
  opacity: 1;
}

.horizontal-progress-fill {
  height: 100%;
  background: var(--gradient);
  border-radius: 3px;
  width: 0%;
  transition: width 0.1s linear;
}

/* ---- Work / Projects (List style) ---- */
.work {
  background: var(--bg);
}

/* Tendium featured card */
.tendium-card {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  background: var(--bg-alt);
  padding: 2.5rem;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tendium-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient);
}

.tendium-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top left, var(--accent-glow), transparent 60%);
  pointer-events: none;
}

.tendium-card:hover {
  border-color: rgba(200, 255, 0, 0.12);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(200, 255, 0, 0.05);
}

.tendium-card-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.tendium-card-content {
  position: relative;
  z-index: 1;
}

.tendium-card-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.tendium-card-role {
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 1rem;
  font-weight: 500;
}

.tendium-card-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 600px;
}

.tendium-card-stats {
  display: flex;
  gap: 3rem;
  margin-top: 1.5rem;
}

.tendium-stat {
  display: flex;
  flex-direction: column;
}

.tendium-stat-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tendium-stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.15rem;
}

.subsection-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.projects-list {
  display: flex;
  flex-direction: column;
}

.project-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr auto auto;
  align-items: center;
  gap: 2rem;
  padding: 2rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-row-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    hsla(var(--hue), 60%, 50%, 0.08),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.project-row:hover .project-row-bg {
  opacity: 1;
}

.project-row:hover {
  padding-left: 2.5rem;
  border-color: rgba(200, 255, 0, 0.15);
}

.project-row-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.project-index {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
}

.project-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  transition: color 0.3s ease;
}

.project-row:hover .project-title {
  color: var(--accent);
}

.project-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  padding: 0.3rem 0.75rem;
  background: rgba(200, 255, 0, 0.06);
  border: 1px solid rgba(200, 255, 0, 0.12);
  border-radius: 100px;
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.project-row:hover .tag {
  background: rgba(200, 255, 0, 0.1);
  border-color: rgba(200, 255, 0, 0.25);
}

.project-row-arrow {
  font-size: 1.5rem;
  color: var(--text-muted);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-row:hover .project-row-arrow {
  color: var(--accent);
  transform: translateX(8px);
}

/* ---- link favicons (shown next to project links on home + projects pages) ---- */
.lnk-fav {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  flex: none;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.05);
}
.lnk-fav--badge {
  display: inline-grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.6rem;
  line-height: 1;
  color: #fff;
  background: linear-gradient(
    135deg,
    hsl(var(--fav-hue, 200), 70%, 52%),
    hsl(calc(var(--fav-hue, 200) + 40), 70%, 42%)
  );
}
/* larger next to the big featured-row titles on the home page */
.project-row-left .lnk-fav {
  width: 26px;
  height: 26px;
  border-radius: 6px;
}
.project-row-left .lnk-fav--badge {
  font-size: 0.85rem;
}

/* ---- Skills Orbit ---- */
.skills {
  background: var(--bg-alt);
}

/* ---- Skills Grid ---- */
.skills-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.skill-category {
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.skill-category::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.skill-category:hover {
  border-color: rgba(200, 255, 0, 0.12);
  transform: translateY(-4px);
  box-shadow: 0 10px 40px rgba(200, 255, 0, 0.04);
}

.skill-category:hover::before {
  transform: scaleX(1);
}

.skill-cat-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-pill {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--text);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  animation: pillFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) backwards;
  animation-delay: calc(var(--i, 0) * 0.06s);
}

@keyframes pillFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.9);
  }
}

.skill-pill:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 4px 20px rgba(200, 255, 0, 0.2);
}

/* ---- Contact ---- */
.contact {
  background: var(--bg);
  text-align: center;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-content {
  max-width: 700px;
  margin: 0 auto;
}

.contact-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 2.5rem;
}

.contact-email {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  position: relative;
  transition: all 0.3s ease;
}

.contact-email::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-email:hover::after {
  transform: scaleX(1);
}

.contact-email:hover {
  text-shadow: 0 0 30px var(--accent-glow);
}

.contact-socials {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2.5rem;
}

.social-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  position: relative;
  overflow: hidden;
  display: inline-block;
}

.social-link-text,
.social-link-hover {
  display: block;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.social-link-hover {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--accent);
  transform: translateY(100%);
}

.social-link:hover .social-link-text {
  transform: translateY(-100%);
}

.social-link:hover .social-link-hover {
  transform: translateY(0);
}

/* ---- Footer ---- */
.footer {
  padding: 2rem clamp(1.5rem, 4vw, 3rem);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  position: relative;
  z-index: 2;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

.footer-year {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

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

  .about-stats {
    gap: 2rem;
  }

  .project-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .project-row-arrow {
    display: none;
  }

  .stat-number, .stat-suffix {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .about-stats {
    flex-direction: column;
    gap: 1.5rem;
  }
}

/* ---- Mouse Trail Canvas ---- */
#mouseTrail {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* ---- Scroll Progress Bar ---- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--gradient);
  z-index: 10001;
  transition: width 0.05s linear;
  box-shadow: 0 0 10px var(--accent), 0 0 20px rgba(200, 255, 0, 0.3);
}

/* ---- Matrix Rain Canvas ---- */
.matrix-canvas {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.matrix-canvas.active {
  opacity: 1;
}

/* ---- Morphing Blob ---- */
.hero-blob {
  position: absolute;
  width: clamp(400px, 50vw, 700px);
  height: clamp(400px, 50vw, 700px);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
  animation: blobRotate 20s linear infinite;
}

@keyframes blobRotate {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ---- Quote Ticker ---- */
.quote-ticker {
  overflow: hidden;
  padding: 3rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background: var(--bg-alt);
  position: relative;
  z-index: 2;
}

.quote-ticker-track {
  display: flex;
  gap: 4rem;
  animation: tickerScroll 30s linear infinite;
  white-space: nowrap;
}

.quote-item {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.4rem);
  font-weight: 600;
  font-style: italic;
  color: var(--text-muted);
}

.quote-attr {
  color: var(--accent);
  font-style: normal;
  font-size: 0.8em;
}

@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---- Audio Visualizer Bars ---- */
.visualizer {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 60px;
  margin-bottom: 2rem;
  opacity: 0.3;
}

.viz-bar {
  width: 4px;
  background: var(--gradient);
  border-radius: 2px;
  animation: vizPulse var(--viz-speed, 0.8s) ease-in-out infinite alternate;
  animation-delay: var(--viz-delay, 0s);
}

.viz-bar:nth-child(1)  { --viz-speed: 0.5s; --viz-delay: 0.00s; height: 15px; }
.viz-bar:nth-child(2)  { --viz-speed: 0.7s; --viz-delay: 0.05s; height: 25px; }
.viz-bar:nth-child(3)  { --viz-speed: 0.4s; --viz-delay: 0.10s; height: 35px; }
.viz-bar:nth-child(4)  { --viz-speed: 0.6s; --viz-delay: 0.03s; height: 20px; }
.viz-bar:nth-child(5)  { --viz-speed: 0.8s; --viz-delay: 0.08s; height: 40px; }
.viz-bar:nth-child(6)  { --viz-speed: 0.5s; --viz-delay: 0.12s; height: 30px; }
.viz-bar:nth-child(7)  { --viz-speed: 0.9s; --viz-delay: 0.02s; height: 50px; }
.viz-bar:nth-child(8)  { --viz-speed: 0.4s; --viz-delay: 0.07s; height: 35px; }
.viz-bar:nth-child(9)  { --viz-speed: 0.7s; --viz-delay: 0.11s; height: 45px; }
.viz-bar:nth-child(10) { --viz-speed: 0.6s; --viz-delay: 0.04s; height: 55px; }
.viz-bar:nth-child(11) { --viz-speed: 0.5s; --viz-delay: 0.09s; height: 40px; }
.viz-bar:nth-child(12) { --viz-speed: 0.8s; --viz-delay: 0.01s; height: 60px; }
.viz-bar:nth-child(13) { --viz-speed: 0.4s; --viz-delay: 0.06s; height: 50px; }
.viz-bar:nth-child(14) { --viz-speed: 0.7s; --viz-delay: 0.13s; height: 45px; }
.viz-bar:nth-child(15) { --viz-speed: 0.5s; --viz-delay: 0.03s; height: 60px; }
.viz-bar:nth-child(16) { --viz-speed: 0.6s; --viz-delay: 0.10s; height: 55px; }
.viz-bar:nth-child(17) { --viz-speed: 0.9s; --viz-delay: 0.05s; height: 45px; }
.viz-bar:nth-child(18) { --viz-speed: 0.4s; --viz-delay: 0.08s; height: 50px; }
.viz-bar:nth-child(19) { --viz-speed: 0.7s; --viz-delay: 0.02s; height: 40px; }
.viz-bar:nth-child(20) { --viz-speed: 0.5s; --viz-delay: 0.11s; height: 35px; }
.viz-bar:nth-child(21) { --viz-speed: 0.6s; --viz-delay: 0.04s; height: 30px; }
.viz-bar:nth-child(22) { --viz-speed: 0.8s; --viz-delay: 0.09s; height: 40px; }
.viz-bar:nth-child(23) { --viz-speed: 0.4s; --viz-delay: 0.07s; height: 50px; }
.viz-bar:nth-child(24) { --viz-speed: 0.7s; --viz-delay: 0.01s; height: 35px; }
.viz-bar:nth-child(25) { --viz-speed: 0.5s; --viz-delay: 0.06s; height: 25px; }
.viz-bar:nth-child(26) { --viz-speed: 0.6s; --viz-delay: 0.12s; height: 40px; }
.viz-bar:nth-child(27) { --viz-speed: 0.9s; --viz-delay: 0.03s; height: 30px; }
.viz-bar:nth-child(28) { --viz-speed: 0.4s; --viz-delay: 0.08s; height: 20px; }
.viz-bar:nth-child(29) { --viz-speed: 0.7s; --viz-delay: 0.05s; height: 15px; }
.viz-bar:nth-child(30) { --viz-speed: 0.5s; --viz-delay: 0.10s; height: 10px; }

@keyframes vizPulse {
  0% { height: 5px; }
  100% { height: var(--height, 40px); }
}

/* ---- 3D Tilt Sections ---- */
.tilt-section {
  transform-style: preserve-3d;
  perspective: 1000px;
}

/* ---- Scramble text ---- */
.scramble-text {
}

/* ---- F1 Car Racing Animation ---- */
.f1-racing-line {
  position: absolute;
  bottom: 2.5rem;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--accent-glow) 20%, var(--accent) 50%, var(--accent-glow) 80%, transparent 100%);
  opacity: 0.25;
}

.f1-car {
  position: absolute;
  bottom: 0;
  left: -50px;
  width: 38px;
  height: 12px;
  animation: f1-race 8s linear infinite;
}

/* Car body */
.f1-car::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 4px;
  width: 30px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px 10px 2px 2px;
  clip-path: polygon(0% 100%, 5% 30%, 25% 0%, 70% 0%, 90% 30%, 100% 60%, 100% 100%);
  opacity: 0.7;
}

/* Wheels */
.f1-car::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 6px;
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0.6;
  box-shadow: 22px 0 0 0 var(--accent);
}

@keyframes f1-race {
  0% {
    left: -50px;
    opacity: 0;
  }
  5% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    left: calc(100% + 50px);
    opacity: 0;
  }
}

/* ---- Noise texture overlay ---- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}
