/* ============================================================
   GOCH THIONG GARANG AKOT — PERSONAL PORTFOLIO
   A real personal website: storytelling sections, not a CV.
   Newsreader (display serif) + IBM Plex Sans (body sans-serif)
============================================================ */

/* ----------------------------------------------------------
   1. DESIGN TOKENS — light mode
   Colour palette from brand image:
     #E0F4F4  — light aqua (paper / page background)
     #6BBDD4  — sky blue   (accent / highlights)
     #2E4494  — cobalt     (primary / buttons / headings)
     #0D0D2B  — deep navy  (dark sections / hero / footer)
---------------------------------------------------------- */
:root {
  /* Palette */
  --paper:      #E0F4F4;          /* lightest — page background     */
  --surface:    #FFFFFF;           /* white cards / surface panels    */
  --ink:        #0D1A3A;           /* near-navy for body text         */
  --muted:      #3A5068;           /* muted body text                 */
  --rule:       #B8DDE8;           /* dividers / borders              */
  --accent:     #2E4494;           /* cobalt — primary action colour  */
  --accent-mid: #263a80;           /* darker cobalt for hover         */
  --accent-sky: #6BBDD4;           /* sky blue — secondary highlights */

  /* Dark sections (hero, impact band, footer) */
  --dark-bg:    #0D0D2B;           /* deep navy                       */
  --dark-surf:  #141435;           /* slightly lighter navy surface   */
  --dark-ink:   #E8F4F8;           /* light text on dark              */
  --dark-muted: #7A9BB5;           /* muted text on dark              */
  --dark-rule:  rgba(107,189,212,0.15); /* sky-blue tinted divider    */

  /* South Sudan flag — unchanged */
  --flag-black: #000000;
  --flag-red:   #B42A33;
  --flag-green: #078A3C;

  /* Type */
  --f-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --f-body:    'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;

  /* Space */
  --s1: 0.5rem;
  --s2: 1rem;
  --s3: 1.5rem;
  --s4: 2rem;
  --s5: 3rem;
  --s6: 5rem;
  --s7: 8rem;

  /* Layout */
  --max:    1160px;
  --r:      2px;
}

/* Dark mode — swap light-section tokens only */
@media (prefers-color-scheme: dark) {
  :root {
    --paper:      #0D1826;
    --surface:    #111f38;
    --ink:        #D8EEF5;
    --muted:      #7A9BB5;
    --rule:       #1E3055;
    --accent:     #6BBDD4;          /* sky blue becomes primary in dark */
    --accent-mid: #5aaec5;
    --accent-sky: #2E4494;
  }
}

/* ----------------------------------------------------------
   2. RESET
---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--f-body);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

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

a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
a:hover { opacity: 0.75; }

img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
h1,h2,h3,h4 { font-family: var(--f-display); line-height: 1.15; }
p { margin-bottom: var(--s2); }
p:last-child { margin-bottom: 0; }

/* ----------------------------------------------------------
   3. LAYOUT HELPERS
---------------------------------------------------------- */
.container {
  width: 90%;
  max-width: var(--max);
  margin-inline: auto;
}

/* Contact section — cobalt background */
.bg-accent  { background: var(--accent); }

/* Generic section padding */
.section { padding-block: var(--s6); }

/* Section headings — used inside light sections */
.section-heading {
  font-family: var(--f-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: var(--s2);
}

/* Small label above a heading */
.section-label {
  font-family: var(--f-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  display: block;
  margin-bottom: var(--s2);
}

/* Intro line just below a section heading */
.section-intro-line {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: var(--s5);
  max-width: 60ch;
}

/* ----------------------------------------------------------
   4. BUTTONS
---------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 0.72em 1.6em;
  font-family: var(--f-body);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--r);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s;
}

/* On dark hero */
.btn-solid {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-solid:hover { background: var(--accent-mid); border-color: var(--accent-mid); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--dark-ink);
  border-color: rgba(255,255,255,0.30);
}
.btn-ghost:hover { border-color: var(--dark-ink); color: var(--dark-ink); }

/* On green contact band */
.btn-contact {
  background: #fff;
  color: var(--accent);
  border-color: #fff;
  font-size: 0.9rem;
}
.btn-contact:hover { background: var(--dark-bg); color: #fff; border-color: var(--dark-bg); }

/* ----------------------------------------------------------
   5. IMAGE FRAMES
   Every frame locks its aspect ratio with padding-bottom.
   The <img> inside is absolute, fills the frame exactly.
   onerror on each img adds class="missing" to the frame.
---------------------------------------------------------- */
.img-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--r);
  background: var(--rule);
  display: block;
}

/* Aspect ratios */
.r-4-5  { padding-bottom: 125%;   }
.r-16-9 { padding-bottom: 56.25%; }
.r-21-9 { padding-bottom: 42.86%; }

/* The image fills the frame */
.img-frame > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* ----------------------------------------------------------
   PHOTO CARD FRAME
   White outer card · rounded corners · soft shadow
   Photo area with rounded corners and thin grey border
   Caption strip below with bold title left, icon right
---------------------------------------------------------- */
.photo-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow:
    0 2px  6px  rgba(0, 0, 0, 0.06),
    0 8px  24px rgba(0, 0, 0, 0.09),
    0 1px  2px  rgba(0, 0, 0, 0.04);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.22s ease, transform 0.22s ease;
}

.photo-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 4px  10px rgba(0, 0, 0, 0.08),
    0 16px 36px rgba(0, 0, 0, 0.13),
    0 1px  3px  rgba(0, 0, 0, 0.05);
}

