@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Dark & Precise AI Research & Software Engineering Palette */
  --bg: #090d14;
  --bg-card: rgba(16, 23, 37, 0.75);
  --bg-card-hover: rgba(22, 33, 53, 0.9);
  --surface: rgba(18, 27, 44, 0.5);
  --surface-hover: rgba(26, 39, 64, 0.7);
  --text: #f1f5f9;
  --text-secondary: #94a3b8;
  --muted: #64748b;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.15);
  
  /* Restrained Electric Blue Accents */
  --accent: #3b82f6;
  --accent-light: #60a5fa;
  --accent-dark: #1d4ed8;
  --accent-glow: rgba(59, 130, 246, 0.3);
  --accent-subtle: rgba(59, 130, 246, 0.08);
  --accent-border: rgba(59, 130, 246, 0.28);
  
  --cyan: #38bdf8;
  --emerald: #10b981;
  --amber: #f59e0b;
  
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 9999px;
  
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 30px var(--accent-glow);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.7 var(--font-body);
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle Research Grid with Dynamic Mouse Tracking Spotlight */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: 
    radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    radial-gradient(circle 900px at var(--mouse-x, 50vw) var(--mouse-y, 30vh), rgba(59, 130, 246, 0.06), transparent 75%);
  background-size: 36px 36px, 100% 100%;
  pointer-events: none;
  z-index: -2;
}

/* Ambient Subtle Glows */
.ambient-glow {
  position: fixed;
  top: -15vh;
  left: -15vw;
  width: 55vw;
  height: 55vw;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, rgba(56, 189, 248, 0.03) 50%, transparent 70%);
  filter: blur(120px);
  z-index: -1;
  pointer-events: none;
  animation: pulse-glow 14s infinite alternate ease-in-out;
}

.ambient-glow.glow-2 {
  top: 45vh;
  left: auto;
  right: -15vw;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, rgba(59, 130, 246, 0.03) 50%, transparent 70%);
  animation: pulse-glow-2 16s infinite alternate ease-in-out;
}

@keyframes pulse-glow {
  0% { transform: scale(1) translate(0, 0); opacity: 0.7; }
  100% { transform: scale(1.15) translate(4%, 5%); opacity: 0.95; }
}

@keyframes pulse-glow-2 {
  0% { transform: scale(1) translate(0, 0); opacity: 0.6; }
  100% { transform: scale(1.2) translate(-5%, -4%); opacity: 0.9; }
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

button {
  font: inherit;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* ==========================================================================
   Header & Floating Navigation
   ========================================================================== */
header {
  max-width: 1440px;
  margin: 0 auto;
  padding: 18px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(9, 13, 20, 0.85);
  border-bottom: 1px solid var(--line);
  transition: all 0.3s ease;
}

.brand {
  font: 800 24px var(--font-heading);
  letter-spacing: -1px;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.brand span { font-weight: 300; color: var(--text-secondary); }
.brand b {
  color: var(--accent);
  font-size: 26px;
  text-shadow: 0 0 14px var(--accent-glow);
}
.brand-domain {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.5px;
}

nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 6px 0;
  letter-spacing: 0.2px;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateX(-50%);
  box-shadow: 0 0 8px var(--accent-glow);
}

nav a:hover {
  color: #fff;
}
nav a:hover::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Sliding Language Toggle Pill */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  background: rgba(18, 26, 42, 0.85);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm), inset 0 1px 1px rgba(255, 255, 255, 0.08);
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1;
}

.lang-btn:hover {
  color: #fff;
}

.lang-btn.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 14px var(--accent-glow);
  font-weight: 800;
}

.mini-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line-strong);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  backdrop-filter: blur(10px);
  transition: all 0.25s ease;
}

.mini-button:hover {
  background: #fff;
  color: #090d14;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* ==========================================================================
   Typography & Global Headings
   ========================================================================== */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
  color: #fff;
}

.micro {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.micro::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
}

/* ==========================================================================
   Hero Section & Identity Card
   ========================================================================== */
.hero {
  max-width: 1440px;
  margin: 0 auto;
  padding: 50px 48px 40px;
  position: relative;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.8px;
  color: var(--accent-light);
  margin-bottom: 24px;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.1);
}

