/* ==========================================================
   Tony Danjun Wang — personal site, redesigned
   Type:  Newsreader (display) · Inter Tight (body) · JetBrains Mono (meta)
   Color: single teal accent, warm off-white paper, cool ink
   ========================================================== */

:root {
  /* Cool, near-neutral paper. Less warm, more "studio" white. */
  --paper:        oklch(99%   0.003 240);
  --paper-2:      oklch(97%   0.004 240);
  --paper-3:      oklch(94%   0.005 240);
  --ink:          oklch(20%   0.014 250);
  --ink-2:        oklch(38%   0.012 250);
  --ink-3:        oklch(55%   0.010 250);
  --ink-4:        oklch(72%   0.008 250);
  --rule:         oklch(90%   0.005 240);
  --rule-2:       oklch(84%   0.006 240);

  --accent:       oklch(48%   0.085 200);
  --accent-2:     oklch(38%   0.085 200);
  --accent-soft:  oklch(48%   0.085 200 / 0.10);

  --award:        oklch(58%   0.060 65);

  --serif:    "Newsreader", "Source Serif Pro", Georgia, serif;
  --sans:     "Inter Tight", "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono:     "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius:   6px;
  --radius-l: 8px;
  --shadow-1: 0 1px 2px oklch(0% 0 0 / 0.03);
  --shadow-2: 0 4px 12px oklch(0% 0 0 / 0.05), 0 12px 32px oklch(0% 0 0 / 0.04);

  --grain-opacity: 0;
}

[data-theme="dark"] {
  /* Cool, deep slate. Reads "studio at night," not "parchment at night." */
  --paper:        oklch(22%   0.012 250);
  --paper-2:      oklch(26%   0.013 250);
  --paper-3:      oklch(30%   0.014 250);
  --ink:          oklch(97%   0.005 240);
  --ink-2:        oklch(88%   0.007 240);
  --ink-3:        oklch(72%   0.009 245);
  --ink-4:        oklch(56%   0.010 245);
  --rule:         oklch(34%   0.013 250);
  --rule-2:       oklch(42%   0.014 250);

  /* Periwinkle accent — cool, distinct from light-mode teal. */
  --accent:       oklch(80%   0.10  265);
  --accent-2:     oklch(88%   0.09  265);
  --accent-soft:  oklch(80%   0.10  265 / 0.16);

  --award:        oklch(78%   0.07  78);

  --grain-opacity: 0;
  --shadow-1: 0 1px 2px oklch(0% 0 0 / 0.20);
  --shadow-2: 0 6px 16px oklch(0% 0 0 / 0.30), 0 18px 48px oklch(0% 0 0 / 0.22);
}

/* ---------------- Reset + base ---------------- */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  text-rendering: optimizeLegibility;
  transition: background-color .35s ease, color .35s ease;
}

body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9998;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: var(--grain-opacity);
  mix-blend-mode: multiply;
}
[data-theme="dark"] body::after { mix-blend-mode: screen; }

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 0.2em;
  border-bottom: 1px solid transparent;
  transition: color .15s, border-color .15s;
}
a:hover {
  color: var(--accent-2);
  border-bottom-color: currentColor;
}

strong { color: var(--ink); font-weight: 600; }
em     { font-style: italic; color: var(--ink-2); }

/* ---------------- Layout ---------------- */

.page {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0 64px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 56px 40px 120px;
}

aside.identity {
  position: sticky;
  top: 56px;
  align-self: start;
  padding-right: 4px;
}
aside.identity::-webkit-scrollbar { display: none; }

main.content { min-width: 0; }

@media (max-width: 880px) {
  .page { grid-template-columns: 1fr; gap: 48px 0; padding: 32px 20px 80px; }
  aside.identity { position: static; max-height: none; overflow: visible; }
}

/* ---------------- Identity / sidebar ---------------- */

