/* ╔══════════════════════════════════════════════════════════╗
   ║  CIRCUIT BLOSSOM — Meghna Roy Chowdhury Portfolio       ║
   ║  A unique blend of ECG waveforms, hexagonal grids,      ║
   ║  pastel gradients, and terminal aesthetics.              ║
   ╚══════════════════════════════════════════════════════════╝ */

/* ═══════════ DESIGN TOKENS ═══════════ */
:root {
  /* Base Palette */
  --bg-cream: #FFFBF5;
  --bg-lavender: #F5F0FF;
  --bg-mint: #F0FFF4;
  --bg-rose: #FFF5F7;
  --bg-white: #FFFFFF;

  /* Text */
  --text-dark: #2D2B55;
  --text-medium: #6B6B8D;
  --text-light: #9B9BB4;

  /* Accent Colors */
  --purple: #7C5CFC;
  --purple-light: #B8A9FF;
  --purple-bg: #F0ECFF;
  --pink: #FF6B8A;
  --pink-light: #FFB3C1;
  --pink-bg: #FFF0F3;
  --teal: #36D6B5;
  --teal-light: #8EECD4;
  --teal-bg: #EDFFF8;
  --amber: #FFB347;
  --amber-light: #FFD699;
  --amber-bg: #FFF8EC;
  --blue: #5BC0EB;
  --blue-light: #A3DEFA;
  --blue-bg: #EDF7FF;

  /* Borders & Shadows */
  --border: #E8E0F0;
  --shadow-sm: 0 2px 8px rgba(45, 43, 85, 0.06);
  --shadow-md: 0 4px 20px rgba(45, 43, 85, 0.08);
  --shadow-lg: 0 8px 40px rgba(45, 43, 85, 0.12);
  --shadow-glow-purple: 0 0 24px rgba(124, 92, 252, 0.25);
  --shadow-glow-pink: 0 0 24px rgba(255, 107, 138, 0.25);
  --shadow-glow-teal: 0 0 24px rgba(54, 214, 181, 0.25);

  /* Gradients */
  --gradient-main: linear-gradient(135deg, #7C5CFC, #FF6B8A, #36D6B5);
  --gradient-purple-pink: linear-gradient(135deg, #7C5CFC, #FF6B8A);
  --gradient-teal-blue: linear-gradient(135deg, #36D6B5, #5BC0EB);
  --gradient-warm: linear-gradient(135deg, #FFB347, #FF6B8A);

  /* Typography */
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Borders */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ═══════════ DARK MODE OVERRIDES ═══════════ */
body.dark-mode {
  --bg-cream: #1A1A2E;
  --bg-lavender: #1E1E36;
  --bg-mint: #1A2E28;
  --bg-rose: #2E1A24;
  --bg-white: #22223A;

  --text-dark: #E8E6F0;
  --text-medium: #B0AEC4;
  --text-light: #7C7A94;

  --purple-bg: #2A2548;
  --pink-bg: #3A2030;
  --teal-bg: #1A3530;
  --amber-bg: #3A3020;
  --blue-bg: #1A2E3A;

  --border: #3A3858;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.35);
}

/* Dark-mode specific component overrides */
body.dark-mode .nav-container {
  background: rgba(26, 26, 46, 0.9);
}
body.dark-mode .nav-links {
  background: rgba(26, 26, 46, 0.95);
}
body.dark-mode .scroll-progress-wrap,
body.dark-mode #scroll-progress {
  background: rgba(26, 26, 46, 0.5);
}
body.dark-mode .hex-purple {
  background: linear-gradient(135deg, #3A3068, #4A3C80);
}
body.dark-mode .hex-pink {
  background: linear-gradient(135deg, #4A2838, #5A3448);
}
body.dark-mode .hex-teal {
  background: linear-gradient(135deg, #1E4A3E, #2A5A4E);
}
body.dark-mode .hex-amber {
  background: linear-gradient(135deg, #4A3E20, #5A4E2E);
}
body.dark-mode .project-card,
body.dark-mode .exp-chip,
body.dark-mode .exp-featured,
body.dark-mode .edu-stop,
body.dark-mode .gallery-category,
body.dark-mode .contact-btn,
body.dark-mode .skill-group,
body.dark-mode .pub-filter-btn {
  background: var(--bg-white);
  border-color: var(--border);
}
body.dark-mode .terminal {
  background: var(--bg-white);
}
body.dark-mode .terminal-header {
  background: linear-gradient(135deg, var(--purple-bg), var(--bg-lavender));
}
body.dark-mode .pub-filter-btn.active {
  background: var(--purple);
  border-color: var(--purple);
}
body.dark-mode .exp-modal {
  background: var(--bg-white);
}
body.dark-mode .exp-modal-overlay {
  background: rgba(0, 0, 0, 0.7);
}
body.dark-mode .hex-wrap::after {
  background: var(--bg-white);
  border-color: var(--border);
}
body.dark-mode .preloader-wave {
  stroke: var(--purple);
}
body.dark-mode .section-ecg path {
  stroke: var(--border);
}
body.dark-mode img {
  filter: brightness(0.9);
}

/* ═══════════ RESET & BASE ═══════════ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--bg-cream);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--purple-light);
  color: var(--text-dark);
}

::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-cream);
}
::-webkit-scrollbar-thumb {
  background: var(--gradient-purple-pink);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--purple);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--purple);
  text-decoration: none;
  transition: color var(--transition-normal);
}
a:hover {
  color: var(--pink);
}

code {
  font-family: var(--font-mono);
  background: var(--purple-bg);
  color: var(--purple);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.section {
  padding: var(--space-4xl) 0;
}

.section-alt {
  background: var(--bg-lavender);
}
.section-alt-mint {
  background: var(--bg-mint);
}
.section-alt-rose {
  background: var(--bg-rose);
}

/* ═══════════ PRELOADER ═══════════ */
#preloader {
  position: fixed;
  inset: 0;
  background: var(--bg-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.preloader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.preloader-ecg {
  width: 180px;
  height: 50px;
}
.preloader-wave {
  stroke: var(--purple);
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: drawWave 1.5s ease-in-out infinite;
}
@keyframes drawWave {
  0% { stroke-dashoffset: 600; stroke: var(--purple); }
  50% { stroke-dashoffset: 0; stroke: var(--pink); }
  100% { stroke-dashoffset: -600; stroke: var(--teal); }
}

.preloader-text {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-medium);
  letter-spacing: 2px;
}

/* ═══════════ SCROLL PROGRESS ═══════════ */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--gradient-main);
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ═══════════ NAVIGATION ═══════════ */
#navbar {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: calc(100% - 32px);
  max-width: 900px;
  transition: all var(--transition-normal);
}
#navbar.scrolled {
  top: 8px;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 10px 24px;
  box-shadow: var(--shadow-md);
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark) !important;
  text-decoration: none;
  white-space: nowrap;
}
.logo-bracket {
  color: var(--purple);
}

/* Dark-mode toggle (lightbulb) */
.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dark-toggle {
  background: none;
  border: 2px solid var(--border);
  border-radius: var(--radius-full);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--amber);
  font-size: 1rem;
  transition: var(--transition-normal);
}
.dark-toggle:hover {
  background: var(--amber-bg);
  border-color: var(--amber);
  transform: scale(1.1);
}
body.dark-mode .dark-toggle {
  color: var(--text-light);
  border-color: var(--border);
}
body.dark-mode .dark-toggle:hover {
  background: rgba(255, 179, 71, 0.15);
  border-color: var(--amber);
  color: var(--amber);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: var(--transition-normal);
}
.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
}
.nav-links a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-medium);
  text-decoration: none;
  transition: all var(--transition-normal);
  white-space: nowrap;
}
.nav-links a i {
  font-size: 0.8rem;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--purple);
  background: var(--purple-bg);
}

