:root {
  --bg:     oklch(99% 0.012 85);
  --ink:    oklch(16% 0.01 60);
  --mid:    oklch(45% 0.01 60);
  --light:  oklch(63% 0.01 60);
  --border: oklch(88% 0.025 80);

  --pink:   oklch(62% 0.22 345);
  --teal:   oklch(62% 0.14 185);
  --coral:  oklch(67% 0.17 28);
  --lemon:  oklch(79% 0.19 88);
  --purple: oklch(61% 0.16 285);
  --dark:   oklch(13% 0.012 60);

  --serif: 'DM Serif Display', Georgia, serif;
  --sans:  'Plus Jakarta Sans', sans-serif;

  /* ── TYPE SCALE ────────────────────────────────────
     One source of truth for every font-size on the
     site. Keep new sizes off-scale only by exception. */
  --fs-eyebrow: 11px;                       /* uppercase labels, captions, caps */
  --fs-meta:    13px;                       /* nav links, chips, tags, dates, notes */
  --fs-ui:      14px;                       /* buttons, secondary UI, org names */
  --fs-body:    15px;                       /* default body, form inputs, list items */
  --fs-prose:   17px;                       /* long-form paragraphs, descriptions */
  --fs-lead:    18px;                       /* hero intro / opening copy */
  --fs-h5:      20px;                       /* timeline role, error heading */
  --fs-h4:      24px;                       /* footer brand, stat-range */
  --fs-h3:      30px;                       /* success heading */
  --fs-stat:    40px;                       /* display statistics */
  --fs-portfolio: clamp(26px, 3vw, 36px);   /* portfolio piece titles */
  --fs-h2:      clamp(28px, 3vw, 42px);     /* about / contact section heads */
  --fs-h1:      clamp(34px, 4vw, 52px);     /* main section titles */
  --fs-display: clamp(50px, 6.5vw, 86px);   /* hero name */
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
html, body { overflow-x: hidden; }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; border-radius: 4px; }

