:root {
  --bg-carbon: #07080c;
  --bg-surface: rgba(13, 16, 24, 0.72);
  --bg-surface-strong: rgba(15, 18, 28, 0.92);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.22);
  --ivory: #f4f1ea;
  --text-secondary: rgba(244, 241, 234, 0.66);
  --text-muted: rgba(148, 163, 184, 0.56);
  --cobalt: #3b82f6;
  --copper: #e07a5f;
  --emerald: #10b981;
  --font-display: 'Syne', sans-serif;
  --font-serif: 'Instrument Serif', serif;
  --font-sans: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

html {
  background: var(--bg-carbon);
  color: var(--ivory);
  font-family: var(--font-sans);
  scroll-behavior: auto;
}

body {
  background: var(--bg-carbon);
  overflow-x: hidden;
  cursor: none;
}

body.is-loading {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  cursor: none;
}

button {
  cursor: none;
  font-family: inherit;
}

/* ==========================================
   PRELOADER SPLIT-CURTAIN
   ========================================== */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #050609;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.preloader-inner {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.preloader-top {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}

.preloader-percent {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 8vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ivory);
  line-height: 1;
}

.preloader-bar-wrap {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  margin: 18px 0 12px;
  overflow: hidden;
}

.preloader-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--cobalt), var(--copper));
}

/* ==========================================
   CUSTOM MORPHING CURSOR
   ========================================== */
#cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  background: var(--ivory);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9990;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease, opacity 0.2s ease;
}

#cursor-pill {
  position: fixed;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(244, 241, 234, 0.3);
  border-radius: 999px;
  pointer-events: none;
  z-index: 9989;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              height 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.25s ease,
              border-color 0.25s ease;
}

#cursor-pill-text {
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.14em;
  color: #07080c;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s ease;
}

body.cursor-active #cursor-pill {
  width: 68px;
  height: 28px;
  background: var(--ivory);
  border-color: var(--ivory);
}

body.cursor-active #cursor-pill-text {
  opacity: 1;
}

body.cursor-active #cursor-dot {
  opacity: 0;
}

/* ==========================================
   3D CANVAS, BLUEPRINT GRID & SCROLL BAR
   ========================================== */
#webgl-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

.blueprint-grid {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
}

.ambient-vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(circle at 50% 45%, transparent 45%, rgba(4, 5, 8, 0.82) 100%);
}

.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--cobalt), var(--copper));
  z-index: 120;
}

/* ==========================================
   FLOATING EDITORIAL NAVBAR
   ========================================== */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 70px;
  padding: 0 36px;
  background: rgba(7, 8, 12, 0.78);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(22px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.site-nav.scrolled {
  background: rgba(7, 8, 12, 0.92);
  border-bottom-color: rgba(255, 255, 255, 0.14);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cobalt);
  box-shadow: 0 0 12px var(--cobalt);
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.12em;
}

.brand-accent {
  color: var(--copper);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
  transition: color 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--ivory);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-clock {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--text-muted);
  padding-right: 8px;
}

.clock-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--emerald);
}

.nav-pill {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
}

.nav-pill:hover {
  border-color: var(--border-strong);
  color: var(--ivory);
}

.active-lang {
  color: var(--ivory);
  font-weight: 600;
}

.cv-btn {
  border-color: rgba(59, 130, 246, 0.35);
  color: #93c5fd;
}

.admin-btn {
  border-color: rgba(224, 122, 95, 0.35);
  color: #f4a261;
}

.eq-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 10px;
}

.eq-bars span {
  width: 2px;
  height: 3px;
  background: currentColor;
  border-radius: 2px;
  transition: height 0.2s ease;
}

.eq-bars.playing span:nth-child(1) { animation: eqAnim 0.6s infinite alternate; }
.eq-bars.playing span:nth-child(2) { animation: eqAnim 0.45s 0.15s infinite alternate; }
.eq-bars.playing span:nth-child(3) { animation: eqAnim 0.7s 0.3s infinite alternate; }

@keyframes eqAnim {
  from { height: 3px; }
  to { height: 10px; }
}

/* ==========================================
   COMMON SECTION & TYPOGRAPHY
   ========================================== */