/* ═══════════ BACK TO TOP ═══════════ */
#backToTop {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--gradient-purple-pink);
  color: white;
  font-size: 1rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-md);
  z-index: 900;
}
#backToTop.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
#backToTop:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow-purple);
}

/* ═══════════ HERO SECTION ═══════════ */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg-lavender) 0%, var(--bg-cream) 50%, var(--bg-mint) 100%);
  padding: var(--space-4xl) var(--space-xl);
  text-align: center;
}

/* Floating Geometric Shapes */
.hero-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.shape {
  position: absolute;
  opacity: 0.15;
  animation: floatShape 20s ease-in-out infinite;
}
.shape-hex {
  width: 60px;
  height: 60px;
  background: var(--purple);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}
.shape-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--pink);
}
.shape-triangle {
  width: 0;
  height: 0;
  border-left: 25px solid transparent;
  border-right: 25px solid transparent;
  border-bottom: 43px solid var(--teal);
}
.shape-diamond {
  width: 35px;
  height: 35px;
  background: var(--amber);
  transform: rotate(45deg);
  border-radius: 4px;
}

.shape-1 { top: 12%; left: 8%; animation-delay: 0s; animation-duration: 18s; }
.shape-2 { top: 20%; right: 12%; animation-delay: -3s; animation-duration: 22s; }
.shape-3 { bottom: 30%; left: 15%; animation-delay: -7s; animation-duration: 20s; }
.shape-4 { top: 55%; right: 8%; animation-delay: -11s; animation-duration: 24s; }
.shape-5 { bottom: 15%; right: 20%; animation-delay: -5s; animation-duration: 19s; }
.shape-6 { top: 40%; left: 5%; animation-delay: -9s; animation-duration: 21s; }

@keyframes floatShape {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-30px) rotate(5deg); }
  50% { transform: translateY(15px) rotate(-3deg); }
  75% { transform: translateY(-20px) rotate(7deg); }
}

/* ECG Waveform Background */
.hero-ecg {
  position: absolute;
  bottom: 20%;
  left: 0;
  width: 100%;
  height: 120px;
  pointer-events: none;
}
.ecg-line {
  stroke-dasharray: 4000;
  stroke-dashoffset: 4000;
}
.ecg-line-1 {
  stroke: var(--purple);
  opacity: 0.18;
  animation: drawECG 4s ease-in-out forwards;
  animation-delay: 0.5s;
}
.ecg-line-2 {
  stroke: var(--pink);
  opacity: 0.12;
  animation: drawECG 4s ease-in-out forwards;
  animation-delay: 1s;
}
.ecg-line-3 {
  stroke: var(--teal);
  opacity: 0.08;
  animation: drawECG 4s ease-in-out forwards;
  animation-delay: 1.5s;
}
@keyframes drawECG {
  to { stroke-dashoffset: 0; }
}

/* Hero Content */
.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}

