/* ================================================
   DESIGN TOKENS
================================================ */
:root {
  --void: #050508;
  --surface: #0d0d14;
  --surface-2: #13131e;
  --glass: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.07);
  --border-light: rgba(255, 255, 255, 0.12);
  --accent: #38bdf8;
  --purple: #8b5cf6;
  --cyan: #67e8f9;
  --green: #34d399;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #4a5568;
  --glow-blue: rgba(56, 189, 248, 0.15);
  --glow-purple: rgba(139, 92, 246, 0.15);
  --radius: 20px;
  --font-head: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  /* Skill level color tokens */
  --skill-beginner: #ffb6c1;
  --skill-balanced: #ff7f50;
  --skill-expert: #d10000;
}

/* ================================================
   RESET & BASE
================================================ */
*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
}
html { scroll-behavior: auto; font-size: 16px; }
body {
  background: var(--void);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
  cursor: none;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

::-webkit-scrollbar { width: 2px; }
::-webkit-scrollbar-track { background: var(--void); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 2px; }

/* ================================================
   GRAIN OVERLAY
================================================ */
.grain {
  position: fixed; inset: 0; z-index: 9990;
  pointer-events: none; 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)' opacity='1'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  animation: grainShift 0.5s steps(1) infinite;
}
@keyframes grainShift {
  0%,100% { background-position: 0 0; }
  25% { background-position: 10px -8px; }
  50% { background-position: -8px 12px; }
  75% { background-position: 16px 4px; }
}

/* ================================================
   CUSTOM CURSOR
================================================ */
.cursor-ring {
  position: fixed; width: 36px; height: 36px;
  border: 1.5px solid rgba(56, 189, 248, 0.6);
  border-radius: 50%; z-index: 100000; pointer-events: none;
  top: -200px; left: -200px;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease, opacity 0.3s ease, transform 0.08s linear;
}
.cursor-dot {
  position: fixed; width: 5px; height: 5px;
  background: var(--accent); border-radius: 50%;
  top: -200px; left: -200px;
  z-index: 100000; pointer-events: none;
  transform: translate(-50%, -50%);
  transition: transform 0.05s linear, width 0.2s ease, height 0.2s ease;
}
body:has(a:hover) .cursor-ring,
body:has(button:hover) .cursor-ring {
  width: 56px; height: 56px;
  border-color: rgba(56, 189, 248, 0.3);
}
body:has(a:hover) .cursor-dot,
body:has(button:hover) .cursor-dot {
  width: 8px; height: 8px;
}

/* ================================================
   CINEMATIC LOADER
================================================ */
.loader {
  position: fixed; inset: 0; z-index: 9995;
  background: var(--void);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
}
.loader-inner { text-align: center; }
.loader-logo {
  font-family: var(--font-head);
  font-size: 0.75rem; letter-spacing: 0.5em;
  color: var(--text-dim); margin-bottom: 3rem;
}
.loader-name {
  font-family: var(--font-head);
  font-size: clamp(1.2rem, 3.5vw, 2.5rem);
  font-weight: 700; letter-spacing: 0.15em;
  color: var(--text); opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.loader-name.show { opacity: 1; transform: translateY(0); }
.loader-bar-wrap {
  margin: 2rem auto 1rem;
  width: min(380px, 70vw); height: 1px;
  background: var(--border); overflow: hidden;
}
.loader-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--purple), var(--accent));
  transition: width 0.05s linear;
  box-shadow: 0 0 10px var(--accent);
}
.loader-status {
  font-size: 0.65rem; letter-spacing: 0.3em;
  color: var(--text-dim); margin-top: 0.5rem;
}
.loader-flash {
  position: fixed; inset: 0; z-index: 9996;
  background: #fff; opacity: 0; pointer-events: none;
}

/* ================================================
   NAVBAR
================================================ */
.navbar {
  position: fixed; top: 1.5rem; left: 50%;
  transform: translateX(-50%) translateY(-120px);
  z-index: 100;
  display: flex; align-items: center; gap: 2rem;
  padding: 0.65rem 1.5rem;
  background: rgba(13, 13, 20, 0.75);
  border: 1px solid var(--border);
  border-radius: 100px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), width 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-radius 0.4s, padding 0.4s;
}
.navbar.show { transform: translateX(-50%) translateY(0); }
.nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-head); font-weight: 700;
  font-size: 1rem; color: var(--accent); letter-spacing: 0.05em;
  cursor: pointer;
}
.nav-menu-wrapper {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-links { display: flex; gap: 1.5rem; }
.nav-link {
  font-size: 0.82rem; color: var(--text-muted);
  position: relative; padding-bottom: 2px;
  transition: color 0.3s;
}
.nav-link::after {
  content: ''; position: absolute;
  bottom: -2px; left: 0; width: 0; height: 1px;
  background: var(--accent); transition: width 0.3s;
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-github {
  font-size: 0.78rem; color: var(--accent);
  padding: 0.35rem 0.9rem;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 100px;
  transition: background 0.3s, color 0.3s;
}
.nav-github:hover { background: var(--accent); color: var(--void); }

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  position: relative;
  width: 24px;
  height: 18px;
  z-index: 101;
}
.mobile-menu-toggle .bar {
  display: block;
  width: 18px;
  height: 2px;
  background-color: var(--text-muted);
  border-radius: 2px;
  position: absolute;
  left: 3px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s, top 0.3s, bottom 0.3s;
}
.mobile-menu-toggle .bar:first-child {
  top: 4px;
}
.mobile-menu-toggle .bar:last-child {
  bottom: 4px;
}

/* ================================================
   HERO
================================================ */
.hero {
  position: relative; height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
#hero-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, var(--void) 100%);
  pointer-events: none;
}
.hero-content {
  position: relative; z-index: 2;
  text-align: center; padding: 0 1.5rem;
}
.hero-tag {
  font-size: 0.72rem; letter-spacing: 0.3em;
  color: var(--accent); text-transform: uppercase;
  margin-bottom: 1.8rem; opacity: 0;
  transform: translateY(10px);
}
.hero-name {
  font-family: var(--font-head);
  font-size: clamp(3.5rem, 9vw, 8rem);
  font-weight: 700; line-height: 1.0;
  margin-bottom: 1.5rem;
}
.hero-line {
  display: block; opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-line.show { opacity: 1; transform: translateY(0); }
.accent-stroke {
  background: linear-gradient(135deg, #a78bfa 20%, #67e8f9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-tagline {
  font-size: clamp(1rem, 2.2vw, 1.3rem); color: var(--text-muted);
  margin-bottom: 2.5rem; opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.hero-tagline.show { opacity: 1; transform: translateY(0); }
.hero-cta {
  display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
  opacity: 0; transition: opacity 0.9s ease;
}
.hero-cta.show { opacity: 1; }

/* Hero Typewriter */
.hero-typewriter {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  margin-top: 1.2rem;
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.9s ease, transform 0.9s ease;
  text-align: center;
  min-height: 1.8em;
}
.hero-typewriter.show {
  opacity: 1;
  transform: translateY(0);
}
.typewriter-content {
  font-weight: 700;
  color: var(--accent);
  text-shadow: 0 0 18px rgba(56, 189, 248, 0.5);
}



/* Buttons */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 2rem; background: var(--accent);
  color: var(--void); border-radius: 100px; font-weight: 600;
  font-size: 0.88rem; transition: transform 0.3s, box-shadow 0.3s;
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 35px rgba(56, 189, 248, 0.35);
}
.btn-ghost {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 2rem;
  border: 1px solid var(--border-light);
  color: var(--text); border-radius: 100px;
  font-size: 0.88rem;
  transition: border-color 0.3s, color 0.3s, transform 0.3s;
}
.btn-ghost:hover {
  border-color: var(--accent); color: var(--accent);
  transform: translateY(-3px);
}

/* Scroll hint */
.scroll-hint {
  position: absolute; bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column;
  align-items: center; gap: 0.5rem;
  color: var(--text-dim); font-size: 0.6rem;
  letter-spacing: 0.3em; opacity: 0;
  animation: fadeIn 1s ease 3s forwards;
}
.scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, rgba(56,189,248,0.6), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; } 50% { opacity: 1; }
}
@keyframes fadeIn { to { opacity: 1; } }

/* ================================================
   SECTIONS BASE
================================================ */
.section {
  padding: 8rem 2rem;
  max-width: 1200px; margin: 0 auto;
}
.section-label {
  font-size: 0.62rem; letter-spacing: 0.35em;
  color: var(--text-dim); margin-bottom: 1.5rem;
  text-transform: uppercase;
}
.section-title {
  font-family: var(--font-head);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700; margin-bottom: 1.5rem; line-height: 1.1;
}
.section-title.centered { text-align: center; }
.section-sub {
  text-align: center; color: var(--text-muted);
  font-size: 1.05rem; margin-bottom: 4rem;
}

/* Reveal animations */
.reveal-up {
  opacity: 0; transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-up.in-view { opacity: 1; transform: translateY(0); }

/* ================================================
   ABOUT
================================================ */
.about-grid {
  display: grid; grid-template-columns: 1fr 1.3fr;
  gap: 5rem; align-items: center;
}
.about-visual {
  display: flex; flex-direction: column;
  align-items: center; gap: 2rem;
}
.avatar-hover-hint {
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  opacity: 0.45; /* low visibility/dimmed text */
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.4rem; /* push it slightly further above the frame */
  position: relative;
  animation: hint-float 2.5s ease-in-out infinite;
}
@keyframes hint-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.avatar-frame {
  position: relative; width: min(260px, 70vw); height: min(260px, 70vw);
  cursor: none; /* Hide default cursor over avatar to emphasize spotlight */
}
.about-avatar {
  width: 100%; height: 100%;
  object-fit: cover; border-radius: 50%;
  filter: grayscale(15%) brightness(0.95);
  position: relative;
  z-index: 2;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}
.avatar-frame:hover .about-avatar {
  transform: scale(1.03);
}
.avatar-reveal-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  border-radius: 50%;
  overflow: hidden;
  pointer-events: none;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}
.avatar-frame:hover .avatar-reveal-canvas {
  transform: scale(1.03);
}
/* Hide site's custom cursor rings when hovering over the avatar to allow a clean liquid look */
body:has(#avatar-frame:hover) .cursor-ring,
body:has(#avatar-frame:hover) .cursor-dot {
  opacity: 0 !important;
  transition: opacity 0.2s ease !important;
}
.avatar-ring {
  position: absolute; inset: -4px; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), var(--purple), var(--cyan), var(--accent));
  z-index: 1; animation: spin 10s linear infinite;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}