.pulse-beacon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pulse-beacon 2s infinite ease-in-out;
}

@keyframes pulse-beacon {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.4); opacity: 1; box-shadow: 0 0 14px var(--accent); }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.hero-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 60px;
  align-items: center;
}

h1 {
  font-size: clamp(44px, 5.5vw, 76px);
  line-height: 1.05;
  letter-spacing: -2.5px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
}

.hero-tagline {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  color: var(--accent-light);
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

.intro {
  max-width: 640px;
  color: var(--text-secondary);
  font-size: 17px;
  line-height: 1.68;
  font-weight: 300;
  margin-bottom: 24px;
}

.hero-contact-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 30px;
}

.strip-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  transition: all 0.2s ease;
}

.strip-item:hover {
  color: #fff;
  border-color: var(--accent-border);
  background: var(--accent-subtle);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  cursor: pointer;
  letter-spacing: 0.2px;
}

.button.primary {
  background: var(--accent);
  color: #ffffff;
  border: 1px solid var(--accent);
  box-shadow: 0 4px 20px var(--accent-glow);
  font-weight: 600;
}

.button.primary:hover {
  background: var(--accent-light);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.45);
}

.button.outline {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(10px);
}

.button.outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  transform: translateY(-3px);
}

/* ==========================================================================
   Hero Executive Portrait Showcase (Single High-End Portrait)
   ========================================================================== */
.hero-portrait-wrap {
  perspective: 1200px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-portrait-card {
  width: 100%;
  max-width: 410px;
  border-radius: 32px;
  padding: 6px;
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.45) 0%, rgba(255, 255, 255, 0.08) 50%, rgba(6, 182, 212, 0.35) 100%);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 45px rgba(37, 99, 235, 0.25);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
  position: relative;
}

.hero-portrait-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.8), 0 0 60px rgba(59, 130, 246, 0.4);
}

.hero-portrait-image-box {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5.1;
  border-radius: 28px;
  overflow: hidden;
  background: #090d14;
}

.hero-portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 10%;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-portrait-card:hover .hero-portrait-img {
  transform: scale(1.04);
}

.hero-portrait-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9, 13, 20, 0.05) 0%, rgba(9, 13, 20, 0.05) 45%, rgba(9, 13, 20, 0.85) 80%, rgba(9, 13, 20, 0.98) 100%);
  pointer-events: none;
}

.hero-portrait-top-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(9, 13, 22, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(34, 197, 94, 0.4);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: #86efac;
  letter-spacing: 0.3px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.hero-portrait-master-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: rgba(9, 13, 22, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: #93c5fd;
  letter-spacing: 0.3px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.hero-portrait-master-badge svg {
  color: #38bdf8;
}

.status-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px #22c55e;
  animation: pulseStatus 2s infinite ease-in-out;
}

.hero-portrait-glass-bar {
  position: absolute;
  bottom: 14px;
  left: 14px;
  right: 14px;
  background: rgba(10, 16, 28, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  padding: 16px 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), inset 0 1px 1px rgba(255, 255, 255, 0.12);
}

.glass-bar-headline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.glass-title-badge {
  display: flex;
  align-items: center;
  gap: 7px;
}

.glass-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.7);
}

.glass-title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: #60a5fa;
  letter-spacing: 0.8px;
}

.glass-loc {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #94a3b8;
}

.glass-sub {
  font-size: 13px;
  color: #e2e8f0;
  font-weight: 500;
  margin-bottom: 12px;
  line-height: 1.4;
}

.glass-stats-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 10px;
}

.glass-stat {
  text-align: center;
  flex: 1;
}

.glass-stat strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.glass-stat span {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.glass-stat-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   2. About Me Section
   ========================================================================== */
.about-section {
  background: linear-gradient(180deg, rgba(16, 23, 37, 0.25) 0%, transparent 100%);
}

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

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 36px 30px;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.about-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md), 0 0 25px rgba(59, 130, 246, 0.1);
}

.about-icon {
  font-size: 28px;
  margin-bottom: 16px;
  display: inline-block;
}

.about-card h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #fff;
}

.about-card p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.65;
}

/* ==========================================================================
   Section Containers & Headings
   ========================================================================== */
