/* ═══════════════════════════════════════════════════════════
   Harsh Shroff — AI/ML Engineer Portfolio
   Theme: Midnight Engineering
   ═══════════════════════════════════════════════════════════ */

/* ─── DESIGN TOKENS ─────────────────────────────────────── */
:root {
  /* Background layers */
  --bg:          #0a0a0a;
  --surface:     #111111;
  --surface-2:   #161616;
  --surface-3:   #1c1c1c;

  /* Borders */
  --border:      #1e1e1e;
  --border-md:   #2a2a2a;
  --border-hover:#3a3a3a;

  /* Text */
  --text:        #e5e5e5;
  --text-muted:  #a3a3a3;
  --text-faint:  #666666;

  /* Accents */
  --accent:      #00d4ff;          /* electric cyan */
  --accent-dim:  rgba(0,212,255,.12);
  --accent-glow: rgba(0,212,255,.06);
  --purple:      #9b6dff;          /* soft violet */
  --purple-dim:  rgba(155,109,255,.12);
  --green:       #00e5a0;          /* electric mint */
  --green-dim:   rgba(0,229,160,.12);
  --amber:       #ffb84d;          /* warm amber */
  --amber-dim:   rgba(255,184,77,.12);
  --rose:        #e879f9;          /* fuchsia / finance */
  --rose-dim:    rgba(232,121,249,.12);

  /* Typography */
  --font-head:   'Space Grotesk', system-ui, sans-serif;
  --font-body:   'Inter', system-ui, sans-serif;
  --font-mono:   'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --section-gap: 7rem;
  --container:   1200px;

  /* Motion */
  --ease:        cubic-bezier(.16,1,.3,1);
  --ease-out:    cubic-bezier(.22,1,.36,1);

  /* Liquid Glass */
  --glass-bg:      rgba(22,22,30,0.52);
  --glass-bg-heavy:rgba(10,10,16,0.82);
  --glass-border:  rgba(255,255,255,0.08);
  --glass-shine:   inset 0 1px 0 rgba(255,255,255,0.07);
  --glass-shadow:  0 8px 32px rgba(0,0,0,.45);
  --glass-blur:    blur(24px) saturate(160%);

  /* Radii */
  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  16px;
  --r-xl:  22px;
}

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

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

::selection {
  background: var(--accent);
  color: #000;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-md); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ─── TYPOGRAPHY ─────────────────────────────────────────── */
h1,h2,h3,h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

p { color: var(--text-muted); }

.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--purple) 60%, var(--accent) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 8s ease-in-out infinite;
}

@keyframes gradientShift {
  0%,100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.05em;
}

/* ─── LAYOUT ─────────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: var(--section-gap) 0;
}

.section-header {
  margin-bottom: 3.5rem;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--text);
  margin-bottom: 0.75rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ─── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--r-md);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.25s var(--ease);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #000;
  font-weight: 600;
}
.btn-primary:hover {
  background: #22e0ff;
  box-shadow: 0 0 24px rgba(0,212,255,.35);
  transform: translateY(-1px);
}

.btn-outline {
  border: 1px solid var(--border-md);
  color: var(--text);
  background: transparent;
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

.btn-ghost {
  color: var(--text-muted);
  background: transparent;
  padding-left: 0;
}
.btn-ghost:hover { color: var(--text); }

/* ─── NAVIGATION ─────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(10,10,16,0.28);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  box-shadow: var(--glass-shine);
  transition: background 0.35s ease, border-color 0.35s ease,
              box-shadow 0.35s ease, backdrop-filter 0.35s ease;
}

#navbar.scrolled {
  background: var(--glass-bg-heavy);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border-color: var(--glass-border);
  box-shadow: 0 4px 32px rgba(0,0,0,.5), var(--glass-shine);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-logo {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  flex-shrink: 0;
}

.nav-logo .dot { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
}

.nav-link {
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: 0.4rem 0.75rem;
  border-radius: var(--r-sm);
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: var(--surface-2);
}

.nav-right { display: flex; align-items: center; gap: 0.75rem; margin-left: auto; }

.btn-resume {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: var(--r-md);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.25s var(--ease);
}
.btn-resume:hover {
  background: var(--accent);
  color: #000;
  box-shadow: 0 0 16px rgba(0,212,255,.25);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* nav-open: mobile dropdown via same nav-links list */