#smooth-wrapper {
  position: relative;
  z-index: 10;
}

.section-container {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 32px;
}

.mono-tag {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.serif-italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--copper);
}

.section-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.eyebrow-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--cobalt);
  font-weight: 600;
}

.eyebrow-line {
  width: 32px;
  height: 1px;
  background: rgba(255, 255, 255, 0.22);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.3rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.section-head-split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 44px;
}

/* ==========================================
   01. ASYMMETRIC HERO SECTION
   ========================================== */
.hero-section {
  min-height: 100vh;
  padding: 108px 0 88px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  gap: 48px;
  align-items: center;
}

.hero-left,
.hero-right {
  min-width: 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.28);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  color: #93c5fd;
  margin-bottom: 24px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 3.6vw, 3.9rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}

.line-mask {
  display: block;
  overflow: hidden;
}

.line-inner {
  display: block;
}

.accent-stroke {
  -webkit-text-stroke: 1px rgba(244, 241, 234, 0.72);
  color: transparent;
}

.typing-role-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #93c5fd;
  margin-bottom: 18px;
  min-height: 24px;
}

.mono-prompt {
  color: var(--copper);
  font-weight: 700;
}

.typing-cursor {
  animation: blinkCur 0.8s infinite;
}

@keyframes blinkCur {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.hero-lead {
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 32px;
}

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

.btn-magnetic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  font-weight: 500;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.25s ease, border-color 0.25s ease;
}

.btn-primary {
  background: var(--ivory);
  color: #07080c;
  border: 1px solid var(--ivory);
  font-weight: 600;
}

.btn-primary:hover {
  background: #93c5fd;
  border-color: #93c5fd;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  color: var(--ivory);
  border: 1px solid var(--border-strong);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--ivory);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
}

.btn-ghost:hover {
  color: var(--ivory);
  border-color: var(--border-subtle);
}

/* Telemetry 3D Tilt Card */
.telemetry-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 24px;
  backdrop-filter: blur(22px);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.65);
  transform-style: preserve-3d;
  transition: border-color 0.3s ease;
}

.telemetry-card:hover {
  border-color: rgba(59, 130, 246, 0.45);
}

.telemetry-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.mac-dots {
  display: flex;
  gap: 6px;
}

.mac-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.live-tag {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.telemetry-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.avatar-monogram {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cobalt), var(--copper));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
}

.id-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
}

.id-sub {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.telemetry-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.t-metric {
  padding: 11px 13px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
}

.t-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  margin-bottom: 3px;
}

.t-val {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ivory);
}

.shader-switcher {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 14px;
}

.shader-pills {
  display: flex;
  gap: 4px;
}

.shader-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  padding: 4px 9px;
  border-radius: 99px;
  transition: all 0.2s ease;
}

.shader-btn.active,
.shader-btn:hover {
  background: var(--cobalt);
  border-color: var(--cobalt);
  color: #fff;
}

.telemetry-footer {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.64rem;
}

.t-link {
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.t-link:hover {
  color: var(--ivory);
}

.scroll-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.scroll-mouse {
  width: 20px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 99px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.scroll-wheel {
  width: 3px;
  height: 6px;
  background: var(--ivory);
  border-radius: 99px;
  animation: scrollWheel 1.6s infinite;
}

@keyframes scrollWheel {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(10px); opacity: 0; }
}

/* ==========================================
   KINETIC MARQUEE BAND
   ========================================== */
.marquee-band {
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(10, 12, 18, 0.55);
  backdrop-filter: blur(10px);
  padding: 18px 0;
  overflow: hidden;
}

.marquee-row {
  display: flex;
  width: max-content;
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-right: 28px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  animation: marqueeScroll 28s linear infinite;
}

.marquee-track .dot {
  color: var(--copper);
  font-size: 0.85rem;
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

/* ==========================================
   02. ABOUT & SCRUBBED MANIFESTO
   ========================================== */
.about-section {
  padding: 120px 0;
}

.about-bento-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 44px;
  align-items: start;
}

.scrub-manifesto {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.3vw, 2.05rem);
  font-weight: 700;
  line-height: 1.38;
  margin-bottom: 24px;
  text-shadow: 0 2px 18px rgba(4, 5, 8, 0.85);
}