.avatar-frame:hover .avatar-ring {
  transform: scale(1.03);
}
.avatar-ring::after {
  content: ''; position: absolute; inset: 3px;
  background: var(--void); border-radius: 50%;
}
.avatar-ring-2 {
  inset: -10px; opacity: 0.2;
  animation: spin 15s linear infinite reverse;
}
@keyframes spin { to { transform: rotate(360deg); } }
.about-stats { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.stat-card {
  background: var(--glass); border: 1px solid var(--border);
  border-radius: 16px; padding: 1.2rem 1.5rem;
  text-align: center; backdrop-filter: blur(12px);
  transition: border-color 0.3s, transform 0.3s;
}
.stat-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.stat-num {
  display: block; font-family: var(--font-head);
  font-size: 2rem; font-weight: 700; color: var(--accent);
}
.stat-label {
  font-size: 0.68rem; color: var(--text-dim);
  letter-spacing: 0.1em; text-transform: uppercase;
}
.about-p {
  color: var(--text-muted); line-height: 1.85;
  margin-bottom: 1.2rem; font-size: 1.02rem;
}
.about-links { display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }
.link-pill {
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--border-light);
  border-radius: 100px; font-size: 0.83rem;
  color: var(--text-muted);
  transition: border-color 0.3s, color 0.3s, transform 0.3s;
}
.link-pill:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* CV download button */
.about-cv {
  margin-top: 1rem;
}
.btn-cv {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 100px;
  color: var(--accent);
  font-weight: 500;
  font-size: 0.85rem;
  font-family: var(--font-body);
  transition: all 0.3s ease;
  text-decoration: none;
  cursor: none;
}
.btn-cv:hover {
  background: var(--accent);
  color: var(--void);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(56, 189, 248, 0.3);
}
.cv-icon {
  transition: transform 0.3s ease;
}
.btn-cv:hover .cv-icon {
  transform: translateY(2px);
}

/* ================================================
   SKILLS
================================================ */
.skills-section { 
  text-align: center; max-width: 1200px; margin: 0 auto; padding: 8rem 2rem; 
  position: relative;
}
.skills-section::before {
  content: '';
  position: absolute; top: 10rem; left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 500px;
  background: radial-gradient(ellipse,
    rgba(139,92,246,0.15) 0%,
    rgba(56,189,248,0.08) 40%,
    transparent 70%);
  pointer-events: none; z-index: 0;
}
.skills-rings {
  display: flex; gap: 1.5rem; justify-content: center;
  flex-wrap: wrap; margin-bottom: 4rem;
  position: relative; z-index: 1;
}
.skill-ring-card {
  position: relative;
  background: rgba(255, 255, 255, 0.02); 
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 20px; padding: 2rem 1.5rem;
  width: 210px; transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s, box-shadow 0.5s;
  cursor: default;
  overflow: hidden;
  transform-style: preserve-3d;
  animation: cardFloat 6s ease-in-out infinite;
}
@keyframes cardFloat {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}
.skill-ring-card::after {
  content: '';
  position: absolute; top: 0;
  left: 25%; right: 25%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  opacity: 0;
  transition: opacity 0.5s, left 0.5s, right 0.5s;
  pointer-events: none;
}
.skill-ring-card:hover::after { opacity: 1; left: 5%; right: 5%; }
.skill-card-glow {
  position: absolute; inset: 0; opacity: 0;
  background: radial-gradient(circle at 50% 115%, var(--glow-c), transparent 60%);
  transition: opacity 0.5s; border-radius: inherit;
  pointer-events: none; z-index: 0;
}
.skill-ring-card:hover .skill-card-glow { opacity: 1; }
.skill-ring-card:hover {
  animation-play-state: paused;
  border-color: var(--accent);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 40px var(--glow-blue);
}
.ring-svg {
  width: 110px; height: 110px;
  transform: rotate(-90deg); display: block; margin: 0 auto;
  position: relative; z-index: 1;
  animation: ringRotate 20s linear infinite;
}
@keyframes ringRotate {
  0% { transform: rotate(-90deg); }
  100% { transform: rotate(270deg); }
}
.ring-bg { fill: none; stroke: rgba(255,255,255,0.05); stroke-width: 5; }
.ring-fill {
  fill: none; stroke-width: 5; stroke-linecap: round;
  stroke-dasharray: 289; stroke-dashoffset: 289;
  transition: stroke-dashoffset 1.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s, transform 0.3s, stroke 0.3s;
}
.ring-blue { stroke: var(--skill-beginner); }
.ring-purple { stroke: var(--skill-beginner); }
.ring-cyan { stroke: var(--skill-balanced); }
.ring-green { stroke: var(--skill-balanced); }
.ring-red { stroke: var(--skill-expert); }

