/* =========================================================
   Inseok Kong — Max Verstappen #3 theme
   Team colors: navy / red / yellow. Dark is the default.
   ========================================================= */

:root,
[data-theme="dark"] {
  --bg: #070d1f;
  --bg-2: #0b1430;
  --surface: #101b3b;
  --surface-2: #172550;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #eef1f8;
  --text-2: #b6bfd8;
  --muted: #7f8bad;
  --link: #7aa2ff;
  --red: #e3173e;
  --red-soft: rgba(227, 23, 62, 0.14);
  --yellow: #ffc906;
  --yellow-ink: #ffc906;
  --blue: #3671c6;
  --purple: #b26bff;
  --green: #22c55e;
  --on-accent: #ffffff;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --grid-line: rgba(255, 255, 255, 0.035);
  --photo-bg: #e9ecf3;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f3f5fa;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #eaeef7;
  --line: rgba(11, 20, 48, 0.09);
  --line-strong: rgba(11, 20, 48, 0.18);
  --text: #0b1430;
  --text-2: #34406a;
  --muted: #67739a;
  --link: #1f4fb5;
  --red: #d10a35;
  --red-soft: rgba(209, 10, 53, 0.08);
  --yellow: #ffc906;
  --yellow-ink: #8a6700;
  --blue: #2a5db0;
  --purple: #8b3fe0;
  --green: #15803d;
  --shadow: 0 10px 30px rgba(11, 20, 48, 0.08);
  --grid-line: rgba(11, 20, 48, 0.04);
  --photo-bg: #e9ecf3;
  color-scheme: light;
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Titillium Web", "Noto Sans KR", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
b, strong { font-weight: 700; color: var(--text); }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.icon { width: 1em; height: 1em; flex-shrink: 0; }
.mono, time { font-family: "JetBrains Mono", ui-monospace, monospace; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.livery-stripe {
  height: 3px;
  background: linear-gradient(90deg,
    var(--red) 0 46%,
    var(--yellow) 46% 54%,
    var(--red) 54% 100%);
}

.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-num {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  height: 28px;
  padding: 0 8px;
  background: var(--red);
  color: #fff;
  font-weight: 900;
  font-style: italic;
  font-size: 17px;
  letter-spacing: -0.5px;
  transform: skewX(-14deg);
  box-shadow: 3px 0 0 var(--yellow);
}
.brand-name { font-size: 17px; letter-spacing: 0.3px; text-transform: uppercase; }
.brand-name b { font-weight: 900; }

.topnav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.topnav a {
  color: var(--text-2);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 6px 12px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.topnav a:hover,
.topnav a.is-active { color: var(--text); text-decoration: none; border-bottom-color: var(--red); }

.theme-toggle {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.theme-toggle:hover { border-color: var(--yellow); }
.theme-icon { display: none; }
[data-theme="dark"] .theme-icon-sun,
[data-theme="light"] .theme-icon-moon { display: grid; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 64px;
  border-bottom: 1px solid var(--line);
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-slash {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 46%;
  height: 140%;
  transform: skewX(-18deg);
  background:
    linear-gradient(90deg,
      transparent 0 20%,
      var(--red) 20% 21.5%,
      transparent 21.5% 24%,
      var(--yellow) 24% 24.8%,
      transparent 24.8% 28%,
      color-mix(in srgb, var(--blue) 18%, transparent) 28% 100%);
  opacity: 0.45;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.hero-name {
  margin: 0;
  font-size: clamp(44px, 6vw, 64px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -1px;
}

.hero-tagline {
  max-width: 560px;
  margin: 16px 0 24px;
  color: var(--text-2);
  font-size: 18px;
}

.hero-links { display: flex; flex-wrap: wrap; gap: 8px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  transition: border-color 0.15s;
}
.btn:hover { text-decoration: none; border-color: var(--red); }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { border-color: var(--yellow); }

.profile-photo {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--photo-bg);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}
.profile-photo::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--red) 0 75%, var(--yellow) 75%);
}
.profile-photo img { width: 100%; aspect-ratio: 1 / 1.1; object-fit: cover; object-position: top; }

/* ---------- Sections ---------- */
.section { padding: 64px 0 0; }
.section:last-of-type { padding-bottom: 80px; }

.section-head { margin-bottom: 24px; }
.section-head h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 700;
}
.section-head h2::after {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  margin-top: 10px;
  background: linear-gradient(90deg, var(--red) 0 75%, var(--yellow) 75%);
}
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.sub-head {
  margin: 0 0 16px;
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
}
.sub-head:not(:first-child) { margin-top: 36px; }

.more-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  font-weight: 600;
}
.empty { color: var(--muted); }

/* About */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.prose p { margin: 0 0 16px; color: var(--text-2); font-size: 17px; }
.prose b { color: var(--text); }

.focus { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; }
.focus-title { font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.focus ul { list-style: none; margin: 0; padding: 0; }
.focus li { position: relative; padding: 10px 0 10px 14px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; line-height: 1.4; }
.focus li:last-child { border-bottom: 0; }
.focus li::before { content: ""; position: absolute; left: 0; top: 13px; bottom: 13px; width: 3px; border-radius: 2px; background: var(--line-strong); }
.focus li.is-now::before { background: var(--red); }
.focus li span { font-weight: 600; font-size: 15px; }
.focus li em { font-style: normal; font-size: 13px; color: var(--muted); }

/* News */
.news { list-style: none; margin: 0; padding: 0; }
.news-item { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.news-item:last-child { border-bottom: 0; }
.news-item time { font-size: 14px; font-weight: 700; color: var(--muted); padding-top: 2px; }
.news-item p { margin: 0; color: var(--text-2); }
.news-item .hl { color: var(--red); }
.badge-new { background: var(--yellow); color: #0b1430; margin-right: 4px; vertical-align: 2px; }

/* Filter tabs */
.session-tabs {
  display: inline-flex;
  margin-bottom: 24px;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
}
.session-tab {
  border: 0;
  background: transparent;
  color: var(--text-2);
  font: 600 14px/1 "Titillium Web", sans-serif;
  padding: 7px 14px;
  border-radius: 5px;
  cursor: pointer;
}
.session-tab:hover { color: var(--text); }
.session-tab.is-active { background: var(--red); color: #fff; }

/* Publications */
.pub-list { list-style: none; margin: 0; padding: 0; }
.pub {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 22px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.pub.is-last { border-bottom: 0; }
.pub.is-hidden { display: none; }
.pub-thumb { border-radius: 8px; overflow: hidden; background: #fff; border: 1px solid var(--line); align-self: start; }
.pub-thumb img { width: 100%; height: auto; }
.pub-thumb img[data-zoom] { cursor: zoom-in; }
.pub-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pub-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.pub-title { margin: 2px 0 0; font-size: 18px; line-height: 1.35; font-weight: 700; }
.pub-authors { margin: 0; color: var(--text-2); font-size: 15px; }
.pub-venue { margin: 0; color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 2px 12px; }
.pub-venue span { font-size: 13px; }
.pub-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 4px; }
.pub-links a { font-size: 15px; font-weight: 600; }

.badge {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 1px 7px;
  border-radius: 4px;
  line-height: 1.7;
}
.badge-venue { background: var(--surface-2); color: var(--text); }
.badge-oral { background: var(--red); color: #fff; }
.badge-lead { background: var(--yellow); color: #0b1430; }
[data-status="preprint"] .badge-venue { color: var(--muted); }

/* Experience */
.career-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 8px; bottom: 8px; width: 2px; background: var(--line-strong); }
.tl-item { position: relative; padding: 0 0 24px 26px; }
.tl-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--muted);
}
.tl-item.is-current::before { border-color: var(--red); background: var(--red); }
.tl-period { font-size: 14px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.tl-now { font-family: "JetBrains Mono", monospace; font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: 0 6px; border-radius: 3px; background: var(--red-soft); color: var(--red); }
.tl-org { font-weight: 700; font-size: 17px; line-height: 1.4; margin-top: 2px; }
.tl-org a { color: var(--text); }
.tl-org a:hover { color: var(--red); }
.tl-place { color: var(--text-2); font-size: 14px; }
.tl-item ul { margin: 6px 0 0; padding-left: 18px; color: var(--text-2); font-size: 15px; }

.awards { list-style: none; margin: 0; padding: 0; }
.awards li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.awards li:last-child { border-bottom: 0; }
.award-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; background: var(--surface); color: var(--yellow-ink); }
.awards b { display: block; font-size: 15px; line-height: 1.35; }
.awards span { display: block; font-size: 14px; color: var(--text-2); line-height: 1.4; }
.awards time { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* Projects */
.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.project-card { padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.project-period { font-size: 13px; color: var(--muted); }
.project-card h3 { margin: 2px 0 0; font-size: 17px; line-height: 1.3; }
.project-sub { margin: 2px 0 8px; font-size: 14px; color: var(--text-2); font-weight: 600; }
.project-card p:not(.project-sub) { margin: 0; color: var(--text-2); font-size: 15px; }

/* Off the track (F1) */
.paddock {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 32px;
  align-items: center;
  padding: 32px 36px;
  border-radius: 14px;
  color: #eef1f8;
  background:
    linear-gradient(105deg, #0b1430 0 58%, transparent 58%),
    linear-gradient(105deg, transparent 0 59%, #e3173e 59% 61%, transparent 61% 63%, #ffc906 63% 64%, transparent 64%),
    #16224a;
}
.paddock-number {
  position: absolute;
  right: 16px;
  bottom: -40px;
  font-size: 200px;
  line-height: 1;
  font-weight: 900;
  font-style: italic;
  color: rgba(255, 255, 255, 0.07);
  letter-spacing: -8px;
  pointer-events: none;
}
.paddock-main { position: relative; min-width: 0; }
.paddock-kicker { margin: 0; font-family: "JetBrains Mono", monospace; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: #ffc906; }
.paddock h2 { margin: 6px 0 10px; font-size: 28px; line-height: 1.2; color: #fff; }
.paddock h2 span { font-weight: 400; color: #b6bfd8; font-size: 22px; }
.paddock p { margin: 0 0 18px; color: #b6bfd8; max-width: 520px; }
.paddock .btn-primary { color: #fff; }
.paddock-list { position: relative; list-style: none; margin: 16px 0 0; padding: 0; max-width: 520px; }
.paddock-list li + li { margin-top: 8px; }
.paddock-list a { display: block; padding: 10px 14px; border-radius: 8px; background: rgba(11, 20, 48, 0.75); color: #eef1f8; font-weight: 600; line-height: 1.4; }
.paddock-list a:hover { text-decoration: none; background: rgba(11, 20, 48, 0.95); }
.paddock-list time { display: block; font-size: 12px; color: #ffc906; font-weight: 500; }

/* Post cards */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  border-radius: 12px;
  color: var(--text);
  transition: transform 0.15s, border-color 0.15s;
}
.post-card:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--line-strong); }
.post-card.cat-race { border-top-color: var(--red); }
.post-card.cat-study { border-top-color: var(--blue); }
.post-card.cat-gallery { border-top-color: var(--yellow); }
.post-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.post-cat {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-2);
}
.post-card time { font-size: 12px; color: var(--muted); }
.post-card h3 { margin: 4px 0 0; font-size: 19px; line-height: 1.35; }
.post-card p { margin: 0; color: var(--text-2); font-size: 15px; }
.post-card-race { margin-top: auto; padding-top: 8px; font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--red); }

/* ---------- Blog index ---------- */
.page-hero { padding: 64px 0 24px; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.page-hero .hero-slash { width: 40%; opacity: 0.35; }
.page-hero h1 {
  margin: 4px 0 8px;
  font-size: clamp(36px, 5vw, 48px);
  line-height: 1.1;
  font-weight: 900;
}
.page-hero h1 span { color: var(--red); }
.page-hero p { color: var(--text-2); margin: 0 0 24px; max-width: 620px; }
.blog-list { padding: 40px 0 88px; }
.blog-list .session-tabs { margin-bottom: 24px; }
.blog-list .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.post-card.is-hidden { display: none; }

/* ---------- Post ---------- */
.post-header { padding: 56px 0 28px; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.post-header .hero-slash { width: 36%; opacity: 0.3; }
.post-header .container,
.post-body,
.post-nav { max-width: 760px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; color: var(--muted); font-size: 14px; position: relative; }
.post-meta .post-cat { padding: 2px 8px; border-radius: 4px; background: var(--red); color: #fff; }
.post-meta .cat-study { background: var(--blue); }
.post-meta .cat-gallery { background: var(--yellow); color: #0b1430; }
.lang-toggle { position: relative; display: inline-flex; margin-top: 14px; padding: 3px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); }
.lang-toggle a { padding: 4px 14px; border-radius: 999px; font-family: "JetBrains Mono", monospace; font-size: 12px; font-weight: 700; letter-spacing: 1px; color: var(--text-2); }
.lang-toggle a:hover { color: var(--text); text-decoration: none; }
.lang-toggle a.is-active { background: var(--purple); color: #fff; }
.post-header h1 { position: relative; margin: 14px 0 0; font-size: clamp(30px, 5vw, 44px); line-height: 1.25; font-weight: 700; }
.post-header .post-desc { position: relative; margin: 10px 0 0; color: var(--text-2); font-size: 18px; }

.race-strip {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  margin-top: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}
.race-strip div { padding: 10px 14px; }
.race-strip div + div { border-left: 1px solid var(--line); }
.race-strip dt { font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.race-strip dd { margin: 0; font-weight: 700; }

.post-body { margin: 0 auto; padding: 36px 24px 24px; font-family: "Noto Sans KR", "Titillium Web", sans-serif; font-size: 17px; line-height: 1.85; color: var(--text-2); }
.post-body h2,
.post-body h3 { color: var(--text); line-height: 1.35; margin: 2em 0 0.6em; }
.post-body h2 { font-size: 26px; padding-left: 14px; border-left: 4px solid var(--red); }
.post-body h3 { font-size: 21px; }
.post-body p { margin: 0 0 1.2em; }
.post-body a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.post-body img { border-radius: 10px; margin: 1.5em auto; }
/* Study figures: a light card so slide and note crops sit well on the dark theme; the italic line after is the caption */
.post-body img[src*="/images/study/"] { display: block; max-width: 100%; margin: 1.6em auto 0.5em; padding: 10px; background: #fff; border: 1px solid var(--line); }
.post-body p > img[src*="/images/study/"] + em { display: block; margin: 0 auto 0.4em; max-width: 680px; font-size: 13.5px; line-height: 1.6; font-style: normal; text-align: center; color: var(--muted); }
.post-body blockquote { margin: 1.5em 0; padding: 12px 20px; border-left: 4px solid var(--yellow); background: var(--surface); border-radius: 0 8px 8px 0; color: var(--text); }
.post-body blockquote p:last-child { margin-bottom: 0; }
.post-body code { font-family: "JetBrains Mono", monospace; font-size: 0.88em; padding: 1px 6px; border-radius: 4px; background: var(--surface-2); color: var(--text); }
.post-body pre { padding: 16px 18px; border-radius: 10px; background: #0a1128; border: 1px solid var(--line); overflow-x: auto; line-height: 1.6; }
.post-body pre code { padding: 0; background: none; color: #e6e9f2; font-size: 14px; }
.post-body table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 15px; }
.post-body th,
.post-body td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.post-body th { color: var(--text); font-family: "JetBrains Mono", monospace; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; border-bottom: 2px solid var(--red); }
.post-body hr { border: 0; height: 3px; margin: 2.5em 0; background: linear-gradient(90deg, var(--red) 0 30%, var(--yellow) 30% 36%, transparent 36%); }
.post-body ul,
.post-body ol { padding-left: 1.4em; }
.post-body li::marker { color: var(--red); }

.post-nav { margin: 0 auto; padding: 24px 24px 88px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.post-nav a { padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); }
.post-nav a:hover { text-decoration: none; border-color: var(--red); }
.post-nav small { display: block; font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.post-nav .next { text-align: right; grid-column: 2; }

/* Rouge syntax colors (dark code blocks in both themes) */
.highlight .c, .highlight .c1, .highlight .cm { color: #6b7799; font-style: italic; }
.highlight .k, .highlight .kd, .highlight .kn, .highlight .kr { color: #ff5c7a; }
.highlight .s, .highlight .s1, .highlight .s2 { color: #ffd54a; }
.highlight .mi, .highlight .mf { color: #b98cff; }
.highlight .nf, .highlight .nc { color: #7aa2ff; }
.highlight .o, .highlight .p { color: #c5cbe0; }
.highlight .nb, .highlight .bp { color: #5ce1a5; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 32px; background: var(--bg-2); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 12px; color: var(--text-2); font-size: 14px; }
.footer-brand .brand-num { font-size: 14px; height: 24px; min-width: 34px; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--text-2); font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.footer-note { margin-top: 12px; font-size: 12px; color: var(--muted); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 32px;
  background: rgba(3, 6, 16, 0.88);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  cursor: zoom-out;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img { max-width: min(1200px, 100%); max-height: 90vh; border-radius: 10px; background: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner,
  .about-grid,
  .career-grid,
  .paddock { grid-template-columns: 1fr; }
  .profile-photo { max-width: 220px; grid-row: 1; }
  .post-grid,
  .blog-list .post-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .container,
  .topbar-inner { padding: 0 16px; }
  .brand-name { display: none; }
  .topnav a { padding: 6px 8px; font-size: 13px; letter-spacing: 0.5px; }
  .hero { padding: 48px 0 56px; }
  .section-head h2 { font-size: 26px; }
  .news-item { grid-template-columns: 1fr; gap: 2px; }
  .pub { grid-template-columns: 1fr; }
  .paddock { padding: 24px 20px; }
  .projects,
  .post-grid,
  .blog-list .post-grid { grid-template-columns: 1fr; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav .next { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}


/* Gallery: cover image on cards, and consecutive images in a post form a grid */
.post-card-img { margin: -20px -20px 8px; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 8px 8px 0 0; background: var(--surface-2); }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; }
.post-body p:has(> img + img) { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.post-body p:has(> img + img) img { margin: 0; width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* Award certificates (open in the lightbox) */
.award-cert {
  width: 30px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  cursor: zoom-in;
  transition: transform 0.15s, border-color 0.15s;
}
.award-cert:hover { transform: scale(1.08); border-color: var(--yellow); }
.award-cert img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
/* Volunteer entries: timeline text with the certificate thumbnail on the right */
.tl-item.has-cert { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: start; }
.tl-cert { width: 52px; height: 68px; margin-top: 2px; }
.text-link {
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--link);
  font: 600 14px/1.4 "Titillium Web", sans-serif;
  cursor: zoom-in;
}
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Max photo and live F1 widget */
.paddock-photo {
  position: relative;
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.paddock-photo::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, #e3173e 0 75%, #ffc906 75%);
}
.paddock-photo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }

.f1-live { margin: 0 0 20px; max-width: 640px; }
.f1-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.f1-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(11, 20, 48, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-width: 0;
}
.f1-label { font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: #8f9bbd; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f1-card b { font-size: 22px; line-height: 1.25; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f1-card small { font-size: 13px; color: #b6bfd8; line-height: 1.4; }
.f1-source { display: flex; align-items: center; gap: 8px; margin: 10px 0 0 !important; font-size: 12px; color: #8f9bbd !important; }
.f1-dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2); }

@media (max-width: 900px) {
  .paddock-photo { max-width: 260px; }
}
@media (max-width: 640px) {
  .f1-cards { grid-template-columns: 1fr; }
}


/* Auto-generated race reports */
.season-charts { padding: 4px 16px 0; }
.season-charts .race-chart { margin: 12px 0; }
.next-race { margin-bottom: 20px; padding: 18px 20px; border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: 12px; background: var(--surface); }
.next-race-label { display: block; font-family: "JetBrains Mono", monospace; font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--red); }
.next-race > b { display: block; margin-top: 4px; font-size: 22px; line-height: 1.25; }
.next-race > small { display: block; font-size: 14px; color: var(--muted); }
.next-race-count { display: flex; gap: 18px; margin-top: 12px; }
.next-race-count span { display: flex; flex-direction: column; min-width: 44px; }
.next-race-count b { font-family: "JetBrains Mono", monospace; font-size: 24px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.next-race-count small { font-size: 12px; color: var(--muted); }
.schedule-list { display: flex; flex-direction: column; gap: 6px; }
.schedule-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto 52px; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.schedule-row.is-next { border-color: var(--red); }
.schedule-row em { margin-left: 6px; font-size: 11px; font-style: normal; color: var(--muted); }
.schedule-time { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.schedule-result { font-weight: 700; text-align: right; color: var(--text); text-decoration: none; }
a.schedule-result:hover { color: var(--red); }
.schedule-result.is-empty { color: var(--muted); font-weight: 400; }
.standings-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; align-items: start; }
.standings-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.standings-table caption { padding-bottom: 8px; text-align: left; font-weight: 700; }
.standings-table th { padding: 6px 8px; text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line-strong); }
.standings-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); }
.standings-table td:last-child, .standings-table th:last-child { text-align: right; font-weight: 700; }
.standings-table tr.is-max td { color: var(--red); font-weight: 700; }
@media (max-width: 760px) { .standings-grid { grid-template-columns: minmax(0, 1fr); } .schedule-row { grid-template-columns: 36px minmax(0, 1fr) auto; } .schedule-time { display: none; } }
.race-chart { margin: 1.5em 0; padding: 16px 12px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.race-chart svg { display: block; width: 100%; height: auto; font-family: "JetBrains Mono", monospace; }
.race-chart figcaption { margin-top: 6px; font-size: 13px; color: var(--muted); text-align: center; }
.auto-note { margin-top: 2.5em !important; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

.awards b em { font-style: normal; font-weight: 400; color: var(--text-2); }
.project-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px; }
.project-links .text-link { margin-top: 0; cursor: pointer; }
a.text-link { text-decoration: none; }
a.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.text-link.is-inactive { color: var(--muted); }
.text-link small { font-weight: 400; font-size: 12px; }

[hidden] { display: none !important; }

/* ---------- Square cards (blog) ---------- */
.blog-group { margin-bottom: 40px; }
.blog-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.blog-group-head h2 { margin: 0; font-size: 22px; }
.blog-group-head .more-link { margin: 0; border: 0; background: none; color: var(--link); font: 600 15px/1 "Titillium Web", sans-serif; cursor: pointer; }
.session-tabs-sub { margin-bottom: 20px; }
.session-tabs-sub .session-tab { font-size: 13px; padding: 6px 12px; }
.race-sub-intro { margin: -6px 0 16px; color: var(--muted); font-size: 14px; }

.sq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.sq-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sq-card {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  padding: 16px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  overflow: hidden;
  transition: transform 0.15s, border-color 0.15s;
}
.sq-card:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--line-strong); }
.sq-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--blue); }
.sq-card.cat-gallery::before { background: var(--yellow); }
.sq-race::before { background: var(--red); }
.sq-top { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sq-label { font-family: "JetBrains Mono", monospace; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-2); }
.sq-top time,
.sq-meta { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--muted); }
.sq-title { position: relative; margin: 10px 0 0; font-size: 18px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sq-desc { position: relative; margin: 8px 0 0; font-size: 14px; color: var(--text-2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sq-bottom { position: relative; margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.sq-sub { font-size: 13px; color: var(--muted); }

.sq-card.has-image { color: #fff; background: #0b1430 var(--bg) center / cover no-repeat; }
.sq-card.has-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 13, 31, 0.15), rgba(7, 13, 31, 0.85)); }
.sq-card.has-image .sq-top,
.sq-card.has-image .sq-title,
.sq-card.has-image .sq-desc { z-index: 1; color: #fff; }
.sq-card.has-image .sq-title { margin-top: auto; }

.sq-race .sq-title { font-size: 22px; }
.sq-result { font-family: "JetBrains Mono", monospace; font-size: 34px; font-weight: 700; line-height: 1; color: var(--text); }
.sq-race.is-win .sq-result { color: var(--yellow-ink); }
.sq-race.is-podium .sq-result { color: var(--red); }
.sq-race.is-out .sq-result { color: var(--muted); }

.sq-circuit .sq-track { flex: 1; min-height: 0; width: 100%; margin: 6px 0; }
.sq-track path { fill: none; stroke: var(--text); stroke-width: 9; stroke-linejoin: round; stroke-linecap: round; }
.sq-circuit:hover .sq-track path { stroke: var(--red); }
.sq-circuit .sq-title { margin-top: 0; font-size: 15px; -webkit-line-clamp: 2; }

.sq-driver::before { background: var(--team); }
.sq-number { position: absolute; right: 8px; bottom: -18px; font-size: 120px; font-weight: 900; font-style: italic; line-height: 1; color: var(--team); opacity: 0.18; pointer-events: none; }
.sq-driver .sq-title { font-size: 20px; }
.sq-driver.is-max { border-color: color-mix(in srgb, var(--team) 60%, transparent); }

/* ---------- Paper review list ---------- */
.paper-controls { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px 28px; margin: -4px 0 18px; }
.paper-filters { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.subfield-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter-label { width: 52px; font-family: "JetBrains Mono", monospace; font-size: 10px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.paper-side-controls { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; flex-shrink: 0; }
.paper-sort { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.paper-sort .filter-label { width: 72px; text-align: right; }
.lang-btn { font-family: "JetBrains Mono", monospace; font-size: 12px; font-weight: 700; letter-spacing: 0.5px; padding: 4px 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: transparent; color: var(--text-2); cursor: pointer; }
.lang-btn:hover { color: var(--text); border-color: var(--purple); }
.lang-btn.is-active { background: var(--purple); border-color: var(--purple); color: #fff; }
.paper-list.is-ko .paper-row-kr { display: none; }
.conf-chip,
.sort-btn {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
}
.conf-chip small { font-weight: 400; opacity: 0.7; }
.conf-chip:hover, .sort-btn:hover { color: var(--text); border-color: var(--purple); }
.conf-chip.is-active { background: var(--purple); border-color: var(--purple); color: #fff; }
.sort-btn { border-radius: 8px; }
.sort-btn.is-active { background: var(--surface-2); border-color: var(--text-2); color: var(--text); }
.subfield-chip {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
}
.subfield-chip:hover { color: var(--text); border-color: var(--blue); }
.subfield-chip small { font-weight: 400; opacity: 0.7; }
.subfield-chip.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }
.subfield-tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--blue) 16%, transparent);
  color: var(--text);
}

.paper-list { display: flex; flex-direction: column; gap: 10px; }
.paper-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 24px;
  align-items: center;
  padding: 16px 20px 16px 24px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color 0.15s;
}
.paper-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--blue); }
.paper-row:hover { border-color: var(--line-strong); }
.paper-row-date { font-family: "JetBrains Mono", monospace; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.paper-row-title { margin: 4px 0 0; font-size: 18px; line-height: 1.35; }
.paper-row-title a { position: relative; z-index: 1; color: var(--text); }
.paper-row-title a:hover { color: var(--blue); }
.paper-row-authors { margin: 4px 0 0; font-size: 14px; color: var(--text-2); line-height: 1.5; }
.paper-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.paper-row-venue { font-size: 14px; font-weight: 700; color: var(--text); }
.paper-row-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.paper-row-kr { position: relative; z-index: 1; padding: 1px 8px; border: 1px solid var(--line-strong); border-radius: 999px; font-family: "JetBrains Mono", monospace; font-size: 11px; font-weight: 700; color: var(--text-2); }
.paper-row-kr:hover { border-color: var(--purple); color: var(--text); text-decoration: none; }
.paper-row-review { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--text-2); }
.paper-row-review .icon { width: 14px; height: 14px; }
/* The whole bar opens the review; only the paper title goes to arXiv. */
.paper-row-review::after { content: ""; position: absolute; inset: 0; }
.paper-row:hover .paper-row-review { color: var(--blue); text-decoration: none; }
@media (max-width: 640px) {
  .paper-row { grid-template-columns: minmax(0, 1fr); padding: 14px 16px 14px 20px; }
  .paper-row-side { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .paper-row-tags { justify-content: flex-start; }
}

/* ---------- Study series ---------- */
/* Each Study topic has its own accent, used by cards, series headers and the in-post series box. */
.topic-linear-algebra { --accent: var(--blue); }
.topic-deep-learning { --accent: var(--purple); }
.topic-machine-learning { --accent: var(--green); }
.topic-algorithm { --accent: var(--yellow-ink); }
.topic-pytorch { --accent: #ee4c2c; }
.topic-basic { --accent: #0d9488; }
.topic-robotics { --accent: #7c3aed; }

/* Question series: a bullet per question that opens to show the answer */
.question-group { margin-top: 24px; }
.question-group h3 { margin: 0; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 18px; }
.question-group h3 small { margin-left: 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
.question-list { margin: 12px 0 0; padding-left: 22px; list-style: disc; }
.question-item { padding: 2px 0; line-height: 1.5; }
.question-item::marker { color: var(--accent); }
.question-item summary { padding: 4px 0; cursor: pointer; list-style: none; color: var(--text); }
.question-item summary::-webkit-details-marker { display: none; }
.question-item summary::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-2px) rotate(-45deg); transition: transform .15s; }
.question-item details[open] summary { font-weight: 700; }
.question-item details[open] summary::after { transform: translateY(-3px) rotate(45deg); }
.question-item summary:hover { color: var(--accent); }
.question-answer { margin: 4px 0 12px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; color: var(--text-2); font-size: 15px; line-height: 1.7; }
.question-answer blockquote { margin: 0; padding: 0; border: 0; }
.question-answer p { margin: 0; }
.question-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--accent); text-decoration: none; }
.question-more:hover { text-decoration: underline; }
.question-more svg { width: 14px; height: 14px; }

/* Lecture rows: number, title and key concepts on one bar */
.lecture-list { display: flex; flex-direction: column; gap: 8px; }
.lecture-row {
  position: relative;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 16px;
  padding: 14px 18px 14px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  overflow: hidden;
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.lecture-row:hover { text-decoration: none; transform: translateX(3px); border-color: color-mix(in srgb, var(--accent, var(--blue)) 55%, transparent); background: color-mix(in srgb, var(--accent, var(--blue)) 6%, var(--surface)); }
.lecture-row-num {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: -14px 0;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--accent, var(--blue)) 12%, transparent);
  color: var(--accent, var(--blue));
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
}
.lecture-row-num small { margin-bottom: 4px; font-family: "JetBrains Mono", monospace; font-size: 9px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.lecture-row-main { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.lecture-row-title { font-size: 17px; font-weight: 700; line-height: 1.3; }
.lecture-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.lecture-tags span { padding: 1px 9px; border-radius: 999px; background: color-mix(in srgb, var(--accent, var(--blue)) 13%, transparent); color: var(--text-2); font-size: 12px; line-height: 1.7; }
.lecture-row > .icon { width: 18px; height: 18px; color: var(--muted); transition: transform 0.15s, color 0.15s; }
.lecture-row:hover > .icon { color: var(--accent, var(--blue)); transform: translateX(3px); }
.lecture-list-compact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 24px 24px 28px; }
.lecture-list-compact .lecture-row { background: var(--bg-2); }
.lecture-list-compact .lecture-row-title { font-size: 15px; }
.lecture-list-compact .lecture-tags { display: none; }

/* Blog search */
.blog-search { position: relative; display: flex; align-items: center; margin-bottom: 18px; }
.blog-search .icon { position: absolute; left: 16px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.blog-search input {
  width: 100%;
  padding: 13px 48px 13px 46px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: 500 16px/1.4 "Titillium Web", "Noto Sans KR", sans-serif;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.blog-search input::placeholder { color: var(--muted); }
.blog-search input:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.blog-search kbd { position: absolute; right: 14px; padding: 1px 7px; border: 1px solid var(--line-strong); border-radius: 5px; font: 600 12px/1.5 "JetBrains Mono", monospace; color: var(--muted); pointer-events: none; }
.blog-search input:focus + kbd, .blog-search input:not(:placeholder-shown) + kbd { display: none; }
.blog-list.is-searching #blog-tabs,
.blog-list.is-searching .blog-panel { display: none !important; }
.search-results { display: flex; flex-direction: column; gap: 8px; margin-bottom: 40px; }
.search-count { margin: 0 0 4px; font-size: 14px; color: var(--muted); }
.search-count b { color: var(--text); }
.search-hit { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 12px 18px 12px 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); overflow: hidden; }
.search-hit::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--blue); }
.search-hit.cat-race::before { background: var(--red); }
.search-hit.cat-gallery::before { background: var(--yellow); }
.search-hit.cat-paper-review::before { background: var(--purple); }
.search-hit:hover { text-decoration: none; border-color: var(--line-strong); }
.search-hit-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--muted); }
.search-hit-cat { font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-2); }
.search-hit-title { font-size: 16px; line-height: 1.35; }
.search-hit-desc { font-size: 14px; color: var(--text-2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Course tabs inside a Study topic (e.g. PyTorch: three courses) */
.series-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 22px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); width: fit-content; max-width: 100%; }
.series-tab { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 0; border-radius: 8px; background: transparent; color: var(--text-2); font: 700 14px/1.2 "Titillium Web", "Noto Sans KR", sans-serif; cursor: pointer; }
.series-tab small { padding: 1px 7px; border-radius: 999px; background: var(--surface-2); font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--muted); }
.series-tab:hover { color: var(--text); background: var(--bg-2); }
.series-tab.is-active { background: var(--red); color: #fff; }
.series-tab.is-active small { background: rgba(255, 255, 255, 0.22); color: #fff; }
.series-block { margin-bottom: 44px; }
.series-head {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 16px;
  padding: 18px 22px 18px 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(115deg, color-mix(in srgb, var(--accent) 16%, var(--surface)) 0%, var(--surface) 65%);
  overflow: hidden;
}
.series-head::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent); }
.series-kicker { font-family: "JetBrains Mono", monospace; font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent); }
.series-head h2 { margin: 4px 0 2px; font-size: 24px; line-height: 1.25; }
.series-head p { margin: 0; font-size: 14px; color: var(--text-2); }
.series-head-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.series-count { padding: 4px 10px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--muted); white-space: nowrap; }
.series-count b { color: var(--text); }
.series-link { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--text-2); white-space: nowrap; }
.series-link .icon { width: 14px; height: 14px; }
.series-link:hover { color: var(--accent); text-decoration: none; }


/* In-post series box and series-aware previous / next */
.series-steps { display: flex; gap: 8px; margin-top: 12px; }
.series-step { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--bg-2); color: var(--text); font-size: 13px; font-weight: 700; }
.series-step span { font-size: 15px; color: var(--accent); }
.series-step small { font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--text-2); }
.series-step:hover { text-decoration: none; border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--bg-2)); }
.series-step.next { margin-left: auto; }
.series-step.is-disabled { opacity: 0.4; }
.series-step.is-disabled span { color: var(--muted); }

/* Source notes at the top of study posts: one card per item */
.post-body .post-sources { list-style: none; margin: 0 0 2em; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.post-body .post-sources li { margin: 0; padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 14px; line-height: 1.5; color: var(--text-2); }
.post-body .post-sources li::marker { content: none; }
.post-body .post-sources li:first-child { flex-basis: 100%; border-left: 3px solid var(--accent, var(--red)); color: var(--text); font-weight: 600; }
.post-body .post-sources a { text-decoration: none; color: var(--link); }
.post-body .post-sources a:hover { text-decoration: underline; }
.series-wrap { max-width: 760px; margin: 0 auto; padding: 28px 24px 0; }
.series-box { position: relative; padding: 14px 18px 12px 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.series-box::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent); }
.series-box-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.series-box-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.series-box-title b { font-size: 16px; line-height: 1.3; }
.series-pos { font-family: "JetBrains Mono", monospace; font-size: 22px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.series-pos small { font-size: 13px; color: var(--muted); }
.series-progress { height: 4px; margin: 12px 0 4px; border-radius: 999px; background: var(--line); overflow: hidden; }
.series-progress span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.series-toc summary { display: inline-flex; align-items: center; gap: 6px; padding-top: 8px; font-size: 13px; font-weight: 700; color: var(--text-2); cursor: pointer; list-style: none; }
.series-toc summary::-webkit-details-marker { display: none; }
.series-toc summary::before { content: ""; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform 0.15s; }
.series-toc[open] summary::before { transform: rotate(45deg); }
.series-toc summary:hover { color: var(--text); }
.series-toc ol { list-style: none; margin: 10px 0 4px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 16px; max-height: 380px; overflow-y: auto; }
.series-toc li a { display: flex; gap: 10px; padding: 6px 8px; border-radius: 6px; color: var(--text-2); font-size: 14px; line-height: 1.4; }
.series-toc li a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.series-toc .toc-num { flex-shrink: 0; min-width: 20px; text-align: right; font-family: "JetBrains Mono", monospace; font-size: 12px; line-height: 1.7; color: var(--muted); }
.series-toc li.is-current a { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--text); font-weight: 700; }
.series-toc li.is-current .toc-num { color: var(--accent); }
.series-nav a:hover { border-color: var(--accent); }
.series-nav small { color: var(--accent); }

@media (max-width: 760px) {
  .series-head { flex-direction: column; align-items: flex-start; }
  .series-head-meta { flex-direction: row; align-items: center; }
  .lecture-list-compact { grid-template-columns: minmax(0, 1fr); }
  .lecture-row { grid-template-columns: 60px minmax(0, 1fr) 16px; gap: 12px; padding-right: 12px; }
  .lecture-row-num { font-size: 22px; }
  .series-toc ol { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Post table of contents (wide screens only) ---------- */
.post-body h2, .post-body h3 { scroll-margin-top: 90px; }
.post-toc { display: none; }
@media (min-width: 1300px) {
  .post-toc {
    display: block;
    position: fixed;
    top: 110px;
    left: calc(50% + 404px);
    width: min(260px, calc(50vw - 430px));
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    padding: 4px 0 4px 14px;
    border-left: 1px solid var(--line);
    scrollbar-width: thin;
  }
}
.post-toc-title { margin: 0 0 8px; font-family: "JetBrains Mono", monospace; font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.post-toc ol { list-style: none; margin: 0; padding: 0; }
.post-toc li a { position: relative; display: block; padding: 4px 0; font-size: 13px; line-height: 1.45; color: var(--text-2); }
.post-toc li.toc-h3 a { padding-left: 12px; font-size: 12.5px; color: var(--muted); }
.post-toc li a:hover { color: var(--text); text-decoration: none; }
.post-toc li a.is-active { color: var(--text); font-weight: 700; }
.post-toc li a.is-active::before { content: ""; position: absolute; left: -15px; top: 4px; bottom: 4px; width: 2px; border-radius: 2px; background: var(--red); }

/* ---------- F1: calendar rows and standings ---------- */
.group-head-meta { font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--muted); }
.circuit-list { display: flex; flex-direction: column; gap: 6px; }
.circuit-row {
  display: grid;
  grid-template-columns: 44px 64px minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 16px;
  padding: 10px 18px 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
}
.circuit-row:hover { text-decoration: none; border-color: color-mix(in srgb, var(--red) 50%, transparent); background: color-mix(in srgb, var(--red) 5%, var(--surface)); }
.circuit-row.is-upcoming { border-style: dashed; }
.circuit-row-round { font-family: "JetBrains Mono", monospace; font-size: 13px; font-weight: 700; color: var(--muted); text-align: center; }
.circuit-row.is-upcoming .circuit-row-round { color: var(--red); }
.circuit-row-track { width: 64px; height: 44px; }
.circuit-row-track path { fill: none; stroke: var(--text-2); stroke-width: 12; stroke-linejoin: round; stroke-linecap: round; }
.circuit-row:hover .circuit-row-track path { stroke: var(--red); }
.circuit-row-main, .circuit-row-stat { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.circuit-row-main b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.circuit-row-main small, .circuit-row-stat small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.circuit-row-stat em { font-style: normal; font-family: "JetBrains Mono", monospace; font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.circuit-row-stat b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.circuit-row-stat b.is-max { color: var(--yellow-ink); }
.circuit-row-stat b.is-upcoming { color: var(--red); }
.circuit-row-record b { font-family: "JetBrains Mono", monospace; font-size: 13px; }

.driver-list { display: flex; flex-direction: column; gap: 6px; }
.driver-list-head,
.driver-row { display: grid; grid-template-columns: 40px 44px minmax(0, 1.5fr) minmax(0, 1fr) 56px minmax(0, 1.3fr); align-items: center; gap: 14px; }
.driver-list-head { padding: 0 18px 2px 14px; font-family: "JetBrains Mono", monospace; font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.driver-row {
  position: relative;
  padding: 8px 18px 8px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  overflow: hidden;
  transition: border-color 0.15s, background 0.15s;
}
.driver-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--team); }
.driver-row:hover { text-decoration: none; border-color: color-mix(in srgb, var(--team) 60%, transparent); background: color-mix(in srgb, var(--team) 6%, var(--surface)); }
.driver-row.is-max { border-color: color-mix(in srgb, var(--yellow) 55%, var(--line)); background: color-mix(in srgb, var(--yellow) 6%, var(--surface)); }
.driver-row-pos { font-size: 20px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.driver-row-avatar { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: color-mix(in srgb, var(--team) 25%, var(--surface-2)); display: grid; place-items: center; box-shadow: 0 0 0 2px color-mix(in srgb, var(--team) 70%, transparent); }
.driver-row-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.driver-row-avatar span { font-family: "JetBrains Mono", monospace; font-size: 11px; font-weight: 700; }
.driver-row-main { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.driver-row-main b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.driver-row.is-max .driver-row-main b { color: var(--yellow-ink); }
.driver-row-main small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.driver-row-num { font-family: "JetBrains Mono", monospace; color: var(--text-2); }
.driver-row-team { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.driver-row-team i { flex-shrink: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--team); }
.driver-row-wins { display: flex; align-items: baseline; gap: 4px; }
.driver-row-wins b { font-size: 16px; }
.driver-row-wins small { font-size: 11px; color: var(--muted); }
.driver-row-points { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.driver-row-pts { font-size: 12px; color: var(--muted); }
.driver-row-pts b { font-size: 15px; color: var(--text); }
.driver-row-bar { height: 5px; border-radius: 999px; background: var(--line); overflow: hidden; }
.driver-row-bar span { display: block; height: 100%; border-radius: inherit; background: var(--team); }

@media (max-width: 900px) {
  .circuit-row { grid-template-columns: 40px 56px minmax(0, 1fr) minmax(0, 0.9fr); }
  .circuit-row-record { display: none; }
  .driver-list-head,
  .driver-row { grid-template-columns: 32px 40px minmax(0, 1fr) 44px minmax(0, 0.9fr); }
  .driver-list-head span:nth-child(4), .driver-row-team { display: none; }
}
@media (max-width: 560px) {
  .circuit-row { grid-template-columns: 36px minmax(0, 1fr) minmax(0, 0.8fr); gap: 10px; }
  .circuit-row-track { display: none; }
  .driver-list-head { display: none; }
  .driver-row { grid-template-columns: 28px 36px minmax(0, 1fr) minmax(0, 0.8fr); gap: 10px; }
  .driver-row-wins { display: none; }
  .driver-row-avatar { width: 34px; height: 34px; }
}

/* ---------- Blog All tab: one card per category ---------- */
.cat-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 40px; }
.cat-card {
  --cat-accent: var(--blue);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 300px;
  padding: 28px 30px 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--cat-accent) 12%, var(--surface)) 0%, var(--surface) 55%);
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.cat-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--cat-accent); }
.cat-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--cat-accent) 55%, transparent); box-shadow: 0 22px 40px -28px var(--cat-accent); }
.cat-card.cat-bar-paper-review { --cat-accent: var(--purple); }
.cat-card.cat-bar-gallery { --cat-accent: var(--yellow); }
.cat-card.cat-bar-race { --cat-accent: var(--red); }
.cat-card-bg { position: absolute; right: -28px; bottom: -34px; color: var(--cat-accent); opacity: 0.07; pointer-events: none; transition: transform 0.3s, opacity 0.3s; }
.cat-card-bg .icon { width: 190px; height: 190px; }
.cat-card:hover .cat-card-bg { opacity: 0.12; transform: rotate(-6deg) scale(1.04); }
.cat-card-top { position: relative; display: flex; justify-content: space-between; align-items: flex-start; }
.cat-card-count { display: flex; flex-direction: column; align-items: flex-end; font-family: "JetBrains Mono", monospace; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.cat-card-count b { font-family: "Titillium Web", sans-serif; font-size: 40px; font-weight: 800; line-height: 1; letter-spacing: -1px; color: var(--cat-accent); }
.cat-card.cat-bar-gallery .cat-card-count b { color: var(--yellow-ink); }
.cat-card-name { position: relative; margin-top: 6px; font-size: 28px; font-weight: 800; line-height: 1.15; }
.cat-card .cat-bar-stats { position: relative; }
.cat-card-desc { position: relative; max-width: 460px; font-size: 15px; line-height: 1.65; color: var(--text-2); }
.cat-card-open { position: relative; margin-top: auto; display: inline-flex; align-items: center; gap: 6px; padding-top: 6px; font-size: 14px; font-weight: 700; color: var(--text-2); }
.cat-card-open .icon { width: 15px; height: 15px; transition: transform 0.2s; }
.cat-card:hover .cat-card-open { color: var(--text); }
.cat-card:hover .cat-card-open .icon { transform: translateX(4px); }
/* Study > All: topic cards reuse the category card look in each topic's color */
.topic-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cat-card.topic-card { --cat-accent: var(--accent); min-height: 260px; padding: 24px 24px 22px; }
.topic-card .cat-card-name { font-size: 24px; }
.topic-card .cat-card-count b { font-size: 34px; }
.topic-card-courses { position: relative; display: flex; flex-direction: column; gap: 8px; }
.topic-card-courses > span { display: flex; flex-direction: column; gap: 1px; padding-left: 12px; border-left: 2px solid color-mix(in srgb, var(--cat-accent) 55%, transparent); }
.topic-card-courses b { font-size: 14.5px; line-height: 1.35; color: var(--text); }
.topic-card-courses small { font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.topic-card-courses .is-empty { border-left-style: dashed; }
@media (max-width: 1000px) { .topic-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .cat-cards { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Gallery list: blog-style entries ---------- */
.gallery-list { display: flex; flex-direction: column; gap: 16px; }
.gallery-row {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  min-height: 200px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.gallery-row:hover { text-decoration: none; transform: translateY(-2px); border-color: color-mix(in srgb, var(--yellow) 60%, transparent); box-shadow: 0 14px 30px -22px rgba(0, 0, 0, 0.6); }
.gallery-row-cover { background: var(--surface-2) center / cover no-repeat; transition: transform 0.4s; }
.gallery-row:hover .gallery-row-cover { transform: scale(1.03); }
.gallery-row-body { display: flex; flex-direction: column; gap: 8px; padding: 22px 26px; min-width: 0; border-left: 4px solid var(--yellow); }
.gallery-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--muted); }
.gallery-row-topic { padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--yellow) 22%, transparent); font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--text); }
.gallery-row-title { font-size: 24px; line-height: 1.25; }
.gallery-row-desc { font-size: 15px; line-height: 1.6; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.gallery-row-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); }
.gallery-row-read { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--text-2); }
.gallery-row-read .icon { width: 14px; height: 14px; transition: transform 0.15s; }
.gallery-row:hover .gallery-row-read { color: var(--text); }
.gallery-row:hover .gallery-row-read .icon { transform: translateX(3px); }
@media (max-width: 700px) {
  .gallery-row { grid-template-columns: minmax(0, 1fr); }
  .gallery-row-cover { aspect-ratio: 16 / 9; }
  .gallery-row-body { border-left: 0; border-top: 4px solid var(--yellow); }
}

/* ---------- Circuit and driver pages ---------- */
.post-topic { font-family: "JetBrains Mono", monospace; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: 2px 8px; border-radius: 4px; border: 1px solid var(--line-strong); color: var(--text-2); }
a.post-cat:hover { text-decoration: none; opacity: 0.9; }
.race-strip a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.f1-page { max-width: 860px; }
.circuit-hero { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; align-items: center; margin-bottom: 8px; }
.track-map { margin: 0; padding: 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.track-map svg { display: block; width: 100%; height: auto; }
.track-map path { fill: none; stroke: var(--red); stroke-width: 6; stroke-linejoin: round; stroke-linecap: round; }
.track-map figcaption { margin-top: 6px; font-size: 12px; color: var(--muted); text-align: center; }
.stat-cards { display: grid; gap: 10px; }
.stat-cards-row { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 8px; }
.stat-card { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.stat-card b { font-size: 24px; line-height: 1.25; color: var(--text); }
.stat-card small { font-size: 13px; color: var(--text-2); line-height: 1.4; }
.stat-card .f1-label { color: var(--muted); }
.team-history { list-style: none; padding: 0 !important; margin: 0; }
.team-history li { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.team-history time { font-family: "JetBrains Mono", monospace; font-size: 14px; color: var(--muted); }
.team-history span { font-weight: 600; color: var(--text); }
.team-history li::marker { content: none; }
.driver-header { position: relative; }
.driver-number { position: absolute; right: 6%; bottom: -40px; font-size: 220px; font-weight: 900; font-style: italic; line-height: 1; color: var(--team); opacity: 0.2; pointer-events: none; }

@media (max-width: 900px) {
  .sq-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .circuit-hero,
  .stat-cards-row { grid-template-columns: 1fr; }
}
.track-map svg { max-height: 420px; }
.sq-circuit .sq-track { max-height: 55%; }

/* ---------- World maps (Gallery, Circuits) ---------- */
.map-block { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 14px; margin-bottom: 24px; }
.world-map { position: relative; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; min-height: 200px; }
.world-map-svg { display: block; width: 100%; height: auto; cursor: grab; }
.world-map-svg:active { cursor: grabbing; }
.world-map.is-failed::after { content: "Map could not load."; position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 14px; }
.map-sphere { fill: var(--bg-2); }
.map-country { fill: var(--surface-2); stroke: var(--bg); stroke-width: 0.6; cursor: pointer; transition: fill 0.15s; }
.map-country:hover { fill: var(--line-strong); }
.map-country.is-on { fill: color-mix(in srgb, var(--red) 55%, var(--surface-2)); }
.map-country.is-on:hover { fill: var(--red); }
.map-country.is-selected { fill: var(--red); stroke: var(--yellow); }
.map-tiny-country { fill: color-mix(in srgb, var(--red) 55%, transparent); stroke: var(--red); stroke-width: 1.2; cursor: pointer; }
.map-tiny-country:hover, .map-tiny-country.is-selected { fill: var(--red); }
.map-marker { fill: var(--yellow); stroke: var(--bg); stroke-width: 1.5; cursor: pointer; }
.map-reset { position: absolute; right: 10px; top: 10px; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-2); font: 600 12px/1.4 "Titillium Web", sans-serif; cursor: pointer; }
.map-reset:hover { color: var(--text); border-color: var(--red); }
.map-panel { padding: 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); max-height: 480px; overflow-y: auto; }
.map-kicker { margin: 0 0 6px; font-family: "JetBrains Mono", monospace; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.map-big { margin: 0 0 8px; font-size: 26px; font-weight: 700; }
.map-hint { margin: 0; font-size: 14px; color: var(--text-2); }
.map-list { list-style: none; margin: 0; padding: 0; }
.map-list a { display: flex; flex-direction: column; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--text); }
.map-list span { font-size: 13px; color: var(--muted); }
.map-circuit { display: flex; flex-direction: column; gap: 2px; padding: 12px; margin-bottom: 10px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); color: var(--text); }
.map-circuit:hover { text-decoration: none; border-color: var(--red); }
.map-circuit span { font-size: 13px; color: var(--text-2); }
.map-track { width: 100%; height: 90px; margin-bottom: 6px; }
.map-track path { fill: none; stroke: var(--red); stroke-width: 6; stroke-linejoin: round; }

@media (max-width: 900px) {
  .map-block { grid-template-columns: 1fr; }
}

/* ---------- Blog: category bars, seasons, map panels ---------- */
.cat-bars { display: grid; gap: 18px; margin-bottom: 36px; }
.cat-bar {
  --cat-accent: var(--blue);
  position: relative;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(120deg, color-mix(in srgb, var(--cat-accent) 7%, var(--surface)) 0%, var(--surface) 40%);
  box-shadow: 0 1px 2px rgba(11, 20, 48, 0.04);
  overflow: hidden;
}
.cat-bar::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--cat-accent); }
.cat-bar-paper-review { --cat-accent: var(--purple); }
.cat-bar-gallery { --cat-accent: var(--yellow); }
.cat-bar-race { --cat-accent: var(--red); }
.topic-bars .cat-bar[class*="topic-"] { --cat-accent: var(--accent); }
.cat-bar-head {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  padding: 24px 28px 20px 32px;
  border: 0;
  background: none;
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.cat-bar-title { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cat-bar-head:has(.cat-bar-icon) { grid-template-columns: 56px minmax(0, 1fr) auto auto; gap: 20px; }
.cat-bar-icon {
  align-self: start;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--cat-accent) 22%, var(--surface)), color-mix(in srgb, var(--cat-accent) 8%, var(--surface)));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cat-accent) 30%, transparent);
  color: var(--cat-accent);
}
.cat-bar-gallery .cat-bar-icon { color: var(--yellow-ink); }
.cat-bar-icon .icon { width: 28px; height: 28px; }
.cat-bar-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-bar-stats span { padding: 1px 9px; border-radius: 999px; background: color-mix(in srgb, var(--cat-accent) 12%, transparent); font-family: "JetBrains Mono", monospace; font-size: 11px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--text-2); }
.cat-bar-name { font-size: 24px; font-weight: 700; letter-spacing: 0.2px; line-height: 1.2; }
.cat-bar-desc { max-width: 640px; font-size: 15px; line-height: 1.6; color: var(--text-2); }
.cat-bar-open { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--text-2); white-space: nowrap; transition: border-color 0.15s, color 0.15s; }
.cat-bar-open .icon { width: 14px; height: 14px; transition: transform 0.15s; }
.cat-bar-head:hover .cat-bar-open { border-color: var(--cat-accent); color: var(--text); }
.cat-bar-head:hover .cat-bar-open .icon { transform: translateX(3px); }
.cat-bar-count { padding: 4px 10px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--muted); white-space: nowrap; }
.cat-bar-count b { color: var(--text); }
.cat-bar-posts { display: grid; grid-template-columns: repeat(3, minmax(0, 210px)); gap: 12px; padding: 0 24px 24px 28px; }
.cat-bar-posts .sq-card { background: var(--bg-2); }
.cat-bar-posts .sq-title { font-size: 16px; }
.cat-bar-posts .sq-race .sq-title { font-size: 18px; }
.cat-bar-posts .sq-result { font-size: 28px; }
.cat-bar-empty { margin: 0; padding: 0 24px 20px 28px; font-size: 14px; color: var(--muted); }
.sq-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.season-group { margin-bottom: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.season-group[open] { border-color: var(--line-strong); }
.season-group > summary {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) 14px;
  align-items: center;
  gap: 20px 28px;
  padding: 20px 22px 20px 26px;
  cursor: pointer;
  list-style: none;
  background: linear-gradient(115deg, color-mix(in srgb, var(--red) 10%, var(--surface)) 0%, var(--surface) 50%);
}
.season-group > summary::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--red); }
.season-group > summary::-webkit-details-marker { display: none; }
.season-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.season-title { display: flex; align-items: center; gap: 10px; }
.season-year { font-size: 34px; font-weight: 800; line-height: 1; letter-spacing: -0.5px; }
.season-status { padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line-strong); font-family: "JetBrains Mono", monospace; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.season-status.is-live { border-color: var(--red); color: var(--red); }
.season-strip { display: flex; flex-wrap: wrap; gap: 3px; }
.strip-cell { width: 14px; height: 14px; border-radius: 3px; background: var(--line-strong); }
.strip-cell.is-win { background: var(--yellow); }
.strip-cell.is-podium { background: var(--red); }
.strip-cell.is-points { background: color-mix(in srgb, var(--text-2) 55%, transparent); }
.strip-cell.is-out { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }
.season-tally { font-size: 13px; color: var(--text-2); }
.season-tally b { color: var(--text); }
.season-tally span { color: var(--muted); }
.season-meta { font-size: 14px; color: var(--muted); }
.season-toggle,
.map-group-more .tri {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--muted);
  transition: transform 0.2s, border-top-color 0.2s;
}
.season-toggle { transform: rotate(-90deg); }
.season-group > summary:hover .season-toggle { border-top-color: var(--red); }
.season-group[open] .season-toggle { transform: rotate(0deg); border-top-color: var(--red); }

