/* ==========================================================================
   corygardner.github.io
   One set of pages, three styles. The <html data-theme> attribute picks one:
   classic (default), dark, editorial. Tokens first, shared layout second,
   then each style's layout differences.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root,
:root[data-theme="classic"] {
  --bg: #FBFAF7;
  --surface: #FFFFFF;
  --surface-2: #F2EFE9;
  --text: #1D1C1A;
  --text-2: #2A2926;
  --muted: #5C5A55;
  --rule: #E6E2DA;
  --rule-strong: #CFC9BE;
  --accent: #1D4E9E;
  --accent-2: #8A4B0F;
  --on-accent: #FFFFFF;
  --link: #1D4E9E;
  --link-hover: #143A78;
  --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 6px;
  --radius-btn: 6px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0E141B;
  --surface: #141C25;
  --surface-2: #172A33;
  --text: #E6EBF0;
  --text-2: #C3CDD7;
  --muted: #9AA8B6;
  --rule: #1F2A36;
  --rule-strong: #2C3E50;
  --accent: #6CC5C0;
  --accent-2: #E0A96D;
  --on-accent: #0B1116;
  --link: #7FD1CC;
  --link-hover: #B5E8E4;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --radius: 14px;
  --radius-btn: 10px;
  color-scheme: dark;
}

:root[data-theme="editorial"] {
  --bg: #F2EFE9;
  --surface: #F7F5F0;
  --surface-2: #E9E4DB;
  --text: #161513;
  --text-2: #2B2824;
  --muted: #5F5A52;
  --rule: #D5CEC2;
  --rule-strong: #161513;
  --accent: #B8430F;
  --accent-2: #B8430F;
  --on-accent: #FFFFFF;
  --link: #161513;
  --link-hover: #8F3209;
  --font-body: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --radius: 4px;
  --radius-btn: 999px;
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3 { margin: 0; line-height: 1.2; }
p { margin: 0; }
a { color: var(--link); text-decoration: none; text-underline-offset: 3px; }
a:hover { color: var(--link-hover); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.icon { display: inline-block; flex: none; vertical-align: middle; }

.skip-link {
  position: absolute; left: -9999px; top: 12px; z-index: 10;
  padding: 10px 16px; background: var(--text); color: var(--bg); border-radius: 6px;
}
.skip-link:focus { left: 16px; }

.site-header__inner,
.site-main,
.site-footer__inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding-left: clamp(16px, 7vw, 96px);
  padding-right: clamp(16px, 7vw, 96px);
}

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 4px 32px; min-height: 72px;
}
.site-name { font-family: var(--font-display); font-size: 23px; font-weight: 500; color: var(--text); }
.site-name:hover { color: var(--text); text-decoration: none; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0 28px; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--muted); font-size: 16px;
}
.site-nav a:hover { color: var(--text); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--accent); font-weight: 600; }

/* ---------- Shared components ---------- */
.button {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border-radius: var(--radius-btn);
  background: var(--accent); color: var(--on-accent);
  font-weight: 600; font-size: 15px;
}
.button:hover { color: var(--on-accent); text-decoration: none; filter: brightness(1.07); }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 24px;
}
.section-head h2,
.project-section h2,
.pub-section h2 {
  font-family: var(--font-display); font-size: 30px; font-weight: 500; letter-spacing: -0.01em;
}
.more { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; white-space: nowrap; }

.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  border: 1px solid var(--rule-strong); color: var(--muted);
  font-size: 13px; line-height: 1.5; font-family: var(--font-body); font-style: normal;
}
.tag--status { color: var(--accent); border-color: var(--accent); }
.tag--done { color: var(--muted); border-color: var(--rule-strong); }
.tag--award { color: var(--accent-2); border-color: var(--accent-2); }

/* ---------- Home ---------- */
.home {
  display: flex; flex-direction: column;
  gap: clamp(56px, 8vw, 96px);
  padding-top: clamp(40px, 7vw, 88px);
  padding-bottom: clamp(56px, 8vw, 96px);
}
.intro { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
.eyebrow {
  margin-bottom: 20px; color: var(--accent);
  font-size: 13px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
}
.intro__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(36px, 5vw, 54px); line-height: 1.08; letter-spacing: -0.02em;
  margin-bottom: 28px; max-width: 22ch;
}
.intro__title em { font-style: normal; }
.intro__bio { display: flex; flex-direction: column; gap: 16px; }
.intro__bio p { font-size: 18px; line-height: 1.65; color: var(--text-2); max-width: 68ch; }
.intro__diss { color: var(--text); font-weight: 500; }
.intro__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 32px; font-size: 15px; }