.ring-center { margin-top: 0.75rem; position: relative; z-index: 1; }
.ring-label {
  display: block; font-family: var(--font-head);
  font-size: 0.92rem; font-weight: 600; color: var(--text);
}
.skill-level {
  display: block;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  margin-top: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.ring-val { display: block; font-size: 0.72rem; color: var(--text-dim); }
.ring-tags {
  margin-top: 0.75rem; font-size: 0.63rem;
  color: var(--text-dim); line-height: 1.7;
  position: relative; z-index: 1;
}
.skills-tags {
  display: flex; flex-wrap: wrap;
  gap: 0.65rem; justify-content: center;
  position: relative; z-index: 1;
}
.skill-tag {
  padding: 0.45rem 1.1rem;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 100px; font-size: 0.78rem;
  color: var(--text-muted); cursor: default;
  transition: border-color 0.3s, color 0.3s, transform 0.3s, box-shadow 0.3s, background 0.3s;
}
.skill-tag:hover {
  background: rgba(56, 189, 248, 0.05);
  border-color: var(--accent); color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2), 0 0 15px var(--glow-blue);
}

/* Skills section grid */
.skill-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
  position: relative;
  z-index: 1;
}

/* Base skill card */
.skill-card {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2rem 1.5rem;
  overflow: hidden;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-height: 260px;
  transition: transform 0.45s cubic-bezier(0.16,1,0.3,1), border-color 0.4s, box-shadow 0.5s;
  transform-style: preserve-3d;
}
.skill-card:hover {
  transform: translateY(-12px) scale(1.015);
  border-color: var(--border-light);
  box-shadow: 0 30px 80px rgba(0,0,0,0.4);
}
.skill-card-glow {
  position: absolute; inset: 0; opacity: 0;
  background: radial-gradient(circle at 50% 115%, var(--glow-c), transparent 60%);
  transition: opacity 0.5s; border-radius: inherit;
  pointer-events: none;
}
.skill-card:hover .skill-card-glow { opacity: 1; }
/* Number */
.skill-card-num { font-size: 0.62rem; letter-spacing: 0.25em; color: var(--text-dim); position: relative; z-index: 1; }
/* Icon */
.skill-card-icon { font-size: 2.2rem; line-height:1; position: relative; z-index:1; transition: transform 0.5s cubic-bezier(0.16,1,0.3,1), filter 0.45s; }
.skill-card:hover .skill-card-icon { transform: scale(1.2) translateY(-5px); }
/* Title */
.skill-card-title { font-family: var(--font-head); font-size:1.4rem; font-weight:700; position: relative; z-index:1; transition: color 0.3s; }
.skill-card:hover .skill-card-title { color:#fff; }
/* Description */
.skill-card-desc { font-size:0.88rem; color:var(--text-muted); line-height:1.65; flex:1; position:relative; z-index:1; }
/* Tech tags */
.skill-card-tech-tags { display:flex; flex-wrap:wrap; gap:0.4rem; position:relative; z-index:1; }
.skill-card-tech-tags span { font-size:0.59rem; letter-spacing:0.06em; padding:0.22rem 0.7rem; border:1px solid rgba(255,255,255,0.07); border-radius:100px; color:var(--text-dim); background:rgba(255,255,255,0.025); transition:border-color 0.3s, color 0.3s; }
.skill-card:hover .skill-card-tech-tags span { border-color:rgba(56,189,248,0.22); color:var(--text-muted); }

/* ================================================
   PROJECTS
================================================ */
.projects-section {
  text-align: center; max-width: 1200px; margin: 0 auto; padding: 8rem 2rem;
  position: relative;
}
/* Atmospheric section glow */
.projects-section::before {
  content: '';
  position: absolute; top: 6rem; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 450px;
  background: radial-gradient(ellipse,
    rgba(139,92,246,0.06) 0%,
    rgba(56,189,248,0.03) 40%,
    transparent 70%);
  pointer-events: none; z-index: 0;
}
.project-cards {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem; margin-top: 1rem;
  position: relative; z-index: 1;
}

/* ─── Base Card ──────────────────────────────────── */
.project-card {
  position: relative; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 24px;
  padding: 2.5rem 2rem; overflow: hidden;
  text-align: left; display: flex; flex-direction: column;
  gap: 0.75rem; min-height: 340px;
  transition:
    transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.4s,
    box-shadow 0.5s;
  transform-style: preserve-3d;
  text-decoration: none;
}

/* Top highlight sweep line */
.project-card::after {
  content: '';
  position: absolute; top: 0;
  left: 25%; right: 25%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  opacity: 0;
  transition: opacity 0.5s, left 0.5s, right 0.5s;
  pointer-events: none;
}
.project-card:hover::after { opacity: 1; left: 5%; right: 5%; }

/* Per-card hover with colour-matched shadows */
.project-card:hover {
  transform: translateY(-12px) scale(1.015);
  border-color: var(--border-light);
  box-shadow: 0 30px 80px rgba(0,0,0,0.4);
}
#card-sig:hover {
  border-color: rgba(139, 92, 246, 0.38);
  box-shadow:
    0 30px 80px rgba(0,0,0,0.45),
    0 0 70px rgba(139,92,246,0.12),
    inset 0 1px 0 rgba(139,92,246,0.18);
}
#card-web:hover {
  border-color: rgba(56, 189, 248, 0.38);
  box-shadow:
    0 30px 80px rgba(0,0,0,0.45),
    0 0 70px rgba(56,189,248,0.12),
    inset 0 1px 0 rgba(56,189,248,0.18);
}
#card-data:hover {
  border-color: rgba(52, 211, 153, 0.38);
  box-shadow:
    0 30px 80px rgba(0,0,0,0.45),
    0 0 70px rgba(52,211,153,0.12),
    inset 0 1px 0 rgba(52,211,153,0.18);
}

/* Bottom glow overlay */
.project-card-glow {
  position: absolute; inset: 0; opacity: 0;
  background: radial-gradient(circle at 50% 115%, var(--glow-c), transparent 60%);
  transition: opacity 0.5s; border-radius: inherit;
  pointer-events: none;
}
.project-card:hover .project-card-glow { opacity: 1; }

/* Ambient orb (large blurred circle) */
.card-orb {
  position: absolute;
  width: 250px; height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--orb-c) 0%, transparent 70%);
  bottom: -95px; right: -65px;
  pointer-events: none;
  transition: transform 0.9s cubic-bezier(0.16,1,0.3,1), opacity 0.5s;
  opacity: 0.45;
  z-index: 0;
}
.project-card:hover .card-orb, .skill-ring-card:hover .card-orb {
  transform: scale(1.6) translate(-12px, -20px);
  opacity: 1;
}

