/* ==========================================================================
   diegojoel98.github.io — Diego Gongora
   Vanilla CSS. No frameworks, no CDN, no build step.
   ========================================================================== */

/* ── Tokens: light is the base, dark overrides only the colours ─────────── */
:root {
  --bg:        #fbfdfc;
  --bg-alt:    #f2f7f5;
  --surface:   #ffffff;
  --border:    #e0e8e5;
  --border-str:#cbd8d4;
  --text:      #0e1a17;
  --text-soft: #3c4c48;
  --muted:     #677974;
  --accent:    #0d7a68;
  --accent-str:#0a5f52;
  --accent-bg: #e2f4f0;
  --ring:      #0d7a6840;
  --shadow:    0 1px 2px #0e1a170a, 0 8px 24px -12px #0e1a1714;

  --max:      1120px;
  --gut:      clamp(1.25rem, 4vw, 2.5rem);
  --sans:     ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono:     ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --r:        10px;
  --r-lg:     16px;
  --ease:     cubic-bezier(.22,.61,.36,1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #0c1211;
    --bg-alt:    #101817;
    --surface:   #131d1b;
    --border:    #22302d;
    --border-str:#33443f;
    --text:      #e8f0ee;
    --text-soft: #b9c8c4;
    --muted:     #839792;
    --accent:    #3ddbb8;
    --accent-str:#6ee7c8;
    --accent-bg: #11302a;
    --ring:      #3ddbb845;
    --shadow:    0 1px 2px #0006, 0 12px 32px -16px #000a;
  }
}

:root[data-theme="dark"] {
  --bg:        #0c1211;
  --bg-alt:    #101817;
  --surface:   #131d1b;
  --border:    #22302d;
  --border-str:#33443f;
  --text:      #e8f0ee;
  --text-soft: #b9c8c4;
  --muted:     #839792;
  --accent:    #3ddbb8;
  --accent-str:#6ee7c8;
  --accent-bg: #11302a;
  --ring:      #3ddbb845;
  --shadow:    0 1px 2px #0006, 0 12px 32px -16px #000a;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; padding: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-str); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, h4 { line-height: 1.18; font-weight: 650; letter-spacing: -.018em; text-wrap: balance; }
p { text-wrap: pretty; }

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

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gut); }
.muted { color: var(--muted); }
.pipe  { color: var(--border-str); margin-inline: .45em; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--accent); color: var(--bg);
  padding: .7rem 1.1rem; border-radius: 0 0 var(--r) 0; font-weight: 600;
}
.skip:focus { left: 0; }

