:root {
  --bg: #05070a;
  --bg-alt: #0a0e15;
  --card: #10151d;
  --card-border: #1e2632;
  --text: #e6ebf2;
  --text-dim: #9aa5b3;
  --accent-1: #6366f1;
  --accent-2: #22d3ee;
  --font-head: "Space Grotesk", "Inter", sans-serif;
  --font-body: "Inter", sans-serif;
}

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

html { scroll-behavior: smooth; }

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

img { max-width: 100%; }

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px circle at 15% 10%, rgba(99, 102, 241, 0.18), transparent 60%),
    radial-gradient(500px circle at 85% 30%, rgba(34, 211, 238, 0.14), transparent 60%);
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

.gradient-text {
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(5, 7, 10, 0.7);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.navbar.scrolled {
  border-bottom-color: var(--card-border);
}

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

.logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.3rem;
}

.logo .dot { color: var(--accent-2); }

.nav-links {
  display: flex;
  gap: 28px;
  margin-left: auto;
}

.nav-link {
  font-size: 0.95rem;
  color: var(--text-dim);
  transition: color 0.2s ease;
}

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

.nav-cta { margin-left: 12px; }

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

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  color: #05070a;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(99, 102, 241, 0.35);
}

.btn-ghost {
  background: transparent;
  border-color: var(--card-border);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 24px 60px;
}

.hero-inner {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  font-family: var(--font-head);
  color: var(--accent-2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero-sub {
  color: var(--text-dim);
  font-size: 1.15rem;
  max-width: 620px;
  margin: 0 auto 32px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.hero-meta {
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* Sections */
.section {
  padding: 100px 24px;
}

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

.section-inner {
  max-width: 900px;
  margin: 0 auto;
}

.section-label {
  color: var(--accent-2);
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 32px;
}

.about-text {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 720px;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.skill-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 24px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.skill-card:hover {
  border-color: var(--accent-1);
  transform: translateY(-4px);
}

.skill-card h3 {
  font-family: var(--font-head);
  font-size: 1.05rem;
  margin-bottom: 16px;
  color: var(--text);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list li {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: var(--text);
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 999px;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 32px;
  border-left: 2px solid var(--card-border);
}

.timeline-item {
  position: relative;
  margin-bottom: 48px;
}

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

.timeline-dot {
  position: absolute;
  left: -39px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent-2);
}

.timeline-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 4px;
}

.timeline-head h3 {
  font-family: var(--font-head);
  font-size: 1.25rem;
}

.timeline-date {
  color: var(--accent-2);
  font-size: 0.9rem;
  font-weight: 600;
}

.timeline-org {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.timeline-lead {
  font-weight: 600;
  margin-bottom: 8px;
}

.bullet-list li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 8px;
  color: var(--text-dim);
  font-size: 0.95rem;
}

.bullet-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-1);
}

.timeline-details {
  margin-top: 16px;
  border-top: 1px solid var(--card-border);
  padding-top: 12px;
}

.timeline-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  list-style: none;
}

.timeline-details summary::-webkit-details-marker { display: none; }

.timeline-details summary::before {
  content: "+ ";
  color: var(--accent-2);
}

.timeline-details[open] summary::before {
  content: "− ";
}

.timeline-details ul { margin-top: 10px; }

/* Cover Letter */
.letter-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: clamp(24px, 4vw, 48px);
  max-width: 760px;
}

.letter-card p {
  color: var(--text-dim);
  font-size: 1rem;
  margin-bottom: 20px;
}

.letter-card p:last-child { margin-bottom: 0; }

.letter-signoff {
  color: var(--text);
  line-height: 1.9;
}

.letter-signoff a {
  color: var(--accent-2);
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 20px;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

a.contact-card:hover {
  border-color: var(--accent-2);
  transform: translateY(-3px);
}

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

/* Footer */
.footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--text-dim);
  font-size: 0.85rem;
  border-top: 1px solid var(--card-border);
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Responsive */
@media (max-width: 720px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--card-border);
    flex-direction: column;
    padding: 16px 24px;
    gap: 16px;
    display: none;
  }

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

  .nav-toggle { display: flex; }

  .nav-cta { display: none; }
}
