/* ==========================================================================
   Serkan Çankaya — personal academic site
   ========================================================================== */

:root {
  --bg: #f7f4ee;
  --surface: #fffdf9;
  --surface-2: #efe9de;
  --ink: #16191f;
  --ink-2: #3b404c;
  --muted: #6a6f7a;
  --line: #e3dccf;
  --accent: #b4462b;
  --accent-2: #8f3620;
  --accent-soft: #f4e2d8;
  --on-accent: #fff;
  --teal: #1d6b64;
  --teal-soft: #dcecea;
  --gold: #a87a1b;
  --gold-soft: #f3ead2;
  --violet: #5b4b9a;
  --violet-soft: #e6e2f3;
  --net: 180, 70, 43;

  --c-articles: #b4462b;
  --c-edited: #1d6b64;
  --c-chapters: #c9973a;
  --c-proceedings: #9aa0ab;

  --font-serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(22, 25, 31, .04), 0 8px 24px -12px rgba(22, 25, 31, .12);
  --shadow-lg: 0 2px 4px rgba(22, 25, 31, .05), 0 24px 48px -20px rgba(22, 25, 31, .25);
  --header-h: 72px;
  --wrap: 1160px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11141a; --surface: #181c24; --surface-2: #1e232d; --ink: #ece8e1; --ink-2: #c6c2ba; --muted: #8e94a1;
    --line: #2a303b; --accent: #e8845f; --accent-2: #f19f80; --accent-soft: #3a2621; --on-accent: #1a0f0b;
    --teal: #63bdb2; --teal-soft: #1a302e; --gold: #e0b45a; --gold-soft: #332a17; --violet: #a699e0; --violet-soft: #28243b;
    --net: 232, 132, 95;
    --c-articles: #e8845f; --c-edited: #63bdb2; --c-chapters: #e0b45a; --c-proceedings: #6b7280;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .5);
    --shadow-lg: 0 24px 48px -20px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #11141a; --surface: #181c24; --surface-2: #1e232d; --ink: #ece8e1; --ink-2: #c6c2ba; --muted: #8e94a1;
  --line: #2a303b; --accent: #e8845f; --accent-2: #f19f80; --accent-soft: #3a2621; --on-accent: #1a0f0b;
  --teal: #63bdb2; --teal-soft: #1a302e; --gold: #e0b45a; --gold-soft: #332a17; --violet: #a699e0; --violet-soft: #28243b;
  --net: 232, 132, 95;
  --c-articles: #e8845f; --c-edited: #63bdb2; --c-chapters: #e0b45a; --c-proceedings: #6b7280;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .5);
  --shadow-lg: 0 24px 48px -20px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-sans);
  font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