/* Hexagonal Profile Photo */
.profile-hex-wrapper {
  position: relative;
  width: 210px;
  height: 210px;
  animation: floatPhoto 5s ease-in-out infinite;
}
@keyframes floatPhoto {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.profile-hex-border {
  position: absolute;
  inset: -6px;
  background: var(--gradient-main);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  animation: rotateBorder 8s linear infinite;
}
@keyframes rotateBorder {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

.profile-hex {
  position: relative;
  width: 100%;
  height: 100%;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  overflow: hidden;
}
.profile-hex img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Speech Bubble */
.speech-bubble {
  position: relative;
  background: var(--bg-white);
  border: 2px solid var(--border);
  padding: 8px 18px;
  border-radius: var(--radius-xl);
  font-size: 0.95rem;
  color: var(--text-dark);
  box-shadow: var(--shadow-sm);
  animation: popBubble 0.6s ease-out 0.3s both;
}
.speech-bubble::after {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 14px;
  height: 14px;
  background: var(--bg-white);
  border-left: 2px solid var(--border);
  border-top: 2px solid var(--border);
}
@keyframes popBubble {
  0% { opacity: 0; transform: scale(0.8) translateY(10px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* Name */
.hero-name {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.2;
}

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

/* Typed Subtitle */
.hero-subtitle {
  font-family: var(--font-mono);
  font-size: clamp(0.85rem, 2vw, 1.05rem);
  color: var(--text-medium);
  min-height: 1.5em;
  display: flex;
  align-items: center;
  gap: 2px;
}
.typed-cursor {
  color: var(--purple);
  animation: blinkCursor 0.75s step-end infinite;
  font-weight: 300;
}
@keyframes blinkCursor {
  50% { opacity: 0; }
}

/* Motto */
.hero-motto {
  text-align: center;
  max-width: 550px;
}
.hero-motto p {
  font-style: italic;
  font-weight: 500;
  color: var(--text-dark);
  font-size: 1.02rem;
  margin: 0;
  line-height: 1.6;
}
.hero-motto cite {
  font-size: 0.78rem;
  color: var(--text-light);
  font-style: normal;
  font-weight: 500;
}

/* Social Pills */
.social-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  border: 1.5px solid var(--border);
  background: var(--bg-white);
  color: var(--text-dark);
  text-decoration: none;
  transition: all var(--transition-normal);
}
.pill:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.pill-linkedin:hover { border-color: #0077b5; color: #0077b5; background: #f0f7ff; }
.pill-github:hover { border-color: #333; color: #333; background: #f5f5f5; }
.pill-scholar:hover { border-color: #4285f4; color: #4285f4; background: #eef3ff; }
.pill-email:hover { border-color: var(--pink); color: var(--pink); background: var(--pink-bg); }
.pill-instagram:hover { border-color: #e4405f; color: #e4405f; background: #fff0f3; }

/* Download CV Button */
.btn-cv {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  background: var(--gradient-purple-pink);
  color: white !important;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}
.btn-cv:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-purple);
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-light);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  animation: fadeIn 1s ease 2s both;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.scroll-arrow {
  animation: bounceDown 1.5s ease-in-out infinite;
}
@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ═══════════ SECTION TITLES ═══════════ */
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-3xl);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}
.title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--purple-bg);
  color: var(--purple);
  font-size: 1.1rem;
}

.sub-section-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-dark);
  text-align: center;
  margin: var(--space-3xl) 0 var(--space-xs);
}

.section-subtitle {
  text-align: center;
  color: var(--text-medium);
  font-size: 1.05rem;
  margin-top: calc(var(--space-3xl) * -1 + var(--space-md));
  margin-bottom: var(--space-2xl);
}
.click-hint {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--purple);
  font-weight: 500;
  opacity: 0.8;
}
.click-hint i {
  margin-right: 2px;
  font-size: 0.78rem;
}

/* ═══════════ ABOUT SECTION ═══════════ */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--space-2xl);
  align-items: start;
}

/* Terminal Window */
.terminal {
  background: #FAFAFA;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.terminal-header {
  background: linear-gradient(135deg, #F0ECF9, #E8E0F0);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.terminal-dots {
  display: flex;
  gap: 6px;
}
.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot-red { background: #FF5F56; }
.dot-yellow { background: #FFBD2E; }
.dot-green { background: #27C93F; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-medium);
}

.terminal-body {
  padding: var(--space-lg);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.8;
}

.terminal-line {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}
.prompt {
  color: var(--teal);
  font-weight: 500;
  user-select: none;
}
.command {
  color: var(--purple);
  font-weight: 500;
}

.terminal-output {
  color: var(--text-dark);
  font-family: var(--font-body);
  font-size: 0.92rem;
  padding-left: 18px;
  margin-bottom: var(--space-md);
  border-left: 2px solid var(--border);
}
.terminal-output p {
  margin: 0 0 0.85em;
}
.terminal-output p:last-child {
  margin-bottom: 0;
}
.terminal-output a {
  color: var(--purple);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.output-accent {
  color: var(--purple);
  font-style: italic;
}

.cursor-blink {
  color: var(--purple);
  animation: blinkCursor 0.75s step-end infinite;
}

/* Quick Facts */
.quick-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.fact-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
}
.fact-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--purple-light);
}

.fact-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--purple-bg);
  color: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.fact-card:nth-child(2) .fact-icon { background: var(--teal-bg); color: var(--teal); }
.fact-card:nth-child(3) .fact-icon { background: var(--pink-bg); color: var(--pink); }
.fact-card:nth-child(4) .fact-icon { background: var(--amber-bg); color: var(--amber); }
.fact-card:nth-child(5) .fact-icon { background: var(--blue-bg); color: var(--blue); }
.fact-card:nth-child(6) .fact-icon { background: var(--purple-bg); color: var(--purple); }

/* Full-width "Let's talk" card under the facts, links to #contact */
.fact-card-wide {
  grid-column: 1 / -1;
  text-decoration: none;
}
.fact-card-wide .fact-icon { background: var(--pink-bg); color: var(--pink); }
.fact-arrow {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--purple);
  transition: transform var(--transition-normal);
}
.fact-card-wide:hover .fact-arrow {
  transform: translateX(3px);
}

.fact-content {
  display: flex;
  flex-direction: column;
}
.fact-label {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.fact-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-dark);
}

/* ═══════════ SKILLS SECTION ═══════════ */
.skills-flow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg) var(--space-xl);
  max-width: 900px;
  margin: 0 auto;
}

.skill-group {
  padding: var(--space-lg);
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}
.skill-group:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--purple-light);
}

