/* ============================================================
   JAYAKUMAR SADHASIVAM — Academic Portfolio
   Theme: Dark Cyber-Academic
   Typography: Cormorant Garamond + Outfit + IBM Plex Mono
   ============================================================ */

/* --- Design Tokens --- */
:root {
  /* Backgrounds */
  --bg-deep: #060a14;
  --bg-primary: #080c18;
  --bg-secondary: #0d1224;
  --bg-card: #111833;
  --bg-card-hover: #162040;
  --bg-surface: #1a2444;

  /* Accents */
  --accent: #00e5bf;
  --accent-dim: #00b89a;
  --accent-glow: rgba(0, 229, 191, 0.12);
  --accent-glow-strong: rgba(0, 229, 191, 0.25);
  --gold: #f5c542;
  --gold-dim: #d4a832;
  --indigo: #818cf8;
  --rose: #fb7185;

  /* Text */
  --text-bright: #f1f5fb;
  --text-primary: #d5dce8;
  --text-secondary: #8a95ab;
  --text-muted: #525e74;

  /* Borders & Effects */
  --border: #1a2541;
  --border-light: #243054;
  --glow-sm: 0 0 15px rgba(0, 229, 191, 0.08);
  --glow-md: 0 0 30px rgba(0, 229, 191, 0.12);
  --glow-lg: 0 4px 60px rgba(0, 229, 191, 0.15);

  /* Spacing */
  --section-pad: clamp(4rem, 8vw, 7rem);
  --container-max: 1280px;

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: var(--bg-deep);
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--gold);
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', serif;
  color: var(--text-bright);
  line-height: 1.15;
  font-weight: 600;
}

.mono {
  font-family: 'IBM Plex Mono', monospace;
}

/* --- Utility --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

.section-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.section-label::before {
  content: '';
  width: 2rem;
  height: 1px;
  background: var(--accent);
}

.section-title {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  margin-bottom: 1.25rem;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.8;
}

/* --- Reveal Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* --- Section Divider --- */
.section-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-light), transparent);
  margin: 0;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: all 0.4s var(--ease-out-expo);
}

.nav.scrolled {
  background: rgba(6, 10, 20, 0.85);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--border);
  padding: 0.65rem 0;
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo-img {
  height: 32px;
  width: auto;
  display: inline-block;
}

.nav.scrolled .nav-logo-img {
  height: 28px;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  text-transform: uppercase;
  position: relative;
  padding: 0.25rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease-out-expo);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

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

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

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

/* Mobile Nav */
.nav-mobile {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(6, 10, 20, 0.97);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

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

.nav-mobile a {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.nav-mobile a:hover {
  color: var(--accent);
}

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

/* Animated mesh gradient background */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -20%;
  width: 70vw;
  height: 70vw;
  max-width: 900px;
  max-height: 900px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 229, 191, 0.06) 0%, transparent 70%);
  animation: hero-pulse 8s ease-in-out infinite;
}

.hero-bg::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -15%;
  width: 50vw;
  height: 50vw;
  max-width: 700px;
  max-height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.04) 0%, transparent 70%);
  animation: hero-pulse 10s ease-in-out infinite reverse;
}

@keyframes hero-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.7; }
}

/* Grid pattern overlay */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 229, 191, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 191, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 20%, transparent 100%);
}

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

.hero-content {
  max-width: 620px;
}

.hero-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.hero-tag::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero-name {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: 1rem;
}

.hero-name .gradient-text {
  background: linear-gradient(135deg, var(--text-bright) 0%, var(--accent) 50%, var(--gold) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 6s ease-in-out infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

.hero-titles {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  min-height: 1.6em;
}

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

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 2rem;
  max-width: 520px;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: 4px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.35s var(--ease-out-expo);
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-deep);
}