/* Floating particles */
.card-particles {
  position: absolute; inset: 0;
  pointer-events: none; overflow: hidden;
  border-radius: inherit; z-index: 0;
}
.cp {
  position: absolute; border-radius: 50%;
  opacity: 0;
  animation: cpFloat 3.5s ease-in-out infinite paused;
}
.project-card:hover .cp, .skill-ring-card:hover .cp { animation-play-state: running; }
.cp1 {
  width: 3px; height: 3px; left: 14%; top: 78%;
  background: rgba(56,189,248,0.9);
  animation-delay: 0s;
}
.cp2 {
  width: 2px; height: 2px; left: 58%; top: 84%;
  background: rgba(139,92,246,0.9);
  animation-delay: 0.9s;
}
.cp3 {
  width: 2px; height: 2px; left: 80%; top: 62%;
  background: rgba(103,232,249,0.8);
  animation-delay: 1.8s;
}
.cp4 {
  width: 3px; height: 3px; left: 37%; top: 82%;
  background: rgba(52,211,153,0.7);
  animation-delay: 0.45s;
}
@keyframes cpFloat {
  0%   { opacity: 0; transform: translateY(0) scale(0.4); }
  20%  { opacity: 1; }
  80%  { opacity: 0.4; }
  100% { opacity: 0; transform: translateY(-65px) scale(0.1); }
}

/* Number */
.project-card-num {
  font-size: 0.62rem; letter-spacing: 0.25em;
  color: var(--text-dim); position: relative; z-index: 1;
}

/* Icon */
.project-card-icon {
  font-size: 2.6rem; line-height: 1;
  position: relative; z-index: 1;
  transition: transform 0.5s cubic-bezier(0.16,1,0.3,1), filter 0.45s;
}
.project-card:hover .project-card-icon {
  transform: scale(1.2) translateY(-5px);
}
/* Per-card icon colours & hover glow */
#card-sig .project-card-icon { color: var(--purple); }
#card-sig:hover .project-card-icon { filter: drop-shadow(0 0 14px rgba(139,92,246,0.85)); }
#card-web .project-card-icon { color: var(--accent); }
#card-web:hover .project-card-icon { filter: drop-shadow(0 0 14px rgba(56,189,248,0.85)); }
#card-data .project-card-icon { color: var(--green); }
#card-data:hover .project-card-icon { filter: drop-shadow(0 0 14px rgba(52,211,153,0.85)); }

/* Custom themed particles per card */
#card-sig .cp1 { background: rgba(139, 92, 246, 0.9); }
#card-sig .cp2 { background: rgba(167, 139, 250, 0.9); }
#card-sig .cp3 { background: rgba(124, 58, 237, 0.8); }
#card-sig .cp4 { background: rgba(196, 181, 253, 0.7); }

#card-web .cp1 { background: rgba(56, 189, 248, 0.9); }
#card-web .cp2 { background: rgba(103, 232, 249, 0.9); }
#card-web .cp3 { background: rgba(14, 165, 233, 0.8); }
#card-web .cp4 { background: rgba(186, 230, 253, 0.7); }

#card-data .cp1 { background: rgba(52, 211, 153, 0.9); }
#card-data .cp2 { background: rgba(110, 231, 183, 0.9); }
#card-data .cp3 { background: rgba(16, 185, 129, 0.8); }
#card-data .cp4 { background: rgba(209, 250, 229, 0.7); }

/* Title */
.project-card-title {
  font-family: var(--font-head);
  font-size: 1.4rem; font-weight: 700;
  position: relative; z-index: 1;
  transition: color 0.3s;
}
.project-card:hover .project-card-title { color: #fff; }

/* Description */
.project-card-desc {
  font-size: 0.88rem; color: var(--text-muted);
  line-height: 1.65; flex: 1;
  position: relative; z-index: 1;
}

/* Tech tags */
.project-card-tech-tags {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  position: relative; z-index: 1;
}
.project-card-tech-tags span {
  font-size: 0.59rem; letter-spacing: 0.06em;
  padding: 0.22rem 0.7rem;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 100px;
  color: var(--text-dim);
  background: rgba(255,255,255,0.025);
  transition: border-color 0.3s, color 0.3s;
}
.project-card:hover .project-card-tech-tags span {
  border-color: rgba(56,189,248,0.22);
  color: var(--text-muted);
}

/* Footer */
.project-card-footer {
  margin-top: auto; position: relative; z-index: 1;
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.04);
  transition: border-color 0.3s;
}
.project-card:hover .project-card-footer { border-color: rgba(255,255,255,0.1); }
.project-card-count {
  font-size: 0.62rem; color: var(--text-dim);
  letter-spacing: 0.1em; text-transform: uppercase;
}
.project-card-cta {
  font-size: 0.78rem; color: var(--accent);
  font-weight: 500; letter-spacing: 0.02em;
  transition: transform 0.3s;
}
.project-card:hover .project-card-cta { transform: translateX(5px); }

/* ================================================
   EXPERIENCE TIMELINE
================================================ */
.experience-section { max-width: 900px; margin: 0 auto; padding: 8rem 2rem; }
.timeline {
  position: relative; padding: 2rem 0;
  margin-top: 2rem;
}
.timeline-track {
  position: absolute; left: 50%; top: 0;
  width: 1px; height: 0%;
  background: linear-gradient(to bottom, var(--accent), var(--purple));
  transform: translateX(-50%);
  transition: height 0.05s linear;
}
.timeline-item {
  display: grid;
  grid-template-columns: 1fr 20px 1fr;
  gap: 2rem; align-items: start;
  margin-bottom: 3rem;
}
.tl-left .tl-card { grid-column: 1; text-align: right; }
.tl-left .tl-node { grid-column: 2; }
.tl-left .tl-spacer { grid-column: 3; }
.tl-right .tl-spacer { grid-column: 1; }
.tl-right .tl-node { grid-column: 2; }
.tl-right .tl-card { grid-column: 3; text-align: left; }
.tl-node {
  width: 12px; height: 12px;
  border-radius: 50%; background: var(--accent);
  border: 2px solid var(--void);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.5);
  justify-self: center; margin-top: 0.5rem;
}
.tl-node-purple {
  background: var(--purple);
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.5);
}
.tl-node-active {
  background: var(--cyan);
  box-shadow: 0 0 25px rgba(103, 232, 249, 0.7);
  animation: nodePulse 2s ease-in-out infinite;
}
@keyframes nodePulse {
  0%, 100% { box-shadow: 0 0 15px rgba(103, 232, 249, 0.5); }
  50% { box-shadow: 0 0 35px rgba(103, 232, 249, 0.9); }
}
.tl-card {
  background: var(--glass); border: 1px solid var(--border);
  border-radius: 16px; padding: 1.5rem;
}
.tl-card:hover { border-color: var(--border-light); }
.tl-year {
  font-size: 0.62rem; letter-spacing: 0.25em;
  color: var(--accent); display: block; margin-bottom: 0.5rem;
  text-transform: uppercase;
}
.tl-title {
  font-family: var(--font-head); font-size: 1rem;
  font-weight: 600; margin-bottom: 0.5rem;
}
.tl-desc { font-size: 0.83rem; color: var(--text-muted); line-height: 1.65; }
.tl-spacer { min-width: 0; }

