/* ==========================================
   ROOT VARIABLES & RESET
========================================== */

/* ---- LIGHT MODE (default) ---- */
:root {
  --bg:              #f8fafc;
  --bg-2:            #f1f5f9;
  --bg-card:         #ffffff;
  --border:          rgba(99, 102, 241, 0.18);
  --primary:         #6366f1;
  --secondary:       #8b5cf6;
  --accent:          #06b6d4;
  --grad:            linear-gradient(135deg, #6366f1, #8b5cf6);
  --grad-text:       linear-gradient(90deg, #6366f1, #a78bfa, #06b6d4);
  --text:            #1e293b;
  --text-muted:      #64748b;
  --font:            'Space Grotesk', sans-serif;
  --mono:            'JetBrains Mono', monospace;
  --radius:          12px;
  --radius-lg:       20px;
  --shadow:          0 8px 32px rgba(0,0,0,0.08);
  --glow:            0 0 40px rgba(99,102,241,0.18);

  /* theme-specific extras */
  --navbar-scrolled-bg: rgba(248, 250, 252, 0.92);
  --code-card-bg:       #f1f5f9;
  --hero-name-grad:     linear-gradient(135deg, #1e293b 40%, #a78bfa);
  --badge-bg:           rgba(248, 250, 252, 0.95);
  --featured-grad:      linear-gradient(135deg, #ede9fe, #f5f3ff);
  --grid-dot:           rgba(99,102,241,0.10);
}

/* ---- DARK MODE ---- */
body.dark {
  --bg:              #070710;
  --bg-2:            #0d0d1a;
  --bg-card:         #111124;
  --border:          rgba(99, 102, 241, 0.15);
  --text:            #e2e8f0;
  --text-muted:      #64748b;
  --shadow:          0 8px 32px rgba(0,0,0,0.4);
  --glow:            0 0 40px rgba(99,102,241,0.25);

  --navbar-scrolled-bg: rgba(7, 7, 16, 0.85);
  --code-card-bg:       #0d0d1a;
  --hero-name-grad:     linear-gradient(135deg, #fff 40%, #a78bfa);
  --badge-bg:           rgba(13, 13, 26, 0.9);
  --featured-grad:      linear-gradient(135deg, #111124, #0d0d1a);
  --grid-dot:           rgba(99,102,241,0.18);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background 0.35s ease, color 0.35s ease;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; }

/* ==========================================
   UTILITIES
========================================== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  letter-spacing: -0.02em;
}

section {
  padding: 7rem 0;
}

/* ==========================================
   SCROLL REVEAL ANIMATION
========================================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================
   NAVBAR
========================================== */
#navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.1rem 0;
  transition: background 0.3s, backdrop-filter 0.3s, box-shadow 0.3s;
}
#navbar.scrolled {
  background: var(--navbar-scrolled-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-logo .dot { color: var(--accent); -webkit-text-fill-color: var(--accent); }

.nav-links {
  display: flex;
  gap: 2.5rem;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--grad);
  border-radius: 2px;
  transition: width 0.3s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ==========================================
   HERO
========================================== */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 0 1.5rem;
  text-align: center;
}

/* Dot grid background */
.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

/* Glowing orbs */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}
.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99,102,241,0.25), transparent 70%);
  top: -100px;
  left: -100px;
}
.orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(139,92,246,0.2), transparent 70%);
  bottom: -80px;
  right: -80px;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-greeting {
  font-size: 1rem;
  font-family: var(--mono);
  color: var(--primary);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.hero-name {
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  background: var(--hero-name-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.6rem;
}

.hero-title {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  height: 2rem;
  font-family: var(--mono);
}
.cursor {
  animation: blink 1s step-end infinite;
  color: var(--primary);
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-tagline {
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

/* Buttons */
.btn {
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.25s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
}
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 0 20px rgba(99,102,241,0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(99,102,241,0.55);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.hero-scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  animation: bounce 1.5s ease-in-out infinite;
}
@keyframes bounce {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50% { transform: rotate(45deg) translateY(6px); }
}

/* ==========================================
   ABOUT
========================================== */
#about { background: var(--bg-2); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  font-size: 1rem;
}
.about-text strong { color: var(--text); }
.highlight {
  color: var(--primary);
  font-weight: 500;
}

.about-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.stat { text-align: center; }
.stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Profile image */
.about-visual { display: flex; justify-content: center; }

.profile-img-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-img-glow {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.35), rgba(139,92,246,0.15), transparent 70%);
  filter: blur(30px);
  z-index: 0;
}

.profile-img {
  width: 300px;
  height: 300px;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
  border: 3px solid transparent;
  background-clip: padding-box;
  box-shadow: 0 0 0 3px #6366f1, 0 0 0 6px rgba(99,102,241,0.2), var(--shadow);
  position: relative;
  z-index: 1;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.profile-img:hover {
  transform: scale(1.03);
  box-shadow: 0 0 0 3px #a78bfa, 0 0 0 8px rgba(139,92,246,0.3), var(--shadow);
}

.profile-img-badge {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--badge-bg);
  border: 1px solid rgba(99,102,241,0.4);
  border-radius: 999px;
  padding: 0.35rem 1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  z-index: 2;
  backdrop-filter: blur(10px);
}

/* Code card */

.code-card {
  background: var(--code-card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow), var(--glow);
}
.code-card-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.8rem 1.2rem;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red    { background: #ff5f57; }
.dot.yellow { background: #ffbd2e; }
.dot.green  { background: #28c840; }
.code-filename {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
}
.code-body {
  padding: 1.5rem;
  overflow-x: auto;
}
.code-body code {
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.9;
}
.c-keyword { color: #c792ea; }
.c-class   { color: #ffcb6b; }
.c-func    { color: #82aaff; }
.c-string  { color: #c3e88d; }

/* ==========================================
   EXPERIENCE
========================================== */
#experience { background: var(--bg-2); }

.exp-timeline { position: relative; padding-left: 2rem; }
.exp-line {
  position: absolute; left: 0; top: 1rem; bottom: 1rem;
  width: 3px;
  background: linear-gradient(180deg, #6366f1, #a78bfa, #06b6d4);
  border-radius: 2px;
}

.exp-card {
  background: var(--bg-card);
  border: 1px solid rgba(99,102,241,0.35);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 24px rgba(99,102,241,0.1), 0 1px 4px rgba(0,0,0,0.08);
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
}
.exp-card::before {
  content: '';
  position: absolute;
  left: -2.55rem; top: 1.75rem;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--grad);
  border: 3px solid var(--bg-2);
  box-shadow: 0 0 0 3px #6366f1;
}
.exp-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(99,102,241,0.18); }

.exp-header-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.exp-icon {
  width: 96px; height: 96px; flex-shrink: 0;
  background: var(--bg-2);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  padding: 0;
  box-shadow: 0 2px 12px rgba(99,102,241,0.1);
}
.exp-icon-img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.exp-card-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap;
}
.exp-role-badge {
  display: inline-block; font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); border: 1px solid var(--accent);
  border-radius: 20px; padding: 0.2rem 0.75rem; margin-bottom: 0.5rem;
}
.exp-role {
  font-size: 1.9rem; font-weight: 800; margin: 0 0 0.25rem;
  background: var(--grad-text);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.exp-company { font-size: 1rem; font-weight: 600; color: var(--text); margin: 0; }
.exp-division { font-size: 0.85rem; color: var(--text-muted); margin: 0.2rem 0 0; }
.exp-meta { display: flex; flex-direction: row; align-items: center; gap: 0.6rem; }
.exp-period {
  font-size: 0.85rem; font-weight: 600; color: var(--primary);
  background: rgba(99,102,241,0.1); border: 1px solid rgba(99,102,241,0.25);
  border-radius: 20px; padding: 0.3rem 0.9rem; white-space: nowrap;
}
.exp-status-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,0.25);
  animation: pulse-green 2s infinite;
}
@keyframes pulse-green {
  0%,100% { box-shadow: 0 0 0 3px rgba(34,197,94,0.25); }
  50%      { box-shadow: 0 0 0 6px rgba(34,197,94,0.1); }
}

.exp-desc { color: var(--text-muted); line-height: 1.8; margin-bottom: 1.75rem; }
.exp-sub-title {
  font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--primary); margin: 0 0 0.9rem;
}

.exp-responsibilities { margin-bottom: 1.75rem; }
.exp-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.exp-list li {
  padding-left: 1.4rem; position: relative;
  color: var(--text-muted); font-size: 0.9rem; line-height: 1.65;
}
.exp-list li::before {
  content: '▸'; position: absolute; left: 0;
  color: var(--primary); font-size: 0.8rem; top: 0.1rem;
}

.exp-highlight {
  background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(6,182,212,0.08));
  border: 1px solid rgba(99,102,241,0.3);
  border-radius: 12px; padding: 1.25rem 1.5rem; margin-bottom: 1.75rem;
}
.exp-highlight-badge {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  color: #a78bfa; border: 1px solid rgba(167,139,250,0.35);
  border-radius: 20px; padding: 0.2rem 0.7rem; display: inline-block; margin-bottom: 0.6rem;
}
.exp-highlight-title { font-size: 1.1rem; font-weight: 700; color: var(--text); margin: 0 0 0.6rem; }
.exp-highlight-desc { color: var(--text-muted); font-size: 0.88rem; line-height: 1.75; margin: 0; }

.exp-dashboard { margin-bottom: 1.75rem; }
.exp-dashboard-inner {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(6,182,212,0.08));
  border: 1px solid rgba(99,102,241,0.3); border-radius: 14px; padding: 1.5rem;
}
.exp-dashboard-info { flex: 1; min-width: 0; }
.exp-dashboard-desc { color: var(--text-muted); font-size: 0.88rem; line-height: 1.75; margin: 0.5rem 0 1rem; }
.exp-dashboard-stack { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.exp-dashboard-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.65rem 1.4rem; background: var(--grad); color: #fff;
  border-radius: 30px; font-size: 0.88rem; font-weight: 700;
  text-decoration: none; white-space: nowrap; align-self: center;
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 18px rgba(99,102,241,0.35);
}
.exp-dashboard-btn:hover { opacity: 0.9; transform: translateY(-2px); box-shadow: 0 8px 28px rgba(99,102,241,0.45); }

.exp-gallery { margin-bottom: 1.75rem; }
.exp-gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.exp-gallery-item {
  border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(99,102,241,0.3);
  box-shadow: 0 6px 24px rgba(0,0,0,0.4), 0 0 0 1px rgba(99,102,241,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex; flex-direction: column;
}
.exp-gallery-item:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(99,102,241,0.25); }
.exp-gallery-img { width: 100%; height: auto; display: block; transition: transform 0.4s; }
.exp-gallery-item:hover .exp-gallery-img { transform: scale(1.02); }
.exp-gallery-caption {
  display: block; text-align: center; font-size: 0.75rem;
  color: var(--text-muted); padding: 0.45rem 0.5rem; background: var(--bg-card);
}

.exp-skills { margin-bottom: 0.5rem; }
.exp-skills-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.exp-skill-badge {
  font-size: 0.78rem; font-weight: 600; padding: 0.35rem 0.85rem;
  border-radius: 20px; background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.25); color: var(--primary);
  transition: background 0.2s, transform 0.2s; cursor: default;
}
.exp-skill-badge:hover { background: rgba(99,102,241,0.2); transform: translateY(-2px); }

