:root {
  --bg: #030407;
  --bg-dark: #010103;
  --white: #ffffff;
  --off-white: #e2e8f0;
  --muted: #94a3b8;
  --accent: #a78bfa;
  --accent2: #38bdf8;
  --nav-h: 72px;
  --max-w: 1200px;
  --pad: clamp(24px, 6vw, 64px);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--off-white);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  line-height: 1.5;
}
body.landing-active { overflow: hidden; }

/* ── Typography ── */
h1, h2, h3, h4, .sec-heading { font-family: 'Inter', sans-serif; }
a { text-decoration: none; color: inherit; }
button { border: none; background: none; cursor: pointer; font: inherit; }

/* ── Rolling in the Universe Preloader ── */
.loader-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: radial-gradient(circle at center, #070913 0%, #020204 100%);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.8s var(--ease), visibility 0.8s;
  overflow: hidden;
}
.loader-overlay.fade-out { opacity: 0; visibility: hidden; pointer-events: none; }
.universe-stage {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(167, 139, 250, 0.12) 0%, transparent 60%);
}
.universe-stars {
  position: absolute; inset: -50%;
  background-image: 
    radial-gradient(1px 1px at 20px 30px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 100px 150px, #a78bfa, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 200px 80px, #38bdf8, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 300px 300px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 450px 220px, #a78bfa, rgba(0,0,0,0));
  background-repeat: repeat;
  background-size: 500px 500px;
  animation: cosmicRollStars 30s linear infinite;
  opacity: 0.6;
}
@keyframes cosmicRollStars {
  from { transform: rotate(0deg) scale(1); }
  to { transform: rotate(360deg) scale(1.1); }
}

.loader-content {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 28px; width: 320px;
  max-width: 90vw;
  z-index: 2;
}

/* 3D Rolling Celestial Globe & Cosmic Rings */
.universe-roller-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 800px;
}
.universe-celestial-globe {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffffff 0%, #38bdf8 35%, #7c3aed 70%, #030014 100%);
  box-shadow: 
    0 0 40px rgba(56, 189, 248, 0.6),
    0 0 80px rgba(167, 139, 250, 0.4),
    inset -10px -10px 20px rgba(0,0,0,0.8),
    inset 4px 4px 10px rgba(255,255,255,0.7);
  animation: rollCelestialSphere 4s linear infinite;
}
@keyframes rollCelestialSphere {
  0% {
    transform: rotate(0deg);
    filter: hue-rotate(0deg);
  }
  50% {
    transform: rotate(180deg) scale(1.04);
    filter: hue-rotate(45deg);
  }
  100% {
    transform: rotate(360deg);
    filter: hue-rotate(0deg);
  }
}

/* Rolling Orbit Rings */
.universe-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid transparent;
  pointer-events: none;
}
.universe-ring-1 {
  width: 130px; height: 130px;
  border-top-color: rgba(56, 189, 248, 0.85);
  border-bottom-color: rgba(167, 139, 250, 0.3);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
  transform: rotateX(72deg) rotateY(15deg);
  animation: rollRing1 3s linear infinite;
}
.universe-ring-2 {
  width: 110px; height: 110px;
  border-left-color: rgba(167, 139, 250, 0.9);
  border-right-color: rgba(56, 189, 248, 0.2);
  box-shadow: 0 0 15px rgba(167, 139, 250, 0.4);
  transform: rotateX(60deg) rotateY(-35deg);
  animation: rollRing2 4.5s linear infinite reverse;
}
.universe-ring-3 {
  width: 90px; height: 90px;
  border-top-color: rgba(255, 255, 255, 0.9);
  transform: rotateX(45deg) rotateY(45deg);
  animation: rollRing1 2s linear infinite;
}
@keyframes rollRing1 {
  to { transform: rotateX(72deg) rotateY(15deg) rotateZ(360deg); }
}
@keyframes rollRing2 {
  to { transform: rotateX(60deg) rotateY(-35deg) rotateZ(360deg); }
}

.loader-badge {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: var(--accent2);
  text-transform: uppercase;
  background: rgba(56, 189, 248, 0.1);
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}
.loader-label { 
  font-family: 'Inter', sans-serif; 
  font-size: 0.8rem; 
  letter-spacing: 0.2em; 
  color: #fff;
  font-weight: 500;
  text-align: center;
}
.progress-bar-track { 
  width: 100%; height: 3px; 
  background: rgba(255,255,255,0.08); 
  border-radius: 4px;
  overflow: hidden; 
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.5);
}
.progress-bar-fill { 
  width: 0%; height: 100%; 
  background: linear-gradient(90deg, var(--accent2), var(--accent)); 
  border-radius: 4px;
  box-shadow: 0 0 10px var(--accent);
  transition: width 0.15s ease-out; 
}
.loader-meta { 
  width: 100%; display: flex; justify-content: space-between; 
  font-size: 0.7rem; color: rgba(255,255,255,0.5); 
  font-family: 'Space Grotesk', monospace; 
}



/* Section visibility toggle utility */
.section-hidden {
  display: none !important;
}

