/* ── Reset & Variables ───────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #0d1117;
  --bg-alt:       #161b22;
  --surface:      #21262d;
  --border:       #30363d;
  --accent:       #2563eb;
  --accent-light: #3b82f6;
  --accent-glow:  rgba(37, 99, 235, 0.15);
  --text:         #e6edf3;
  --text-muted:   #8b949e;
  --text-dim:     #484f58;
  --font:         'Inter', system-ui, -apple-system, sans-serif;
  --mono:         'JetBrains Mono', 'Fira Code', monospace;
  --radius:       8px;
  --ease:         0.25s ease;
}

html { scroll-behavior: smooth; }

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

/* ── Layout ──────────────────────────────────────── */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section     { padding: 5rem 0; }
.section-alt { background: var(--bg-alt); }

/* ── Navigation ──────────────────────────────────── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--ease);
}
#nav.scrolled { border-bottom-color: var(--border); }

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: color var(--ease);
}
.nav-logo:hover { color: var(--accent-light); }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--ease);
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}

/* ── Hero ────────────────────────────────────────── */
.hero {
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 9rem 1.5rem 5rem;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 65% 45%, rgba(37, 99, 235, 0.1) 0%, transparent 55%);
  pointer-events: none;
}

.hero-content {
  max-width: 960px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  animation: heroEntry 0.7s ease both;
}

@keyframes heroEntry {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

.hero-statement {
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 1.75rem;
}
.hero-statement .accent { color: var(--accent-light); }

.hero-byline {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── Buttons ─────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--ease);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.35);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--accent-light);
  color: var(--accent-light);
  transform: translateY(-1px);
}

/* ── Section titles ──────────────────────────────── */
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 2.5rem;
}
.section-title::after {
  content: '';
  display: block;
  width: 2.5rem;
  height: 3px;
  background: var(--accent);
  margin-top: 0.625rem;
  border-radius: 2px;
}

/* ── Cards ───────────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color var(--ease), transform var(--ease);
}
.card:hover {
  border-color: var(--accent-light);
  transform: translateY(-3px);
}

.card-icon {
  font-size: 1.4rem;
  color: var(--accent-light);
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.625rem;
}

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

/* ── Timeline ────────────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 2rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 0.5rem; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent) 0%, transparent 100%);
}

.timeline-item {
  position: relative;
  margin-bottom: 2.75rem;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.375rem;
  top: 0.45rem;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent-light);
  border: 2px solid var(--bg-alt);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.timeline-date {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent-light);
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.timeline-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.timeline-company {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.75rem;
}

.timeline-content p,
.timeline-content li {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.timeline-content ul {
  margin: 0.375rem 0 0.75rem 1.1rem;
}
.timeline-content ul li { margin-bottom: 0.2rem; }

.timeline-themes {
  font-size: 0.78rem !important;
  color: var(--text-dim) !important;
  font-style: italic;
  margin: 0.5rem 0 0.75rem !important;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

/* ── Tags ────────────────────────────────────────── */
.timeline-tags span,
.tech-tags span {
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
}

/* ── Contact ─────────────────────────────────────── */
.contact-intro {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin-bottom: 2rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  font-size: 0.9rem;
  color: var(--text);
  text-decoration: none;
  transition: color var(--ease);
}
a.contact-link:hover { color: var(--accent-light); }

.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--accent-light);
  flex-shrink: 0;
}

/* ── Footer ──────────────────────────────────────── */
footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* ── Fade-in animations ──────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: none;
}

.cards .card { transition: border-color var(--ease), transform var(--ease), opacity 0.55s ease; }
.cards .card:nth-child(2) { transition-delay: 0.1s; }
.cards .card:nth-child(3) { transition-delay: 0.2s; }
.cards .card:nth-child(4) { transition-delay: 0.3s; }

.timeline-item:nth-child(2) { transition-delay: 0.1s; }
.timeline-item:nth-child(3) { transition-delay: 0.2s; }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 640px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 1.5rem;
    gap: 1.25rem;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }

  .hero-title { font-size: 3rem; }
  .timeline { padding-left: 1.5rem; }
  .timeline-item::before { left: -1.875rem; }
  .section { padding: 3.5rem 0; }
}
