/* ============================================
   SWABIR M. BWANA — PORTFOLIO
   Theme: Black / Crimson Red
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #070707;
  --bg2: #0d0d0d;
  --bg3: #141414;
  --bg4: #1a1a1a;
  --red: #dc2626;
  --red-light: #ef4444;
  --red-dim: rgba(220, 38, 38, 0.12);
  --red-glow: rgba(220, 38, 38, 0.25);
  --red-glow-strong: rgba(220, 38, 38, 0.45);
  --white: #ffffff;
  --gray: #9ca3af;
  --gray-dim: #6b7280;
  --border: rgba(255, 255, 255, 0.06);
  --border-red: rgba(220, 38, 38, 0.2);
  --heading: 'Space Grotesk', sans-serif;
  --body: 'Inter', sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--body);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--red); border-radius: 2px; }

/* ---- SELECTION ---- */
::selection { background: var(--red-glow-strong); color: var(--white); }

/* ---- UTILITIES ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--red);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.section-title {
  font-family: var(--heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}
.gradient-text {
  background: linear-gradient(135deg, #ffffff 0%, #dc2626 60%, #ff6b6b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.red-text { color: var(--red); }
a { text-decoration: none; color: inherit; }

/* ---- REVEAL ANIMATIONS ---- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }
.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

/* delay classes */
.d1 { transition-delay: 0.1s; }
.d2 { transition-delay: 0.2s; }
.d3 { transition-delay: 0.3s; }
.d4 { transition-delay: 0.4s; }
.d5 { transition-delay: 0.5s; }
.d6 { transition-delay: 0.6s; }

/* ============================================
   NAVIGATION
   ============================================ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1.25rem 0;
  transition: all 0.4s var(--ease);
}
nav.scrolled {
  background: rgba(7, 7, 7, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-red);
  padding: 0.9rem 0;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--heading);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.nav-logo span { color: var(--red); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray);
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--red);
  transition: width 0.3s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--white); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-resume {
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--red);
  color: var(--red) !important;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.3s var(--ease) !important;
}
.nav-resume::after { display: none !important; }
.nav-resume:hover {
  background: var(--red) !important;
  color: var(--white) !important;
  box-shadow: 0 0 20px var(--red-glow) !important;
}
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  width: 24px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.3s var(--ease);
  display: block;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================
   HERO
   ============================================ */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
#particles-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(220, 38, 38, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(220, 38, 38, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 0;
}
.hero-glow {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.08) 0%, transparent 70%);
  z-index: 0;
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 7rem 0 4rem;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--red);
  border: 1px solid var(--border-red);
  padding: 0.35rem 0.85rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
  animation: fadeInDown 0.8s var(--ease) forwards;
}
.hero-tag::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--red);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}
.hero-name {
  font-family: var(--heading);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  animation: fadeInUp 0.8s 0.2s var(--ease) both;
}
.hero-typing-wrapper {
  height: 2rem;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s 0.3s var(--ease) both;
}
.hero-typing {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--red);
  font-weight: 500;
}
.cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--red);
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.hero-bio {
  font-size: 1.05rem;
  color: var(--gray);
  line-height: 1.75;
  max-width: 520px;
  margin-bottom: 2.5rem;
  animation: fadeInUp 0.8s 0.4s var(--ease) both;
}
.hero-bio strong { color: var(--white); font-weight: 600; }
.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s 0.5s var(--ease) both;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  background: var(--red);
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  box-shadow: 0 0 0 rgba(220,38,38,0);
}
.btn-primary:hover {
  background: var(--red-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4);
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  background: transparent;
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.3s var(--ease);
}
.btn-outline:hover {
  border-color: var(--red);
  color: var(--red);
  transform: translateY(-2px);
}
.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  animation: fadeInUp 0.8s 0.6s var(--ease) both;
}
.stat-item { text-align: center; }
.stat-number {
  font-family: var(--heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--red);
  display: block;
  line-height: 1;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--gray-dim);
  margin-top: 0.3rem;
}
.hero-visual {
  position: relative;
  animation: fadeInRight 0.8s 0.3s var(--ease) both;
}
.hero-photo-frame {
  position: relative;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}