/* Inner photo area — rounded corners + thin grey border */
.photo-card__img-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 62%;          /* 16:10 — slightly taller than 16:9 */
  overflow: hidden;
  border-radius: 12px 12px 0 0; /* top corners only */
  border: 1.5px solid #E8E8E8;
  border-bottom: none;
  background: var(--rule);
}

.photo-card__img-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* Caption strip — light grey, title left · icon right */
.photo-card__caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: #F4F4F5;
  border-top: 1.5px solid #E8E8E8;
  min-height: 48px;
}

.photo-card__caption-title {
  font-family: var(--f-body);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.01em;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-card__caption-logo {
  flex-shrink: 0;
  color: var(--accent);
  display: flex;
  align-items: center;
  opacity: 0.75;
}


/* Portrait: face is centred horizontally, body in lower 2/3.
   Push crop down to show face + suit, not the empty ceiling. */
.portrait-frame > img {
  object-position: center 30%;
}

/* Banner: crop to a cinematic middle slice */
.banner-frame > img  { object-position: center 40%; }

/* Missing-image placeholder */
.img-frame.missing > img { display: none; }
.img-frame.missing::after {
  content: 'Photo coming soon';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-body);
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}
/* Dark-bg variant */
.img-frame.missing.dark-ph {
  background: rgba(255,255,255,0.05);
}
.img-frame.missing.dark-ph::after { color: var(--dark-muted); }

/* ----------------------------------------------------------
   6. HEADER — navy bar, avatar left, links centre, CTA right
      Layout from reference, colours uniform with site palette
---------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: #354898;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 1px 12px rgba(0,0,0,0.25);
}

/* Flag stripe */
.flag-stripe { display: flex; height: 4px; width: 100%; overflow: hidden; }
.flag-stripe span { display: block; height: 100%; }
.flag-black { background: var(--flag-black); flex: 1; }
.flag-red   { background: var(--flag-red);   flex: 1; }
.flag-green { background: var(--flag-green); flex: 1; }
.flag-gap   { background: #354898; width: 2px; flex: none; }

/* Header inner row */
.hdr-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.95rem;
  gap: var(--s3);
}

/* --- Circular avatar (left) --- */
.nav-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.12);
  transition: box-shadow 0.15s;
  text-decoration: none;
}
.nav-avatar:hover {
  box-shadow: 0 0 0 3px rgba(255,255,255,0.20);
  opacity: 1;
}
.nav-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  display: block;
}

/* --- Nav links (centre) --- */
.nav-list {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-wrap: wrap;
}

.nav-link {
  font-family: var(--f-body);
  font-size: 0.93rem;
  font-weight: 500;
  color: rgba(255,255,255,0.80);
  text-decoration: none;
  padding: 0.4em 1em;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  white-space: nowrap;
}

/* Outlined on hover/active */
.nav-link:hover,
.nav-link.active {
  border-color: rgba(255,255,255,0.55);
  color: #fff;
  background: rgba(255,255,255,0.10);
}

/* --- Right group: CV icon + CTA + hamburger --- */
.hdr-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

/* CV / document icon button */
.hdr-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.30);
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.hdr-icon-btn:hover {
  border-color: rgba(255,255,255,0.70);
  color: #fff;
  opacity: 1;
}

/* "Get in touch" CTA — cobalt solid, consistent with site buttons */
.btn-nav-cta {
  display: inline-block;
  padding: 0.65em 1.5em;
  background: var(--accent);            /* cobalt #2E4494 */
  color: #fff;
  font-family: var(--f-body);
  font-size: 0.93rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  border: none;
  white-space: nowrap;
  transition: background 0.15s;
}
.btn-nav-cta:hover {
  background: var(--accent-mid);
  opacity: 1;
  color: #fff;
}

/* --- Hamburger (mobile only) --- */
.menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  background: none;
  border: 1px solid rgba(255,255,255,0.30);
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
}
.bar {
  display: block;
  width: 100%;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}
.menu-btn[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ----------------------------------------------------------
/* ----------------------------------------------------------
/* ----------------------------------------------------------
   7. HERO — full-screen background video
   Black 45% glassmorphism overlay · flex · left-aligned content
---------------------------------------------------------- */

/* Section fills the full viewport */
.c-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 560px;
  overflow: hidden;
  background: #000;

  /* Flexbox: vertical centering, left-aligned content */
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

/* Background video — covers the full section */
.c-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
  z-index: 0;
}

/* Glassmorphism overlay:
   - rgba(0,0,0,0.45) dark tint for legibility
   - backdrop-filter blur ties into the frosted-glass look   */
.c-hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 1;
  pointer-events: none;
}

/* Content block — sits above the overlay, left-aligned */
.c-hero__content {
  position: relative;
  z-index: 2;
  padding: 0 clamp(2rem, 8vw, 8rem);
  max-width: 780px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

/* Kicker line */
.c-hero__kicker {
  display: block;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: clamp(0.7rem, 1.2vw, 0.8rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.60);
  margin-bottom: 1.2rem;
}

/* Headline — Instrument Serif, massive */
.c-hero__headline {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(3.2rem, 9vw, 8rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 0 1rem;
}

.c-hero__headline em {
  font-style: italic;
  color: rgba(255, 255, 255, 0.80);
}

/* Role sub-line */
.c-hero__sub {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: clamp(0.78rem, 1.4vw, 0.95rem);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.60);
  margin: 0 0 2.4rem;
}

/* CTA row */
.c-hero__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* Scroll nudge — bottom-centre */
.c-hero__scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 1;
  transition: opacity 0.4s;
  pointer-events: none;
}

.c-hero__scroll-line {
  display: block;
  width: 1px;
  height: 52px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.0), rgba(255,255,255,0.55));
  animation: scrollPulse 1.8s ease-in-out infinite;
}