.skill-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--space-md);
}

.skill-group-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.sg-purple { background: var(--purple-bg); color: var(--purple); }
.sg-pink { background: var(--pink-bg); color: var(--pink); }
.sg-teal { background: var(--teal-bg); color: var(--teal); }
.sg-amber { background: var(--amber-bg); color: var(--amber); }
.sg-blue { background: var(--blue-bg); color: var(--blue); }

/* Full-width group under the 2-column grid (More Tools) */
.skill-group-wide {
  grid-column: 1 / -1;
}

.skill-group-header h3 {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.3;
}

.skill-aside {
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--text-light);
  display: block;
}

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: default;
  transition: all var(--transition-normal);
  border: 1.5px solid transparent;
}
.sp-purple { background: var(--purple-bg); color: var(--purple); }
.sp-pink { background: var(--pink-bg); color: var(--pink); }
.sp-teal { background: var(--teal-bg); color: var(--teal); }
.sp-amber { background: var(--amber-bg); color: var(--amber); }
.sp-blue { background: var(--blue-bg); color: var(--blue); }

/* System strip: how the work fits together (details on hover) */
.system-strip {
  position: relative;
  z-index: 3; /* keeps hover panels above the skill groups below */
  display: flex;
  align-items: stretch;
  gap: 10px;
  max-width: 900px;
  margin: 0 auto var(--space-xl);
  list-style: none;
}

.system-stage {
  position: relative;
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}
.system-stage:hover,
.system-stage:focus-visible {
  border-color: var(--purple-light);
  box-shadow: var(--shadow-md);
  outline: none;
}
.stage-parallel {
  border-style: dashed;
}

.stage-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.stage-head > div {
  flex: 1;
  min-width: 0;
}
.stage-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.stage-teal .stage-label { color: var(--teal); }
.stage-pink .stage-label { color: var(--pink); }
.stage-amber .stage-label { color: var(--amber); }
.stage-purple .stage-label { color: var(--purple); }

.stage-title {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.3;
}
.stage-more {
  margin-top: 4px;
  font-size: 0.6rem;
  color: var(--text-light);
  transition: transform var(--transition-normal);
}
.system-stage:hover .stage-more,
.system-stage:focus-within .stage-more {
  transform: rotate(180deg);
}

.stage-connector {
  display: flex;
  align-items: center;
  color: var(--text-light);
  font-size: 1rem;
}

.stage-detail {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: max(100%, 240px);
  padding: 12px 14px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
/* Invisible bridge over the gap so the panel stays open while the mouse moves onto it */
.stage-detail::before {
  content: '';
  position: absolute;
  top: -9px;
  left: 0;
  right: 0;
  height: 9px;
}
.stage-parallel .stage-detail {
  left: auto;
  right: 0;
}
.system-stage:hover .stage-detail,
.system-stage:focus-within .stage-detail {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.stage-desc {
  margin-bottom: 8px;
  font-size: 0.78rem;
  color: var(--text-medium);
  line-height: 1.5;
}
.stage-result {
  margin-bottom: 8px;
  padding-left: 8px;
  border-left: 2px solid;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.4;
}
.stage-teal .stage-result { border-color: var(--teal); }
.stage-pink .stage-result { border-color: var(--pink); }
.stage-amber .stage-result { border-color: var(--amber); }
.stage-purple .stage-result { border-color: var(--purple); }
.stage-tools {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-light);
}

/* Touch screens can't hover, so the details stay visible inside each card */
@media (hover: none) {
  .stage-detail {
    position: static;
    width: auto;
    margin-top: 10px;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .stage-detail::before,
  .stage-more {
    display: none;
  }
}

/* ═══════════ EXPERIENCE SECTION ═══════════ */

/* Featured Card (Current Role) */
.exp-featured {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  padding-top: calc(var(--space-md) + 5px);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-xl);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.exp-featured::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--gradient-teal-blue);
}
.exp-featured::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 100%;
  background: linear-gradient(135deg, transparent 50%, rgba(54, 214, 181, 0.04));
  pointer-events: none;
}
.exp-featured:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.exp-current-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--teal);
  background: var(--teal-bg);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--teal);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(54, 214, 181, 0.4); }
  50% { opacity: 0.8; box-shadow: 0 0 0 6px rgba(54, 214, 181, 0); }
}

.exp-featured-inner {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}
.exp-featured-logo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--teal-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg-white);
  flex-shrink: 0;
}
.exp-featured-logo img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}
.exp-featured-info h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1px;
}
.exp-featured-company {
  display: block;
  font-size: 0.85rem;
  color: var(--purple);
  font-weight: 500;
  margin-bottom: 2px;
}
.exp-featured-meta {
  display: block;
  font-size: 0.75rem;
  color: var(--text-light);
  margin-bottom: var(--space-xs);
}
.exp-featured-meta i {
  margin-right: 2px;
}
.exp-featured-summary {
  font-size: 0.82rem;
  color: var(--text-medium);
  margin-bottom: var(--space-xs);
  line-height: 1.5;
}
.exp-featured-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Past Experiences Label */
.exp-past-label {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: var(--space-lg);
  position: relative;
}
.exp-past-label::before,
.exp-past-label::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 80px;
  height: 1px;
  background: var(--border);
}
.exp-past-label::before { right: calc(50% + 160px); }
.exp-past-label::after { left: calc(50% + 160px); }

/* Past Experience Grid */
.exp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  max-width: 720px;
  margin: 0 auto;
}

.exp-chip {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-md) var(--space-md);
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}
.exp-chip:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--purple-light);
}

.chip-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}
.accent-purple { background: var(--gradient-purple-pink); }
.accent-pink { background: var(--gradient-warm); }
.accent-teal { background: var(--gradient-teal-blue); }
.accent-amber { background: linear-gradient(135deg, var(--amber), var(--pink)); }
.accent-blue { background: linear-gradient(135deg, var(--blue), var(--teal)); }