.btn-primary:hover {
  background: var(--text-bright);
  color: var(--bg-deep);
  box-shadow: var(--glow-lg);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* Hero Photo */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-photo-wrapper {
  position: relative;
  width: 340px;
  height: 340px;
}

.hero-photo-wrapper::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), var(--indigo), var(--gold), var(--accent));
  animation: rotate-border 8s linear infinite;
  opacity: 0.5;
}

@keyframes rotate-border {
  to { transform: rotate(360deg); }
}

.hero-photo-wrapper::after {
  content: '';
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  border: 1px dashed var(--border-light);
  animation: rotate-border 30s linear infinite reverse;
}

.hero-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  position: relative;
  z-index: 1;
  border: 3px solid var(--bg-deep);
}

/* Hero Stats */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  grid-column: 1 / -1;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.stat-number .suffix {
  font-size: 1.5rem;
  color: var(--gold);
}

.stat-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

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

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 2.5rem;
}

.about-text {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text-secondary);
}

.about-text p {
  margin-bottom: 1.25rem;
}

.about-text strong {
  color: var(--text-bright);
}

/* Dual Track Cards */
.track-cards {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.track-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--ease-out-expo);
}

.track-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  border-radius: 3px 0 0 3px;
}

.track-card:hover {
  border-color: var(--border-light);
  transform: translateX(4px);
  box-shadow: var(--glow-sm);
}

.track-card.track-career::before {
  background: var(--gold);
}

.track-card.track-academia::before {
  background: var(--accent);
}

.track-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.5rem;
}

.track-career .track-tag { color: var(--gold); }
.track-academia .track-tag { color: var(--accent); }

.track-card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.6rem;
}

.track-card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================================
   EXPERTISE SECTION
   ============================================================ */
.expertise {
  padding: var(--section-pad) 0;
  background: var(--bg-secondary);
}

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.expertise-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
  transition: all 0.4s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}

.expertise-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out-expo);
}

.expertise-item:hover {
  border-color: var(--border-light);
  transform: translateY(-4px);
  box-shadow: var(--glow-sm);
}

.expertise-item:hover::after {
  transform: scaleX(1);
}

.expertise-icon {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
  display: block;
}

.expertise-item h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.expertise-item p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
}

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

.portfolio-section:nth-child(even) {
  background: var(--bg-secondary);
}

.portfolio-content {
  margin-top: 2.5rem;
}

/* Portfolio Subsection Nav */
.portfolio-nav {
  position: sticky;
  top: 60px;
  z-index: 50;
  background: rgba(6, 10, 20, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

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

.portfolio-nav .container {
  display: flex;
  gap: 0.25rem;
}

.portfolio-nav-btn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 0.55rem 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.portfolio-nav-btn:hover {
  color: var(--text-primary);
  border-color: var(--border);
}

.portfolio-nav-btn.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
}

/* --- Info Cards (used in Administrative, Teaching, etc.) --- */
.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  transition: all 0.4s var(--ease-out-expo);
  position: relative;
}

.info-card:hover {
  border-color: var(--border-light);
  transform: translateY(-3px);
  box-shadow: var(--glow-sm);
}

.info-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1.25rem;
}

.info-card-icon.teal { background: rgba(0, 229, 191, 0.1); }
.info-card-icon.gold { background: rgba(245, 197, 66, 0.1); }
.info-card-icon.indigo { background: rgba(129, 140, 248, 0.1); }
.info-card-icon.rose { background: rgba(251, 113, 133, 0.1); }

.info-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.info-card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.info-card .highlight-stat {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
  margin-bottom: 0.2rem;
}

/* --- Tag List --- */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  padding: 0.4rem 0.85rem;
  border-radius: 3px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

.tag.tag-accent {
  border-color: rgba(0, 229, 191, 0.3);
  color: var(--accent);
  background: var(--accent-glow);
}

.tag.tag-gold {
  border-color: rgba(245, 197, 66, 0.3);
  color: var(--gold);
  background: rgba(245, 197, 66, 0.06);
}

