/* ─── Reset & Base ─────────────────────────────────────────────────────────── */

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

:root {
  --bg:          #0f1117;
  --bg-alt:      #161b27;
  --surface:     #1e2535;
  --border:      #2a3147;
  --accent:      #6c8eff;
  --accent-dim:  rgba(108, 142, 255, 0.12);
  --text:        #e2e8f0;
  --text-muted:  #7a8ba8;
  --text-faint:  #3f4f6a;
  --font-sans:   'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono:   'SFMono-Regular', Consolas, monospace;
  --radius:      8px;
  --transition:  0.2s ease;
  --max-w:       1100px;
  --max-w-narrow: 680px;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: #8fabff;
}

ul {
  list-style: none;
}

/* ─── Layout helpers ────────────────────────────────────────────────────────── */

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

.container-narrow {
  max-width: var(--max-w-narrow);
  margin: 0 auto;
  padding: 0 2rem;
  text-align: center;
}

.section {
  padding: 7rem 0;
}

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

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  white-space: nowrap;
}

.section-title::after {
  content: '';
  display: block;
  height: 1px;
  background: var(--border);
  flex: 1;
  min-width: 40px;
}

/* ─── Nav ───────────────────────────────────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 2.5rem;
  background: rgba(15, 17, 23, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}

.nav:hover {
  border-bottom-color: var(--border);
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.05em;
}

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

.nav-links a {
  font-size: 0.875rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

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

/* ─── Hero ──────────────────────────────────────────────────────────────────── */

.hero {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem 2.5rem 4rem;
  max-width: var(--max-w);
  margin: 0 auto;
  position: relative;
}

.hero-greeting {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.hero-name {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero-title {
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1.2;
  margin-top: 0.25rem;
}

.hero-tagline {
  margin-top: 1.5rem;
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 520px;
}

.hero-cta {
  margin-top: 2.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(1.1); }
}

/* ─── Buttons ───────────────────────────────────────────────────────────────── */

.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: 2px solid var(--accent);
}

.btn-primary:hover {
  background: #8fabff;
  border-color: #8fabff;
  color: #fff;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-ghost:hover {
  background: var(--accent-dim);
  color: var(--accent);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1rem;
}

/* ─── 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;
}

.skills-block h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
  font-family: var(--font-mono);
}

.skills-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1.5rem;
}

.skills-list li {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skills-list li::before {
  content: '▸';
  color: var(--accent);
  font-size: 0.75rem;
}

/* ─── Experience ────────────────────────────────────────────────────────────── */

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 1px solid var(--border);
  margin-left: 1rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  padding: 0 0 3rem 2.5rem;
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-alt);
}

.timeline-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-top: 0.15rem;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
  white-space: nowrap;
}

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

.timeline-role {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.timeline-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.timeline-bullets li {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-left: 1rem;
  position: relative;
}

.timeline-bullets li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--text-faint);
}

/* ─── Projects ──────────────────────────────────────────────────────────────── */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

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

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.project-icon {
  color: var(--accent);
  font-size: 1.5rem;
}

.project-links {
  display: flex;
  gap: 0.75rem;
}

.project-link {
  color: var(--text-muted);
  transition: color var(--transition);
  display: flex;
  align-items: center;
}

.project-link:hover {
  color: var(--accent);
}

.project-link svg {
  width: 18px;
  height: 18px;
}

.project-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.6rem;
}

.project-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  flex: 1;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

/* ─── Tags ──────────────────────────────────────────────────────────────────── */

.timeline-tags,
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  background: var(--accent-dim);
  border-radius: 4px;
  padding: 0.2rem 0.6rem;
  white-space: nowrap;
}

/* ─── Contact ───────────────────────────────────────────────────────────────── */

.contact-blurb {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.social-links {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.social-links a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

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

/* ─── Footer ────────────────────────────────────────────────────────────────── */

.footer {
  padding: 1.5rem 2rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
  border-top: 1px solid var(--border);
}

/* ─── Responsive ────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .nav-links {
    gap: 1.5rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding-bottom: 2.5rem;
  }

  .timeline-date {
    white-space: normal;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .hero-scroll-hint {
    display: none;
  }
}

@media (max-width: 480px) {
  .nav {
    padding: 1rem 1.25rem;
  }

  .nav-links {
    gap: 1rem;
  }

  .hero {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .container,
  .container-narrow {
    padding: 0 1.25rem;
  }
}