@media (max-width: 768px) {
  .exp-timeline { padding-left: 1.25rem; }
  .exp-card { padding: 1.25rem; }
  .exp-gallery-grid { grid-template-columns: 1fr; }
  .exp-card-header { flex-direction: column; }
  .exp-meta { align-items: flex-start; }

  .exp-dashboard-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
    padding: 1.25rem;
  }
  .exp-dashboard-btn {
    display: flex;
    justify-content: center;
    width: 100%;
    text-align: center;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
  }
  .exp-highlight-title { font-size: 1rem; }
  .exp-dashboard-desc { font-size: 0.85rem; }
}

/* ==========================================
   EDUCATION
========================================== */
#education { background: var(--bg-2); }

.edu-card {
  display: flex;
  gap: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  max-width: 860px;
  margin: 0 auto;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.edu-card:hover {
  border-color: var(--primary);
  box-shadow: var(--glow);
}

.edu-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.edu-icon {
  font-size: 2rem;
  width: 96px;
  height: 96px;
  background: var(--bg-2);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 8px;
  box-shadow: 0 2px 12px rgba(99,102,241,0.1);
  flex-shrink: 0;
}
.edu-logo {
  width: 100%; height: 100%;
  object-fit: contain;
}
.edu-line {
  width: 2px;
  flex: 1;
  background: linear-gradient(to bottom, rgba(99,102,241,0.4), transparent);
  border-radius: 2px;
}

.edu-right { flex: 1; }

.edu-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.edu-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}
.edu-university {
  font-size: 0.9rem;
  color: var(--primary);
  margin-top: 0.2rem;
  font-weight: 500;
}
.edu-date {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--primary);
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.2);
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
  height: fit-content;
}