.chip-logo {
  width: 60px;
  height: 60px;
  margin: 0 auto var(--space-sm);
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg-white);
  transition: all var(--transition-normal);
}
.exp-chip:hover .chip-logo {
  border-color: var(--purple);
  box-shadow: var(--shadow-glow-purple);
}
.chip-logo img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}
.chip-role {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 2px;
}
.chip-company {
  display: block;
  font-size: 0.78rem;
  color: var(--purple);
  font-weight: 500;
  margin-bottom: 4px;
}
.chip-date {
  display: block;
  font-size: 0.7rem;
  color: var(--text-light);
  font-family: var(--font-mono);
  margin-bottom: 6px;
}
.chip-tagline {
  display: block;
  font-size: 0.68rem;
  color: var(--text-light);
  font-style: italic;
  line-height: 1.3;
  opacity: 0.8;
}

/* ═══════════ EXPERIENCE MODAL ═══════════ */
.exp-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(45, 43, 85, 0.5);
  backdrop-filter: blur(6px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: var(--space-xl);
}
.exp-modal-overlay.active {
  display: flex;
}

.exp-modal {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  max-width: 600px;
  width: 100%;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: expModalIn 0.3s ease;
}
@keyframes expModalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.exp-modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--border);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  font-size: 0.9rem;
  color: var(--text-medium);
  transition: all var(--transition-fast);
}
.exp-modal-close:hover {
  background: var(--pink-bg);
  color: var(--pink);
}

.exp-modal-accent {
  height: 5px;
  width: 100%;
}
.exp-modal-body {
  padding: var(--space-lg) var(--space-xl) var(--space-xl);
}
.exp-modal-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}
.exp-modal-logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--border);
  object-fit: contain;
  background: var(--bg-white);
  padding: 4px;
  flex-shrink: 0;
}
.exp-modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 2px;
}
.exp-modal-company {
  display: block;
  font-size: 0.9rem;
  color: var(--purple);
  font-weight: 500;
  margin-bottom: 4px;
}
.exp-modal-meta {
  display: block;
  font-size: 0.8rem;
  color: var(--text-light);
}
.exp-modal-meta i {
  margin-right: 2px;
}
.exp-modal-summary {
  font-size: 0.92rem;
  color: var(--text-medium);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
  line-height: 1.6;
}
.exp-modal-details {
  list-style: none;
  padding: 0;
  margin-bottom: var(--space-md);
}
.exp-modal-details li {
  font-size: 0.88rem;
  color: var(--text-medium);
  padding: 4px 0 4px 16px;
  position: relative;
}
.exp-modal-details li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--purple-light);
}
.exp-modal-details li:has(.detail-category) {
  padding-left: 0;
  margin-top: 10px;
}
.exp-modal-details li:has(.detail-category)::before {
  display: none;
}
.detail-category {
  font-family: var(--font-heading);
  font-style: normal;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--purple);
}

/* Tags (shared) */
.tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--purple-bg);
  color: var(--purple);
  font-weight: 500;
}
.exp-modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Certificate / report links in the experience popup */
.exp-modal-docs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
}
.exp-modal-docs[hidden] {
  display: none;
}
.exp-doc {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--purple);
  text-decoration: none;
  transition: all var(--transition-normal);
}
.exp-doc:hover {
  border-color: var(--purple-light);
  background: var(--purple-bg);
}

/* ═══════════ PROJECTS SECTION ═══════════ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.project-card {
  position: relative;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  box-shadow: var(--shadow-lg);
}

/* 3D tilt is applied via JS */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.featured-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--gradient-purple-pink);
  color: white;
  z-index: 2;
  letter-spacing: 0.5px;
}

/* Project Image */
.project-img {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--bg-lavender);
  border-bottom: 1px solid var(--border);
  padding: var(--space-sm);
}
.project-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform var(--transition-slow);
}
.project-card:hover .project-img img {
  transform: scale(1.05);
}

.project-body {
  padding: var(--space-lg);
  padding-bottom: var(--space-sm);
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: var(--space-sm);
}
.project-body h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
}
.project-body p {
  font-size: 0.88rem;
  color: var(--text-medium);
}

.project-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
}
.stat {
  font-size: 0.82rem;
  color: var(--text-medium);
  padding: 4px 10px;
  background: var(--bg-lavender);
  border-radius: var(--radius-sm);
}
.stat strong {
  color: var(--purple);
}

.card-tags {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 5px;
}
.card-tags .tag {
  font-size: 0.65rem;
  padding: 2px 8px;
  white-space: nowrap;
}

.project-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  margin-top: auto;
  padding-top: var(--space-md);
}
.project-link {
  font-size: 0.82rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.pub-venue {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--teal-bg);
  color: var(--teal);
  font-weight: 500;
}

/* More Projects */
.more-projects-wrapper {
  text-align: center;
  margin-top: var(--space-xl);
}

.btn-show-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border);
  background: var(--bg-white);
  color: var(--text-dark);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-normal);
}
.btn-show-more:hover {
  border-color: var(--purple);
  color: var(--purple);
  background: var(--purple-bg);
}
.btn-show-more i {
  transition: transform var(--transition-normal);
  font-size: 0.75rem;
}
.btn-show-more.expanded i {
  transform: rotate(180deg);
}

/* Learn More — compact bordered pill */
.btn-learn-more {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 4px;
  padding: 5px 16px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--purple);
  background: transparent;
  color: var(--purple);
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  margin: auto auto var(--space-sm);
}
.btn-learn-more i {
  font-size: 0.6rem;
  transition: transform var(--transition-normal);
}
.btn-learn-more:hover {
  background: var(--purple);
  color: white;
}
.btn-learn-more:hover i {
  transform: translateX(3px);
}

