/* ─── Fonts (self-hosted, latin subset) ─────────────────── */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(fonts/inter-latin.woff2) format('woff2');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/poppins-600.woff2) format('woff2');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/poppins-700.woff2) format('woff2');
}

/* metric-matched fallback so the swap to Inter doesn't shift the layout */
@font-face {
  font-family: 'Inter Fallback';
  src: local('Arial');
  size-adjust: 107.4%;
  ascent-override: 90.2%;
  descent-override: 22.5%;
  line-gap-override: 0%;
}

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

ul, ol, menu { list-style: none; }

:root {
  color-scheme: light;
  --bg:         #ffffff;
  --surface:    #fafafa;
  --surface-2:  #f5f5f7;
  --border:     #e5e5e7;
  --text:       #1d1d1f;
  --muted:      #6e6e73;
  --accent:     #16a34a;
  --accent-2:   #34d399;
  --accent-dim: rgba(22, 163, 74, 0.08);
  --accent-line: rgba(22, 163, 74, 0.35);
  --radius:     0.625rem;
  --radius-lg:  1.25rem;
  --font-sans:  'Inter', 'Inter Fallback', system-ui, sans-serif;
  --font-head:  'Poppins', system-ui, sans-serif;
  --max-w:      51.25rem;
  --ease:       cubic-bezier(0.22, 1, 0.36, 1);

  --glass-bg:        rgba(255, 255, 255, 0.55);
  --glass-bg-strong: rgba(255, 255, 255, 0.75);
  --glass-border:    rgba(255, 255, 255, 0.6);
  --glass-shadow:    inset 0 0.0625rem 0 rgba(255, 255, 255, 0.6), 0 0.5rem 2rem rgba(31, 38, 44, 0.08);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg:         #0b0d10;
  --surface:    rgba(255, 255, 255, 0.045);
  --surface-2:  rgba(255, 255, 255, 0.07);
  --border:     rgba(255, 255, 255, 0.12);
  --text:       #f2f2f4;
  --muted:      #9a9aa3;
  --accent:     #34d399;
  --accent-2:   #6ee7b7;
  --accent-dim: rgba(52, 211, 153, 0.14);
  --accent-line: rgba(52, 211, 153, 0.4);

  --glass-bg:        rgba(22, 24, 28, 0.55);
  --glass-bg-strong: rgba(22, 24, 28, 0.75);
  --glass-border:    rgba(255, 255, 255, 0.09);
  --glass-shadow:    inset 0 0.0625rem 0 rgba(255, 255, 255, 0.06), 0 0.5rem 2rem rgba(0, 0, 0, 0.45);
}

html { scroll-behavior: smooth; }

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  max-width: calc(var(--max-w) + 1.7rem);
  margin: 0 auto;
  padding: 2.75rem 0.85rem;
  position: relative;
  overflow-x: hidden;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

button { font: inherit; }

/* ─── Divider (thematic break) ───────────────────────────── */
hr {
  border: none;
  height: 0.0625rem;
  margin: 1.2rem 0;
  background: linear-gradient(90deg, transparent, var(--border) 15%, var(--border) 85%, transparent);
  position: relative;
  overflow: visible;
}

hr::after {
  content: '';
  position: absolute;
  top: -0.0625rem;
  left: 50%;
  transform: translateX(-50%);
  width: 4rem;
  height: 0.1875rem;
  border-radius: 999rem;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: transform 0.6s var(--ease);
}

