/* ============================================================
   style.premium2.css — FAANG-Level Design System Upgrade
   High-performance, accessible, responsive, dark-mode-first
   ============================================================ */

/* ─── Design Tokens ───────────────────────────────────────── */
:root {
  --pp-bg-0: #06090f;
  --pp-bg-1: #080d18;
  --pp-bg-card: rgba(14, 22, 38, 0.75);
  --pp-bg-card-elevated: rgba(18, 28, 48, 0.85);
  --pp-bg-glass: rgba(255, 255, 255, 0.03);
  --pp-bg-glass-hover: rgba(255, 255, 255, 0.06);

  /* Primary Accent Palette */
  --pp-blue: #5ba8ff;
  --pp-blue-strong: #3b82f6;
  --pp-cyan: #38bdf8;
  --pp-emerald: #34d399;
  --pp-violet: #a78bfa;
  --pp-purple: #8b5cf6;
  --pp-amber: #fbbf24;
  --pp-gold: #f59e0b;
  --pp-rose: #fb7185;

  /* Borders & Shadows */
  --pp-border: rgba(255, 255, 255, 0.08);
  --pp-border-hover: rgba(91, 168, 255, 0.35);
  --pp-border-focus: rgba(56, 189, 248, 0.5);
  
  --pp-shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
  --pp-shadow-md: 0 12px 32px rgba(0, 0, 0, 0.35);
  --pp-shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.45);
  --pp-shadow-glow: 0 0 32px rgba(91, 168, 255, 0.12);

  /* Easing curves */
  --pp-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --pp-ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Radius scale */
  --pp-radius-sm: 0.5rem;
  --pp-radius-md: 0.85rem;
  --pp-radius-lg: 1.25rem;
  --pp-radius-xl: 1.75rem;
  --pp-radius-circle: 50%;
}

/* ─── Base Overrides ──────────────────────────────────────── */
html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(ellipse 120% 70% at 10% -5%, rgba(59, 130, 246, 0.14), transparent 50%),
    radial-gradient(ellipse 100% 60% at 90% 12%, rgba(139, 92, 246, 0.1), transparent 45%),
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(15, 23, 42, 0.4), transparent 50%),
    var(--pp-bg-1);
  background-attachment: fixed;
  overflow-x: clip;
}

body::before {
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 0%, transparent 80%);
}

/* ─── Typography & Heading Polish ─────────────────────────── */
h1, h2, h3, h4 {
  letter-spacing: -0.035em;
  font-weight: 800;
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--pp-blue);
}

/* ─── Badges ──────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 99rem;
  text-transform: uppercase;
}

.badge-blue {
  background: rgba(59, 130, 246, 0.14);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-purple {
  background: rgba(139, 92, 246, 0.14);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.badge-cyan {
  background: rgba(6, 182, 212, 0.14);
  color: #67e8f9;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-gold {
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* ─── Navbar Polish ───────────────────────────────────────── */
.navbar {
  transition: background 300ms var(--pp-ease),
              box-shadow 300ms var(--pp-ease),
              border-color 300ms var(--pp-ease),
              backdrop-filter 300ms var(--pp-ease);
}

.navbar.is-scrolled {
  background: rgba(8, 13, 24, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

.desktop-nav a {
  position: relative;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0.5rem 0.85rem;
  border-radius: var(--pp-radius-sm);
  transition: color 200ms ease, background 200ms ease;
}

.desktop-nav a:hover {
  color: var(--text);
  background: var(--pp-bg-glass-hover);
}

.desktop-nav a.active {
  color: var(--pp-blue);
  background: rgba(59, 130, 246, 0.08);
}

.desktop-nav a.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1rem;
  height: 2px;
  background: var(--pp-blue);
  border-radius: 99rem;
}

/* Resume Buttons */
.btn-resume-premium {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  border: none;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 240ms var(--pp-ease), box-shadow 240ms var(--pp-ease), filter 240ms ease;
}

.btn-resume-premium:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-resume-text {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.4rem;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(124, 58, 237, 0.15));
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: var(--pp-radius-md);
  color: #93c5fd;
  font-weight: 700;
  font-size: 0.92rem;
  transition: transform 220ms var(--pp-ease), border-color 220ms ease, background 220ms ease, color 220ms ease;
}