.c-hero__scroll-label {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

@keyframes scrollPulse {
  0%   { transform: scaleY(0); transform-origin: top;    opacity: 0; }
  10%  { opacity: 1; }
  50%  { transform: scaleY(1); transform-origin: top;    opacity: 1; }
  51%  { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* Reduced-motion: no animation */
@media (prefers-reduced-motion: reduce) {
  .c-hero__scroll-hint { display: none; }
  .c-hero__scroll-line { animation: none; }
}

/* Mobile: tighter padding */
@media (max-width: 600px) {
  .c-hero__content { padding: 0 1.75rem; }
  .c-hero__scroll-hint { bottom: 1.5rem; }
}

/* ----------------------------------------------------------
   7b. HERO DETAIL — original two-column section (below video)
---------------------------------------------------------- */
.hero-detail {
  background: var(--dark-bg);
  padding-top: var(--s7);
  padding-bottom: 0;
  overflow: hidden;
}

.hero {
  /* kept for legacy class references in other rules */
  background: var(--dark-bg);
  padding-top: var(--s7);
  padding-bottom: 0;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: var(--s4);
  align-items: end;
}

.hero-text {
  padding-bottom: var(--s6);
  color: var(--dark-ink);
}

.hero-kicker {
  display: block;
  font-family: var(--f-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: var(--s2);
}

@media (prefers-color-scheme: dark) {
  .hero-kicker { color: #6BBDD4; }
}

.hero-name {
  font-family: var(--f-display);
  font-size: clamp(2.8rem, 5.5vw, 4.6rem);
  font-weight: 700;
  color: var(--dark-ink);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: var(--s2);
}

.hero-tagline {
  font-family: var(--f-display);
  font-style: italic;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  color: var(--dark-muted);
  margin-bottom: var(--s2);
}

.hero-role {
  font-size: 0.95rem;
  color: var(--dark-muted);
  line-height: 1.6;
  margin-bottom: var(--s3);
}

.hero-intro {
  font-size: 1rem;
  color: var(--dark-muted);
  max-width: 50ch;
  line-height: 1.8;
  margin-bottom: var(--s4);
}

.hero-btns {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}

/* Portrait column — flush to section bottom */
.hero-portrait { align-self: end; }

.hero-portrait .img-frame {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  padding-bottom: 125%;
}

.hero-portrait .img-frame::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30%;
  background: linear-gradient(to top, var(--dark-bg) 0%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

.hero-portrait .img-frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--accent);
  z-index: 2;
}/* Banner — YouTube embed */
.hero-banner {
  padding-top: var(--s4);
  padding-bottom: var(--s6);
  background: var(--dark-bg);
}

/* ----------------------------------------------------------
   7b. BANNER VIDEO — Goch public speaking video (YouTube embed)
   16:9 responsive iframe with caption overlay.
---------------------------------------------------------- */
.banner-video-frame {
  position: relative;
  width: 100%;
  border-radius: var(--r);
  background: #050518;
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.50);
  border: 1px solid rgba(107, 189, 212, 0.14);
  overflow: hidden;
}

/* 16:9 aspect ratio wrapper for the iframe */
.banner-yt-frame {
  padding-bottom: 56.25%;          /* 16:9 */
}

.banner-yt {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Caption block — bottom-left, sits above the iframe */
.banner-video-caption {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: var(--s4);
  z-index: 2;
  pointer-events: none;          /* let clicks pass through to the iframe */
  background: linear-gradient(
    to top,
    rgba(13, 13, 43, 0.80) 0%,
    rgba(13, 13, 43, 0.00) 100%
  );
  width: 100%;
}

.banner-caption-tag {
  display: inline-block;
  font-family: var(--f-body);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-sky);
  background: rgba(46, 68, 148, 0.60);
  padding: 0.3em 0.85em;
  border-radius: var(--r);
  margin-bottom: 0.7rem;
  border: 1px solid rgba(107, 189, 212, 0.28);
}

.banner-caption-text {
  font-family: var(--f-display);
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  max-width: 28ch;
  margin: 0;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.65);
}

/* Responsive */
@media (max-width: 600px) {
  .banner-video-caption { padding: var(--s3) var(--s3) var(--s2); }
  .banner-caption-text { font-size: 1rem; }
}

/* ----------------------------------------------------------
   8. IMPACT IN NUMBERS — dark band
---------------------------------------------------------- */
.impact {
  background: var(--dark-surf);
  border-top: 1px solid var(--dark-rule);
  border-bottom: 1px solid var(--dark-rule);
  padding-block: var(--s5);
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s4);
  text-align: center;
}

.impact-num {
  display: block;
  font-family: var(--f-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  color: #6BBDD4;   /* sky blue on dark background */
  line-height: 1;
  margin-bottom: 0.4em;
}

.impact-label {
  display: block;
  font-size: 0.8rem;
  color: var(--dark-muted);
  line-height: 1.55;
}

/* ----------------------------------------------------------
   9. ABOUT ME — two columns
---------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: var(--s6);
  align-items: start;
}

.about-left { padding-top: 0.2em; }

.pull-statement {
  font-family: var(--f-display);
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  margin-top: var(--s2);
  margin-bottom: 0;
}

.about-right {
  color: var(--muted);
  font-size: 1.02rem;
}
.about-right p { margin-bottom: var(--s3); }

/* ----------------------------------------------------------
   10. WHAT I DO — three cards with green top border
---------------------------------------------------------- */
.do-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s3);
}

.do-card {
  padding: var(--s4) var(--s3);
  border-top: 3px solid var(--accent);
  background: var(--paper);
  border-radius: var(--r);
}

/* Surface bg section gets paper cards */
.bg-surface .do-card { background: var(--paper); }

@media (prefers-color-scheme: dark) {
  .do-card { background: var(--surface); }
}

