:root {
  /* Dark Mode Palette */
  --bg-body: #02040a;
  --bg-surface: #0d1117;
  --bg-surface-hover: #161b22;
  --text-main: #ffffff;
  --text-muted: #8b949e;
  
  /* Accents */
  --accent: #4B9CD3; /* Carolina Blue */
  --gold: #FFD700;
  
  --radius: 24px;
  --transition: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; } /* Ensure smooth scrolling for anchor clicks */

body {
  background-color: var(--bg-body);
  color: var(--text-main);
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; 
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
a { text-decoration: none; color: inherit; transition: color 0.2s; }
ul { list-style: none; }

/* Navbar */
.navbar {
  position: fixed;
  top: 20px; left: 50%;
  transform: translateX(-50%);
  width: 90%; max-width: 600px;
  height: 56px;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; padding: 0 24px; }
.logo { font-weight: 800; font-size: 1.1rem; letter-spacing: -0.05em; }
.nav-links { display: flex; gap: 20px; align-items: center; }

/* Nav Link Base Styles */
.nav-links a { 
  font-size: 0.85rem; 
  color: var(--text-muted); 
  font-weight: 500; 
  position: relative; /* For the active dot */
  transition: color 0.3s ease;
}
.nav-links a:hover { color: var(--text-main); }

/* --- NEW: Active State Highlighting --- */
.nav-links a.active {
  color: var(--text-main);
}
/* Exclude the contact button from the dot style, apply to text links only */
.nav-links a:not(.btn-nav).active::after {
  content: "";
  position: absolute;
  bottom: -6px; /* Position below text */
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background-color: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent); /* Glowing effect */
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  from { transform: translateX(-50%) scale(0); }
  to { transform: translateX(-50%) scale(1); }
}

/* Contact Button Specifics */
.btn-nav { background: rgba(255,255,255,0.1); padding: 6px 14px; border-radius: 20px; color: #fff !important; }
.btn-nav:hover { background: #fff; color: #000 !important; }
/* If contact is active, maybe just brighten the background slightly */
.btn-nav.active { background: rgba(255,255,255,0.2); }


/* Hero */
.hero {
  min-height: 90vh;
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 100px; padding-bottom: 60px;
  gap: 40px;
  position: relative; z-index: 1;
}
.hero-text { flex: 1; z-index: 2; }
.hero-visual { flex: 1; display: flex; justify-content: center; position: relative; }

.eyebrow { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; color: var(--accent); letter-spacing: 0.15em; margin-bottom: 1.5rem; }
.headline { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; margin-bottom: 1.5rem; }
.gradient-text { background: linear-gradient(120deg, #fff 30%, var(--accent) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.sub-headline { font-size: 1.15rem; color: var(--text-muted); max-width: 500px; font-weight: 300; margin-bottom: 2.5rem; }

.hero-stats { display: flex; gap: 2.5rem; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.5rem; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-size: 1.5rem; font-weight: 700; color: var(--text-main); }
.stat-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 4px; }

/* Hero Avatar */
.avatar-container { position: relative; width: 320px; height: 320px; }
.avatar-ring { position: absolute; inset: -20px; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0%, var(--accent)); animation: spin 4s linear infinite; opacity: 1; filter: blur(20px); z-index: 0; }
.avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; position: relative; z-index: 2; border: 4px solid var(--bg-body); box-shadow: 0 20px 50px rgba(0,0,0,0.8); }
.floating-badge { position: absolute; z-index: 3; background: rgba(20, 20, 25, 0.8); backdrop-filter: blur(10px); padding: 8px 16px; border-radius: 50px; font-size: 0.8rem; font-weight: 600; border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 10px 20px rgba(0,0,0,0.3); }

/* --- 1. NEW ANIMATIONS (Fixes the jumping bug) --- */
/* Standard float */
@keyframes float { 
  0%, 100% { transform: translateY(0px); } 
  50% { transform: translateY(-10px); } 
}
/* Float for items that need Horizontal Centering (Top/Bottom) */
@keyframes float-center { 
  0%, 100% { transform: translateX(-50%) translateY(0px); } 
  50% { transform: translateX(-50%) translateY(-10px); } 
}
/* Float for items that need Vertical Centering (Left/Right) */
@keyframes float-middle { 
  0%, 100% { transform: translateY(-50%) translateX(0px); } 
  50% { transform: translateY(-50%) translateX(0px) translateY(-10px); } 
}

/* --- 2. BADGE POSITIONS (Tightened Orbit) --- */

/* Top Center - Closer to head */
.badge-1 { 
  top: -25px; left: 50%; 
  animation: float-center 6s ease-in-out infinite 0s; 
}

/* Top Right - Tucked in */
.badge-2 { 
  top: 20px; right: -25px; 
  animation: float 5.5s ease-in-out infinite 1s; 
}

/* Right Middle - Closer to ear */
.badge-3 { 
  top: 50%; right: -55px; 
  animation: float-middle 7s ease-in-out infinite 2s; 
}

/* Bottom Right - Tucked in */
.badge-4 { 
  bottom: 20px; right: -25px; 
  animation: float 6s ease-in-out infinite 0.5s; 
}

/* Bottom Center - Closer to chin */
.badge-5 { 
  bottom: -25px; left: 50%; 
  animation: float-center 5s ease-in-out infinite 1.5s; 
}

/* Bottom Left - Tucked in */
.badge-6 { 
  bottom: 20px; left: -25px; 
  animation: float 6.5s ease-in-out infinite 3s; 
}

/* Left Middle - Closer to ear */
.badge-7 { 
  top: 50%; left: -55px; 
  animation: float-middle 6s ease-in-out infinite 2.5s; 
}

/* Top Left - Tucked in */
.badge-8 { 
  top: 20px; left: -25px; 
  animation: float 5s ease-in-out infinite 0.2s; 
}

@keyframes spin { 100% { transform: rotate(360deg); } }

/* Ticker */
.ticker-wrap { 
  width: 100%; 
  overflow: hidden; 
  background: rgba(255,255,255,0.02); 
  border-top: 1px solid rgba(255,255,255,0.05); 
  border-bottom: 1px solid rgba(255,255,255,0.05); 
  padding: 30px 0; 
  margin-bottom: 40px; 
}

.ticker-mask { 
  /* Mask edges for a smooth fade-in/out effect */
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); 
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); 
  overflow: hidden; 
}