.tag.tag-indigo {
  border-color: rgba(129, 140, 248, 0.3);
  color: var(--indigo);
  background: rgba(129, 140, 248, 0.06);
}

/* --- Timeline --- */
.timeline {
  position: relative;
  padding-left: 2.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, var(--accent), var(--border));
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.5rem;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-deep);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.timeline-item h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.timeline-item .timeline-meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.timeline-item p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- Skill Matrix (for Skills section) --- */
.skill-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.skill-group h4 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.skill-bar-item {
  margin-bottom: 1rem;
}

.skill-bar-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.skill-bar-label span {
  font-size: 0.88rem;
  color: var(--text-primary);
}

.skill-bar-label .percentage {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.skill-bar {
  width: 100%;
  height: 4px;
  background: var(--bg-surface);
  border-radius: 2px;
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  width: 0;
  transition: width 1.2s var(--ease-out-expo);
}

/* --- Mozilla Projects Grid (for Volunteer) --- */
.mozilla-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.mozilla-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.4s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}

.mozilla-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.mozilla-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-light);
  box-shadow: var(--glow-md);
}

.mozilla-card:hover::before {
  opacity: 1;
}

.mozilla-card-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.mozilla-card h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.mozilla-card .full-name {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.mozilla-card p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Certification Grid --- */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.75rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  transition: all 0.4s var(--ease-out-expo);
}

.cert-card:hover {
  border-color: var(--border-light);
  transform: translateY(-3px);
  box-shadow: var(--glow-sm);
}

.cert-badge {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 8px;
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.cert-card h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.cert-card .cert-issuer {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.cert-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  line-height: 1.6;
}

/* --- No-Code Tools --- */
.nocode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.nocode-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  transition: all 0.4s var(--ease-out-expo);
}

.nocode-card:hover {
  border-color: var(--border-light);
  transform: translateY(-3px);
  box-shadow: var(--glow-sm);
}

.nocode-card h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nocode-card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

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

.contributions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.contribution-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  transition: all 0.4s var(--ease-out-expo);
  position: relative;
}

.contribution-card:hover {
  border-color: var(--border-light);
  transform: translateY(-3px);
  box-shadow: var(--glow-sm);
}

.contribution-card .card-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--border-light);
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  line-height: 1;
}

.contribution-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  padding-right: 2rem;
}

.contribution-card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================================
   ARTICLES SECTION
   ============================================================ */
.articles {
  padding: var(--section-pad) 0;
  background: var(--bg-secondary);
}

.articles-grid {
  display: flex;
  gap: 1.5rem;
  margin-top: 2.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 1rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,229,191,0.3) transparent;
}

.articles-grid::-webkit-scrollbar {
  height: 6px;
}
.articles-grid::-webkit-scrollbar-track {
  background: transparent;
}
.articles-grid::-webkit-scrollbar-thumb {
  background: rgba(0,229,191,0.25);
  border-radius: 3px;
}
.articles-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(0,229,191,0.45);
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.4s var(--ease-out-expo);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  min-width: 340px;
  max-width: 380px;
  flex-shrink: 0;
  scroll-snap-align: start;
  text-decoration: none;
}

.article-card:hover {
  border-color: var(--border-light);
  transform: translateY(-5px);
  box-shadow: var(--glow-md);
}

.article-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-card-date {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.article-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.6rem;
  color: var(--text-bright);
  transition: color 0.3s ease;
}

.article-card:hover h3 {
  color: var(--accent);
}