.do-card h3 {
  font-family: var(--f-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--s2);
}

.do-card p {
  font-size: 0.93rem;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

/* ----------------------------------------------------------
   11. SELECTED WORK — alternating photo/text
---------------------------------------------------------- */
.project {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s5);
  align-items: center;
  padding-block: var(--s6);
  border-top: 1px solid var(--rule);
}

.project:first-of-type { border-top: none; }

/* photo-right: text comes first in DOM, photo second.
   On desktop we just let the grid order handle it.
   No extra class needed — HTML order matches visual order. */

.project-photo { min-width: 0; }

.project-text { min-width: 0; }

.project-line {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--s2);
  line-height: 1.5;
}

.project-title {
  font-family: var(--f-display);
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: var(--s2);
  line-height: 1.2;
}

.project-text > p {
  font-size: 0.97rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: var(--s3);
}

.project-focus {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: var(--s2);
}
.project-focus span {
  font-weight: 600;
  color: var(--ink);
}

/* Results row inside project 4 */
.results-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s2);
  padding: var(--s3);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  margin-block: var(--s3);
  text-align: center;
}

@media (prefers-color-scheme: dark) {
  .results-row { background: var(--dark-surf); border-color: var(--dark-rule); }
}

.result-num {
  display: block;
  font-family: var(--f-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.3em;
}

.result-label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.4;
}

/* ----------------------------------------------------------
   12. MY JOURNEY — prose + timeline
---------------------------------------------------------- */
.journey-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--s6);
  align-items: start;
}

.journey-prose .section-heading { margin-bottom: var(--s2); }
.journey-prose .section-heading { margin-bottom: var(--s1); }
.journey-subtitle {
  font-family: var(--f-display);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 600;
  font-style: italic;
  color: var(--accent);
  margin-bottom: var(--s3);
}
.journey-prose p {
  font-size: 0.97rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: var(--s3);
}
.journey-closing {
  font-size: 1rem;
  color: var(--ink);
  border-left: 3px solid var(--accent);
  padding-left: var(--s2);
  margin-block: var(--s3);
}

/* Journey right column — photo stacked above timeline */
.journey-right {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}

/* Leaf-shape photo frame */
.journey-photo-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  /*
    Leaf shape:
    horizontal radii: TL=68%  TR=6%   BR=68%  BL=6%
    vertical radii:   TL=55%  TR=6%   BR=55%  BL=6%
    → top-left and bottom-right are very large & smooth curves
    → top-right and bottom-left are barely rounded
  */
  border-radius: 68% 6% 68% 6% / 55% 6% 55% 6%;
  background: #ffffff;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.09),
    0 14px 36px rgba(0, 0, 0, 0.07);
}

.journey-photo-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
  filter: none;
  transform: none;
}

/* Vertical timeline */
.journey-timeline {
  padding-top: 0.4em;
  position: relative;
}

/* Vertical connecting line */
.journey-timeline::before {
  content: '';
  position: absolute;
  left: 74px;     /* lines up with dot centre */
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--rule);
}

.tl-item {
  display: grid;
  grid-template-columns: 70px 16px 1fr;
  gap: var(--s2);
  align-items: start;
  margin-bottom: var(--s4);
  position: relative;
}
.tl-item:last-child { margin-bottom: 0; }

.tl-year {
  font-family: var(--f-body);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-align: right;
  padding-top: 0.2em;
  white-space: nowrap;
}

.tl-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 0.35em;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  justify-self: center;
}

.tl-text {
  font-size: 0.92rem;
  color: var(--ink);
  line-height: 1.6;
  padding-top: 0.05em;
}

/* ----------------------------------------------------------
   13. HOW I WORK — four columns
---------------------------------------------------------- */
.how-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s4);
}

.how-item { padding-top: var(--s2); }

.how-num {
  display: block;
  font-family: var(--f-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--rule);
  line-height: 1;
  margin-bottom: var(--s2);
}

.how-item h3 {
  font-family: var(--f-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--s1);
}

.how-item p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

/* ----------------------------------------------------------
   14. SKILLS — five groups, two-column grid
---------------------------------------------------------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}

.skill-item {
  padding: var(--s3) var(--s4);
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.skill-item dt {
  font-family: var(--f-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.4em;
}

.skill-item dd {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.65;
}

/* ----------------------------------------------------------
   15. EDUCATION — two entries with institution logos, timeline + badges
---------------------------------------------------------- */

/* Section header with graduation-cap icon */
.edu-section-header {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  margin-bottom: var(--s5);
}
.edu-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  flex-shrink: 0;
}
.edu-section-header .section-heading { margin-bottom: 0.25rem; }
.edu-section-header .section-intro-line { margin-bottom: 0; }

/* Container for entries with timeline connector */
.edu-entries {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  max-width: 820px;
}
/* Vertical timeline line connecting entries */
.edu-entries::before {
  content: '';
  position: absolute;
  left: 41px;          /* aligns with logo centre (84/2 = 42, minus border) */
  top: 84px;           /* starts below the first logo */
  bottom: 84px;        /* ends above the last logo */
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--rule));
  z-index: 0;
}

.edu-entry {
  position: relative;
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: var(--s4);
  align-items: start;
  padding: var(--s4);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  border-left: 3px solid var(--accent);
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}
.edu-entry:hover {
  box-shadow: 0 8px 28px rgba(46, 68, 148, 0.12);
  transform: translateY(-2px);
  border-color: rgba(46, 68, 148, 0.35);
}

/* Timeline marker dot on the left edge */
.edu-entry-marker {
  position: absolute;
  left: -7px;
  top: 50%;
  transform: translateY(-50%);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface);
  z-index: 1;
}