/* ================================================
   PUBLICATIONS
================================================ */
.publications-section {
  max-width: 860px;
  margin: 0 auto;
  padding: 6rem 2rem;
  text-align: center;
}
.pub-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 0;
  text-align: left;
}
.pub-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0;
  position: relative;
  overflow: hidden;
  transition: border-color 0.4s, transform 0.4s, box-shadow 0.4s;
}
.pub-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--purple), var(--cyan));
  opacity: 0;
  transition: opacity 0.4s;
}
.pub-card:hover {
  border-color: var(--border-light);
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(56, 189, 248, 0.07), 0 0 30px rgba(139, 92, 246, 0.04);
}
.pub-card:hover::before { opacity: 1; }
.pub-card-inner {
  padding: 2rem 2.2rem 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

/* Top bar — number + tags */
.pub-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.pub-num {
  font-family: var(--font-head);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: var(--accent);
  opacity: 0.6;
}
.pub-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.pub-tag {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.65rem;
  border: 1px solid var(--border-light);
  border-radius: 100px;
  color: var(--text-dim);
}
.pub-tag-accent {
  border-color: rgba(56, 189, 248, 0.35);
  color: var(--accent);
  background: rgba(56, 189, 248, 0.07);
}

/* Title */
.pub-title {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  margin: 0;
}

/* One-liner */
.pub-oneliner {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
}

/* CSS-only collapsible abstract */
.pub-abstract-toggle {
  display: none;
}
.pub-abstract-wrap {
  border-top: 1px solid var(--border);
  padding-top: 0.9rem;
}
.pub-abstract-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  cursor: none;
  user-select: none;
  transition: opacity 0.2s;
}
.pub-abstract-label:hover { opacity: 0.75; }
.pub-abstract-arrow {
  display: inline-block;
  transition: transform 0.3s ease;
  font-size: 0.7rem;
}
.pub-abstract-toggle:checked ~ .pub-abstract-label .pub-abstract-arrow {
  transform: rotate(-180deg);
}
.pub-abstract {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.45s cubic-bezier(0.16,1,0.3,1), opacity 0.35s ease, margin-top 0.3s;
}
.pub-abstract-toggle:checked ~ .pub-abstract {
  max-height: 200px;
  opacity: 1;
  margin-top: 0.75rem;
}

/* Status row */
.pub-status-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.pub-status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(103, 232, 249, 0.8);
  flex-shrink: 0;
  animation: pubDotPulse 2.5s ease-in-out infinite;
}
@keyframes pubDotPulse {
  0%, 100% { box-shadow: 0 0 6px rgba(103,232,249,0.5); }
  50% { box-shadow: 0 0 14px rgba(103,232,249,0.9); }
}
.pub-status-text {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-style: italic;
}

/* Metadata */
.pub-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  border-top: 1px solid var(--border);
  padding-top: 0.9rem;
}
.pub-meta-sep { opacity: 0.4; }

/* Action buttons */
.pub-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.pub-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.3rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-family: var(--font-body);
  letter-spacing: 0.04em;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: none;
}
.pub-btn-primary {
  background: var(--accent);
  color: var(--void);
  border: 1px solid var(--accent);
}
.pub-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.4);
}
.pub-btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-light);
}
.pub-btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ================================================
   ACHIEVEMENTS
================================================ */
.achievements-section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 6rem 2rem;
  text-align: center;
}
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
  justify-content: center;
}
.achievement-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  text-align: center;
  transition: border-color 0.4s, transform 0.4s, box-shadow 0.4s;
  position: relative;
  overflow: hidden;
  max-width: 300px;
  margin: 0 auto;
  width: 100%;
}
.achievement-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--purple), var(--cyan));
  opacity: 0;
  transition: opacity 0.4s;
}
.achievement-card:hover {
  border-color: var(--border-light);
  transform: translateY(-4px);
  box-shadow: 0 15px 40px rgba(56, 189, 248, 0.08), 0 0 25px rgba(139, 92, 246, 0.05);
}
.achievement-card:hover::before { opacity: 1; }
.achievement-badge {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.3));
}
.achievement-title {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  color: var(--text);
}
.achievement-issuer {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 0.8rem;
}
.achievement-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}
.achievement-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.achievement-card:hover .achievement-img {
  transform: scale(1.05);
}
.achievement-pdf-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text);
  background: var(--surface);
  gap: 0.25rem;
}
.img-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 8, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.35s ease;
  backdrop-filter: blur(4px);
}
.achievement-card:hover .img-overlay { opacity: 1; }
.pdf-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.5rem;
  border: 1px solid var(--accent);
  border-radius: 100px;
  color: var(--accent);
  font-size: 0.82rem;
  font-family: var(--font-body);
  letter-spacing: 0.04em;
  background: rgba(5, 5, 8, 0.7);
  backdrop-filter: blur(10px);
  transition: background 0.3s, color 0.3s, box-shadow 0.3s;
  cursor: none;
}
.pdf-view-btn:hover {
  background: var(--accent);
  color: var(--void);
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.3);
}


/* Achievements Milestones Summary Paragraph */
.achievements-milestones {
  max-width: 800px;
  margin: 4.5rem auto 0;
  text-align: center;
  padding: 0 1.5rem;
}
.milestones-summary-text {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.9;
  max-width: 680px;
  margin: 0 auto;
  text-align: left;
}
.milestones-highlight {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 500;
  display: inline-block;
}
.milestones-summary-text strong {
  color: var(--text);
  font-weight: 600;
}

/* ================================================
   CONTACT
================================================ */
.contact-section { text-align: center; max-width: 1200px; margin: 0 auto; padding: 8rem 2rem; }
.contact-form {
  max-width: 580px; margin: 0 auto 3rem;
  display: flex; flex-direction: column; gap: 1.5rem;
}
.float-group { position: relative; }
.float-input {
  width: 100%; padding: 1.1rem 1.2rem 0.7rem;
  background: var(--glass); border: 1px solid var(--border);
  border-radius: 12px; color: var(--text);
  font-size: 0.95rem; font-family: var(--font-body);
  outline: none; resize: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.float-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--glow-blue);
}
.float-label {
  position: absolute; left: 1.2rem; top: 1.05rem;
  color: var(--text-dim); font-size: 0.88rem;
  pointer-events: none;
  transition: top 0.25s, font-size 0.25s, color 0.25s;
}
.float-ta ~ .float-label { top: 1.1rem; }
.float-input:focus ~ .float-label,
.float-input:not(:placeholder-shown) ~ .float-label {
  top: 0.35rem; font-size: 0.65rem; color: var(--accent);
}
.btn-send {
  display: flex; align-items: center; justify-content: center;
  gap: 0.75rem; padding: 0.95rem 2.5rem;
  background: transparent; border: 1px solid var(--accent);
  color: var(--accent); border-radius: 100px;
  font-size: 0.95rem; font-family: var(--font-body);
  cursor: none; margin: 0 auto;
  transition: background 0.3s, color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.btn-send:hover {
  background: var(--accent); color: var(--void);
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.3);
  transform: translateY(-2px);
}
.send-arrow { transition: transform 0.3s; }
.btn-send:hover .send-arrow { transform: translateX(5px); }
.social-row {
  display: flex; align-items: center;
  justify-content: center; gap: 1.2rem; margin-top: 2.5rem;
}
.social-link {
  font-size: 0.88rem; color: var(--text-muted);
  transition: color 0.3s;
}
.social-link:hover { color: var(--accent); }
.s-sep { color: var(--text-dim); }