/* Skip-to-content link: visually hidden until focused via keyboard */
.skip-link {
  position: absolute; top: -100px; left: 16px;
  background: var(--pink); color: #fff;
  padding: 10px 18px; border-radius: 8px;
  font-size: var(--fs-meta); font-weight: 700;
  text-decoration: none; z-index: 300;
  transition: top 0.15s;
}
.skip-link:focus { top: 16px; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ── */
.nav {
  position: fixed; top: 20px; left: 50%;
  transform: translateX(-50%);
  background: oklch(99% 0.012 85 / 0.92);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 18px;
  display: flex; align-items: center; gap: 6px;
  z-index: 200;
  box-shadow: 0 2px 20px oklch(0% 0 0 / 0.07);
  white-space: nowrap;
}
.nav-brand {
  font-family: var(--serif); font-size: var(--fs-ui); color: var(--ink);
  text-decoration: none; padding-right: 12px;
  border-right: 1px solid var(--border); margin-right: 4px;
}
.nav-links { display: flex; gap: 2px; }
.nav-links a {
  font-size: var(--fs-meta); font-weight: 500; color: var(--mid);
  text-decoration: none; padding: 5px 11px; border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}
.nav-links a:hover { background: var(--border); color: var(--ink); }
.nav-cv {
  font-size: var(--fs-meta); font-weight: 700; color: var(--pink);
  text-decoration: none; padding: 5px 13px;
  border: 1.5px solid var(--pink); border-radius: 999px;
  margin-left: 4px; transition: all 0.15s;
}
.nav-cv:hover { background: var(--pink); color: #fff; }
.nav-toggle {
  display: none; background: none; border: none;
  font-family: var(--sans); font-size: var(--fs-meta); font-weight: 700;
  color: var(--mid); cursor: pointer; padding: 5px 10px;
}

/* ── SHARED ── */
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 28px; }
section { padding: 100px 0; }
.section-label {
  font-size: var(--fs-eyebrow); font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--light); margin-bottom: 10px;
}
.section-title {
  font-family: var(--serif);
  font-size: var(--fs-h1);
  line-height: 1.1; margin-bottom: 48px;
}
.btn {
  display: inline-block; padding: 12px 24px; border-radius: 999px;
  font-size: var(--fs-ui); font-weight: 700; text-decoration: none;
  transition: all 0.15s; text-align: center; border: none; cursor: pointer;
}
.btn-pink { background: var(--pink); color: #fff; }
.btn-pink:hover { opacity: 0.88; }
.btn-outline { background: transparent; color: var(--ink); border: 1.5px solid var(--border); font-family: var(--sans); }
.btn-outline:hover { border-color: var(--mid); }
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover { opacity: 0.88; }
.btn-purple { background: var(--purple); color: #fff; }
.btn-purple:hover { opacity: 0.88; }
.btn-lg { padding: 14px 28px; font-size: var(--fs-body); }

/* ── HERO ── */
.hero {
  min-height: 100svh; display: flex; align-items: center;
  padding: 130px 28px 90px;
}
.hero-inner {
  max-width: 1100px; margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: 1fr 320px;
  gap: 80px; align-items: center;
}
.hero-wave { font-size: var(--fs-lead); color: var(--mid); margin-bottom: 8px; }
.hero-name {
  font-family: var(--serif);
  font-size: var(--fs-display);
  line-height: 1.0; margin-bottom: 16px;
}
.hero-name em { font-style: normal; color: var(--pink); }
.hero-role {
  font-size: var(--fs-meta); font-weight: 700; letter-spacing: 0.1em;
  color: var(--light); text-transform: uppercase; margin-bottom: 24px;
}
.hero-body {
  font-size: var(--fs-lead); color: var(--mid); line-height: 1.75;
  max-width: 520px; margin-bottom: 32px; text-wrap: pretty;
}
.hero-ctas { display: flex; gap: 12px; margin-bottom: 28px; flex-wrap: wrap; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-tag {
  font-size: var(--fs-meta); font-weight: 600; padding: 5px 13px;
  border-radius: 999px; background: oklch(96% 0.02 85);
  color: var(--mid); border: 1px solid var(--border);
}
.hero-photo {
  width: 320px; height: 390px; border-radius: 20px;
  overflow: hidden; flex-shrink: 0; position: relative;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-photo.photo-missing {
  background: oklch(95% 0.055 185 / 0.45);
  border: 2px dashed oklch(70% 0.12 185 / 0.55);
}
.hero-photo.photo-missing::after {
  content: "Photo unavailable";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-meta); font-weight: 600; color: var(--teal);
  text-align: center; padding: 28px;
}

/* ── ABOUT ── */
.about { background: oklch(97% 0.032 185 / 0.38); }
.about-grid { display: grid; grid-template-columns: 280px 1fr; gap: 64px; align-items: start; }
.about-sidebar .section-title { font-size: var(--fs-h2); margin-bottom: 28px; }
.about-info { display: flex; flex-direction: column; gap: 16px; margin-bottom: 28px; }
.abt-label { font-size: var(--fs-eyebrow); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--light); margin-bottom: 3px; }
.abt-val { font-size: var(--fs-ui); color: var(--ink); font-weight: 500; line-height: 1.5; }
.about-ctas { display: flex; flex-direction: column; gap: 10px; }
.about-body { font-size: var(--fs-prose); color: var(--mid); line-height: 1.82; }
.about-body p + p { margin-top: 22px; }

/* ── SKILLS ── */
.sk-table { display: flex; flex-direction: column; }
.sk-row {
  display: grid; grid-template-columns: 200px 1fr;
  gap: 24px; align-items: flex-start;
  padding: 22px 0; border-bottom: 1px solid var(--border);
}
.sk-row:first-child { border-top: 1px solid var(--border); }
.sk-cat {
  font-size: var(--fs-eyebrow); font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; padding-top: 5px;
}
.sk-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sk {
  font-size: var(--fs-meta); font-weight: 500; padding: 6px 14px;
  border-radius: 999px;
}
.sk-pink   { background: oklch(96% 0.07 345); color: oklch(40% 0.18 345); }
.sk-teal   { background: oklch(96% 0.05 185); color: oklch(36% 0.12 185); }
.sk-lemon  { background: oklch(93% 0.1 88);  color: oklch(36% 0.15 88); }
.sk-purple { background: oklch(96% 0.06 285); color: oklch(38% 0.16 285); }
.sk-coral  { background: oklch(96% 0.07 28);  color: oklch(40% 0.16 28); }
.sk-gray   { background: oklch(94% 0.01 60);  color: oklch(36% 0.01 60); }

/* ── EXPERIENCE ── */
.exp { background: oklch(99% 0.006 60); }
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: ''; position: absolute; left: 5px; top: 8px; bottom: 8px;
  width: 2px; background: var(--border);
}
.tl-item { position: relative; padding-bottom: 52px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; left: -28px; top: 7px;
  width: 14px; height: 14px; border-radius: 50%;
  border: 2.5px solid var(--bg);
}
.d-pink   { background: var(--pink); }
.d-lemon  { background: var(--lemon); }
.d-teal   { background: var(--teal); }
.d-coral  { background: var(--coral); }
.d-purple { background: var(--purple); }
.d-gray   { background: var(--light); }
.tl-date {
  font-size: var(--fs-eyebrow); font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--light); margin-bottom: 6px;
}
.tl-role { font-size: var(--fs-h5); font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.tl-org  { font-size: var(--fs-ui); color: var(--mid); margin-bottom: 14px; }
.tl-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.tl-list li {
  font-size: var(--fs-body); color: var(--mid); line-height: 1.6;
  padding-left: 16px; position: relative; text-wrap: pretty;
}
.tl-list li::before {
  content: ''; position: absolute; left: 0; top: 8px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--border);
}