.edu-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.edu-courses {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.edu-course {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.course-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.course-grade {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: #4ade80;
  background: rgba(74,222,128,0.08);
  border: 1px solid rgba(74,222,128,0.2);
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-weight: 600;
}
.course-grade:empty { display: none; }
.course-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.edu-extra-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }

@media (max-width: 600px) {
  .edu-card { flex-direction: column; }
  .edu-line { display: none; }
  .edu-header { flex-direction: column; }
}

/* ==========================================
   MILITARY SERVICE
========================================== */
#military { background: var(--bg); }

.military-card {
  display: flex;
  gap: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  max-width: 820px;
  margin: 0 auto;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.military-card:hover {
  border-color: var(--primary);
  box-shadow: var(--glow);
}

.military-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.military-icon {
  font-size: 2rem;
  width: 52px;
  height: 52px;
  background: rgba(99,102,241,0.12);
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.military-line {
  width: 2px;
  flex: 1;
  background: linear-gradient(to bottom, rgba(99,102,241,0.4), transparent);
  border-radius: 2px;
}

.military-right { flex: 1; }

.military-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}
.military-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}
.military-date {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--primary);
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.2);
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
}

.military-bullets {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}
.military-bullets li {
  display: flex;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.bullet-dot {
  width: 8px;
  height: 8px;
  background: var(--grad);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.45rem;
  background: var(--primary);
}

.military-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.military-photo-wrapper {
  margin-top: 1.5rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  max-width: 220px;
  margin-left: auto;
  margin-right: auto;
}
.military-photo-wrapper:hover {
  transform: scale(1.01);
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}
.military-photo {
  width: 100%;
  display: block;
  object-fit: cover;
  max-height: 160px;
}

@media (max-width: 600px) {
  .military-card { flex-direction: column; }
  .military-line { display: none; }
  .military-header { flex-direction: column; }
}

/* ==========================================
   SKILLS
========================================== */
#skills { background: var(--bg); }

/* ── Skill Sphere ── */
.sphere-wrap {
  position: relative;
  width: 100%;
  height: 440px;
  margin-bottom: 3rem;
  overflow: visible;
}
.sphere-glow {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 480px; height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.18) 0%, rgba(168,85,247,0.08) 50%, transparent 70%);
  pointer-events: none;
  animation: sphere-pulse 4s ease-in-out infinite;
}
@keyframes sphere-pulse {
  0%,100% { transform: scale(1); opacity: 0.8; }
  50%      { transform: scale(1.08); opacity: 1; }
}
.sphere-canvas {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 420px; height: 420px;
  pointer-events: none;
}
.sphere-container {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 420px; height: 420px;
  cursor: grab;
}
.sphere-container:active { cursor: grabbing; }
.sphere-item {
  position: absolute;
  top: 50%; left: 50%;
  display: flex; flex-direction: column; align-items: center;
  gap: 5px;
  pointer-events: none;
  will-change: transform, opacity;
  transform-origin: center center;
}
.sphere-item i   { font-size: 2rem; line-height: 1; display: block; }
.sphere-item span {
  font-size: 0.65rem; font-weight: 700;
  color: var(--text-muted); white-space: nowrap;
  text-align: center;
}