h1, h2, h3 { font-family: var(--font-serif); font-weight: 500; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; font-variation-settings: "opsz" 72; }
p { margin: 0 0 1em; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.ic { width: 1.1em; height: 1.1em; flex: none; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 8px; }
::selection { background: var(--accent); color: var(--on-accent); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s, background .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.brand:hover { color: inherit; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--ink); color: var(--bg); font-family: var(--font-serif); font-size: 15px; font-weight: 600; letter-spacing: .02em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-name { font-family: var(--font-serif); font-size: 18px; font-weight: 500; white-space: nowrap; }
.brand-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { margin-left: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.nav a {
  display: block; padding: 8px 12px; border-radius: 999px; font-size: 14.5px; font-weight: 500; color: var(--ink-2);
  text-decoration: none; transition: background .2s, color .2s;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
.header-tools { display: flex; align-items: center; gap: 6px; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang a { font-size: 12px; font-weight: 600; letter-spacing: .04em; padding: 4px 9px; border-radius: 999px; text-decoration: none; color: var(--muted); }
.lang a[aria-current="true"] { background: var(--ink); color: var(--bg); }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 0; background: transparent; cursor: pointer; color: var(--ink-2);
  transition: background .2s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn .ic { width: 20px; height: 20px; }
.theme-toggle .i-moon, [data-theme="dark"] .theme-toggle .i-sun { display: none; }
[data-theme="dark"] .theme-toggle .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: block; }
}
.menu-toggle { display: none; }
.menu-toggle .i-close { display: none; }

@media (max-width: 1020px) {
  .brand-sub { display: none; }
  .menu-toggle { display: grid; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; margin: 0; background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 12px 16px 24px; transform: translateY(-8px); opacity: 0; visibility: hidden; transition: .25s ease;
    box-shadow: var(--shadow-lg);
  }
  .nav ul { flex-direction: column; gap: 2px; }
  .nav a { font-size: 18px; padding: 12px 14px; border-radius: 10px; font-family: var(--font-serif); }
  body.nav-open .nav { transform: none; opacity: 1; visibility: visible; }
  body.nav-open .menu-toggle .i-open { display: none; }
  body.nav-open .menu-toggle .i-close { display: block; }
  .header-tools { margin-left: auto; }
}
@media (max-width: 420px) { .brand-name { font-size: 16px; } .lang a { padding: 4px 7px; } }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; font-weight: 500; font-size: 15px;
  text-decoration: none; border: 1px solid transparent; transition: transform .2s, background .2s, border-color .2s, color .2s; cursor: pointer;
}
.btn .ic { width: 18px; height: 18px; }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent); color: var(--on-accent); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); background: var(--surface); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; text-decoration: none; color: var(--accent); }
.text-link .ic { transition: transform .2s; }
.text-link:hover .ic { transform: translateX(3px); }
.link-ic { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.chip-link {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); text-decoration: none; font-size: 14px; font-weight: 500;
}
.chip-link .ic { width: 14px; height: 14px; opacity: .6; }
.chip-link:hover { border-color: var(--accent); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(48px, 9vw, 110px) 0 clamp(48px, 7vw, 90px); overflow: hidden; }
.hero-net { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .9; pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 75% 45%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 80% at 75% 45%, #000 20%, transparent 75%); }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.25fr .75fr; gap: 56px; align-items: center; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 20px; }
.hero-name { font-size: clamp(3rem, 9vw, 6.6rem); font-weight: 400; line-height: .95; letter-spacing: -.035em; margin-bottom: 24px; font-variation-settings: "opsz" 144; }
.hero-name span { font-style: italic; color: var(--accent); }
.hero-role { font-family: var(--font-serif); font-size: clamp(1.15rem, 2.2vw, 1.45rem); color: var(--ink-2); margin-bottom: 14px; }
.hero-tag { font-size: 1.05rem; color: var(--muted); max-width: 34em; margin-bottom: 32px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-portrait { position: relative; justify-self: end; width: 100%; max-width: 360px; }
.portrait {
  aspect-ratio: 9 / 11; border-radius: 200px 200px var(--radius) var(--radius); overflow: hidden; position: relative;
  background: linear-gradient(160deg, var(--accent-soft), var(--surface-2) 60%, var(--teal-soft));
  box-shadow: var(--shadow-lg); border: 1px solid var(--line);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait-mono {
  position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-serif); font-size: clamp(5rem, 12vw, 8.5rem);
  font-style: italic; color: var(--accent); opacity: .9; letter-spacing: -.04em;
}
.portrait-card {
  position: absolute; left: -32px; bottom: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
}
.pc-num { font-family: var(--font-serif); font-size: 1.9rem; line-height: 1; }
.pc-lbl { font-size: 12px; color: var(--muted); margin-top: 4px; }
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-portrait { justify-self: start; max-width: 260px; margin-left: 24px; }
  .portrait-card { left: auto; right: -24px; }
}

/* ---------- Metrics ---------- */
.metrics { border-block: 1px solid var(--line); background: var(--surface); }
.metrics-grid { display: grid; grid-template-columns: repeat(6, 1fr); }
.metric { padding: 28px 16px; text-decoration: none; display: flex; flex-direction: column; gap: 4px; border-left: 1px solid var(--line); transition: background .2s; }
.metric:first-child { border-left: 0; }
.metric:hover { background: var(--surface-2); color: inherit; }
.metric-num { font-family: var(--font-serif); font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1; font-variant-numeric: tabular-nums; }
.metric-lbl { font-size: 13px; color: var(--muted); }
@media (max-width: 820px) {
  .metrics-grid { grid-template-columns: repeat(3, 1fr); }
  .metric:nth-child(4) { border-left: 0; }
  .metric:nth-child(n+4) { border-top: 1px solid var(--line); }
}
@media (max-width: 480px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .metric { border-left: 0; border-top: 1px solid var(--line); }
  .metric:nth-child(-n+2) { border-top: 0; }
  .metric:nth-child(even) { border-left: 1px solid var(--line); }
}

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-alt { background: var(--surface-2); }
.section-head { margin-bottom: 40px; }
.section-head h2 { font-size: clamp(2rem, 4.4vw, 3rem); margin: 0; }
.section-head-row { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.kicker { font-family: var(--font-serif); font-style: italic; color: var(--accent); margin: 0 0 6px; font-size: 1.1rem; }
.about-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 48px; }
.about-body p { font-size: 1.125rem; color: var(--ink-2); }
.about-body p:first-child::first-letter {
  font-family: var(--font-serif); float: left; font-size: 3.6em; line-height: .85; padding: 6px 10px 0 0; color: var(--accent);
}
@media (max-width: 820px) { .about-grid { grid-template-columns: 1fr; gap: 0; } }

.interest-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.interest { background: var(--surface); padding: 28px; transition: background .25s; }
.interest:hover { background: var(--bg); }
.interest-n { font-family: var(--font-serif); font-style: italic; color: var(--accent); font-size: 1rem; }
.interest h3 { font-size: 1.35rem; margin: 0 0 8px; }
.interest p { color: var(--muted); font-size: .95rem; margin: 0; }
@media (max-width: 900px) { .interest-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .interest-grid { grid-template-columns: 1fr; } }

/* ---------- Books shelf ---------- */
.shelf { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 24px; }
.book-cover {
  aspect-ratio: 3 / 4; border-radius: 4px 10px 10px 4px; padding: 20px 18px 18px 26px; display: flex; flex-direction: column; position: relative;
  background: linear-gradient(135deg, hsl(var(--hue) 45% 32%), hsl(calc(var(--hue) + 25) 50% 22%));
  color: #fdf8f0; box-shadow: var(--shadow-lg); transition: transform .35s cubic-bezier(.2, .8, .2, 1); overflow: hidden;
}
.book-cover::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 10px; background: rgba(0, 0, 0, .25); box-shadow: 1px 0 0 rgba(255, 255, 255, .12); }
.book-cover::after { content: ""; position: absolute; right: -30%; bottom: -30%; width: 90%; aspect-ratio: 1; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .15); box-shadow: 0 0 0 22px rgba(255, 255, 255, .04), 0 0 0 44px rgba(255, 255, 255, .03); }
.book:hover .book-cover { transform: translateY(-6px) rotate(-1deg); }
.book-pub { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
.book-title { font-family: var(--font-serif); font-size: 1.12rem; line-height: 1.22; margin-top: 14px; position: relative; z-index: 1; }
.book-year { margin-top: auto; font-family: var(--font-serif); font-style: italic; opacity: .85; position: relative; z-index: 1; }
.book-eds { font-size: 13px; color: var(--muted); margin: 12px 0 0; }
@media (max-width: 900px) { .shelf { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .shelf { grid-template-columns: repeat(2, 1fr); gap: 20px 14px; } .book-title { font-size: .98rem; } .book-cover { padding: 14px 12px 14px 20px; } }

/* ---------- CTA ---------- */
.cta { background: var(--ink); color: var(--bg); }
.cta-inner { text-align: center; max-width: 720px; }
.cta h2 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-style: italic; }
.cta p { color: color-mix(in srgb, var(--bg) 70%, transparent); font-size: 1.1rem; margin-bottom: 28px; }
.cta .btn-primary { background: var(--accent); color: var(--on-accent); }
.cta .btn-primary:hover { background: var(--bg); color: var(--ink); }

/* ---------- Page hero ---------- */
.page-hero { padding: clamp(56px, 8vw, 96px) 0 clamp(32px, 5vw, 56px); border-bottom: 1px solid var(--line); margin-bottom: 40px; }
.page-hero h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); font-weight: 400; letter-spacing: -.03em; font-variation-settings: "opsz" 144; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 44em; }
.hero-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.nf { border: 0; min-height: 50vh; }