.hero-photo-frame::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--red), transparent 60%);
  z-index: 0;
}
.hero-photo-frame::after {
  content: '';
  position: absolute;
  top: 15px; right: -15px;
  width: 100%; height: 100%;
  border: 2px solid var(--border-red);
  border-radius: 20px;
  z-index: -1;
}
.hero-photo {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: 18px;
  object-fit: cover;
  aspect-ratio: 4/5;
  display: block;
  filter: grayscale(20%) contrast(1.05);
  transition: filter 0.3s;
}
.hero-photo:hover { filter: grayscale(0%) contrast(1); }
.hero-photo-badge {
  position: absolute;
  bottom: -20px;
  left: -20px;
  background: var(--bg3);
  border: 1px solid var(--border-red);
  border-radius: 12px;
  padding: 0.75rem 1.25rem;
  z-index: 2;
  backdrop-filter: blur(10px);
}
.badge-title {
  font-family: var(--heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white);
}
.badge-sub {
  font-size: 0.7rem;
  color: var(--gray);
  margin-top: 0.15rem;
}
.badge-dot { color: var(--red); font-weight: 700; }

@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInRight { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }

/* scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  animation: fadeInUp 0.8s 1.2s var(--ease) both;
  z-index: 1;
}
.scroll-indicator span {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--gray-dim);
  letter-spacing: 0.15em;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--red), transparent);
  animation: scrollPulse 2s infinite;
}
@keyframes scrollPulse {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ============================================
   ABOUT
   ============================================ */
#about {
  padding: 7rem 0;
  background: var(--bg2);
  position: relative;
  overflow: hidden;
}
#about::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-red), transparent);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.about-photos {
  position: relative;
}
.photo-stack {
  display: grid;
  grid-template-columns: 3fr 2fr;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
  height: 440px;
}
.photo-card {
  border-radius: 14px;
  overflow: hidden;
  border: 3px solid var(--bg3);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.photo-card:hover { transform: scale(1.03); box-shadow: 0 20px 60px rgba(220,38,38,0.2); }
.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-card:nth-child(1) {
  grid-column: 1;
  grid-row: 1 / 3;
}
.photo-card:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
}
.photo-card:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
}
.about-content { }
.about-text {
  font-size: 1.05rem;
  color: var(--gray);
  line-height: 1.85;
  margin-bottom: 1.5rem;
}
.about-text strong { color: var(--white); font-weight: 600; }
.about-highlight {
  background: var(--red-dim);
  border-left: 3px solid var(--red);
  padding: 1.25rem 1.5rem;
  border-radius: 0 10px 10px 0;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  color: var(--gray);
  font-style: italic;
}
.about-highlight strong { color: var(--red); }
.about-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
}
.chip {
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--border-red);
  border-radius: 100px;
  color: var(--gray);
  background: var(--red-dim);
  transition: all 0.2s;
}
.chip:hover { background: var(--red); color: var(--white); border-color: var(--red); }

/* ============================================
   SKILLS
   ============================================ */
#skills {
  padding: 7rem 0;
  background: var(--bg);
}
.skills-header { text-align: center; margin-bottom: 4rem; }
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.skill-category {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}
.skill-category::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(to right, var(--red), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.skill-category:hover { border-color: var(--border-red); box-shadow: 0 0 30px var(--red-dim); }
.skill-category:hover::before { opacity: 1; }
.skill-cat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--red-dim);
  border: 1px solid var(--border-red);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}
.skill-cat-title {
  font-family: var(--heading);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.skill-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 0.3rem 0.7rem;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--gray);
  transition: all 0.2s;
}
.skill-tag:hover { background: var(--red-dim); border-color: var(--border-red); color: var(--white); }

/* ============================================
   PROJECTS
   ============================================ */