.avatar-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-l);
  overflow: hidden;
  background: var(--paper-2);
  box-shadow: var(--shadow-1);
  border: 1px solid var(--rule);
}
.avatar-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform .55s cubic-bezier(.25,.8,.25,1);
}
.avatar-track > img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  cursor: zoom-in;
}
.avatar-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  border-radius: 50%;
  background: oklch(0% 0 0 / 0.5);
  color: white;
  border: none;
  display: grid; place-items: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s, background .2s;
  backdrop-filter: blur(4px);
}
.avatar-arrow.left  { left: 8px; }
.avatar-arrow.right { right: 8px; }
.avatar-wrap:hover .avatar-arrow { opacity: 0.85; }
.avatar-arrow:hover { background: oklch(0% 0 0 / 0.7); opacity: 1; }
.avatar-arrow svg { width: 14px; height: 14px; }

.avatar-dots {
  position: absolute;
  bottom: 10px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 6px;
  padding: 4px 8px;
  background: oklch(0% 0 0 / 0.35);
  border-radius: 99px;
  backdrop-filter: blur(6px);
}
.avatar-dots > button {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: oklch(100% 0 0 / 0.4);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background .2s, transform .2s;
}
.avatar-dots > button.active { background: white; transform: scale(1.3); }

.identity h1 {
  margin: 24px 0 4px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 30px;
  line-height: 1.05;
  color: var(--ink);
  letter-spacing: 0;
}
.identity .name-zh {
  color: var(--ink-3);
  font-weight: 400;
  font-size: 0.78em;
  margin-left: 0.35em;
  letter-spacing: 0.02em;
}
.identity .position {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  margin: 0 0 2px;
  font-weight: 500;
}
.identity .affiliation {
  font-size: 14px;
  color: var(--ink-3);
  margin: 0 0 16px;
  display: block;
}
.identity .affiliation a { color: var(--ink-2); border-bottom: 1px solid var(--rule); }
.identity .affiliation a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.email-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  color: var(--ink-2);
  padding: 6px 12px;
  border-radius: 99px;
  cursor: pointer;
  user-select: none;
  transition: all .2s;
}
.email-pill:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.email-pill.copied {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}
.email-pill .copy-icon { opacity: 0.6; font-size: 11px; }

.link-row {
  display: flex;
  gap: 6px;
  margin-top: 16px;
}
.link-row a {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  color: var(--ink-2);
  background: var(--paper-2);
  font-size: 14px;
  transition: all .2s ease;
}
.link-row a:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  transform: translateY(-2px);
  box-shadow: var(--shadow-1);
}

/* ---------------- Sections ---------------- */

section.block {
  scroll-margin-top: 32px;
}
section.block + section.block {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
}
section.block:first-child { margin-top: 0; padding-top: 0; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 24px;
}
.section-num {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}
.section-head h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 28px;
  margin: 0;
  color: var(--ink);
  letter-spacing: 0;
  line-height: 1.1;
}

/* ---------------- About ---------------- */

.about p {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0 0 1em;
  text-wrap: pretty;
  max-width: 60ch;
}
.about p:last-child { margin-bottom: 0; }
.about p strong { color: var(--ink); }

.about .lede {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.32;
  color: var(--ink);
  font-weight: 400;
  letter-spacing: 0;
  margin: 0 0 18px;
  max-width: 28ch;
  text-wrap: balance;
}
.about .lede em {
  font-style: italic;
  color: var(--accent);
}
.about .lede::first-letter {
  font-family: var(--serif);
  font-size: 1.45em;
  font-weight: 500;
  line-height: 0.9;
  float: left;
  margin: 0.05em 0.08em 0 -0.02em;
  color: var(--ink);
}

/* ---------------- Education timeline ---------------- */

