/* ==========================================================================
   Ismail Emir Yuksel · Personal Academic Website Stylesheet
   https://ismailemiryuksel.com
   ========================================================================== */

:root {
  color-scheme: light;
  --paper: #fcfbfe;
  --sheet: #f6f2fb;
  --ink: #12091c;
  --ink-rgb: 18, 9, 28;
  --ink2: #2a1f38;
  --muted: #5a4e6b;
  --rule: #e5ddf0;
  --rule2: #cbbbe0;
  --accent: #5c2d91;
  --accent-rgb: 92, 45, 145;
  --deep: #3d1a5e;
  --title-ink: #3d1a5e;
  --sec-bar: #5c2d91;
  --link-ink: #5c2d91;
  --btn-ink: #fcfbfe;
  --warm: #b45309;
  --warm-rgb: 180, 83, 9;
  --warm-sheet: #fdf6e9;
  --hero-bg: #281042;
  --hero-ink: #faf7fe;
  --hero-muted: #d8c7eb;
  --hero-accent: #e2c4ff;
  --hero-rule: rgba(232, 212, 255, 0.22);
  --gold: #d9b066;
  --gold-rgb: 217, 176, 102;
  --hero-act-rgb: 226, 196, 255;
  --hero-cell-rgb: 216, 199, 235;
  --f-d: 'Plus Jakarta Sans', system-ui, sans-serif;
  --f-b: 'Inter', system-ui, sans-serif;
  --f-m: 'IBM Plex Mono', ui-monospace, monospace;
  --container: 980px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0c0910;
  --sheet: #14101c;
  --ink: #f5f3f7;
  --ink-rgb: 245, 243, 247;
  --ink2: #d5cee0;
  --muted: #9287a3;
  --rule: #1f1829;
  --rule2: #2e233d;
  --accent: #8e62d4;
  --accent-rgb: 142, 98, 212;
  --deep: #d4b682;
  --title-ink: #f5f3f7;
  --sec-bar: rgba(191, 160, 106, 0.5);
  --link-ink: #bfa06a;
  --btn-ink: #f5f3f7;
  --warm: #bfa06a;
  --warm-rgb: 191, 160, 106;
  --warm-sheet: rgba(191, 160, 106, 0.11);
  --hero-bg: #160c24;
  --hero-ink: #f5f3f7;
  --hero-muted: #cbc0dc;
  --hero-accent: #d2b3ff;
  --hero-rule: rgba(191, 160, 106, 0.26);
  --gold: #bfa06a;
  --gold-rgb: 191, 160, 106;
  --hero-act-rgb: 200, 166, 248;
  --hero-cell-rgb: 190, 176, 212;
}

/* ---------- Base & Typography ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; font-size: 16px; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink2);
  font: 400 1.1rem/1.7 var(--f-b);
  -webkit-font-smoothing: antialiased;
  caret-color: var(--accent);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
::selection { background: color-mix(in oklab, var(--accent) 28%, transparent); }
:focus-visible { outline: 2px solid var(--sec-bar); outline-offset: 2px; }
h1, h2, h3, h4, h5 {
  font-family: var(--f-d);
  font-weight: 700;
  letter-spacing: -0.022em;
  color: var(--ink);
  margin: 0;
  line-height: 1.2;
  text-wrap: balance;
}
p { margin: 0 0 18px; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
a {
  color: var(--link-ink);
  text-decoration: none;
  transition: color 0.15s var(--ease), background-color 0.15s var(--ease), border-color 0.15s var(--ease);
}
a:hover { color: var(--deep); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
strong { font-weight: 600; color: var(--ink); }
.progress {
  position: fixed;
  left: 0;
  top: 0;
  height: 3px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: var(--sec-bar);
  z-index: 200;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  font: 600 0.96rem/1.1 var(--f-d);
  border-radius: 2px;
  white-space: nowrap;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.12s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--sm { padding: 8px 14px; font-size: 0.85rem; }
.btn--accent { background: var(--accent); color: var(--btn-ink); border-color: var(--accent); }
.btn--accent:hover { background: var(--deep); border-color: var(--deep); color: var(--btn-ink); }
.btn--line { padding: 8px 0; color: var(--link-ink); }
.btn--line:hover { color: var(--deep); text-decoration: underline; }

/* ---------- Top Navigation Bar ---------- */
.ws-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.ws-topbar.solid { border-bottom-color: var(--rule); }
.ws-topbar-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ws-brand {
  font: 800 1.12rem var(--f-d);
  color: var(--title-ink);
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}
.ws-brand:hover { color: var(--link-ink); }
.ws-nav-links { display: flex; align-items: center; gap: 4px; min-width: 0; }
.tab {
  padding: 6px 10px;
  font: 600 0.9rem var(--f-d);
  color: var(--ink2);
  border-radius: 2px;
  white-space: nowrap;
  position: relative;
}
.tab:hover { color: var(--ink); background: var(--sheet); }
.tab.on { color: var(--link-ink); }
.tab.on::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 2px;
  background: var(--link-ink);
}
.top-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.theme-toggle {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rule2);
  border-radius: 2px;
  background: var(--sheet);
  color: var(--ink2);
  transition: border-color 0.15s, color 0.15s, background-color 0.15s;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--link-ink); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .i-sun { display: none; }
