/* besimagargun.com - site styles. Plain CSS, no build step. */

/* ---------- Colours and base ---------- */
:root {
  --bg: #0f172a;            /* page background */
  --fg: #f8fafc;            /* main text */
  --heading: #ffffff;
  --text: #e5e7eb;          /* body copy */
  --text-2: #d1d5db;        /* secondary copy */
  --muted: #9ca3af;         /* meta, dates */
  --card: #1f2937;
  --card-border: #374151;
  --line: rgba(255, 255, 255, 0.08);
  --blue-200: #bedbff;
  --blue-300: #8ec5ff;
  --blue-400: #51a2ff;      /* accent */
  --blue-500: #2b7fff;
  --blue-600: #155dfc;
  --teal-400: #00d5be;
  --teal-600: #009689;
  --green-400: #05df72;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { color: var(--heading); margin: 0; }
p { margin: 0; }
ul { margin: 0; }

.icon { width: 1em; height: 1em; flex: none; fill: currentColor; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

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

/* ---------- Layout ---------- */
.container { width: min(1280px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(768px, 100% - 48px); margin-inline: auto; }
.prose-width { width: min(640px, 100% - 48px); margin-inline: auto; }

.section { padding-block: 48px; }
@media (min-width: 1024px) { .section { padding-block: 64px; } }

.section-title {
  font-size: 30px; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em;
  text-align: center; margin-bottom: 40px;
}
@media (min-width: 1024px) { .section-title { font-size: 36px; } }

.section-lead {
  color: var(--muted); font-size: 18px; line-height: 28px; text-align: center;
  width: min(768px, 100% - 32px); margin: -24px auto 40px;
}
@media (min-width: 640px) { .section-lead { font-size: 20px; } }
.section-lead strong { color: var(--text-2); font-weight: 600; }

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 32px; border-radius: 12px;
  background: linear-gradient(to right, var(--blue-600), var(--teal-600));
  color: #fff; font-size: 18px; line-height: 28px; font-weight: 700; text-decoration: none;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  transition: filter 0.15s, transform 0.15s;
}
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-primary .icon { width: 20px; height: 20px; }

.btn-quiet {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 12px 8px 16px; border-radius: 6px;
  background: var(--card); border: 1px solid #6b7280;
  color: var(--text-2); font-size: 14px; line-height: 20px; font-weight: 500; text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.btn-quiet:hover { background: #374151; color: #fff; }
.btn-quiet .icon { width: 16px; height: 16px; }
.center { text-align: center; }
.more { text-align: center; margin-top: 40px; }

/* ---------- About (profile + research focus) ---------- */
.bio { padding-block: 56px 48px; }
@media (min-width: 1024px) { .bio { padding-block: 80px 64px; } }

.bio-grid { display: grid; gap: 48px; }
@media (min-width: 1024px) { .bio-grid { grid-template-columns: 1fr 2fr; gap: 32px; align-items: start; } }

.profile { display: flex; flex-direction: column; align-items: center; text-align: center; }
.avatar-wrap { position: relative; width: 200px; height: 200px; margin-bottom: 16px; }
.avatar {
  display: block; width: 200px; height: 200px; object-fit: cover;
  border-radius: 50%; border: 4px solid #fff;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
.avatar-badge {
  position: absolute; right: 0; bottom: 0; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); border: 1px solid rgba(81, 162, 255, 0.45); color: var(--blue-400);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.04), 0 2px 6px rgba(0, 0, 0, 0.04);
}
.avatar-badge .icon { width: 22px; height: 22px; }

.profile h1 { font-size: 30px; line-height: 1.25; font-weight: 900; margin-bottom: 12px; }
@media (min-width: 640px) { .profile h1 { font-size: 36px; } }
@media (min-width: 1024px) { .profile h1 { font-size: 48px; } }
.profile .role { font-size: 24px; line-height: 32px; font-weight: 600; color: var(--blue-400); margin-bottom: 12px; }
.profile .affil { font-size: 18px; line-height: 28px; color: var(--text-2); }
.profile .affil a { text-decoration: none; }
.profile .affil a:hover { color: var(--blue-400); }

.social { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 32px; padding: 0; list-style: none; }
.social a {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid var(--card-border); color: var(--muted);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  transition: color 0.15s, border-color 0.15s, transform 0.15s;
}
.social a:hover { color: #fff; border-color: var(--blue-500); transform: translateY(-2px); }
.social .icon { width: 24px; height: 24px; }
@media (max-width: 480px) {
  .social { gap: 10px; flex-wrap: nowrap; }
  .social a { width: 44px; height: 44px; }
}

.bio-block + .bio-block { margin-top: 56px; }
.block-head { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.icon-circle {
  width: 48px; height: 48px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: #15285c; color: var(--blue-400);
}
.icon-circle .icon { width: 24px; height: 24px; }
.block-head h2 { font-size: 24px; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
@media (min-width: 640px) { .block-head h2 { font-size: 28px; } }

.lead-text { font-size: 16px; line-height: 26px; color: var(--text); max-width: 650px; }
@media (min-width: 640px) { .lead-text { font-size: 18px; line-height: 29px; } }
.lead-text + .btn-primary { margin-top: 32px; }

.edu-grid { display: grid; gap: 20px; }
@media (min-width: 640px) { .edu-grid { grid-template-columns: 1fr 1fr; gap: 24px; } }
.edu-card {
  display: flex; gap: 16px; padding: 24px; border-radius: 12px;
  background: linear-gradient(to bottom right, rgba(31, 41, 55, 0.9), rgba(28, 57, 142, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}
.edu-card .icon-circle { background: var(--card); border: 1px solid var(--card-border); }
.edu-card h3 { font-size: 20px; line-height: 28px; font-weight: 700; }
.edu-card .years { font-size: 14px; line-height: 20px; color: var(--muted); margin-top: 6px; }
.edu-card .inst { font-size: 16px; line-height: 24px; color: var(--text-2); margin-top: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 12px; padding: 0; list-style: none; }
.chips li {
  padding: 8px 16px; border-radius: 9999px;
  background: var(--card); border: 1px solid rgba(25, 60, 184, 0.5);
  color: var(--blue-200); font-size: 16px; line-height: 24px; font-weight: 500;
}

/* ---------- Research projects ---------- */
.project-grid { display: grid; gap: 24px; padding: 0; list-style: none; }
@media (min-width: 640px) { .project-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .project-grid { grid-template-columns: repeat(3, 1fr); gap: 40px; } }
.project {
  display: flex; flex-direction: column; overflow: hidden; border-radius: 16px; background: var(--card);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
}
.project:hover { transform: translateY(-3px); }
.project-band {
  position: relative; height: 104px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(to bottom right, var(--blue-400), var(--teal-400));
  color: rgba(255, 255, 255, 0.85);
}
.project-band .icon { width: 48px; height: 48px; }
@media (max-width: 639px) { .project-band { height: 88px; } .project-band .icon { width: 40px; height: 40px; } }
.status {
  position: absolute; top: 16px; right: 16px; padding: 4px 12px; border-radius: 9999px;
  background: rgba(17, 24, 39, 0.9); font-size: 12px; line-height: 16px; font-weight: 600;
}
.status-active { color: var(--green-400); }
.status-planning { color: var(--blue-400); }
.status-published { color: var(--blue-200); }
.project-body { padding: 24px; display: flex; flex-direction: column; gap: 16px; flex: 1; }
.project h3 { font-size: 20px; line-height: 28px; font-weight: 700; }
.project-link {
  margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px; border-radius: 8px; background: rgba(43, 127, 255, 0.12);
  color: var(--blue-400); font-size: 14px; line-height: 20px; font-weight: 500; text-decoration: none;
}
.project-link:hover { background: rgba(43, 127, 255, 0.22); }
.project-link .icon { width: 16px; height: 16px; }

/* ---------- Timeline (experience, education) ---------- */
.timeline-wrap { width: min(832px, 100% - 32px); margin-inline: auto; }
.timeline { position: relative; list-style: none; margin: 0; padding: 0; display: grid; gap: 32px; }
.timeline::before {
  content: ""; position: absolute; left: 15px; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(var(--blue-500), var(--blue-400) 50%, rgba(21, 93, 252, 0.5));
}
.timeline.teal::before { background: linear-gradient(var(--teal-600), var(--teal-400) 50%, rgba(0, 150, 137, 0.5)); }
.timeline > li { position: relative; padding-left: 48px; }
@media (min-width: 640px) { .timeline > li { padding-left: 64px; } }
.timeline-dot {
  position: absolute; left: 0; top: 24px; width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #1a3263; border: 1px solid rgba(81, 162, 255, 0.5); color: var(--blue-300);
}
.timeline.teal .timeline-dot { background: #0b3a3a; border-color: rgba(0, 213, 190, 0.5); color: var(--teal-400); }
.timeline-dot .icon { width: 16px; height: 16px; }
.t-card {
  padding: 24px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(255, 255, 255, 0.06);
}
.t-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; }
.t-card h3 { font-size: 20px; line-height: 28px; font-weight: 700; }
.t-date { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; line-height: 20px; color: var(--muted); padding-top: 4px; }
.t-date .icon { width: 16px; height: 16px; }
.t-date .now { color: var(--blue-400); }
.t-org { display: inline-block; margin-top: 4px; font-size: 16px; line-height: 24px; font-weight: 500; color: var(--blue-400); text-decoration: none; }
.timeline.teal .t-org { color: var(--teal-400); }
a.t-org:hover { text-decoration: underline; }
.t-card p.t-text { margin-top: 12px; font-size: 16px; line-height: 26px; color: var(--muted); }

/* ---------- Academic service ---------- */
.service-list { padding-left: 24px; font-size: 16px; line-height: 28px; color: #cad5e2; }
@media (min-width: 640px) { .service-list { font-size: 18px; line-height: 32px; } }
.service-list li { padding-left: 6px; margin-block: 14px; }
.service-list li::marker { color: #6b7280; }
.service-list strong { color: #fff; font-weight: 600; }

/* ---------- Publications ---------- */
.pub-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; }
.pub { font-size: 16px; line-height: 24px; color: var(--fg); }
.pub .authors .me { font-weight: 700; color: #fff; }
.pub .title { color: #fff; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.4); text-underline-offset: 3px; }
.pub .title:hover { text-decoration-color: var(--blue-400); color: var(--blue-200); }
.pub .journal { font-style: italic; }
.pub-links { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 6px; }
.pub-links a, .pub-links button {
  display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--blue-400); font: inherit; font-size: 12px; line-height: 16px; font-weight: 600;
  letter-spacing: 0.02em; text-transform: uppercase; text-decoration: none;
}
.pub-links a:hover, .pub-links button:hover { color: var(--blue-200); }
.pub-links .icon { width: 14px; height: 14px; }
.year-head {
  font-size: 20px; font-weight: 700; color: #fff; margin: 40px 0 16px;
  padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.year-head:first-of-type { margin-top: 0; }

/* ---------- Talks ---------- */
.talk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 40px; }
.talk { display: grid; gap: 8px; }
@media (min-width: 768px) { .talk { grid-template-columns: 176px 1fr; gap: 16px; } }
.talk time { font-size: 14px; line-height: 20px; color: #71717b; padding-top: 2px; }
.talk h3 { font-size: 16px; line-height: 24px; font-weight: 600; letter-spacing: -0.01em; }
.talk h3 a { color: #f4f4f5; text-decoration: none; }
.talk h3 a:hover { color: var(--blue-300); }
.talk .where { font-size: 14px; line-height: 20px; color: var(--muted); margin-top: 2px; }
.talk .summary { font-size: 14px; line-height: 22px; color: #9f9fa9; margin-top: 8px; }
.read-more { display: inline-flex; align-items: center; gap: 2px; margin-top: 12px; font-size: 14px; font-weight: 500; color: var(--blue-500); text-decoration: none; }
.read-more:hover { color: var(--blue-300); }
.read-more .icon { width: 14px; height: 14px; }

/* ---------- Awards ---------- */
.award-list { list-style: none; margin: 0 auto; padding: 0; display: grid; gap: 24px; width: min(640px, 100% - 32px); }
.award {
  padding: 24px; border-radius: 10px; background: var(--card); border: 1px solid var(--card-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
}
.award h3 { display: flex; align-items: flex-start; gap: 12px; font-size: 22px; line-height: 30px; font-weight: 600; letter-spacing: -0.01em; }
.award h3 .icon { width: 24px; height: 24px; margin-top: 3px; color: #fbbf24; }
.award .meta { font-size: 14px; line-height: 20px; color: var(--text-2); margin-top: 8px; }
.award p.desc { font-size: 16px; line-height: 28px; color: var(--muted); margin-top: 12px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 24px; width: min(1216px, 100% - 32px); margin-inline: auto; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1fr; gap: 48px; } }
.c-card { padding: 32px; border-radius: 16px; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08); }
.c-head { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.c-head .icon-circle { background: rgba(43, 127, 255, 0.1); border: 1px solid rgba(43, 127, 255, 0.2); }
.c-head h3 { font-size: 24px; line-height: 32px; font-weight: 700; }
.c-card address { font-style: normal; font-size: 16px; line-height: 24px; color: var(--text-2); }
.btn-soft {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 28px;
  padding: 8px 16px; border-radius: 8px; background: rgba(43, 127, 255, 0.1); border: 1px solid rgba(43, 127, 255, 0.2);
  color: var(--blue-400); text-decoration: none; font-size: 16px; line-height: 24px;
}
.btn-soft:hover { background: rgba(43, 127, 255, 0.18); }
.btn-soft .icon { width: 20px; height: 20px; }
.c-row { display: flex; align-items: center; gap: 16px; text-decoration: none; padding: 12px; margin: -12px; border-radius: 10px; }
.c-row:hover { background: rgba(255, 255, 255, 0.05); }
.c-row .icon-circle { width: 40px; height: 40px; background: rgba(43, 127, 255, 0.1); border: 1px solid rgba(43, 127, 255, 0.2); }
.c-row .icon-circle .icon { width: 20px; height: 20px; }
.c-label { display: block; font-size: 14px; line-height: 20px; color: var(--muted); }
.c-value { display: block; font-size: 16px; line-height: 24px; color: #fff; word-break: break-word; }
.c-divider { border: 0; border-top: 1px solid rgba(255, 255, 255, 0.1); margin: 28px 0 24px; }
.c-find { font-size: 16px; font-weight: 600; color: #fff; margin-bottom: 16px; }
.c-social { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; margin: 0; padding: 0; }
.c-social a {
  width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); color: var(--muted);
  transition: color 0.15s, background 0.15s;
}
.c-social a:hover { color: #fff; background: rgba(43, 127, 255, 0.2); }
.c-social .icon { width: 20px; height: 20px; }
@media (max-width: 480px) {
  .c-card { padding: 24px; }
  .c-social { gap: 8px; flex-wrap: nowrap; }
  .c-social a { width: 42px; height: 42px; }
}

/* ---------- Footer ---------- */
.site-footer { text-align: center; font-size: 12px; line-height: 24px; color: #cbd5e1; padding: 40px 16px 24px; }

/* ---------- Sub-pages ---------- */
.kicker { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; font-size: 13px; line-height: 20px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.kicker a { color: var(--blue-400); text-decoration: none; }
.kicker a:hover { text-decoration: underline; }
.home-link {
  position: fixed; top: 16px; left: 16px; z-index: 50;
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 9999px;
  font-size: 14px; font-weight: 600; color: #e5e7eb; text-decoration: none;
  background: rgba(30, 41, 59, 0.85); border: 1px solid rgba(148, 163, 184, 0.25);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.home-link:hover { background: rgba(51, 65, 85, 0.95); color: #fff; }
.home-link .icon { width: 14px; height: 14px; }

.page-head { padding: 88px 0 8px; text-align: center; }
.page-head h1 { font-size: 36px; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
@media (min-width: 768px) { .page-head h1 { font-size: 48px; } }
.page-head p { color: var(--muted); font-size: 18px; line-height: 28px; margin-top: 16px; }
.page-head p a:not(.btn-primary) { color: var(--blue-400); text-decoration: none; }
.page-head p a:not(.btn-primary):hover { text-decoration: underline; }
.page-head .btn-primary { margin-top: 8px; }
.page-body { padding: 40px 0 16px; }

.article { width: min(720px, 100% - 32px); margin-inline: auto; padding: 88px 0 16px; }
.article h1 { font-size: 30px; line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; }
@media (min-width: 768px) { .article h1 { font-size: 36px; } }
.article .byline { margin-top: 20px; font-size: 15px; line-height: 24px; color: var(--text-2); }
.article .byline .me { color: #fff; font-weight: 700; }
.article .venue { margin-top: 8px; font-size: 15px; line-height: 22px; color: var(--muted); }
.article .venue em { color: var(--text-2); }
.article .pub-links { margin-top: 16px; gap: 20px; }
.article .pub-links a, .article .pub-links button { font-size: 13px; }
.article .pub-links .icon { width: 16px; height: 16px; }
.article h2 { font-size: 22px; line-height: 28px; font-weight: 700; margin: 40px 0 12px; }
.article .abstract p { font-size: 16px; line-height: 28px; color: var(--text); margin-bottom: 14px; }
.article .abstract ul { color: var(--text); line-height: 28px; padding-left: 22px; margin-bottom: 14px; }
.article .abstract li { margin-block: 6px; }
.article .abstract strong { color: #fff; }

.details { display: grid; grid-template-columns: 120px 1fr; gap: 10px 16px; margin: 0; font-size: 15px; line-height: 24px; }
@media (min-width: 640px) { .details { grid-template-columns: 160px 1fr; } }
.details dt { color: var(--muted); font-weight: 600; }
.details dd { margin: 0; color: var(--text); word-break: break-word; }
.details a { color: var(--blue-400); text-decoration: none; }
.details a:hover { text-decoration: underline; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 32px 0 0; }
.tags li { padding: 4px 12px; border-radius: 6px; background: rgba(43, 127, 255, 0.14); color: var(--blue-200); font-size: 13px; line-height: 20px; }

.share { display: flex; align-items: center; gap: 10px; margin-top: 32px; list-style: none; padding: 0; }
.share .label { font-size: 14px; color: var(--muted); margin-right: 4px; }
.share a {
  width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.06); color: var(--text-2); transition: background 0.15s, color 0.15s;
}
.share a:hover { background: rgba(43, 127, 255, 0.25); color: #fff; }
.share .icon { width: 18px; height: 18px; }

.author-card {
  display: flex; gap: 20px; align-items: flex-start; margin-top: 48px; padding: 24px;
  border-radius: 14px; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.07);
}
.author-card picture { flex: none; display: block; }
.author-card img { display: block; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
@media (min-width: 640px) { .author-card img { width: 96px; height: 96px; } }
.author-card .name { font-size: 18px; font-weight: 700; color: #fff; text-decoration: none; }
.author-card .name:hover { color: var(--blue-300); }
.author-card .role { font-size: 14px; font-weight: 600; color: var(--blue-400); margin-top: 2px; }
.author-card p { font-size: 14px; line-height: 22px; color: var(--muted); margin-top: 8px; }

.pager { display: grid; gap: 16px; margin-top: 48px; padding-top: 32px; border-top: 1px dotted rgba(255, 255, 255, 0.25); }
@media (min-width: 640px) { .pager { grid-template-columns: 1fr 1fr; gap: 32px; } }
.pager a { text-decoration: none; display: block; }
.pager .dir { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.pager .t { display: block; margin-top: 6px; font-size: 16px; line-height: 24px; color: #fff; }
.pager a:hover .t { color: var(--blue-300); }
.pager .next { text-align: right; }

/* ---------- Cite dialog ---------- */
.cite-dialog {
  width: min(720px, 100% - 32px); max-height: 80vh; padding: 0; border-radius: 14px;
  background: #111827; color: var(--fg); border: 1px solid var(--card-border);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}
.cite-dialog::backdrop { background: rgba(2, 6, 23, 0.7); }
.cite-dialog header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.cite-dialog h2 { font-size: 16px; font-weight: 700; }
.cite-dialog pre {
  margin: 0; padding: 20px; max-height: 50vh; overflow: auto; white-space: pre-wrap; word-break: break-word;
  font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; color: var(--text);
}
.cite-dialog footer { display: flex; justify-content: flex-end; gap: 12px; padding: 16px 20px; border-top: 1px solid var(--line); }
.cite-dialog button, .cite-dialog a.dl {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; border: 1px solid var(--card-border);
  background: var(--card); color: var(--text);
}
.cite-dialog button.primary { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }
.cite-dialog .close { border: 0; background: none; padding: 4px; color: var(--muted); }
.cite-dialog .icon { width: 16px; height: 16px; }

/* ---------- Not found ---------- */
.notfound { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 16px; padding: 32px 16px; }
.notfound h1 { font-size: 40px; font-weight: 800; }
.notfound p { color: var(--muted); font-size: 18px; }

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

@media print {
  body { background: #fff; color: #000; }
  .home-link, .share, .social, .c-social, .btn-primary, .pager { display: none !important; }
}