.btn-resume-text:hover {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25), rgba(124, 58, 237, 0.25));
  border-color: rgba(91, 168, 255, 0.6);
  color: #ffffff;
  transform: translateY(-2px);
}

/* ─── Hero Section & Circular Profile Frame ───────────────── */
.hero-orb-one {
  background: radial-gradient(circle, rgba(59, 130, 246, 0.35), transparent 70%);
  animation: float-orb-one 18s ease-in-out infinite alternate;
}

.hero-orb-two {
  background: radial-gradient(circle, rgba(139, 92, 246, 0.25), transparent 70%);
  animation: float-orb-two 22s ease-in-out infinite alternate;
}

@keyframes float-orb-one {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(60px, 40px) scale(1.15); }
}

@keyframes float-orb-two {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-50px, -30px) scale(1.1); }
}

.hero-portrait {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* CIRCULAR PROFILE PHOTO FRAME */
.portrait-frame.portrait-circle {
  width: min(300px, 72vw);
  height: min(300px, 72vw);
  aspect-ratio: 1 / 1;
  border-radius: var(--pp-radius-circle);
  overflow: hidden;
  border: 2px solid rgba(91, 168, 255, 0.35);
  box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.12),
              0 24px 64px rgba(0, 0, 0, 0.55),
              0 0 48px rgba(59, 130, 246, 0.2);
  transition: transform 500ms var(--pp-ease), border-color 500ms ease, box-shadow 500ms ease;
}

.portrait-frame.portrait-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero-portrait:hover .portrait-frame.portrait-circle {
  transform: scale(1.02);
  border-color: rgba(91, 168, 255, 0.6);
  box-shadow: 0 0 0 10px rgba(59, 130, 246, 0.2),
              0 32px 80px rgba(0, 0, 0, 0.65),
              0 0 60px rgba(59, 130, 246, 0.3);
}

.floating-card {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  animation: hover-card 6s ease-in-out infinite alternate;
}

.education-card-mini {
  animation-delay: 2.5s;
}

@keyframes hover-card {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

/* ─── Proof Metrics Bar (Aligned With Full Portfolio, 6 Boxes) ─── */
.proof-section {
  padding: 2rem 0;
  background: rgba(12, 18, 32, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.85rem;
  width: 100%;
  box-sizing: border-box;
  background: transparent !important;
}

.proof-item {
  min-height: 6.8rem;
  padding: 1.1rem 0.85rem;
  border-radius: var(--pp-radius-md);
  border: 1px solid rgba(255, 255, 255, 0.065);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.008));
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
  transition: transform 240ms var(--pp-ease), background 240ms ease, border-color 240ms ease;
}

.proof-item:hover {
  background: rgba(255, 255, 255, 0.055);
  transform: translateY(-2px);
  border-color: rgba(91, 168, 255, 0.35);
}

.proof-item.highlight-proof {
  border-color: rgba(59, 130, 246, 0.4);
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.1), rgba(255, 255, 255, 0.015));
}

.proof-item strong {
  font-size: clamp(1.35rem, 1.75vw, 1.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: linear-gradient(135deg, #ffffff 40%, var(--pp-blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.25rem;
}

.proof-item span {
  display: block;
  max-width: none;
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.38;
}

/* ─── Projects Section (Contained Grid Architecture) ──────── */
.tier-label {
  margin: 2.5rem 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.tier-label p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

/* TIER 1: FEATURED CARDS (2-COLUMN BOUNDED GRID) */
.tier1-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.featured-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.25rem;
  border-radius: var(--pp-radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: linear-gradient(145deg, rgba(20, 32, 56, 0.75), rgba(10, 16, 30, 0.9));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  transition: transform 300ms var(--pp-ease), border-color 300ms ease, box-shadow 300ms ease;
}

.featured-card:hover {
  transform: translateY(-5px);
  border-color: rgba(91, 168, 255, 0.35);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.5), 0 0 32px rgba(59, 130, 246, 0.12);
}

.featured-card h3 {
  font-size: 1.45rem;
  margin: 0.85rem 0 0.6rem;
  line-height: 1.25;
}

.featured-card-desc {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 1.4rem;
}

.featured-card .tag-list {
  margin-bottom: 1.75rem;
}

.featured-card-footer {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

/* TIER 2: ADDITIONAL WORK CARDS (3-COLUMN BOUNDED GRID) */
.tier2-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.tier2-card {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  border-radius: var(--pp-radius-lg);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: var(--pp-shadow-sm);
  transition: transform 260ms var(--pp-ease), border-color 260ms ease, box-shadow 260ms ease;
}

.tier2-card:hover {
  transform: translateY(-6px);
  border-color: rgba(91, 168, 255, 0.3);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35), 0 0 24px rgba(59, 130, 246, 0.08);
}

.tier2-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.tier2-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: var(--pp-radius-md);
  background: rgba(59, 130, 246, 0.12);
  color: var(--pp-blue);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.tier2-card h3 {
  margin: 0 0 0.25rem;
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text);
}

.tier2-type {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--pp-cyan);
  margin: 0 0 0.85rem;
}