.section {
  max-width: 1440px;
  margin: 0 auto;
  padding: 100px 48px;
  border-top: 1px solid var(--line);
  position: relative;
}

.heading {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 60px;
  align-items: flex-end;
  margin-bottom: 50px;
}

.heading h2 {
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.1;
  letter-spacing: -2px;
  margin: 0;
}

.heading > p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
  margin: 0;
}

/* ==========================================================================
   3. Selected Projects (Spotlight / Case Studies)
   ========================================================================== */
.spotlight-card {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 44px;
  background: linear-gradient(145deg, rgba(18, 27, 44, 0.8) 0%, rgba(10, 15, 26, 0.95) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 40px;
  margin-bottom: 36px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-md);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.spotlight-card:hover {
  border-color: var(--accent-border);
  box-shadow: var(--shadow-lg), 0 0 35px rgba(59, 130, 246, 0.12);
  transform: translateY(-5px);
}

.spotlight-sub {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-light);
  margin: 4px 0 16px;
}

.spotlight-copy h3 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -1px;
  margin: 8px 0 4px;
}

.spotlight-copy > p:not(.spotlight-sub) {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.65;
  margin-bottom: 28px;
}

.spotlight-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.project-jump-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  box-shadow: 0 4px 14px var(--accent-glow);
  transition: all 0.25s ease;
}

.project-jump-btn:hover {
  background: var(--accent-light);
  transform: translateX(3px);
}

.workflow-pipeline {
  background: rgba(9, 13, 20, 0.8);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pipeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.diagram-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--accent-light);
  text-transform: uppercase;
}

.live-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--emerald);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.case-brief-box {
  font-size: 14px;
}

.case-brief-box strong {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 4px;
}

.case-brief-box p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}

.brief-divider {
  height: 1px;
  background: var(--line);
  margin: 16px 0;
}

/* ==========================================================================
   4. More Projects Grid
   ========================================================================== */
/* Filters Bar for Projects */
.filters-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
  padding: 12px 24px;
  background: rgba(16, 23, 37, 0.7);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  backdrop-filter: blur(14px);
}

.filter-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.filters-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  color: #fff;
  border-color: var(--accent-border);
  background: var(--accent-subtle);
}

.filter-btn[aria-pressed="true"],
.filter-btn.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 2px 10px var(--accent-glow);
}

.project-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.project-actions-row .source-btn {
  margin-top: 0;
}

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 32px;
}

.project {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.project:hover {
  border-color: var(--accent-border);
  background: var(--bg-card-hover);
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(59, 130, 246, 0.12);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
}

.project-header .index {
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 800;
  color: var(--accent-light);
  line-height: 1;
}

.project-header .cat-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 1px;
}

.project-context {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
}

.project h3 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.project h4 {
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 14px;
  line-height: 1.4;
}

.project-desc {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 24px;
  flex-grow: 1;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.tags span {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  transition: all 0.2s ease;
}

details {
  border-top: 1px solid var(--line);
  margin-top: auto;
  padding-top: 14px;
}

summary {
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  transition: color 0.2s;
}

summary:hover {
  color: var(--accent-light);
}

.detail {
  padding-top: 14px;
  font-size: 14px;
}

.detail-box {
  background: rgba(9, 13, 20, 0.65);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 10px;
}

.detail-box strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-light);
  text-transform: uppercase;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.detail-box p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

.source-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  margin-top: 18px;
  transition: all 0.2s ease;
}

.source-btn svg {
  fill: currentColor;
}

.source-btn:hover {
  color: var(--accent-light);
  transform: translateX(4px);
}

/* ==========================================================================
   5. Experience & Timeline
   ========================================================================== */
.background-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 80px;
}

.column-title {
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--accent-light);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeline {
  display: flex;
  flex-direction: column;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 7px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent) 0%, rgba(59, 130, 246, 0.1) 100%);
}

.timeline-item {
  position: relative;
  padding-left: 36px;
  padding-bottom: 36px;
  transition: all 0.3s ease;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #090d14;
  border: 3px solid var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  z-index: 2;
  transition: transform 0.3s ease;
}

.timeline-item:hover::before {
  transform: scale(1.3);
  background: var(--accent);
}

.timeline-item time {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-light);
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 6px;
}