/* ─── Section headings ───────────────────────────────────── */
h2 {
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

h2::before {
  content: '';
  width: 1.125rem;
  height: 0.125rem;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 999rem;
  flex-shrink: 0;
}

/* ─── Fixed UI: glass, canvas, progress, toggles ─────────── */
@media screen {
  body > header,
  body > menu,
  body > footer > a,
  body > aside {
    background: var(--glass-bg);
    backdrop-filter: blur(1.25rem) saturate(180%);
    -webkit-backdrop-filter: blur(1.25rem) saturate(180%);
    border: 0.0625rem solid var(--glass-border);
    box-shadow: var(--glass-shadow);
  }

  /* generative flow-field lines, drawn on canvas behind everything */
  body > canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.55;
  }

  :root[data-theme="dark"] body > canvas { opacity: 0.7; }

  /* faint fixed backdrop line grid for depth, subtle apple-ish texture */
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
      linear-gradient(var(--border) 0.0625rem, transparent 0.0625rem) 0 0 / 100% 6rem,
      radial-gradient(37.5rem circle at 50% 0%, rgba(22, 163, 74, 0.05), transparent 60%);
    opacity: 0.5;
    mask-image: linear-gradient(to bottom, black, transparent 70%);
  }

  /* drifting aurora blobs behind the content */
  :root::before,
  :root::after,
  body > main::after {
    content: '';
    position: fixed;
    width: 55vw;
    height: 55vw;
    max-width: 40rem;
    max-height: 40rem;
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
  }

  :root::before {
    top: -18%;
    left: -14%;
    opacity: 0.4;
    background: radial-gradient(circle, var(--accent-2), transparent 72%);
    animation: drift1 24s ease-in-out infinite alternate;
  }

  :root::after {
    bottom: -22%;
    right: -16%;
    opacity: 0.3;
    background: radial-gradient(circle, rgba(29, 29, 31, 0.35), transparent 72%);
    animation: drift2 28s ease-in-out infinite alternate;
  }

  body > main::after {
    top: 30%;
    right: -20%;
    width: 38vw;
    height: 38vw;
    z-index: -1;
    opacity: 0.22;
    background: radial-gradient(circle, var(--accent), transparent 72%);
    animation: drift3 20s ease-in-out infinite alternate;
  }

  /* global cursor spotlight, positioned from script via --glow-x/--glow-y */
  body > main::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 30rem;
    height: 30rem;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-2), transparent 70%);
    opacity: 0.15;
    pointer-events: none;
    z-index: -1;
    transform: translate(var(--glow-x, -100vw), var(--glow-y, -100vh));
    will-change: transform;
  }

  @media (max-width: 56.25rem), (hover: none) {
    body > main::before { display: none; }
  }

  @keyframes drift1 {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(7vw, 9vh) scale(1.18); }
  }

  @keyframes drift2 {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-6vw, -7vh) scale(1.12); }
  }

  @keyframes drift3 {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-5vw, 6vh) scale(1.1); }
  }

  @media (prefers-reduced-motion: reduce) {
    :root::before,
    :root::after,
    body > main::after { animation: none; }
  }

  /* scroll progress bar */
  body > progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 0.1875rem;
    z-index: 300;
    appearance: none;
    border: none;
    background: transparent;
    color: var(--accent);
  }

  body > progress::-webkit-progress-bar { background: transparent; }
  body > progress::-webkit-progress-value { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
  body > progress::-moz-progress-bar { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

  /* sticky mini header, inert (and hidden) until the hero scrolls away */
  body > header {
    position: fixed;
    top: 0.9rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 150;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.55rem 1.2rem;
    border-radius: 999rem;
    transition: transform 0.4s var(--ease), visibility 0.4s;
  }

  body > header[inert] {
    transform: translate(-50%, -150%);
    visibility: hidden;
  }

  body > header > p {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--text);
    white-space: nowrap;
  }

  body > header > nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  /* dot links: text kept for assistive tech, pushed out of the box */
  body > header > nav a {
    display: inline-block;
    width: 0.4375rem;
    height: 0.4375rem;
    border-radius: 50%;
    background: var(--border);
    overflow: hidden;
    white-space: nowrap;
    text-indent: 100%;
    transition: background 0.2s var(--ease), transform 0.2s var(--ease);
  }

  body > header > nav a[aria-current],
  body > header > nav a:hover {
    background: var(--accent);
    transform: scale(1.35);
  }

  @media (max-width: 43.75rem) {
    body > header {
      left: 0.75rem;
      top: 0.75rem;
      transform: none;
      padding: 0.5rem 0.9rem;
      max-width: calc(100vw - 8.5rem);
    }

    body > header[inert] { transform: translateY(-150%); }

    body > header > nav { display: none; }

    body > header > p {
      overflow: hidden;
      text-overflow: ellipsis;
      font-size: 0.75rem;
    }
  }

  /* language / theme toggle */
  body > menu {
    position: fixed;
    top: 1.25rem;
    right: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    z-index: 100;
    border-radius: 999rem;
    padding: 0.3rem 0.5rem;
    transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease);
  }

  /* sliding highlight behind the active language, sized from script */
  body > menu::before {
    content: '';
    position: absolute;
    top: 0.25rem;
    bottom: 0.25rem;
    left: 0.25rem;
    width: var(--slider-w, 1.625rem);
    transform: translateX(var(--slider-x, 0));
    border-radius: 999rem;
    background: var(--accent-dim);
    border: 0.0625rem solid var(--accent-line);
    transition: transform 0.3s var(--ease), width 0.3s var(--ease);
    z-index: 0;
  }

  body > menu > li {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
  }

  /* "/" between the language buttons */
  body > menu > li:nth-child(2)::before {
    content: '/';
    color: var(--border);
    font-size: 0.85rem;
    margin-right: 0.25rem;
  }

  /* thin rule before the theme button */
  body > menu > li:nth-child(3)::before {
    content: '';
    width: 0.0625rem;
    height: 0.875rem;
    background: var(--border);
    margin: 0 0.5rem 0 0.25rem;
  }

  body > menu button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted);
    border-radius: 999rem;
  }

  body > menu button[name="lang"] {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    padding: 0.15rem 0.4rem;
    transition: color 0.2s var(--ease);
  }

  body > menu button[aria-pressed="true"] { color: var(--accent); }
  body > menu button[aria-pressed="false"]:hover { color: var(--text); }

  body > menu button[name="theme"] {
    font-size: 0.85rem;
    line-height: 1;
    padding: 0.2rem 0.3rem;
    transition: color 0.2s var(--ease), transform 0.3s var(--ease);
  }

  body > menu button[name="theme"]:hover { color: var(--accent); transform: rotate(18deg); }

  /* floating PDF button */
  body > footer {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 100;
  }

  body > footer > a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.15rem;
    border-radius: 999rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  }

  body > footer > a:hover { transform: translateY(-0.1875rem); }
  body > footer svg { width: 0.9375rem; height: 0.9375rem; flex-shrink: 0; }

  @media (max-width: 35rem) {
    body > menu { top: 0.75rem; right: 0.75rem; }
    body > footer { bottom: 1rem; right: 1rem; }
    body > footer > a { padding: 0.75rem; }
    body > footer > a > span { display: none; }
  }
}