html[data-theme="dark"] .theme-toggle .i-sun { display: block; color: var(--gold); }
html[data-theme="dark"] .theme-toggle .i-moon { display: none; }

/* ---------- Page Sections & Layout ---------- */
.page { display: none; }
.page.on { display: block; animation: pgin 0.35s var(--ease) both; }
@keyframes pgin { from { opacity: 0; transform: translateY(6px); } }
.rv {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.rv.in { opacity: 1; transform: none; }
.flow { max-width: var(--container); margin: 0 auto; padding: 0 28px; }
.sec { padding: 56px 0; border-bottom: 1px solid var(--rule); }
.sec:last-child { border-bottom: 0; }
.sec-title {
  font: 800 2.1rem/1.18 var(--f-d);
  color: var(--title-ink);
  margin: 0 0 26px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--sec-bar);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  letter-spacing: -0.022em;
}
.sec-title a { font: 600 1rem var(--f-d); letter-spacing: 0; color: var(--link-ink); }
.prose { font-size: 1.15rem; line-height: 1.76; color: var(--ink2); }
.prose a { font-weight: 600; color: var(--link-ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Hero Section ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--hero-bg);
  color: var(--hero-ink);
  padding: 60px 28px 80px;
  display: flex;
  align-items: center;
}
#array { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; display: block; }
.veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--hero-bg) 75%, var(--paper)) 0%, transparent 36px, transparent calc(100% - 68px), color-mix(in srgb, var(--paper) 35%, var(--hero-bg)) calc(100% - 28px), var(--paper) 100%),
    linear-gradient(90deg, color-mix(in srgb, var(--hero-bg) 95%, transparent) 0, color-mix(in srgb, var(--hero-bg) 91%, transparent) 48%, color-mix(in srgb, var(--hero-bg) 74%, transparent) 78%, color-mix(in srgb, var(--hero-bg) 52%, transparent) 100%);
}
html[data-theme="dark"] .veil {
  background:
    linear-gradient(180deg, var(--paper) 0%, transparent 48px, transparent calc(100% - 76px), var(--paper) 100%),
    linear-gradient(90deg, color-mix(in srgb, var(--hero-bg) 95%, transparent) 0, color-mix(in srgb, var(--hero-bg) 91%, transparent) 48%, color-mix(in srgb, var(--hero-bg) 74%, transparent) 78%, color-mix(in srgb, var(--hero-bg) 52%, transparent) 100%);
}
.hero-container { width: 100%; max-width: var(--container); margin: 0 auto; position: relative; z-index: 1; pointer-events: none; }
.hero-container a, .hero-container button { pointer-events: auto; }
.hero-grid { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 44px; align-items: start; }
.hero-left { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.hero-photo {
  width: 230px;
  height: 230px;
  object-fit: cover;
  border: 2px solid var(--hero-rule);
  border-radius: 2px;
  display: block;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.38);
}
.hero-icons { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 230px; padding-top: 2px; }
.hero-icons-row { display: flex; align-items: center; justify-content: center; gap: 28px; width: 100%; }
.h-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--hero-muted);
  font: 800 1.02rem/1 var(--f-d);
  letter-spacing: -0.01em;
  transition: color 0.15s, transform 0.15s;
}
.h-ico svg { width: 22px; height: 22px; display: block; }
.h-ico:hover { color: var(--gold); transform: translateY(-2px); }
.hero-copy { min-width: 0; }
.hero-dateline { font: 600 0.96rem var(--f-m); color: var(--hero-accent); margin: 0 0 8px; }
.hero-title {
  font: 800 clamp(2.2rem, 4.1vw, 3.35rem)/1.08 var(--f-d);
  color: var(--hero-ink);
  margin: 0 0 18px;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.hero-bio { font-size: 1.08rem; line-height: 1.72; color: var(--hero-muted); margin: 0 0 14px; }
.hero-bio:last-of-type { margin-bottom: 0; }
.hero-bio strong { color: var(--hero-ink); font-weight: 600; }
.hero-bio a { color: var(--gold); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.hero-bio a:hover { color: #fff; }
.hud {
  position: absolute;
  right: 24px;
  bottom: 34px;
  z-index: 1;
  font: 500 0.74rem/1.45 var(--f-m);
  color: color-mix(in srgb, var(--hero-muted) 74%, transparent);
  text-align: right;
  pointer-events: none;
}
.hud b { color: var(--hero-accent); font-weight: 600; }
.hud .bad { color: var(--gold); }

/* ---------- About Sections & News ---------- */
.ledger a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
  transition: padding 0.2s var(--ease);
}
.ledger a:first-child { border-top: 1px solid var(--rule); }
.ledger b { display: block; font: 700 1.28rem var(--f-d); color: var(--ink); letter-spacing: -0.02em; }
.ledger span.d { display: block; font-size: 1.05rem; color: var(--muted); margin-top: 4px; max-width: 40em; }
.ledger i { font: 700 0.9rem var(--f-m); font-style: normal; color: var(--link-ink); white-space: nowrap; }
.ledger a:hover { padding-left: 8px; }
.ledger a:hover b { color: var(--link-ink); }

.news-list { display: flex; flex-direction: column; }
.news-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 22px;
  padding: 13px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
  font-size: 0.98rem;
  line-height: 1.58;
}
.news-row:first-child { padding-top: 4px; }
.news-row:last-child { border-bottom: 0; padding-bottom: 0; }
.news-date { font: 700 0.86rem var(--f-m); color: var(--link-ink); white-space: nowrap; }
.news-text { color: var(--ink2); }
.news-text b, .news-text strong { color: var(--ink); font-weight: 700; }
.news-text a { color: var(--link-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.news-text .aw-tag {
  display: inline-block;
  font: 600 0.76rem var(--f-d);
  color: var(--warm);
  background: var(--warm-sheet);
  border: 1px solid color-mix(in oklab, var(--warm) 35%, var(--rule2));
  padding: 1px 7px;
  border-radius: 2px;
  margin-right: 4px;
}

/* ---------- Research Interactive Demos ---------- */
.theme-lede { max-width: 44em; }
.stage {
  background: var(--sheet);
  border: 1px solid var(--rule2);
  border-top: 2px solid var(--sec-bar);
  border-radius: 2px;
  padding: 24px 26px;
  margin-top: 24px;
}
.stage-top { display: flex; justify-content: space-between; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.seg { display: inline-flex; border: 1px solid var(--rule2); border-radius: 2px; overflow: hidden; background: var(--paper); flex-wrap: wrap; }
.seg button { font: 600 0.86rem var(--f-d); padding: 8px 14px; border-right: 1px solid var(--rule2); color: var(--ink2); transition: 0.15s; }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--accent); color: var(--btn-ink); }
.seg button:not(.on):hover { background: var(--sheet); color: var(--ink); }
.step-nav { display: inline-flex; align-items: center; gap: 8px; }
.step-ind { font: 600 0.8rem var(--f-m); color: var(--muted); margin-right: 4px; }
.stage-note { margin-top: 16px; font-size: 0.98rem; line-height: 1.6; color: var(--ink2); min-height: 1.8em; }
.stage-note b { color: var(--ink); font-weight: 700; }
.hint-t { font: 600 0.88rem var(--f-d); color: var(--muted); }

/* Subarray Grid (Demo 01 & Demo 03) */
.sub-box { background: var(--paper); border: 1px solid var(--rule2); border-radius: 2px; padding: 20px 22px; }
.d1-rows { display: flex; flex-direction: column; gap: 8px; }
.d1-r { display: grid; grid-template-columns: 92px repeat(8, 1fr); align-items: center; gap: 8px; }
.r-lbl { font: 700 0.88rem var(--f-d); color: var(--muted); transition: color 0.2s; }
.d1-r.act .r-lbl { color: var(--link-ink); }
.cell {
  height: 40px;
  border-radius: 2px;
  background: var(--paper);
  position: relative;
  overflow: hidden;
  border: 1.5px solid var(--rule2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.16s var(--ease), border-color 0.2s;
}
.cell:not(:disabled):hover { transform: translateY(-1px); border-color: var(--accent); }
.cell:disabled { cursor: default; }
.cell i {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: color-mix(in oklab, var(--accent) 18%, transparent);
  transition: height 0.55s var(--ease), background-color 0.4s;
}
.cell.one { border-color: var(--accent); }
.cell.one i { background: color-mix(in oklab, var(--accent) 26%, transparent); }
.cell b { position: relative; z-index: 1; font: 700 1.05rem/1 var(--f-m); color: var(--ink); }
.cell.one b { color: var(--link-ink); }
.d1-bl { display: grid; grid-template-columns: 92px repeat(8, 1fr); gap: 8px; height: 20px; margin: 2px 0; }
.d1-bl i { border-left: 1.5px dashed var(--rule2); margin-left: 50%; transition: border-color 0.35s; }
.d1-bl.on i { border-left-color: var(--sec-bar); border-left-style: solid; }
.sa-cell {
  height: 40px;
  border-radius: 2px;
  background: var(--sheet);
  border: 1.5px solid var(--rule2);
  display: flex;
  align-items: center;
  justify-content: center;
  font: 700 1.05rem/1 var(--f-m);
  color: var(--muted);
  transition: all 0.3s var(--ease);
}
.sa-cell.v { background: var(--ink2); border-color: var(--ink2); color: var(--paper); }
.sa-cell.v.one { background: var(--accent); border-color: var(--accent); color: var(--btn-ink); }
.d3-stream {
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--sheet);
  border: 1px solid var(--rule2);
  border-radius: 2px;
  font: 600 0.83rem/1.55 var(--f-m);
  color: var(--ink);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.d3-bits { letter-spacing: 0.08em; word-break: break-all; }
.d3-bits .b0 { color: var(--muted); }
.d3-bits .b1 { color: var(--link-ink); font-weight: 700; }

/* Demo 02 Canvas (RowHammer / ColumnDisturb) */
.cv {
  width: 100%;
  display: block;
  background: var(--paper);
  touch-action: none;
  border: 1px solid var(--rule2);
  border-radius: 2px;
  cursor: pointer;
}
#d2c { height: 350px; }
.stats-row { display: flex; gap: clamp(20px, 4vw, 44px); margin-top: 16px; flex-wrap: wrap; }
.stats-row div { font: 500 0.86rem var(--f-d); color: var(--muted); }
.stats-row b { display: block; font: 700 1.45rem/1.2 var(--f-m); color: var(--ink); font-variant-numeric: tabular-nums; }
.stats-row b.bad { color: var(--warm); }
.sw { display: inline-flex; align-items: center; gap: 10px; font: 600 0.88rem var(--f-d); color: var(--ink2); }
.sw i {
  width: 40px;
  height: 22px;
  background: var(--paper);
  position: relative;
  box-shadow: inset 0 0 0 1px var(--rule2);
  transition: background 0.2s;
  border-radius: 2px;
}
.sw i::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  background: var(--muted);
  transition: transform 0.2s var(--ease), background 0.2s;
  border-radius: 1px;
}
.sw.on i { background: var(--accent); }
.sw.on i::after { transform: translateX(18px); background: var(--btn-ink); }
.keyp { margin-top: 28px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; }
.keyp a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 0;
  border-top: 1px solid var(--rule2);
  font: 700 1.02rem/1.35 var(--f-d);
  color: var(--ink);
  letter-spacing: -0.01em;
}
.keyp a span { font: 600 0.8rem var(--f-m); color: var(--link-ink); }
.keyp a:hover { color: var(--link-ink); }

/* ---------- Filter Pills ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 600 0.88rem var(--f-d);
  padding: 8px 14px;
  border-radius: 2px;
  background: var(--paper);
  color: var(--ink2);
  border: 1px solid var(--rule2);
  white-space: nowrap;
  transition: 0.15s var(--ease);
}
.pill:hover { border-color: var(--sec-bar); color: var(--link-ink); }
.pill.on, .pill.solid { background: var(--accent); border-color: var(--accent); color: var(--btn-ink); }
.pill:disabled { opacity: 0.4; pointer-events: none; }
.pill small { font: 500 0.74rem var(--f-m); opacity: 0.75; }
.pill.ghost { background: transparent; }

/* ---------- Publications Timeline & List ---------- */
.tl-top { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; flex-wrap: wrap; margin-bottom: 14px; }
.tl-label { font: 700 1.08rem var(--f-d); color: var(--ink); }
.legend { display: flex; gap: 24px; flex-wrap: wrap; font: 600 0.95rem var(--f-d); color: var(--ink2); }
.legend span { display: flex; align-items: center; gap: 8px; }
.legend i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.lg1 { background: var(--accent); }
.lg2 { box-shadow: inset 0 0 0 2px var(--ink2); }
.lg3 { box-shadow: inset 0 0 0 2px var(--warm), 0 0 0 3px color-mix(in srgb, var(--warm) 25%, transparent); }
#tl {
  position: relative;
  width: 100%;
  height: 380px;
  background: var(--sheet);
  border: 1px solid var(--rule2);
  border-top: 2px solid var(--sec-bar);
  border-radius: 2px;
  padding: 10px 16px;
}
#tl svg { width: 100%; height: 100%; display: block; overflow: visible; }
.tip {
  position: absolute;
  z-index: 10;
  pointer-events: none;
  max-width: 360px;
  background: var(--hero-bg);
  color: var(--hero-ink);
  padding: 12px 15px;
  border-radius: 2px;
  border: 1px solid var(--hero-rule);
  font-size: 0.9rem;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(4px);
  transition: 0.15s;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.38);
}
.tip.on { opacity: 1; transform: none; }
.tip b { display: block; font: 700 0.95rem var(--f-d); margin-bottom: 4px; color: #fff; }
.tip small { font: 500 0.76rem var(--f-m); color: var(--gold); }

.filters { display: flex; flex-direction: column; gap: 12px; margin-bottom: 6px; }
.frow { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.frow > span { font: 700 0.84rem var(--f-d); color: var(--ink); min-width: 78px; }
.search { position: relative; margin-left: auto; }
.search input {
  font: 500 0.9rem var(--f-b);
  padding: 8px 14px 8px 34px;
  border: 1px solid var(--rule2);
  border-radius: 2px;
  background: var(--paper);
  color: var(--ink);
  width: min(240px, 100%);
  outline: none;
}
.search input:focus { border-color: var(--sec-bar); }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--muted); }
.resbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0 8px;
  font: 500 0.84rem var(--f-m);
  color: var(--muted);
  flex-wrap: wrap;
  min-height: 44px;
}
.tagx {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  background: var(--accent);
  color: var(--btn-ink);
  padding: 4px 5px 4px 12px;
  border-radius: 2px;
  font: 600 0.82rem var(--f-d);
}
.tagx button { width: 18px; height: 18px; background: rgba(0, 0, 0, 0.2); color: inherit; font-size: 0.6rem; border-radius: 1px; }
.reset { text-decoration: underline; text-underline-offset: 3px; color: var(--link-ink); }