/* ---------- Chart ---------- */
.chart-wrap { margin-bottom: 32px; }
.chart-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 20px 12px; }
.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.h-small { font-family: var(--font-sans); font-size: 14px; font-weight: 600; letter-spacing: .02em; margin: 0; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; font-size: 12.5px; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 6px; }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.sw-articles, .seg-articles { background: var(--c-articles); }
.sw-edited, .seg-edited { background: var(--c-edited); }
.sw-chapters, .seg-chapters { background: var(--c-chapters); }
.sw-proceedings, .seg-proceedings { background: var(--c-proceedings); }
.chart { display: flex; align-items: stretch; gap: 3px; height: 150px; }
.bar { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; background: none; border: 0; padding: 0; cursor: pointer; position: relative; }
.bar-stack { display: flex; flex-direction: column; border-radius: 4px 4px 1px 1px; overflow: hidden; gap: 1px; transition: opacity .2s, transform .2s; min-height: 0; transform-origin: bottom; }
.seg { display: block; min-height: 2px; }
.bar-y { font-size: 10.5px; color: var(--muted); height: 18px; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.chart:hover .bar-stack, .chart.has-active .bar-stack { opacity: .45; }
.chart .bar:hover .bar-stack, .chart .bar.active .bar-stack { opacity: 1; }
.bar:hover::after {
  content: attr(title); position: absolute; bottom: calc(100% - 10px); left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg);
  font-size: 11px; padding: 3px 7px; border-radius: 5px; white-space: nowrap; pointer-events: none; z-index: 2;
}
@media (max-width: 560px) { .chart { gap: 2px; height: 120px; } .bar-y { font-size: 9px; } }