/* ── Navigation ────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.nav.is-stuck { border-bottom-color: var(--border); }

.nav__in {
  display: flex; align-items: center; gap: 1rem;
  min-height: 68px;
}

.nav__brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); font-weight: 650; }
.nav__brand:hover { color: var(--text); }
.nav__mark {
  display: grid; place-items: center;
  width: 32px; height: 32px; flex: none;
  border-radius: 9px;
  background: var(--accent); color: var(--bg);
}
.nav__mark svg { width: 100%; height: 100%; }
.nav__name { font-size: .96rem; letter-spacing: -.01em; }

.nav__links { display: flex; gap: .15rem; margin-left: auto; }
.nav__links a {
  position: relative;
  padding: .45rem .7rem; border-radius: 7px;
  color: var(--muted); font-size: .875rem; font-weight: 500;
  transition: color .18s var(--ease), background .18s var(--ease);
}
.nav__links a:hover { color: var(--text); background: var(--bg-alt); }
.nav__links a.is-active { color: var(--accent); }

.nav__tools { display: flex; align-items: center; gap: .4rem; }
@media (min-width: 861px) { .nav__tools { margin-left: .5rem; } }
@media (max-width: 860px)  { .nav__tools { margin-left: auto; } }

.tgl {
  display: inline-flex; align-items: center; gap: .1rem;
  padding: .34rem .6rem; border: 1px solid var(--border); border-radius: 999px;
  font: 600 .72rem/1 var(--mono);
  color: var(--muted);
  transition: border-color .18s var(--ease);
}
.tgl:hover { border-color: var(--border-str); }
.tgl__opt { padding: 0 .1rem; transition: color .18s var(--ease); }
.tgl__opt.is-on { color: var(--accent); }
.tgl__sep { opacity: .4; }

.icobtn {
  display: grid; place-items: center;
  width: 34px; height: 34px; flex: none;
  border: 1px solid var(--border); border-radius: 9px;
  color: var(--muted);
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.icobtn:hover { color: var(--text); border-color: var(--border-str); }
.icobtn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }

.ico-moon { display: none; }
:root[data-theme="dark"] .ico-sun  { display: none; }
:root[data-theme="dark"] .ico-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ico-sun  { display: none; }
  :root:not([data-theme="light"]) .ico-moon { display: block; }
}

.burger { display: none; }
.burger span {
  display: block; width: 15px; height: 1.7px; border-radius: 2px;
  background: currentColor;
  transition: transform .22s var(--ease), opacity .18s var(--ease);
}
.burger span + span { margin-top: 3.4px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.1px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.1px) rotate(-45deg); }

.nav__progress {
  height: 2px; width: var(--p, 0%);
  background: linear-gradient(90deg, var(--accent), var(--accent-str));
  transition: width .1s linear;
}

@media (max-width: 860px) {
  /* Baseline, no JavaScript: the links wrap onto a second row and stay
     visible. The burger does nothing without JS, so it stays hidden —
     collapsing the nav here would strand mobile users with no navigation. */
  .nav__in { flex-wrap: wrap; }
  .nav__links {
    order: 3;                 /* after brand and tools, so it gets its own row */
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
    padding-bottom: .55rem;
  }
  :root:not(.js) { scroll-padding-top: 124px; }   /* taller nav, taller offset */

  /* Enhanced: the inline script in <head> added .js, so collapse into a
     burger-driven dropdown. */
  :root.js .burger { display: grid; }
  :root.js .nav__links {
    position: absolute; inset: 68px 0 auto;
    width: auto; padding: .6rem var(--gut) 1.1rem;
    display: grid; gap: .1rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    transform-origin: top;
    transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
  }
  :root.js .nav__links:not(.is-open) { opacity: 0; visibility: hidden; transform: translateY(-8px); }
  .nav__links a { padding: .65rem .7rem; font-size: 1rem; }
}

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(3rem, 7vw, 5.5rem);
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; z-index: -1;
  top: -34%; right: -12%;
  width: min(760px, 88vw); aspect-ratio: 1;
  background: radial-gradient(circle at 50% 50%, var(--accent-bg), transparent 66%);
  opacity: .85;
  pointer-events: none;
}