.ticker { 
  display: inline-flex; 
  white-space: nowrap; 
  /* Run continually */
  animation: ticker-scroll 40s linear infinite; 
}

.ticker-item { 
  display: inline-block; 
  font-size: 1.5rem; 
  font-weight: 700; 
  color: rgba(255,255,255,0.3); 
  margin: 0 40px; 
  text-transform: uppercase; 
  letter-spacing: 0.05em; 
  transition: color 0.3s; 
}

.ticker-item:hover { 
  color: var(--accent); 
  cursor: default; 
}

/* CHANGED: Only scroll -50% because the JS doubles the content. 
   When it hits -50%, the second set is exactly where the first started. */
@keyframes ticker-scroll { 
  0% { transform: translateX(0); } 
  100% { transform: translateX(-50%); } 
}

/* Bento Grid */
.section { padding: 80px 0; position: relative; z-index: 1; }
.section-header { margin-bottom: 60px; }
.section-header h2 { font-size: 2.5rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 10px; }
.section-desc { color: var(--text-muted); font-size: 1.1rem; }

.bento-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 320px); gap: 24px; }
.bento-card { background: var(--bg-surface); border-radius: var(--radius); padding: 32px; position: relative; overflow: hidden; border: 1px solid rgba(255,255,255,0.05); transition: transform 0.4s var(--transition), box-shadow 0.4s var(--transition); display: flex; flex-direction: column; cursor: pointer; }
.bento-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(0,0,0,0.4); background: var(--bg-surface-hover); border-color: rgba(255,255,255,0.1); }
.large { grid-column: span 2; }
.tall { grid-row: span 2; }
.medium { grid-column: span 1; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.tag { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.05em; }
.award-pill { background: rgba(255, 215, 0, 0.1); color: var(--gold); font-size: 0.75rem; padding: 4px 10px; border-radius: 20px; font-weight: 700; }
.bento-card h3 { font-size: 1.6rem; margin-bottom: 12px; font-weight: 700; }
.bento-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; margin-bottom: auto; }
.tech-stack { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tech-stack span { font-size: 0.75rem; background: rgba(255,255,255,0.05); padding: 6px 12px; border-radius: 12px; color: var(--text-muted); }
.tech-stack.small span { padding: 4px 8px; font-size: 0.7rem; }
.click-hint { font-size: 0.75rem; font-weight: 600; color: var(--accent); margin-top: 12px; opacity: 0; transform: translateY(10px); transition: all 0.3s ease; }
.bento-card:hover .click-hint { opacity: 1; transform: translateY(0); }
.card-bg-glow { position: absolute; top: -50%; right: -50%; width: 100%; height: 100%; filter: blur(80px); opacity: 0.15; pointer-events: none; border-radius: 50%; }
.blue { background: var(--accent); }
.purple { background: #9D4EDD; }

/* --- REFINED TIMELINE (Liquid Glass Style) --- */
.timeline {
  position: relative;
  padding: 40px 0;
  max-width: 1000px;
  margin: 0 auto;
}

/* The vertical guide rail - sleek and centered on the left */
.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 20px; /* Fixed anchor position */
  width: 2px;
  background: linear-gradient(to bottom, 
    rgba(255, 255, 255, 0) 0%, 
    rgba(255, 255, 255, 0.1) 15%, 
    rgba(255, 255, 255, 0.1) 85%, 
    rgba(255, 255, 255, 0) 100%
  );
  z-index: 0;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 160px 1fr; /* Distinct separation: Date vs Card */
  gap: 30px;
  margin-bottom: 40px;
  padding-left: 50px; /* Space reserved for the dot/line */
}

/* The Dot (Static Anchor) - Stays on the line */
.timeline-item::before {
  content: "";
  position: absolute;
  left: 14px; /* Perfectly centered on the 2px line at left:20px */
  top: 32px; /* Aligns with the card title */
  width: 14px;
  height: 14px;
  background: var(--bg-body);
  border: 2px solid rgba(255, 255, 255, 0.2); /* Subtle inactive state */
  border-radius: 50%;
  z-index: 2;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 0 0 4px var(--bg-body); /* Creates the "gap" visually */
}

/* Active State for Dot on Hover - Glows instead of moving */
.timeline-item:hover::before {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 6px rgba(75, 156, 211, 0.2), 0 0 20px var(--accent);
  transform: scale(1.2);
}

/* Left Side (Date & Role) */
.timeline-left {
  text-align: right;
  padding-top: 6px; /* Visual alignment with right card title */
}

.date {
  display: block;
  font-family: "Inter", monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  opacity: 0.7;
}

.role {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-main);
  line-height: 1.2;
  transition: color 0.3s ease;
}