/* ── Skills V2 ── */
.skills-v2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.skill-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.skill-block:hover {
  border-color: rgba(99,102,241,0.4);
  box-shadow: 0 4px 24px rgba(99,102,241,0.08);
}

.skill-block-hdr {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 1.4rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.skill-block-hdr h3 { font-size: 1.25rem; font-weight: 800; color: var(--text); letter-spacing: 0.04em; text-transform: uppercase; }

.skill-icons-grid {
  display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center;
}

/* Icon card — for branded skills */
.ski {
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  padding: 0.9rem 0.85rem;
  min-width: 70px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: default;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.ski:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(99,102,241,0.18);
  border-color: rgba(99,102,241,0.45);
}
.ski i { font-size: 2.2rem; line-height: 1; }
.ski-brand img { width: 2.2rem; height: 2.2rem; object-fit: contain; }
.ski-svg { width: 2.2rem; height: 2.2rem; color: #a8b4f8; }
.ski-logo-img { width: 2.2rem; height: 2.2rem; object-fit: contain; border-radius: 6px; }
.ski-logo-dark-bg { background: #1a1a1a; padding: 4px; border-radius: 8px; filter: brightness(1.1); }
.ski-mcp { background: rgba(0,0,0,0.05); }
.ski-monogram {
  width: 2.4rem; height: 2.4rem;
  border-radius: 8px;
  color: #fff;
  font-size: 0.55rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  display: flex; align-items: center; justify-content: center;
}
.ski span {
  font-size: 0.7rem; font-weight: 600;
  color: var(--text-muted); text-align: center; white-space: nowrap;
}

/* Dark mode fix for monochrome icons */
.dark .ski-dark i { filter: invert(1) brightness(1.8); }

/* Sub-group labels inside a skill block */
.ski-group-label {
  width: 100%;
  font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-top: 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--border);
}
.ski-group-label:first-child { margin-top: 0; }
.ski-group-row {
  width: 100%;
  display: flex; flex-wrap: wrap; gap: 0.75rem;
}

/* Text pill — for abstract/no-brand skills */
.ski-pill {
  display: inline-flex; align-items: center;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.2);
  font-size: 0.82rem; font-weight: 600; color: var(--text);
  transition: all 0.2s; cursor: default;
}
.ski-pill:hover {
  background: rgba(99,102,241,0.18);
  border-color: rgba(99,102,241,0.5);
  color: #a78bfa;
}

.skill-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  padding: 0.3rem 0.85rem;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 999px;
  font-size: 0.8rem;
  color: #a78bfa;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}
.tag:hover {
  background: rgba(99,102,241,0.25);
  color: #fff;
}

/* ==========================================
   PROJECTS
========================================== */
#projects { background: var(--bg-2); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* ---- Winner / Hackathon card ---- */
.project-card.winner {
  grid-column: 1 / -1;
  padding: 0;
  gap: 0;
  border-color: rgba(212, 175, 55, 0.5);
  background: linear-gradient(135deg, rgba(212,175,55,0.06) 0%, var(--bg-card) 60%);
  overflow: hidden;
}
body.dark .project-card.winner {
  background: linear-gradient(135deg, rgba(212,175,55,0.07) 0%, #0d0d1a 60%);
}
.project-card.winner:hover {
  border-color: rgba(212,175,55,0.85);
  box-shadow: 0 0 50px rgba(212,175,55,0.18), var(--shadow);
}

.winner-award-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 2rem;
  background: linear-gradient(90deg, rgba(212,175,55,0.18), rgba(255,215,0,0.06), rgba(212,175,55,0.18));
  border-bottom: 1px solid rgba(212,175,55,0.28);
  font-size: 0.8rem;
  font-weight: 600;
  color: #b8922a;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
body.dark .winner-award-banner { color: #e6b84a; }

.winner-trophy { font-size: 1.25rem; }

.winner-prize {
  margin-left: auto;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.85rem;
  background: linear-gradient(90deg, #d4af37, #ffd700);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.winner-inner {
  display: grid;
  grid-template-columns: 260px 1fr;
}

.winner-left {
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  border-right: 1px solid rgba(212,175,55,0.2);
}

.winner-logo {
  width: 150px;
  height: 150px;
  object-fit: contain;
  border-radius: 16px;
  background: #fff;
  padding: 10px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
  border: 1px solid rgba(212,175,55,0.25);
}

.winner-photos {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.winner-photo {
  width: 100%;
  height: 90px;
  object-fit: cover;
  object-position: center top;
  border-radius: 10px;
  border: 1px solid rgba(212,175,55,0.2);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}
.winner-photo:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 20px rgba(212,175,55,0.2);
}

.winner-right {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.winner-title {
  font-size: 1.6rem !important;
  background: linear-gradient(135deg, var(--text) 30%, #c9a227);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
body.dark .winner-title {
  background: linear-gradient(135deg, #fff 30%, #ffd700);
  -webkit-background-clip: text;
  background-clip: text;
}

.winner-subtitle {
  font-size: 0.85rem;
  color: #b8922a;
  font-weight: 500;
  margin-top: -0.5rem;
  direction: rtl;
}
body.dark .winner-subtitle { color: #e6b84a; }

.winner-desc {
  font-size: 0.9rem !important;
  line-height: 1.75 !important;
}

@media (max-width: 768px) {
  .winner-inner { grid-template-columns: 1fr; }
  .winner-left {
    border-right: none;
    border-bottom: 1px solid rgba(212,175,55,0.2);
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  .winner-photos {
    flex-direction: row;
    flex: 1;
    min-width: 200px;
  }
  .winner-photo { height: 80px; }
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  overflow: hidden;
}
.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad);
  opacity: 0;
  transition: opacity 0.3s;
  border-radius: var(--radius-lg);
  z-index: 0;
}
.project-card:hover {
  border-color: var(--primary);
  transform: translateY(-6px);
  box-shadow: var(--shadow), var(--glow);
}
.project-card > * { position: relative; z-index: 1; }

/* ---- LevBoots Brain — semi-featured card ---- */
/* ── Agentic Hire ── */
.project-card.agentic-featured {
  grid-column: 1 / -1;
  padding: 2rem 2.25rem;
  position: relative;
  border-color: rgba(99,102,241,0.45);
  background: linear-gradient(135deg, rgba(99,102,241,0.07) 0%, rgba(168,85,247,0.07) 100%);
}
.project-card.agentic-featured:hover { border-color: rgba(99,102,241,0.8); }
.agentic-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}
.agentic-links-pin {
  position: absolute;
  top: 1.75rem; right: 2.25rem;
  display: flex; gap: 0.5rem;
  z-index: 2;
}
.agentic-header {
  margin-bottom: 1.5rem;
}
.agentic-title {
  font-size: 1.6rem; font-weight: 800;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.agentic-subtitle { font-size: 0.9rem; color: var(--text-muted); font-weight: 500; }
.agentic-agents {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0.75rem; margin-bottom: 1.25rem;
}
.agent-badge {
  display: flex; align-items: center; gap: 0.75rem;
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 12px; padding: 0.75rem 1rem;
  transition: background 0.2s, border-color 0.2s;
}
.agent-badge:hover { background: rgba(99,102,241,0.15); border-color: rgba(99,102,241,0.4); }
.agent-icon { font-size: 1.3rem; flex-shrink: 0; }
.agent-label { font-size: 0.82rem; font-weight: 700; color: var(--text); }
.agent-desc  { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.agentic-desc { font-size: 0.95rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 1.25rem; }
.agentic-right { display: flex; flex-direction: column; gap: 0.75rem; padding-top: 3.5rem; }
.agentic-video-title { font-size: 0.9rem; font-weight: 700; color: var(--text-muted); display: flex; align-items: center; gap: 0.4rem; }
.vid-title-icon { width: 1rem; height: 1rem; flex-shrink: 0; opacity: 0.75; }

/* Testimonials */
.rc-thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-top: 0.25rem; }
.rc-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  border: 1px solid var(--border);
  max-height: 180px;
}
.rc-card img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.rc-blur {
  position: absolute;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 3px;
}
.agentic-video-wrap {
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 8px 32px rgba(99,102,241,0.2);
  border: 1px solid rgba(99,102,241,0.2);
}
.agentic-video { width: 100%; display: block; border-radius: 14px; }

.project-card.lev-featured {
  grid-column: 1 / -1;
  padding: 2rem 2.25rem;
  border-color: rgba(6,182,212,0.45);
  background: linear-gradient(135deg, rgba(6,182,212,0.07) 0%, rgba(99,102,241,0.07) 100%);
}
.project-card.lev-featured:hover {
  border-color: rgba(6,182,212,0.8);
  box-shadow: 0 0 40px rgba(6,182,212,0.12), var(--shadow);
}
.lev-inner {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2.5rem;
  align-items: start;
}
.lev-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.lev-title { font-size: 1.5rem !important; }
.lev-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0.15rem 0 0;
  font-style: italic;
}

/* concept badges row */
.lev-concept-badges {
  display: flex;
  gap: 0.9rem;
  margin-bottom: 1.4rem;
  flex-wrap: wrap;
}
.lev-concept-badge {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  flex: 1;
  min-width: 160px;
  border: 1px solid transparent;
}
.lev-badge-rag   { background: rgba(99,102,241,0.12); border-color: rgba(99,102,241,0.3); }
.lev-badge-mcp   { background: rgba(6,182,212,0.12);  border-color: rgba(6,182,212,0.3); }
.lev-badge-agent { background: rgba(16,185,129,0.1);  border-color: rgba(16,185,129,0.3); }
.lev-badge-icon { font-size: 1.25rem; line-height: 1; margin-top: 2px; display: flex; align-items: center; justify-content: center; }
.lev-badge-icon svg { opacity: 0.85; }
.lev-badge-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}
.lev-badge-desc { font-size: 0.76rem; color: var(--text-muted); line-height: 1.4; }

.lev-desc { font-size: 0.9rem; margin-bottom: 1.25rem; }

/* right: video placeholder */
.lev-right {
  display: flex;
  align-items: center;
  justify-content: center;
}
.yt-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0,0,0,0.25);
}
.yt-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.lev-videos {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}
.lev-video-item { display: flex; flex-direction: column; gap: 0.4rem; }
.lev-video-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.lev-video {
  width: 100%;
  border-radius: 10px;
  background: #000;
  display: block;
  box-shadow: 0 4px 18px rgba(0,0,0,0.25);
}

@media (max-width: 768px) {
  .lev-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .project-card.lev-featured { padding: 1.5rem; }
  .lev-concept-badge { min-width: 100%; }
  .lev-title { font-size: 1.25rem !important; }
}

.project-card.featured {
  border-color: rgba(99,102,241,0.4);
  background: var(--featured-grad);
}

.project-badge {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: var(--grad);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  z-index: 2;
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.project-icon { font-size: 2rem; }

.project-links { display: flex; gap: 0.75rem; }
.project-link {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all 0.2s;
}
.project-link:hover {
  color: white;
  border-color: var(--primary);
  background: rgba(99,102,241,0.15);
}
.project-link svg { width: 18px; height: 18px; }

.project-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}
.project-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
  flex: 1;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tech-tag {
  padding: 0.25rem 0.7rem;
  background: rgba(6,182,212,0.08);
  border: 1px solid rgba(6,182,212,0.2);
  border-radius: 999px;
  font-size: 0.75rem;
  font-family: var(--mono);
  color: var(--accent);
}

/* ── Project tech two-row layout ── */
.project-tech { display: flex; flex-direction: column; gap: 0.5rem; }
.pt-icons { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.pt-ski {
  display: flex; align-items: center; gap: 0.3rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
}
.pt-ski i { font-size: 1.05rem; line-height: 1; }
.pt-ski span { font-size: 0.62rem; font-weight: 600; color: var(--text); white-space: nowrap; }
.pt-pills { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.dark .pt-ski-dark i { filter: invert(1) brightness(1.8); }

/* ==========================================
   CERTIFICATIONS
========================================== */
#certifications { background: var(--bg-2); }

.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  position: relative;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.cert-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--glow);
}
.cert-card.featured {
  border-color: rgba(99,102,241,0.4);
  background: var(--featured-grad);
}

.cert-badge {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: var(--grad);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
}

.cert-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.cert-icon {
  font-size: 1.6rem;
  width: 52px;
  height: 52px;
  background: rgba(99,102,241,0.12);
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cert-meta { flex: 1; }
.cert-meta h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  padding-right: 3.5rem;
}
.cert-issuer {
  font-size: 0.82rem;
  color: var(--primary);
  margin-top: 0.25rem;
  font-weight: 500;
}

.cert-date {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--primary);
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.2);
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
  height: fit-content;
  flex-shrink: 0;
}

.cert-desc {
  font-size: 0.87rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.cert-img-wrapper {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(99,102,241,0.2);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  transition: transform 0.3s, box-shadow 0.3s;
}
.cert-img-wrapper:hover {
  transform: scale(1.015);
  box-shadow: 0 8px 32px rgba(99,102,241,0.25);
}
.cert-img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.cert-skills { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.cert-img-placeholder {
  width: 100%;
  min-height: 160px;
  border-radius: 10px;
  border: 1px solid rgba(99,102,241,0.2);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: transform 0.3s, box-shadow 0.3s;
}
.cert-img-placeholder:hover {
  transform: scale(1.015);
  box-shadow: 0 8px 32px rgba(99,102,241,0.25);
}
.cert-img-placeholder .placeholder-icon {
  font-size: 3rem;
}
.cert-img-placeholder .placeholder-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #ff9900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 600px) {
  .certs-grid { grid-template-columns: 1fr; }
  .cert-header { flex-wrap: wrap; }
  .cert-date { align-self: flex-start; }
}

/* ==========================================
   CONTACT
========================================== */
#contact { background: var(--bg); }

.contact-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 3rem;
  font-size: 1rem;
}

.contact-cards {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  min-width: 240px;
  transition: all 0.3s;
}
.contact-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--glow);
}
.contact-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(99,102,241,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--primary);
}
.contact-icon svg { width: 22px; height: 22px; }
.contact-card h4 { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.contact-card p  { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.1rem; }

.contact-card.contact-icon-only {
  min-width: unset;
  width: 88px;
  height: auto;
  padding: 1.1rem 0.5rem 0.8rem;
  flex-direction: column;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  border-radius: 20px;
  cursor: pointer;
}
.contact-card.contact-icon-only .contact-icon {
  width: 48px;
  height: 48px;
  background: rgba(99,102,241,0.12);
  border-radius: 12px;
}
.contact-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ==========================================
   FOOTER
========================================== */
footer {
  padding: 2rem;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ==========================================
   SCROLL TO TOP BUTTON
========================================== */
#scrollTop {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--grad);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 20px rgba(99,102,241,0.4);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 999;
}
#scrollTop.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
#scrollTop:hover { transform: translateY(-3px); }
#scrollTop svg { width: 20px; height: 20px; }

/* ==========================================
   WINNER VIDEO
========================================== */
.winner-video-wrapper {
  margin-top: 1.25rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(212,175,55,0.25);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.winner-video {
  width: 100%; display: block; max-height: 340px; background: #000;
}

/* ==========================================
   LIGHTBOX
========================================== */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.92);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 1.5rem; backdrop-filter: blur(6px);
}
.lightbox.active { opacity: 1; pointer-events: all; }
.lightbox-img {
  max-width: 92vw; max-height: 88vh;
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7), 0 0 0 1px rgba(99,102,241,0.3);
  transform: scale(0.92); transition: transform 0.3s ease;
  object-fit: contain; display: block;
}
.lightbox.active .lightbox-img { transform: scale(1); }
.lightbox-close {
  position: fixed; top: 1.25rem; right: 1.5rem;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  color: #fff; font-size: 1.8rem; line-height: 1;
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, transform 0.2s; z-index: 10000;
}
.lightbox-close:hover { background: rgba(99,102,241,0.35); transform: rotate(90deg); }
img:not(.lightbox-img) { cursor: zoom-in; }

