/* ---- Variables ---- */
:root {
  --bg: #0d0d0f;
  --bg-alt: #111116;
  --surface: #16161e;
  --border: #ffffff12;
  --accent: #00d4ff;
  --accent-dim: #00d4ff22;
  --text: #e2e2e2;
  --text-muted: #888;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 12px;
  --transition: 0.3s ease;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.7;
  overflow-x: hidden;
}

/* Animated dot grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, #ffffff0d 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
.accent { color: var(--accent); }

/* ---- Layout ---- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

.section {
  padding: 100px 0;
  position: relative;
}

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

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/* ---- Nav ---- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background var(--transition), backdrop-filter var(--transition);
}

.nav.scrolled {
  background: rgba(13, 13, 15, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.2rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width var(--transition);
  border-radius: 2px;
}

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

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

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.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 {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0 2rem;
}

.hero-content {
  max-width: 800px;
  text-align: center;
  position: relative;
  z-index: 1;
}


.hero-name {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #ffffff 40%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  animation: fade-up 0.7s ease 0.4s forwards;
}

.hero-role {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: var(--text-muted);
  margin-bottom: 3rem;
  min-height: 2rem;
  opacity: 0;
  animation: fade-up 0.7s ease 0.6s forwards;
}

.role-prefix { color: var(--accent); }

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

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

.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fade-up 0.7s ease 0.8s forwards;
}

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

.btn {
  padding: 0.8rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition);
  display: inline-block;
}

.btn-primary {
  background: var(--accent);
  color: #000;
}

.btn-primary:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 212, 255, 0.35);
}

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

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

.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0;
  animation: fade-up 0.7s ease 1.2s forwards;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scroll-pulse 2s ease infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ---- About ---- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

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

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

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: border-color var(--transition), transform var(--transition);
}

.stat-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 212, 255, 0.08);
}

.stat-number {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--accent);
}

.stat-plus {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--accent);
  font-weight: 600;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent) 0%, rgba(0,212,255,0.1) 80%, transparent 100%);
}

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

.timeline-dot {
  position: absolute;
  left: -2.6rem;
  top: 0.45rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 2px solid var(--accent);
  box-shadow: 0 0 14px rgba(0, 212, 255, 0.5);
}

.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  transition: border-color var(--transition), transform var(--transition);
}

.timeline-card:hover {
  border-color: rgba(0, 212, 255, 0.3);
  transform: translateX(4px);
}

.timeline-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.25rem;
  flex-wrap: wrap;
}

.timeline-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.timeline-badge {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(0, 212, 255, 0.3);
  letter-spacing: 1px;
  text-transform: uppercase;
}

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

.timeline-date {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-family: var(--font-mono);
  margin-bottom: 1rem;
}

.timeline-card ul li {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding-left: 1.1rem;
  position: relative;
  margin-bottom: 0.4rem;
}

.timeline-card ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.7rem;
  top: 0.15rem;
}

/* ---- Projects ---- */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0, 212, 255, 0.1);
}

.project-icon {
  font-size: 2.5rem;
  line-height: 1;
}

.project-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
}

.project-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  flex: 1;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.tag {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(0, 212, 255, 0.2);
  letter-spacing: 0.5px;
}

/* ---- Skills ---- */
.skills-container {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.skill-group-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 1rem;
}

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pill {
  padding: 0.5rem 1.2rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--surface);
  transition: all var(--transition);
  cursor: default;
}

.pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 18px var(--accent-dim);
  transform: translateY(-2px);
}

/* ---- Honors ---- */
.honors-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.honor-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1rem;
  text-align: center;
  transition: border-color var(--transition), transform var(--transition);
}

.honor-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 212, 255, 0.08);
}

.honor-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  display: block;
}

.honor-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ---- Contact ---- */
.contact-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
  margin-top: -1.5rem;
}

.contact-cards {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.8rem;
  font-size: 0.95rem;
  transition: all var(--transition);
}

.contact-card:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0, 212, 255, 0.12);
}

.contact-icon {
  font-size: 1.2rem;
}

/* ---- Footer ---- */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

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

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--accent); }

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

/* ---- Scroll Reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .honors-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  .section { padding: 70px 0; }
  .projects-grid { grid-template-columns: 1fr; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(13, 13, 15, 0.97);
    backdrop-filter: blur(14px);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open { display: flex; }
  .nav-links li a { padding: 0.85rem 2rem; display: block; }
  .hamburger { display: flex; }
  .hero-btns { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
  .honors-grid { grid-template-columns: 1fr; }
  .contact-cards { flex-direction: column; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
}
