/* =============================================
   Shrainik Jain — Personal Website
   Modern redesign 2025
   ============================================= */

/* ---- CSS Custom Properties ---- */
:root {
  /* Colors — Light Mode */
  --clr-bg:          #ffffff;
  --clr-bg-alt:      #f8fafc;
  --clr-text:        #0f172a;
  --clr-text-muted:  #64748b;
  --clr-border:      #e2e8f0;
  --clr-primary:     #2563eb;
  --clr-primary-dk:  #1d4ed8;
  --clr-accent:      #7c3aed;
  --clr-card:        #ffffff;
  --clr-card-hover:  #f1f5f9;
  --clr-award:       #d97706;

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

  /* Spacing */
  --section-pad: clamp(4rem, 10vw, 7rem);
  --container:   min(1100px, 90vw);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.05);
  --shadow-lg: 0 20px 50px rgba(0,0,0,0.10), 0 8px 20px rgba(0,0,0,0.06);

  /* Transitions */
  --t-fast:   0.15s ease;
  --t-base:   0.22s ease;
  --t-slow:   0.4s ease;

  /* Border radius */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  28px;
}

/* ---- Dark Mode ---- */
[data-theme="dark"] {
  --clr-bg:         #0f172a;
  --clr-bg-alt:     #1e293b;
  --clr-text:       #f1f5f9;
  --clr-text-muted: #94a3b8;
  --clr-border:     #334155;
  --clr-card:       #1e293b;
  --clr-card-hover: #334155;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.3);
  --shadow-lg: 0 20px 50px rgba(0,0,0,0.4);
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 4rem;
}

body {
  font-family: var(--font-sans);
  background: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.7;
  transition: background var(--t-slow), color var(--t-slow);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--clr-primary);
  text-decoration: none;
  transition: color var(--t-fast);
}
a:hover { color: var(--clr-accent); }
a:focus-visible {
  outline: 2px solid var(--clr-primary);
  outline-offset: 3px;
  border-radius: 3px;
}

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

ul { list-style: none; }

/* ---- Utility ---- */
.container { width: var(--container); margin: 0 auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* =============================================
   NAVIGATION
   ============================================= */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border-bottom: 1px solid var(--clr-border);
  transition: background var(--t-slow), border-color var(--t-slow), box-shadow var(--t-base);
}

[data-theme="dark"] #navbar {
  background: rgba(15,23,42,0.85);
}

#navbar.scrolled {
  box-shadow: var(--shadow-sm);
}

.nav-container {
  width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
  gap: 1rem;
}

.nav-logo {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 0.15rem;
  margin: 0 auto;
}

.nav-links a {
  color: var(--clr-text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-sm);
  transition: all var(--t-fast);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--clr-text);
  background: var(--clr-bg-alt);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
  padding: 0.35rem;
  cursor: pointer;
  color: var(--clr-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  transition: all var(--t-fast);
}

.theme-toggle:hover {
  border-color: var(--clr-primary);
  color: var(--clr-primary);
  background: rgba(37,99,235,0.05);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.35rem;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--clr-text);
  border-radius: 2px;
  transition: all var(--t-base);
}

.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* =============================================
   HERO
   ============================================= */
#hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 6rem 0 4rem;
  position: relative;
  overflow: hidden;
}

/* Animated gradient blobs */
#hero::before,
#hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.35;
}
[data-theme="dark"] #hero::before,
[data-theme="dark"] #hero::after {
  opacity: 0.18;
}

#hero::before {
  width: 60vw;
  height: 60vw;
  max-width: 700px;
  max-height: 700px;
  background: radial-gradient(circle, rgba(37,99,235,0.4), transparent 70%);
  top: -20%;
  right: -10%;
  animation: blobFloat 12s ease-in-out infinite alternate;
}

#hero::after {
  width: 50vw;
  height: 50vw;
  max-width: 600px;
  max-height: 600px;
  background: radial-gradient(circle, rgba(124,58,237,0.3), transparent 70%);
  bottom: -10%;
  left: -5%;
  animation: blobFloat 16s ease-in-out infinite alternate-reverse;
}

@keyframes blobFloat {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(20px, -30px) scale(1.05); }
}

.hero-content {
  width: var(--container);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4rem;
  position: relative;
  z-index: 1;
}

.hero-greeting {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clr-primary);
  margin-bottom: 0.75rem;
}