.tier2-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 1.25rem;
  flex-grow: 1;
}

.tier2-card .tag-list {
  margin-bottom: 1.25rem;
}

.tier2-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.tier2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.65rem 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: var(--pp-radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transition: transform 200ms ease, background 200ms ease, border-color 200ms ease;
}

.tier2-btn:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(91, 168, 255, 0.4);
  transform: translateY(-2px);
  color: var(--pp-cyan);
}

.projects-more {
  display: flex;
  justify-content: center;
  margin-top: 3.5rem;
}

.button-lg {
  padding: 0.95rem 1.8rem;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: var(--pp-radius-md);
}

/* ─── Unified Certifications & Programs Section ───────────── */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.program-card {
  display: flex;
  flex-direction: column;
  padding: 1.85rem;
  border-radius: var(--pp-radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  transition: transform 260ms var(--pp-ease), border-color 260ms ease, box-shadow 260ms ease;
}

.program-card:hover {
  transform: translateY(-4px);
  border-color: rgba(91, 168, 255, 0.3);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
}

.program-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.program-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--pp-radius-md);
  flex-shrink: 0;
  font-size: 1.2rem;
}

.hackathon-brand {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.jpmc-brand {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.ai-brand {
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.program-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.program-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.program-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  line-height: 1.3;
}

.program-issuer {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--pp-cyan);
  margin: 0 0 0.85rem;
}

.program-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 1.25rem;
  flex-grow: 1;
}

.program-card .tag-list {
  margin-bottom: 1.25rem;
}

.program-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ─── Honors & Recognition Polish (Rank 48 Highlight) ─────── */
.achievement-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.achievement-card {
  padding: 1.75rem;
  border-radius: var(--pp-radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
  transition: transform 260ms var(--pp-ease), border-color 260ms ease, box-shadow 260ms ease;
}

.achievement-card:hover {
  transform: translateY(-4px);
  border-color: rgba(91, 168, 255, 0.25);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
}

/* PRIORITY FEATURED: RANK 48 */
.achievement-card.achievement-highlight {
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.08), rgba(15, 23, 42, 0.7));
  box-shadow: 0 12px 32px rgba(245, 158, 11, 0.08);
}

.achievement-card.achievement-highlight:hover {
  border-color: rgba(245, 158, 11, 0.7);
  box-shadow: 0 20px 50px rgba(245, 158, 11, 0.15);
}

.achievement-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.achievement-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--pp-radius-md);
  background: rgba(255, 255, 255, 0.05);
  color: var(--pp-blue);
}

.achievement-highlight .achievement-icon {
  background: rgba(245, 158, 11, 0.18);
  color: #fcd34d;
}

.achievement-event {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--muted);
  margin: 0 0 0.35rem;
}

.achievement-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.achievement-highlight h3 {
  color: #fcd34d;
  font-size: 1.6rem;
}