.yrgrp {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 28px;
  padding: 26px 0;
  border-top: 2px solid var(--sec-bar);
  align-items: start;
}
.yrgrp:first-child { margin-top: 8px; }
.yh {
  position: sticky;
  top: 88px;
  font: 800 1.75rem/1.05 var(--f-d);
  color: var(--title-ink);
  letter-spacing: -0.025em;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 2px;
}
.yh small { font: 600 0.8rem var(--f-m); color: var(--muted); letter-spacing: 0; }
.ents { display: flex; flex-direction: column; }
.ent {
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  column-gap: 22px;
  align-items: start;
  scroll-margin-top: 100px;
  animation: enter 0.35s var(--ease) both;
}
.ents .ent:first-child { padding-top: 0; }
.ents .ent:last-child { border-bottom: 0; padding-bottom: 0; }
@keyframes enter { from { opacity: 0; transform: translateY(5px); } }
.ent.flash { animation: flash 2.2s ease; }
@keyframes flash {
  0%, 45% { background: color-mix(in oklab, var(--accent) 18%, transparent); }
  100% { background: transparent; }
}
.meta { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; font: 700 0.88rem var(--f-m); padding-top: 2px; }
.venue-t { color: var(--link-ink); white-space: nowrap; }
.role { font: 600 0.74rem var(--f-d); color: var(--accent); display: flex; align-items: center; gap: 6px; }
.role::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.role.co { color: var(--muted); font-weight: 500; }
.role.co::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }
.award { font: 600 0.78rem/1.3 var(--f-d); color: var(--warm); }
.ent h5 { font: 700 1.14rem/1.38 var(--f-d); letter-spacing: -0.015em; }
.ent h5 a { color: var(--ink); }
.ent h5 a:hover { color: var(--link-ink); text-decoration: underline; text-underline-offset: 3px; }
.ent h5 a::after { content: '\00a0↗'; font: 500 0.72em var(--f-m); color: var(--muted); }
.au { margin-top: 6px; font-size: 0.98rem; line-height: 1.6; color: var(--muted); }
.au b { color: var(--ink); font-weight: 700; }
.au button { color: inherit; transition: color 0.15s; }
.au button:hover { color: var(--link-ink); text-decoration: underline; text-underline-offset: 3px; }
.vf { margin-top: 2px; font: italic 400 0.94rem var(--f-b); color: var(--muted); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.lk {
  display: inline-flex;
  align-items: stretch;
  font: 600 0.8rem var(--f-d);
  background: var(--paper);
  border: 1px solid var(--rule2);
  border-radius: 2px;
  overflow: hidden;
  color: var(--ink2);
  transition: 0.15s var(--ease);
}
.lk > * { padding: 5px 11px; display: block; }
a.lk:hover { background: var(--accent); border-color: var(--accent); color: var(--btn-ink); }
.lk a { padding: 5px 9px; border-left: 1px solid var(--rule2); color: var(--link-ink); }
.lk a:hover { background: var(--accent); color: var(--btn-ink); }
.lk .ck { color: var(--warm); }
.empty { padding: 70px 0; text-align: center; color: var(--muted); border-top: 1px solid var(--rule); }

/* ---------- Talks, Workshops & Service ---------- */
.ws-cat-title {
  font: 800 1.32rem/1.25 var(--f-d);
  color: var(--title-ink);
  margin: 28px 0 14px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.ws-cat-title:first-of-type { margin-top: 18px; }
.ws-cat-title span { font: 600 0.84rem var(--f-m); color: var(--link-ink); }
.ws-cards-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.srv-cards-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.ws-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  background: var(--sheet);
  border: 1px solid var(--rule2);
  border-top: 2px solid var(--sec-bar);
  border-radius: 2px;
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease), transform 0.16s var(--ease);
}
.ws-card:hover { border-color: var(--sec-bar); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18); transform: translateY(-2px); }
.ws-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ws-card-venue { font: 700 0.92rem var(--f-m); color: var(--warm); }
.ws-card-role {
  font: 600 0.74rem var(--f-d);
  color: var(--link-ink);
  background: color-mix(in oklab, var(--accent) 14%, var(--paper));
  padding: 3px 8px;
  border-radius: 2px;
}
.ws-card-name { font: 800 1.18rem/1.25 var(--f-d); color: var(--ink); }
.ws-card-name a { color: var(--ink); }
.ws-card-name a:hover { color: var(--link-ink); text-decoration: underline; text-underline-offset: 3px; }
.ws-card-sub { font-size: 0.92rem; line-height: 1.45; color: var(--muted); }
.ws-card .pills { margin-top: 4px; }
.srv-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.srv-tag {
  font: 600 0.8rem var(--f-m);
  padding: 4px 10px;
  background: var(--paper);
  border: 1px solid var(--rule2);
  border-radius: 2px;
  color: var(--ink2);
}