.hero-name {
  font-size: clamp(2.4rem, 6vw, 4.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--clr-text) 40%, var(--clr-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-role {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--clr-text-muted);
  margin-bottom: 0.5rem;
  font-weight: 400;
}

.hero-role strong {
  color: var(--clr-text);
  font-weight: 600;
}

.hero-tagline {
  font-size: 1rem;
  color: var(--clr-text-muted);
  margin-bottom: 2rem;
  max-width: 42ch;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.hero-social {
  display: flex;
  gap: 0.625rem;
}

.hero-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--clr-border);
  color: var(--clr-text-muted);
  transition: all var(--t-fast);
}

.hero-social a:hover {
  border-color: var(--clr-primary);
  color: var(--clr-primary);
  background: rgba(37,99,235,0.06);
  transform: translateY(-2px);
}

/* Hero avatar */
.hero-avatar {
  position: relative;
  flex-shrink: 0;
}

.hero-avatar::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-accent));
  z-index: 0;
  animation: spinGradient 8s linear infinite;
}

@keyframes spinGradient {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.hero-avatar img {
  width: clamp(160px, 18vw, 240px);
  height: clamp(160px, 18vw, 240px);
  border-radius: 50%;
  object-fit: cover;
  position: relative;
  z-index: 1;
  border: 4px solid var(--clr-bg);
  display: block;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.35rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  transition: all var(--t-base);
  cursor: pointer;
  border: none;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--clr-primary);
  color: white;
}
.btn-primary:hover {
  background: var(--clr-primary-dk);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37,99,235,0.4);
}

.btn-outline {
  background: transparent;
  color: var(--clr-text);
  border: 1.5px solid var(--clr-border);
}
.btn-outline:hover {
  border-color: var(--clr-primary);
  color: var(--clr-primary);
  background: rgba(37,99,235,0.05);
}

/* =============================================
   SECTIONS
   ============================================= */
.section {
  padding: var(--section-pad) 0;
}

.section-alt {
  background: var(--clr-bg-alt);
}

.section-header {
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clr-primary);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 36px;
  height: 3px;
  background: linear-gradient(90deg, var(--clr-primary), var(--clr-accent));
  border-radius: 2px;
}

/* =============================================
   ABOUT
   ============================================= */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.about-text p {
  color: var(--clr-text-muted);
  margin-bottom: 1.1rem;
  font-size: 1rem;
  line-height: 1.8;
}
.about-text p:last-child { margin-bottom: 0; }
.about-text a { font-weight: 500; }

.about-cards {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.about-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  transition: all var(--t-base);
}

.about-card:hover {
  border-color: rgba(37,99,235,0.4);
  box-shadow: 0 4px 16px rgba(37,99,235,0.08);
  transform: translateX(4px);
}

.about-card-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  line-height: 1;
}

.about-card-text h4 {
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

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

/* =============================================
   EXPERIENCE TIMELINE
   ============================================= */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--clr-primary) 0%, var(--clr-accent) 60%, transparent 100%);
  border-radius: 1px;
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -1.875rem;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--clr-primary);
  border: 2.5px solid var(--clr-bg);
  box-shadow: 0 0 0 2px var(--clr-primary);
  transition: box-shadow var(--t-base);
}
.timeline-item:hover .timeline-dot {
  box-shadow: 0 0 0 4px rgba(37,99,235,0.25);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}

.timeline-role {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
}

.timeline-company {
  color: var(--clr-primary);
  font-weight: 600;
  font-size: 0.9rem;
}

.timeline-period {
  font-size: 0.75rem;
  color: var(--clr-text-muted);
  font-family: var(--font-mono);
  white-space: nowrap;
  padding-top: 0.15rem;
  background: var(--clr-bg-alt);
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  border: 1px solid var(--clr-border);
  flex-shrink: 0;
}

.timeline-desc {
  font-size: 0.9rem;
  color: var(--clr-text-muted);
  line-height: 1.7;
  margin-top: 0.4rem;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

/* =============================================
   RESEARCH
   ============================================= */
.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.research-card {
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--t-slow);
  display: flex;
  flex-direction: column;
}

.research-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(37,99,235,0.2);
}

.research-card-img {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--clr-bg-alt);
}

.research-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}

.research-card:hover .research-card-img img {
  transform: scale(1.06);
}

.research-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.research-card-body h4 {
  font-size: 0.925rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.research-card-body p {
  font-size: 0.85rem;
  color: var(--clr-text-muted);
  line-height: 1.65;
  flex: 1;
}

.research-card-link {
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--clr-primary);
  transition: gap var(--t-fast);
}
.research-card-link:hover { gap: 0.55rem; color: var(--clr-primary); }

/* =============================================
   PUBLICATIONS
   ============================================= */
.publications-list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.pub-item {
  padding: 1.1rem 1.25rem;
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--clr-primary);
  transition: all var(--t-base);
}

.pub-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(3px);
}