.timeline-item:hover .role {
  color: var(--accent);
}

/* Right Side (The Liquid Glass Card) */
.timeline-right {
  position: relative;
  background: rgba(255, 255, 255, 0.02); /* Very subtle fill */
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 24px 32px;
  backdrop-filter: blur(12px); /* The "Frosted Glass" effect */
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Card Hover Effect - Lifts up and brightens */
.timeline-item:hover .timeline-right {
  transform: translateY(-5px) scale(1.01);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Typography inside the card */
.timeline-right h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: #fff;
}

.institution {
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 16px;
  font-weight: 500;
  display: inline-block;
  letter-spacing: 0.02em;
}

.timeline-right p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
  .timeline::before { left: 20px; } 
  
  .timeline-item {
    grid-template-columns: 1fr; /* Stack vertically */
    gap: 12px;
    padding-left: 50px; 
    margin-bottom: 30px;
  }
  
  .timeline-left {
    text-align: left;
    margin-bottom: 4px;
  }
  
  .timeline-right {
    padding: 20px;
  }
}

/* Awards */
.awards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.award-card { background: var(--bg-surface); border: 1px solid rgba(255,255,255,0.05); padding: 24px; border-radius: 16px; text-align: center; transition: transform 0.2s; }
.award-card:hover { transform: translateY(-5px); background: var(--bg-surface-hover); }
.award-card.gold { border-color: rgba(255, 215, 0, 0.3); background: linear-gradient(180deg, rgba(255,215,0,0.05), transparent); }
.award-card.silver { border-color: rgba(192, 192, 192, 0.3); }
.award-icon { font-size: 2.5rem; margin-bottom: 15px; display: block; }
.award-card h3 { font-size: 0.9rem; font-weight: 700; margin-bottom: 5px; color: var(--text-main); }
.award-card p { font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; }