.race-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; padding: 16px 22px 22px 26px; border-top: 1px solid var(--line); }
.race-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto 50px;
  align-items: center;
  gap: 12px;
  padding: 9px 10px 9px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  color: var(--text);
  transition: background 0.15s, border-color 0.15s;
}
.race-row:hover { text-decoration: none; background: var(--bg-2); border-color: var(--line); }
.race-row-round { font-family: "JetBrains Mono", monospace; font-size: 12px; font-weight: 700; color: var(--muted); }
.race-row-main { display: flex; flex-direction: column; min-width: 0; }
.race-row-main b { font-size: 15px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.race-row-main small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.race-row time { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--muted); white-space: nowrap; }
.race-row-result { justify-self: end; min-width: 46px; padding: 3px 0; border-radius: 6px; background: var(--surface-2); font-family: "JetBrains Mono", monospace; font-size: 13px; font-weight: 700; text-align: center; color: var(--text-2); }
.race-row.is-win .race-row-result { background: var(--yellow); color: #0b1430; }
.race-row.is-podium .race-row-result { background: var(--red); color: #fff; }
.race-row.is-points .race-row-result { color: var(--text); }
.race-row.is-out .race-row-result { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--muted); }

.map-marker.is-dim { fill: var(--muted); }
.map-back { margin-bottom: 10px; padding: 0; border: 0; background: none; color: var(--link); font: 600 13px/1.4 "Titillium Web", sans-serif; cursor: pointer; }
.map-bars { display: grid; gap: 6px; }
.map-bar {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  background: var(--bg-2);
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.map-bar:hover { border-color: var(--line-strong); border-left-color: var(--yellow); }
.map-bar b { font-size: 14px; line-height: 1.35; }
.map-bar span { font-size: 12px; color: var(--muted); }
.map-bar.is-past { border-left-color: var(--muted); }
.map-group { margin-top: 14px; display: grid; gap: 6px; }
.map-group-head { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-2); }
.map-group-head span { margin-left: 4px; color: var(--muted); font-weight: 400; }
.map-group-more { justify-self: start; display: inline-flex; align-items: center; gap: 8px; padding: 2px 0; border: 0; background: none; color: var(--muted); font: 600 12px/1.4 "JetBrains Mono", monospace; cursor: pointer; }
.map-group-more .tri { transform: rotate(-90deg); }
.map-group-more:hover .tri { border-top-color: var(--red); }
.map-group.is-open .map-group-more .tri { transform: rotate(0deg); border-top-color: var(--red); }
.map-circuit.is-past { opacity: 0.85; }
.map-more { color: var(--link) !important; font-weight: 600; }

@media (max-width: 760px) {
  .cat-bar-head { grid-template-columns: auto auto; justify-content: start; padding: 18px 18px 14px 22px; }
  .cat-bar-title { grid-column: 1 / -1; }
  .cat-bar-icon { display: none; }
  .cat-bar-head:has(.cat-bar-icon) { grid-template-columns: auto auto; }
  .cat-bar-subs { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 18px 0 22px; padding: 14px 0 18px; }
  .cat-bar-posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sq-grid-3 { grid-template-columns: 1fr; }
}

/* Season headers: champions and where Max / Red Bull stand */
.season-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; min-width: 0; }
.season-fact { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding: 9px 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); line-height: 1.3; }
.season-fact em { font-style: normal; font-family: "JetBrains Mono", monospace; font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.season-fact b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.season-fact small { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.season-fact.is-max { border-color: color-mix(in srgb, var(--yellow) 55%, var(--line)); }
.season-fact.is-max b { color: var(--yellow-ink); }
.season-fact.is-rb { border-color: color-mix(in srgb, var(--blue) 50%, var(--line)); }
@media (max-width: 900px) {
  .season-group > summary { grid-template-columns: minmax(0, 1fr) 14px; }
  .season-facts { grid-column: 1 / -1; grid-row: 2; }
  .race-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .race-row { grid-template-columns: 34px minmax(0, 1fr) 46px; }
  .race-row time { display: none; }
}


/* Driver profile */
.driver-profile { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; margin-bottom: 8px; }
.driver-photo { margin: 0; }
.driver-photo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; border-radius: 12px; margin: 0; border: 1px solid var(--line); }
.driver-photo figcaption { margin-top: 6px; font-size: 11px; line-height: 1.4; color: var(--muted); }
.driver-photo figcaption a { color: var(--muted); }
.driver-facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.driver-facts div { padding: 10px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.driver-facts dt { font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.driver-facts dd { margin: 2px 0 0; font-weight: 600; color: var(--text); line-height: 1.4; }
.driver-facts small { font-weight: 400; color: var(--text-2); }
.driver-style { font-size: 16px; }
.driver-style footer { margin-top: 10px; font-size: 12px; color: var(--muted); }
.driver-style footer a { color: var(--muted); }
.sq-driver.has-photo { background: #0b1430 var(--photo) center top / cover no-repeat; color: #fff; }
.sq-driver.has-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 13, 31, 0.6) 0%, rgba(7, 13, 31, 0) 28%, rgba(7, 13, 31, 0) 45%, rgba(7, 13, 31, 0.92) 85%); }
.sq-driver.has-photo .sq-top,
.sq-driver.has-photo .sq-title,
.sq-driver.has-photo .sq-bottom { z-index: 1; }
.sq-driver.has-photo .sq-title { margin-top: auto; color: #fff; }
.sq-driver.has-photo .sq-label,
.sq-driver.has-photo .sq-sub,
.sq-driver.has-photo .sq-meta { color: #dfe4f2; }
.sq-driver.has-photo .sq-bottom { margin-top: 4px; }
.sq-driver.has-photo .sq-number { display: none; }
@media (max-width: 760px) {
  .driver-profile { grid-template-columns: 1fr; }
  .driver-photo { max-width: 240px; }
}

/* All tab: sub-section squares inside each category bar */
.cat-bar-subs { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); grid-auto-rows: 1fr; gap: 12px; margin: 0 28px 0 32px; padding: 18px 0 26px; border-top: 1px solid var(--line); }
.sub-tile {
  --tile-accent: var(--cat-accent);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 96px;
  padding: 16px 18px 16px 20px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.sub-tile[class*="topic-"] { --tile-accent: var(--accent); }
.sub-tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--tile-accent); }
.sub-tile::after { content: "92"; position: absolute; right: 16px; bottom: 12px; font-size: 15px; color: var(--tile-accent); opacity: 0; transform: translateX(-4px); transition: opacity 0.15s, transform 0.15s; }
.sub-tile:hover::after { opacity: 1; transform: none; }
.sub-tile:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--tile-accent) 55%, transparent); background: color-mix(in srgb, var(--tile-accent) 6%, var(--surface)); box-shadow: 0 10px 24px -18px var(--tile-accent); }
.sub-tile-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sub-tile-top b { font-size: 17px; line-height: 1.3; letter-spacing: 0.1px; }
.sub-tile-top:has(.sub-tile-num) { align-items: flex-start; }
.sub-tile-num { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; font-size: 26px; font-weight: 800; line-height: 1; letter-spacing: -0.5px; color: var(--tile-accent); font-variant-numeric: tabular-nums; }
.sub-tile-num small { margin-top: 3px; font-family: "JetBrains Mono", monospace; font-size: 9.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.sub-tile[class*="topic-"] { background: linear-gradient(150deg, color-mix(in srgb, var(--tile-accent) 7%, var(--surface)) 0%, var(--surface) 70%); }
.sub-tile-count { flex-shrink: 0; min-width: 32px; padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--tile-accent) 18%, transparent); font-family: "JetBrains Mono", monospace; font-size: 13px; font-weight: 700; text-align: center; color: var(--text); }
.sub-tile-desc { padding-right: 18px; font-size: 13.5px; line-height: 1.5; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sub-tile-list { display: flex; flex-direction: column; gap: 3px; padding-right: 18px; }
.sub-tile-list span { position: relative; padding-left: 12px; font-size: 13px; line-height: 1.45; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub-tile-list span::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 5px; height: 5px; border-radius: 50%; background: var(--tile-accent); }
/* Paper Review on the All tab: one pill per venue */
.cat-bar-subs:has(.venue-pills) { display: block; grid-auto-rows: auto; }
.venue-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.venue-pill { display: inline-flex; align-items: center; gap: 10px; padding: 9px 10px 9px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; transition: border-color 0.15s, background 0.15s, transform 0.15s; }
.venue-pill b { font-size: 15px; letter-spacing: 0.3px; }
.venue-pill span { min-width: 26px; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--purple) 16%, transparent); font-family: "JetBrains Mono", monospace; font-size: 12px; font-weight: 700; text-align: center; }
.venue-pill:hover { transform: translateY(-1px); border-color: var(--purple); background: color-mix(in srgb, var(--purple) 7%, var(--surface)); }
.sub-tile.is-empty { opacity: 0.5; background: transparent; border-style: dashed; }
.sub-tile.is-empty::before { background: var(--line-strong); }
.cat-bar-subs > .sq-card { aspect-ratio: 1 / 1; }
.cat-bar-subs .cat-bar-empty { grid-column: 1 / -1; padding: 0; }