#projects {
  padding: 7rem 0;
  background: var(--bg2);
}
.projects-header { margin-bottom: 3rem; }
.filter-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}
.filter-btn {
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--gray);
  cursor: pointer;
  transition: all 0.25s;
}
.filter-btn:hover, .filter-btn.active {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.project-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.35s var(--ease);
  cursor: default;
  position: relative;
}
.project-card:hover {
  border-color: var(--border-red);
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.4), 0 0 30px var(--red-dim);
}
.project-card.featured {
  grid-column: span 2;
}
.project-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  background: var(--bg4);
}
.project-img-placeholder {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  background: var(--bg4);
  position: relative;
  overflow: hidden;
}
.project-img-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--red-dim) 0%, transparent 60%);
}
.project-body { padding: 1.5rem; }
.project-cat {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}
.project-title {
  font-family: var(--heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}
.project-desc {
  font-size: 0.875rem;
  color: var(--gray);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}
.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
}
.stack-tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  padding: 0.25rem 0.6rem;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--gray-dim);
}
.project-links {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--red);
  transition: all 0.2s;
}
.project-link:hover { color: var(--red-light); gap: 0.55rem; }
.project-link svg { width: 14px; height: 14px; }

/* featured card overlay text */
.project-card.featured .project-img-placeholder { height: 240px; }
.project-card.featured .project-title { font-size: 1.5rem; }

/* ============================================
   EXPERIENCE
   ============================================ */
#experience {
  padding: 7rem 0;
  background: var(--bg);
}
.experience-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: start;
}
.experience-intro { position: sticky; top: 7rem; }
.timeline {
  position: relative;
  padding-left: 2rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--red), var(--border-red), transparent);
}
.timeline-item {
  position: relative;
  margin-bottom: 3rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.4rem;
  top: 0.35rem;
  width: 10px; height: 10px;
  background: var(--bg);
  border: 2px solid var(--red);
  border-radius: 50%;
  transition: all 0.3s;
}
.timeline-item:hover::before { background: var(--red); box-shadow: 0 0 12px var(--red-glow); }
.timeline-date {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--red);
  margin-bottom: 0.35rem;
}
.timeline-role {
  font-family: var(--heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}
.timeline-org {
  font-size: 0.875rem;
  color: var(--gray);
  margin-bottom: 0.75rem;
}
.timeline-org strong { color: var(--red); }
.timeline-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.timeline-bullets li {
  font-size: 0.9rem;
  color: var(--gray);
  line-height: 1.65;
  padding-left: 1.2rem;
  position: relative;
}
.timeline-bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--red);
  font-size: 0.75rem;
  top: 0.15rem;
}

/* ============================================
   EDUCATION
   ============================================ */
#education {
  padding: 7rem 0;
  background: var(--bg2);
}
.education-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: start;
  transition: border-color 0.3s;
}
.education-card:hover { border-color: var(--border-red); }
.edu-degree {
  font-family: var(--heading);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}
.edu-school {
  font-size: 1rem;
  color: var(--red);
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.edu-year {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--gray-dim);
  margin-bottom: 1.5rem;
}
.edu-desc {
  font-size: 0.9rem;
  color: var(--gray);
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 1.5rem;
}
.awards-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.award-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.2s;
}
.award-item:hover { border-color: var(--border-red); }
.award-icon { font-size: 1.2rem; flex-shrink: 0; }
.award-text { font-size: 0.875rem; color: var(--gray); line-height: 1.5; }
.award-text strong { color: var(--white); font-size: 0.9rem; }
.edu-courses {
  text-align: right;
}
.edu-courses-title {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--gray-dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.course-tag {
  display: block;
  font-size: 0.8rem;
  color: var(--gray);
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}
.course-tag:hover { color: var(--red); }
.course-tag:last-child { border-bottom: none; }

/* ============================================
   RESEARCH
   ============================================ */
#research {
  padding: 7rem 0;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
#research::before {
  content: 'RESEARCH';
  position: absolute;
  font-family: var(--heading);
  font-size: 12rem;
  font-weight: 900;
  color: rgba(220, 38, 38, 0.03);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  white-space: nowrap;
}
.research-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.research-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.35s var(--ease);
}
.research-card.primary {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.research-card:hover { border-color: var(--border-red); box-shadow: 0 0 40px var(--red-dim); }
.research-img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
}
.research-card.primary .research-img {
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  object-position: center;
}
.research-body { padding: 2rem; }
.research-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--red);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.research-title {
  font-family: var(--heading);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 1rem;
}
.research-desc {
  font-size: 0.9rem;
  color: var(--gray);
  line-height: 1.75;
  margin-bottom: 1.5rem;
}
.research-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 0.4rem 0.9rem;
  background: var(--red-dim);
  border: 1px solid var(--border-red);
  border-radius: 100px;
  color: var(--red);
}