/* ═══════════ PROJECT MODALS ═══════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(45, 43, 85, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: var(--space-xl);
  animation: fadeIn 0.25s ease;
}
.modal-overlay[hidden] {
  display: none;
}

.modal {
  position: relative;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: var(--space-2xl);
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-close {
  position: sticky;
  top: 0;
  float: right;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--bg-lavender);
  color: var(--text-dark);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-normal), color var(--transition-normal);
  line-height: 1;
  margin-left: auto;
  flex-shrink: 0;
}
.modal-close:hover {
  background: var(--pink-bg);
  color: var(--pink);
}

.modal h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: var(--space-lg);
  padding-right: 40px;
}
.modal h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--purple);
  margin: var(--space-lg) 0 var(--space-sm);
}
.modal p {
  font-size: 0.92rem;
  color: var(--text-medium);
  line-height: 1.8;
  margin-bottom: var(--space-sm);
}
.modal ul, .modal ol {
  padding-left: var(--space-lg);
  margin: var(--space-sm) 0 var(--space-md);
}
.modal li {
  font-size: 0.9rem;
  color: var(--text-medium);
  line-height: 1.7;
  margin-bottom: 4px;
}
.modal li strong {
  color: var(--text-dark);
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}

.modal-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

/* ═══════════ PUBLICATIONS ═══════════ */
.publications-list {
  max-width: 800px;
  margin: 0 auto;
}

.pub-subtitle {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: var(--space-xl);
}
.pub-subtitle a {
  color: var(--purple);
  font-weight: 600;
  text-decoration: none;
}
.pub-subtitle a:hover {
  text-decoration: underline;
}

.pub-list {
  list-style: none;
  counter-reset: none;
}

.pub-item {
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  transition: background var(--transition-normal);
}
.pub-item:hover {
  background: rgba(124, 92, 252, 0.04);
}

.pub-number {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--purple-light);
  flex-shrink: 0;
  line-height: 1.7;
}

.pub-content p {
  font-size: 0.9rem;
  color: var(--text-medium);
  line-height: 1.7;
}
.pub-content strong {
  color: var(--text-dark);
}
.pub-content em {
  color: var(--purple);
}

.pub-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--purple);
  margin-top: 4px;
}
.pub-link:hover {
  color: var(--pink);
}

.pub-scholar-btn {
  text-align: center;
  margin-top: var(--space-xl);
}
.btn-scholar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--purple);
  background: var(--purple-bg);
  border: 2px solid var(--purple-light);
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all var(--transition-normal);
}
.btn-scholar:hover {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-purple);
}

/* Publication Filter Buttons */
.pub-filter-bar {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}
.pub-filter-btn {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border);
  background: var(--bg-white);
  color: var(--text-medium);
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pub-filter-btn i {
  font-size: 0.78rem;
}
.pub-filter-btn:hover {
  border-color: var(--purple-light);
  color: var(--purple);
}
.pub-filter-btn.active {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
}
.pub-filter-btn.active i {
  color: #fff;
}

/* Publication Categories */
.pub-category {
  margin-bottom: var(--space-2xl);
  display: none;
}
.pub-category.active {
  display: block;
}
.btn-pub-more {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: var(--space-md) auto 0;
  padding: 6px 18px;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--purple);
  background: var(--purple-bg);
  border: 1.5px solid var(--purple-light);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-normal);
}
.btn-pub-more:hover {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
}
.btn-pub-more.expanded i {
  transform: rotate(180deg);
}

/* ═══════════ EDUCATION PATH ═══════════ */
.edu-path {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 0;
  position: relative;
  padding: var(--space-2xl) 0;
  overflow-x: auto;
}

.edu-track {
  position: absolute;
  top: calc(var(--space-2xl) + 22px);
  left: 10%;
  right: 10%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
}
.edu-track::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: var(--gradient-main);
  border-radius: 2px;
  transition: width 1.5s ease;
}
.edu-path.animated .edu-track::after {
  width: 100%;
}

.edu-node {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 2;
  padding: 0 var(--space-md);
  cursor: pointer;
  outline: none;
}

.edu-marker {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.7rem;
  margin-bottom: var(--space-xs);
  transition: all var(--transition-normal);
  border: 3px solid var(--border);
  background: var(--bg-white);
  color: var(--text-medium);
  font-family: var(--font-mono);
  overflow: hidden;
}
.edu-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 50%;
}
.edu-marker-1 { border-color: var(--amber-light); }
.edu-marker-2 { border-color: var(--pink-light); }
.edu-marker-3 { border-color: var(--blue-light); }
.edu-marker-4 { border-color: var(--purple-light); }

.edu-node:hover .edu-marker,
.edu-node:focus .edu-marker {
  transform: scale(1.15);
  box-shadow: var(--shadow-glow-purple);
  border-color: var(--purple);
}

.edu-year-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-medium);
  margin-bottom: var(--space-sm);
}

.edu-info {
  max-width: 180px;
  text-align: center;
}
.edu-info h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 2px;
}