/* ── PORTFOLIO ── */
.port { background: var(--dark); }
.port .section-label { color: oklch(48% 0.01 60); }
.port .section-title { color: #fff; }
.port-pieces { display: flex; flex-direction: column; gap: 72px; }
.port-type { font-size: var(--fs-eyebrow); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 10px; }
.port-title { font-family: var(--serif); font-size: var(--fs-portfolio); color: #fff; margin-bottom: 14px; }
.port-desc { font-size: var(--fs-prose); color: oklch(65% 0.01 60); line-height: 1.75; max-width: 620px; text-wrap: pretty; }

/* Problem / Approach / Outcome breakdown — replaces wall-of-text descriptions */
.port-breakdown {
  display: grid; grid-template-columns: 140px 1fr; gap: 18px 32px;
  margin: 18px 0 32px; max-width: 720px;
}
.port-breakdown > div { display: contents; }
.port-breakdown dt {
  font-size: var(--fs-eyebrow); font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: oklch(60% 0.01 60);
  padding-top: 4px;
}
.port-breakdown dd {
  font-size: var(--fs-prose); color: oklch(72% 0.01 60); line-height: 1.65;
  text-wrap: pretty;
}
.port-breakdown-light dt { color: oklch(60% 0.01 60); }
.port-breakdown-light dd { color: oklch(72% 0.01 60); }

.port-actions { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.btn-outline-light {
  background: transparent; color: oklch(65% 0.01 60);
  border: 1.5px solid oklch(28% 0.01 60); border-radius: 999px;
  font-family: var(--sans);
}
.btn-outline-light:hover { border-color: oklch(55% 0.01 60); color: #fff; }
.deck-wrap {
  margin-top: 32px;
  width: 100vw; position: relative;
  left: 50%; transform: translateX(-50%);
  height: min(56.25vw, 84vh);
}
.deck-wrap iframe { width: 100%; height: 100%; border: none; display: block; }
.deck-mobile-note {
  display: none; margin-top: 24px; padding: 24px;
  background: oklch(18% 0.012 60);
  border-radius: 12px; border: 1px solid oklch(24% 0.01 60);
}
.deck-mobile-note p { font-size: var(--fs-body); color: oklch(65% 0.01 60); margin-bottom: 16px; }
.nhs-card {
  background: oklch(17% 0.012 60); border-radius: 16px; padding: 32px;
  border: 1px solid oklch(22% 0.01 60); margin-top: 8px;
}
.nhs-stats { display: flex; gap: 40px; flex-wrap: wrap; }
.nhs-stat-n {
  font-family: var(--serif); font-size: var(--fs-stat);
  line-height: 1; color: var(--purple); margin-bottom: 4px;
}
.nhs-stat-range { font-size: var(--fs-h4); letter-spacing: -0.02em; }
.nhs-stat-l {
  font-size: var(--fs-eyebrow); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: oklch(52% 0.01 60);
}

/* ── CONTACT ── */
.contact { background: oklch(97% 0.05 345 / 0.22); }
.contact-grid { display: grid; grid-template-columns: 300px 1fr; gap: 64px; align-items: start; }
.contact-aside .section-title { font-size: var(--fs-h2); margin-bottom: 20px; }
.contact-aside p { font-size: var(--fs-prose); color: var(--mid); line-height: 1.8; text-wrap: pretty; }
.contact-aside p + p { margin-top: 16px; }
.contact-note { font-size: var(--fs-meta); color: var(--light); margin-top: 22px; }
.form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: var(--fs-eyebrow); font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--mid);
}
.field input, .field select, .field textarea {
  font-family: var(--sans); font-size: var(--fs-body); color: var(--ink);
  background: #fff; border: 1.5px solid var(--border);
  border-radius: 10px; padding: 12px 14px;
  transition: border-color 0.15s; outline: none; width: 100%;
  -webkit-appearance: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--pink); }
.field textarea { resize: vertical; min-height: 120px; }
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.form-footer { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.form-note { font-size: var(--fs-meta); color: var(--light); }
.form-success {
  display: none; padding: 36px 32px; background: oklch(96% 0.07 145);
  border-radius: 16px; border: 1px solid oklch(80% 0.13 145); text-align: center;
}
.form-success.show { display: block; }
.form-success h3 { font-family: var(--serif); font-size: var(--fs-h3); color: oklch(32% 0.12 145); margin-bottom: 8px; }
.form-success p { color: oklch(42% 0.08 145); font-size: var(--fs-prose); }
.form-error {
  display: none; padding: 20px 24px; margin-bottom: 16px;
  background: oklch(96% 0.07 28); border-radius: 12px;
  border: 1px solid oklch(80% 0.14 28);
}
.form-error.show { display: block; }
.form-error h3 { font-family: var(--serif); font-size: var(--fs-h5); color: oklch(34% 0.16 28); margin-bottom: 4px; }
.form-error p { font-size: var(--fs-ui); color: oklch(38% 0.12 28); line-height: 1.5; }
.form-error a { color: oklch(34% 0.16 28); font-weight: 700; }

/* ── FOOTER ── */
footer { background: var(--dark); padding: 52px 0 40px; }
.footer-inner {
  max-width: 1040px; margin: 0 auto; padding: 0 28px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 20px;
}
.footer-brand { font-family: var(--serif); font-size: var(--fs-h4); color: #fff; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: var(--fs-ui); color: oklch(52% 0.01 60); text-decoration: none; transition: color 0.15s; }
.footer-links a:hover { color: #fff; }
.footer-copy { font-size: var(--fs-meta); color: oklch(38% 0.01 60); width: 100%; margin-top: 8px; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  /* Solid bg on mobile — semi-transparent pill lets text bleed through on scroll */
  .nav {
    border-radius: 18px; max-width: calc(100vw - 32px); flex-wrap: wrap;
    background: oklch(99% 0.012 85 / 0.985);
    box-shadow: 0 4px 24px oklch(0% 0 0 / 0.12);
  }
  .nav-links { display: none; flex-direction: column; gap: 4px; width: 100%; padding: 8px 0 4px; }
  .nav.open .nav-links { display: flex; }
  .nav-toggle { display: block; margin-left: auto; }
  .nav-cv { display: none; }
  .hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .hero-photo { width: 100%; height: 240px; order: -1; border-radius: 16px; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-ctas { flex-direction: row; }
  .sk-row { grid-template-columns: 1fr; gap: 10px; }
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .nhs-card { padding: 24px; }
  .nhs-stats { gap: 28px; }
  .port-breakdown { grid-template-columns: 1fr; gap: 6px 0; }
  .port-breakdown > div { display: block; margin-bottom: 18px; }
  .port-breakdown dt { padding-top: 0; margin-bottom: 4px; }
  .deck-wrap { display: none; }
  .deck-mobile-note { display: block; }
  section { padding: 72px 0; }
}

@media (max-width: 580px) {
  .form-row { grid-template-columns: 1fr; }
  /* Hero name needs a manual override below the clamp floor so it fits */
  .hero-name { font-size: 46px; }
  .nhs-stats { gap: 20px; }
}