/* ---------- Toolbar ---------- */
.toolbar-wrap { position: sticky; top: var(--header-h); z-index: 20; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-block: 1px solid var(--line); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding-block: 12px; }
.search { flex: 1 1 260px; display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0 14px; transition: border-color .2s; }
.search:focus-within { border-color: var(--accent); }
.search .ic { color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 10px 0; font: inherit; font-size: 15px; color: var(--ink); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 13px; font-size: 13.5px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: .2s; color: var(--ink-2); }
.chip:hover { border-color: var(--ink-2); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip-n { font-size: 11.5px; opacity: .6; font-variant-numeric: tabular-nums; }
.selects { display: flex; gap: 6px; }
.selects select {
  appearance: none; -webkit-appearance: none; border: 1px solid var(--line); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
  border-radius: 999px; padding: 7px 32px 7px 13px; font: inherit; font-size: 13.5px; color: var(--ink); cursor: pointer;
}
.result-count { margin: 0 0 0 auto; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  .toolbar-wrap { position: static; }
  .chips { flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; width: calc(100% + 32px); }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .result-count { margin: 0; }
}

/* ---------- Publications ---------- */
.pubs { padding-top: 24px; padding-bottom: 80px; }
.pub-section { margin-top: 40px; }
.pub-h { display: flex; align-items: center; gap: 10px; font-size: clamp(1.6rem, 3vw, 2rem); padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 0; }
.pub-h .ic { color: var(--accent); width: 24px; height: 24px; }
.pub-h-n { font-family: var(--font-sans); font-size: 13px; font-weight: 600; color: var(--muted); background: var(--surface-2); padding: 2px 9px; border-radius: 999px; letter-spacing: 0; }
.pub-list { list-style: none; margin: 0; padding: 0; }
.pub { display: grid; grid-template-columns: 64px 1fr; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.pub[hidden] { display: none; }
.pub-year { font-family: var(--font-serif); font-style: italic; color: var(--muted); font-size: 1.05rem; padding-top: 2px; font-variant-numeric: tabular-nums; }
.pub-title { font-family: var(--font-serif); font-size: 1.2rem; font-weight: 500; line-height: 1.35; margin: 0 0 6px; }
.pub-title a { text-decoration: none; background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .3s, color .2s; }
.pub-title a:hover { background-size: 100% 1px; }
.pub-authors { font-size: .92rem; color: var(--ink-2); margin: 0 0 2px; }
.pub-authors .me { font-weight: 600; color: var(--ink); }
.pub-venue { font-size: .92rem; color: var(--muted); margin: 0 0 10px; }
.pub-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; letter-spacing: .03em; padding: 3px 9px; border-radius: 6px; text-decoration: none; }
.tag .ic { width: 11px; height: 11px; }
.tag-ssci { background: var(--accent-soft); color: var(--accent-2); }
.tag-esci { background: var(--teal-soft); color: var(--teal); }
.tag-scopus { background: var(--gold-soft); color: var(--gold); }
.tag-eric { background: var(--violet-soft); color: var(--violet); }
.tag-trdizin { background: var(--surface-2); color: var(--ink-2); }
.tag-plain { background: var(--surface-2); color: var(--muted); }
.tag-link { border: 1px solid var(--line); color: var(--ink-2); }
.tag-link:hover { border-color: var(--accent); color: var(--accent); }
.cite-btn { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; color: var(--muted); font-size: 12px; padding: 3px 6px; border-radius: 6px; cursor: pointer; opacity: 0; transition: opacity .2s, color .2s, background .2s; }
.cite-btn .ic { width: 13px; height: 13px; }
.pub:hover .cite-btn, .cite-btn:focus-visible, .cite-btn.done { opacity: 1; }
.cite-btn:hover { color: var(--accent); background: var(--surface-2); }
.cite-btn.done { color: var(--teal); }
@media (hover: none) { .cite-btn { opacity: 1; } }
@media (max-width: 560px) {
  .pub { grid-template-columns: 1fr; gap: 4px; }
  .pub-year { font-size: .95rem; }
  .pub-title { font-size: 1.08rem; }
}
.empty { text-align: center; color: var(--muted); padding: 64px 0; font-family: var(--font-serif); font-size: 1.3rem; font-style: italic; }
mark { background: var(--gold-soft); color: inherit; border-radius: 2px; padding: 0 1px; }

/* ---------- Projects ---------- */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 18px; padding-bottom: 96px; }
.project { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; transition: border-color .25s, transform .25s, box-shadow .25s; }
.project:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); transform: translateY(-2px); box-shadow: var(--shadow); }
.project-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.project-years { font-family: var(--font-serif); font-style: italic; color: var(--muted); }
.project-title { font-size: 1.22rem; line-height: 1.3; margin-bottom: 12px; }
.project-role { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); margin: auto 0 0; padding-top: 4px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-proceedings); }
.dot-lead { background: var(--accent); }
.project-abs { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 12px; }
.project-abs summary { cursor: pointer; font-size: 13.5px; font-weight: 500; color: var(--accent); list-style: none; display: inline-flex; align-items: center; gap: 4px; }
.project-abs summary::-webkit-details-marker { display: none; }
.project-abs summary .ic { width: 14px; height: 14px; transition: transform .2s; }
.project-abs[open] summary .ic { transform: rotate(180deg); }
.project-abs p { font-size: 14px; color: var(--ink-2); margin: 10px 0 0; }