/* ---------- Schedule ---------- */
.nav-schedule { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; white-space: nowrap; }
.nav-schedule:hover, .nav-schedule.is-active { border-color: var(--red); color: var(--text); text-decoration: none; }
.nav-schedule.is-active { background: var(--red-soft); }
.nav-schedule .icon { width: 17px; height: 17px; }
@media (max-width: 760px) { .nav-schedule { padding: 0 9px; } .nav-schedule span { display: none; } }
.area-nlp { --area: #10b981; }
.area-cv { --area: #3b82f6; }
.area-speech { --area: #f59e0b; }
.area-mlai { --area: #a855f7; }
.area-f1 { --area: var(--red); }
.sched { padding: 32px 0 88px; }
.sched-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.sched-chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--text-2); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.sched-chip small { font-size: 11px; font-weight: 500; color: var(--muted); }
.sched-chip.is-active { border-color: var(--area, var(--red)); background: color-mix(in srgb, var(--area, var(--red)) 18%, var(--surface)); color: var(--text); }
.sched-next { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-bottom: 24px; }
.sched-next:empty { display: none; }
.sched-next-item { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-left: 4px solid var(--area); border-radius: 10px; background: var(--surface); color: var(--text); text-decoration: none; }
.sched-next-item small { font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--area); }
.sched-next-item span { font-size: 13px; color: var(--muted); }
.sched-next-item em { position: absolute; top: 10px; right: 12px; font-family: "JetBrains Mono", monospace; font-size: 13px; font-style: normal; font-weight: 700; color: var(--text); }
.sched-cal { margin-bottom: 40px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.sched-cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sched-cal-head h2 { margin: 0; min-width: 190px; font-size: 22px; text-align: center; }
.sched-nav, .sched-today { padding: 4px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: 16px; cursor: pointer; }
.sched-today { margin-left: auto; font-size: 13px; }
.sched-grid { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--line); }
.sched-dows { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; }
.sched-dows div { padding: 6px; background: var(--bg-2); font-size: 11px; font-weight: 700; text-align: center; color: var(--muted); text-transform: uppercase; }
.sched-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: 26px repeat(var(--rows), 22px) 1fr; row-gap: 2px; min-height: 108px; margin-top: 1px; padding-bottom: 6px; background: var(--surface); }
.sched-day { grid-row: 1 / -1; min-width: 0; padding: 4px; border-left: 1px solid var(--line); }
.sched-day:first-child { border-left: 0; }
.sched-day.is-out { background: var(--bg-2); }
.sched-day.is-out .sched-num { opacity: .4; }
.sched-num { display: inline-block; min-width: 22px; padding: 1px 4px; border-radius: 6px; font-size: 12px; font-weight: 700; color: var(--text-2); text-align: center; }
.sched-day.is-today .sched-num { background: var(--red); color: #fff; }
.sched-bar { position: relative; z-index: 1; display: flex; align-items: center; min-width: 0; margin: 0 3px; padding: 0 6px; border-radius: 5px; background: color-mix(in srgb, var(--area) 22%, var(--surface)); border-left: 3px solid var(--area); color: var(--text); font-size: 11px; line-height: 22px; text-decoration: none; overflow: hidden; }
.sched-bar span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sched-bar small { color: var(--muted); font-size: 10px; }
.sched-bar:hover { text-decoration: none; filter: brightness(1.15); }
.sched-bar.cut-l { margin-left: 0; border-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.sched-bar.cut-r { margin-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.sched-bar.ev-conf { background: color-mix(in srgb, var(--area) 40%, var(--surface)); font-weight: 700; }
.sched-bar.ev-rebuttal { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--area) 22%, var(--surface)) 0 6px, color-mix(in srgb, var(--area) 10%, var(--surface)) 6px 12px); }
.sched-bar.ev-deadline { background: var(--area); color: #fff; font-weight: 700; }
.sched-bar.ev-deadline small { color: rgba(255, 255, 255, .85); }
.sched-bar.ev-notify { background: transparent; border: 1px dashed var(--area); border-left-width: 3px; border-left-style: solid; }
.sched-bar.ev-f1 { font-weight: 700; }
.sched-ev { display: inline-block; padding: 1px 6px; border-left: 3px solid var(--area); border-radius: 4px; background: color-mix(in srgb, var(--area) 16%, transparent); color: var(--text); font-size: 12px; text-decoration: none; }
.sched-ev small { color: var(--muted); font-size: 11px; }
.sched-agenda { display: none; margin: 14px 0 0; padding: 0; list-style: none; }
.sched-agenda li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.sched-agenda li > span { display: flex; flex-wrap: wrap; gap: 4px; }
.sched-agenda .sched-ev { white-space: normal; }
.sched-title { margin: 0 0 14px; font-size: 24px; }
.sched-confs { display: grid; gap: 24px; margin-bottom: 44px; }
.sched-area { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.sched-area h3 { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; color: var(--area); letter-spacing: 1px; }
.sched-area h3::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--area); }
.sched-conf { padding: 14px 16px; border: 1px solid var(--line); border-top: 3px solid var(--area); border-radius: 12px; background: var(--surface); scroll-margin-top: 90px; }
.sched-conf.is-past { opacity: .55; }
.sched-conf header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.sched-conf header b { font-size: 18px; }
.sched-conf header a { font-size: 12px; }
.sched-conf dl { display: grid; gap: 6px; margin: 0; }
.sched-conf dl > div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; font-size: 14px; }
.sched-conf dt { padding-top: 2px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; }
.sched-conf dd { margin: 0; }
.sched-conf dd small { color: var(--muted); }
.sched-conf dd .none { color: var(--muted); font-size: 13px; }
.sched-conf dd small.live { color: var(--green); font-weight: 700; }
.sched-conf dd em { margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: var(--area); color: #fff; font-size: 12px; font-style: normal; font-weight: 700; }
.sched-conf p { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }
.tbd { display: inline-block; padding: 0 6px; border: 1px dashed var(--line-strong); border-radius: 4px; font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--muted); }
.sched-f1 h3 { margin: 0 0 10px; font-size: 16px; color: var(--muted); }
.sched-table-wrap { overflow-x: auto; margin-bottom: 20px; border: 1px solid var(--line); border-radius: 12px; }
.sched-table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 13px; }
.sched-table th { padding: 8px 10px; background: var(--bg-2); color: var(--muted); font-size: 11px; text-align: left; text-transform: uppercase; letter-spacing: .6px; white-space: nowrap; }
.sched-table td { padding: 8px 10px; border-top: 1px solid var(--line); color: var(--text-2); vertical-align: top; white-space: nowrap; }
.sched-table td b { color: var(--text); font-family: "JetBrains Mono", monospace; }
.sched-table td.rd { color: var(--muted); font-family: "JetBrains Mono", monospace; font-weight: 700; }
.sched-table td.gp { min-width: 210px; white-space: normal; }
.sched-table td.gp b { font-family: inherit; }
.sched-table td.gp small { display: block; color: var(--muted); }
.sched-table td.none { color: var(--muted); }
.sched-table tr { scroll-margin-top: 90px; }
.sched-table tr.is-past { opacity: .45; }
.sched-table tr.is-next td { background: var(--red-soft); }
.sched-table tr.is-next td.rd { box-shadow: inset 3px 0 0 var(--red); color: var(--red); }
.sched-table .sprint { padding: 0 6px; border-radius: 4px; background: var(--yellow); color: #111; font-size: 10px; font-weight: 700; }
.sched-note, .sched-empty { color: var(--muted); font-size: 14px; }
@media (max-width: 760px) {
  .sched-week { grid-template-rows: 24px repeat(var(--rows), 5px) 1fr; min-height: 48px; }
  .sched-bar { margin: 0 1px; padding: 0; border-left: 0; border-radius: 3px; background: var(--area); line-height: 5px; }
  .sched-bar span { display: none; }
  .sched-agenda { display: block; }
  .sched-cal { padding: 10px; }
  .sched-cal-head h2 { min-width: 0; font-size: 18px; }
  .sched-chip small { display: none; }
}