#navbar.nav-open .nav-inner {
  height: auto;
  min-height: 68px;
  flex-wrap: wrap;
  padding-bottom: 0;
}
#navbar.nav-open .nav-links {
  display: flex;
  flex-direction: column;
  flex-basis: 100%;
  width: 100%;
  gap: 0.25rem;
  padding: 0.75rem 0 1.25rem;
  border-top: 1px solid var(--glass-border);
  background: rgba(10,10,16,0.6);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
}
#navbar.nav-open .nav-links .nav-link {
  display: block;
  padding: 0.65rem 0.75rem;
  font-size: 0.95rem;
  border-radius: var(--r-sm);
}
#navbar.nav-open .nav-links .nav-link:hover {
  background: rgba(255,255,255,0.06);
}

/* ─── HERO ───────────────────────────────────────────────── */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 5rem 0 4rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,212,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
}

.hero-glow {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 400px;
  background: radial-gradient(
    ellipse at center,
    rgba(0,212,255,.07) 0%,
    rgba(155,109,255,.05) 40%,
    transparent 70%
  );
  filter: blur(40px);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 820px;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  border: 1px solid var(--border-md);
  background: var(--surface);
  padding: 0.3rem 0.85rem;
  border-radius: 99px;
}

.hero-building {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--accent);
  border: 1px solid rgba(0,212,255,0.25);
  background: var(--accent-dim);
  padding: 0.3rem 0.85rem;
  border-radius: 99px;
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
}

.building-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse-dot 2.5s ease-in-out infinite;
  flex-shrink: 0;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse-dot 2.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.5; }
}

.hero-title {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  color: var(--text);
  margin-bottom: 1.5rem;
  line-height: 1.08;
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 1.75rem;
  line-height: 1.65;
}

.hero-typed {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  height: 1.5rem;
}

.typed-word { color: var(--accent); font-weight: 500; }

.typed-cursor {
  color: var(--accent);
  font-weight: 300;
  animation: blink 1s step-end infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 3.5rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
  width: fit-content;
}

.stat-item {
  padding: 1.2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; }

.stat-num {
  font-family: var(--font-head);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.stat-unit {
  color: var(--accent);
  font-size: 1.4rem;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.stat-sub {
  display: block;
  color: var(--text-faint);
  font-size: 0.68rem;
}

.stat-divider { display: none; }

/* ─── ABOUT ──────────────────────────────────────────────── */
#about { background: var(--surface); }

.about-grid {
  display: grid;
  grid-template-columns: 200px 1fr 0.8fr;
  gap: 3rem;
  align-items: start;
}

.about-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 2px solid rgba(0,212,255,0.4);
  display: block;
  box-shadow: 0 0 0 3px rgba(0,212,255,0.35), 0 0 40px rgba(0,212,255,0.12);
  animation: photo-pulse 4s ease-in-out infinite;
}
.about-photo-col {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 0.5rem;
}

.about-text p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.about-text p:last-child { margin-bottom: 0; }
.about-text strong { color: var(--text); font-weight: 600; }

.about-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.about-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  box-shadow: var(--glass-shine);
  transition: border-color 0.2s, transform 0.2s;
}
.about-card:hover {
  border-color: rgba(255,255,255,0.14);
  transform: translateX(4px);
}

.about-card-icon {
  color: var(--accent);
  flex-shrink: 0;
}

.about-card-title {
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.about-card-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ─── SKILLS ─────────────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.skill-group {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  box-shadow: var(--glass-shine), var(--glass-shadow);
  transition: border-color 0.25s;
}
.skill-group:hover { border-color: rgba(255,255,255,0.14); }

.skill-group-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.1rem;
}