/* ─── Layout ────────────────────────────────────────────── */
body > aside,
body > main {
  position: relative;
}

body > main { z-index: 1; }

body > aside {
  z-index: 2;
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.35rem;
  margin-bottom: 1.5rem;
}

@media screen and (min-width: 61.25rem) {
  body {
    max-width: calc(67.5rem + 1.7rem);
    display: grid;
    grid-template-columns: 18.75rem minmax(0, 1fr);
    gap: 2.5rem;
    align-items: start;
  }

  body > aside {
    position: sticky;
    top: 1.5rem;
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
    scrollbar-width: thin;
    margin-bottom: 0;
  }
}

/* ─── Sidebar ────────────────────────────────────────────── */
body > aside > nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 1.15rem 0 1.4rem;
}

body > aside > nav a {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding: 0.4rem 0.6rem;
  border-radius: 0.5rem;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

body > aside > nav a:hover,
body > aside > nav a[aria-current] {
  color: var(--accent);
  background: var(--accent-dim);
}

body > aside > section > h2 { margin-bottom: 0.6rem; }

/* ─── Header / identity ─────────────────────────────────── */
body > aside > header {
  padding-top: 0.25rem;
  margin-bottom: 1.15rem;
}

body > aside > header h1 {
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 5.5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.12;
  margin-bottom: 0.4rem;
}

body > aside > header hgroup > p {
  font-size: 1rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.85rem;
  letter-spacing: 0.01em;
  position: relative;
  display: inline-block;
}

address {
  font-style: normal;
  font-size: 0.85rem;
  color: var(--muted);
}

address ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

address li {
  display: flex;
  gap: 0.5rem;
}

address li + li::before {
  content: '·';
  color: var(--border);
}

address a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s var(--ease);
  position: relative;
}