.edu-timeline {
  position: relative;
  padding-left: 24px;
}
.edu-timeline::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 8px;
  bottom: 12px;
  width: 1px;
  background: var(--rule);
}
.edu-entry {
  position: relative;
  padding-bottom: 18px;
}
.edu-entry:last-child { padding-bottom: 0; }
.edu-entry::before {
  content: "";
  position: absolute;
  left: -23px;
  top: 8px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--accent);
  transition: transform .2s, background .2s;
}
.edu-entry.current::before {
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.edu-entry:hover::before { transform: scale(1.2); }

.edu-degree {
  font-size: 15px;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.4;
}
.edu-school {
  font-size: 14px;
  color: var(--ink-2);
  margin-top: 1px;
}
.edu-school a { color: var(--ink-2); border-bottom: 1px solid transparent; }
.edu-school a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.edu-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
  margin-top: 3px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.edu-meta .duration { letter-spacing: 0.04em; }
.edu-meta .note {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0;
  font-style: normal;
  opacity: 0.85;
}
.edu-meta .note::before { content: "// "; color: var(--ink-4); }

/* ---------------- News ---------------- */

.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.news-list li {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-2);
}
.news-list li:last-child { border-bottom: none; }
.news-list li.collapsed { display: none; }
.news-list .news-date {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding-top: 3px;
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.news-list a { color: var(--ink); border-bottom: 1px solid var(--rule-2); }
.news-list a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.news-toggle {
  margin-top: 10px;
  background: none;
  border: 1px solid var(--rule);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.news-toggle:hover {
  background: var(--paper-2);
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------------- Publications ---------------- */

.pub-group + .pub-group { margin-top: 40px; }
.pub-group-head {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
  font-weight: 500;
}

.pub-list { list-style: none; padding: 0; margin: 0; }

.pub {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: 32px;
  transition: background-color .8s ease;
  position: relative;
}
.pub:last-child { border-bottom: none; }
.pub.targeted { background: var(--accent-soft); }

/* Featured paper — large hero teaser, taller layout */
.pub.featured {
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 28px 0;
}
.pub.featured .pub-teaser {
  width: 100%;
  aspect-ratio: 21/9;
}
.pub.featured .pub-title {
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: 0;
  margin-bottom: 8px;
}
.pub.featured .pub-venue-tag {
  font-size: 11px;
  padding: 4px 8px;
}
.pub.featured .featured-mark {
  position: absolute;
  top: 28px;
  right: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}
.pub.featured .featured-mark::before {
  content: "·";
  color: var(--accent);
  margin-right: 6px;
}

.pub-teaser {
  width: 160px;
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  position: relative;
}
.pub-teaser img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.pub:hover .pub-teaser img { transform: scale(1.04); }

.pub-venue-tag {
  position: absolute;
  top: 6px; left: 6px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: white;
  background: oklch(0% 0 0 / 0.65);
  padding: 3px 6px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
  font-weight: 500;
}

.pub-body { min-width: 0; }
.pub-title {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.3;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: 0;
  margin: 0 0 6px;
  text-wrap: pretty;
}
.pub-title a {
  color: var(--ink);
  border-bottom: 1px solid transparent;
}
.pub-title a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.pub-authors {
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.5;
  margin: 0 0 4px;
}
.pub-authors .me { color: var(--ink); font-weight: 600; }
.pub-authors .equal { color: var(--ink-3); font-size: 12px; margin-left: 4px; }

.pub-venue {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
  margin: 0 0 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.pub-venue .dot { color: var(--ink-4); }
.pub-venue em { font-style: normal; color: var(--ink-2); }

.pub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
}
.pub-btn {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-2);
  border: 1px solid var(--rule);
  background: transparent;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all .15s ease;
}
.pub-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.pub-btn.primary {
  border-color: var(--ink);
  color: var(--ink);
}
.pub-btn.primary:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.pub-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--sans);
  font-size: 11.5px;
  font-style: italic;
  color: var(--award);
  margin-left: 4px;
  font-weight: 500;
}
.pub-badge::before {
  content: "★";
  font-style: normal;
  font-size: 11px;
}