.skill-group-icon {
  color: var(--accent);
  font-size: 1rem;
  line-height: 1;
}

.skill-group-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  font-family: var(--font-head);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: color 0.2s, border-color 0.2s;
}
.tag:hover { color: var(--text); border-color: var(--border-hover); }

.tag-accent { background: var(--accent-dim); color: var(--accent); border-color: rgba(0,212,255,.2); }
.tag-purple { background: var(--purple-dim); color: var(--purple); border-color: rgba(155,109,255,.2); }

/* ─── BENTO GRID ─────────────────────────────────────────── */
#featured { background: var(--bg); }

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 1rem;
}

/* Layout positions */
.bento-large  { grid-column: span 2; }
.bento-medium { grid-column: span 1; }
.bento-small  { grid-column: span 1; }

.bento-card {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-xl);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: hidden;
  box-shadow: var(--glass-shine), var(--glass-shadow);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease),
              box-shadow 0.3s var(--ease);
}
.bento-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.bento-card:hover { transform: translateY(-2px); }

/* Color themes */
.bento-purple { border-color: rgba(155,109,255,.2); }
.bento-purple:hover { border-color: var(--purple); box-shadow: 0 0 40px rgba(155,109,255,.12); }
.bento-purple::before { background: radial-gradient(ellipse 60% 50% at 80% 10%, rgba(155,109,255,.08), transparent); opacity: 1; }
.bento-purple .bento-card-tag { color: var(--purple); }
.bento-purple .bento-btn { border-color: var(--purple); color: var(--purple); }
.bento-purple .bento-btn:hover { background: var(--purple); color: #fff; }
.bento-purple .pipeline-step { border-color: rgba(155,109,255,.3); color: var(--text-muted); }

.bento-blue { border-color: rgba(0,212,255,.2); }
.bento-blue:hover { border-color: var(--accent); box-shadow: 0 0 40px var(--accent-dim); }
.bento-blue::before { background: radial-gradient(ellipse 60% 50% at 80% 10%, var(--accent-glow), transparent); opacity: 1; }
.bento-blue .bento-card-tag { color: var(--accent); }
.bento-blue .bento-btn { border-color: var(--accent); color: var(--accent); }
.bento-blue .bento-btn:hover { background: var(--accent); color: #000; }

.bento-green { border-color: rgba(0,229,160,.2); }
.bento-green:hover { border-color: var(--green); box-shadow: 0 0 40px var(--green-dim); }
.bento-green::before { background: radial-gradient(ellipse 60% 50% at 80% 10%, rgba(0,229,160,.07), transparent); opacity: 1; }
.bento-green .bento-card-tag { color: var(--green); }

.bento-amber { border-color: rgba(255,184,77,.2); }
.bento-amber:hover { border-color: var(--amber); box-shadow: 0 0 40px var(--amber-dim); }
.bento-amber::before { background: radial-gradient(ellipse 60% 50% at 80% 10%, rgba(255,184,77,.07), transparent); opacity: 1; }
.bento-amber .bento-card-tag { color: var(--amber); }
.bento-amber .bento-btn { border-color: var(--amber); color: var(--amber); }
.bento-amber .bento-btn:hover { background: var(--amber); color: #000; }

.bento-rose { border-color: rgba(232,121,249,.2); }
.bento-rose:hover { border-color: var(--rose); box-shadow: 0 0 40px rgba(232,121,249,.12); }
.bento-rose::before { background: radial-gradient(ellipse 50% 60% at 85% 15%, rgba(232,121,249,.07), transparent); opacity: 1; }
.bento-rose .bento-card-tag { color: var(--rose); }
.bento-rose .bento-btn { border-color: var(--rose); color: var(--rose); }
.bento-rose .bento-btn:hover { background: var(--rose); color: #000; }

/* Full-row featured card */
.bento-wide { grid-column: span 3; }

.bento-card-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bento-title {
  font-size: 1.45rem;
  color: var(--text);
  line-height: 1.2;
}

.bento-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
}

.bento-problem {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.bento-problem .label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.bento-pipeline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.pipeline-step {
  padding: 0.25rem 0.65rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  white-space: nowrap;
}

.pipeline-arrow {
  color: var(--text-faint);
  font-size: 0.8rem;
}

.bento-impact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.impact-chip {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  background: rgba(0,229,160,.1);
  color: var(--green);
  border: 1px solid rgba(0,229,160,.2);
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 500;
}

.bento-amber .impact-chip {
  background: var(--amber-dim);
  color: var(--amber);
  border-color: rgba(255,184,77,.2);
}

.bento-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: auto;
}

.tech-tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 500;
  background: var(--surface-3);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.bento-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
}

.bento-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border: 1px solid currentColor;
  border-radius: var(--r-md);
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.2s var(--ease);
  cursor: pointer;
}

.bento-btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.78rem;
}