.pub-item.award {
  border-left-color: var(--clr-award);
}

.pub-title {
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.45;
  margin-bottom: 0.3rem;
}

.pub-authors {
  font-size: 0.78rem;
  color: var(--clr-text-muted);
  margin-bottom: 0.25rem;
}

.pub-authors strong {
  color: var(--clr-text);
  font-weight: 600;
}

.pub-venue {
  font-size: 0.78rem;
  color: var(--clr-text-muted);
  font-style: italic;
}

.pub-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.pub-link {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.18rem 0.55rem;
  background: var(--clr-bg-alt);
  border: 1px solid var(--clr-border);
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--clr-text-muted);
  font-family: var(--font-mono);
  transition: all var(--t-fast);
}
.pub-link:hover {
  border-color: var(--clr-primary);
  color: var(--clr-primary);
  background: rgba(37,99,235,0.04);
}

.award-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.18rem 0.55rem;
  background: rgba(217,119,6,0.1);
  border: 1px solid rgba(217,119,6,0.3);
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--clr-award);
}

/* =============================================
   SKILLS
   ============================================= */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2rem;
}

.skill-group h4 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--clr-text-muted);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--clr-border);
}

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

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  background: var(--clr-bg-alt);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--clr-text-muted);
  font-family: var(--font-mono);
  transition: all var(--t-fast);
  cursor: default;
}

[data-theme="dark"] .tag {
  background: var(--clr-card);
}

.tag:hover {
  border-color: var(--clr-primary);
  color: var(--clr-primary);
  background: rgba(37,99,235,0.06);
  transform: translateY(-1px);
}

/* =============================================
   CONTACT
   ============================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.contact-text p {
  font-size: 1rem;
  color: var(--clr-text-muted);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1rem;
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  color: var(--clr-text);
  font-weight: 500;
  font-size: 0.875rem;
  transition: all var(--t-base);
}

.contact-link:hover {
  border-color: rgba(37,99,235,0.4);
  color: var(--clr-primary);
  background: rgba(37,99,235,0.03);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.contact-link-icon {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  background: var(--clr-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--clr-text-muted);
  transition: all var(--t-fast);
}

.contact-link:hover .contact-link-icon {
  background: rgba(37,99,235,0.1);
  color: var(--clr-primary);
}

/* =============================================
   FOOTER
   ============================================= */
#footer {
  padding: 1.75rem 0;
  border-top: 1px solid var(--clr-border);
  background: var(--clr-bg-alt);
}

.footer-inner {
  width: var(--container);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-text {
  font-size: 0.825rem;
  color: var(--clr-text-muted);
}

.footer-text a {
  color: var(--clr-text-muted);
  font-weight: 500;
}
.footer-text a:hover { color: var(--clr-primary); }

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--clr-text-muted);
  font-weight: 500;
}
.footer-links a:hover { color: var(--clr-primary); }

/* =============================================
   SCROLL REVEAL ANIMATIONS
   ============================================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }
.reveal-delay-5 { transition-delay: 0.40s; }

/* Hero entrance animations */
.hero-greeting  { animation: fadeSlideUp 0.6s ease 0.1s both; }
.hero-name      { animation: fadeSlideUp 0.6s ease 0.2s both; }
.hero-role      { animation: fadeSlideUp 0.6s ease 0.3s both; }
.hero-tagline   { animation: fadeSlideUp 0.6s ease 0.35s both; }
.hero-actions   { animation: fadeSlideUp 0.6s ease 0.42s both; }
.hero-social    { animation: fadeSlideUp 0.6s ease 0.5s both; }
.hero-avatar    { animation: fadeIn 0.8s ease 0.2s both; }

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.5rem;
  }

  .hero-avatar {
    order: -1;
    margin: 0 auto;
  }

  .hero-actions,
  .hero-social { justify-content: center; }
  .hero-tagline { max-width: none; }

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

@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--clr-bg);
    border-bottom: 1px solid var(--clr-border);
    padding: 0.75rem;
    flex-direction: column;
    gap: 0;
    box-shadow: var(--shadow-md);
  }

  .nav-links.open { display: flex; }

  .nav-links a {
    padding: 0.7rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
  }

  .nav-toggle { display: flex; }

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

@media (max-width: 480px) {
  .skills-grid { grid-template-columns: 1fr; }
  .timeline { padding-left: 1.5rem; }
  .timeline-dot { left: -1.375rem; }
}

/* =============================================
   PRINT STYLES
   ============================================= */
@media print {
  #navbar, .hero-avatar::before, #hero::before, #hero::after { display: none; }
  body { background: white; color: black; }
  .section { break-inside: avoid; }
}
