/* ─────────────────────────────────────────────────────────────
   bryanborosky.com — styles
   Colors are named after emission lines: H-alpha red, O-III teal.
   ───────────────────────────────────────────────────────────── */
:root {
  --bg: #08090c;
  --bg-2: #0f1117;
  --bg-3: #161922;
  --line: rgba(255, 255, 255, 0.09);
  --text: #ebe7df;
  --muted: #9b978e;
  --ha: #e8573f;      /* H-alpha, 656.3 nm */
  --oiii: #62bcb0;    /* O-III, 500.7 nm */
  --display: "Zen Dots", system-ui, sans-serif;   /* name and titles */
  --serif: var(--display);
  --sans: "Space Mono", ui-monospace, monospace;   /* body text */
  --mono: "Space Mono", ui-monospace, monospace;
  --wrap: 1200px;
  --narrow: 720px;
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15.5px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
::selection { background: var(--ha); color: #fff; }

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

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 2.5rem); }
.wrap-narrow { max-width: calc(var(--narrow) + 2 * clamp(1.25rem, 4vw, 2.5rem)); margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 2.5rem); }

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.2; letter-spacing: 0; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.6rem); }
h2 { font-size: clamp(1.25rem, 2.2vw, 1.7rem); }
h3 { font-size: 1.15rem; }

.kicker {
  font: 500 .75rem/1.4 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ha);
  margin: 0 0 1rem;
}
.kicker a { text-decoration: none; }
.kicker a:hover { color: var(--text); }
.lede { font-size: 1.02rem; color: var(--muted); max-width: 46ch; }