.bento-private {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-faint);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  cursor: default;
  user-select: none;
}

/* ─── MORE PROJECTS ──────────────────────────────────────── */
#projects { background: var(--surface); }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.filter-btn {
  padding: 0.4rem 1rem;
  border-radius: var(--r-md);
  font-size: 0.83rem;
  font-weight: 500;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  font-family: var(--font-body);
}
.filter-btn:hover { color: var(--text); border-color: var(--border-hover); }
.filter-btn.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  font-weight: 600;
}

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

.project-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: var(--glass-shine), var(--glass-shadow);
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  position: relative;
}
.project-card:hover {
  border-color: rgba(255,255,255,0.16);
  transform: translateY(-2px);
  box-shadow: var(--glass-shine), 0 12px 40px rgba(0,0,0,.5);
}

.project-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-card-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ai-icon    { background: var(--accent-dim);  color: var(--accent);  }
.cv-icon    { background: var(--purple-dim);  color: var(--purple);  }
.data-icon  { background: var(--green-dim);   color: var(--green);   }

.project-card-tags {
  display: flex;
  gap: 0.35rem;
}

.tag-sm {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 99px;
  font-size: 0.68rem;
  font-weight: 500;
  background: rgba(255,255,255,0.05);
  color: var(--text-faint);
  border: 1px solid rgba(255,255,255,0.07);
}

.project-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.project-card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

.project-impact {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.impact-num {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--green);
}

.project-stack {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-faint);
}

.project-link {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  color: var(--text-faint);
  transition: color 0.2s;
}
.project-link svg { width: 20px; height: 20px; }
a.project-link:hover { color: var(--accent); }
.project-private { cursor: default; }

/* Hide/Show for filtering */
.project-card.hidden {
  display: none;
}

/* ─── EXPERIENCE / TIMELINE ──────────────────────────────── */
#experience { background: var(--bg); }

.timeline {
  max-width: 820px;
  margin-bottom: 3.5rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0 1.5rem;
  padding-bottom: 2.5rem;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 4px;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(0,212,255,.5);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.timeline-line {
  flex: 1;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), var(--border));
  margin-top: 6px;
  min-height: 40px;
}

.timeline-content {
  padding-bottom: 1rem;
}

.timeline-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}

.timeline-period {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}