/* ============================================
   CONTACT
   ============================================ */
#contact {
  padding: 7rem 0;
  background: var(--bg2);
  position: relative;
  overflow: hidden;
}
#contact::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 300px;
  background: radial-gradient(ellipse, rgba(220,38,38,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.contact-title {
  font-family: var(--heading);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1rem;
}
.contact-sub {
  font-size: 1rem;
  color: var(--gray);
  line-height: 1.7;
  margin-bottom: 2rem;
}
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.contact-link-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--gray);
  font-size: 0.9rem;
  transition: all 0.3s var(--ease);
  text-decoration: none;
}
.contact-link-item:hover {
  border-color: var(--border-red);
  color: var(--white);
  transform: translateX(6px);
  background: var(--bg4);
}
.contact-link-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--red-dim);
  border: 1px solid var(--border-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.contact-link-text { flex: 1; }
.contact-link-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--gray-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.contact-link-value {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--white);
  margin-top: 0.15rem;
}
.contact-link-arrow { color: var(--red); font-size: 0.8rem; }
.contact-availability {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: #4ade80;
  margin-bottom: 2rem;
}
.avail-dot {
  width: 8px; height: 8px;
  background: #4ade80;
  border-radius: 50%;
  animation: pulse-green 2s infinite;
}
@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(74,222,128,0); }
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  padding: 2rem 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-logo {
  font-family: var(--heading);
  font-weight: 700;
  font-size: 1rem;
}
.footer-logo span { color: var(--red); }
.footer-copy {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--gray-dim);
}
.footer-socials {
  display: flex;
  gap: 1rem;
}
.footer-social {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  font-size: 0.9rem;
  transition: all 0.2s;
  text-decoration: none;
}
.footer-social:hover {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-dim);
}

/* ============================================
   MOBILE MENU
   ============================================ */
.mobile-nav {
  position: fixed;
  top: 0; right: 0;
  width: min(320px, 100vw);
  height: 100vh;
  background: var(--bg2);
  border-left: 1px solid var(--border-red);
  z-index: 999;
  transform: translateX(100%);
  transition: transform 0.4s var(--ease);
  padding: 5rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav a {
  font-family: var(--heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gray);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
  display: block;
}
.mobile-nav a:hover { color: var(--red); }
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  backdrop-filter: blur(4px);
}
.overlay.open { opacity: 1; pointer-events: all; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .project-card.featured { grid-column: span 2; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .hero-inner { grid-template-columns: 1fr; gap: 3rem; padding-top: 8rem; }
  .hero-visual { order: -1; }
  .hero-photo-frame { max-width: 280px; }
  .hero-stats { gap: 1.5rem; }
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .photo-stack { height: 280px; gap: 8px; }
  .skills-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .project-card.featured { grid-column: span 1; }
  .research-card.primary { grid-column: span 1; grid-template-columns: 1fr; }
  .research-grid { grid-template-columns: 1fr; }
  .experience-layout { grid-template-columns: 1fr; gap: 2rem; }
  .experience-intro { position: static; }
  .education-card { grid-template-columns: 1fr; gap: 2rem; }
  .edu-courses { text-align: left; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 1rem; text-align: center; }
  .research-card.primary .research-img { height: 240px; object-fit: cover; }
}
@media (max-width: 480px) {
  .container { padding: 0 1.25rem; }
  .hero-name { font-size: 2.5rem; }
  .hero-stats { flex-wrap: wrap; gap: 1rem; }
  .filter-tabs { gap: 0.35rem; }
  .filter-btn { font-size: 0.72rem; padding: 0.4rem 0.9rem; }
}

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px; height: 44px;
  background: var(--red);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s var(--ease);
  z-index: 100;
  color: var(--white);
  font-size: 1.2rem;
  box-shadow: 0 4px 20px rgba(220,38,38,0.4);
  border: none;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: var(--red-light); transform: translateY(-4px); }