/* ==========================================
   MOBILE NAV MENU
========================================== */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 320px;
    height: 100vh;
    background: var(--bg-2);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    font-size: 1.1rem;
    transition: right 0.35s ease;
    border-left: 1px solid var(--border);
  }
  .nav-links.open { right: 0; }

  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-visual { order: -1; }
  .code-card { max-width: 100%; }

  .projects-grid { grid-template-columns: 1fr; }
  .contact-cards { flex-direction: row; flex-wrap: nowrap; justify-content: center; gap: 1.2rem; }
  .contact-card { width: 100%; max-width: 380px; }
  .contact-card.contact-icon-only { width: 96px; max-width: 96px; padding: 1.2rem 0.5rem 0.9rem; }
  .contact-card.contact-icon-only .contact-icon { width: 52px; height: 52px; border-radius: 14px; }
  .contact-card.contact-icon-only .contact-icon svg { width: 26px; height: 26px; }
  .contact-label { font-size: 0.72rem; }

  /* Skills sphere — shrink for mobile */
  .sphere-wrap { height: 300px; }
  .sphere-canvas { width: 280px; height: 280px; }
  .sphere-container { width: 280px; height: 280px; }
  .sphere-glow { width: 260px; height: 260px; }

  /* Skills grid — 2 columns on mobile, compact, no row-stretch */
  .skills-v2 { grid-template-columns: 1fr 1fr; gap: 0.6rem; align-items: start; }
  .skill-block { padding: 0.7rem 0.6rem; }
  .skill-block-hdr { margin-bottom: 0.55rem; padding-bottom: 0.45rem; }
  .skill-block-hdr h3 { font-size: 0.75rem; }
  .skill-icons-grid { gap: 0.3rem; }
  .ski-group-row { gap: 0.3rem; }
  .ski-group-label { font-size: 0.58rem; }
  .ski { min-width: 42px; max-width: 56px; flex: 1 1 42px; padding: 0.4rem 0.3rem; border-radius: 10px; }
  .ski i { font-size: 1.25rem; }
  .ski span { font-size: 0.48rem; }
  .ski-svg { width: 1.25rem; height: 1.25rem; }
  .ski-logo-img { width: 1.25rem; height: 1.25rem; }

  /* Agentic Hire — single column on mobile */
  .agentic-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .project-card.agentic-featured { padding: 1.5rem; }
  .agentic-title { font-size: 1.25rem !important; }
  .agentic-right { padding-top: 0; }
  .agentic-video-wrap { max-height: 260px; }
  .agentic-video { max-height: 260px; }
  .rc-thumbs { grid-template-columns: 1fr 1fr; }
  .rc-card { max-height: 140px; }

  /* Winner card already has breakpoint, ensure video scales */
  .winner-video { max-height: 220px; }

  /* Hero text */
  .hero-name { font-size: clamp(2rem, 10vw, 3.5rem); }
}