.timeline-badge {
  padding: 0.1rem 0.55rem;
  border-radius: 99px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.timeline-badge.current {
  background: rgba(0,229,160,.15);
  color: var(--green);
  border: 1px solid rgba(0,229,160,.3);
}

.timeline-role {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.timeline-org {
  font-size: 0.88rem;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.timeline-bullets {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.timeline-bullets li {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  padding-left: 1.2rem;
  position: relative;
}
.timeline-bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.7rem;
  top: 0.3em;
}
.timeline-bullets li strong { color: var(--text); font-weight: 600; }

.timeline-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tech-tag-sm {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 99px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.education-block {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.5rem 1.75rem;
  max-width: 820px;
  border-left: 3px solid var(--purple);
}

.edu-icon { color: var(--purple); margin-top: 0.25rem; flex-shrink: 0; }

.edu-degree {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.edu-school {
  font-size: 0.9rem;
  color: var(--purple);
  margin-bottom: 0.3rem;
}

.edu-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.edu-courses {
  font-size: 0.78rem;
  color: var(--text-faint);
  font-family: var(--font-mono);
}

/* ─── RESEARCH ───────────────────────────────────────────── */
#research { background: var(--surface); }

.research-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.research-col-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
}
.research-col-title.mt { margin-top: 2.5rem; }

.pub-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--glass-shine);
  transition: border-color 0.2s;
}
.pub-card:hover { border-color: rgba(255,255,255,0.14); }

.pub-venue {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.pub-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 0.35rem;
}

.pub-authors {
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-bottom: 0.5rem;
}

.pub-summary {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 0.85rem;
}

.pub-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  font-family: var(--font-mono);
  color: var(--accent);
  transition: opacity 0.2s;
}
.pub-link:hover { opacity: 0.7; }

.cert-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 0;
}

.cert-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  box-shadow: var(--glass-shine);
  transition: border-color 0.2s;
}
.cert-item:hover { border-color: rgba(255,255,255,0.14); }

.cert-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  font-family: var(--font-mono);
  flex-shrink: 0;
}
.cert-icon.aws    { background: rgba(255,153,0,.15);  color: #ff9900; }
.cert-icon.nvidia { background: rgba(118,185,0,.15);  color: #76b900; }

a.cert-link { cursor: pointer; text-decoration: none; }
a.cert-link:hover { border-color: var(--accent); box-shadow: var(--glass-shine), 0 0 20px rgba(0,212,255,0.1); }

.cert-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.inline-link {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 500;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.inline-link:hover { opacity: 0.7; }

.cert-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.link-cards {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  box-shadow: var(--glass-shine);
  transition: border-color 0.2s, transform 0.2s;
}
.link-card:hover {
  border-color: rgba(255,255,255,0.14);
  transform: translateX(4px);
}

.link-card-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
}
.link-card-icon.scholar { background: rgba(66,133,244,.15); color: #4285f4; }
.link-card-icon.medium  { background: rgba(255,255,255,.08); color: var(--text); }

.link-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.link-card-sub {
  font-size: 0.77rem;
  color: var(--text-muted);
}

.link-card-arrow { color: var(--text-faint); margin-left: auto; flex-shrink: 0; }

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

.contact-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.contact-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.contact-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--text);
  margin-bottom: 1rem;
}

.contact-sub {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 2.5rem;
}

.contact-cta-row {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid rgba(0,212,255,.3);
  border-radius: var(--r-lg);
  background: var(--accent-glow);
  margin-bottom: 2.5rem;
  overflow: hidden;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.contact-cta-row:has(:hover) {
  border-color: var(--accent);
  box-shadow: 0 0 30px rgba(0,212,255,.2);
}

.contact-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--accent);
  padding: 0.9rem 1.75rem;
  background: none;
  border: none;
  border-right: 1px solid rgba(0,212,255,.2);
  transition: background 0.2s;
}
.contact-cta:hover { background: var(--accent-dim); }

.contact-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.1rem;
  color: var(--accent);
  transition: background 0.2s;
}
.contact-send:hover { background: var(--accent-dim); }

.contact-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--border-md);
  border-radius: var(--r-md);
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: all 0.2s var(--ease);
}
.contact-link:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background: var(--surface);
}

/* ─── FOOTER ─────────────────────────────────────────────── */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-faint);
}

.footer-top {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: all 0.2s;
}
.footer-top:hover { color: var(--accent); border-color: var(--accent); }