.btn {
  display: inline-block;
  font: 500 .85rem/1 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: .95rem 1.4rem;
  background: var(--text);
  color: var(--bg);
  border: 1px solid var(--text);
  border-radius: var(--radius);
  transition: background .2s, color .2s;
}
.btn:hover { background: transparent; color: var(--text); }
.btn-ghost { background: transparent; color: var(--text); border-color: rgba(255,255,255,.35); }
.btn-ghost:hover { border-color: var(--text); }

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  padding: 1.1rem clamp(1.25rem, 4vw, 2.5rem);
  background: rgba(8, 9, 12, .82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header--overlay {
  position: fixed; left: 0; right: 0;
  background: linear-gradient(rgba(0,0,0,.55), transparent);
  backdrop-filter: none; -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
  transition: background .3s, border-color .3s;
}
.site-header--overlay.is-scrolled { background: rgba(8,9,12,.88); border-bottom-color: var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.brand { font: 400 1.05rem/1 var(--display); text-decoration: none; white-space: nowrap; }
.site-nav { display: flex; gap: clamp(1rem, 2.2vw, 2rem); }
.site-nav a {
  font: 500 .78rem/1 var(--mono);
  letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none; color: var(--muted);
  padding: .4rem 0; border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.site-nav a:hover, .site-nav a[aria-current] { color: var(--text); border-bottom-color: var(--ha); }
.site-nav .nav-legacy { color: #6f6c66; }
.nav-toggle { display: none; background: none; border: 0; padding: .5rem; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 1.5px; background: var(--text); margin: 6px 0; transition: transform .25s; }

@media (max-width: 860px) {
  .nav-toggle { display: block; position: relative; z-index: 60; }
  .site-nav {
    position: fixed; inset: 0; z-index: 55;
    flex-direction: column; justify-content: center; align-items: center; gap: 1.6rem;
    background: var(--bg);
    opacity: 0; pointer-events: none; transition: opacity .25s;
  }
  .site-nav a { font-size: 1rem; }
  .nav-open .site-nav { opacity: 1; pointer-events: auto; }
  .nav-open .nav-toggle span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .nav-open .nav-toggle span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
}

/* ── Home hero ──────────────────────────────────────────── */
.hero { --slant-w: clamp(440px, 46vw, 720px); position: relative; height: 100vh; min-height: 620px; overflow: hidden; background: var(--bg); }
/* Photos fill the area right of the slant (the wedge covers the triangle above its foot) */
.hero-slides { position: absolute; top: 0; bottom: 0; right: 0; left: calc(var(--slant-w) * .54); background: #000; }
.hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: var(--pos, 50% 50%);
  opacity: 0; transition: opacity 2.2s ease;
}
.hero-img.is-active { opacity: 1; }
.hero-img.is-flipped { transform: scaleX(-1); }
/* soft shade so text stays readable where it crosses the slant, and a fade into the page */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(transparent 80%, var(--bg));
}

/* The slant: a narrow frosted wedge edged with an H-alpha red line */
.hero-slant { position: absolute; z-index: 2; top: 0; bottom: 0; left: 0; width: var(--slant-w); pointer-events: none; }
.hero-panel {
  position: absolute; inset: 0;
  background: var(--bg);
  clip-path: polygon(0 0, 88% 0, 54% 100%, 0 100%);
}
.hero-line { position: absolute; inset: 0; }
.hero-line--ha { background: var(--ha); clip-path: polygon(87.7% 0, 88% 0, 54.3% 100%, 54% 100%); }
.hero-text {
  position: absolute; z-index: 3;
  left: clamp(1.5rem, 5.5vw, 6rem); top: 50%; transform: translateY(-46%);
  max-width: calc(var(--slant-w) * .6 - clamp(1.5rem, 5.5vw, 6rem));
}
.hero-text h1 { font-size: clamp(2rem, 3.3vw, 3.6rem); line-height: 1.15; margin-bottom: .55em; white-space: nowrap; }
.hero-text h1 .fit { display: block; }
.hero .kicker { font-size: .78rem; line-height: 1.9; margin: 0 0 1.5rem; }
.hero-roles span { display: block; }
.kicker-sep { color: var(--oiii); margin: 0 .25em; }
.hero-sub { font: italic 400 clamp(.95rem, 1.15vw, 1.1rem)/1.6 var(--sans); color: #d8d3c9; margin: 0 0 2.2rem; max-width: 22ch; text-shadow: 0 1px 16px rgba(0,0,0,.6); }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.hero-meta { position: absolute; z-index: 3; right: clamp(1.25rem, 4vw, 2.5rem); bottom: 2rem; display: flex; flex-direction: column; align-items: flex-end; gap: .8rem; }
.hero-credit { text-align: right; max-width: 30rem; padding: .9rem 1.1rem; background: rgba(8,9,12,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-right: 2px solid var(--ha); }
.hero-credit-title { margin: 0 0 .35rem; font: .85rem/1.35 var(--display); color: var(--text); }
.hero-acq { list-style: none; margin: 0; padding: 0; font: .7rem/1.65 var(--mono); color: rgba(235,231,223,.72); }
.hero-dots { display: flex; gap: .45rem; }
.hero-dot { width: 22px; height: 2px; padding: 6px 0; border: 0; background: rgba(255,255,255,.3); background-clip: content-box; cursor: pointer; transition: background-color .3s, width .3s; }
.hero-dot:hover { background-color: rgba(255,255,255,.7); }
.hero-dot.is-active { width: 38px; background-color: var(--ha); }

/* ── Phone hero ─────────────────────────────────────────────
   Photo on top with a straight bottom edge; solid background below.
   Below it, top to bottom: the name (one line), the roles (one line),
   the buttons. main.js measures everything and sets:
     --slant-y  where the slant meets the left edge (= photo height)
     --rise     how much higher the slant is at the right edge
     --text-top  top of the name (the caption sits in the photo's top-left corner)
   and the hero's height, so the section ends right after the buttons. */
@media (max-width: 860px) {
  .hero { height: 150vw; min-height: 0; --slant-y: 68vw; --rise: 11vw; }
  .hero-slides { left: 0; bottom: auto; height: var(--slant-y); }
  .hero-img { object-position: var(--mpos, 50% 50%); }
  .hero::after { display: none; }
  .hero-slant { display: none; }   /* no slant on phones: the photo ends with a straight edge */
  .hero-slides { border-bottom: 2px solid var(--ha); }

  .hero-meta { top: .7rem; left: .7rem; right: auto; bottom: auto; max-width: 75%; gap: .4rem; align-items: flex-start; }
  .hero-credit { text-align: left; border-right: 0; border-left: 2px solid var(--ha); padding: .3rem .55rem; background: rgba(8,9,12,.5); }
  .hero-credit-title { margin: 0 0 .1rem; font-size: .6rem; }
  .hero-acq { display: block; font-size: .52rem; line-height: 1.5; }
  .hero-acq li:nth-child(n+2) { display: none; }   /* title + first line only */
  .hero-dots { gap: .3rem; }
  .hero-dot { width: 12px; }
  .hero-dot.is-active { width: 22px; }

  .hero-text {
    top: var(--text-top, calc(var(--slant-y) + 4rem)); bottom: auto; left: 0; right: 0;
    transform: none; max-width: none;
    display: flex; flex-direction: column; align-items: center;
    padding: 0 1.25rem 1.25rem; text-align: center;
  }
  .hero-text h1 {
    width: max-content; white-space: nowrap;
    text-transform: uppercase; font-size: 1.6rem; line-height: 1.1;
    margin: 0 0 .8rem;
  }
  .hero-text h1 .fit { display: inline; }
  .hero-text h1 .fit + .fit::before { content: " "; }
  .hero .kicker { letter-spacing: .08em; font-size: .72rem; line-height: 1.6; margin: 0 0 1rem; white-space: nowrap; }
  .hero-roles span { display: inline; }
  .hero-roles span + span::before { content: ", "; }
  .hero-actions { justify-content: center; gap: .6rem; }

  /* tighter vertical rhythm below the hero */
  .home .section { padding-top: 2.75rem; }
  .home .highlights { padding-bottom: 0; }
  .home .site-footer { margin-top: 2.75rem; }
  /* header sits above the photo instead of over it */
  .site-header, .site-header--overlay, .site-header--overlay.is-scrolled { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .site-header--overlay { position: sticky; background: rgba(8,9,12,.96); border-bottom-color: var(--line); }
}
}

/* ── Recent posts ───────────────────────────────────────── */
.latest { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: stretch; }
.latest-media { position: relative; display: block; min-height: 360px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; }
.latest-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.03); transition: opacity .5s, transform 1.2s cubic-bezier(.2,.7,.2,1); }
.latest-media img.is-active { opacity: 1; transform: none; }
.latest-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.latest-list a { display: grid; gap: .2rem; padding: 1.2rem 0 1.2rem 1rem; border-bottom: 1px solid var(--line); text-decoration: none; }
@media (hover: hover) { .latest-list a:hover .latest-title { color: var(--ha); } }
.latest-list time { font: .72rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.latest-title { font: 1.05rem/1.35 var(--display); }
.latest-excerpt { font-size: .9rem; color: var(--muted); }
@media (max-width: 860px) {
  .latest { grid-template-columns: 1fr; }
  .latest-media { min-height: 0; aspect-ratio: 4/3; }
}

/* ── Research & project cards on the home page ─────────── */
.highlights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; padding-bottom: 2rem; }
.highlight { display: flex; flex-direction: column; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; transition: border-color .25s, transform .25s; }
@media (hover: hover) { .highlight:hover { border-color: rgba(255,255,255,.25); transform: translateY(-3px); } }
.highlight-media { aspect-ratio: 4/3; background: var(--bg-3); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.highlight-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
@media (hover: hover) { .highlight:hover .highlight-media img { transform: scale(1.04); } }
.highlight-media.is-contain { background: radial-gradient(circle at 50% 50%, #1a1d29, var(--bg-2) 70%); }
.highlight-media.is-contain img { object-fit: contain; padding: 8%; }
.highlight-placeholder { font: .75rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border: 1px dashed var(--line); padding: .8rem 1rem; }
.highlight-body { padding: 1.5rem 1.5rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.highlight-when { font: .75rem var(--mono); letter-spacing: .08em; color: var(--oiii); margin: 0 0 .5rem; }
.highlight h3 { font-size: 1.1rem; line-height: 1.35; margin-bottom: .5rem; }
.highlight-kicker { font: .7rem/1.5 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 .9rem; }
.highlight-body > p:not([class]) { color: #cfcac0; font-size: .95rem; margin: 0 0 1.2rem; }
.highlight-more { margin-top: auto; font: 500 .75rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ha); }
@media (max-width: 860px) { .highlights { grid-template-columns: 1fr; } }

/* ── Sections ───────────────────────────────────────────── */
.section { padding-top: clamp(4rem, 9vw, 7rem); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); margin-bottom: 1.75rem; }
.section-head h2 { margin-bottom: .35em; }
.more { font: 500 .78rem var(--mono); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; color: var(--muted); white-space: nowrap; }
.more:hover { color: var(--ha); }
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 6vw, 5rem); padding-bottom: 2rem; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.post-list { list-style: none; margin: 0; padding: 0; }
.post-list a { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); text-decoration: none; transition: padding .2s; }
.post-list a:hover { padding-left: .5rem; }
.post-list time { font: .78rem/1.9 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.post-list span { font: 1rem/1.35 var(--display); }

.tiles { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); align-self: start; }
.tile { display: block; padding: 1.5rem 1.6rem; background: var(--bg); text-decoration: none; transition: background .2s; }
.tile:hover { background: var(--bg-2); }
.tile h3 { margin: .2rem 0 .3rem; }
.tile p { margin: 0; color: var(--muted); font-size: .95rem; }
.tile-k { font: .72rem var(--mono); color: var(--oiii); }

/* ── Page header ────────────────────────────────────────── */
.page-head { padding-top: clamp(3.5rem, 8vw, 6rem); padding-bottom: 2.5rem; }
.page-head h1 { margin-bottom: .25em; }
.page-body { padding-bottom: 5rem; }
.page-body > h2 { margin-top: 3rem; }
.page-body > p, .page-body > ul { max-width: 68ch; }

/* ── Gallery ────────────────────────────────────────────── */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.filter {
  font: 500 .75rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); background: transparent;
  border: 1px solid var(--line); border-radius: 999px;
  padding: .7rem 1.1rem; cursor: pointer; transition: all .2s;
}
.filter:hover { color: var(--text); border-color: rgba(255,255,255,.3); }
.filter.is-active { color: var(--bg); background: var(--text); border-color: var(--text); }

.g-grid--featured { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.g-grid--featured .g-item:first-child { grid-column: span 2; grid-row: span 2; }
.g-grid--featured .g-item img { aspect-ratio: 1; object-fit: cover; width: 100%; height: 100%; }
@media (max-width: 700px) { .g-grid--featured { grid-template-columns: 1fr 1fr; } }

.g-grid--masonry { columns: 3 320px; column-gap: 6px; }
.g-grid--masonry .g-item { break-inside: avoid; margin-bottom: 6px; }

.g-item { position: relative; display: block; overflow: hidden; background: var(--bg-2); text-decoration: none; }
.g-item img { width: 100%; transition: transform .6s cubic-bezier(.2,.7,.2,1), opacity .3s; }
.g-item:hover img { transform: scale(1.035); }
.g-item.is-hidden { display: none; }
.g-label {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-between; align-items: end; gap: 1rem;
  padding: 2.5rem 1rem .85rem;
  background: linear-gradient(transparent, rgba(0,0,0,.8));
  opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s;
}
.g-item:hover .g-label, .g-item:focus-visible .g-label { opacity: 1; transform: none; }
.g-title { font: .9rem/1.3 var(--display); }
.g-story { font: .7rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ha); white-space: nowrap; }
@media (hover: none) { .g-label { opacity: 1; transform: none; } }

/* ── Lightbox ───────────────────────────────────────────── */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(3,4,6,.97); display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lb-figure { margin: 0; max-width: 94vw; display: flex; flex-direction: column; align-items: center; }
.lb-img { max-width: 94vw; max-height: 80vh; object-fit: contain; }
.lb-caption { width: 100%; max-width: 60rem; margin-top: 1rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem 2rem; }
.lb-caption .t { font: 1.05rem/1.3 var(--display); }
.lb-caption .m { font: .78rem/1.6 var(--mono); color: var(--muted); }
.lb-caption .d { font: .78rem/1.6 var(--mono); color: var(--muted); width: 100%; }
.lb-caption a { font: 500 .78rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ha); text-decoration: none; align-self: center; }
.lb-caption a:hover { color: var(--text); }
.lightbox button { position: absolute; background: none; border: 0; color: var(--text); font: 300 2.6rem/1 var(--sans); cursor: pointer; padding: 1rem; opacity: .65; }
.lightbox button:hover { opacity: 1; }
.lb-close { top: .5rem; right: .75rem; }
.lb-prev { left: .25rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: .25rem; top: 50%; transform: translateY(-50%); }
.lightbox.single .lb-prev, .lightbox.single .lb-next { display: none; }

/* ── Blog index ─────────────────────────────────────────── */
.blog-list { display: grid; gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.blog-card { display: grid; grid-template-columns: 260px 1fr; gap: 2rem; align-items: center; padding: 1.75rem 0; background: var(--bg); text-decoration: none; }
.blog-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; transition: opacity .2s; }
.blog-card:hover img { opacity: .8; }
.blog-card:hover h2 { color: var(--ha); }
.blog-card time { font: .75rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.blog-card h2 { margin: .35rem 0 .5rem; transition: color .2s; }
.blog-card p { margin: 0; color: var(--muted); max-width: 60ch; }
@media (max-width: 700px) { .blog-card { grid-template-columns: 1fr; gap: 1rem; } }

/* ── Post ───────────────────────────────────────────────── */
.post-hero { height: 62vh; min-height: 360px; background: #000; overflow: hidden; }
.post-hero img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.post-head { padding-top: 3.5rem; }
.post-head h1 { font-size: clamp(1.7rem, 3.6vw, 2.8rem); }
.prose { font-size: 1rem; line-height: 1.8; padding-bottom: 3rem; }
.prose p { margin: 0 0 1.4em; }
.prose a { color: var(--text); text-decoration-color: var(--ha); text-underline-offset: 3px; }
.prose a:hover { color: var(--ha); }
.prose h2, .prose h3 { margin-top: 2.2em; }
.prose figure { margin: 2.5rem 0; }
.prose > figure { margin-inline: calc(-1 * min(8vw, 6rem)); }
.prose figure img { width: 100%; cursor: zoom-in; }
.prose figcaption { font-size: .88rem; line-height: 1.55; color: var(--muted); margin-top: .75rem; padding-left: .9rem; border-left: 2px solid var(--ha); }
.prose figcaption a { color: var(--muted); }
.figure-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin: 2.5rem calc(-1 * min(8vw, 6rem)); }
.figure-grid figure { margin: 0; }
.figure-grid img { aspect-ratio: 3/2; object-fit: cover; }
@media (max-width: 860px) { .prose > figure, .figure-grid { margin-inline: 0; } }
@media (max-width: 560px) { .figure-grid { grid-template-columns: 1fr; } }
.post-nav { display: flex; justify-content: space-between; gap: 2rem; padding-top: 2rem; padding-bottom: 5rem; border-top: 1px solid var(--line); }
.post-nav a { text-decoration: none; font: .95rem/1.4 var(--display); max-width: 45%; }
.post-nav a:hover { color: var(--ha); }
.post-nav span { display: block; font: .72rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .3rem; }
.post-nav .next { text-align: right; margin-left: auto; }

/* ── Research timeline ──────────────────────────────────── */
.timeline { list-style: none; margin: 0; padding: 0; }
.tl-item {
  display: grid; grid-template-columns: 10rem minmax(0, 1fr); gap: 2.5rem;
  padding: 2.75rem 0; border-top: 1px solid var(--line); scroll-margin-top: 6rem;
}
.tl-when { font: .8rem/2 var(--mono); color: var(--oiii); letter-spacing: .06em; }
.tl-body {
  min-width: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: .25rem 2.5rem;
  grid-template-areas: "role img" "title img" "text img" "links img";
  align-content: start;
}
.tl-role { grid-area: role; font: .72rem/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 .5rem; }
.tl-body h2 { grid-area: title; overflow-wrap: anywhere; margin-bottom: .75rem; }
.tl-body > p:not(.tl-role):not(.links) { grid-area: text; margin: 0 0 1rem; max-width: 62ch; color: #d9d4ca; }
.tl-img { grid-area: img; width: 100%; aspect-ratio: 1; object-fit: cover; border: 1px solid var(--line); border-radius: var(--radius); align-self: start; }
.tl-body .links { grid-area: links; margin: 0; }
.links a { font: 500 .78rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ha); text-decoration: none; margin-right: 1.5rem; }
@media (max-width: 860px) {
  .tl-item { grid-template-columns: minmax(0, 1fr); gap: .4rem; padding: 2rem 0; }
  .tl-body { grid-template-columns: minmax(0, 1fr); grid-template-areas: "role" "title" "img" "text" "links"; }
  .tl-img { max-width: 100%; aspect-ratio: 4/3; margin: .25rem 0 1.1rem; }
}

/* ── Project cards ──────────────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.25rem; }
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card > img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.card > img.is-contain { object-fit: contain; padding: 1.5rem; background: radial-gradient(circle, #1a1d29, var(--bg-2) 70%); }
.card { scroll-margin-top: 6rem; }
.card-body { padding: 1.75rem; }
.card-body p { color: #cfcac0; font-size: .98rem; }
.tags { list-style: none; padding: 0; margin: 1.25rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.tags li { font: .7rem var(--mono); letter-spacing: .05em; color: var(--oiii); border: 1px solid rgba(98,188,176,.35); padding: .3rem .6rem; border-radius: 999px; }

/* ── About ──────────────────────────────────────────────── */
.photo-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px; margin: 1.5rem 0 2rem; }
.photo-strip img { aspect-ratio: 3/4; object-fit: cover; width: 100%; }

/* ── About ──────────────────────────────────────────────── */
.about-intro { display: flex; align-items: center; gap: clamp(1.25rem, 4vw, 2.5rem); margin: .5rem 0 2rem; }
.about-portrait {
  width: clamp(120px, 22vw, 200px); aspect-ratio: 1; object-fit: cover; border-radius: 50%;
  border: 3px solid var(--ha); flex: none;
}
.about-intro .about-hi { margin: 0; font-size: clamp(1.4rem, 3.4vw, 2.4rem); }
.page-body > p.about-lede { font-size: 1.05rem; line-height: 1.8; max-width: 62ch; margin: 0 0 1.25rem; }
.page-body > p.about-lede + h2, .page-body > .edu-list + h2, .page-body > .skills + h2, .page-body > .setups + h2, .page-body > .hobbies + h2, .page-body > p.about-more + h2 { margin-top: 3.5rem; }
.about-more a { font: 500 .78rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ha); text-decoration: none; }
.about-more a:hover { color: var(--text); }
/* both education blocks share the height of the taller one */
.edu-list { display: grid; grid-auto-rows: 1fr; gap: 1.75rem; }
.page-body > h2.about-subhead { margin-bottom: 1.5rem; }
.edu {
  --edu: #215732; --edu-text: #3e9a5c;           /* GMU green (text lifted a little for the dark background) */
  display: flex; align-items: center; gap: 1.25rem;
  padding: .4rem 0 .4rem 1.25rem;
  border-left: 3px solid var(--edu);
}
.edu--unc { --edu: #7bafd4; --edu-text: #7bafd4; }  /* Carolina blue */
.edu-logo { width: clamp(64px, 9vw, 92px); height: clamp(64px, 9vw, 92px); object-fit: contain; flex: none; }
.edu-text p { margin: 0; }
.edu-degree { font: 1.02rem/1.35 var(--display); color: var(--edu-text); }
.edu-school { font: .9rem/1.6 var(--sans); color: var(--edu-text); opacity: .85; margin-top: .25rem !important; }
@media (max-width: 560px) {
  .edu { gap: .9rem; padding-left: .9rem; }
  .edu-degree { font-size: .9rem; }
  .edu-school { font-size: .8rem; }
}

/* About: skills */
.skills { margin: 0; display: grid; gap: 1.1rem; max-width: 60rem; }
.skills > div { display: grid; grid-template-columns: 12rem 1fr; gap: 1rem; align-items: baseline; padding-bottom: 1.1rem; border-bottom: 1px solid var(--line); }
.skills dt { font: .75rem/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ha); }
.skills dd { margin: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.skills dd span { font: .8rem/1 var(--mono); color: #d9d4ca; border: 1px solid var(--line); background: var(--bg-2); padding: .45rem .65rem; border-radius: 999px; }
@media (max-width: 700px) { .skills > div { grid-template-columns: 1fr; gap: .6rem; } }

/* About: setup cards */
.setups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.setup { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.setup-img img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.setup-body { padding: 1.4rem 1.5rem 1.5rem; }
.setup-body h3 { font-size: 1.05rem; margin-bottom: .5rem; }
.setup-body p { margin: 0 0 .8rem; color: #cfcac0; font-size: .92rem; }
.setup-body ul { margin: 0; padding: 0; list-style: none; }
.setup-body li { font: .8rem/1.6 var(--mono); color: var(--muted); padding-left: 1.1rem; position: relative; }
.setup-body li::before { content: ""; position: absolute; left: 0; top: .7em; width: .5rem; height: 1px; background: var(--ha); }
@media (max-width: 760px) { .setups { grid-template-columns: 1fr; } }

/* About: hobby photo mosaic */
.hobbies { display: grid; grid-auto-flow: dense; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 200px; gap: 6px; margin-top: 1.5rem; }
.hobby img { width: 100%; height: 100%; object-fit: cover; }
.hobby--tall { grid-row: span 2; }
.hobby-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.6rem .8rem .6rem; font: .7rem var(--mono); letter-spacing: .08em; text-transform: uppercase; background: linear-gradient(transparent, rgba(0,0,0,.75)); }
@media (max-width: 700px) { .hobbies { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 150px; } }

/* About: contact */
.contact { display: flex; flex-wrap: wrap; gap: .75rem; }
.contact-link { display: flex; flex-direction: column; gap: .3rem; min-width: 11rem; padding: 1rem 1.2rem; background: var(--bg-2); border: 1px solid var(--line); border-left: 2px solid var(--ha); border-radius: var(--radius); text-decoration: none; font: .9rem var(--sans); transition: border-color .2s, transform .2s; }
.contact-link span { font: .7rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.contact-link:hover { border-color: rgba(255,255,255,.3); border-left-color: var(--ha); transform: translateY(-2px); }

/* ── CV ─────────────────────────────────────────────────── */
.cv-actions { margin-bottom: 1.5rem; }
.cv-frame { width: 100%; height: 85vh; border: 1px solid var(--line); background: var(--bg-2); }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); margin-top: 4rem; }
.home .site-footer { margin-top: 6rem; }
.footer-inner { max-width: var(--wrap); margin: 0 auto; padding: 3rem clamp(1.25rem, 4vw, 2.5rem); display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; align-items: baseline; }
.footer-name { font: 1.05rem var(--display); margin: 0; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a, .footer-email { font: .78rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-decoration: none; margin: 0; }
.footer-links a:hover { color: var(--text); }
.footer-copy { width: 100%; margin: 1rem 0 0; font-size: .8rem; color: #67645e; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
.nw { white-space: nowrap; }