/* Details hidden until hover/tap */
.edu-institution,
.edu-location,
.edu-score {
  opacity: 0;
  transform: translateY(6px);
  transition: all var(--transition-normal);
  pointer-events: none;
}
.edu-institution {
  font-size: 0.82rem;
  color: var(--purple);
  font-weight: 500;
}
.edu-location {
  font-size: 0.75rem;
  color: var(--text-light);
  margin: 2px 0;
}
.edu-score {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-medium);
  font-weight: 500;
}
.edu-node:hover .edu-institution,
.edu-node:hover .edu-location,
.edu-node:hover .edu-score,
.edu-node:focus .edu-institution,
.edu-node:focus .edu-location,
.edu-node:focus .edu-score {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.edu-current {
  color: var(--teal);
  font-weight: 600;
}

/* Current node (PhD) — details always visible */
.edu-node-current .edu-institution,
.edu-node-current .edu-location,
.edu-node-current .edu-score {
  opacity: 1;
  transform: translateY(0);
}

.edu-node-current .edu-marker {
  background: var(--bg-white);
  border-color: var(--purple);
  animation: pulseNode 2s ease-in-out infinite;
}
@keyframes pulseNode {
  0%, 100% { box-shadow: 0 0 0 0 rgba(124, 92, 252, 0.3); }
  50% { box-shadow: 0 0 0 10px rgba(124, 92, 252, 0); }
}

/* ═══════════ BEYOND THE LAB / GALLERY ═══════════ */
.activity-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: var(--space-2xl);
}
.activity-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-dark);
  transition: all var(--transition-normal);
}
.activity-pill:nth-child(1) { border-color: var(--purple-light); }
.activity-pill:nth-child(2) { border-color: var(--blue-light); }
.activity-pill:nth-child(3) { border-color: var(--teal-light); }
.activity-pill:nth-child(4) { border-color: var(--amber-light); }
.activity-pill:nth-child(5) { border-color: var(--pink-light); }
.activity-pill:nth-child(6) { border-color: var(--purple-light); }

.activity-pill:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* Polaroid Gallery */
/* Gallery Category Cards */
.gallery-categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.gallery-cat-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: 2px solid var(--border);
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
}
.gallery-cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.gallery-cat-card.active {
  border-color: var(--purple);
  box-shadow: var(--shadow-glow-purple);
}

.cat-preview {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  height: 120px;
  overflow: hidden;
}
.cat-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.gallery-cat-card:hover .cat-preview img {
  transform: scale(1.05);
}

.cat-preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-lavender);
  gap: var(--space-sm);
  color: var(--text-light);
  font-size: 0.85rem;
}
.cat-preview-placeholder i {
  font-size: 1.8rem;
  color: var(--purple-light);
}

.cat-label {
  padding: var(--space-md) var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
}
.cat-label i {
  color: var(--purple);
  font-size: 0.85rem;
}
/* Emoji in placeholder */
.cat-preview-placeholder span:first-child {
  font-size: 1.8rem;
  line-height: 1;
}
.gallery-cat-card.active .cat-label {
  color: var(--purple);
}

/* Family / home team */
.family-note {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  max-width: 680px;
  margin: 0 auto;
  padding: var(--space-xl);
  background: var(--bg-rose);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.family-photo {
  position: relative;
  flex: 0 0 160px;
  width: 160px;
  height: 160px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-lavender);
}
.family-photo img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.family-photo-ph {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  color: var(--text-light);
  font-family: var(--font-heading);
  font-weight: 600;
}
.family-photo-ph i {
  font-size: 2rem;
  color: var(--purple-light);
}
.family-text h3 {
  font-family: var(--font-heading);
  color: var(--text-dark);
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
}
.family-text p {
  color: var(--text-medium);
  line-height: 1.7;
  margin: 0;
}
@media (max-width: 600px) {
  .family-note { flex-direction: column; text-align: center; }
}

/* Gallery Modal */
.gallery-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(45, 43, 85, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: var(--space-xl);
  animation: fadeIn 0.25s ease;
}
.gallery-modal-overlay[hidden] {
  display: none;
}

.gallery-modal {
  position: relative;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  max-width: 900px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: var(--space-2xl);
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
}

.gallery-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Stretch over the modal's padding so nothing scrolls into view above or beside the header */
  margin: calc(-1 * var(--space-2xl)) calc(-1 * var(--space-2xl)) var(--space-xl);
  padding: var(--space-2xl) var(--space-2xl) var(--space-md);
  position: sticky;
  top: calc(-1 * var(--space-2xl));
  background: var(--bg-white);
  z-index: 2;
  border-bottom: 1px solid var(--border);
}
.gallery-modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-dark);
}
.gallery-modal-link {
  margin-left: var(--space-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--purple);
  text-decoration: none;
  white-space: nowrap;
}
.gallery-modal-link:hover {
  text-decoration: underline;
}
.gallery-modal-header .modal-close {
  position: static;
  float: none;
  flex-shrink: 0;
}

.gallery-modal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.gallery-thumb {
  cursor: pointer;
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
  background: var(--bg-white);
}
.gallery-thumb:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.gallery-thumb img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
.gallery-thumb-caption {
  padding: 8px 10px;
  font-size: 0.78rem;
  color: var(--text-medium);
  font-style: italic;
  text-align: center;
  background: var(--bg-lavender);
}

.gallery-placeholder {
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
  color: var(--text-light);
  font-style: italic;
  font-size: 0.95rem;
  grid-column: 1 / -1;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(45, 43, 85, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: var(--space-xl);
  animation: fadeIn 0.3s ease;
}
.lightbox[hidden] {
  display: none;
}

.lightbox-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90%;
  max-height: 90vh;
}
.lightbox-center img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox-caption {
  color: white;
  font-size: 0.95rem;
  font-style: italic;
  text-align: center;
  margin-top: var(--space-md);
  opacity: 0.85;
  max-width: 500px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  cursor: pointer;
  border-radius: 50%;
  transition: background var(--transition-normal);
  backdrop-filter: blur(4px);
}
.lightbox-close {
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  font-size: 1.4rem;
}
.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 1rem;
}
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255,255,255,0.3);
}

/* ═══════════ CONTACT SECTION ═══════════ */
.contact-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.contact-text {
  font-size: 1.02rem;
  color: var(--text-medium);
  margin-bottom: var(--space-2xl);
  line-height: 1.8;
}

