:root {
  --bg: #0a0c10;
  --bg-alt: #101215;
  --surface: #16191e;
  --border: #24282e;
  --text: #eef0f2;
  --muted: #8b909a;
  --accent: #5eead4;
  --accent-2: #7c8bff;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --display: "Space Grotesk", "Inter", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3 { font-family: var(--display); margin: 0; font-weight: 600; letter-spacing: -0.02em; }
p { margin: 0; }
.accent { color: var(--accent); }

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  z-index: 1000;
  transition: width 0.1s linear;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 6vw;
  background: rgba(7, 8, 10, 0.7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-brand {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
}
.nav-brand span { color: var(--accent); }
.nav nav { display: flex; align-items: center; gap: 36px; font-size: 14px; font-weight: 500; }
.nav nav a { color: var(--muted); transition: color 0.2s ease; }
.nav nav a:hover { color: var(--text); }
.nav-cta {
  color: var(--text) !important;
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 999px;
}
.nav-cta:hover { border-color: var(--accent); color: var(--accent) !important; }
.nav-toggle { display: none; }

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 0 6vw;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 30% 40%, black 40%, transparent 90%);
}
.glow {
  position: absolute;
  top: -10%;
  left: 20%;
  width: 60vw;
  height: 60vw;
  max-width: 900px;
  max-height: 900px;
  background: radial-gradient(circle, rgba(94, 234, 212, 0.15), transparent 65%);
  filter: blur(20px);
}
.hero-inner { position: relative; z-index: 1; max-width: 900px; }
.hero-kicker {
  font-family: var(--display);
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.hero-title {
  font-size: clamp(52px, 9vw, 128px);
  line-height: 0.95;
  margin-bottom: 32px;
}
.hero-dynamic {
  position: relative;
  height: 44px;
  margin-bottom: 44px;
  overflow: hidden;
}
.hero-dynamic-line {
  position: absolute;
  left: 0; top: 0;
  display: block;
  width: 100%;
  color: var(--muted);
  font-size: clamp(18px, 2.4vw, 26px);
  font-family: var(--display);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.hero-dynamic-line[data-active] { opacity: 1; transform: translateY(0); }
.hero-dynamic-line[data-exit] { opacity: 0; transform: translateY(-24px); }
.hero-actions { display: flex; align-items: center; gap: 18px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 999px;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn-primary { background: var(--accent); color: #04231d; }
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost { border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.scroll-cue {
  position: absolute;
  bottom: 40px;
  left: 6vw;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.scroll-cue-track {
  position: relative;
  width: 1px;
  height: 36px;
  background: var(--border);
}
.scroll-cue-dot {
  position: absolute;
  top: 0; left: -2px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
  0% { top: 0; opacity: 1; }
  90% { opacity: 1; }
  100% { top: 30px; opacity: 0; }
}

/* Sections */
.section { padding: 130px 6vw; max-width: 1400px; margin: 0 auto; }
.section-alt { background: var(--bg-alt); max-width: none; }
.section-alt > * { max-width: 1400px; margin-left: auto; margin-right: auto; }
.section-head { margin-bottom: 64px; }
.section-tag {
  font-family: var(--display);
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.section-head h2 { font-size: clamp(32px, 4.5vw, 56px); line-height: 1.05; }
.section-note { margin-top: 18px; color: var(--muted); font-size: 15px; max-width: 480px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Projects */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.project-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.project-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.project-index { font-family: var(--display); color: var(--muted); font-size: 13px; }
.project-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-2);
  background: rgba(124, 139, 255, 0.1);
  padding: 5px 12px;
  border-radius: 999px;
}
.project-card h3 { font-size: 22px; margin-bottom: 14px; }
.project-card p { color: var(--muted); font-size: 14.5px; line-height: 1.7; margin-bottom: 22px; }
.project-stack { display: flex; flex-wrap: wrap; gap: 8px; }
.project-stack li {
  font-size: 12px;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
}

/* Timeline */
.timeline { display: flex; flex-direction: column; gap: 0; border-left: 1px solid var(--border); }
.timeline-item { position: relative; display: flex; gap: 32px; padding: 0 0 56px 40px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-marker {
  position: absolute;
  left: -7px;
  top: 4px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 2px solid var(--accent);
  display: grid;
  place-items: center;
}
.timeline-content { max-width: 700px; }
.timeline-role {
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.timeline-content h3 { font-size: 24px; margin-bottom: 12px; }
.timeline-content p { color: var(--muted); font-size: 15px; line-height: 1.7; margin-bottom: 16px; }
.timeline-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.timeline-tags li {
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 5px 11px;
  border-radius: 999px;
}

/* Skills */
.skills-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.skill-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
}
.skill-group h3 { font-size: 17px; margin-bottom: 18px; color: var(--accent); }
.skill-tags { display: flex; flex-direction: column; gap: 10px; }
.skill-tags li { color: var(--text); font-size: 14px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.skill-tags li:last-child { border-bottom: none; }

/* Closing */
.closing { text-align: left; padding-bottom: 160px; }
.closing h2 { margin-bottom: 34px; }

/* Footer */
.site-footer {
  display: flex;
  justify-content: space-between;
  padding: 26px 6vw;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.site-footer span { color: var(--accent); }

@media (max-width: 900px) {
  .nav nav { position: fixed; inset: 68px 0 0 0; background: var(--bg); flex-direction: column; align-items: flex-start; padding: 32px 6vw; gap: 24px; transform: translateX(100%); transition: transform 0.3s ease; }
  .nav nav.is-open { transform: translateX(0); }
  .nav-toggle { display: flex; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; z-index: 101; }
  .nav-toggle span { width: 22px; height: 2px; background: var(--text); display: block; }
  .project-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 90px 6vw; }
}

@media (max-width: 560px) {
  .skills-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 15vw; }
}