.profile { display: none; }
.profile__name { font-family: var(--font-display); font-size: 30px; font-weight: 500; line-height: 1.15; }
.profile__role { font-size: 16px; line-height: 1.5; color: var(--text-2); }
.profile__lab, .profile__meta { font-size: 15px; line-height: 1.5; color: var(--muted); }
.profile__links { list-style: none; margin: 0; padding: 18px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 4px; }
.profile__links a { display: flex; align-items: center; gap: 10px; min-height: 36px; font-size: 15.5px; }

.facts { margin: 0; }
.facts dt { font-size: 12px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-size: 15.5px; line-height: 1.45; color: var(--text-2); }

.areas__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.area { display: flex; flex-direction: column; gap: 14px; }
.area__icon { display: none; }
.area__num { display: none; }
.area__title { font-family: var(--font-display); font-size: 21px; font-weight: 600; }
.area__text { font-size: 15.5px; line-height: 1.6; color: var(--text-2); }
.area__now { font-size: 15px; line-height: 1.55; color: var(--text-2); }
.area__now-label { display: block; margin-bottom: 4px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); font-weight: 500; }

.recent { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; align-items: start; }

.news-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.news-list li { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 16px; padding: 12px 0; font-size: 15.5px; line-height: 1.55; }
.news-list__date { font-size: 13px; color: var(--muted); padding-top: 2px; white-space: nowrap; }
.news-list__text { color: var(--text-2); }
.news-more { margin-top: 12px; }
.news-more summary { cursor: pointer; color: var(--link); font-size: 15px; min-height: 44px; display: flex; align-items: center; }
.news-more summary:hover { color: var(--link-hover); }

/* ---------- Publications ---------- */
.pub-list { display: flex; flex-direction: column; gap: 24px; }
.pub { display: flex; flex-direction: column; gap: 6px; padding-bottom: 24px; border-bottom: 1px solid var(--rule); }
.pub__yr { display: none; }
.pub__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14px; color: var(--muted); }
.pub__venue em { font-style: italic; }
.pub__title { font-family: var(--font-display); font-size: 19px; line-height: 1.4; font-weight: 500; }
.pub__title a { color: var(--text); }
.pub__title a:hover { color: var(--accent); }
.pub__authors { font-size: 15px; line-height: 1.5; color: var(--muted); }
.pub__authors strong { color: var(--text); font-weight: 600; }
.pub__note { font-style: italic; }
.pub__links { display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; font-weight: 500; }

/* ---------- Inner pages ---------- */
.page { padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(56px, 8vw, 96px); }
.page-header { max-width: 760px; margin-bottom: clamp(40px, 5vw, 56px); display: flex; flex-direction: column; gap: 14px; }
.page-title { font-family: var(--font-display); font-weight: 500; font-size: clamp(36px, 5vw, 52px); line-height: 1.1; letter-spacing: -0.015em; }
.page-intro { font-size: 19px; line-height: 1.6; color: var(--text-2); }
.page-body > section + section { margin-top: clamp(48px, 6vw, 72px); }
.project-section h2, .pub-section h2 { margin-bottom: 24px; }
.project-section > p { font-size: 17px; color: var(--text-2); margin-bottom: 16px; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.card {
  display: flex; flex-direction: column; gap: 12px;
  padding: 28px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface);
}
.card__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 10px; background: var(--surface-2); color: var(--accent);
}
.card__title { font-family: var(--font-display); font-size: 20px; font-weight: 600; line-height: 1.3; }
.card__role { font-size: 14.5px; color: var(--accent); font-weight: 500; }
.card__text { font-size: 15.5px; line-height: 1.6; color: var(--text-2); }
.card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: auto; padding-top: 8px; font-size: 14px; color: var(--muted); }
.card__meta a { display: inline-flex; align-items: center; gap: 4px; }