.article-card-excerpt {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.article-card-tags .tag {
  font-size: 0.65rem;
  padding: 0.25rem 0.6rem;
}

.article-card-link {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: gap 0.3s ease;
}

.article-card:hover .article-card-link {
  gap: 0.7rem;
}

.articles-empty {
  text-align: center;
  padding: 3rem;
}

.articles-empty p {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ============================================================
   STUDENT TESTIMONIALS — Auto-scrolling ticker
   ============================================================ */
.testimonials {
  padding: var(--section-pad) 0;
  background: var(--bg-deep);
  overflow: hidden;
}

.testimonial-ticker-wrap {
  position: relative;
  height: 320px;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, transparent 0%, #000 12%, #000 88%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 12%, #000 88%, transparent 100%);
}

.testimonial-ticker {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: tickerScroll var(--ticker-duration, 60s) linear infinite;
}

.testimonial-ticker:hover {
  animation-play-state: paused;
}

@keyframes tickerScroll {
  0% { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}

.testimonial-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 12px;
  padding: 1.2rem 1.5rem;
  flex-shrink: 0;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
  border-color: rgba(0,229,191,0.15);
  box-shadow: 0 4px 20px rgba(0,229,191,0.06);
}

.testimonial-quote {
  font-size: 0.92rem;
  color: var(--text-primary);
  line-height: 1.7;
  font-style: italic;
  margin: 0 0 0.75rem 0;
  position: relative;
  padding-left: 1rem;
  border-left: 2px solid var(--accent);
}

.testimonial-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.testimonial-course {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  color: var(--accent);
  background: rgba(0,229,191,0.08);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

.testimonial-semester {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* ============================================================
   CONTACT / FOOTER
   ============================================================ */
.contact {
  padding: var(--section-pad) 0;
  background: var(--bg-secondary);
  text-align: center;
}

.contact .section-label {
  justify-content: center;
}

.contact .section-label::before {
  display: none;
}

.contact .section-title {
  margin-bottom: 0.75rem;
}

.contact-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 550px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.82rem;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  transition: all 0.35s var(--ease-out-expo);
}

.contact-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--glow-sm);
}

.contact-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Footer */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer p {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.footer .heart {
  color: var(--rose);
}

/* ============================================================
   SCROLL PROGRESS BAR
   ============================================================ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  z-index: 1001;
  width: 0%;
  transition: width 0.1s linear;
}

/* ============================================================
   BACK TO TOP BUTTON
   ============================================================ */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.4s var(--ease-out-expo);
  z-index: 100;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--accent);
  color: var(--bg-deep);
  box-shadow: var(--glow-md);
  transform: translateY(-3px);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* ============================================================
   RESPONSIVE — TABLET (768px – 1024px)
   ============================================================ */
@media (max-width: 1024px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-desc {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }

  .hero-photo-wrapper {
    width: 260px;
    height: 260px;
  }

  .hero-stats {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .info-cards {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

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

/* ============================================================
   RESPONSIVE — MOBILE (< 768px)
   ============================================================ */
@media (max-width: 768px) {
  html {
    scroll-padding-top: 70px;
  }

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    min-height: auto;
    padding: 7rem 0 3rem;
  }

  .hero-photo-wrapper {
    width: 200px;
    height: 200px;
  }

  .hero-name {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  .section-title {
    font-size: clamp(1.6rem, 5vw, 2.4rem);
  }

  .info-cards {
    grid-template-columns: 1fr;
  }

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

  .skill-matrix {
    grid-template-columns: 1fr;
  }

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

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

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

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

  .articles-grid {
    gap: 1rem;
  }

  .article-card {
    min-width: 280px;
    max-width: 300px;
  }

  .testimonial-ticker-wrap {
    height: 260px;
  }

  .testimonial-card {
    padding: 1rem 1.2rem;
  }

  .testimonial-quote {
    font-size: 0.85rem;
  }

  .contact-links {
    flex-direction: column;
    align-items: center;
  }

  .portfolio-nav {
    top: 55px;
  }

  .portfolio-nav-btn {
    font-size: 0.68rem;
    padding: 0.45rem 0.75rem;
  }

  .back-to-top {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 480px) {
  .mozilla-grid {
    grid-template-columns: 1fr;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}