.hero__in {
  display: grid; align-items: start;
  gap: clamp(2.25rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
}
/* On narrow screens lead with the name, not the portrait. */
@media (max-width: 900px) {
  .hero__in { grid-template-columns: 1fr; }
  .hero__side { display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; align-items: center; }
  .hero__side .stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .hero__side { grid-template-columns: 1fr; }
  .hero__side .stats { grid-template-columns: 1fr; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font: 500 .78rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.35rem;
}
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}

.hero__h1 {
  font-size: clamp(2.7rem, 8vw, 4.4rem);
  font-weight: 700; letter-spacing: -.04em; line-height: 1.02;
  margin-bottom: .55rem;
}
.grad {
  background: linear-gradient(96deg, var(--accent), var(--accent-str) 78%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.hero__role {
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  font-weight: 550; color: var(--text-soft);
  margin-bottom: 1.4rem;
}

.hero__lede {
  font-size: clamp(1rem, 1.6vw, 1.09rem);
  color: var(--text-soft);
  max-width: 60ch;
  margin-bottom: 2rem;
}
.hero__lede b { color: var(--text); font-weight: 620; }

.hero__cta { display: flex; flex-wrap: wrap; gap: .7rem; margin-bottom: 2rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .72rem 1.3rem;
  border: 1px solid var(--border-str); border-radius: var(--r);
  background: var(--surface); color: var(--text);
  font-size: .925rem; font-weight: 560;
  transition: transform .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease);
}
.btn:hover { color: var(--text); border-color: var(--accent); transform: translateY(-1px); }
.btn--primary {
  background: var(--accent); border-color: var(--accent); color: var(--bg);
  box-shadow: 0 6px 20px -8px var(--accent);
}
.btn--primary:hover { background: var(--accent-str); border-color: var(--accent-str); color: var(--bg); }
.btn--ghost { background: transparent; }

.hero__links { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.hero__links a {
  display: inline-flex; align-items: center; gap: .45rem;
  color: var(--muted); font-size: .875rem; font-weight: 500;
  transition: color .18s var(--ease);
}
.hero__links a:hover { color: var(--accent); }
.hero__links svg { width: 16px; height: 16px; fill: currentColor; }

/* Hero side */
.photo { position: relative; width: min(230px, 58%); margin-bottom: 1.9rem; }
@media (max-width: 900px) { .photo { width: 128px; margin-bottom: 1.5rem; } }
.photo img {
  width: 100%; height: auto; aspect-ratio: 1;
  object-fit: cover; object-position: center top;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  box-shadow: var(--shadow);
}

.stats { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.stats > div { background: var(--surface); padding: .95rem 1.1rem; }
.stats dt {
  font: 500 .7rem/1.2 var(--mono); letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); margin-bottom: .3rem;
}
.stats dd { margin: 0; font-size: 1.7rem; font-weight: 680; letter-spacing: -.03em; line-height: 1.1; }
.stats .dd--sm { font-size: .98rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.35; }
.plus { color: var(--accent); }

/* ── Section shell ─────────────────────────────────────────────────────── */
.sec { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.sec--alt { background: var(--bg-alt); border-block: 1px solid var(--border); }

.sec__kicker {
  font: 500 .78rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .85rem;
}
.sec__h2 {
  font-size: clamp(1.7rem, 4.2vw, 2.5rem); letter-spacing: -.032em;
  margin-bottom: .8rem;
}
.sec__note { color: var(--muted); max-width: 62ch; margin-bottom: 2.6rem; font-size: .95rem; }
.sec__h2 + .about,
.sec__h2 + .tl,
.sec__h2 + .grid-skills,
.sec__h2 + .edu { margin-top: 2.6rem; }

/* ── About ─────────────────────────────────────────────────────────────── */
.about { display: grid; gap: clamp(2rem, 4vw, 3.5rem); grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
@media (max-width: 880px) { .about { grid-template-columns: 1fr; } }

.about__main { display: grid; gap: 1.1rem; }
.about__main p { color: var(--text-soft); max-width: 62ch; font-size: 1.02rem; }
.about__main b { color: var(--text); font-weight: 620; }

.focus { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; align-content: start; }
.focus li { background: var(--surface); padding: 1.05rem 1.2rem; }
.focus h3 { font-size: .95rem; margin-bottom: .2rem; }
.focus p  { font-size: .875rem; color: var(--muted); }

/* ── Timeline ──────────────────────────────────────────────────────────── */
.tl { display: grid; gap: 0; }

.tl__co {
  position: relative;
  padding: 0 0 2.4rem 1.9rem;
  border-left: 1px solid var(--border);
}
.tl__co:last-child { border-left-color: transparent; padding-bottom: 0; }
.tl__co::before {
  content: ""; position: absolute; left: -5.5px; top: .55rem;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--bg-alt); border: 2px solid var(--border-str);
}
.tl__co:first-child::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
@media (max-width: 640px) { .tl__co { padding-left: 1.3rem; } }

.tl__head { margin-bottom: 1.1rem; }
.tl__coname { font-size: 1.28rem; letter-spacing: -.026em; }
.tl__tenure { display: block; margin-top: .15rem; font: 500 .8rem/1.5 var(--mono); color: var(--muted); }

.tl__role {
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 1.15rem 1.35rem;
}
.tl__role + .tl__role { margin-top: .7rem; }
.tl__role.is-current { border-color: color-mix(in srgb, var(--accent) 38%, var(--border)); }

.tl__rhead {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1rem;
  margin-bottom: .8rem;
}
.tl__rhead h4 { font-size: 1.03rem; }
.tl__date {
  display: inline-flex; align-items: center; gap: .55rem; flex-wrap: wrap;
  margin-left: auto;
  font: 500 .78rem/1.4 var(--mono); color: var(--muted);
}
.badge {
  font-style: normal; font-size: .68rem; font-weight: 650; letter-spacing: .05em; text-transform: uppercase;
  padding: .16rem .48rem; border-radius: 999px;
  background: var(--accent-bg); color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
}

.tl__pts { display: grid; gap: .5rem; }
.tl__pts li {
  position: relative; padding-left: 1.1rem;
  font-size: .935rem; color: var(--text-soft);
}
.tl__pts li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent); opacity: .65;
}
.tl__stack {
  margin-top: .9rem; padding-top: .8rem; border-top: 1px dashed var(--border);
  font: 500 .82rem/1.6 var(--mono); color: var(--muted);
}
.inlink { font-family: var(--mono); font-size: .82rem; }

/* ── Skills ────────────────────────────────────────────────────────────── */
.grid-skills {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
}
.skl {
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 1.25rem 1.35rem;
}
.skl h3 {
  font: 600 .78rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
  padding-bottom: .85rem; margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.tags { display: flex; flex-wrap: wrap; gap: .42rem; }
.tags li {
  padding: .3rem .68rem;
  border: 1px solid var(--border); border-radius: 7px;
  background: var(--bg-alt);
  font-size: .845rem; font-weight: 500; color: var(--text-soft);
}
.tags li.is-key {
  background: var(--accent-bg); color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 28%, transparent);
  font-weight: 600;
}
.tags--sm li { font-size: .78rem; padding: .22rem .55rem; }

/* ── Writing ───────────────────────────────────────────────────────────── */
.posts { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.post {
  background: var(--surface);
  padding: 1.35rem 1.45rem;
  transition: background .18s var(--ease);
}
.post:hover { background: color-mix(in srgb, var(--accent-bg) 45%, var(--surface)); }

.post__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .55rem;
  font: 500 .76rem/1 var(--mono); letter-spacing: .03em;
  color: var(--muted); margin-bottom: .55rem;
}
.post__pub {
  padding: .18rem .5rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg-alt);
}
.post__t { font-size: 1.08rem; letter-spacing: -.022em; margin-bottom: .35rem; max-width: 66ch; }
.post__d { font-size: .92rem; color: var(--muted); max-width: 68ch; margin-bottom: .7rem; }
.post__links { display: flex; gap: 1.1rem; font: 500 .83rem/1 var(--mono); }

.more { margin-top: 1.8rem; }

/* ── Projects ──────────────────────────────────────────────────────────── */
.grid-proj {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 288px), 1fr));
}
.proj {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 1.3rem 1.35rem;
  transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.proj:hover { transform: translateY(-3px); border-color: var(--border-str); }
.proj h3 { font-size: 1.04rem; margin-bottom: .5rem; }
.proj > p { font-size: .91rem; color: var(--muted); margin-bottom: 1rem; }
.proj .tags { margin-top: auto; margin-bottom: 1rem; }
.proj__go { display: flex; flex-wrap: wrap; gap: 1rem; font: 500 .84rem/1 var(--mono); }

/* ── Education ─────────────────────────────────────────────────────────── */
.edu { display: grid; gap: clamp(2rem, 4vw, 3rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.edu__h3 {
  font: 600 .78rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1.1rem;
}
.edu__h3:not(:first-child) { margin-top: 2.4rem; }

.edulist, .certs { display: grid; gap: .7rem; }
.edulist li, .certs li {
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r);
  border-left: 2px solid var(--border-str);
  padding: .85rem 1.1rem;
}
.certs li.is-key { border-left-color: var(--accent); background: color-mix(in srgb, var(--accent-bg) 35%, var(--surface)); }
.edulist h4, .certs h4 { font-size: .98rem; margin-bottom: .18rem; }
.edulist__org, .certs p { font-size: .875rem; color: var(--muted); }
.edulist__when { font: 500 .78rem/1.5 var(--mono); color: var(--muted); margin-top: .2rem; }
.certs a { font-family: var(--mono); font-size: .78rem; }

.certs__meta {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .45rem;
  margin-top: .35rem;
  font: 500 .78rem/1.6 var(--mono); color: var(--muted);
}
.certs__all { margin-top: 1rem; font: 500 .84rem/1 var(--mono); }

.langs { display: grid; gap: .6rem; }
.langs li {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .8rem;
  padding-bottom: .6rem; border-bottom: 1px solid var(--border);
}
.langs span { font-weight: 600; font-size: .98rem; }
.langs em { font-style: normal; font-size: .855rem; color: var(--muted); }
.langs__cert { font-family: var(--mono); font-size: .78rem; }

.disc { margin-top: 1.6rem; border-top: 1px solid var(--border); padding-top: 1.1rem; }
.disc summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: center; gap: .55rem;
  font: 500 .855rem/1.4 var(--sans); color: var(--accent);
}
.disc summary::-webkit-details-marker { display: none; }
.disc summary::before {
  content: "+"; display: grid; place-items: center;
  width: 19px; height: 19px; flex: none;
  border: 1px solid currentColor; border-radius: 5px;
  font: 600 .8rem/1 var(--mono);
}
.disc[open] summary::before { content: "–"; }
.disc[open] summary { margin-bottom: 1.1rem; }

.misc { display: grid; gap: .85rem; }
.misc li { font-size: .89rem; }
.misc b { display: block; font-weight: 600; font-size: .92rem; }
.misc span { color: var(--muted); }
.misc a { font-family: var(--mono); font-size: .78rem; }

/* ── Contact ───────────────────────────────────────────────────────────── */
.contact { text-align: center; padding-block: clamp(4rem, 9vw, 7rem); }
.contact .sec__kicker { text-align: center; }
.contact__h2 { margin-bottom: 1rem; }
.contact__lede { color: var(--muted); max-width: 52ch; margin: 0 auto 2.4rem; }

.mailto {
  display: inline-block;
  font-size: clamp(1.05rem, 3.4vw, 1.65rem); font-weight: 620; letter-spacing: -.028em;
  overflow-wrap: anywhere;
  padding-bottom: .2rem;
  border-bottom: 2px solid color-mix(in srgb, var(--accent) 35%, transparent);
  transition: border-color .2s var(--ease);
}
.mailto:hover { border-bottom-color: var(--accent); }

.contact__links {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem;
  margin-top: 2.4rem;
  font: 500 .875rem/1 var(--mono);
}

/* ── Footer ────────────────────────────────────────────────────────────── */
.foot { border-top: 1px solid var(--border); padding: 1.6rem 0; background: var(--bg-alt); }
.foot__in { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.2rem; justify-content: space-between; }
.foot p { font-size: .84rem; color: var(--muted); }
.foot__meta { display: flex; align-items: center; }
.linkish { color: var(--accent); font-size: .84rem; padding: 0; }
.linkish:hover { color: var(--accent-str); text-decoration: underline; }
.foot a { font-size: .84rem; }

/* ── Reveal on scroll ──────────────────────────────────────────────────── */
[data-reveal] {
  opacity: 0; transform: translateY(14px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
[data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; }
}

/* ── Print / Save as PDF ───────────────────────────────────────────────── */
@media print {
  /* A bare :root is (0,1,0) and loses to both dark-theme paths —
     :root[data-theme="dark"] and :root:not([data-theme="light"]) are (0,2,0).
     Media queries add no specificity, so printing in dark mode would keep the
     dark palette: with "background graphics" off (Chrome's default) that means
     near-white text on white paper. Match those selectors here so the light
     palette wins. This block must stay last in the file — it ties on
     specificity and relies on source order. */
  :root,
  :root[data-theme="dark"],
  :root:not([data-theme="light"]) {
    color-scheme: light;
    --bg: #fff; --bg-alt: #fff; --surface: #fff;
    --border: #ccc; --border-str: #999;
    --text: #000; --text-soft: #222; --muted: #555;
    --accent: #06554a; --accent-str: #06554a; --accent-bg: #fff;
    --shadow: none;
  }

  /* Reveal-on-scroll starts at opacity 0 and only clears once
     IntersectionObserver fires. Printing without scrolling the whole page
     (Cmd+P, or the footer button reached via a nav jump) would otherwise
     leave every off-screen section blank in the PDF. */
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .nav, .hero__cta, .hero__links, .more, .foot__meta,
  .contact__links, .burger, .nav__progress { display: none !important; }
  .hero::before { display: none; }

  /* Anything whose visual IS a painted background vanishes once the browser
     drops background graphics (Chrome's default in the print dialog). Rebuild
     those from text and borders, which always print.
     Most other backgrounds here resolve to #fff in print, so losing them
     changes nothing — these three are the ones that lose actual content. */

  /* The gradient is clipped to the text and the fill is transparent, so with
     no background painted the surname simply disappears from the heading. */
  .grad {
    background: none;
    -webkit-background-clip: border-box; background-clip: border-box;
    -webkit-text-fill-color: var(--text); color: var(--text);
  }

  /* Bullet dots are 5px background circles; without them every
     responsibility reads as a run-on indented line. */
  .tl__pts li { padding-left: .95rem; }
  .tl__pts li::before {
    content: "\2022";
    top: 0; left: 0;
    width: auto; height: auto;
    background: none; border-radius: 0; opacity: 1;
    color: var(--text); line-height: inherit;
  }

  /* Timeline nodes are background circles — give them a printable border. */
  .tl__co::before,
  .tl__co:first-child::before {
    background: none;
    border-color: var(--text);
    box-shadow: none;
  }

  .dot { display: none; }   /* decorative status dot, nothing to print */
  body { font-size: 10.5pt; line-height: 1.45; }
  .sec { padding: 1.1rem 0; break-inside: avoid; }
  .sec--alt { border: 0; }
  .hero { padding: 0 0 1rem; }
  .hero__in { grid-template-columns: 1fr; }
  .photo { display: none; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .tl__co, .tl__role, .post, .proj, .skl { break-inside: avoid; }
  .tl__role, .skl, .proj, .post, .edulist li, .certs li { box-shadow: none; }
  .disc[open] .misc, .disc { display: none; }
  a { color: #000; text-decoration: none; }
  .grid-proj, .grid-skills { grid-template-columns: repeat(2, 1fr); }
}