/* Logo — circular frame, logo contained with padding so nothing is cropped */
.edu-logo {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  box-sizing: border-box;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  z-index: 1;
}
.edu-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.edu-entry-body { min-width: 0; }

/* Top row: school name + status badge */
.edu-entry-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s2);
  flex-wrap: wrap;
  margin-bottom: 0.3em;
}

.edu-entry-school {
  font-family: var(--f-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  margin: 0;
}

/* Status badges */
.edu-status {
  font-family: var(--f-body);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3em 0.7em;
  border-radius: var(--r);
  white-space: nowrap;
  flex-shrink: 0;
}
.edu-status-active {
  color: #fff;
  background: var(--accent);
}
.edu-status-done {
  color: #078A3C;
  background: rgba(7, 138, 60, 0.10);
  border: 1px solid rgba(7, 138, 60, 0.25);
}

.edu-entry-degree {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.6em;
  line-height: 1.5;
}

/* Meta row: date + location side by side */
.edu-entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  margin-bottom: var(--s2);
}

.edu-entry-date {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}
.edu-entry-date svg { color: var(--accent); flex-shrink: 0; }

.edu-entry-loc {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}
.edu-entry-loc svg { color: var(--accent); flex-shrink: 0; }

.edu-entry-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.edu-skill-tag {
  display: inline-block;
  font-family: var(--f-body);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(46, 68, 148, 0.08);
  padding: 0.3em 0.75em;
  border-radius: var(--r);
  border: 1px solid rgba(46, 68, 148, 0.15);
  transition: background 0.15s, color 0.15s;
}
.edu-skill-tag:hover {
  background: var(--accent);
  color: #fff;
}

/* ----------------------------------------------------------
   16. CONTACT — green background
---------------------------------------------------------- */
.bg-accent { background: var(--accent); }

.contact-inner { max-width: 680px; }

.contact-heading {
  font-family: var(--f-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--s2);
  line-height: 1.15;
}

.contact-line {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.80);
  margin-bottom: var(--s4);
  max-width: 52ch;
}