.bibtex-block {
  grid-column: 1 / -1;
  margin-top: 12px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  display: none;
  position: relative;
}
.bibtex-block.open { display: block; }
.bibtex-block pre {
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  white-space: pre;
}
.bibtex-copy {
  position: absolute;
  top: 8px; right: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all .15s;
}
.bibtex-copy:hover { color: var(--accent); border-color: var(--accent); }
.bibtex-copy.copied { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

@media (max-width: 600px) {
  .pub { grid-template-columns: 1fr; }
  .pub-teaser { width: 100%; max-width: 280px; }
  .news-list li { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------------- Awards ---------------- */

/* Featured award — full-width gold panel for the headliner */
.award-feature {
  position: relative;
  padding: 28px 32px;
  margin-bottom: 24px;
  border-radius: var(--radius-l);
  background:
    linear-gradient(135deg,
      oklch(96% 0.06 80) 0%,
      oklch(94% 0.09 75) 100%);
  border: 1px solid oklch(78% 0.13 75);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}
[data-theme="dark"] .award-feature {
  background:
    linear-gradient(135deg,
      oklch(38% 0.05 70) 0%,
      oklch(34% 0.08 60) 100%);
  border-color: oklch(58% 0.13 65);
}
.award-feature:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}
.award-feature::before {
  content: "★";
  position: absolute;
  top: -20px; right: -8px;
  font-size: 160px;
  line-height: 1;
  color: oklch(72% 0.16 75);
  opacity: 0.18;
  font-family: var(--serif);
  pointer-events: none;
}
[data-theme="dark"] .award-feature::before {
  color: oklch(86% 0.18 78);
  opacity: 0.22;
}
.award-feature .feat-eyebrow {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: oklch(38% 0.10 70);
  margin: 0 0 8px;
  font-weight: 500;
}
[data-theme="dark"] .award-feature .feat-eyebrow {
  color: oklch(82% 0.14 75);
}
.award-feature .feat-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 30px;
  line-height: 1.1;
  color: oklch(22% 0.05 70);
  margin: 0 0 6px;
  letter-spacing: 0;
  font-weight: 500;
  position: relative;
}
[data-theme="dark"] .award-feature .feat-title {
  color: oklch(96% 0.04 75);
}
.award-feature .feat-title a {
  color: inherit;
  border-bottom: 1px solid transparent;
}
.award-feature .feat-title a:hover {
  border-bottom-color: currentColor;
}
.award-feature .feat-detail {
  font-family: var(--sans);
  font-size: 14px;
  color: oklch(35% 0.05 70);
  margin: 0;
  position: relative;
}
[data-theme="dark"] .award-feature .feat-detail {
  color: oklch(86% 0.04 75);
}
.award-feature .feat-date {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: oklch(38% 0.06 70);
  text-transform: uppercase;
  margin-left: 10px;
}
[data-theme="dark"] .award-feature .feat-date {
  color: oklch(82% 0.08 75);
}

.awards-list { list-style: none; padding: 0; margin: 0; }
.awards-list li {
  display: grid;
  grid-template-columns: auto 90px 1fr;
  gap: 14px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 14.5px;
}
.awards-list li:last-child { border-bottom: none; }
.awards-list .award-icon {
  color: var(--award);
  font-size: 13px;
  width: 18px;
  display: inline-grid;
  place-items: center;
}
.awards-list .award-date {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.awards-list .award-text { color: var(--ink); }
.awards-list .award-text strong { color: var(--ink); }
.awards-list .award-detail { color: var(--ink-3); font-size: 13px; margin-top: 2px; display: block; }
.awards-list a { color: var(--ink); border-bottom: 1px solid var(--rule-2); }
.awards-list a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------------- Off-hours (mosaic) ---------------- */

.off-hours {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(120px, auto);
  gap: 14px;
}
/* mosaic spans: piano big, paramedic tall, swimming wide, tutoring small, cinema medium */
.off-hours .card:nth-child(1) { grid-column: span 4; grid-row: span 2; }
.off-hours .card:nth-child(2) { grid-column: span 2; grid-row: span 2; }
.off-hours .card:nth-child(3) { grid-column: span 3; }
.off-hours .card:nth-child(4) { grid-column: span 3; }
.off-hours .card:nth-child(5) { grid-column: span 6; }

.off-hours .card {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius-l);
  padding: 20px 22px;
  transition: all .25s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.off-hours .card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
}
.off-hours .card:hover {
  border-color: var(--rule-2);
  background: var(--paper);
  transform: translateY(-1px);
  box-shadow: var(--shadow-1);
}

.off-hours .card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  position: relative;
}
.off-hours h4 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 19px;
  color: var(--ink);
  margin: 0;
  letter-spacing: 0;
}
.off-hours .card:nth-child(1) h4 {
  font-size: 28px;
  font-style: italic;
  font-weight: 400;
}
.off-hours .card-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}
.off-hours p {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.55;
  margin: 0;
  text-wrap: pretty;
  position: relative;
}
.off-hours .card:nth-child(1) p {
  font-size: 15.5px;
  max-width: 38ch;
  margin-top: auto;
  padding-top: 12px;
}