/* ==========================================
   STAGGERED REVEAL DELAYS
========================================== */
.reveal:nth-child(1) { transition-delay: 0.05s; }
.reveal:nth-child(2) { transition-delay: 0.12s; }
.reveal:nth-child(3) { transition-delay: 0.19s; }
.reveal:nth-child(4) { transition-delay: 0.26s; }
.reveal:nth-child(5) { transition-delay: 0.33s; }
.reveal:nth-child(6) { transition-delay: 0.40s; }

/* ==========================================
   THEME TOGGLE BUTTON
========================================== */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.theme-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(99,102,241,0.2);
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
  transition: opacity 0.2s, transform 0.3s;
}

/* Show moon in light mode, sun in dark mode */
.icon-sun  { display: none; }
.icon-moon { display: block; }
body.dark .icon-sun  { display: block; }
body.dark .icon-moon { display: none; }

/* ==========================================
   GRAIN TEXTURE OVERLAY
========================================== */
#grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9990;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 300px 300px;
}

/* Videos — force GPU layer, fix Chrome compositing */
.lev-video, .winner-video {
  position: relative;
  z-index: 10;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* ==========================================
   HERO PARTICLES CANVAS
========================================== */
#hero-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ==========================================
   TIMELINE DRAW ANIMATION
========================================== */
.exp-line {
  transform-origin: top center;
  transform: scaleY(0);
  transition: transform 1.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.exp-line.drawn { transform: scaleY(1); }

#cursor-dot, #cursor-ring { display: none; }

/* ==========================================
   SCROLL PROGRESS BAR
========================================== */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--grad);
  z-index: 10001;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 10px rgba(99,102,241,0.5);
  transition: width 0.08s linear;
}