.contact-icons {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg-white);
  color: var(--text-dark);
  font-size: 1.2rem;
  text-decoration: none;
  transition: all var(--transition-normal);
}
.contact-icon:hover {
  transform: translateY(-4px) scale(1.1);
  box-shadow: var(--shadow-md);
}
.contact-email:hover { border-color: var(--pink); color: var(--pink); background: var(--pink-bg); }
.contact-linkedin:hover { border-color: #0077b5; color: #0077b5; background: #edf7ff; }
.contact-github:hover { border-color: #333; color: #333; background: #f6f6f6; }
.contact-scholar:hover { border-color: #4285f4; color: #4285f4; background: #edf2ff; }
.contact-instagram:hover { border-color: #e4405f; color: #e4405f; background: #fff0f3; }

.contact-calendly {
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border);
}
.contact-calendly p {
  font-size: 0.9rem;
  color: var(--text-medium);
  margin-bottom: var(--space-md);
}

.btn-calendly {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  background: var(--gradient-teal-blue);
  color: white !important;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}
.btn-calendly:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-teal);
}

/* ═══════════ FOOTER ═══════════ */
#footer {
  background: var(--text-dark);
  padding: var(--space-2xl) var(--space-xl);
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}
.footer-logo {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 600;
  color: white;
}
.footer-logo .logo-bracket {
  color: var(--purple-light);
}
.footer-copy {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
}
.footer-visitors {
  margin-top: var(--space-sm);
  opacity: 0.8;
}

/* ═══════════ SCROLL REVEAL ANIMATIONS ═══════════ */
.reveal-up,
.reveal-left,
.reveal-right {
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-up {
  transform: translateY(30px);
}
.reveal-left {
  transform: translateX(-40px);
}
.reveal-right {
  transform: translateX(40px);
}

.reveal-up.revealed,
.reveal-left.revealed,
.reveal-right.revealed {
  opacity: 1;
  transform: translate(0, 0);
}

/* ═══════════ RESPONSIVE DESIGN ═══════════ */

/* Tablet */
@media (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .quick-facts {
    grid-template-columns: repeat(3, 1fr);
  }
  .gallery-modal-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile-ish */
@media (max-width: 768px) {
  :root {
    --space-4xl: 4rem;
  }

  /* Navigation becomes hamburger */
  .nav-toggle {
    display: flex;
  }
  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    box-shadow: var(--shadow-lg);
    display: none;
    gap: 2px;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links a {
    padding: 10px 16px;
    border-radius: var(--radius-md);
  }

  /* Hero */
  .profile-hex-wrapper {
    width: 160px;
    height: 160px;
  }
  .hero-ecg {
    bottom: 10%;
    height: 80px;
  }

  /* Skills */
  .skills-flow {
    grid-template-columns: 1fr;
  }
  .system-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .stage-connector {
    display: none;
  }
  .stage-detail {
    width: 100%; /* stay inside the narrower grid cells */
  }

  /* Experience */
  .exp-featured-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .exp-featured {
    padding: var(--space-lg);
  }
  .exp-featured-tags {
    justify-content: center;
  }
  .exp-past-label::before,
  .exp-past-label::after {
    display: none;
  }
  .exp-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
  }
  .exp-chip {
    padding: var(--space-md) var(--space-sm);
  }
  .chip-logo {
    width: 50px;
    height: 50px;
  }
  .chip-logo img {
    width: 34px;
    height: 34px;
  }
  .chip-role {
    font-size: 0.82rem;
  }
  .chip-company {
    font-size: 0.72rem;
  }
  .exp-modal {
    max-width: 90vw;
  }

  /* Projects */
  .projects-grid {
    grid-template-columns: 1fr;
  }

  /* Quick Facts */
  .quick-facts {
    grid-template-columns: 1fr 1fr;
  }

  /* Education: stacked cards, logo left, all details visible (no hover on touch) */
  .edu-path {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-sm);
    padding: 0;
    overflow-x: visible;
  }
  .edu-track {
    display: none;
  }
  .edu-node {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: var(--space-md);
    align-items: center;
    text-align: left;
    padding: 14px 16px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    cursor: default;
  }
  .edu-marker {
    grid-row: 1 / span 2;
    width: 48px;
    height: 48px;
    margin-bottom: 0;
  }
  .edu-logo {
    width: 32px;
    height: 32px;
  }
  .edu-year-label {
    align-self: end;
    margin-bottom: 0;
  }
  .edu-info {
    align-self: start;
    max-width: none;
    text-align: left;
  }
  .edu-institution,
  .edu-location,
  .edu-score {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .edu-node:hover .edu-marker,
  .edu-node:focus .edu-marker {
    transform: none;
    box-shadow: none;
  }
  #education .click-hint {
    display: none;
  }

  /* Gallery */
  .gallery-categories {
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--space-md);
  }
  .cat-preview {
    height: 90px;
  }
  .cat-label {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.8rem;
  }
  .polaroid-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }
  .polaroid img {
    height: 140px;
  }

  /* Contact */
  .contact-links {
    flex-direction: column;
    align-items: center;
  }
  .contact-btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-md);
  }
  .hero-name {
    font-size: 1.8rem;
  }
  .social-pills {
    gap: 6px;
  }
  .pill span {
    display: none;
  }
  .pill {
    padding: 10px;
    border-radius: 50%;
  }
  .quick-facts {
    grid-template-columns: 1fr;
  }
  .skill-pill {
    font-size: 0.68rem;
    padding: 4px 10px;
  }
  .exp-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .chip-logo {
    width: 44px;
    height: 44px;
  }
  .chip-logo img {
    width: 30px;
    height: 30px;
  }
  .gallery-modal-grid {
    grid-template-columns: 1fr 1fr;
  }
    height: 120px;
  }
}