@media (max-width: 720px) {
  .off-hours { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .off-hours .card,
  .off-hours .card:nth-child(1),
  .off-hours .card:nth-child(2),
  .off-hours .card:nth-child(3),
  .off-hours .card:nth-child(4),
  .off-hours .card:nth-child(5) { grid-column: 1 / -1; grid-row: auto; }
}

/* ---------------- Services ---------------- */

.svc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.svc h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
  margin: 0 0 10px;
}
.svc ul { list-style: none; padding: 0; margin: 0; }
.svc li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
  color: var(--ink-2);
}
.svc li:last-child { border-bottom: none; }
.svc li a { color: var(--ink); }
.svc li a:hover { color: var(--accent); }
.svc .years {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

@media (max-width: 600px) { .svc { grid-template-columns: 1fr; gap: 20px; } }

/* ---------------- Footer ---------------- */

footer.site-foot {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
footer.site-foot .signature {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
footer.site-foot .dot { color: var(--ink-4); }
footer.site-foot a {
  color: var(--ink-3);
  border-bottom: 1px solid var(--rule);
}
footer.site-foot a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------------- Floating buttons ---------------- */

.float-btn {
  position: fixed;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink-2);
  display: grid; place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-1);
  transition: all .2s ease;
  z-index: 100;
}
.float-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}
.theme-toggle { top: 24px; right: 24px; }
.back-to-top {
  bottom: 24px; right: 24px;
  opacity: 0; pointer-events: none;
  transform: translateY(8px);
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* ---------------- Lightbox ---------------- */

.lightbox {
  position: fixed; inset: 0;
  background: #f9fafb;
  background: var(--paper);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 9999;
  display: grid; place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}
[data-theme="dark"] .lightbox { background: #20242b; background: var(--paper); }
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox-figure {
  display: grid;
  gap: 14px;
  justify-items: center;
  margin: 0;
  max-width: 84vw;
}
.lightbox-img {
  max-width: 100%;
  max-height: calc(90vh - 52px);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-2);
  user-select: none;
}
.lightbox-caption {
  color: var(--ink-2);
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  text-align: center;
  width: 100%;
}
.lightbox-close, .lightbox-arrow {
  position: absolute;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  color: var(--ink-2);
  border-radius: 50%;
  cursor: pointer;
  display: grid; place-items: center;
  transition: background .2s, border-color .2s, color .2s;
}
.lightbox-close { top: 24px; right: 24px; width: 40px; height: 40px; }
.lightbox-arrow { top: 50%; transform: translateY(-50%); width: 44px; height: 44px; }
.lightbox-arrow.left { left: 5vw; }
.lightbox-arrow.right { right: 5vw; }
.lightbox-close:hover, .lightbox-arrow:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------------- Skip link ---------------- */

.skip-link {
  position: absolute;
  left: -9999px;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 14px;
  border-radius: var(--radius);
  z-index: 10000;
}
.skip-link:focus { left: 16px; top: 16px; }

/* ---------------- 404 ---------------- */

.not-found {
  min-height: 100vh;
  display: grid;
  place-content: center;
  gap: 14px;
  padding: 40px 20px;
  text-align: center;
}
.not-found h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 38px;
  line-height: 1.1;
  color: var(--ink);
  font-weight: 500;
}
.not-found p {
  margin: 0;
  color: var(--ink-2);
}
.not-found .pub-btn {
  justify-self: center;
  margin-top: 8px;
}

/* ---------------- Reduced motion ---------------- */

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

/* ---------------- Entrance animation ---------------- */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: no-preference) {
  aside.identity { animation: fadeUp .7s cubic-bezier(.2,.7,.3,1) both; }
  main.content   { animation: fadeUp .7s cubic-bezier(.2,.7,.3,1) .15s both; }
}