.timeline-item h4 {
  font-size: 15px;
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.timeline-item h3 {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 10px;
  color: var(--text);
}

.timeline-item p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

/* Education & Certificates */
.education-item {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 16px;
  transition: all 0.25s ease;
}

.education-item:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(4px);
}

.education-item time {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  display: block;
  margin-bottom: 4px;
}

.education-item h4 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
}

.education-item p {
  color: var(--text-secondary);
  font-size: 14px;
}

.certificates-box {
  background: linear-gradient(145deg, rgba(18, 27, 44, 0.6) 0%, rgba(12, 18, 30, 0.8) 100%);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 24px;
}

.certificates-box h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 16px;
  color: #fff;
}

.cert-entry {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.cert-entry:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.cert-featured-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-light);
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  display: inline-block;
  margin-bottom: 6px;
}

.cert-entry strong {
  color: var(--accent-light);
  font-size: 14px;
  display: block;
  margin-bottom: 2px;
}

.cert-entry p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.spoken-box {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ==========================================================================
   6. Areas of Practice (Skills Grid)
   ========================================================================== */
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.expertise-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  padding: 40px;
  border-radius: var(--radius-xl);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.expertise-card:hover {
  border-color: var(--accent-border);
  background: var(--bg-card-hover);
  transform: translateY(-5px);
  box-shadow: var(--shadow-md), 0 0 30px rgba(59, 130, 246, 0.12);
}

.expertise-card h3 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 12px 0 14px;
}

.expertise-card p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 22px;
}

.tech-capsule {
  font-family: var(--font-mono);
  font-size: 13px;
  border-left: 3px solid var(--accent);
  background: var(--accent-subtle);
  padding: 12px 18px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: #e2e8f0;
  line-height: 1.6;
}

/* ==========================================================================
   7. Project Journal Section
   ========================================================================== */
.journal-section {
  background: linear-gradient(180deg, rgba(16, 23, 37, 0.25) 0%, transparent 100%);
}

.journal-format-box {
  background: rgba(9, 13, 20, 0.65);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 22px;
  margin-bottom: 36px;
  font-size: 14px;
}

.journal-format-box strong {
  color: var(--accent-light);
  font-family: var(--font-mono);
  margin-right: 8px;
}

.journal-format-box p {
  display: inline;
  color: var(--text-secondary);
}

.journal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 28px;
}

.journal-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 32px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.journal-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md), 0 0 25px rgba(59, 130, 246, 0.1);
}

.journal-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  margin-bottom: 14px;
}

.journal-tag {
  color: var(--accent-light);
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-weight: 700;
}

.journal-card time {
  color: var(--muted);
}

.journal-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.35;
  color: #fff;
}

.journal-card p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.journal-link {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-light);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.journal-link span {
  transition: transform 0.2s;
}

.journal-card:hover .journal-link span {
  transform: translateX(4px);
}

/* ==========================================================================
   10. Contact Section
   ========================================================================== */
.contact {
  text-align: center;
  padding: 120px 48px 140px;
  background: radial-gradient(circle 800px at 50% 100%, rgba(59, 130, 246, 0.05) 0%, transparent 70%);
}

.contact .micro {
  margin: 0 auto 20px;
}

.contact h2 {
  font-size: clamp(38px, 4.8vw, 70px);
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 24px;
}

.contact-row {
  max-width: 720px;
  margin: 0 auto 60px;
}

.contact-row p {
  color: var(--text-secondary);
  font-size: 19px;
  line-height: 1.65;
  margin-bottom: 36px;
}

.contact-meta-table {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  background: rgba(16, 23, 37, 0.65);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 36px;
  text-align: left;
}

.contact-meta-table div {
  font-size: 14px;
}

.contact-meta-table span {
  color: var(--muted);
  font-family: var(--font-mono);
  margin-right: 6px;
}

.contact-meta-table strong, .contact-meta-table a {
  color: #fff;
  font-weight: 600;
}

.contact-meta-table a:hover {
  color: var(--accent-light);
}

.email-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.copy-email-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-strong);
  color: #fff;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-family: var(--font-mono);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.25s ease;
}

.copy-email-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  transform: translateY(-2px);
}

.copy-email-btn.copied {
  border-color: var(--emerald);
  color: var(--emerald);
  background: rgba(16, 185, 129, 0.15);
}