/* Footer & Contact */
.center-text { text-align: center; }
.contact-lead { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 30px; max-width: 600px; margin-left: auto; margin-right: auto; }
.button-row { display: flex; gap: 16px; justify-content: center; margin-bottom: 30px; }
.btn { padding: 14px 32px; border-radius: 50px; font-weight: 600; font-size: 1rem; transition: transform 0.2s var(--transition); }
.btn:hover { transform: scale(1.05); }
.btn.primary { background: var(--text-main); color: var(--bg-body); }
.btn.secondary { background: rgba(255,255,255,0.1); color: var(--text-main); }
.contact-meta { color: var(--text-muted); font-size: 0.9rem; }
.contact-meta a { border-bottom: 1px solid rgba(255,255,255,0.2); }
.site-footer { padding: 40px; text-align: center; font-size: 0.8rem; color: var(--text-muted); margin-top: 40px; position: relative; z-index: 1; }

/* Animations */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s var(--transition); }
.reveal.active { opacity: 1; transform: translateY(0); transition-delay: var(--delay, 0ms); }

/* --- FLUID LIQUID GLASS MODAL CSS --- */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  z-index: 1000; display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity 0.4s ease-in-out, visibility 0.4s; padding: 0;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-wrapper { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; pointer-events: none; }

.modal-card {
  pointer-events: auto; position: relative; background: rgba(22, 27, 34, 0.85);
  backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%);
  width: 90%; max-width: 650px; max-height: 85vh; border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--accent) transparent;
  display: none; opacity: 0; transform: scale(0.9) translateY(30px);
  transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}
.modal-card.rendering { display: block; }
.modal-card.active { display: block; opacity: 1; transform: scale(1) translateY(0); }
.modal-card::-webkit-scrollbar { width: 6px; }
.modal-card::-webkit-scrollbar-track { background: transparent; }
.modal-card::-webkit-scrollbar-thumb { background-color: var(--accent); border-radius: 20px; }

.nav-arrow {
  pointer-events: auto; position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.1);
  color: white; width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem; cursor: pointer;
  z-index: 1010; backdrop-filter: blur(10px); transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.nav-arrow:hover { background: rgba(255, 255, 255, 0.9); color: black; transform: translateY(-50%) scale(1.15); box-shadow: 0 0 20px rgba(255, 255, 255, 0.4); }
.nav-prev { left: 4%; }
.nav-next { right: 4%; }

@media (max-width: 768px) { .nav-arrow { display: none; } .modal-card { width: 100%; height: 100%; border-radius: 0; } }

/* Internal Content */
.modal-close {
  position: sticky; top: 15px; float: right; margin-right: 15px; margin-top: 15px;
  background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.1); color: white;
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer; z-index: 100; font-size: 1rem;
  transition: background 0.2s; backdrop-filter: blur(10px);
}
.modal-close:hover { background: rgba(255,255,255,0.9); color: black; }
.modal-header { padding: 40px 40px 20px 40px; }
.modal-body { padding: 0 40px 60px 40px; }
.modal-banner { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; margin-bottom: 24px; margin-top: 30px; border: 1px solid rgba(255, 255, 255, 0.08); background-color: #0d1117; }
.modal-skills { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.modal-skill-tag { background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.05); padding: 6px 14px; border-radius: 50px; font-size: 0.75rem; color: var(--text-main); display: flex; align-items: center; gap: 6px; }
.modal-tag { text-transform: uppercase; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 10px; }
.modal-header h2 { font-size: 2rem; font-weight: 800; line-height: 1.1; margin: 0; }
.modal-section-title { display: flex; align-items: center; gap: 12px; margin-top: 24px; margin-bottom: 12px; font-size: 0.9rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); }
.modal-section-title::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, 0.1); }
.modal-list li { position: relative; padding-left: 20px; margin-bottom: 10px; color: #c9d1d9; font-size: 0.95rem; }
.modal-list li::before { content: "•"; color: var(--accent); position: absolute; left: 0; font-weight: bold; }
.gradient-blue { background: linear-gradient(135deg, rgba(75, 156, 211, 0.2), transparent); }
.gradient-purple { background: linear-gradient(135deg, rgba(157, 78, 221, 0.2), transparent); }
.gradient-dark { background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent); }

/* --- INTERACTIVE BACKGROUND BLOBS --- */
#blob-container {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1;
  overflow: hidden; pointer-events: none; background: var(--bg-body);
}
.blob { position: absolute; border-radius: 50%; filter: blur(50px); opacity: 0.6; will-change: transform; transition: background 1s ease; }