/* ── Background & Canvas Engine ── */
.viewport-fixed { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
#sequenceCanvas { 
  display: block; width: 100%; height: 100%; 
  will-change: transform, filter;
  /* CSS Variables driven by JS for scroll velocity chromatic aberration */
  --warp-r: 0px;
  --warp-b: 0px;
  /* Note: true chromatic aberration requires WebGL, but we can fake it with drop-shadows or rely on the canvas 2D composite if we want. For high performance, we'll keep it clean and handle warp in JS. */
}
.vignette-overlay {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at center, transparent 20%, rgba(1,1,3,0.85) 100%);
  z-index: 2;
}
.warp-flash {
  position: absolute; inset: 0; z-index: 3; background: var(--white);
  opacity: 0; pointer-events: none; transition: opacity 0.1s linear;
}

/* ── Glass Panels & Cursor Spotlight (Space Morphism) ── */
.glass-panel {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(24px) saturate(120%);
  -webkit-backdrop-filter: blur(24px) saturate(120%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}
/* Holographic Spotlight ::before injected via JS coordinates */
.glass-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255, 255, 255, 0.08),
    transparent 40%
  );
  z-index: 0;
  transition: opacity 0.3s;
  opacity: 0;
}
.glass-panel:hover::before { opacity: 1; }
/* Ensure inner content sits above the spotlight */
.glass-panel > * { position: relative; z-index: 1; }

/* ── Magnetic Buttons ── */
.magnetic-btn {
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform 0.4s var(--spring), background 0.3s, border-color 0.3s, color 0.3s;
  will-change: transform;
}
.magnetic-btn:active { transform: scale(0.96) !important; }

/* ── Portfolio Shell ── */
.portfolio-shell { position: relative; z-index: 5; pointer-events: auto; }
.portfolio-shell section, .portfolio-shell header, .portfolio-shell footer { pointer-events: auto; }

.site-nav {
  position: fixed; top: 0; left: 0; width: 100%; height: var(--nav-h); z-index: 100;
  border-bottom: 1px solid transparent; transition: border-color 0.3s, background 0.3s;
}
.site-nav.scrolled { background: rgba(1,1,3,0.5); backdrop-filter: blur(20px); border-bottom-color: rgba(255,255,255,0.05); }
.nav-inner { max-width: var(--max-w); height: 100%; margin: 0 auto; padding: 0 var(--pad); display: flex; justify-content: space-between; align-items: center; }
.nav-logo { font-family: 'Inter', sans-serif; font-weight: 700; font-size: 1.2rem; letter-spacing: 0.1em; }
.nav-links { display: none; gap: 32px; align-items: center; }
.nav-link { font-family: 'Inter', sans-serif; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.15em; color: rgba(255,255,255,0.5); transition: color 0.3s; }
.nav-link:hover, .nav-link.active { color: var(--white); }
.nav-audio-btn { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.5); transition: color 0.3s; }
.nav-audio-btn:hover { color: var(--accent); }
.nav-audio-btn svg { width: 18px; height: 18px; }
.nav-cta {
  padding: 10px 24px; border-radius: 999px; font-family: 'Inter', sans-serif; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.15em;
  background: var(--white); color: var(--bg);
}
@media(min-width: 900px) { .nav-links { display: flex; } .nav-burger { display: none; } }
.nav-burger { width: 32px; height: 32px; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.nav-burger span { display: block; width: 24px; height: 1.5px; background: var(--white); transition: transform 0.3s, opacity 0.3s; }
.mobile-menu {
  position: fixed; top: var(--nav-h); right: var(--pad); padding: 24px; border-radius: 16px;
  display: flex; flex-direction: column; gap: 20px; opacity: 0; pointer-events: none; transform: translateY(-10px); transition: all 0.3s var(--ease); z-index: 99;
}
.mobile-menu.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.mm-link { font-family: 'Inter', sans-serif; font-size: 1rem; font-weight: 600; letter-spacing: 0.1em; color: var(--white); }

/* Buttons */
.btn-primary {
  padding: 16px 36px; border-radius: 999px; background: var(--white); color: var(--bg);
  font-family: 'Inter', sans-serif; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.15em;
}
.btn-primary:hover { box-shadow: 0 0 30px rgba(255,255,255,0.4); }
.btn-outline {
  padding: 16px 36px; border-radius: 999px; background: transparent; color: var(--white);
  border: 1px solid rgba(255,255,255,0.3);
  font-family: 'Inter', sans-serif; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.15em;
}
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.05); }
.hidden { display: none !important; }

/* Sections */
.section { min-height: 100vh; padding: 120px 0; display: flex; align-items: center; }
.section-inner { max-width: var(--max-w); width: 100%; margin: 0 auto; padding: 0 var(--pad); }
.sec-label { font-family: 'Inter', sans-serif; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.3em; color: var(--accent); margin-bottom: 16px; }
.sec-heading { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 700; line-height: 1.1; margin-bottom: 40px; letter-spacing: -0.02em; }