.achievement-desc {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ─── Compact, Balanced Codolio & DSA Breakdown ──────────── */
.codolio-dashboard {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  border-radius: var(--pp-radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(145deg, rgba(20, 30, 50, 0.6), rgba(10, 16, 28, 0.85));
  padding: 1.4rem 1.6rem;
  box-shadow: var(--pp-shadow-md);
  box-sizing: border-box;
}

.codolio-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  width: 100%;
  box-sizing: border-box;
}

.codolio-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: var(--pp-radius-md);
  background: rgba(59, 130, 246, 0.15);
  color: var(--pp-blue);
  border: 1px solid rgba(59, 130, 246, 0.3);
  font-size: 1rem;
  flex-shrink: 0;
}

.codolio-hero .section-kicker {
  font-size: 0.68rem;
  margin-bottom: 0.15rem;
}

.codolio-hero h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  font-family: var(--font-mono);
}

.codolio-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0.5rem;
  border-radius: 99rem;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted-strong);
  transition: color 200ms ease, background 200ms ease, border-color 200ms ease;
}

.platform-badge:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(91, 168, 255, 0.3);
}

.codolio-cta {
  margin-left: auto;
  font-size: 0.74rem;
  padding: 0.45rem 0.85rem;
  flex-shrink: 0;
}

.codolio-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
}

.codolio-stat {
  padding: 0.75rem 0.85rem;
  border-radius: var(--pp-radius-md);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-sizing: border-box;
  min-height: auto;
}

.codolio-stat strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.codolio-stat span {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted-strong);
  margin-top: 0.15rem;
  line-height: 1.3;
}

