/* ==========================================================
   Colours: change these to restyle the whole site
   ========================================================== */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --accent: #1e40af;
  --accent-hover: #1e3a8a;
  --accent-soft: #e0e7ff;
  --radius: 14px;
  --max-width: 1100px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1120;
    --surface: #111a2e;
    --text: #f1f5f9;
    --muted: #94a3b8;
    --border: #1e293b;
    --accent: #7ea6ff;
    --accent-hover: #a9c3ff;
    --accent-soft: #1a2a52;
  }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; display: block; }
.muted { color: var(--muted); }

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

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin-bottom: 1.75rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }

.lead { font-size: 1.15rem; color: var(--muted); max-width: 46ch; }

/* ==========================================================
   Buttons
   ========================================================== */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  border: 2px solid var(--accent);
  transition: transform 0.15s, background 0.15s;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--accent); }
.btn-outline:hover { background: var(--accent-soft); color: var(--accent); }
.btn-small { padding: 0.45rem 1.1rem; font-size: 0.95rem; }
@media (prefers-color-scheme: dark) {
  .btn:not(.btn-outline), .btn:not(.btn-outline):hover { color: #0b1120; }
}

/* ==========================================================
   Header / navigation
   ========================================================== */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { font-weight: 700; font-size: 1.15rem; color: var(--text); }
.logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 1.8rem; list-style: none; }
.nav-links a:not(.btn) { color: var(--muted); font-weight: 500; }
.nav-links a:not(.btn):hover { color: var(--text); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; gap: 1.2rem; padding: 1.5rem 20px;
    background: var(--bg); border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav-links.open { display: flex; }
}

/* ==========================================================
   Hero
   ========================================================== */
.hero {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 3.5rem;
  align-items: center;
  padding-top: clamp(3.5rem, 9vw, 6.5rem);
  padding-bottom: 3rem;
}
.eyebrow { color: var(--accent); font-weight: 600; font-size: 0.95rem; margin-bottom: 0.75rem; letter-spacing: 0.02em; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); margin-bottom: 0.9rem; }
.role { font-size: clamp(1.15rem, 2.4vw, 1.4rem); font-weight: 600; margin-bottom: 1.2rem; line-height: 1.35; }
.role span { color: var(--muted); font-weight: 500; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
.hero-actions.center { justify-content: center; margin-top: 0; }
.hero-photo {
  width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 24px 50px -20px rgba(15, 23, 42, 0.45);
}
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 2rem; }
  .hero-photo { max-width: 240px; order: -1; border-radius: 18px; }
}

/* Stats strip */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding-bottom: 4rem;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.3rem;
}
.stat strong { display: block; font-size: 1.6rem; color: var(--accent); letter-spacing: -0.02em; line-height: 1.2; }
.stat span { color: var(--muted); font-size: 0.92rem; line-height: 1.45; display: block; margin-top: 0.35rem; }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .stats { grid-template-columns: 1fr; } }

/* ==========================================================
   Sections
   ========================================================== */
.section { padding: 4.5rem 20px; border-top: 1px solid var(--border); }

.about-text { max-width: 72ch; }
.about-text p { color: var(--muted); margin-bottom: 1.1rem; font-size: 1.05rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1.4rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px -12px rgba(15, 23, 42, 0.18); }
.card p { color: var(--muted); font-size: 0.97rem; }
.card-tag {
  display: inline-block; font-size: 0.78rem; font-weight: 600;
  background: var(--accent-soft); color: var(--accent);
  padding: 0.2rem 0.7rem; border-radius: 999px; margin-bottom: 0.9rem;
}

/* Experience timeline */
.timeline { list-style: none; border-left: 2px solid var(--border); margin-left: 6px; }
.timeline li { position: relative; padding: 0 0 2.2rem 1.8rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -8px; top: 6px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--accent);
}
.tl-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.tl-head h3 { margin-bottom: 0.15rem; }
.tl-date { color: var(--muted); font-weight: 600; font-size: 0.9rem; white-space: nowrap; }
.tl-org { color: var(--accent); font-weight: 500; margin-bottom: 0.5rem; }
.timeline p:not(.tl-org) { color: var(--muted); max-width: 75ch; }

/* Skills */
.skill-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.skill-groups h3 { font-size: 1rem; margin-bottom: 0.9rem; }
.skills { display: flex; flex-wrap: wrap; gap: 0.55rem; list-style: none; }
.skills li {
  background: var(--surface); border: 1px solid var(--border);
  padding: 0.4rem 0.9rem; border-radius: 999px; font-size: 0.9rem; font-weight: 500;
}

.creds { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.4rem; margin-top: 3rem; }
.cred-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem; }
.cred-box ul { list-style: none; }
.cred-box li { padding: 0.55rem 0; border-top: 1px solid var(--border); }
.cred-box li:first-child { border-top: 0; padding-top: 0.2rem; }
.cred-box .muted { font-size: 0.9rem; }

.contact { text-align: center; }
.contact p { color: var(--muted); margin: 0 auto 1.8rem; max-width: 46ch; font-size: 1.1rem; }

.site-footer { text-align: center; padding: 2rem 20px; color: var(--muted); font-size: 0.9rem; border-top: 1px solid var(--border); }

/* 404 page */
.not-found { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 1.2rem; }
.not-found h1 { font-size: 6rem; color: var(--accent); }

/* Fade-in on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