.contact-details {
  margin-top: var(--s4);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.contact-details li {
  display: flex;
  gap: var(--s2);
  font-size: 0.93rem;
  align-items: baseline;
}

.contact-label {
  font-weight: 600;
  color: rgba(255,255,255,0.60);
  min-width: 82px;
  flex-shrink: 0;
}

.contact-details a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.contact-details a:hover { opacity: 0.75; }
.contact-details span { color: rgba(255,255,255,0.85); }

/* ----------------------------------------------------------
   17. FOOTER — dark 4-column: subscribe | navigate | services | connect
---------------------------------------------------------- */

/* sr-only: visually hidden but readable by screen readers */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Outer wrapper */
.site-footer {
  background: #0D0D2B;
  color: var(--dark-muted);
  font-family: var(--f-body);
}

/* Top section: the 4-column grid */
.footer-top {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-block: 3.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

/* ---- Col 1: tagline + subscribe ---- */
.footer-tagline {
  font-size: 0.85rem;
  color: var(--dark-muted);
  line-height: 1.65;
  margin-bottom: 1.5rem;
  max-width: 34ch;
}

/* Subscribe form fields */
.subscribe-form { display: flex; flex-direction: column; gap: 0.55rem; }

.sub-field input {
  width: 100%;
  background: #141435;
  border: 1px solid rgba(107,189,212,0.18);
  border-radius: 2px;
  padding: 0.7em 0.9em;
  font-family: var(--f-body);
  font-size: 0.85rem;
  color: #EFF0EC;
  transition: border-color 0.15s;
}
.sub-field input::placeholder { color: #3A5A72; }
.sub-field input:focus {
  outline: none;
  border-color: rgba(255,255,255,0.30);
}

/* Subscribe button — cyan accent matching reference image */
.sub-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  width: 100%;
  padding: 0.75em 1em;
  background: #2E4494;   /* cobalt — primary brand colour */
  color: #fff;
  border: none;
  border-radius: 2px;
  font-family: var(--f-body);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  margin-top: 0.2rem;
}
.sub-btn:hover { background: #263a80; }
.sub-btn svg { flex-shrink: 0; }

/* Success message */
.sub-success {
  display: none;
  font-size: 0.82rem;
  color: #6BBDD4;   /* sky blue success */
  margin-top: 0.25rem;
  margin-bottom: 0;
}

/* ---- Col heading ---- */
.footer-col-heading {
  font-family: var(--f-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #EFF0EC;
  margin-bottom: 1.1rem;
}

/* ---- Navigate & What I Do links ---- */
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer-links a {
  font-size: 0.88rem;
  color: var(--dark-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-links a:hover { color: #EFF0EC; opacity: 1; }

/* ---- Connect (social) ---- */
.footer-social {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  gap: 0.75em;
  font-size: 0.88rem;
  color: var(--dark-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-social a:hover { color: #EFF0EC; opacity: 1; }

/* Icon box — matches the reference image squares */
.fsoc-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: #1a2050;
  border: 1px solid rgba(107,189,212,0.18);
  border-radius: 4px;
  flex-shrink: 0;
  color: var(--dark-muted);
  transition: background 0.15s, color 0.15s;
}
.footer-social a:hover .fsoc-icon {
  background: #2E4494;
  color: #E8F4F8;
}

/* ---- Bottom bar ---- */
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-block: 1rem;
}

.footer-bottom-inner {
  display: flex;
  justify-content: center;
}

.footer-bottom-inner p {
  font-size: 0.8rem;
  color: #3A5A72;
  margin: 0;
}

/* ---- Responsive: tablet ---- */
@media (max-width: 960px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
  .footer-col-subscribe { grid-column: 1 / -1; }
  .footer-tagline { max-width: 100%; }
  .subscribe-form { max-width: 420px; }
}

/* ---- Responsive: mobile ---- */
@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-col-subscribe { grid-column: auto; }
  .subscribe-form { max-width: 100%; }
}

/* ----------------------------------------------------------
   18. RESPONSIVE — tablet ≤ 960px
---------------------------------------------------------- */
@media (max-width: 960px) {

  /* Hero */
  .hero-grid {
    grid-template-columns: 1fr;
    align-items: start;
    gap: var(--s5);
  }
  .hero-text { padding-bottom: 0; }
  .hero-portrait {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    order: -1;
    align-self: auto;
  }
  /* Restore bottom radius when stacked */
  .hero-portrait .img-frame {
    border-radius: var(--r);
    padding-bottom: 125%;
  }
  .hero-portrait .img-frame::after { display: none; }

  /* Impact */
  .impact-grid { grid-template-columns: repeat(2, 1fr); }

  /* About */
  .about-grid { grid-template-columns: 1fr; gap: var(--s4); }

  /* What I do */
  .do-grid { grid-template-columns: 1fr; }

  /* Projects */
  .project {
    grid-template-columns: 1fr;
    gap: var(--s4);
  }
  /* photo-right: swap visual order on mobile */
  .photo-right .project-photo { order: -1; }

  /* Journey */
  .journey-grid { grid-template-columns: 1fr; gap: var(--s5); }
  .journey-photo-wrap { max-width: 400px; margin: 0 auto; }

  /* How I work */
  .how-grid { grid-template-columns: repeat(2, 1fr); }

  /* Skills */
  .skills-grid { grid-template-columns: 1fr; }

  /* Education */
  .edu-entry {
    grid-template-columns: 1fr;
    gap: var(--s3);
  }
  .edu-entries::before { display: none; }
  .edu-entry-marker { display: none; }
}

/* ----------------------------------------------------------
   19. RESPONSIVE — mobile ≤ 600px
---------------------------------------------------------- */
@media (max-width: 600px) {
  :root { --s6: 3.5rem; --s7: 5rem; }

  .section { padding-block: var(--s5); }

  /* Show hamburger */
  .menu-btn { display: flex; }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #354898;
    border-bottom: 1px solid rgba(255,255,255,0.10);
    padding: var(--s2) 5%;
    z-index: 199;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  }
  .main-nav.open { display: block; }

  .nav-list { flex-direction: column; align-items: flex-start; gap: 0.15rem; }
  .nav-link { display: block; padding: 0.55em 0.5em; font-size: 1rem; border: none; }

  /* Hide CV icon on mobile to save space */
  .hdr-icon-btn { display: none; }

  /* Hero */
  .hero-name { font-size: 2.6rem; }
  .hero-portrait {
    max-width: 100%;
    order: -1;
    align-self: auto;
  }

  /* Impact */
  .impact-grid { grid-template-columns: 1fr 1fr; }

  /* Project results row */
  .results-row { grid-template-columns: repeat(2, 1fr); gap: var(--s2); }

  /* How I work */
  .how-grid { grid-template-columns: 1fr 1fr; }

  /* Education entry full-width */
  .edu-entry { padding: var(--s3); }
  .edu-logo { width: 64px; height: 64px; padding: 8px; }
  .edu-section-header { gap: var(--s2); }
  .edu-header-icon { width: 44px; height: 44px; border-radius: 8px; }
  .edu-header-icon svg { width: 24px; height: 24px; }
  .edu-entry-top { flex-direction: column; gap: 0.3rem; }

  /* Timeline line position */
  .journey-timeline::before { left: 70px; }
}

/* ----------------------------------------------------------
   SOCIAL LINKS — hero version (dark background)
   Row of icon + label links sitting below the hero buttons.
---------------------------------------------------------- */
.hero-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: var(--s3);
  align-items: center;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-family: var(--f-body);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--dark-muted);
  text-decoration: none;
  padding: 0.4em 0.9em;
  border: 1px solid var(--dark-rule);
  border-radius: var(--r);
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.social-link svg { flex-shrink: 0; }

.social-link:hover {
  color: var(--dark-ink);
  border-color: rgba(255,255,255,0.30);
  opacity: 1;
}

/* ----------------------------------------------------------
   SOCIAL CHIPS — contact section version (green background)
   Pill buttons that sit below the contact details list.
---------------------------------------------------------- */
.contact-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: var(--s4);
}

.social-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-family: var(--f-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  padding: 0.45em 1em;
  border: 1.5px solid rgba(255,255,255,0.45);
  border-radius: var(--r);
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.social-chip svg { flex-shrink: 0; }

.social-chip:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.80);
  opacity: 1;
}

/* ----------------------------------------------------------
   PROJECT TEXT-ONLY (no photo) — full-width single column
   Used for the YALDA project where no photo is shown.
---------------------------------------------------------- */
.project.project-text-only {
  grid-template-columns: 1fr;   /* full width, no photo column */
  max-width: 780px;             /* readable line length */
}

.project.project-text-only .project-text {
  /* Results row inside a text-only project can be wider */
}

.project.project-text-only .results-row {
  max-width: 600px;
}

/* ----------------------------------------------------------
   PROJECT PHOTO — sizing for the photo-card inside a project row
---------------------------------------------------------- */
.project-photo {
  min-width: 0;
  align-self: center;
}

/* ----------------------------------------------------------
   RESPONSIVE ADDITIONS for new elements
---------------------------------------------------------- */
@media (max-width: 960px) {
  .project.project-text-only {
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .hero-social { gap: 0.5rem; }
  .social-link { font-size: 0.75rem; padding: 0.35em 0.7em; }
  .contact-social { gap: 0.5rem; }
  .social-chip { font-size: 0.78rem; }
  .project.project-text-only .results-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ----------------------------------------------------------
   EDUCATION ILLUSTRATION — now unused (replaced by logo-based entries)
---------------------------------------------------------- */

/* ----------------------------------------------------------
   LICENCES & CERTIFICATIONS — compact card grid + award card
---------------------------------------------------------- */
.cert-section-header {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
  margin-bottom: var(--s5);
}

.cert-header-icon {
  flex-shrink: 0;
  margin-top: 0.15rem;
  color: var(--accent);
}

/* Cert cards — full width now awards are in their own sub-section */
.cert-page-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s5);
  align-items: start;
}

/* ---- Left column: compact card grid ---- */
.cert-col-list { min-width: 0; }

.cert-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

/* Individual cert card */
.cert-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1rem 1.1rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  transition: box-shadow 0.18s, border-color 0.18s, transform 0.18s;
  position: relative;
  overflow: hidden;
}

.cert-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(46, 68, 148, 0.10);
  transform: translateY(-2px);
}

/* Top row: coloured dot + issuer + link icon */
.cert-card-top {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.15rem;
}

/* Colour dot — category indicator */
.cert-card-dot {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-blue   { background: #2E4494; }
.dot-green  { background: #078A3C; }
.dot-purple { background: #7B5EA7; }
.dot-orange { background: #D4720B; }

.cert-card-issuer {
  font-family: var(--f-body);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Icon-only external link — top-right */
.cert-card-link {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  color: var(--muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  margin-left: auto;
}

.cert-card-link:hover {
  background: var(--accent);
  color: #fff;
  opacity: 1;
}

/* Course title */
.cert-card-title {
  font-family: var(--f-body);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
  margin: 0;
  flex: 1;
}

/* Issue date — bottom */
.cert-card-date {
  font-family: var(--f-body);
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: auto;
  padding-top: 0.5rem;
}

/* ---- Awards sub-section ---- */
.awards-divider {
  border-top: 2px solid var(--rule);
  margin: var(--s6) 0 var(--s5);
}

.awards-header {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
  margin-bottom: var(--s4);
}

.awards-header-icon {
  flex-shrink: 0;
  margin-top: 0.15rem;
  color: #f5c842;
}

.awards-grid {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

/* Award card — full-width horizontal layout */
.award-card {
  background: var(--dark-bg);
  border-radius: 14px;
  padding: 1.75rem 2rem;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 2rem;
  box-shadow: 0 8px 36px rgba(13, 13, 43, 0.18);
  border: 1px solid rgba(107, 189, 212, 0.18);
  overflow: hidden;
  position: relative;
}

.award-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(107, 189, 212, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

/* Left column: icon + badge */
.award-card-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.award-icon {
  color: #f5c842;
  line-height: 1;
}

.award-badge {
  display: inline-block;
  font-family: var(--f-body);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #f5c842;
  background: rgba(245, 200, 66, 0.12);
  border: 1px solid rgba(245, 200, 66, 0.30);
  padding: 0.3em 0.85em;
  border-radius: 20px;
  white-space: nowrap;
}

/* Right column: all text */
.award-card-body {
  flex: 1;
  min-width: 0;
}

.award-title {
  font-family: var(--f-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--dark-ink);
  line-height: 1.2;
  margin: 0 0 0.3rem;
}

.award-issuer {
  font-family: var(--f-body);
  font-size: 0.8rem;
  color: var(--dark-muted);
  margin: 0 0 1rem;
}

.award-rule {
  border: none;
  border-top: 1px solid var(--dark-rule);
  margin: 0 0 1rem;
}

.award-project-label {
  font-family: var(--f-body);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-sky);
  margin: 0 0 0.3rem;
}

.award-project-name {
  font-family: var(--f-display);
  font-size: 1.15rem;
  font-weight: 600;
  font-style: italic;
  color: var(--dark-ink);
  margin: 0 0 0.5rem;
}

.award-project-desc {
  font-family: var(--f-body);
  font-size: 0.88rem;
  color: var(--dark-muted);
  line-height: 1.7;
  margin: 0 0 1.25rem;
}

.award-credential-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--f-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-sky);
  text-decoration: none;
  border: 1.5px solid rgba(107, 189, 212, 0.40);
  padding: 0.55em 1.1em;
  border-radius: 6px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.award-credential-link:hover {
  background: rgba(107, 189, 212, 0.12);
  border-color: var(--accent-sky);
  color: var(--dark-ink);
  opacity: 1;
}

/* Responsive */
@media (max-width: 960px) {
  .cert-page-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .award-card { flex-direction: column; gap: 1rem; padding: 1.25rem; }
  .award-card-left { flex-direction: row; align-items: center; }
}

@media (max-width: 560px) {
  .cert-cards { grid-template-columns: 1fr; }
}

/* ----------------------------------------------------------
   COLOUR PATCH — fixes after palette update
   Re-declares missing bg-paper / bg-surface after the
   bg-accent line was edited above, and overrides any
   remaining hard-coded legacy green values.
---------------------------------------------------------- */

/* Light section backgrounds */
.bg-paper   { background: var(--paper); }
.bg-surface { background: var(--surface); }

/* Do-cards sit on the right background */
.bg-surface .do-card { background: var(--paper); }

/* Dot on the timeline — cobalt in light, sky-blue in dark */
.tl-dot { background: var(--accent); }

/* Focus-card top border — cobalt */
.do-card { border-top-color: var(--accent); }

/* Result numbers inside project 4 */
.result-num { color: var(--accent); }

/* Impact section — deep navy surface */
.impact {
  background: var(--dark-surf);
  border-top-color: var(--dark-rule);
  border-bottom-color: var(--dark-rule);
}

/* Hero banner dark bg */
.hero-banner { background: var(--dark-bg); }

/* Footer top border */
.footer-top  { border-top-color: var(--dark-rule); }
.footer-bottom { border-top-color: var(--dark-rule); }

/* ----------------------------------------------------------
   SOUTH SUDANESE IDENTITY ELEMENTS
   Appears in: hero kicker row, about section
---------------------------------------------------------- */

/* --- Mini South Sudan flag stripe --- */
/* The flag has 3 horizontal stripes (black, red, green)
   with a blue triangle on the hoist side and a gold star.
   We render a simplified horizontal stripe version. */
.ss-flag {
  display: inline-flex;
  flex-direction: column;
  width: 22px;
  height: 16px;
  border-radius: 1px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.15);
  gap: 0;
}

.ss-flag.sm {
  width: 18px;
  height: 13px;
}

.ss-black { background: #000000; flex: 1; }
.ss-red   { background: #CE1126; flex: 1.2; }  /* red is thicker */
.ss-green { background: #078A3C; flex: 1; }
/* The blue triangle is approximated as a bottom stripe */
.ss-blue  { background: #1EB0E1; flex: 0.8; }

/* --- Hero identity row (flag + kicker on one line) --- */
.hero-identity {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: var(--s2);
}

/* hero-kicker standalone — restore its margin */
.hero-identity .hero-kicker {
  margin-bottom: 0;
}

/* --- About section: nationality tag below "About me" label --- */
.nationality-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--f-body);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--s3);
  padding: 0.35em 0.75em;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: var(--r);
  background: var(--surface);
}

/* Dark background variant — used inside hero-detail */
.nationality-tag--dark {
  color: #E8F4F8;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(107, 189, 212, 0.30);
  border-left-color: var(--accent-sky);
}

/* --- About meta line (nationality · location · institution) --- */
.about-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: var(--s3);
  padding-bottom: var(--s3);
  border-bottom: 1px solid var(--rule);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
}

.about-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.about-meta-item svg {
  color: var(--accent);
  flex-shrink: 0;
}

.about-meta-sep {
  color: var(--rule);
  font-weight: 400;
}

/* On mobile, allow meta items to wrap */
@media (max-width: 600px) {
  .hero-identity { flex-wrap: wrap; }
  .about-meta { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
  .about-meta-sep { display: none; }
}

/* ============================================================
   SPA NAVIGATION — home cards, section banners, footer nav,
   fade animation, hidden states
============================================================ */

/* ── Hidden sections ── */
[hidden] { display: none !important; }

.section-hidden { display: none !important; }

/* ── Fade-in animation when a section appears ── */
@keyframes sectionFadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section-enter {
  animation: sectionFadeIn 0.35s ease both;
}

@media (prefers-reduced-motion: reduce) {
  .section-enter { animation: none; }
}

/* ── Remove CV download button ── */
.hdr-icon-btn { display: none !important; }

/* ── HOME CARDS SECTION ── */
.home-cards-section {
  background: var(--paper);
  padding-block: var(--s6);
}

.home-cards-intro {
  font-family: var(--f-body);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: var(--s4);
}

.home-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.home-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1.5rem 1.4rem 1.3rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
  position: relative;
  overflow: hidden;
}

.home-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.home-card:hover {
  box-shadow: 0 6px 24px rgba(46, 68, 148, 0.12);
  transform: translateY(-3px);
  border-color: rgba(46, 68, 148, 0.25);
  opacity: 1;
}

.home-card:hover::before { transform: scaleX(1); }

.home-card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.home-card--accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.home-card--accent .home-card__icon,
.home-card--accent .home-card__summary,
.home-card--accent .home-card__cta { color: rgba(255,255,255,0.85); }
.home-card--accent::before { background: #fff; }

.home-card__icon {
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.home-card__title {
  font-family: var(--f-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  margin: 0;
}
.home-card--accent .home-card__title { color: #fff; }

.home-card__summary {
  font-family: var(--f-body);
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.55;
  flex: 1;
  margin: 0;
}

.home-card__cta {
  font-family: var(--f-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 0.5rem;
}
.home-card--accent .home-card__cta { color: #fff; }

/* ── SECTION BANNER (breadcrumb bar at top of each section) ── */
.section-banner {
  background: var(--dark-bg);
  border-bottom: 1px solid var(--dark-rule);
  padding-block: 0.75rem;
}

.section-banner--light {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.section-banner--surface {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}

.section-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-back {
  font-family: var(--f-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-sky);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: opacity 0.15s;
}
.section-banner--light  .section-back,
.section-banner--surface .section-back { color: var(--accent); }
.section-back:hover { opacity: 0.7; }

/* ── SECTION FOOTER NAV (back / next at bottom of each section) ── */
.section-footer-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--s4);
  border-top: 1px solid var(--rule);
  margin-top: var(--s5);
}

.section-footer-nav--accent {
  border-top-color: rgba(255,255,255,0.20);
  margin-top: 0;
  padding-top: var(--s3);
}

.sfn-btn {
  font-family: var(--f-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--accent);
  padding: 0.5em 1.1em;
  border: 1.5px solid var(--accent);
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.sfn-btn:hover {
  background: var(--accent);
  color: #fff;
  opacity: 1;
}

.sfn-btn--light,
.sfn-back--light,
.sfn-next--light {
  color: #fff;
  border-color: rgba(255,255,255,0.55);
}
.sfn-back--light:hover,
.sfn-next--light:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

/* Mobile */
@media (max-width: 600px) {
  .home-cards-grid { grid-template-columns: 1fr; }
  .section-footer-nav { flex-direction: column; gap: 0.75rem; align-items: stretch; }
  .sfn-btn { text-align: center; }
}
