/* Immersive draft: full-screen sections, large type, dark theme */
:root {
  --bg: #1d3557;
  --ink: #f2f4f7;
  --muted: #9aa6b4;
  --line: #3d5a80;
  --accent: #6fa8ff;
  --accent-dark: #4a86e0;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-snap-type: y proximity; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
}

a { color: var(--accent); text-underline-offset: 0.2em; }
a:hover { color: #a9c9ff; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: 0.5rem; background: var(--ink); color: var(--bg); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 0.5rem; }

/* Fixed side dots for navigation */
.dots {
  position: fixed;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  z-index: 5;
}
.dots a {
  width: 10px; height: 10px; border-radius: 50%;
  border: 1px solid var(--muted);
  display: block;
}
.dots a:hover, .dots a:focus-visible { background: var(--accent); border-color: var(--accent); }

/* Full-height sections */
.screen {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  scroll-snap-align: start;
  padding: 6rem 1.5rem;
  border-bottom: 1px solid var(--line);
}
.inner { width: 100%; max-width: 46rem; margin: 0 auto; }

/* Hero */
.hero {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background:
    radial-gradient(60rem 40rem at 85% 20%, rgba(111, 168, 255, 0.18), transparent 60%),
    linear-gradient(rgba(111, 168, 255, 0.05) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(111, 168, 255, 0.05) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--bg);
  max-width: 72rem;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}
.kicker { color: var(--accent); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.85rem; margin: 0 0 1.25rem; }
h1 {
  font-size: clamp(3.2rem, 11vw, 8.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 0 0 1.5rem;
}
.lede { font-size: clamp(1.15rem, 2.2vw, 1.5rem); color: var(--muted); max-width: 34rem; margin: 0; }
.scroll-cue {
  margin-top: 3.5rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.scroll-cue::after { content: " \2193"; }

h2 {
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0 0 1.5rem;
}

.big { font-size: clamp(1.5rem, 3.4vw, 2.4rem); line-height: 1.3; font-weight: 600; margin: 0 0 1.5rem; }
p { margin: 0 0 1rem; }

/* Cards for selected work */
#work .inner { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 48rem) {
  #work .inner { grid-template-columns: 1fr 1fr; }
  #work h2 { grid-column: 1 / -1; }
}
.card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem;
}
.stat { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 800; color: var(--accent); margin: 0 0 0.5rem; line-height: 1; }
.card h3 { font-size: 1.15rem; margin: 0 0 0.5rem; line-height: 1.3; }
.card p:last-child { margin-bottom: 0; }
.meta { color: var(--muted); font-size: 0.92rem; }

/* Timeline */
.timeline { list-style: none; margin: 0 0 2rem; padding: 0; border-left: 2px solid var(--line); }
.timeline li { padding: 0 0 2rem 1.5rem; position: relative; }
.timeline li::before {
  content: ""; position: absolute; left: -6px; top: 0.45rem;
  width: 10px; height: 10px; border-radius: 50%; background: var(--accent);
}
.timeline h3 { font-size: 1.1rem; margin: 0 0 0.2rem; }
.timeline h3 span { display: block; font-weight: 400; color: var(--muted); font-size: 0.98rem; }
.timeline p { margin: 0.3rem 0 0; }

/* Buttons */
.cta {
  display: inline-block;
  margin: 0 0.75rem 0.75rem 0;
  padding: 0.85rem 1.5rem;
  background: var(--accent);
  color: #0b0f14;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
}
.cta:hover { background: #a9c9ff; color: #0b0f14; }
.cta.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.cta.ghost:hover { background: rgba(111, 168, 255, 0.12); color: #a9c9ff; }

footer { padding: 2rem 1.5rem 3rem; color: var(--muted); font-size: 0.9rem; max-width: 72rem; margin: 0 auto; }
footer p { margin: 0; }

/* Scroll reveal (only when JavaScript runs; content stays visible otherwise) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease, transform 0.8s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 40rem) {
  .dots { display: none; }
  .screen { padding: 4.5rem 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* Contact links row */
.links { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; margin-top: 1.5rem; }
.links a { color: var(--muted); text-decoration: none; font-weight: 600; letter-spacing: 0.04em; }
.links a:hover { color: var(--accent); }

/* Back to top link (matches the Scroll cue alignment) */
.back-top { max-width: 72rem; margin: 0 auto; padding: 2.5rem 1.5rem 0; }
.back-top a { color: var(--muted); text-decoration: none; font-size: 0.9rem; letter-spacing: 0.1em; text-transform: uppercase; }
.back-top a::after { content: " \2191"; }
.back-top a:hover { color: var(--accent); }

/* Section navigation under the hero */
.section-nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-top: 1.25rem; }
.section-nav a { color: var(--ink); text-decoration: none; font-weight: 600; padding: 0.4rem 0.9rem; border: 1px solid var(--line); border-radius: 999px; }
.section-nav a:hover { border-color: var(--accent); color: var(--accent); }

/* Certifications list */
.certs { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.certs li { border-left: 2px solid var(--accent); padding-left: 1rem; font-size: 1.1rem; }

/* Profile icons in the footer */
.social { display: flex; justify-content: center; gap: 1.5rem; padding: 2.5rem 1.5rem 0; }
.social a { color: var(--muted); width: 28px; height: 28px; display: block; }
.social a:hover { color: var(--accent); }
.social svg { width: 100%; height: 100%; display: block; }

/* Centre the back-to-top link and copyright line */
.back-top { text-align: center; }
footer { text-align: center; }

/* CV panel */
.cv-modal[hidden] { display: none; }
.cv-modal { position: fixed; inset: 0; z-index: 50; background: rgba(5, 8, 12, 0.85); display: flex; flex-direction: column; padding: 1rem; }
.cv-modal-bar { max-width: 56rem; width: 100%; margin: 0 auto 0.75rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.cv-modal-bar h2 { margin: 0; color: var(--ink); font-size: 0.9rem; }
.cv-modal-actions { display: flex; align-items: center; gap: 0.75rem; }
.cv-modal-actions .cta { margin: 0; padding: 0.55rem 1.1rem; }
.cv-modal-close { background: transparent; border: 1px solid var(--line); color: var(--ink); width: 2.4rem; height: 2.4rem; border-radius: 50%; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.cv-modal-close:hover { border-color: var(--accent); color: var(--accent); }
.cv-modal-frame { width: 100%; max-width: 56rem; flex: 1; margin: 0 auto; border: 0; border-radius: 6px; background: #ffffff; }
body.cv-open { overflow: hidden; }
@media (max-width: 40rem) { .cv-modal { padding: 0.5rem; } }

/* Centre the hero content on the page */
.hero .lede { margin: 0 auto; }
.hero .section-nav { justify-content: center; }

/* Contact form */
.contact-form { display: grid; gap: 0.5rem; max-width: 36rem; margin: 0 0 1.5rem; text-align: left; }
.contact-form label { font-size: 0.9rem; color: var(--muted); }
.contact-form input, .contact-form textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); border-radius: 8px; padding: 0.7rem 0.9rem;
}
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.contact-form .cta { justify-self: start; margin-top: 0.5rem; border: 0; cursor: pointer; font: inherit; }
.contact-form .hp { position: absolute; left: -9999px; }

/* LinkedIn alternative under the contact form */
.linkedin-alt { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.linkedin-alt p { margin: 0 0 0.75rem; }