.codolio-stat small {
  display: block;
  font-size: 0.64rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

/* DSA Breakdown Progress Card */
.dsa-breakdown-card {
  padding: 1rem 1.2rem;
  border-radius: var(--pp-radius-lg);
  background: rgba(10, 16, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  width: 100%;
  box-sizing: border-box;
}

.dsa-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.dsa-header h4 {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
}

.dsa-header .badge {
  font-size: 0.68rem;
  padding: 0.2rem 0.55rem;
}

.dsa-bars {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.dsa-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  font-family: var(--font-mono);
  margin-bottom: 0.2rem;
}

.dsa-bar-track {
  height: 5px;
  border-radius: 99rem;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.dsa-bar-fill {
  height: 100%;
  border-radius: 99rem;
  transition: width 800ms var(--pp-ease);
}

.fill-easy {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.fill-medium {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.fill-hard {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

.dsa-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.75rem;
  color: var(--muted);
}

.dsa-footer strong {
  color: var(--text);
}

/* ─── Case Study Dialog Overhaul ──────────────────────────── */
.project-dialog {
  width: min(920px, calc(100% - 32px));
  max-height: calc(100vh - 64px);
  padding: 0;
  border-radius: var(--pp-radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #090e1a;
  color: var(--text);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7);
  overflow-y: auto;
}

.project-dialog::backdrop {
  background: rgba(4, 7, 14, 0.85);
  backdrop-filter: blur(12px);
}

.dialog-close {
  position: sticky;
  top: 1.2rem;
  right: 1.2rem;
  margin-left: auto;
  z-index: 10;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.dialog-body {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.85fr);
  gap: 2.5rem;
  padding: 2.5rem;
}

.dialog-content h2 {
  margin: 0.5rem 0 0.75rem;
  font-size: 1.8rem;
  letter-spacing: -0.03em;
}

.dialog-summary {
  font-size: 0.96rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.dialog-links {
  display: flex;
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.dialog-sections {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.dialog-section h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  margin: 0 0 0.65rem;
  color: #ffffff;
}

.dialog-section h3 svg {
  color: var(--pp-blue);
}

.dialog-section p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.65;
}

.dialog-section-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.dialog-tradeoffs {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tradeoff-card {
  padding: 0.9rem 1.1rem;
  border-radius: var(--pp-radius-md);
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid var(--pp-cyan);
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
}

.tradeoff-card strong {
  color: #ffffff;
  display: inline-block;
  margin-right: 0.35rem;
}

.architecture-flow {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.flow-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  border-radius: var(--pp-radius-sm);
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.86rem;
}

.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 99rem;
  background: rgba(59, 130, 246, 0.2);
  color: var(--pp-blue);
  font-size: 0.74rem;
  font-weight: 700;
  flex-shrink: 0;
}

.step-desc {
  color: var(--muted-strong);
}

.dialog-visual-header h4 {
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
  font-family: var(--font-mono);
  color: var(--muted);
  text-transform: uppercase;
}

.dialog-visual-img {
  margin: 1.5rem 0;
  border-radius: var(--pp-radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dialog-repo-box {
  padding: 1.25rem;
  border-radius: var(--pp-radius-md);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.dialog-repo-box p {
  margin: 0 0 0.75rem;
  font-size: 0.84rem;
  color: var(--muted);
}

/* ─── High-Contrast WCAG AA Light Theme Overrides ─────────── */
body.theme-light {
  --pp-bg-1: #f8fafc;
  --pp-bg-card: #ffffff;
  --pp-bg-card-elevated: #f1f5f9;
  --text: #0f172a;
  --muted: #475569;
  --muted-strong: #1e293b;
  --line: rgba(30, 41, 59, 0.15);
  color: #0f172a;
}

body.theme-light .navbar.is-scrolled {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

body.theme-light .proof-section {
  background: #f1f5f9;
  border-color: rgba(0, 0, 0, 0.08);
}

body.theme-light .proof-item {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}

body.theme-light .proof-item strong {
  background: linear-gradient(135deg, #0f172a 40%, #2563eb);
  -webkit-background-clip: text;
  background-clip: text;
}

body.theme-light .featured-card,
body.theme-light .tier2-card,
body.theme-light .program-card,
body.theme-light .achievement-card,
body.theme-light .codolio-dashboard,
body.theme-light .dsa-breakdown-card,
body.theme-light .contact-panel {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.09);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

body.theme-light .tier2-btn {
  background: #f1f5f9;
  border-color: rgba(0, 0, 0, 0.12);
  color: #0f172a;
}

body.theme-light .achievement-card.achievement-highlight {
  background: #fffbeb;
  border-color: rgba(245, 158, 11, 0.4);
}

body.theme-light .project-dialog {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(0, 0, 0, 0.15);
}

body.theme-light .dialog-section h3 {
  color: #0f172a;
}

body.theme-light .tradeoff-card {
  background: #f8fafc;
  border-left-color: #0284c7;
}

body.theme-light .tradeoff-card strong {
  color: #0f172a;
}

/* ─── Responsive Breakpoints ──────────────────────────────── */
@media (max-width: 1040px) {
  .proof-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .tier1-grid {
    grid-template-columns: 1fr;
  }
  .tier2-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .programs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .codolio-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .dialog-body {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .proof-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .programs-grid {
    grid-template-columns: 1fr;
  }
  .achievement-grid {
    grid-template-columns: 1fr;
  }
  .tier2-grid {
    grid-template-columns: 1fr;
  }
  .hero-portrait {
    margin-top: 1rem;
  }
  .portrait-frame.portrait-circle {
    width: 240px;
    height: 240px;
  }
  .codolio-hero {
    flex-direction: column;
    align-items: flex-start;
  }
  .codolio-cta {
    margin-left: 0;
    width: 100%;
    text-align: center;
  }
  .dsa-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .dialog-body {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .proof-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
  }
  .proof-item {
    padding: 0.85rem 0.65rem;
    min-height: 5.8rem;
  }
  .proof-item strong {
    font-size: 1.25rem;
  }
  .proof-item span {
    font-size: 0.68rem;
  }
  .codolio-stats {
    grid-template-columns: 1fr;
  }
  .hero-actions {
    display: flex;
    flex-direction: column;
  }
  .hero-actions .button {
    width: 100%;
  }
}

/* ─── Reduced Motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ─── Achievements Section ───────────────────────────────── */
.achievements-section { padding-top: 6rem; }

/* Secondary compact cards grid */
.ach-secondary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-top: 1.1rem;
}

.ach-mini-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--pp-radius-md);
  background: linear-gradient(145deg, rgba(255,255,255,0.025), rgba(255,255,255,0.005));
  transition: transform 240ms var(--pp-ease), border-color 240ms ease, box-shadow 240ms ease;
}

.ach-mini-card:hover {
  transform: translateY(-3px);
  border-color: rgba(91, 168, 255, 0.22);
  box-shadow: 0 10px 28px rgba(0,0,0,0.25);
}

.ach-mini-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border-radius: 0.5rem;
  background: rgba(91, 168, 255, 0.1);
  color: var(--pp-blue);
  border: 1px solid rgba(91, 168, 255, 0.18);
}

.ach-mini-icon svg { width: 0.9rem; height: 0.9rem; }

.ach-mini-card > div { min-width: 0; }

.ach-mini-label {
  margin: 0 0 0.2rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ach-mini-card h4 {
  margin: 0 0 0.2rem;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.25;
}

.ach-mini-card > div > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .ach-secondary-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .ach-secondary-grid { grid-template-columns: 1fr; }
  .ach-mini-card { padding: 0.85rem; }
}

/* ─── Hero entrance animation ─────────────────────────────── */
@keyframes hero-fade-up {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-copy .eyebrow   { animation: hero-fade-up 0.6s var(--pp-ease) 0.05s both; }
.hero-copy h1         { animation: hero-fade-up 0.65s var(--pp-ease) 0.15s both; }
.hero-copy .hero-lede { animation: hero-fade-up 0.65s var(--pp-ease) 0.25s both; }
.hero-copy .hero-actions { animation: hero-fade-up 0.65s var(--pp-ease) 0.35s both; }
.hero-copy .hero-meta { animation: hero-fade-up 0.6s var(--pp-ease) 0.45s both; }
.hero-portrait        { animation: hero-fade-up 0.7s var(--pp-ease) 0.2s both; }

/* ─── Improved reveal animation ───────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1),
              transform 0.6s cubic-bezier(0.16,1,0.3,1);
}

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

/* stagger siblings */
.reveal:nth-child(2) { transition-delay: 80ms; }
.reveal:nth-child(3) { transition-delay: 150ms; }
.reveal:nth-child(4) { transition-delay: 210ms; }
.reveal:nth-child(5) { transition-delay: 260ms; }
.reveal:nth-child(6) { transition-delay: 300ms; }

/* ─── Navbar active underline polish ──────────────────────── */
.desktop-nav a {
  position: relative;
  transition: color 200ms ease, background 200ms ease;
}

.desktop-nav a::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 1.2rem;
  height: 2px;
  background: var(--pp-blue);
  border-radius: 99rem;
  transition: transform 220ms var(--pp-ease), opacity 220ms ease;
  opacity: 0;
}

.desktop-nav a.active::after,
.desktop-nav a:hover::after {
  transform: translateX(-50%) scaleX(1);
  opacity: 1;
}

/* ─── Button micro-interactions ───────────────────────────── */
.button {
  transition: transform 200ms var(--pp-ease),
              box-shadow 200ms ease,
              background 200ms ease,
              border-color 200ms ease;
}

.button:active { transform: translateY(0) scale(0.97); }

/* ─── Featured card hover polish ──────────────────────────── */
.featured-card {
  transition: transform 280ms var(--pp-ease),
              border-color 280ms ease,
              box-shadow 280ms ease;
}

/* ─── Skill card tag hover ─────────────────────────────────── */
.skill-card .tag-list span {
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.skill-card:hover .tag-list span {
  border-color: color-mix(in srgb, var(--card-accent) 22%, var(--line));
}

/* ─── Proof item entrance ──────────────────────────────────── */
.proof-item {
  transition: transform 240ms var(--pp-ease),
              background 240ms ease,
              border-color 240ms ease;
}

/* ─── Contact row hover ────────────────────────────────────── */
.contact-row {
  transition: background 180ms ease, padding-left 180ms ease;
}

.contact-row:hover { padding-left: 1.45rem; }

/* ─── Footer tagline ───────────────────────────────────────── */
.footer-tagline {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
}

/* ─── Responsive: achievements ────────────────────────────── */
@media (max-width: 860px) {
  .ach-layout { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .ach-card { grid-template-columns: 3.5rem 1fr; gap: 0.75rem; padding: 1rem; }
  .ach-rank-num { font-size: 1.1rem; }
}

/* ─── Reduced motion overrides ────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .hero-copy .eyebrow,
  .hero-copy h1,
  .hero-copy .hero-lede,
  .hero-copy .hero-actions,
  .hero-copy .hero-meta,
  .hero-portrait {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