/* ================================================
   FOOTER
================================================ */
.footer {
  text-align: center; padding: 3rem 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-dim); font-size: 0.78rem;
  letter-spacing: 0.08em;
}
.footer-name { color: var(--text-muted); }



/* ================================================
   CINEMATIC PROJECT UNIVERSE
================================================ */
.universe-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: #000; display: none; opacity: 0;
  overflow: hidden;
}
#universe-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
}

/* Portal Flash */
.portal-flash {
  position: absolute; inset: 0; z-index: 5;
  background: radial-gradient(circle at center,
    rgba(100, 170, 255, 0.6) 0%,
    rgba(60, 120, 220, 0.3) 30%,
    rgba(255, 255, 255, 0.8) 60%,
    rgba(255, 255, 255, 0) 100%);
  opacity: 0; pointer-events: none;
}

/* Portal Title Phase */
.portal-phase {
  position: absolute; inset: 0; z-index: 15;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  pointer-events: none; opacity: 0;
}
.portal-label {
  font-family: var(--font-head);
  font-size: 0.7rem; letter-spacing: 0.6em;
  color: rgba(100, 170, 255, 0.5);
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}
.portal-category {
  font-family: var(--font-head);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 700; letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
  text-shadow:
    0 0 40px rgba(100, 170, 255, 0.25),
    0 0 80px rgba(100, 170, 255, 0.1);
}
.portal-line {
  width: 60px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(100, 170, 255, 0.4), transparent);
  margin-top: 1.5rem;
}

/* Universe Content (Post-Portal) */
.universe-content {
  position: relative; z-index: 10;
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  padding: 2.5rem 3rem;
  opacity: 0;
}
.universe-nav {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem; z-index: 20;
}
.universe-back {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted); padding: 0.6rem 1.4rem;
  border-radius: 100px; font-family: var(--font-head);
  font-size: 0.72rem; letter-spacing: 0.08em;
  cursor: pointer; transition: all 0.4s;
  backdrop-filter: blur(12px);
}
.universe-back:hover {
  border-color: var(--accent); color: var(--accent);
  background: rgba(56, 189, 248, 0.06);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.1);
}
.universe-cat-badge {
  font-family: var(--font-head);
  font-size: 0.62rem; letter-spacing: 0.4em;
  color: rgba(100, 170, 255, 0.5);
  padding: 0.45rem 1.2rem;
  border: 1px solid rgba(100, 170, 255, 0.15);
  border-radius: 100px;
  background: rgba(100, 170, 255, 0.03);
  backdrop-filter: blur(8px);
}

.universe-stage {
  flex: 1; display: flex;
  align-items: flex-start; justify-content: center;
  overflow-y: auto; overflow-x: hidden;
  padding: 2rem 0;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.universe-stage::-webkit-scrollbar { width: 3px; }
.universe-stage::-webkit-scrollbar-track { background: transparent; }
.universe-stage::-webkit-scrollbar-thumb {
  background: rgba(100, 170, 255, 0.2); border-radius: 10px;
}

/* Floating Glass Project Cards */
.project-float-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem; width: 100%;
  max-width: 1100px; padding: 1rem;
}
.u-project-card {
  position: relative; overflow: hidden;
  flex: 1 1 320px;
  max-width: 360px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 24px; padding: 2.5rem 2rem 2rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: pointer;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.4s, box-shadow 0.5s, background 0.4s;
  will-change: transform;
}
/* Shimmer sweep */
.u-project-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(
    120deg, transparent 30%,
    rgba(100, 170, 255, 0.04) 50%,
    transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.8s ease;
  pointer-events: none;
}
.u-project-card:hover::before { transform: translateX(100%); }
/* Top glow line */
.u-project-card::after {
  content: ''; position: absolute;
  top: 0; left: 15%; right: 15%; height: 1px;
  background: linear-gradient(90deg,
    transparent, rgba(100, 170, 255, 0.3), transparent);
  opacity: 0; transition: opacity 0.4s;
}
.u-project-card:hover::after { opacity: 1; }

.u-project-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(100, 170, 255, 0.25);
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(100, 170, 255, 0.06);
  transform: translateY(-6px) scale(1.015);
}

.u-project-num {
  font-family: var(--font-head);
  font-size: 0.6rem; letter-spacing: 0.3em;
  color: rgba(100, 170, 255, 0.45);
  margin-bottom: 1rem;
}
.u-project-title {
  font-family: var(--font-head);
  font-size: 1.35rem; font-weight: 600;
  color: var(--text); margin-bottom: 0.6rem;
  line-height: 1.3;
}
.u-project-tagline {
  font-size: 0.85rem; color: var(--text-muted);
  line-height: 1.6; margin-bottom: 1.5rem;
}
.u-project-cta {
  font-family: var(--font-head);
  font-size: 0.7rem; letter-spacing: 0.15em;
  color: rgba(100, 170, 255, 0.6);
  transition: color 0.3s;
}
.u-project-card:hover .u-project-cta {
  color: rgba(100, 170, 255, 0.9);
}

/* ═══════════════════════════════════════════════════
   CINEMATIC STORY OVERLAY  — Terminal Briefing Style
═══════════════════════════════════════════════════ */

.story-overlay {
  position: fixed; inset: 0; z-index: 10100;
  background: rgba(0,0,0,0);
  display: none; align-items: center; justify-content: center;
  padding: 0; opacity: 0;
  overflow: hidden;
}

/* Blurred dark backdrop */
.story-backdrop {
  position: absolute; inset: 0;
  background: rgba(2, 2, 10, 0.75);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

/* Ambient glow behind the panel */
.story-glow {
  position: absolute;
  top: 50%; left: 50%;
  width: 800px; height: 800px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle,
    rgba(56,189,248,0.07) 0%,
    rgba(139,92,246,0.04) 40%,
    transparent 70%);
  pointer-events: none; opacity: 0;
  animation: storyGlowPulse 4s ease-in-out infinite;
}
@keyframes storyGlowPulse {
  0%, 100% { transform: translate(-50%,-50%) scale(1); opacity: 1; }
  50%       { transform: translate(-50%,-50%) scale(1.08); opacity: 0.7; }
}

/* ── Main Panel ── */
.story-container {
  position: relative; z-index: 2;
  background:
    linear-gradient(145deg, rgba(8,8,20,0.97) 0%, rgba(12,12,28,0.95) 100%);
  border: 1px solid rgba(56,189,248,0.12);
  border-top: 1px solid rgba(56,189,248,0.28);
  border-radius: 20px; max-width: 820px; width: 94%;
  max-height: 90vh; overflow-y: auto;
  padding: 0;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.03),
    0 80px 160px rgba(0,0,0,0.8),
    0 0 60px rgba(56,189,248,0.06),
    inset 0 1px 0 rgba(255,255,255,0.05);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  overflow-x: hidden;
}
.story-container::-webkit-scrollbar { width: 3px; }
.story-container::-webkit-scrollbar-thumb {
  background: rgba(56,189,248,0.25); border-radius: 10px;
}

/* Scanline overlay on the whole panel */
.story-container::before {
  content: '';
  position: absolute; inset: 0; z-index: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
  pointer-events: none;
  border-radius: 20px;
}