/* ─── SCROLL REVEAL ──────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.18s; }
.reveal-delay-3 { transition-delay: 0.26s; }
.reveal-delay-4 { transition-delay: 0.34s; }
.reveal-delay-5 { transition-delay: 0.42s; }

/* Staggered reveal variants */
.reveal-left {
  opacity: 0;
  transform: translateX(-32px);
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }

.reveal-right {
  opacity: 0;
  transform: translateX(32px);
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

.reveal-scale {
  opacity: 0;
  transform: scale(0.94) translateY(16px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.reveal-scale.visible { opacity: 1; transform: scale(1) translateY(0); }

/* ─── SCROLL PROGRESS BAR ────────────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--purple));
  z-index: 1002;
  transition: width 0.08s linear;
  pointer-events: none;
}

/* ─── CURSOR SPOTLIGHT ───────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    700px circle at var(--cx, -200px) var(--cy, -200px),
    rgba(0,212,255,0.035),
    transparent 50%
  );
}

/* ─── PROFILE PHOTO GLOW ─────────────────────────────────── */
@keyframes photo-pulse {
  0%, 100% {
    box-shadow: 0 0 0 3px rgba(0,212,255,0.35),
                0 0 40px rgba(0,212,255,0.12);
  }
  50% {
    box-shadow: 0 0 0 3px rgba(0,212,255,0.2),
                0 0 60px rgba(0,212,255,0.22);
  }
}

/* ─── EMAIL TOAST ────────────────────────────────────────── */
#copy-email { cursor: pointer; background: none; font: inherit; }
.email-toast {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--green);
  margin-top: 0.6rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.email-toast.show { opacity: 1; transform: translateY(0); }

/* ─── BENTO CASE STUDY ROWS ──────────────────────────────── */
.bento-case {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  padding: 0.9rem 1rem;
}
.bento-case-row {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 0.6rem;
  align-items: baseline;
}
.case-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  padding-top: 0.1rem;
}
.case-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ─── SECTION DIVIDERS ───────────────────────────────────── */
section { position: relative; }

#about::after,
#projects::after,
#research::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
  z-index: 1;
}

#skills::before,
#featured::before,
#experience::before,
#contact::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(to bottom, var(--surface), transparent);
  pointer-events: none;
  z-index: 1;
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */

/* Tablet */
@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: 1fr 1fr;
  }
  .bento-large { grid-column: span 2; }
  .bento-wide  { grid-column: span 2; }

  .about-grid { grid-template-columns: 160px 1fr; gap: 2.5rem; }
  .about-photo { width: 160px; height: 160px; }
  .about-cards { grid-column: span 2; grid-template-columns: 1fr 1fr; }
  .research-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* Mobile nav breakpoint */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .btn-resume { display: none; }

  .hero-stats {
    flex-direction: column;
    width: 100%;
  }
  .stat-item {
    border-right: none;
    border-bottom: 1px solid var(--border);
    flex-direction: row;
    align-items: center;
    gap: 1rem;
  }
  .stat-item:last-child { border-bottom: none; }
  .stat-num { font-size: 1.5rem; }

  .bento-grid {
    grid-template-columns: 1fr;
  }
  .bento-large,
  .bento-medium,
  .bento-small,
  .bento-wide { grid-column: span 1; }

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

  .section-gap: { --section-gap: 4rem; }
  section { padding: 4rem 0; }

  .timeline-item { grid-template-columns: 20px 1fr; gap: 0 1rem; }

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

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

  .about-cards { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .about-photo-col { justify-content: flex-start; }
  .about-photo { width: 120px; height: 120px; }

  .hero-ctas {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-links { gap: 0.4rem; }
}

/* Small mobile */
@media (max-width: 480px) {
  :root { --section-gap: 3.5rem; }
  .hero-title { font-size: 2.4rem; }
  .container { padding: 0 1rem; }
}

/* ─── FOCUS STYLES (accessibility) ──────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ─── REDUCED MOTION ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal, .reveal-left, .reveal-right, .reveal-scale { opacity: 1; transform: none; }
  .about-photo { animation: none; }
}