.entry-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.entry { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--rule); }
.entry__date { font-size: 14.5px; color: var(--muted); padding-top: 2px; }
.entry__title { font-family: var(--font-display); font-size: 19px; font-weight: 600; line-height: 1.35; }
.entry__place { font-size: 15.5px; color: var(--text-2); margin-top: 2px; }
.entry__text { font-size: 15.5px; color: var(--text-2); margin-top: 4px; }
.entry__bullets { margin: 10px 0 0; padding-left: 20px; font-size: 15.5px; color: var(--text-2); display: flex; flex-direction: column; gap: 4px; }

.stats { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.stat { display: flex; flex-direction: column-reverse; gap: 4px; padding: 24px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
.stat dt { font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.stat dd { margin: 0; font-family: var(--font-display); font-size: 44px; line-height: 1; color: var(--accent); }

.check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.check-list li { display: flex; align-items: center; gap: 12px; font-size: 16px; color: var(--text-2); }
.check-list .icon { color: var(--accent); }

.skills { margin: 0; border-top: 1px solid var(--rule); }
.skills__row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.skills dt { font-weight: 600; font-size: 15.5px; }
.skills dd { margin: 0; }

.cv-download { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 56px; }
.cv-download__note { font-size: 14.5px; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--rule); }
.site-footer__inner { display: flex; flex-direction: column; gap: 28px; padding-top: 48px; padding-bottom: 32px; }
.site-footer__label { font-size: 13px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.site-footer__email { font-family: var(--font-display); font-size: 24px; color: var(--text); }
.site-footer__links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 15px; }
.site-footer__bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 20px; border-top: 1px solid var(--rule); font-size: 14px; color: var(--muted);
}

.style-switch { display: inline-flex; align-items: center; gap: 4px; padding: 3px; border: 1px solid var(--rule-strong); border-radius: 999px; }
.style-switch__label { padding: 0 8px 0 10px; font-size: 13px; color: var(--muted); }
.style-switch button {
  min-height: 34px; padding: 0 14px; border: 0; border-radius: 999px;
  background: transparent; color: var(--text-2); font: inherit; font-size: 14px; cursor: pointer;
}
.style-switch button:hover { background: var(--surface-2); }
.style-switch button[aria-pressed="true"] { background: var(--text); color: var(--bg); }

/* ==========================================================================
   CLASSIC: light, serif, profile column on the left
   ========================================================================== */
[data-theme="classic"] .home {
  display: grid; grid-template-columns: 260px minmax(0, 1fr);
  column-gap: 80px; row-gap: 64px; align-items: start;
}
[data-theme="classic"] .intro { display: contents; }
[data-theme="classic"] .profile {
  display: flex; flex-direction: column; gap: 16px;
  grid-column: 1; grid-row: 1 / span 3; position: sticky; top: 32px;
}
[data-theme="classic"] .intro__main,
[data-theme="classic"] .areas,
[data-theme="classic"] .recent { grid-column: 2; }
[data-theme="classic"] .facts,
[data-theme="classic"] .eyebrow,
[data-theme="classic"] .intro__actions { display: none; }
[data-theme="classic"] .intro__title { font-size: 32px; font-weight: 500; line-height: 1.25; letter-spacing: -0.01em; max-width: none; margin-bottom: 20px; }
[data-theme="classic"] .intro__bio p { font-family: var(--font-display); font-size: 19.5px; line-height: 1.7; }
[data-theme="classic"] .intro__diss { font-style: italic; font-weight: 400; }
[data-theme="classic"] .areas__grid { display: flex; flex-direction: column; gap: 22px; }
[data-theme="classic"] .area { display: block; }
[data-theme="classic"] .area__title { display: inline; font-family: var(--font-body); font-size: 17px; font-weight: 600; }
[data-theme="classic"] .area__title::after { content: ". "; }
[data-theme="classic"] .area__text { display: inline; font-size: 17px; }
[data-theme="classic"] .area__now { margin-top: 6px; font-size: 15.5px; color: var(--muted); }
[data-theme="classic"] .area__now-label { display: inline; margin: 0 6px 0 0; }
[data-theme="classic"] .recent { display: flex; flex-direction: column; gap: 64px; }
[data-theme="classic"] .news-list { border-top: 1px solid var(--rule); }
[data-theme="classic"] .news-list li { grid-template-columns: 96px minmax(0, 1fr); gap: 20px; border-bottom: 1px solid var(--rule); font-size: 16.5px; }
[data-theme="classic"] .news-list__date { font-size: 13.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
[data-theme="classic"] .pub { border-bottom: 0; padding-bottom: 0; }
[data-theme="classic"] .pub__title { order: 1; }
[data-theme="classic"] .pub__authors { order: 2; font-size: 16px; }
[data-theme="classic"] .pub__meta { order: 3; font-size: 16px; }
[data-theme="classic"] .pub__links { order: 4; }
[data-theme="classic"] .pub__venue em { font-family: var(--font-display); font-size: 17px; color: var(--text-2); }
[data-theme="classic"] .pub__links a { padding: 1px 10px; border: 1px solid #C9D5EA; border-radius: 4px; font-size: 13.5px; font-weight: 600; }
[data-theme="classic"] .pub__links a:hover { text-decoration: none; background: #EEF3FB; }
[data-theme="classic"] .card-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); column-gap: 48px; row-gap: 8px; }
[data-theme="classic"] .card { padding: 20px 0 24px; border: 0; border-top: 1px solid var(--rule); border-radius: 0; background: none; }
[data-theme="classic"] .card__icon { display: none; }
[data-theme="classic"] .card__title,
[data-theme="classic"] .entry__title { font-weight: 500; }
[data-theme="classic"] .stat { background: none; border: 0; border-top: 1px solid var(--rule); border-radius: 0; padding: 16px 0 0; }
[data-theme="classic"] .site-footer__inner { gap: 20px; padding-top: 40px; }

/* ==========================================================================
   DARK: tech look, cards, profile panel beside the intro
   ========================================================================== */
[data-theme="dark"] .site-name { font-size: 19px; font-weight: 600; }
[data-theme="dark"] .site-nav a[aria-current="page"] { color: var(--text); font-weight: 500; box-shadow: inset 0 -2px 0 var(--accent); }
[data-theme="dark"] .eyebrow,
[data-theme="dark"] .news-list__date,
[data-theme="dark"] .pub__meta,
[data-theme="dark"] .facts dt,
[data-theme="dark"] .area__now-label,
[data-theme="dark"] .entry__date,
[data-theme="dark"] .site-footer__label { font-family: var(--font-mono); }
[data-theme="dark"] .intro { grid-template-columns: minmax(0, 1fr) 300px; gap: 72px; align-items: start; }
[data-theme="dark"] .facts {
  display: flex; flex-direction: column; gap: 18px;
  padding: 24px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface);
}
[data-theme="dark"] .facts dt { color: var(--accent); font-size: 11.5px; }
[data-theme="dark"] .area {
  padding: 28px; border: 1px solid #223040; border-radius: var(--radius); background: var(--surface);
}
[data-theme="dark"] .area__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 10px; background: var(--surface-2); color: var(--accent);
}
[data-theme="dark"] .area__now { margin-top: auto; padding-top: 16px; border-top: 1px solid #223040; }
[data-theme="dark"] .news-list li { padding: 10px 0; }
[data-theme="dark"] .news-list__date { color: var(--accent); }
[data-theme="dark"] .pub__meta { font-size: 12.5px; }
[data-theme="dark"] .pub__venue em { font-style: normal; }
[data-theme="dark"] .pub__title { font-size: 18px; }
[data-theme="dark"] .pub__authors { font-size: 14.5px; }
[data-theme="dark"] .card { border-color: #223040; }
[data-theme="dark"] .site-footer__email { font-size: 22px; }

/* ==========================================================================
   EDITORIAL: big serif statement, rules instead of cards
   ========================================================================== */
[data-theme="editorial"] .site-header { border-bottom: 0; }
[data-theme="editorial"] .site-header__inner { min-height: 96px; }
[data-theme="editorial"] .site-name { font-family: var(--font-body); font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
[data-theme="editorial"] .site-nav a { font-size: 15px; color: #4A463F; }
[data-theme="editorial"] .site-nav a[aria-current="page"] { color: var(--text); font-weight: 400; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 6px; }
[data-theme="editorial"] .site-nav__cv { padding: 0 18px; border: 1px solid var(--text); border-radius: 999px; color: var(--text) !important; font-weight: 500; }
[data-theme="editorial"] .site-nav__cv:hover { background: var(--text); color: var(--bg) !important; }
[data-theme="editorial"] .home { padding-top: clamp(32px, 5vw, 56px); }
[data-theme="editorial"] .eyebrow { letter-spacing: 0.12em; }
[data-theme="editorial"] .intro { gap: 48px; }
[data-theme="editorial"] .intro__title {
  font-weight: 400; font-size: clamp(46px, 7.2vw, 84px); line-height: 1.0; letter-spacing: -0.015em; max-width: 12.5em;
}
[data-theme="editorial"] .intro__bio a,
[data-theme="editorial"] .news-list a,
[data-theme="editorial"] .page-intro a,
[data-theme="editorial"] .card__meta a,
[data-theme="editorial"] .facts a,
[data-theme="editorial"] .news-more summary {
  text-decoration: underline; text-decoration-color: #BDB5A8; text-underline-offset: 3px;
}
[data-theme="editorial"] .intro__bio a:hover,
[data-theme="editorial"] .news-list a:hover,
[data-theme="editorial"] .page-intro a:hover { text-decoration-color: currentColor; }
[data-theme="editorial"] .intro__title em { font-style: italic; color: var(--accent); }
[data-theme="editorial"] .intro__bio p { font-size: 21px; line-height: 1.55; max-width: 60ch; }
[data-theme="editorial"] .intro__diss { font-weight: 400; font-style: italic; }
[data-theme="editorial"] .intro__actions a:not(.button) { text-decoration: underline; text-decoration-color: #BDB5A8; }
[data-theme="editorial"] .facts {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px;
  padding: 24px 0; border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule);
}
[data-theme="editorial"] .section-head h2,
[data-theme="editorial"] .project-section h2,
[data-theme="editorial"] .pub-section h2 { font-size: 52px; font-weight: 400; line-height: 1; }
[data-theme="editorial"] .page-title { font-size: clamp(48px, 7vw, 76px); font-weight: 400; line-height: 1; }
[data-theme="editorial"] .more { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
[data-theme="editorial"] .areas__grid { gap: 0; border-top: 1px solid var(--rule); }
[data-theme="editorial"] .area { padding: 28px 32px 8px; }
[data-theme="editorial"] .area:first-child { padding-left: 0; }
[data-theme="editorial"] .area:last-child { padding-right: 0; }
[data-theme="editorial"] .area + .area { border-left: 1px solid var(--rule); }
[data-theme="editorial"] .area__num { display: block; font-family: var(--font-display); font-size: 40px; line-height: 1; color: var(--accent); }
[data-theme="editorial"] .area__title { font-family: var(--font-body); font-size: 21px; letter-spacing: -0.01em; }
[data-theme="editorial"] .area__now-label { display: inline; color: var(--text); font-size: 15px; letter-spacing: 0; text-transform: none; font-weight: 600; }
[data-theme="editorial"] .area__now-label::after { content: " —"; }
[data-theme="editorial"] .news-list { border-top: 1px solid var(--rule); }
[data-theme="editorial"] .news-list li { grid-template-columns: 84px minmax(0, 1fr); padding: 14px 0; border-bottom: 1px solid #E0DAD0; }
[data-theme="editorial"] .news-list__date { font-family: var(--font-mono); }
[data-theme="editorial"] .pub-list { gap: 0; border-top: 1px solid var(--rule); }
[data-theme="editorial"] .pub { display: grid; grid-template-columns: 76px minmax(0, 1fr); column-gap: 20px; row-gap: 6px; padding: 20px 0; border-bottom: 1px solid #E0DAD0; }
[data-theme="editorial"] .pub > * { grid-column: 2; }
[data-theme="editorial"] .pub__yr { display: block; grid-column: 1; grid-row: 1 / span 4; font-family: var(--font-display); font-size: 30px; line-height: 1; color: var(--accent); }
[data-theme="editorial"] .pub__year { display: none; }
[data-theme="editorial"] .pub__title { order: 1; font-family: var(--font-body); font-size: 18px; font-weight: 500; }
[data-theme="editorial"] .pub__authors { order: 2; font-size: 14.5px; }
[data-theme="editorial"] .pub__meta { order: 3; }
[data-theme="editorial"] .pub__links { order: 4; }
[data-theme="editorial"] .pub__venue em { font-family: var(--font-display); font-size: 17px; color: var(--text-2); }
[data-theme="editorial"] .card-grid { gap: 0; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); border-top: 1px solid var(--rule); }
[data-theme="editorial"] .card { background: none; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; padding: 24px 24px 24px 0; }
[data-theme="editorial"] .card__icon { display: none; }
[data-theme="editorial"] .card__title,
[data-theme="editorial"] .entry__title { font-family: var(--font-body); font-size: 19px; letter-spacing: -0.01em; }
[data-theme="editorial"] .card__role { color: var(--accent); }
[data-theme="editorial"] .entry__date { font-family: var(--font-mono); font-size: 13.5px; }
[data-theme="editorial"] .stat { background: none; border: 0; border-top: 1px solid var(--rule-strong); border-radius: 0; padding: 16px 0 0; }
[data-theme="editorial"] .stat dd { font-size: 56px; }
[data-theme="editorial"] .site-footer { border-top: 0; background: #161513; color: #EDE9E1; }
[data-theme="editorial"] .site-footer a { color: #EDE9E1; }
[data-theme="editorial"] .site-footer a:hover { color: #FFFFFF; }
[data-theme="editorial"] .site-footer__inner { padding-top: 64px; gap: 36px; }
[data-theme="editorial"] .site-footer__label { color: #A8A196; }
[data-theme="editorial"] .site-footer__email { font-size: clamp(34px, 5vw, 56px); line-height: 1.05; color: #F2EFE9; }
[data-theme="editorial"] .site-footer__bottom { border-top-color: #3A3631; color: #A8A196; }
[data-theme="editorial"] .style-switch { border-color: #4A463F; }
[data-theme="editorial"] .style-switch__label { color: #A8A196; }
[data-theme="editorial"] .style-switch button { color: #EDE9E1; }
[data-theme="editorial"] .style-switch button:hover { background: #2B2824; }
[data-theme="editorial"] .style-switch button[aria-pressed="true"] { background: #F2EFE9; color: #161513; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .recent { grid-template-columns: minmax(0, 1fr); gap: 64px; }
  .areas__grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  [data-theme="dark"] .intro { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  [data-theme="classic"] .home { grid-template-columns: minmax(0, 1fr); row-gap: 48px; }
  [data-theme="classic"] .profile { grid-column: 1; grid-row: auto; position: static; order: -1; }
  [data-theme="classic"] .intro__main,
  [data-theme="classic"] .areas,
  [data-theme="classic"] .recent { grid-column: 1; }
  [data-theme="editorial"] .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  [data-theme="editorial"] .areas__grid { gap: 0; }
  [data-theme="editorial"] .area,
  [data-theme="editorial"] .area:first-child,
  [data-theme="editorial"] .area:last-child { padding: 24px 0; }
  [data-theme="editorial"] .area + .area { border-left: 0; border-top: 1px solid var(--rule); }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-header__inner { padding-top: 12px; padding-bottom: 4px; }
  .site-nav { gap: 0 16px; }
  .site-nav a { font-size: 15px; }
  .intro__bio p { font-size: 17px; }
  [data-theme="classic"] .intro__bio p { font-size: 18px; }
  [data-theme="editorial"] .intro__bio p { font-size: 18px; }
  .section-head { flex-wrap: wrap; }
  .section-head h2, .project-section h2, .pub-section h2 { font-size: 26px; }
  [data-theme="editorial"] .section-head h2,
  [data-theme="editorial"] .project-section h2,
  [data-theme="editorial"] .pub-section h2 { font-size: 40px; }
  .news-list li,
  [data-theme="classic"] .news-list li,
  [data-theme="editorial"] .news-list li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .entry, .skills__row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .card-grid,
  [data-theme="classic"] .card-grid,
  [data-theme="editorial"] .card-grid { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: minmax(0, 1fr); }
  [data-theme="editorial"] .facts { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  [data-theme="editorial"] .pub { grid-template-columns: 56px minmax(0, 1fr); column-gap: 14px; }
  [data-theme="editorial"] .pub__yr { font-size: 24px; }
  .site-footer__bottom { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: no-preference) {
  .style-switch button, .button, .site-nav__cv { transition: background-color 0.15s ease, color 0.15s ease, filter 0.15s ease; }
}