/* ---------- Teaching ---------- */
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; padding-bottom: 96px; align-items: start; }
.two-col aside { position: sticky; top: calc(var(--header-h) + 24px); }
.block { margin-bottom: 40px; }
.block-h { display: flex; align-items: center; gap: 10px; font-size: 1.6rem; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.block-h .ic { color: var(--accent); width: 22px; height: 22px; }
.course-list, .thesis-list { list-style: none; margin: 0; padding: 0; }
.course { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.course-name { font-weight: 500; }
.course-terms { font-size: 12.5px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.thesis { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-top: 14px; }
.thesis-year { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.thesis-title { font-family: var(--font-serif); font-size: 1.1rem; line-height: 1.35; margin: 6px 0; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; gap: 0; } .two-col aside { position: static; } }
@media (max-width: 480px) { .course { flex-direction: column; gap: 2px; } .course-terms { text-align: left; } }

/* ---------- CV timeline ---------- */
.cv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; padding-bottom: 72px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.tl-item { display: grid; grid-template-columns: 112px 1fr; gap: 20px; padding: 18px 0; position: relative; border-bottom: 1px solid var(--line); }
.tl-date { font-family: var(--font-serif); font-style: italic; color: var(--accent); font-variant-numeric: tabular-nums; padding-top: 1px; }
.tl-body h3 { font-family: var(--font-sans); font-size: 1rem; font-weight: 600; margin: 0 0 2px; letter-spacing: 0; }
.tl-body p { margin: 0; font-size: .92rem; }
.tl-note { margin-top: 8px !important; font-size: .88rem !important; color: var(--ink-2); font-style: italic; font-family: var(--font-serif); }
.tl-note span { font-style: normal; font-family: var(--font-sans); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
@media (max-width: 860px) { .cv-grid { grid-template-columns: 1fr; gap: 16px; } }
@media (max-width: 480px) { .tl-item { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- Journals ---------- */
.journal-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; padding-bottom: 96px; }
.journal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 4vw, 40px); display: flex; flex-direction: column; align-items: flex-start; position: relative; overflow: hidden; }
.journal-abbr { font-family: var(--font-serif); font-size: clamp(3.5rem, 8vw, 5.5rem); line-height: 1; font-style: italic; color: var(--accent); letter-spacing: -.04em; margin-bottom: 16px; }
.journal h2 { font-size: 1.5rem; }
.journal p { color: var(--ink-2); flex: 1; }
.journal .btn { margin-top: 8px; }
@media (max-width: 760px) { .journal-grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-top: 56px; background: var(--bg); }
.page-index .site-footer { border-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1.2fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer-name { font-family: var(--font-serif); font-size: 1.4rem; margin-bottom: 8px; }
.footer-h { font-family: var(--font-sans); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer-links a, .link-ic { text-decoration: none; }
.footer-bottom { display: flex; justify-content: space-between; padding-block: 20px 28px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.to-top { text-decoration: none; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Motion ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s cubic-bezier(.2, .8, .2, 1), transform .7s cubic-bezier(.2, .8, .2, 1); transition-delay: var(--d, 0s); }
.reveal.in, .no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media print {
  .site-header, .toolbar-wrap, .chart-wrap, .cite-btn, .site-footer, .hero-net, .cta { display: none !important; }
  body { background: #fff; color: #000; }
  .reveal { opacity: 1; transform: none; }
}