address a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -0.125rem;
  height: 0.0625rem;
  background: var(--accent);
  transition: right 0.25s var(--ease);
}

address a:hover { color: var(--accent); }
address a:hover::after { right: 0; }

/* ─── About ──────────────────────────────────────────────── */
main > section > p {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.8;
  max-width: 64ch;
}

/* ─── Timeline (experience / education / honors) ─────────── */
main > section > ol {
  position: relative;
  padding-left: 1.5rem;
}

main > section > ol::before {
  content: '';
  position: absolute;
  left: 0.3rem;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 0.125rem;
  background: var(--border);
  border-radius: 0.125rem;
  transition: background-color 0.4s var(--ease);
}

main > section > ol > li { position: relative; }

main > section > ol > li::before {
  content: '';
  position: absolute;
  left: -1.45rem;
  top: 1.3rem;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: var(--bg);
  border: 0.125rem solid var(--accent);
  z-index: 1;
  transition: background-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

main > section > ol > li:hover::before {
  background: var(--accent);
  transform: scale(1.25);
  box-shadow: 0 0 0 0.25rem var(--accent-dim);
}

/* entry */
li > article {
  margin: 0 -1rem 0.6rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  transition: background 0.25s var(--ease);
}

li > article:hover { background: var(--surface); }

li > article > header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.3rem;
  flex-wrap: wrap;
}

li > article > header h3 {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.15rem;
}

li > article > header hgroup > p {
  font-size: 0.875rem;
  color: var(--muted);
}

li > article > header hgroup small { font-size: inherit; }

li > article > header > :is(p, time) {
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  color: var(--accent);
}

li > article > ul {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

li > article > ul > li {
  font-size: 0.875rem;
  color: var(--muted);
  padding-left: 1rem;
  position: relative;
}

li > article > ul > li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.75rem;
  line-height: 1.8;
}

/* verification / credential link pill */
article > a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.6rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-dim);
  border: 0.0625rem solid var(--accent-line);
  border-radius: 999rem;
  padding: 0.35rem 0.85rem;
  text-decoration: none;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}

article > a::before {
  content: '✓';
  content: '✓' / '';
  font-weight: 700;
}

article > a:hover {
  border-color: var(--accent);
  background: rgba(22, 163, 74, 0.14);
  transform: translateY(-0.0625rem);
}

/* ─── Skills (sidebar definition list) ───────────────────── */
aside dt {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-top: 0.2rem;
  margin-bottom: 0.4rem;
}

aside dd { margin-bottom: 0.75rem; }
aside dd:last-child { margin-bottom: 0; }

aside dd > ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

@media screen and (min-width: 35rem) and (max-width: 61.24rem) {
  aside dl {
    display: grid;
    grid-template-columns: 6.875rem 1fr;
    gap: 0.75rem 1rem;
  }

  aside dt,
  aside dd { margin-bottom: 0; }
}

aside dd > ul > li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text);
  background: var(--glass-bg-strong);
  border: 0.0625rem solid var(--border);
  border-radius: var(--radius);
  padding: 0.28rem 0.7rem;
  transition:
    opacity 0.55s var(--ease) var(--d, 0s),
    translate 0.55s var(--ease) var(--d, 0s),
    border-color 0.2s var(--ease),
    color 0.2s var(--ease),
    transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease),
    background-color 0.4s var(--ease);
}

aside dd > ul > li:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-0.125rem);
  box-shadow: 0 0.375rem 1rem rgba(22, 163, 74, 0.12);
}

/* five-dot skill level: gradient strip masked into dots */
aside dd > ul > li[data-level="1"] { --level: 1; }
aside dd > ul > li[data-level="2"] { --level: 2; }
aside dd > ul > li[data-level="3"] { --level: 3; }
aside dd > ul > li[data-level="4"] { --level: 4; }
aside dd > ul > li[data-level="5"] { --level: 5; }