.scrub-word {
  color: rgba(244, 241, 234, 0.46);
  transition: color 0.15s ease;
}

.scrub-word.lit {
  color: var(--ivory);
}

.about-sub-p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-secondary);
}

.about-stats-bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.spotlight-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  backdrop-filter: blur(18px);
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.spotlight-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(59, 130, 246, 0.14), transparent 65%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.spotlight-card:hover::before {
  opacity: 1;
}

.spotlight-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
}

.bento-stat-card {
  padding: 22px;
}

.bento-stat-val {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--ivory);
  line-height: 1;
  margin-bottom: 8px;
}

.bento-stat-lbl {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.location-bento {
  grid-column: span 3;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(224, 122, 95, 0.06));
}

.bento-edu-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 6px 0 4px;
}

.bento-edu-sub {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
}

/* ==========================================
   03. PROJECTS BENTO & 3D TILT CARDS
   ========================================== */
.projects-section {
  padding: 100px 0;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(14px);
}

.filter-pill {
  padding: 8px 16px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  transition: all 0.25s ease;
}

.filter-pill:hover,
.filter-pill.active {
  background: var(--ivory);
  color: #07080c;
  font-weight: 600;
}

.cv-highlight-pill {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
}

.projects-bento-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.project-card {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  transform-style: preserve-3d;
}

.project-visual {
  position: relative;
  height: 230px;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
  background: #05060a;
}

.project-canvas,
.project-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .project-img {
  transform: scale(1.05);
}

.project-visual-overlay {
  position: absolute;
  inset: 0;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: linear-gradient(180deg, rgba(6, 7, 12, 0.55) 0%, transparent 50%, rgba(6, 7, 12, 0.78) 100%);
}

.proj-num {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ivory);
  background: rgba(0, 0, 0, 0.45);
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.proj-badge {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e2e8f0;
}

.project-body {
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.project-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.project-sub {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.project-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.66rem;
}

.proj-action-btn {
  background: transparent;
  border: none;
  color: #93c5fd;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.proj-repo-link {
  color: var(--text-secondary);
  transition: color 0.2s;
}

.proj-repo-link:hover {
  color: var(--ivory);
}

/* ==========================================
   04. EXPERIENCE TIMELINE (GLOWING BEAM)
   ========================================== */
.experience-section {
  padding: 100px 0;
}

.timeline-wrapper {
  position: relative;
  padding-left: 36px;
}

.timeline-track {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 10px;
  width: 2px;
  background: rgba(255, 255, 255, 0.08);
}

.timeline-beam {
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, var(--cobalt), var(--copper));
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.6);
}

.timeline-items {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.timeline-card {
  position: relative;
  padding: 26px 28px;
}

.timeline-node {
  position: absolute;
  left: -32px;
  top: 30px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-carbon);
  border: 2px solid var(--cobalt);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.65);
}

.timeline-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 6px;
}

.timeline-role {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.timeline-period {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--copper);
  letter-spacing: 0.12em;
}

.timeline-company {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #93c5fd;
  margin-bottom: 10px;
}

.timeline-desc {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

/* ==========================================
   05. SKILLS & ENGINEERING PILLARS
   ========================================== */
.skills-section {
  padding: 100px 0;
}

.skills-layout-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: stretch;
}

.skills-bars-panel {
  padding: 28px 30px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.skill-bar-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.skill-bar-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.skill-bar-name {
  font-size: 0.92rem;
  font-weight: 600;
}

.skill-bar-pct {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #93c5fd;
}

.skill-bar-sub {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--text-muted);
}

.skill-track {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 99px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cobalt), var(--copper));
  border-radius: 99px;
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.pillars-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pillar-card {
  padding: 22px 24px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.pillar-idx {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--copper);
  font-weight: 600;
  padding-top: 2px;
}