/* Top chrome bar */
.story-chrome {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.5rem;
  background: rgba(56,189,248,0.04);
  border-bottom: 1px solid rgba(56,189,248,0.1);
}
.story-chrome-left {
  display: flex; align-items: center; gap: 0.6rem;
}
.story-chrome-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(56,189,248,0.35);
  box-shadow: 0 0 6px rgba(56,189,248,0.5);
  animation: chromeDotBlink 2s ease-in-out infinite;
}
.story-chrome-dot:nth-child(2) { animation-delay: 0.4s; background: rgba(139,92,246,0.5); box-shadow: 0 0 6px rgba(139,92,246,0.5); }
.story-chrome-dot:nth-child(3) { animation-delay: 0.8s; background: rgba(52,211,153,0.45); box-shadow: 0 0 6px rgba(52,211,153,0.5); }
@keyframes chromeDotBlink {
  0%,100% { opacity: 1; } 50% { opacity: 0.4; }
}
.story-chrome-id {
  font-family: var(--font-head);
  font-size: 0.6rem; letter-spacing: 0.35em;
  color: rgba(56,189,248,0.45);
  text-transform: uppercase;
}
.story-chrome-status {
  display: flex; align-items: center; gap: 0.4rem;
  font-family: var(--font-head);
  font-size: 0.58rem; letter-spacing: 0.2em;
  color: rgba(52,211,153,0.6);
}
.story-chrome-status::before {
  content: '';
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(52,211,153,0.7);
  box-shadow: 0 0 5px rgba(52,211,153,0.8);
  animation: chromeDotBlink 1.5s ease-in-out infinite;
}

/* Close button */
.story-close {
  position: absolute; top: 0.85rem; right: 1.1rem; z-index: 10;
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 50%;
  color: rgba(255,255,255,0.3); font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.3s;
}
.story-close:hover {
  color: #fff;
  border-color: rgba(56,189,248,0.4);
  box-shadow: 0 0 18px rgba(56,189,248,0.15);
  background: rgba(56,189,248,0.08);
  transform: rotate(90deg);
}

/* ── REDESIGNED STORY UI (INSPIRED BY USER LAYOUT) ── */
.story-content {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.story-status-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.story-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
}
.story-status-dot.live {
  background-color: var(--accent);
  color: var(--accent);
}
.story-status-dot.soon {
  background-color: #f59e0b;
  color: #f59e0b;
}
.story-title {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
  margin: 0;
  background: none;
  -webkit-text-fill-color: initial;
}
.story-subtitle {
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-top: -0.5rem;
}
.story-description {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.6;
  color: #d1d5db;
  margin: 0;
}
.story-divider {
  border-top: 1px dashed rgba(255, 255, 255, 0.15);
  margin: 0.5rem 0;
}
.story-bullets {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.story-bullet {
  display: flex;
  gap: 0.75rem;
  font-family: monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.story-bullet.revealed {
  opacity: 1;
  transform: translateY(0);
}
.bullet-arrow {
  color: var(--accent);
  font-weight: bold;
  flex-shrink: 0;
}
.bullet-text {
  color: #9ca3af;
  flex: 1;
}
.bullet-text strong {
  color: #f3f4f6;
  font-family: var(--font-head);
  letter-spacing: 0.05em;
}
.story-tech-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.story-tech-box {
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  font-size: 0.7rem;
  font-family: monospace;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.02);
}
.story-action-row {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}
.story-btn-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  background-color: var(--accent);
  color: #000 !important;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  font-family: monospace;
  box-shadow: 0 4px 14px var(--glow-accent);
  transition: all 0.25s ease;
  border: none;
}
.story-btn-main:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--glow-accent);
  filter: brightness(1.1);
}
.story-btn-main.disabled {
  cursor: not-allowed;
  pointer-events: none;
  background-color: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: rgba(245, 158, 11, 0.85) !important;
  box-shadow: none;
}
.story-btn-alt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  background-color: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--accent) !important;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  font-family: monospace;
  transition: all 0.25s ease;
}
.story-btn-alt:hover {
  border-color: var(--accent);
  background-color: color-mix(in srgb, var(--accent) 18%, transparent);
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--glow-accent);
}

.btn-soon-badge {
  display: inline-block;
  font-size: 0.58em;
  padding: 0.15em 0.55em;
  margin-left: 0.45em;
  background: rgba(251,191,36,0.1);
  border: 1px solid rgba(251,191,36,0.22);
  color: rgba(251,191,36,0.85);
  border-radius: 100px;
  vertical-align: middle;
  letter-spacing: 0.05em;
  font-family: var(--font-body);
}

/* LENIS OVERRIDES FOR SMOOTH SCROLL */
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .project-float-grid {
    max-width: 500px;
  }
  .project-float-grid .u-project-card {
    flex: 1 1 100%;
    max-width: none;
  }
  .universe-content { padding: 2rem 1.5rem; }
}
/* (consolidated into the full mobile block below) */


/* ================================================
   SKILL TICKER STRIPS
================================================ */

.ticker-wrapper {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-top: 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ticker-row {
  display: flex;
  align-items: center;
  padding: 0.85rem 0;
  border-top: 1px solid rgba(255,255,255,0.05);
  gap: 0;
}
.ticker-row:last-child {
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* Category label — inline flex item on the left */
.ticker-category {
  flex-shrink: 0;
  width: 140px;
  padding: 0 1.5rem 0 2.5rem;
  font-family: var(--font-head);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.55);
  white-space: nowrap;
  border-right: 1px solid rgba(255,255,255,0.06);
  z-index: 2;
  pointer-events: none;
}

/* The scrollable strip container */
.ticker-track-outer {
  flex: 1;
  overflow: hidden;
  min-width: 0;
  /* Fade edges using mask */
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
}

/* Moving strip — direction toggled by --ticker-dir */
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-scroll 28s linear infinite;
  /* Forward or reverse based on dir: -1 = LTR scroll, 1 = RTL scroll */
  animation-direction: calc(var(--ticker-dir, -1) * 1);
}

/* reverse trick using animation-direction doesn't work with calc — use classes */
.ticker-track[style*="--ticker-dir: -1"] { animation-direction: normal; }
.ticker-track[style*="--ticker-dir: 1"]  { animation-direction: reverse; }

.ticker-track:hover { animation-play-state: paused; }

.ticker-inner {
  display: flex;
  gap: 0;
}

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

/* Each skill pill */
.ticker-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 1.6rem;
  margin: 0 0.25rem;
  border-radius: 100px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  white-space: nowrap;
  cursor: default;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.ticker-item:hover {
  background: rgba(56,189,248,0.07);
  border-color: rgba(56,189,248,0.25);
  box-shadow: 0 0 18px rgba(56,189,248,0.12);
  transform: translateY(-3px) scale(1.04);
}

.ticker-item img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
  flex-shrink: 0;
}

.ticker-item span {
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  transition: color 0.25s;
}

.ticker-item:hover span {
  color: var(--accent);
}

/* Mobile: hide category labels, smaller pills */
@media (max-width: 768px) {
  .ticker-category {
    display: none;
  }
  .ticker-row {
    padding: 0.6rem 0;
  }
  .ticker-item {
    padding: 0.45rem 1rem;
    gap: 0.45rem;
    margin: 0 0.15rem;
  }
  .ticker-item img {
    width: 20px;
    height: 20px;
  }
  .ticker-item span {
    font-size: 0.68rem;
  }
}