aside dd > ul > li[data-level]::after {
  content: '';
  flex-shrink: 0;
  width: 1.75rem;
  height: 0.25rem;
  background: linear-gradient(90deg, var(--accent) calc(var(--level) * 0.375rem - 0.0625rem), var(--border) 0);
  -webkit-mask-image: radial-gradient(circle at 0.125rem 50%, #000 0.11rem, transparent 0.125rem);
  -webkit-mask-size: 0.375rem 0.25rem;
  -webkit-mask-repeat: repeat-x;
  mask-image: radial-gradient(circle at 0.125rem 50%, #000 0.11rem, transparent 0.125rem);
  mask-size: 0.375rem 0.25rem;
  mask-repeat: repeat-x;
}

/* ─── Cards (projects / certifications) ──────────────────── */
main > section:has(> article) {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
  gap: 0.85rem;
}

main > section:has(> article) > h2 {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

main > section > article {
  background: var(--glass-bg-strong);
  border: 0.0625rem solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  position: relative;
  overflow: hidden;
  --rx: 0deg; --ry: 0deg; --ty: 0rem;
  transform: perspective(50rem) rotateX(var(--rx)) rotateY(var(--ry)) translateY(var(--ty));
  transition:
    opacity 0.55s var(--ease) var(--d, 0s),
    translate 0.55s var(--ease) var(--d, 0s),
    transform 0.3s var(--ease),
    border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    background-color 0.4s var(--ease);
}

main > section > article::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: radial-gradient(17.5rem circle at var(--mx, 50%) var(--my, 50%), rgba(22, 163, 74, 0.14), transparent 70%);
  transition: opacity 0.3s var(--ease);
}

main > section > article:hover {
  border-color: var(--accent);
  --ty: -0.25rem;
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.07);
}

main > section > article:hover::before { opacity: 1; }

/* first card of each grid is the featured one */
main > section > article:first-of-type {
  grid-column: 1 / -1;
  border-color: var(--accent-line);
  background: linear-gradient(135deg, var(--accent-dim), var(--glass-bg-strong) 55%);
  padding: 1.4rem 1.6rem;
}

main > section > article > header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem 0.6rem;
  margin-bottom: 0.25rem;
}

main > section > article > header > * { flex-shrink: 0; }

main > section > article > header > h3 {
  flex-shrink: 1;
  margin-right: auto;
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

main > section > article:first-of-type > header > h3 { font-size: 1.05rem; }

main > section > article > header > time {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  padding-top: 0.1rem;
}

main > section > article > header > mark {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border: 0.0625rem solid var(--accent-line);
  border-radius: 999rem;
  padding: 0.2rem 0.6rem;
  white-space: nowrap;
}

main > section > article > header > a {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  padding-top: 0.1rem;
  display: inline-block;
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}

main > section > article > header > a:hover { color: var(--text); transform: translateX(0.125rem); }

/* organisation / tech line */
main > section > article > header + p {
  font-size: 0.78rem;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

/* description */
main > section > article > header + p + p {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
}

main > section > article:first-of-type > header + p + p {
  font-size: 0.85rem;
  max-width: 60ch;
}

/* ─── Certification score breakdown ─────────────────────── */
article > section {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 0.0625rem solid var(--border);
}

article > section > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
}

article > section > header > h4 { font-size: inherit; font-weight: inherit; }

article > section > header > p {
  color: var(--text);
  white-space: nowrap;
}

article > section > ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem 1.5rem;
  margin-top: 1rem;
}

article > section > ul > li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 4.5rem;
  font-size: 0.68rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.25;
}

/* ring fill per score (score → percentage of the 80–210 scale) */
article > section > ul > li:nth-child(1) { --pct: 89%; }
article > section > ul > li:nth-child(2) { --pct: 93%; }
article > section > ul > li:nth-child(3) { --pct: 91%; }
article > section > ul > li:nth-child(4) { --pct: 88%; }
article > section > ul > li:nth-child(5) { --pct: 87%; }
article > section > ul > li:nth-child(6) { --pct: 86%; }

article > section > ul > li > data {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  isolation: isolate;
  background: conic-gradient(var(--accent) var(--pct, 0%), var(--surface-2) 0);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}

