/* ---------- Theme ---------- */
:root {
  --bg: #ffffff;
  --bg-alt: #f4f7fb;
  --surface: #ffffff;
  --text: #16202e;
  --text-muted: #4a5568;
  --border: #dde3ec;
  --accent: #1f4e8c;
  --accent-hover: #173d6e;
  --accent-soft: #e6eef8;
  --on-accent: #ffffff;
  --shadow: 0 1px 3px rgba(16, 32, 56, 0.08);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max-width: 1040px;
  --nav-height: 56px;
  --radius: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1520;
    --bg-alt: #151d2b;
    --surface: #182233;
    --text: #e6ebf2;
    --text-muted: #a7b2c3;
    --border: #2a3648;
    --accent: #7fb0f0;
    --accent-hover: #a5c8f5;
    --accent-soft: #1d2d45;
    --on-accent: #0b1220;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  }
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

h1, h2, h3 {
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.1rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--accent);
}

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

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 20px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
  color: var(--on-accent);
}

/* ---------- Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--nav-height);
}

.nav-brand {
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a {
  display: block;
  padding: 6px 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 6px;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

@media (min-width: 640px) {
  .nav-links { gap: 8px; }
  .nav-links a { padding: 6px 12px; font-size: 0.95rem; }
}

/* ---------- Hero ---------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
  padding-block: 56px 48px;
}

.avatar {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #ffffff;
  background: linear-gradient(135deg, #1f4e8c, #3a6fb5);
  box-shadow: 0 0 0 6px var(--accent-soft);
  object-fit: cover; /* applies when swapped for an <img> */
}

.hero h1 {
  font-size: clamp(2.25rem, 1.6rem + 3vw, 3.5rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.2em;
}

.headline {
  font-size: clamp(1.05rem, 0.95rem + 0.6vw, 1.3rem);
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.4em;
}

.location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

.pitch {
  font-size: 1.1rem;
  max-width: 38em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--accent);
  transition: background-color 0.2s, color 0.2s;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--on-accent);
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
}

.btn-secondary:hover {
  background: var(--accent-soft);
}

@media (min-width: 720px) {
  .hero {
    flex-direction: row;
    align-items: center;
    gap: 48px;
    padding-block: 96px 80px;
  }

  .avatar {
    width: 168px;
    height: 168px;
    font-size: 3.4rem;
  }
}

/* ---------- Key numbers ---------- */
.numbers {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}

.numbers-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px 20px;
  list-style: none;
  margin-block: 0;
  padding-block: 36px;
}

.numbers-list li {
  display: flex;
  flex-direction: column;
}

.numbers-list strong {
  font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.5rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--accent);
}

.numbers-list span {
  font-size: 0.95rem;
  color: var(--text-muted);
}

@media (min-width: 860px) {
  .numbers-list {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---------- Sections ---------- */
.section {
  padding-block: 64px;
}

#about p {
  max-width: 44em;
  font-size: 1.05rem;
}

/* ---------- Timeline ---------- */
.timeline {
  list-style: none;
  margin: 32px 0 0;
  padding: 0 0 0 28px;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 36px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
}

.timeline-item h3 {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 2px;
}

.timeline-item .company {
  font-size: 1.15rem;
}

.timeline-item .role {
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent);
}

.years {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.timeline-item ul,
.previous ul,
.card ul {
  margin: 0;
  padding-left: 1.1em;
}

.timeline-item li + li,
.previous li + li,
.card li + li {
  margin-top: 6px;
}

.timeline-item ul li::marker {
  color: var(--accent);
}

.previous {
  margin-top: 8px;
  padding: 24px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

@media (min-width: 720px) {
  .timeline-item h3 {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
  }
}

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  gap: 28px;
  margin-top: 32px;
}

@media (min-width: 720px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 40px;
  }
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.chips li {
  padding: 5px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
}

/* ---------- Education ---------- */
.edu-grid {
  display: grid;
  gap: 20px;
  margin-top: 32px;
}

@media (min-width: 860px) {
  .edu-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card p {
  margin: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding-block: 48px 32px;
  text-align: center;
}

.footer-title {
  font-size: 1.5rem;
}

.social {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  list-style: none;
  margin: 16px 0 28px;
  padding: 0;
}

.social a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

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

.copyright {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ---------- Reveal on scroll ---------- */
/* Only hidden when JS is running, so content is always visible without JS. */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn {
    transition: none;
  }
}
