/* Torin Hopkins — site styles
   Palette carried over from the original torinhopkins.com: charcoal, light gray, maroon. */

:root {
  --bg: #ffffff;
  --surface: #f6f5f4;
  --surface-2: #efedeb;
  --text: #313131;
  --muted: #5f6570;
  --accent: #681a1a;
  --accent-hover: #8c2525;
  --accent-soft: #f4e9e9;
  --border: #e2dfdc;
  --dark: #313131;
  --on-dark: #f5f3f1;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.05), 0 6px 20px rgb(0 0 0 / 0.06);
  --radius: 12px;
  --font-body: 'Open Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'Oxygen', 'Open Sans', system-ui, sans-serif;
  --wrap: 1140px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #151414;
    --surface: #1e1d1c;
    --surface-2: #262423;
    --text: #ebe8e5;
    --muted: #a8adb5;
    --accent: #e09a9a;
    --accent-hover: #f0b4b4;
    --accent-soft: #3a2424;
    --border: #34312f;
    --dark: #0e0d0d;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 6px 20px rgb(0 0 0 / 0.3);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #151414;
  --surface: #1e1d1c;
  --surface-2: #262423;
  --text: #ebe8e5;
  --muted: #a8adb5;
  --accent: #e09a9a;
  --accent-hover: #f0b4b4;
  --accent-soft: #3a2424;
  --border: #34312f;
  --dark: #0e0d0d;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 6px 20px rgb(0 0 0 / 0.3);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.7 var(--font-body);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 0.6em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 28px; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--bg); padding: 8px 12px; }
.muted { color: var(--muted); }
.icon { width: 1.05em; height: 1.05em; flex: none; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; white-space: nowrap; }
.brand span { color: var(--muted); font-weight: 400; }
.site-nav { display: flex; align-items: center; gap: 8px; }
.site-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 0.93rem; font-weight: 600; }
.site-nav a:hover { background: var(--surface); color: var(--accent); }
.site-nav a[aria-current='page'] { color: var(--accent); background: var(--accent-soft); }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 10px; background: transparent; color: var(--text); cursor: pointer; }
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }
.icon-btn .icon { width: 20px; height: 20px; }
.theme-toggle .icon:last-child { display: none; }
:root[data-theme='dark'] .theme-toggle .icon:first-child { display: none; }
:root[data-theme='dark'] .theme-toggle .icon:last-child { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-toggle .icon:first-child { display: none; }
  :root:not([data-theme='light']) .theme-toggle .icon:last-child { display: block; }
}
.nav-toggle { display: none; }