article > section > ul > li > data::before {
  content: '';
  position: absolute;
  inset: 0.3rem;
  border-radius: 50%;
  background: var(--glass-bg-strong);
  z-index: -1;
}

article > section > ul > li:first-child { color: var(--accent); font-weight: 600; }

article > section > ul > li:first-child > data {
  width: 4.5rem;
  height: 4.5rem;
  background: conic-gradient(var(--accent-2) var(--pct, 0%), var(--surface-2) 0);
  font-size: 0.92rem;
  color: var(--accent);
}

article > section > footer {
  margin-top: 0.75rem;
  padding-top: 0.6rem;
  border-top: 0.0625rem solid var(--border);
  font-size: 0.7rem;
  color: var(--muted);
}

/* ─── Languages ──────────────────────────────────────────── */
main > section > ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

main > section > ul > li {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  background: var(--glass-bg-strong);
  border: 0.0625rem solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.9rem;
  transition:
    opacity 0.55s var(--ease) var(--d, 0s),
    translate 0.55s var(--ease) var(--d, 0s),
    border-color 0.2s var(--ease),
    transform 0.2s var(--ease),
    background-color 0.4s var(--ease);
}

main > section > ul > li:hover {
  border-color: var(--accent);
  transform: translateY(-0.125rem);
}

main > section > ul > li > strong {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

main > section > ul > li > span {
  font-size: 0.78rem;
  color: var(--muted);
}

/* ─── Scroll reveal & staggered entrance ─────────────────────
   hidden states only apply when scripts run and motion is welcome,
   so content is always visible without JS, in print, or with reduced motion */
@media screen and (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  main > section ~ section {
    opacity: 0;
    translate: 0 1.375rem;
    transition: opacity 0.7s var(--ease), translate 0.7s var(--ease);
  }

  main > section[data-in-view] {
    opacity: 1;
    translate: none;
  }

  main > hr::after { transform: translateX(-50%) scaleX(0); }
  main > hr[data-in-view]::after { transform: translateX(-50%) scaleX(1); }

  /* grouped items fade in one-by-one once their parent is in view */
  main > section ~ section > article,
  main > section ~ section > ul > li {
    opacity: 0;
    translate: 0 0.875rem;
  }

  main > section[data-in-view] > article,
  main > section[data-in-view] > ul > li {
    opacity: 1;
    translate: none;
  }

  main > section > article:nth-of-type(1) { --d: 0.04s; }
  main > section > article:nth-of-type(2) { --d: 0.1s; }
  main > section > article:nth-of-type(3) { --d: 0.16s; }
  main > section > article:nth-of-type(4) { --d: 0.22s; }
  main > section > article:nth-of-type(5) { --d: 0.28s; }
  main > section > article:nth-of-type(6) { --d: 0.34s; }
  main > section > article:nth-of-type(7) { --d: 0.4s; }

  main > section > ul > li:nth-child(1) { --d: 0.03s; }
  main > section > ul > li:nth-child(2) { --d: 0.09s; }
  main > section > ul > li:nth-child(3) { --d: 0.15s; }
}

/* ─── Off-screen rendering skip ─────────────────────────── */
@media screen {
  main > section ~ section {
    content-visibility: auto;
    contain-intrinsic-size: auto 28rem;
  }
}

/* ─── Print ──────────────────────────────────────────────── */
@media print {
  body {
    background: #fff;
    color: #111;
    padding: 1.5rem;
  }

  :root {
    --bg: #fff;
    --surface: #f5f5f5;
    --border: #d0d0d0;
    --text: #111;
    --muted: #555;
    --accent: #0f7a3c;
    --accent-dim: #e3f6ea;
  }

  body > :is(canvas, progress, header, menu, footer) { display: none; }

  article { break-inside: avoid; }
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 35rem) {
  main > section:has(> article) { grid-template-columns: 1fr; }
  li > article > header { flex-direction: column; }
  li > article { margin-left: -0.5rem; margin-right: -0.5rem; }
  main > section > ol { padding-left: 1.15rem; }
  main > section > ol > li::before { left: -1.1rem; }
}