.downloads {
  border-top: 1px solid var(--line);
  margin-top: 70px;
  padding-top: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.downloads p {
  color: var(--muted);
  font-size: 15px;
  font-family: var(--font-mono);
}

.cv-cards-grid {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.cv-download-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cv-download-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 20px var(--accent-glow);
}

.cv-icon {
  background: var(--accent-subtle);
  color: var(--accent-light);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  border: 1px solid var(--accent-border);
}

.cv-meta strong {
  display: block;
  font-size: 15px;
  color: #fff;
  margin-bottom: 2px;
}

.cv-meta span {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--font-mono);
}

/* ==========================================================================
   CV Showcase Section & Preview
   ========================================================================== */
.cv-showcase-section {
  position: relative;
}

.cv-showcase-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 44px;
  align-items: start;
  margin-top: 24px;
}

@media (max-width: 992px) {
  .cv-showcase-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.cv-preview-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cv-preview-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(59, 130, 246, 0.1);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

.cv-preview-frame:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5), 0 0 40px rgba(59, 130, 246, 0.25);
  border-color: var(--accent);
}

.cv-preview-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.cv-preview-overlay {
  position: absolute;
  inset: 0;
  background: rgba(9, 13, 20, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cv-preview-frame:hover .cv-preview-overlay {
  opacity: 1;
}

.cv-open-btn {
  transform: translateY(10px);
  transition: transform 0.3s ease;
}

.cv-preview-frame:hover .cv-open-btn {
  transform: translateY(0);
}

.cv-caption {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.cv-details-panel {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.cv-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.badge-chip {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-light);
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 999px;
  padding: 6px 14px;
  letter-spacing: 0.3px;
}

.cv-highlights-box {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.cv-highlights-box h4 {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
  letter-spacing: -0.2px;
}

.cv-points-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cv-points-list li {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.55;
  position: relative;
  padding-left: 18px;
}

.cv-points-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.cv-points-list li strong {
  color: #fff;
  font-weight: 600;
}

.cv-downloads-action-block {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cv-download-heading {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 600;
}

.cv-buttons-duo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.cv-action-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cv-action-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 20px var(--accent-glow);
}

.cv-action-card.active-card {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.06);
}

.cv-card-icon {
  background: var(--accent-subtle);
  color: var(--accent-light);
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  border: 1px solid var(--accent-border);
  flex-shrink: 0;
}

.cv-card-info strong {
  display: block;
  font-size: 14px;
  color: #fff;
  margin-bottom: 2px;
}

.cv-card-info span {
  font-size: 11.5px;
  color: var(--muted);
  font-family: var(--font-mono);
}

.cv-meta-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  padding-top: 6px;
}

.cv-meta-links .meta-link {
  color: var(--accent-light);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.cv-meta-links .meta-link:hover {
  color: #fff;
}

/* ==========================================================================
   11. Interactive Deep-Dive Case Study Modals
   ========================================================================== */
.case-study-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 7, 12, 0.85);
  backdrop-filter: blur(16px);
}

.modal-dialog {
  position: relative;
  background: linear-gradient(145deg, #0e1524 0%, #090d15 100%);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-xl);
  max-width: 820px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 44px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.8), 0 0 40px rgba(59, 130, 246, 0.15);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.case-study-modal.open .modal-dialog {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-strong);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.modal-sub {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent-light);
  margin: 6px 0 28px;
}

.deep-dive-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.deep-dive-section {
  background: rgba(6, 9, 15, 0.65);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
}

.deep-dive-section h4 {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-light);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.deep-dive-section p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.65;
  margin: 0;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
  max-width: 1440px;
  margin: 0 auto;
  padding: 40px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  font-size: 14px;
  border-top: 1px solid var(--line);
  background: rgba(9, 13, 20, 0.95);
}

footer span {
  font-size: 13px;
  color: var(--muted);
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
}

.footer-links {
  display: flex;
  gap: 28px;
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: 13px;
  flex-wrap: wrap;
}

footer a:hover {
  color: var(--accent-light);
}

.skip {
  position: absolute;
  left: 20px;
  top: -80px;
  background: var(--accent);
  color: #fff;
  padding: 12px 24px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  z-index: 999;
}
.skip:focus {
  top: 20px;
}