/* ==========================================
   HERO NAME — animated gradient
========================================== */
@keyframes nameGradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.hero-name {
  background-size: 200% auto !important;
  animation: nameGradientShift 5s ease infinite;
}

/* ==========================================
   SECTION TITLE — animated underline on scroll-in
========================================== */
.section-title::after {
  content: '';
  display: block;
  width: 0;
  height: 3px;
  background: var(--grad);
  border-radius: 2px;
  margin: 0.6rem auto 0;
  transition: width 0.8s ease 0.3s;
}
.section-title.visible::after { width: 60px; }

/* ==========================================
   SPOTLIGHT (dark mode)
========================================== */
#spotlight {
  position: fixed;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 65%);
  opacity: 0;
  transition: opacity 0.4s;
}
body.dark #spotlight { opacity: 1; }

/* ==========================================
   CARD SHINE SWEEP
========================================== */
.project-card::after,
.cert-card::after,
.skill-category::after {
  content: '';
  position: absolute;
  top: 0;
  left: -80%;
  width: 55%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.055), transparent);
  transform: skewX(-18deg);
  pointer-events: none;
  z-index: 3;
  transition: left 0s;
}
.project-card:hover::after,
.cert-card:hover::after,
.skill-category:hover::after {
  left: 140%;
  transition: left 0.65s ease;
}

/* ==========================================
   CONTACT TOOLTIPS
========================================== */
.contact-card.contact-icon-only { position: relative; }
.contact-card.contact-icon-only::before {
  content: attr(aria-label);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.28rem 0.65rem;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  z-index: 10;
}
.contact-card.contact-icon-only:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================
   WINNER BANNER — clickable hint
========================================== */
.winner-award-banner { cursor: pointer; user-select: none; }
.winner-award-banner:hover { filter: brightness(1.1); }

/* ==========================================
   PROFILE IMAGE TILT
========================================== */
.profile-img-wrapper {
  transition: transform 0.15s ease;
  transform-style: preserve-3d;
}

/* ==========================================
   ACTIVE NAV LINK
========================================== */
.nav-links a.nav-active {
  color: var(--text) !important;
}
.nav-links a.nav-active::after { width: 100%; }

/* Smooth background/color transitions for theme switching */
/* Applied on bg-card elements so cards don't flash */
.skill-category, .project-card, .contact-card, .cert-card,
.edu-card, .military-card, .code-card, footer,
#navbar, .nav-links, .profile-img-badge {
  transition: background-color 0.35s ease, border-color 0.35s ease,
              color 0.2s ease, box-shadow 0.35s ease;
}