.pillar-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.pillar-desc {
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ==========================================
   REFERENCES & ENDORSEMENTS (HORIZONTAL KINETIC CAROUSEL)
   ========================================== */
.references-section {
  padding: 100px 0;
  overflow: hidden;
}

.ref-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ref-counter {
  font-size: 0.72rem;
  color: var(--ivory);
  letter-spacing: 0.14em;
}

.ref-nav-btns {
  display: flex;
  gap: 8px;
}

.ref-nav-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--ivory);
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(14px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.ref-nav-btn:hover:not(:disabled) {
  background: var(--ivory);
  color: #07080c;
  border-color: var(--ivory);
  transform: scale(1.06);
}

.ref-nav-btn:disabled {
  opacity: 0.32;
}

.ref-carousel-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 12px 0 22px;
  touch-action: pan-y;
}

.references-track {
  display: flex;
  flex-wrap: nowrap;
  gap: 22px;
  will-change: transform;
}

.ref-card {
  flex: 0 0 calc((100% - 44px) / 3);
  min-width: 320px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  transform-style: preserve-3d;
  transition: border-color 0.3s ease, opacity 0.35s ease, transform 0.35s ease;
}

.ref-card.is-dimmed {
  opacity: 0.55;
}

.ref-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 8px;
}

.ref-progress-track {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
}

.ref-progress-fill {
  height: 100%;
  width: 33%;
  background: linear-gradient(90deg, var(--cobalt), var(--copper));
  border-radius: 99px;
  transition: width 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.ref-drag-hint {
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  white-space: nowrap;
}

.ref-quote-mark {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  line-height: 1;
  color: var(--copper);
  opacity: 0.75;
}

.ref-quote {
  font-size: 0.94rem;
  line-height: 1.72;
  color: var(--text-secondary);
}

.ref-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.ref-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ref-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(59, 130, 246, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  color: #93c5fd;
  flex-shrink: 0;
}

.ref-name {
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--ivory);
}

.ref-role {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ==========================================
   06. CONTACT & FOOTER
   ========================================== */
.contact-section {
  padding: 100px 0 40px;
}

.contact-card {
  padding: 46px;
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 44px;
  align-items: center;
}

.contact-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.6vw, 3rem);
  font-weight: 800;
  line-height: 1.08;
  margin-bottom: 16px;
}

.contact-desc {
  font-size: 0.96rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 26px;
}

.contact-links-dock {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dock-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-secondary);
  transition: all 0.25s ease;
}

.dock-btn:hover {
  border-color: var(--ivory);
  color: var(--ivory);
  transform: translateY(-2px);
}

.admin-dock {
  border-color: rgba(224, 122, 95, 0.35);
  color: #f4a261;
}

.editorial-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.editorial-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.editorial-form label span {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.editorial-form input,
.editorial-form textarea {
  background: rgba(5, 6, 10, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--ivory);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s;
}

.editorial-form input:focus,
.editorial-form textarea:focus {
  border-color: var(--cobalt);
}

.full-submit {
  width: 100%;
}

.contact-feedback {
  display: none;
  padding: 10px 14px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.contact-feedback.ok {
  display: block;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.contact-feedback.err {
  display: block;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.site-footer {
  margin-top: 38px;
  padding-top: 22px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--text-muted);
}

/* ==========================================
   PROJECT MODAL
   ========================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 5, 8, 0.85);
  backdrop-filter: blur(18px);
}

.modal-sheet {
  position: relative;
  z-index: 2;
  width: 92%;
  max-width: 960px;
  background: var(--bg-surface-strong);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 36px;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  padding: 6px 12px;
  border-radius: 99px;
}

.modal-close:hover {
  border-color: var(--ivory);
  color: var(--ivory);
}

.modal-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 32px;
  align-items: center;
}

.modal-visual {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  height: 320px;
  background: #05060a;
}

#modal-art-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  margin: 8px 0 12px;
}

.modal-desc {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.modal-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  margin-bottom: 20px;
}

.modal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 1024px) {
  .hero-grid,
  .about-bento-grid,
  .projects-bento-grid,
  .skills-layout-grid,
  .contact-card,
  .modal-grid {
    grid-template-columns: 1fr;
  }
  .ref-card {
    flex: 0 0 85%;
    min-width: 280px;
  }
  .nav-links,
  .hide-mobile {
    display: none;
  }
  .form-row-2 {
    grid-template-columns: 1fr;
  }
  .contact-card {
    padding: 28px 22px;
  }
}