/* ============================================
   PROJECT TRACK LABELS (3-category)
   ============================================ */
.track-bio { color: #4ade80; }
.track-embedded { color: #fb923c; }
.track-cs { color: var(--red); }
.track-mobile { color: #a78bfa; }

.project-cat.bio { color: #4ade80; }
.project-cat.embedded { color: #fb923c; }
.project-cat.mobile { color: #a78bfa; }

/* ============================================
   PERSONAL / BEYOND WORK SECTION
   ============================================ */
#beyond-work {
  padding: 7rem 0;
  background: var(--bg2);
  position: relative;
  overflow: hidden;
}
#beyond-work::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-red), transparent);
}
.beyond-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.interests-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}
.interest-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem 1rem;
  text-align: center;
  transition: all 0.3s var(--ease);
  cursor: default;
}
.interest-card:hover {
  border-color: var(--border-red);
  background: var(--bg4);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--red-dim);
}
.interest-icon {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 0.5rem;
}
.interest-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.2rem;
}
.interest-note {
  font-size: 0.7rem;
  color: var(--gray-dim);
  line-height: 1.4;
}
.fun-fact-box {
  background: var(--bg3);
  border: 1px solid var(--border-red);
  border-radius: 16px;
  padding: 2rem;
  margin-top: 2rem;
  position: relative;
}
.fun-fact-box::before {
  content: '"';
  position: absolute;
  top: -0.5rem; left: 1.5rem;
  font-size: 4rem;
  color: var(--red);
  font-family: var(--heading);
  line-height: 1;
  opacity: 0.4;
}
.fun-fact-text {
  font-size: 0.95rem;
  color: var(--gray);
  line-height: 1.75;
  font-style: italic;
}
.fun-fact-text strong { color: var(--white); font-style: normal; }
.beyond-quote {
  font-family: var(--heading);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 1.5rem;
}
.beyond-sub {
  font-size: 1rem;
  color: var(--gray);
  line-height: 1.75;
  margin-bottom: 1rem;
}

/* ============================================
   COURSEWORK CALLOUT (inside project cards)
   ============================================ */
.course-callout {
  background: var(--bg4);
  border-left: 2px solid var(--red);
  border-radius: 0 8px 8px 0;
  padding: 0.85rem 1rem;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--gray);
  font-family: var(--mono);
}

/* ============================================
   RESEARCH POSTER IMAGE
   ============================================ */
.research-poster-wrap {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-red);
  margin-bottom: 1.5rem;
}
.research-poster-wrap img {
  width: 100%;
  display: block;
}

/* ============================================
   EXTRA EXPERIENCE TIMELINE STYLES
   ============================================ */
.timeline-item.award::before {
  border-color: #fbbf24;
  background: var(--bg);
}
.timeline-item.award:hover::before {
  background: #fbbf24;
  box-shadow: 0 0 12px rgba(251,191,36,0.5);
}
.timeline-date.award-date { color: #fbbf24; }

/* ============================================
   ADDITIONAL RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .beyond-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .interests-grid { grid-template-columns: repeat(2, 1fr); }
}