/* Hero */
.sec-hero { justify-content: center; text-align: center; }
.hero-inner { display: flex; flex-direction: column; align-items: center; }
.pill-tag { padding: 8px 24px; border-radius: 999px; border: 1px solid rgba(56,189,248,0.3); background: rgba(56,189,248,0.05); color: var(--accent2); font-family: 'Inter', sans-serif; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.2em; margin-bottom: 32px; }
.hero-name { font-family: 'Space Grotesk', sans-serif; font-size: clamp(3rem, 7vw, 6rem); font-weight: 600; letter-spacing: 0.01em; margin-bottom: 16px; background: linear-gradient(110deg, #fff 15%, #dbeafe 58%, var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 10px 40px rgba(0,0,0,0.5); }
.hero-role { font-size: 1.25rem; color: rgba(255,255,255,0.6); letter-spacing: 0.1em; margin-bottom: 48px; }
.hero-cta-row { display: flex; gap: 16px; margin-bottom: 80px; }
.hero-scroll-hint { font-family: 'Inter', sans-serif; font-size: 0.65rem; letter-spacing: 0.2em; color: rgba(255,255,255,0.4); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.scroll-mouse { width: 20px; height: 32px; border: 1px solid rgba(255,255,255,0.3); border-radius: 10px; position: relative; }
.scroll-wheel { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 2px; height: 4px; background: var(--white); border-radius: 2px; animation: scrolldrop 1.5s infinite; }
@keyframes scrolldrop { 0% { transform: translate(-50%, 0); opacity: 1; } 100% { transform: translate(-50%, 12px); opacity: 0; } }

/* About */
.about-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; min-height: 500px; }
.about-text { position: relative; z-index: 2; width: auto; margin-left: clamp(130px, 17vw, 220px); border-radius: 24px; padding: 42px 48px 42px clamp(130px, 14vw, 182px); }
.about-heading { min-height: 1.2em; margin-bottom: 18px; font-size: clamp(1.8rem, 3.3vw, 2.8rem); }
.about-body { max-width: 74ch; margin-bottom: 24px; color: rgba(255,255,255,0.9); font-size: 1rem; line-height: 1.7; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.about-typing-cursor { display: inline-block; margin-left: 5px; color: var(--accent2); animation: about-cursor-blink 0.8s steps(2, start) infinite; }
@keyframes about-cursor-blink { to { visibility: hidden; } }
.about-visual { position: absolute; top: 50%; left: 0; z-index: 3; width: clamp(220px, 29vw, 350px); aspect-ratio: 1; transform: translateY(-50%); }
.about-stats { display: flex; gap: 40px; margin: 40px 0; }
.stat-box { display: flex; flex-direction: column; gap: 8px; }
.stat-num { font-family: 'Inter', sans-serif; font-size: 2.5rem; font-weight: 700; color: var(--white); text-shadow: 0 2px 15px rgba(0,0,0,0.5); }
.stat-lbl { font-family: 'Inter', sans-serif; font-size: 0.65rem; letter-spacing: 0.2em; color: var(--muted); }
.avatar-frame { width: 100%; height: 100%; border: 7px solid rgba(18,19,27,0.9); border-radius: 50%; display: flex; justify-content: center; align-items: center; overflow: hidden; padding: 0; box-shadow: 0 22px 64px rgba(0,0,0,0.38); }
.avatar-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.about-photo-tag { position: absolute; right: -25px; bottom: 34px; padding: 10px 14px; border: 1px solid rgba(255,255,255,0.22); border-radius: 4px; background: rgba(18,19,27,0.94); color: #fff; font: 600 0.62rem 'Inter', sans-serif; letter-spacing: 0.08em; white-space: nowrap; }

/* Education */
.education-timeline { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr) 52px; gap: 24px; align-items: center; }
.education-timeline::before { content: ""; position: absolute; top: 32px; left: 10%; right: 10%; height: 1px; background: linear-gradient(90deg, transparent, rgba(56,189,248,0.65), rgba(167,139,250,0.65), transparent); pointer-events: none; }
.education-track { min-width: 0; }
.education-card { display: none; min-height: 320px; padding: 28px; border-radius: 18px; }
.education-card.is-active { display: block; animation: education-card-in 0.45s var(--ease) both; }
@keyframes education-card-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: translateX(0); } }
.education-arrow { position: relative; z-index: 1; width: 58px; height: 58px; border: 0; border-radius: 50%; background: rgba(255,255,255,0.06); color: var(--white); transition: transform 0.25s ease, color 0.25s ease, background 0.25s ease, opacity 0.25s ease; }
.education-arrow svg { display: block; width: 100%; height: 100%; transition: transform 0.25s ease; }
.education-arrow:hover:not(:disabled) { transform: scale(1.08); color: var(--accent2); background: rgba(56,189,248,0.12); }
.education-arrow:disabled { cursor: not-allowed; opacity: 0.3; }
.education-year { position: relative; display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border: 1px solid rgba(56,189,248,0.35); border-radius: 999px; background: rgba(3,4,7,0.8); color: var(--accent2); font: 600 0.72rem 'Inter', sans-serif; letter-spacing: 0.08em; }
.education-content { padding-top: 36px; }
.education-status { margin-bottom: 12px; color: var(--accent); font: 600 0.64rem/1.4 'Inter', sans-serif; letter-spacing: 0.13em; }
.education-content h3 { margin-bottom: 8px; color: var(--white); font-size: 1.25rem; line-height: 1.25; }
.education-institution { min-height: 48px; color: rgba(255,255,255,0.68); font-size: 0.92rem; line-height: 1.5; }
.education-result { margin-top: 22px; color: var(--white); font-size: 2rem; font-weight: 700; line-height: 1; }
.education-result span { color: var(--muted); font-size: 0.82rem; font-weight: 500; }
.education-note { margin-top: 12px; color: rgba(255,255,255,0.48); font-size: 0.78rem; }

/* Work */
.sec-header { margin-bottom: 64px; }
.sec-sub { font-size: 1.1rem; color: rgba(255,255,255,0.5); }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 24px; align-items: stretch; }
.project-card { aspect-ratio: 1; min-height: 280px; border-radius: 20px; overflow: hidden; padding: 0; }
.project-card-button { display: grid; grid-template-rows: minmax(0, 1.05fr) minmax(0, 0.95fr); width: 100%; height: 100%; padding: 0; border: 0; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.project-card-button:focus-visible { outline: 2px solid var(--accent2); outline-offset: -4px; }
.project-visual { display: flex; min-height: 0; overflow: hidden; }
.project-visual-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.project-copy { display: flex; min-height: 0; flex-direction: column; padding: 20px 24px 22px; }
.project-title { display: block; font-size: 1.3rem; line-height: 1.2; font-weight: 700; margin-bottom: 6px; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.project-subtitle { display: block; font-family: monospace; font-size: 0.78rem; line-height: 1.35; color: var(--accent2); margin-bottom: 10px; font-weight: 600; }
.project-brief { display: -webkit-box; overflow: hidden; color: rgba(255,255,255,0.75); font-size: 0.88rem; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.project-open { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 12px; color: var(--accent); font-size: 0.76rem; font-weight: 600; text-transform: uppercase; }
.project-open span { font-size: 1.15rem; transition: transform 0.2s ease; }
.project-card-button:hover .project-open span { transform: translateX(4px); }
.project-visual-terminal { flex-direction: column; justify-content: center; gap: 14px; padding: 28px; background: linear-gradient(140deg, rgba(19,33,39,0.98), rgba(13,19,25,0.98)); }
.terminal-label { color: rgba(255,255,255,0.48); font: 600 0.68rem/1.2 monospace; }
.terminal-wordmark { color: #f4f5ed; font: 600 clamp(1.7rem, 3vw, 2.7rem)/1 monospace; }
.terminal-prompt { color: #9de2c4; font: 0.78rem/1.3 monospace; }
.terminal-prompt span { color: #fff; animation: terminal-blink 1s steps(2, start) infinite; }
@keyframes terminal-blink { to { visibility: hidden; } }

.project-detail-modal { width: min(92vw, 960px); max-height: min(88vh, 900px); padding: 40px 48px; }
.project-detail-header { padding-right: 36px; }
.project-detail-header .sec-label { margin-bottom: 12px; }
.project-detail-header h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.15; }
.project-detail-subtitle { margin-top: 8px; color: var(--accent2); font-family: monospace; font-size: 0.86rem; }
.project-section-nav { position: sticky; top: -40px; z-index: 2; display: flex; flex-wrap: wrap; gap: 8px; margin: 24px -4px 0; padding: 12px 4px; border-bottom: 1px solid rgba(255,255,255,0.12); background: rgba(16,17,25,0.94); backdrop-filter: blur(14px); }
.project-section-nav a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border: 1px solid rgba(255,255,255,0.15); border-radius: 4px; color: rgba(255,255,255,0.68); font-size: 0.76rem; text-decoration: none; transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease; }
.project-section-nav a:hover, .project-section-nav a:focus-visible { border-color: var(--accent2); background: rgba(255,255,255,0.06); color: #fff; outline: none; }
.project-detail-panels { padding-top: 2px; }
.project-detail-section { padding: 24px 0; border-bottom: 1px solid rgba(255,255,255,0.12); scroll-margin-top: 84px; }
.project-detail-section:last-child { border-bottom: 0; }
.project-detail-section h3 { margin-bottom: 12px; color: #fff; font-size: 1.1rem; }
.project-detail-section p { max-width: 72ch; margin-bottom: 16px; color: rgba(255,255,255,0.8); font-size: 0.94rem; line-height: 1.65; }
.project-detail-screenshot { display: block; width: 100%; max-height: 380px; margin-top: 24px; border: 1px solid rgba(255,255,255,0.14); border-radius: 10px; object-fit: cover; object-position: top; }
.project-detail-media { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 24px 0; }
.project-detail-media figure { min-width: 0; }
.project-detail-media img { display: block; width: 100%; max-height: 300px; border: 1px solid rgba(255,255,255,0.14); border-radius: 10px; object-fit: cover; object-position: top; }
.project-detail-media figcaption { margin-top: 8px; color: rgba(255,255,255,0.55); font-size: 0.78rem; }
.project-detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.project-link-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 0 17px; border: 1px solid rgba(255,255,255,0.24); border-radius: 5px; color: #fff; background: rgba(255,255,255,0.06); font-size: 0.8rem; font-weight: 600; text-decoration: none; transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease; }
.project-link-button:hover { transform: translateY(-2px); border-color: var(--accent2); background: rgba(255,255,255,0.12); box-shadow: 0 8px 22px rgba(0,0,0,0.22); }
.project-link-button-primary { border-color: transparent; color: #10131a; background: var(--accent2); }
.project-link-button-primary:hover { border-color: transparent; color: #10131a; background: #fff; }
body.modal-open { overflow: hidden; }

@media (max-width: 768px) {
  .projects-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 18px; }
  .project-copy { padding: 18px 20px 20px; }
  .project-detail-modal { width: 94vw; max-height: 90vh; padding: 28px 22px; }
  .project-section-nav { top: -28px; gap: 6px; margin-top: 18px; }
  .project-section-nav a { min-height: 34px; padding: 0 9px; font-size: 0.7rem; }
  .project-detail-media { grid-template-columns: 1fr; }
}

/* Skills */
.skills-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin-bottom: 64px; }
.skill-group { padding: 32px; border-radius: 24px; }
.skill-group-title { font-size: 0.9rem; font-weight: 700; letter-spacing: 0.2em; color: var(--white); border-bottom: 1px solid rgba(255,255,255,0.2); padding-bottom: 16px; margin-bottom: 24px; }
.skill-list { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.skill-item { display: flex; align-items: center; gap: 12px; font-size: 1rem; color: rgba(255,255,255,0.9); font-weight: 500; }
.skill-dot { width: 4px; height: 4px; background: var(--accent2); border-radius: 50%; box-shadow: 0 0 8px var(--accent2); }
.tech-strip { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.tech-badge { padding: 10px 24px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.1); font-family: 'Inter', sans-serif; font-size: 0.75rem; letter-spacing: 0.15em; color: rgba(255,255,255,0.5); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.contact-copy { padding: 48px; border-radius: 32px; }
.contact-body { margin-bottom: 40px; font-size: 1.05rem; color: rgba(255,255,255,0.9); text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.contact-email { display: inline-flex; align-items: center; gap: 12px; font-family: 'Inter', sans-serif; font-size: 1.2rem; font-weight: 600; color: var(--white); margin-bottom: 48px; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.contact-email svg { width: 20px; height: 20px; transition: transform 0.3s; }
.contact-email:hover svg { transform: translateX(4px); }
.social-links { display: flex; gap: 16px; }
.social-link { width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; color: var(--white); }
.social-link svg { width: 20px; height: 20px; }
.social-brand-icon { display: block; width: 25px; height: 25px; object-fit: contain; }
.social-link:hover { background: var(--white); color: var(--bg); }
.contact-form-wrap { padding: 48px; border-radius: 32px; }
.contact-form { display: flex; flex-direction: column; gap: 24px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
label { font-family: 'Inter', sans-serif; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.15em; color: rgba(255,255,255,0.5); }
input, textarea { background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 16px; color: var(--white); font-family: inherit; font-size: 0.9rem; transition: border-color 0.3s, background 0.3s; outline: none; }
input:focus, textarea:focus { border-color: var(--accent); background: rgba(0,0,0,0.4); }
.form-submit { margin-top: 16px; display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; border: none; }
.form-submit svg { width: 18px; height: 18px; }
.form-status { font-family: 'Inter', sans-serif; font-size: 0.8rem; font-weight: 600; min-height: 20px; }

/* Footer */
.site-footer { border-top: 1px solid rgba(255,255,255,0.08); padding: 40px var(--pad); }
.footer-inner { max-width: var(--max-w); margin: 0 auto; display: flex; justify-content: space-between; align-items: center; font-family: 'Inter', sans-serif; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; color: rgba(255,255,255,0.4); }
.footer-links { display: flex; gap: 32px; }
.footer-link:hover { color: var(--white); }

/* Animation Reveals */
.reveal-up { opacity: 0; transform: translateY(40px); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal-left { opacity: 0; transform: translateX(-40px); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal-right { opacity: 0; transform: translateX(40px); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.visible { opacity: 1; transform: translate(0,0); }
.about-visual.reveal-left { transform: translate(-40px, -50%); }
.about-visual.reveal-left.visible { transform: translate(0, -50%); }

@media(max-width: 900px) {
  .land-topbar { padding: 24px; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-grid { display: flex; min-height: 0; flex-direction: column; align-items: stretch; gap: 0; padding-top: 48px; }
  .about-visual, .about-visual.reveal-left, .about-visual.reveal-left.visible { position: relative; top: auto; left: auto; width: min(64vw, 260px); margin: 0 auto -64px; transform: none; }
  .about-text { width: 100%; margin: 0; padding: 100px 28px 32px; }
  .about-photo-tag { right: -16px; bottom: 18px; }
  .education-timeline { grid-template-columns: 42px minmax(0, 1fr) 42px; gap: 12px; }
  .education-timeline::before { top: 28px; left: 8%; right: 8%; width: auto; height: 1px; background: linear-gradient(90deg, transparent, rgba(56,189,248,0.65), rgba(167,139,250,0.65), transparent); }
  .education-card { min-height: 0; padding: 24px; }
  .education-arrow { width: 46px; height: 46px; }
  .education-year { position: relative; }
  .education-content { padding-top: 26px; }
  .footer-inner { flex-direction: column; gap: 24px; text-align: center; }
  .form-row { grid-template-columns: 1fr; }
}

/* ────── MODAL SYSTEM ────── */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.8); z-index: 9999; display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: opacity 0.4s ease; }
.modal-overlay.visible { opacity: 1; pointer-events: auto; }
.modal-content { width: 90%; max-width: 900px; max-height: 90vh; overflow-y: auto; padding: 48px; position: relative; transform: translateY(20px); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.modal-overlay.visible .modal-content { transform: translateY(0); }
.modal-close { position: absolute; top: 24px; right: 24px; background: none; border: none; color: var(--white); font-size: 2rem; cursor: pointer; line-height: 1; opacity: 0.7; }
.modal-close:hover { opacity: 1; }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }

@media (max-width: 768px) {
  .modal-grid { grid-template-columns: 1fr; }
  .modal-content { padding: 24px; }
}

/* ------ CUBE ANIMATIONS ------ */
.skill-cube-wrapper { perspective: 1000px; display: inline-block; margin: 10px; }
.skill-cube {
  width: 64px; height: 64px; position: relative;
  transform-style: preserve-3d;
  transform: rotateX(-20deg) rotateY(30deg);
  transition: transform 0.6s var(--spring);
  cursor: pointer;
}
.skill-cube:hover, .skill-cube.expanded {
  transform: rotateX(0deg) rotateY(0deg) scale(1.4);
}
.cube-face {
  position: absolute; width: 64px; height: 64px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px);
  font-weight: 700; font-size: 0.7rem; color: #fff; text-align: center;
}
.cube-front  { transform: translateZ(32px); }
.cube-back   { transform: rotateY(180deg) translateZ(32px); }
.cube-right  { transform: rotateY(90deg) translateZ(32px); }
.cube-left   { transform: rotateY(-90deg) translateZ(32px); }
.cube-top    { transform: rotateX(90deg) translateZ(32px); }
.cube-bottom { transform: rotateX(-90deg) translateZ(32px); }
.skill-cube svg { width: 32px; height: 32px; }

/* Colors */
.cube-dsa .cube-face { border-color: #a78bfa; box-shadow: inset 0 0 15px rgba(167,139,250,0.3); }
.cube-dsa .cube-front { background: rgba(167,139,250, 0.1); }
.cube-c .cube-face { border-color: #00599C; box-shadow: inset 0 0 15px rgba(0,89,156,0.3); }
.cube-c .cube-front { background: rgba(0,89,156,0.1); }
.cube-java .cube-face { border-color: #f89820; box-shadow: inset 0 0 15px rgba(248,152,32,0.3); }
.cube-java .cube-front { background: rgba(248,152,32,0.1); }
.cube-git .cube-face { border-color: #F05032; box-shadow: inset 0 0 15px rgba(240,80,50,0.3); }
.cube-git .cube-front { background: rgba(240,80,50,0.1); }
.cube-github .cube-face { border-color: #ffffff; box-shadow: inset 0 0 15px rgba(255,255,255,0.2); }
.cube-github .cube-front { background: rgba(255,255,255,0.1); }

/* Mini Cubes for Grid */
.mini-cube-wrapper {
  perspective: 800px;
  width: 60px;
  height: 60px;
  margin: 0 auto;
  position: relative;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mini-cube {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s var(--spring);
  transform: rotateX(-20deg) rotateY(30deg);
}

.mini-cube-wrapper:hover .mini-cube {
  transform: rotateX(-10deg) rotateY(380deg) scale(1.3);
}

.mini-cube-name {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  font-size: 0.75rem;
  color: #fff;
  margin-top: 15px;
  white-space: nowrap;
  pointer-events: none;
  font-family: 'Inter', sans-serif;
  letter-spacing: 1px;
}

.mini-cube-wrapper:hover .mini-cube-name {
  opacity: 1;
  transform: translateY(0) scale(1.1);
}

/* Re-use faces logic but smaller */
.mini-cube .cube-face {
  position: absolute;
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: inset 0 0 15px rgba(255,255,255,0.05);
}

.mini-cube .cube-front  { transform: translateZ(30px); }
.mini-cube .cube-back   { transform: rotateY(180deg) translateZ(30px); }
.mini-cube .cube-right  { transform: rotateY(90deg) translateZ(30px); }
.mini-cube .cube-left   { transform: rotateY(-90deg) translateZ(30px); }
.mini-cube .cube-top    { transform: rotateX(90deg) translateZ(30px); }
.mini-cube .cube-bottom { transform: rotateX(-90deg) translateZ(30px); }

.mini-cube .cube-front svg {
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 0 8px currentColor);
}

/* Mini Cube Colors */
.mini-cube.cube-dsa .cube-face { border-color: rgba(168, 85, 247, 0.3); background: rgba(168, 85, 247, 0.05); }
.mini-cube.cube-dsa .cube-front { color: #a855f7; }

.mini-cube.cube-c .cube-face { border-color: rgba(56, 189, 248, 0.3); background: rgba(56, 189, 248, 0.05); }
.mini-cube.cube-c .cube-front { color: #38bdf8; }

.mini-cube.cube-java .cube-face { border-color: rgba(249, 115, 22, 0.3); background: rgba(249, 115, 22, 0.05); }
.mini-cube.cube-java .cube-front { color: #f97316; }

.mini-cube.cube-git .cube-face { border-color: rgba(240, 80, 50, 0.3); background: rgba(240, 80, 50, 0.05); }
.mini-cube.cube-git .cube-front { color: #F05032; }

.mini-cube.cube-github .cube-face { border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.05); }
.mini-cube.cube-github .cube-front { color: #ffffff; }

/* 3D Skills Universe */
.skills-universe {
  position: relative;
  width: 100%;
  height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  transform-style: preserve-3d;
  margin-top: 40px;
}

/* 3D Skills Universe */
.skills-universe {
  position: relative;
  width: 100%;
  max-width: 1100px;
  height: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 40px auto 0;
  perspective: 1200px;
}

.category-panel {
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1;
  border-radius: 16px;
  background: rgba(15, 15, 20, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform-style: preserve-3d;
  box-shadow: 0 0 30px rgba(168,85,247,0.05), inset 0 0 20px rgba(168,85,247,0.05);
}

.cat-header {
  align-self: center;
  display: flex;
  align-items: baseline;
  gap: 10px;
  max-width: calc(100% - 24px);
  margin-top: 12px;
  padding: 10px 16px;
  text-align: left;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  z-index: 2;
}

.cat-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

.cat-count {
  flex: 0 0 auto;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.5);
}

.category-panel.right-pos,
.category-panel.left-pos {
  display: none;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  justify-content: center;
  gap: 9px;
  flex: 1;
  min-height: 0;
  padding: 12px;
}

.skill-tags span {
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.88);
  font-size: 0.72rem;
  line-height: 1.2;
  white-space: nowrap;
}

/* Removed legacy positioning classes */

/* 3D Sphere Orbital System inside Active Category */
.tech-sphere-container {
  flex: 0 0 132px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
  overflow: visible;
}

.category-panel[data-cat="programming"] .tech-sphere-container,
.category-panel[data-cat="web"] .tech-sphere-container,
.category-panel[data-cat="tools"] .tech-sphere-container {
  flex: 1;
}

.tech-orbit-system {
  position: absolute;
  width: 1px;
  height: 1px;
  transform-style: preserve-3d;
  animation: sphere-spin-y 25s linear infinite;
}

@keyframes sphere-spin-y {
  from { transform: rotateX(-5deg) rotateY(0deg); }
  to { transform: rotateX(-5deg) rotateY(360deg); }
}

.tech-orbit-system:hover {
  animation-play-state: paused;
}
.tech-orbit-system:hover .tech-tile-wrapper {
  animation-play-state: paused;
}

:is(.category-panel[data-cat="programming"], .category-panel[data-cat="web"]) .tech-tile-wrapper:nth-child(1) { --rx: 64deg !important; --ry: 0deg !important; }
:is(.category-panel[data-cat="programming"], .category-panel[data-cat="web"]) .tech-tile-wrapper:nth-child(2) { --rx: 44deg !important; --ry: 137.5deg !important; }
:is(.category-panel[data-cat="programming"], .category-panel[data-cat="web"]) .tech-tile-wrapper:nth-child(3) { --rx: 30deg !important; --ry: 275deg !important; }
:is(.category-panel[data-cat="programming"], .category-panel[data-cat="web"]) .tech-tile-wrapper:nth-child(4) { --rx: 17deg !important; --ry: 52.5deg !important; }
:is(.category-panel[data-cat="programming"], .category-panel[data-cat="web"]) .tech-tile-wrapper:nth-child(5) { --rx: 6deg !important; --ry: 190deg !important; }
:is(.category-panel[data-cat="programming"], .category-panel[data-cat="web"]) .tech-tile-wrapper:nth-child(6) { --rx: -6deg !important; --ry: 327.5deg !important; }
:is(.category-panel[data-cat="programming"], .category-panel[data-cat="web"]) .tech-tile-wrapper:nth-child(7) { --rx: -17deg !important; --ry: 105deg !important; }
:is(.category-panel[data-cat="programming"], .category-panel[data-cat="web"]) .tech-tile-wrapper:nth-child(8) { --rx: -30deg !important; --ry: 242.5deg !important; }
:is(.category-panel[data-cat="programming"], .category-panel[data-cat="web"]) .tech-tile-wrapper:nth-child(9) { --rx: -44deg !important; --ry: 20deg !important; }
:is(.category-panel[data-cat="programming"], .category-panel[data-cat="web"]) .tech-tile-wrapper:nth-child(10) { --rx: -64deg !important; --ry: 157.5deg !important; }

.category-panel[data-cat="tools"] .tech-tile-wrapper:nth-child(1) { --rx: 61deg !important; --ry: 0deg !important; }
.category-panel[data-cat="tools"] .tech-tile-wrapper:nth-child(2) { --rx: 39deg !important; --ry: 137.5deg !important; }
.category-panel[data-cat="tools"] .tech-tile-wrapper:nth-child(3) { --rx: 22deg !important; --ry: 275deg !important; }
.category-panel[data-cat="tools"] .tech-tile-wrapper:nth-child(4) { --rx: 7deg !important; --ry: 52.5deg !important; }
.category-panel[data-cat="tools"] .tech-tile-wrapper:nth-child(5) { --rx: -7deg !important; --ry: 190deg !important; }
.category-panel[data-cat="tools"] .tech-tile-wrapper:nth-child(6) { --rx: -22deg !important; --ry: 327.5deg !important; }
.category-panel[data-cat="tools"] .tech-tile-wrapper:nth-child(7) { --rx: -39deg !important; --ry: 105deg !important; }
.category-panel[data-cat="tools"] .tech-tile-wrapper:nth-child(8) { --rx: -61deg !important; --ry: 242.5deg !important; }

/* Tech Tile Positioning */
.tech-tile-wrapper {
  position: absolute;
  top: 0; left: 0;
  transform-style: preserve-3d;
  animation: counter-spin-y 25s linear infinite;
}

@keyframes counter-spin-y {
  0% { transform: rotateY(var(--ry)) rotateX(var(--rx)) translateZ(96px) rotateX(calc(-1 * var(--rx))) rotateY(calc(-1 * var(--ry) - 0deg)); }
  100% { transform: rotateY(var(--ry)) rotateX(var(--rx)) translateZ(96px) rotateX(calc(-1 * var(--rx))) rotateY(calc(-1 * var(--ry) - 360deg)); }
}

/* Tech Tiles Appearance */
.tech-tile {
  position: absolute;
  width: 54px;
  height: 54px;
  margin-top: -27px;
  margin-left: -27px;
  border-radius: 12px;
  background: rgba(15,15,20,0.85);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4), 0 0 15px var(--color);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform: translateZ(0) scale(1);
}

.tech-tile:hover {
  border-color: var(--color);
  background: rgba(25,25,35,0.9);
  transform: translateZ(30px) scale(1.15);
}

.tech-tile.selected {
  border-color: var(--color);
  background: rgba(20,20,30,0.95);
  box-shadow: 0 10px 40px rgba(0,0,0,0.7), 0 0 40px var(--color);
  transform: translateZ(60px) scale(1.3);
  z-index: 100;
}

.tech-icon {
  width: 28px;
  height: 28px;
  color: var(--color);
  filter: drop-shadow(0 0 8px currentColor);
}
.tech-icon svg {
  width: 100%;
  height: 100%;
}
.tech-name {
  font-family: 'Inter', sans-serif;
  font-size: 0.55rem;
  font-weight: 600;
  color: #fff;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Info Panel */
.tech-info-panel {
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: rgba(15,15,22,0.95);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 24px 32px;
  text-align: center;
  width: 420px;
  max-width: 90vw;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.1);
  z-index: 50;
}

.tech-info-panel.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.tech-info-panel h3 {
  font-family: 'Inter', sans-serif;
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.tech-info-panel p {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.5;
}

@media (max-width: 900px) {
  .skills-universe {
    grid-template-columns: 1fr;
    gap: 30px;
    height: auto;
  }
}

/* ════════════════════════════════════════════════
   COMPREHENSIVE MOBILE PHONE OPTIMIZATION (<768px & <480px)
   ════════════════════════════════════════════════ */
@media (max-width: 768px) {
  :root {
    --pad: 20px;
    --nav-h: 64px;
  }

  html, body {
    overflow-x: hidden;
    width: 100%;
  }

  /* Nav & Mobile Menu */
  .site-nav {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(3, 4, 7, 0.85);
  }
  .nav-inner {
    padding: 0 16px;
  }
  .nav-cta {
    display: none;
  }
  .nav-burger {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  .mobile-menu {
    top: calc(var(--nav-h) + 10px);
    left: 16px;
    right: 16px;
    padding: 20px;
    background: rgba(10, 12, 20, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .mm-link {
    font-size: 1.05rem;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .mm-link:active {
    background: rgba(167, 139, 250, 0.15);
  }

  /* Hero Section */
  .sec-hero {
    min-height: calc(100vh - var(--nav-h));
    padding-top: calc(var(--nav-h) + 20px);
    display: flex;
    align-items: center;
  }
  .hero-name {
    font-size: clamp(2rem, 9vw, 3.2rem) !important;
    line-height: 1.15;
  }
  .hero-role {
    font-size: 1rem !important;
  }
  .hero-cta-row {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }
  .hero-cta-row .btn-primary,
  .hero-cta-row .btn-outline {
    width: 100%;
    text-align: center;
    min-height: 48px;
  }

  /* About Section */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .avatar-frame {
    width: 180px;
    height: 180px;
    margin: 0 auto;
  }
  .about-text {
    padding: 24px 20px;
  }
  .about-body {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  /* Education Timeline */
  .education-timeline {
    padding: 0;
  }
  .education-track {
    width: 100%;
  }
  .education-card {
    padding: 20px 16px;
  }
  .education-arrow {
    width: 44px;
    height: 44px;
  }

  /* Selected Work / Projects Grid */
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .project-card-button {
    padding: 16px;
    min-height: 44px;
  }
  .project-visual {
    height: 180px;
  }

  /* Skills Universe on Mobile */
  .skills-universe {
    gap: 24px;
    perspective: none;
  }
  .category-panel {
    padding: 20px 14px;
  }
  .tech-sphere-container {
    height: 280px;
    perspective: 600px;
  }
  .tech-tile {
    width: 48px;
    height: 48px;
    margin-top: -24px;
    margin-left: -24px;
    min-width: 44px;
    min-height: 44px;
  }
  .tech-icon {
    width: 22px;
    height: 22px;
  }
  .tech-name {
    font-size: 0.5rem;
  }
  .tech-info-panel {
    width: 90vw;
    padding: 16px 20px;
  }

  /* Contact Section */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .contact-copy, .contact-form-wrap {
    padding: 24px 18px;
  }
  .social-links {
    justify-content: center;
  }
  .contact-email {
    font-size: 0.85rem;
    word-break: break-all;
    min-height: 44px;
  }



  /* Project Details Modal on Mobile */
  .project-detail-modal {
    width: 96vw;
    max-height: 90vh;
    padding: 24px 16px;
    border-radius: 16px;
    overflow-y: auto;
  }
  .modal-close {
    width: 44px;
    height: 44px;
    top: 12px;
    right: 12px;
  }
  .project-detail-actions {
    flex-direction: column;
  }
  .project-link-button {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  :root {
    --pad: 14px;
  }
  .hero-name {
    font-size: 2.2rem !important;
  }
  .pill-tag {
    font-size: 0.65rem;
  }
  .footer-links {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }
}

/* Reduced Motion Preference Accessibility */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .universe-celestial-globe,
  .universe-ring-1,
  .universe-ring-2,
  .universe-ring-3,
  .universe-stars {
    animation: none !important;
  }
}