.talk-list { display: flex; flex-direction: column; }
.talk-card {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  gap: 22px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.talk-card.has-vid { grid-template-columns: 138px minmax(0, 1fr) 236px; }
.talk-card.has-vid.playing { grid-template-columns: 138px minmax(0, 1fr); }
.talk-card.has-vid.playing .yt-snap { display: none; }
.talk-card:first-child { border-top: 1px solid var(--rule); }
.talk-meta { display: flex; flex-direction: column; gap: 6px; padding-top: 2px; }
.talk-date { font: 700 0.92rem var(--f-m); color: var(--link-ink); }
.talk-kind {
  display: inline-flex;
  align-self: flex-start;
  font: 600 0.72rem var(--f-d);
  padding: 2px 8px;
  border-radius: 2px;
  background: var(--sheet);
  border: 1px solid var(--rule2);
  color: var(--ink2);
}
.talk-kind.inv {
  background: var(--warm-sheet);
  border-color: color-mix(in oklab, var(--warm) 35%, var(--rule2));
  color: var(--warm);
}
.talk-title { font: 700 1.18rem/1.36 var(--f-d); color: var(--ink); margin-bottom: 8px; }
.talk-title a { color: var(--ink); }
.talk-title a:hover { color: var(--link-ink); text-decoration: underline; text-underline-offset: 3px; }
.talk-venues { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.venue-item { display: flex; align-items: baseline; gap: 8px; font-size: 0.95rem; line-height: 1.5; color: var(--ink2); }
.venue-item::before { content: '▸'; font: 600 0.8rem var(--f-m); color: var(--link-ink); flex-shrink: 0; }
.venue-item span { color: var(--muted); font-size: 0.9rem; }

/* Inline YouTube Snapshot & Player */
.yt-snap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid var(--rule2);
  background: #12091c;
  display: block;
  padding: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
  transition: transform 0.16s var(--ease), border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
.yt-snap:hover { transform: translateY(-2px); border-color: var(--sec-bar); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.26); }
.yt-snap img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.9; transition: opacity 0.16s var(--ease), transform 0.25s var(--ease); }
.yt-snap:hover img { opacity: 1; transform: scale(1.03); }
.yt-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(18, 9, 28, 0.18) 0%, rgba(18, 9, 28, 0.48) 100%);
}
.yt-play i {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(92, 45, 145, 0.92);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-size: 0.95rem;
  padding-left: 2px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.38);
  transition: transform 0.16s var(--ease), background 0.16s var(--ease);
}
.yt-snap:hover .yt-play i { transform: scale(1.1); background: var(--accent); }
.yt-cap {
  position: absolute;
  left: 7px;
  bottom: 6px;
  right: 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  pointer-events: none;
}
.yt-cap span {
  font: 600 0.68rem var(--f-m);
  color: #fff;
  background: rgba(14, 8, 22, 0.82);
  padding: 2px 7px;
  border-radius: 2px;
  backdrop-filter: blur(4px);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.yt-inline {
  margin-top: 14px;
  background: var(--sheet);
  border: 1px solid var(--rule2);
  border-top: 2px solid var(--sec-bar);
  border-radius: 3px;
  overflow: hidden;
  display: none;
}
.yt-inline.open { display: block; animation: enter 0.25s var(--ease) both; }
.yt-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--rule);
  font: 600 0.8rem var(--f-d);
  color: var(--ink2);
  flex-wrap: wrap;
}
.yt-bar-title { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.yt-bar-acts { display: flex; align-items: center; gap: 10px; font: 600 0.76rem var(--f-m); }
.yt-bar-acts a { color: var(--link-ink); }
.yt-bar-acts a:hover { text-decoration: underline; }
.yt-close {
  font: 600 0.76rem var(--f-d);
  padding: 3px 9px;
  border-radius: 2px;
  background: var(--paper);
  border: 1px solid var(--rule2);
  color: var(--ink2);
}
.yt-close:hover { border-color: var(--sec-bar); color: var(--ink); }
.yt-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.yt-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
button.lk.vid-btn { cursor: pointer; }
button.lk.vid-btn.on { background: var(--accent); border-color: var(--accent); color: var(--btn-ink); }

/* ---------- Footer ---------- */
.footer-section {
  background: linear-gradient(180deg, var(--paper) 0%, var(--hero-bg) 56px, var(--hero-bg) 100%);
  color: var(--hero-muted);
  margin-top: 0;
  padding-top: 20px;
}
.fw { max-width: var(--container); margin: 0 auto; padding: 52px 28px 32px; }
.f-eyebrow { font: 600 0.9rem var(--f-m); color: var(--hero-accent); margin-bottom: 12px; }
.f-name { font: 800 1.9rem/1.1 var(--f-d); color: var(--hero-ink); letter-spacing: -0.025em; margin-bottom: 6px; }
.f-sub { color: var(--hero-muted); margin-bottom: 20px; font-size: 1.05rem; }
.f-mail { font: 700 1.25rem var(--f-d); color: var(--gold); text-decoration: underline; text-underline-offset: 4px; }
.f-mail:hover { color: #fff; }
.flinks { display: flex; flex-wrap: wrap; gap: 6px 26px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--hero-rule); }
.flinks a { font: 600 0.98rem var(--f-d); color: var(--hero-muted); }
.flinks a:hover { color: var(--gold); }
.f-small { margin-top: 24px; font: 500 0.78rem var(--f-m); color: color-mix(in srgb, var(--hero-muted) 70%, transparent); }

/* ---------- Responsive Breakpoints ---------- */
@media (max-width: 860px) {
  .ws-topbar-inner { flex-wrap: wrap; padding: 10px 20px; row-gap: 2px; }
  .ws-nav-links { order: 3; width: 100%; overflow-x: auto; }
  .hero { padding: 40px 20px 48px; }
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-title { white-space: normal; }
  .hud { display: none !important; }
  .flow { padding: 0 20px; }
  .sec-title { font-size: 1.72rem; }
  .keyp, .ws-cards-grid, .srv-cards-grid { grid-template-columns: 1fr; }
  .yrgrp { grid-template-columns: 1fr; gap: 12px; }
  .yh { position: static; flex-direction: row; align-items: baseline; gap: 12px; }
  .ent, .talk-card, .talk-card.has-vid, .news-row { grid-template-columns: 1fr; gap: 8px; }
  .meta { flex-direction: row; gap: 12px; margin-bottom: 4px; flex-wrap: wrap; }
  .ent > *:not(.meta) { grid-column: 1; }
  .d1-r, .d1-bl { grid-template-columns: 68px repeat(8, 1fr); gap: 4px; }
  .stage { padding: 18px 14px; }
  .search { margin-left: 0; width: 100%; }
  .search input { width: 100%; }
  .fw { padding: 44px 20px 28px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .rv { opacity: 1; transform: none; }
}