/* ==========================================================================
   Scroll Reveal Animations
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Dynamic Instant Language Switching Rules
   ========================================================================== */
html[lang="fr"] .i18n-en {
  display: none !important;
}

html[lang="en"] .i18n-fr {
  display: none !important;
}

.i18n-fr, .i18n-en {
  animation: langFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes langFadeIn {
  0% { opacity: 0.3; transform: translateY(2px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Responsive Adaptations (Tablet, Mobile & Small Screens)
   ========================================================================== */

/* Tablet & Smaller Laptops (<= 1024px) */
@media (max-width: 1024px) {
  header {
    padding: 16px 28px;
  }

  .hero, .section, footer {
    padding-left: 28px;
    padding-right: 28px;
  }

  .hero-grid {
    grid-template-columns: 1.2fr 1fr;
    gap: 36px;
  }

  .spotlight-card {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 32px 28px;
  }

  .cv-showcase-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .background-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }

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

/* Tablets & Mobile Landscape (<= 820px) */
@media (max-width: 820px) {
  html {
    scroll-padding-top: 110px;
  }

  header {
    padding: 12px 20px 10px;
    flex-wrap: wrap;
    gap: 10px;
    background: rgba(9, 13, 20, 0.96);
  }

  .brand {
    font-size: 20px;
  }

  .header-actions {
    gap: 8px;
    margin-left: auto;
  }

  .lang-btn {
    font-size: 11.5px;
    padding: 5px 11px;
  }

  .mini-button {
    font-size: 12px;
    padding: 6px 14px;
  }

  nav {
    order: 3;
    width: 100%;
    margin-top: 4px;
    padding: 8px 0 2px;
    border-top: 1px solid var(--line);
    display: flex;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  nav::-webkit-scrollbar {
    display: none;
  }

  nav a {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    flex-shrink: 0;
    transition: all 0.2s ease;
  }

  nav a::after {
    display: none;
  }

  nav a:hover, nav a:active {
    background: var(--accent-subtle);
    border-color: var(--accent-border);
    color: #fff;
  }

  .hero {
    padding: 28px 20px 36px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero-portrait-wrap {
    order: -1;
    max-width: 330px;
    margin: 0 auto;
  }

  .heading {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 30px;
  }

  .heading h2 {
    font-size: clamp(25px, 6.5vw, 32px);
    letter-spacing: -0.6px;
  }

  .expertise-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .contact-meta-table {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  footer {
    padding: 36px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 16px;
  }
}

/* Mobile Phones (<= 640px) */
@media (max-width: 640px) {
  header, .hero, .section, footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .brand-domain {
    display: none;
  }

  .status-pill {
    max-width: 100%;
    padding: 7px 12px;
    font-size: 10px;
    letter-spacing: 0.4px;
    line-height: 1.4;
    border-radius: 10px;
    white-space: normal;
    text-align: left;
    margin-bottom: 18px;
  }

  h1 {
    font-size: clamp(32px, 8.5vw, 40px);
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 8px;
  }

  .hero-tagline {
    font-size: 14.5px;
    line-height: 1.45;
    margin-bottom: 14px;
  }

  .intro {
    font-size: 14.5px;
    line-height: 1.62;
    margin-bottom: 20px;
  }

  .hero-contact-strip {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 22px;
  }

  .strip-item {
    width: 100%;
    justify-content: center;
    padding: 10px 14px;
    font-size: 12px;
  }

  .actions {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .button {
    width: 100%;
    padding: 13px 20px;
    font-size: 14px;
    justify-content: center;
  }

  /* Executive Portrait */
  .hero-portrait-card {
    max-width: 320px;
    border-radius: 22px;
    padding: 4px;
  }

  .hero-portrait-image-box {
    border-radius: 18px;
    aspect-ratio: 4 / 4.9;
  }

  .hero-portrait-top-badge {
    top: 10px;
    right: 10px;
    font-size: 10px;
    padding: 4px 10px;
    gap: 5px;
  }

  .hero-portrait-master-badge {
    top: 10px;
    left: 10px;
    font-size: 10px;
    padding: 4px 9px;
    gap: 5px;
  }

  .hero-portrait-glass-bar {
    bottom: 8px;
    left: 8px;
    right: 8px;
    padding: 12px 12px;
    border-radius: 16px;
  }

  .glass-title {
    font-size: 10.5px;
    letter-spacing: 0.4px;
  }

  .glass-loc {
    font-size: 10px;
  }

  .glass-sub {
    font-size: 10.5px;
    margin: 3px 0 6px;
    line-height: 1.35;
  }

  .glass-stats-strip {
    padding-top: 6px;
    margin-top: 6px;
    gap: 4px;
  }

  .glass-stat strong {
    font-size: 12px;
  }

  .glass-stat span {
    font-size: 9.5px;
  }

  .glass-stat-divider {
    height: 16px;
  }

  /* Sections */
  .section {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .about-card {
    padding: 22px 18px;
    border-radius: var(--radius-lg);
  }

  .about-card h3 {
    font-size: 17px;
  }

  .about-card p {
    font-size: 13.5px;
  }

  /* Spotlight Cards */
  .spotlight-card {
    grid-template-columns: 1fr !important;
    gap: 20px;
    padding: 22px 16px;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
  }

  .spotlight-copy h3 {
    font-size: 21px;
    letter-spacing: -0.4px;
  }

  .spotlight-sub {
    font-size: 11.5px;
    margin-bottom: 10px;
  }

  .spotlight-copy > p:not(.spotlight-sub) {
    font-size: 13.5px;
    line-height: 1.6;
    margin-bottom: 16px;
  }

  .spotlight-actions {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .spotlight-actions .project-jump-btn,
  .spotlight-actions .source-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
    font-size: 13px;
    margin-top: 0;
  }

  .workflow-pipeline {
    padding: 16px 14px;
    border-radius: var(--radius-md);
  }

  .pipeline-header {
    margin-bottom: 10px;
  }

  .diagram-label {
    font-size: 9.5px;
    letter-spacing: 0.8px;
  }

  .live-badge {
    font-size: 9px;
    padding: 2px 6px;
  }

  .case-brief-box strong {
    font-size: 10.5px;
    margin-bottom: 2px;
  }

  .case-brief-box p {
    font-size: 12.5px;
    line-height: 1.5;
  }

  .brief-divider {
    margin: 10px 0;
  }

  /* Filters */
  .filters-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
  }

  .filter-label {
    font-size: 10.5px;
    letter-spacing: 0.5px;
  }

  .filters-wrapper {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    gap: 6px;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .filters-wrapper::-webkit-scrollbar {
    display: none;
  }

  .filter-btn {
    flex-shrink: 0;
    padding: 7px 13px;
    font-size: 11px;
    min-height: 36px;
  }

  /* Projects Grid */
  .projects {
    grid-template-columns: 1fr !important;
    gap: 18px;
  }

  .project {
    padding: 22px 16px;
    border-radius: var(--radius-lg);
  }

  .project-header .index {
    font-size: 22px;
  }

  .project-header .cat-tag {
    font-size: 9.5px;
  }

  .project-context {
    font-size: 10.5px;
  }

  .project h3 {
    font-size: 19px;
  }

  .project h4 {
    font-size: 13px;
    margin-bottom: 8px;
  }

  .project-desc {
    font-size: 13px;
    line-height: 1.55;
    margin-bottom: 14px;
  }

  .tags {
    gap: 5px;
    margin-bottom: 14px;
  }

  .tags span {
    font-size: 9.5px;
    padding: 3px 8px;
  }

  summary {
    font-size: 12.5px;
    padding: 6px 0;
  }

  .detail-box {
    padding: 10px 12px;
  }

  .detail-box strong {
    font-size: 10px;
  }

  .detail-box p {
    font-size: 12px;
  }

  .project-actions-row {
    flex-direction: column;
    width: 100%;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
  }

  .project-actions-row .project-jump-btn,
  .project-actions-row .source-btn {
    width: 100%;
    justify-content: center;
    padding: 11px 16px;
    font-size: 12px;
    margin-top: 0;
  }

  /* Timeline & Education */
  .timeline-item {
    padding-left: 26px;
    padding-bottom: 24px;
  }

  .timeline-item h3 {
    font-size: 16.5px;
  }

  .timeline-item p {
    font-size: 13px;
  }

  .education-item {
    padding: 14px 16px;
  }

  .education-item h4 {
    font-size: 14.5px;
  }

  .education-item p {
    font-size: 12.5px;
  }

  .certificates-box {
    padding: 16px 14px;
  }

  .cert-entry strong {
    font-size: 12.5px;
  }

  .cert-entry p {
    font-size: 12px;
  }

  /* Skills */
  .expertise-card {
    padding: 22px 18px;
    border-radius: var(--radius-lg);
  }

  .expertise-card h3 {
    font-size: 18px;
  }

  .expertise-card p {
    font-size: 13px;
    margin-bottom: 14px;
  }

  .tech-capsule {
    font-size: 11.5px;
    padding: 9px 12px;
  }

  /* Journal */
  .journal-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  .journal-card {
    padding: 20px 16px;
    border-radius: var(--radius-lg);
  }

  .journal-card h3 {
    font-size: 15.5px;
    line-height: 1.35;
  }

  .journal-card p {
    font-size: 12.5px;
  }

  /* CV Showcase */
  .cv-showcase-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  .cv-highlights-box {
    padding: 16px 14px;
  }

  .cv-points-list {
    font-size: 12.5px;
    gap: 7px;
  }

  .cv-buttons-duo {
    grid-template-columns: 1fr !important;
    gap: 8px;
  }

  .cv-action-card {
    padding: 11px 12px;
  }

  .cv-meta-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 10.5px;
  }

  .cv-meta-links .sep {
    display: none;
  }

  /* Contact */
  .contact-row {
    padding: 24px 16px;
    border-radius: var(--radius-lg);
  }

  .contact-row p {
    font-size: 13.5px;
    line-height: 1.6;
    margin-bottom: 18px;
  }

  .contact-meta-table {
    grid-template-columns: 1fr !important;
    gap: 8px;
    margin-bottom: 20px;
  }

  .contact-meta-table div {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    font-size: 12.5px;
  }

  .email-actions {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .email-actions .button,
  .email-actions .copy-email-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
    font-size: 13px;
  }

  /* Modals */
  .case-study-modal {
    padding: 8px;
  }

  .modal-dialog {
    padding: 22px 14px;
    border-radius: var(--radius-lg);
    max-height: 94vh;
  }

  .modal-dialog h2 {
    font-size: 20px;
    padding-right: 36px;
    letter-spacing: -0.4px;
  }

  .modal-sub {
    font-size: 11.5px;
    margin: 4px 0 16px;
  }

  .modal-close-btn {
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
  }

  .deep-dive-grid {
    gap: 10px;
  }

  .deep-dive-section {
    padding: 12px 12px;
    border-radius: var(--radius-md);
  }

  .deep-dive-section h4 {
    font-size: 11.5px;
    margin-bottom: 5px;
  }

  .deep-dive-section p {
    font-size: 12.5px;
    line-height: 1.5;
  }

  .deep-dive-section .source-btn {
    width: 100%;
    justify-content: center;
    padding: 11px 14px;
  }
}

/* Compact Mobile (<= 400px, e.g. iPhone SE, Galaxy A-series) */
@media (max-width: 400px) {
  .hero-portrait-card {
    max-width: 290px;
  }

  .hero-portrait-top-badge {
    top: 8px;
    right: 8px;
    font-size: 9px;
    padding: 3px 8px;
  }

  .hero-portrait-master-badge {
    top: 34px;
    right: 8px;
    left: auto;
    font-size: 9px;
    padding: 3px 8px;
  }

  .hero-portrait-glass-bar {
    bottom: 6px;
    left: 6px;
    right: 6px;
    padding: 9px 10px;
  }

  .glass-title {
    font-size: 9px;
  }

  .glass-loc {
    font-size: 9px;
  }

  .glass-sub {
    font-size: 9px;
    margin: 2px 0 4px;
  }

  .glass-stat strong {
    font-size: 11px;
  }

  .glass-stat span {
    font-size: 8.5px;
  }

  h1 {
    font-size: 30px;
  }
}

@media(prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .identity-card, .project, .expertise-card, .reveal {
    transition: none !important;
    transform: none !important;
    animation: none !important;
    opacity: 1 !important;
  }
}