@media (max-width: 960px) {
  .nav-toggle { display: inline-grid; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 64px;
    flex-direction: column; align-items: stretch; padding: 12px 16px 20px;
    background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { padding: 10px 12px; font-size: 1rem; }
  .theme-toggle { align-self: flex-start; margin-top: 8px; }
}

/* ---------------------------------------------------------------- buttons, chips, tags */
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 1.4em 0; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-weight: 600; font-size: 0.95rem;
  text-decoration: none; cursor: pointer; font-family: inherit; max-width: 100%;
  overflow-wrap: anywhere;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
:root[data-theme='dark'] .btn-primary { color: #1b1111; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .btn-primary { color: #1b1111; } }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
:root[data-theme='dark'] .btn-primary:hover { color: #1b1111; }
.btn-light { background: #fff; color: #313131; border-color: #fff; }
.btn-light:hover { background: #f1ecec; color: #681a1a; }
.btn-small { padding: 6px 12px; font-size: 0.85rem; }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.text-link:hover .icon { transform: translateX(3px); }
.text-link .icon { transition: transform 0.15s; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--border); font-size: 0.8rem; font-weight: 600; color: var(--text); text-decoration: none;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip .icon { width: 0.95em; height: 0.95em; }
.badge {
  display: inline-block; margin: 0 6px 0 0; padding: 1px 8px; border-radius: 6px;
  background: var(--surface-2); color: var(--muted); font-size: 0.75rem; font-weight: 700; font-style: normal; vertical-align: 1px;
}
.badge-status { background: var(--accent-soft); color: var(--accent); }
.pub-status { margin: 0 6px 0 0; color: var(--muted); font-size: 0.75rem; font-style: italic; }
.badge-oa { background: #e6f2ea; color: #1f6b3a; }
:root[data-theme='dark'] .badge-oa { background: #1c3324; color: #8fd3a6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .badge-oa { background: #1c3324; color: #8fd3a6; } }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 1.2em 0 0; }
.tags li { padding: 4px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 0.85rem; font-weight: 600; }

/* ---------------------------------------------------------------- social */
.social { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.social a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--muted); }
.social a:hover { color: var(--accent); background: var(--accent-soft); }
.social .icon { width: 18px; height: 18px; }
.social-lg a { width: 42px; height: 42px; border: 1px solid var(--border); }
.social-lg .icon { width: 20px; height: 20px; }

/* ---------------------------------------------------------------- hero */
.hero { padding: clamp(40px, 8vw, 96px) 0 clamp(32px, 6vw, 72px); background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%); }
.hero-inner { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; }
@media (min-width: 860px) { .hero-inner { grid-template-columns: 1.45fr 1fr; gap: 56px; } }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem; font-weight: 700; color: var(--accent); margin-bottom: 0.8em; }
.hero h1 { margin-bottom: 0.15em; }
.hero-tagline { font-family: var(--font-head); font-size: clamp(1.15rem, 2.4vw, 1.45rem); color: var(--text); margin-bottom: 0.4em; }
.hero-intro { font-size: 1.05rem; max-width: 62ch; }
.hero-photo { justify-self: center; position: relative; }
.portrait {
  width: min(320px, 72vw); aspect-ratio: 1; object-fit: cover; border-radius: 50%;
  border: 6px solid var(--bg); box-shadow: 0 0 0 1px var(--border), var(--shadow);
  object-position: 60% center; /* keeps the hero photo's subject (right of centre) in the circle */
}
.hero-photo::before {
  content: ''; position: absolute; inset: -14px; border-radius: 50%;
  border: 2px dashed color-mix(in srgb, var(--accent) 35%, transparent);
}

/* ---------------------------------------------------------------- sections */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section-tight { padding-top: 32px; }
.section-alt { background: var(--surface); }
.section-dark { background: var(--dark); color: var(--on-dark); }
.section-dark a:not(.btn) { color: var(--on-dark); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 28px; }
.section-head h2 { margin: 0; }
.page-header { padding: clamp(36px, 6vw, 72px) 0 8px; background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%); }
.page-header h1 { font-size: clamp(2rem, 4.4vw, 2.8rem); }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 70ch; }
.note { color: var(--muted); margin-top: 28px; }

.plain { list-style: none; margin: 0 0 1em; padding: 0; }
.plain li { margin-bottom: 0.7em; font-size: 0.93rem; line-height: 1.5; }

.callout {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px;
  padding-top: 36px; padding-bottom: 36px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--accent-soft);
}
@media (min-width: 700px) { .callout { padding: 36px 40px; } }
.callout h2 { margin-bottom: 0.3em; }
.callout p { margin: 0; max-width: 60ch; }
.section > .callout { max-width: calc(var(--wrap) - 56px); margin: 0 16px; }
@media (min-width: 1196px) { .section > .callout { margin: 0 auto; } }

.contact { text-align: center; }
.contact p { max-width: 56ch; margin: 0 auto 1.4em; color: #d8d4d0; }
.contact .social { justify-content: center; margin-top: 24px; }
.contact .social a { color: var(--on-dark); border-color: #555; }
.contact .social a:hover { color: #fff; background: #4a4a4a; }

/* Hidden door to SolJAMM: swings open on hover to let the colour out */
.secret-door { display: inline-flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 56px; text-decoration: none; opacity: 0.55; transition: opacity 0.4s; }
.secret-door:hover, .secret-door:focus-visible { opacity: 1; }
.door-frame {
  position: relative; display: block; width: 44px; height: 72px; border-radius: 22px 22px 2px 2px;
  background: #050505; box-shadow: 0 0 0 3px #6e5c4b; perspective: 220px; transition: box-shadow 0.6s;
}
.door-light { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; }
.door-light::before {
  content: ''; position: absolute; inset: -50%;
  background: conic-gradient(#ff3b6b, #ffa53b, #f5ef3b, #3bff7a, #3bd2ff, #7a3bff, #ff3bd2, #ff3b6b);
  filter: blur(4px) saturate(1.3); animation: door-spin 3s linear infinite;
}
.door-panel {
  position: absolute; inset: 0; border-radius: inherit; transform-origin: left center;
  background: linear-gradient(90deg, #6b3f20, #8a5530 55%, #6b3f20);
  box-shadow: inset 0 0 0 4px #5a3418, inset 0 -26px 0 -21px #4a2a12, inset 0 26px 0 -21px #4a2a12;
  transition: transform 0.8s cubic-bezier(0.3, 0.7, 0.2, 1);
}
.door-knob { position: absolute; right: 7px; top: 54%; width: 6px; height: 6px; border-radius: 50%; background: #e6c15a; box-shadow: 0 0 2px #000; }
.door-hint {
  font-family: var(--font-head); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase;
  background: linear-gradient(90deg, #ff3b6b, #ffa53b, #f5ef3b, #3bff7a, #3bd2ff, #ff3bd2);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: 0; transform: translateY(-4px); transition: opacity 0.5s 0.2s, transform 0.5s 0.2s;
}
.secret-door:hover .door-panel, .secret-door:focus-visible .door-panel { transform: rotateY(-115deg); }
.secret-door:hover .door-frame, .secret-door:focus-visible .door-frame {
  box-shadow: 0 0 0 3px #6e5c4b, -14px -6px 34px rgba(255, 59, 210, 0.55), 14px -6px 34px rgba(59, 210, 255, 0.55), 0 -18px 34px rgba(245, 239, 59, 0.45), 0 18px 34px rgba(59, 255, 122, 0.45);
}
.secret-door:hover .door-hint, .secret-door:focus-visible .door-hint { opacity: 1; transform: none; }
/* Mini door: same door, sized to sit inline after a name (CV) */
.secret-door.door-mini { display: inline-flex; vertical-align: -5px; margin: 0 4px 0 8px; opacity: 0.8; }
.door-mini .door-frame { width: 14px; height: 22px; border-radius: 7px 7px 1px 1px; box-shadow: 0 0 0 1.5px #6e5c4b; perspective: 80px; }
.door-mini .door-light::before { filter: blur(1.5px) saturate(1.3); }
.door-mini .door-panel { box-shadow: inset 0 0 0 1.5px #5a3418; }
.door-mini .door-knob { right: 2px; width: 2px; height: 2px; }
.secret-door.door-mini:hover .door-frame, .secret-door.door-mini:focus-visible .door-frame {
  box-shadow: 0 0 0 1.5px #6e5c4b, -5px -2px 12px rgba(255, 59, 210, 0.55), 5px -2px 12px rgba(59, 210, 255, 0.55), 0 -6px 12px rgba(245, 239, 59, 0.45), 0 6px 12px rgba(59, 255, 122, 0.45);
}
.social .secret-door.door-mini { display: grid; margin: 0; opacity: 1; }
.social-lg .door-mini .door-frame { width: 15px; height: 24px; }
@keyframes door-spin { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) { .door-light::before { animation: none; } }

/* ---------------------------------------------------------------- cards */
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.card {
  display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; transition: transform 0.18s, box-shadow 0.18s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card[hidden] { display: none; }
.card-media { aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-placeholder {
  height: 100%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent) 0%, #313131 100%);
}
.card-placeholder span { font-family: var(--font-head); font-size: 2.6rem; font-weight: 700; color: rgb(255 255 255 / 0.85); letter-spacing: 0.05em; }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { margin-bottom: 0.4em; }
.card-body h3 a { color: var(--text); text-decoration: none; }
.card-body h3 a:hover { color: var(--accent); }
.card-body p { font-size: 0.93rem; color: var(--muted); margin-bottom: 0.4em; }
.card-body .chips { margin-top: auto; padding-top: 8px; }
.card-meta { font-size: 0.75rem !important; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: var(--accent) !important; }

/* ---------------------------------------------------------------- filters & search */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.filter {
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg);
  color: var(--text); font: 600 0.88rem var(--font-body); cursor: pointer;
}
.filter:hover { border-color: var(--accent); color: var(--accent); }
.filter.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
:root[data-theme='dark'] .filter.is-active { color: #1b1111; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .filter.is-active { color: #1b1111; } }
.pub-tools { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: flex-start; margin-bottom: 8px; }
.pub-tools .filters { margin-bottom: 0; }
.search { display: flex; align-items: center; gap: 8px; flex: 1 1 280px; max-width: 420px; padding: 0 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg); color: var(--muted); }
.search:focus-within { border-color: var(--accent); }
.search input { border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; padding: 8px 0; width: 100%; }

/* ---------------------------------------------------------------- publications */
.pub-group { margin-top: 36px; }
.pub-group > h2 { padding-bottom: 10px; border-bottom: 2px solid var(--accent); }
.year-group { display: grid; gap: 4px 28px; margin-top: 18px; }
@media (min-width: 760px) { .year-group { grid-template-columns: 70px 1fr; } }
.year { font-size: 1.05rem; color: var(--accent); margin: 14px 0 0; }
.pubs { list-style: none; margin: 0; padding: 0; }
.pub { padding: 14px 0; border-bottom: 1px solid var(--border); }
.pub:last-child { border-bottom: 0; }
.pub[hidden], .year-group[hidden], .pub-group[hidden] { display: none; }
.pub p { margin: 0 0 2px; }
.pub-title { font-weight: 700; font-size: 1.02rem; line-height: 1.45; }
.pub-title a { color: var(--text); text-decoration: none; }
.pub-title a:hover { color: var(--accent); text-decoration: underline; }
.pub-authors { font-size: 0.92rem; }
.pub-authors strong { color: var(--accent); }
.pub-venue { font-size: 0.9rem; color: var(--muted); }
.pub .chips { margin-top: 8px; }
.pub-empty { color: var(--muted); padding: 20px 0; }

/* ---------------------------------------------------------------- paper page */
.crumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 16px; }
.crumbs a { color: var(--muted); }
.paper h1 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); max-width: 30ch; }
.paper-authors { font-size: 1.02rem; }
.paper-authors strong { color: var(--accent); }
.paper-venue { color: var(--muted); }
.paper-body { max-width: 860px; }
.paper-body h2 { font-size: 1.3rem; margin-top: 1.6em; }
.paper-figure { margin: 0 0 8px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; }
.abstract { font-size: 1.04rem; }
.citation { font-size: 0.93rem; color: var(--muted); }
.bibtex { position: relative; }
.bibtex pre {
  margin: 0; padding: 18px 20px; overflow-x: auto; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 0.82rem; line-height: 1.55;
}
.copy-btn { position: absolute; top: 10px; right: 10px; }

/* ---------------------------------------------------------------- project pages */
a.card-media { display: block; }
.project h1 { max-width: 26ch; }
.project-layout { display: grid; gap: 40px; }
@media (min-width: 960px) { .project-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; } }
.project-main { min-width: 0; max-width: 760px; }
.project-hero { margin: 0 0 28px; }
.project-hero img, .gallery img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); background: #fff; }
.project-hero video { display: block; width: 100%; height: auto; max-height: 70vh; object-fit: contain; border-radius: var(--radius); }
figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 8px; line-height: 1.5; }
.project-summary { font-size: 1.15rem; line-height: 1.7; }
.prose-section { margin-top: 2.2em; }
.prose-section h2 { font-size: 1.35rem; }
.bullets { padding-left: 1.2em; margin: 0; }
.bullets li { margin-bottom: 0.55em; padding-left: 0.2em; }
.bullets li::marker { color: var(--accent); }
.findings { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 20px 24px 12px; }
.findings h2 { margin-top: 0; }
.gallery { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.gallery figure { margin: 0; }
.project-aside { align-self: start; }
@media (min-width: 960px) { .project-aside { position: sticky; top: 88px; } }
.project-aside h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); margin-top: 1.6em; }
.facts { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 20px; }
.facts div { padding: 12px 0; border-bottom: 1px solid var(--border); }
.facts div:last-child { border-bottom: 0; }
.facts dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-size: 0.92rem; line-height: 1.5; }
.tags-sm li { font-size: 0.78rem; padding: 3px 10px; }
.project-aside .plain a { display: inline-flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.paper-body .actions { flex-direction: column; align-items: flex-start; gap: 6px; }

.video { margin: 0; }
.video-lite, .video iframe { display: block; position: relative; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); overflow: hidden; background: #000; }
.video-lite img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; transition: opacity 0.2s; }
.video-lite:hover img { opacity: 1; }
.video-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.video-play .icon { width: 72px; height: 72px; filter: drop-shadow(0 2px 8px rgb(0 0 0 / 0.5)); }

/* ---------------------------------------------------------------- CV */
.cv-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.cv-toc { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.87rem; }
.cv-toc a { color: var(--muted); text-decoration: none; }
.cv-toc a:hover { color: var(--accent); }
.cv-section { margin-top: 40px; }
.cv-section h2 { color: var(--accent); font-size: 1.45rem; }
.cv-section h2 .muted { font-size: 0.9rem; font-weight: 400; font-family: var(--font-body); }
.cv-row { display: grid; gap: 2px 28px; padding: 8px 0; }
@media (min-width: 760px) { .cv-row { grid-template-columns: 120px 1fr; } .cv-when { text-align: right; } }
.cv-when { font-weight: 700; font-size: 0.92rem; color: var(--muted); }
.cv-what { font-size: 0.95rem; }
.cv-what p:last-child { margin-bottom: 0; }
.cv-what strong { color: var(--text); }
.cv-what .pub-me, .cv-what strong:is(:first-child) { color: inherit; }
.table-wrap { overflow-x: auto; }
.cv-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.cv-table th, .cv-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.cv-table th { font-family: var(--font-head); border-bottom: 2px solid var(--text); }

/* ---------------------------------------------------------------- resources */
.resources { columns: 2 340px; column-gap: 40px; }
.resource-group { break-inside: avoid; margin-bottom: 32px; }
.resource-group h2 { font-size: 1.2rem; color: var(--accent); }
.resource-group ul { list-style: none; padding: 0; margin: 0; }
.resource-group li { border-bottom: 1px solid var(--border); }
.resource-group a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; color: var(--text); text-decoration: none; }
.resource-group a:hover { color: var(--accent); }
.resource-group .icon { color: var(--muted); width: 0.9em; }

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 36px 0 20px; font-size: 0.9rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.footer-inner p { margin: 0; color: var(--muted); }
.footer-name { font-family: var(--font-head); font-weight: 700; color: var(--text) !important; }
.footer-meta { margin-top: 20px; color: var(--muted); font-size: 0.82rem; }
.footer-meta a { color: var(--muted); }

/* ---------------------------------------------------------------- print (CV page prints cleanly) */
@media print {
  .site-header, .site-footer, .cv-toolbar, .actions, .filters, .pub-tools, .copy-btn { display: none !important; }
  body { font-size: 10.5pt; color: #000; background: #fff; }
  .page-header, .section-alt { background: none; }
  .section { padding: 12px 0; }
  a { color: #000; text-decoration: none; }
}