/* ================================================
   FULL MOBILE RESPONSIVE — 768px and below
================================================ */
@media (max-width: 768px) {

  /* Prevent horizontal overflow — kill any scroll bleed */
  html, body { overflow-x: hidden; max-width: 100vw; }

  /* Hide custom cursor on touch devices */
  .cursor-ring, .cursor-dot { display: none; }
  body { cursor: auto; }
  a, button { cursor: pointer; }

  /* ── NAVBAR ─────────────────────────────────── */
  .navbar {
    top: 1rem;
    width: calc(100vw - 2rem);
    max-width: 320px;
    border-radius: 100px;
    padding: 0.55rem 1.2rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 48px;
  }
  .navbar.menu-open {
    max-height: 420px;
    border-radius: 24px;
    padding: 0.8rem 1.2rem 1.5rem 1.2rem;
  }
  .nav-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .nav-logo {
    font-size: 0.95rem;
  }
  .mobile-menu-toggle {
    display: block;
  }
  .nav-menu-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
    height: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, height 0s 0.3s;
    overflow: hidden;
  }
  .navbar.menu-open .nav-menu-wrapper {
    height: auto;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    transition: opacity 0.4s ease 0.1s, transform 0.4s ease 0.1s, height 0s;
    margin-top: 1.5rem;
  }
  .nav-links {
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    width: 100%;
  }
  .nav-link {
    font-size: 0.92rem;
    width: 100%;
    text-align: center;
    padding: 0.2rem 0;
  }
  .nav-link::after {
    display: none;
  }
  .nav-github {
    font-size: 0.85rem;
    padding: 0.45rem 1.2rem;
    width: 100%;
    text-align: center;
  }

  /* ── HERO ───────────────────────────────────── */
  .hero-content { padding: 0 1.2rem; }
  .hero-name { font-size: clamp(2.6rem, 12vw, 4.5rem); margin-bottom: 1rem; }
  .hero-typewriter {
    font-size: clamp(1.1rem, 5vw, 1.3rem);
    letter-spacing: 0.15em;
    text-indent: 0.15em;
    margin-bottom: 1.2rem;
  }
  .hero-tagline { font-size: clamp(0.9rem, 3.5vw, 1.1rem); margin-bottom: 2rem; }
  .hero-cta { gap: 0.75rem; }
  .btn-primary, .btn-ghost { padding: 0.75rem 1.5rem; font-size: 0.82rem; }
  /* Hide the 3D starfield canvas on mobile to save resources */
  #hero-canvas { opacity: 0.35; }

  /* ── SECTIONS BASE ──────────────────────────── */
  .section { padding: 5rem 1.25rem; }
  /* Skills section: ticker is 100vw so reduce vertical pad only */
  .skills-section { padding: 5rem 0 4rem; }
  .skills-section .section-label,
  .skills-section .section-title,
  .skills-section .section-sub { padding: 0 1.25rem; }
  .section-title { font-size: clamp(2rem, 8vw, 2.8rem); }
  .section-sub { font-size: 0.92rem; margin-bottom: 2.5rem; }

  /* ── ABOUT ──────────────────────────────────── */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }
  .about-visual { order: -1; }
  .avatar-frame { width: min(200px, 60vw); height: min(200px, 60vw); }
  .about-stats { gap: 0.75rem; justify-content: center; }
  .stat-card { padding: 0.9rem 1.1rem; }
  .stat-num { font-size: 1.6rem; }
  .about-text { text-align: center; }
  .about-p { font-size: 0.95rem; }
  .about-links { gap: 0.75rem; justify-content: center; }

  /* ── PROJECTS ───────────────────────────────── */
  .project-cards {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
  .project-card { min-height: auto; padding: 2rem 1.5rem; }
  .project-card-icon { font-size: 2rem; }
  .project-card-title { font-size: 1.2rem; }

  /* ── EXPERIENCE TIMELINE ────────────────────── */
  .timeline-track { left: 1.25rem; }
  .timeline-item {
    grid-template-columns: 20px 1fr;
    gap: 1rem;
  }
  /* Always put node in col 1, card in col 2, hide spacer */
  .tl-left .tl-spacer,
  .tl-right .tl-spacer { display: none; }
  .tl-left .tl-node,
  .tl-right .tl-node { grid-column: 1; }
  .tl-left .tl-card,
  .tl-right .tl-card {
    grid-column: 2;
    text-align: left;
  }
  .tl-card { padding: 1.1rem 1.2rem; }
  .tl-title { font-size: 0.92rem; }
  .tl-desc { font-size: 0.78rem; }

  /* ── CONTACT ────────────────────────────────── */
  .contact-section { padding: 5rem 1.25rem; }
  .contact-form { gap: 1.2rem; }

  /* ── ACHIEVEMENTS ───────────────────────────── */
  .achievements-section { padding: 5rem 1.25rem; }
  .achievements-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .achievement-img-wrap { aspect-ratio: 3 / 2; }
  .float-input { font-size: 0.88rem; }
  .btn-send { padding: 0.85rem 2rem; font-size: 0.88rem; width: 100%; }
  .social-row { gap: 0.8rem; flex-wrap: wrap; }

  /* ── PROJECT UNIVERSE OVERLAY ───────────────── */
  .u-project-card { padding: 1.4rem 1.2rem; }
  .universe-cat-label { font-size: clamp(1.2rem, 6vw, 2rem); }
  .portal-category { font-size: clamp(2rem, 6vw, 3.5rem); }
  .universe-nav { flex-direction: column; gap: 1rem; align-items: flex-start; }

  /* ── STORY MODAL ────────────────────────────── */
  .story-container { border-radius: 0; max-height: 100dvh; padding: 0; }
  .story-hero { padding: 2rem 1.5rem 1.5rem; }
  .story-title { font-size: clamp(1.4rem, 6vw, 2rem); }
  .story-content { padding: 1.5rem 1.25rem; gap: 1.25rem; }
  .story-action-row { flex-direction: column; gap: 0.75rem; width: 100%; }
  .story-btn-main, .story-btn-alt { width: 100%; text-align: center; justify-content: center; padding: 0.85rem 1.5rem; }
  .story-body { padding: 0 1.5rem; gap: 1.5rem; }
  .story-links { padding: 1.5rem; gap: 0.75rem; flex-direction: column; }
  .story-btn { width: 100%; text-align: center; justify-content: center; }


  /* ── SUBPAGE CINEMA CARDS ───────────────────── */
  .project-grid { grid-template-columns: 1fr !important; }

  /* ── SKILLS RING CARDS ──────────────────────── */
  .skills-rings { gap: 1rem; }
  .skill-ring-card { width: 160px; padding: 1.5rem 1rem; }
  .ring-svg { width: 85px; height: 85px; }

  /* ── TICKER — touch-friendly ─────────────────── */
  .ticker-track-outer { touch-action: pan-x; }
  .ticker-wrapper { margin-top: 2rem; }
}

/* ================================================
   ULTRA SMALL — 480px and below
================================================ */
@media (max-width: 480px) {

  .hero-name { font-size: clamp(2.2rem, 14vw, 3.5rem); }
  .section { padding: 4rem 1rem; }
  .skills-section { padding: 4rem 0 3rem; }
  .about-stats { gap: 0.5rem; }
  .stat-card { padding: 0.75rem 0.9rem; }
  .stat-num { font-size: 1.4rem; }
  .project-card { padding: 1.5rem 1.2rem; }
  .tl-title { font-size: 0.85rem; }
}

/* ================================================
   PERFORMANCE — Reduce Motion
================================================ */
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation-play-state: paused; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}