/* ================================================================
   vanadium23.wiki — Light editorial theme (site-wide override)
   Loaded after style.css / responsive.css / mobile.css / prism.
   The original stylesheets stay untouched; this file is reversible.
   v3 — multi-screen support (2026-11-29)
   ================================================================ */

:root {
  color-scheme: light;

  /* one ink, one paper, one accent */
  --paper: #ffffff;
  --paper-soft: #f7f8f6;
  --ink: #1a1f1d;
  --ink-soft: #4b554f;
  --ink-faint: #616c66;          /* darkened for >=4.5:1 on paper */
  --accent: #1f6f52;
  --accent-soft: #e8f2ed;
  --line: #e3e7e4;
  --line-soft: #eef0ee;

  /* remap legacy tokens so every component follows the override */
  --primary: var(--accent);
  --primary-dark: #144e3a;
  --primary-light: var(--accent-soft);
  --primary-soft: var(--accent-soft);
  --accent-light: var(--accent-soft);
  --cyan: var(--accent);
  --success: #227a56;
  --success-light: var(--accent-soft);
  --danger: #b4453a;
  --danger-light: #fbeeec;
  --warning: #9a6b1f;
  --warning-light: #faf3e6;
  --muted: var(--ink-faint);
  --muted-light: var(--paper-soft);

  --gradient-primary: none;
  --gradient-brand: none;
  --gradient-soft: none;

  --bg: var(--paper);
  --bg-secondary: var(--paper);
  --bg-tertiary: var(--paper-soft);
  --surface: transparent;
  --surface-hover: var(--paper-soft);
  --surface-solid: var(--paper);
  --border: var(--line);
  --border-light: var(--line-soft);
  --text: var(--ink);
  --text-secondary: var(--ink-soft);
  --text-muted: var(--ink-faint);

  --shadow-sm: none;
  --shadow: none;
  --shadow-card: none;
  --shadow-float: none;
  --shadow-lg: none;
  --shadow-xl: none;
  --ring: 0 0 0 2px rgba(31, 111, 82, 0.28);

  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 8px;
  --radius-xl: 8px;
  --radius-pill: 999px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  --font-display: var(--font-sans);
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-shadow: none !important; }

html, body {
  background: var(--paper) !important;
  background-image: none !important;
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body { font-size: 16px; }

/* themed browser surfaces */
::selection { background: #d7ebe1; color: #123d2d; }
input, textarea, select { caret-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: #cfd6d1; border-radius: 6px; border: 2px solid var(--paper); }
::-webkit-scrollbar-thumb:hover { background: #b3bdb6; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--primary-dark); }

/* balanced, deliberate headings */
h1, h2, h3, h4 { text-wrap: balance; }
p, li { text-wrap: pretty; }

/* ---- Header / navigation: flat, quiet, no glass ---- */
.top-header,
.mobile-top-bar {
  background: var(--paper) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom: 1px solid var(--line);
}
.top-header { padding-left: 24px; padding-right: 24px; }
.logo-word::after,
.page-header-icon::after { display: none !important; }
.logo img { transition: none; }
.logo-link:hover img { transform: none; opacity: 1; }

.main-navigation {
  background: var(--paper) !important;
  border-bottom: 1px solid var(--line);
}
.nav-link { color: var(--ink-soft); position: relative; }
.nav-link.active, .nav-link:hover { color: var(--accent); }
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--accent);
}

/* ---- Layout: single readable column, generous margins ---- */
.layout-container { max-width: 960px; padding: 32px 24px 64px; }
.content-wrapper { min-width: 0; }
.container { max-width: 760px; }

/* one authored arrival motion; from a visible default, eased out */
@media (prefers-reduced-motion: no-preference) {
  .content-wrapper > .container {
    animation: editorial-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  @keyframes editorial-rise {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
  }
}

/* ---- Page header: plain typographic title ---- */
.page-header {
  background: none !important;
  border: none !important;
  padding: 0 0 24px !important;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line) !important;
}
.page-header h1 { font-size: 2rem; font-weight: 660; letter-spacing: -0.025em; }
.page-header p { color: var(--ink-faint); font-size: 0.95rem; }
.page-header-icon { display: none !important; }
.page-header-copy { padding: 0 !important; }

/* ---- Blog list: remove card chrome, use quiet dividers ---- */
.blog-list { display: block; }
.blog-post {
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid var(--line) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 28px 0 !important;
  margin: 0 !important;
  transition: none !important;
}
.blog-post::before { display: none !important; }
.blog-post:hover { background: transparent !important; transform: none !important; }
.blog-post:last-child { border-bottom: none !important; }
.blog-post h2 { font-size: 1.3rem; font-weight: 660; line-height: 1.4; margin: 0 0 8px; letter-spacing: -0.01em; }
.blog-post h2 a { color: var(--ink) !important; text-decoration: none; }
.blog-post h2 a:hover { color: var(--accent) !important; text-decoration: underline; }
.post-meta {
  color: var(--ink-faint) !important;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-bottom: 10px;
}
.post-meta span { white-space: nowrap; }
.post-excerpt { color: var(--ink-soft); line-height: 1.8; }
.read-more {
  color: var(--accent) !important;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
}
.read-more:hover { text-decoration: underline; }
.read-more::after { content: " →"; display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .read-more { transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1); }
  .blog-post:hover .read-more { transform: translateX(3px); }
}
.top-tag {
  background: var(--accent-soft) !important;
  color: var(--accent) !important;
  border: none !important;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  vertical-align: middle;
}

/* ---- Filters / controls: minimal inline row ---- */
.category-filter, .per-page-bar {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 12px 0 !important;
  margin: 0 0 8px !important;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.9rem;
}
.category-filter { border-bottom: 1px solid var(--line-soft) !important; margin-bottom: 4px !important; }
.filter-label, .per-page-label { color: var(--ink-faint); }
.category-select, .search-nav-input {
  background: var(--paper) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--ink) !important;
  padding: 6px 10px;
  font: inherit;
  font-size: 0.9rem;
}
.sort-link, .per-page-link, .excerpt-toggle {
  color: var(--ink-soft) !important;
  text-decoration: none;
  border: none !important;
  background: none !important;
  padding: 2px 4px !important;
}
.sort-link.active, .per-page-link.active { color: var(--accent) !important; font-weight: 600; }
.sort-link .icon, .per-page-bar .icon, .excerpt-toggle .icon { display: none; }
.sort-divider, .per-page-divider { display: none !important; }
.per-page-total { color: var(--ink-faint); margin-left: auto; font-variant-numeric: tabular-nums; }

/* pagination + empty state */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 40px 0 8px; }
.pagination a, .pagination span.current {
  min-width: 34px;
  text-align: center;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.9rem;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination span.current { background: var(--accent); border-color: var(--accent); color: #fff; }
.empty-state { text-align: center; padding: 64px 20px; color: var(--ink-faint); }
.empty-state-title { font-size: 1.15rem; font-weight: 600; color: var(--ink-soft); margin: 12px 0 4px; }

/* ---- Sidebar: plain lists, no card ---- */
.sidebar {
  background: transparent !important;
  border: none !important;
  border-left: 1px solid var(--line) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  padding: 0 0 0 24px !important;
}
.sidebar-section + .sidebar-section { border-top: 1px solid var(--line-soft); padding-top: 18px; margin-top: 18px; }
.sidebar-section h3 { color: var(--ink-faint); letter-spacing: 0.06em; font-size: 0.8rem; text-transform: uppercase; }
.category-list a, .recent-posts a { color: var(--ink-soft); }
.category-list a:hover, .recent-posts a:hover { background: var(--accent-soft) !important; color: var(--accent) !important; transform: none !important; }
.tag-cloud a { background: var(--paper-soft) !important; color: var(--ink-soft) !important; border: 1px solid var(--line) !important; }
.tag-cloud a:hover { background: var(--accent) !important; color: #fff !important; }

/* ---- Article view ---- */
.article, .post-content, .markdown-body { max-width: 760px; }
.post-content h1, .post-content h2, .post-content h3 { letter-spacing: -0.02em; }
.post-content pre, .post-content table { border: 1px solid var(--line); border-radius: var(--radius); }
.post-content blockquote { border-left: 1px solid var(--line) !important; color: var(--ink-soft); background: var(--paper-soft) !important; }
.post-content img { max-width: 100%; border-radius: var(--radius); }
.back-link { color: var(--accent) !important; }
.blog-list .back-link { margin-bottom: 16px; display: inline-block; }

.post-breadcrumb { font-size: 0.85rem; }
.post-breadcrumb a { color: var(--ink-soft); text-decoration: none; }
.post-breadcrumb a:hover { color: var(--accent); text-decoration: underline; }
.post-breadcrumb-sep { color: var(--line); margin: 0 8px; }
.post-breadcrumb-current { color: var(--ink-faint); }

/* one visible hero title: demote the content's duplicate H1 to a lead line */
.post-title { font-size: 2.1rem !important; font-weight: 680 !important; letter-spacing: -0.03em; line-height: 1.25; margin: 0 0 14px !important; }
.post-body > h1:first-child,
.post-body > h1:first-of-type {
  font-size: 1.15rem !important;
  font-weight: 500 !important;
  color: var(--ink-faint);
  letter-spacing: 0;
  margin: 0 0 28px !important;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
}

.post-body { font-size: 1.02rem !important; line-height: 1.85 !important; }
.post-meta a { color: var(--ink-faint); }
.post-body h2, .post-body h3, .post-body h4 {
  font-weight: 660;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.post-body h2 { font-size: 1.5rem; margin-top: 2.2em; margin-bottom: 0.7em; }
.post-body h3 { font-size: 1.22rem; margin-top: 2em; margin-bottom: 0.6em; }
.post-body p, .post-body ul, .post-body ol { margin: 0 0 1.15em; }
.post-body a { text-decoration: underline; text-underline-offset: 3px; }
.post-body :not(pre) > code {
  background: var(--accent-soft) !important;
  color: var(--accent) !important;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.88em;
}
.post-body pre {
  border: none !important;
  border-radius: var(--radius) !important;
  padding: 16px 20px !important;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.65;
}
.post-body pre code { font-family: inherit; }
.post-body blockquote {
  border-left: 1px solid var(--accent) !important;
  background: var(--paper-soft) !important;
  color: var(--ink-soft);
  padding: 12px 18px;
  margin: 1.5em 0;
}
.post-body table { border-collapse: collapse; width: 100%; margin: 1.5em 0; font-variant-numeric: tabular-nums; }
.post-body th, .post-body td { border: 1px solid var(--line); padding: 9px 13px; text-align: left; }
.post-body th { background: var(--paper-soft); font-weight: 600; color: var(--ink-soft); }
.post-body img { display: block; margin: 1.5em auto; max-width: 100%; }

/* ---- Buttons and generic surfaces ---- */
button, .btn, .tool-button {
  background: var(--paper) !important;
  border: 1px solid var(--line) !important;
  color: var(--ink) !important;
  box-shadow: none !important;
  border-radius: var(--radius-sm) !important;
  font: inherit;
  cursor: pointer;
}
button:hover, .btn:hover, .tool-button:hover { background: var(--paper-soft) !important; color: var(--accent) !important; }
input, textarea { background: var(--paper) !important; border: 1px solid var(--line) !important; color: var(--ink) !important; font: inherit; }

/* ---- Footer ---- */
.footer { border-top: 1px solid var(--line); margin-top: 48px; padding-top: 20px; color: var(--ink-faint); font-size: 0.85rem; }
.footer p { margin: 0; }

/* ---- Mobile view mode inherits the same light palette ---- */
body.mobile-view {
  --mobile-bg: var(--paper);
  --mobile-surface: var(--paper);
  --mobile-nav-bg: var(--paper);
  --mobile-nav-text: var(--ink-faint);
  --mobile-nav-active: var(--accent);
  --mobile-accent: var(--accent);
  --mobile-accent-soft: var(--accent-soft);
  --mobile-coral: var(--danger);
  --mobile-text: var(--ink);
  --mobile-text-secondary: var(--ink-soft);
  --mobile-text-muted: var(--ink-faint);
  --mobile-border: var(--line);
  background: var(--paper) !important;
  color: var(--ink);
}
body.mobile-view .mobile-top-bar,
body.mobile-view .mobile-bottom-nav {
  background: var(--paper) !important;
  border-color: var(--line) !important;
  backdrop-filter: none !important;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .layout-container { padding: 20px 16px 48px; }
  .sidebar { border-left: none; padding-left: 0; }
  .page-header h1 { font-size: 1.6rem; }
  .post-title { font-size: 1.8rem !important; }
  .post-body > h1:first-child { font-size: 1.05rem !important; }
  .post-body h2 { font-size: 1.35rem; }
  .post-body pre { padding: 14px !important; font-size: 0.85rem; }
  .post-meta { gap: 4px 12px; }
}
@media (max-width: 560px) {
  .post-meta span { white-space: normal; }
  .post-body table { display: block; overflow-x: auto; }
}

/* ================================================================
   Multi-screen support — 320px phones → 1920px+ desktops
   Component layout follows its CONTAINER (not just the viewport),
   so a narrow content column never gets a cramped two-column hero.
   ================================================================ */

/* Let the dashboard content column be a query container for the hero. */
#dashboardContainer { container-type: inline-size; }

/* Fluid display type that tracks available width, with hard bounds. */
.home-hero h1 {
  font-size: clamp(2rem, 8cqw, 3.4rem) !important;
  max-width: 16ch;
}
.page-header h1 { font-size: clamp(1.5rem, 5vw, 2rem); }

/* Hero: single column by default; two columns only when genuinely wide. */
.home-hero {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: clamp(20px, 4cqw, 40px);
  padding: clamp(24px, 5cqw, 56px);
  min-height: 0;
}
.hero-copy { min-width: 0; }
.archive-stage {
  justify-self: center !important;
  max-width: min(340px, 80cqw);
  height: auto;
  aspect-ratio: 340 / 300;
}

@container (min-width: 720px) {
  .home-hero {
    grid-template-columns: minmax(0, 1.1fr) minmax(240px, 0.7fr) !important;
  }
  .home-hero h1 { max-width: 12ch; }
  .archive-stage { justify-self: end !important; }
}
@container (max-width: 540px) {
  .archive-stage { display: none; }
  .home-hero h1 { max-width: none; }
  .hero-description { font-size: 0.95rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions > a { text-align: center; }
}

/* ---- Breakpoints across the full device range ---- */

/* Small phones (≤ 360px) */
@media (max-width: 360px) {
  .layout-container { padding: 16px 12px 40px; }
  .top-header { padding-left: 14px; padding-right: 14px; }
  .post-meta { font-size: 0.8rem; gap: 3px 10px; }
  .category-filter, .per-page-bar { gap: 8px; font-size: 0.85rem; }
  .post-body pre { padding: 12px !important; font-size: 0.8rem; }
  .post-body th, .post-body td { padding: 7px 9px; }
  .pagination a, .pagination span.current { min-width: 30px; padding: 4px 7px; }
}

/* Large tablets / small laptops (769–1023px) */
@media (min-width: 769px) and (max-width: 1023px) {
  .top-header { padding-left: 18px; padding-right: 18px; }
}

/* Desktop — use more of the screen (≥ 1200px) */
@media (min-width: 1200px) {
  .layout-container { max-width: 1120px; }
}
@media (min-width: 1600px) {
  .layout-container { max-width: 1240px; }
  .post-body { max-width: 760px; margin-inline: auto; }
}

/* Touch targets on coarse pointers */
@media (pointer: coarse) {
  .nav-link, .sort-link, .per-page-link, .excerpt-toggle,
  .category-list a, .recent-posts a { padding-block: 8px; }
  button, .btn, .tool-button, .download-btn, .tool-btn { min-height: 40px; }
}

/* ================================================================
   Contrast repairs (v4) — white-on-white text from the dark theme
   ================================================================ */
.skip-link {
  background: var(--accent) !important;
  color: #fff !important;
  box-shadow: none !important;
}
.skip-link:focus, .skip-link:focus-visible { color: #fff !important; }
.read-more, .sort-link, .per-page-link, .excerpt-toggle,
.read-more:hover, .sort-link:hover { background: transparent !important; }
.post-breadcrumb-sep { color: var(--ink-faint) !important; }

.about-page .page-header,
body:has(.hero-name) { background: var(--paper) !important; }

.hero-name, .hero-stat-value, .about-hero h1,
.resume-section h2, .resume-section h3, .resume-section strong,
.section-header h2, .bio-text strong, .skill-name, .rating-platform,
.solved-bar-label, .solved-bar-value, .solved-head-label,
.timeline-item, .timeline-item .year, .timeline-item .title,
.about-main p, .about-main li { color: var(--ink) !important; }

.hero-name .accent, .hero-stat-value .num, .accent {
  background: none !important;
  -webkit-text-fill-color: var(--accent) !important;
  color: var(--accent) !important;
}

.hero-typing-wrap, .hero-badge, .hero-stat-label, .skill-name small,
.heatmap-cf__desc, .heatmap-legend-item, .solved-error, .rating-error,
.solved-head-inline, .sidebar-text { color: var(--ink-soft) !important; }
.hero-badge { background: var(--accent-soft) !important; border-color: var(--line) !important; }

.timeline-medal, .timeline-medal--gold, .timeline-medal--silver,
.timeline-medal--bronze, .timeline-medal--second, .timeline-medal--first,
.rating-tag, .rating-tag--main, .rating-tag--alt,
.rating-tag--atcoder, .rating-tag--nowcoder {
  color: var(--primary-dark) !important;
  background: var(--accent-soft) !important;
  border: 1px solid var(--line) !important;
}
.oj-tab.is-active { background: var(--accent) !important; color: #fff !important; box-shadow: none !important; }
.home-profile-mark, .notice-label { color: #fff !important; }

/* ---- About hero: convert the remaining dark gradient to paper ---- */
.resume-hero {
  background: var(--paper-soft) !important;
  border: 1px solid var(--line) !important;
}
.resume-hero::before {
  background-image:
    linear-gradient(rgba(31, 111, 82, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 111, 82, 0.05) 1px, transparent 1px) !important;
}
.resume-hero .hero-orb,
.resume-hero .hero-particles { opacity: 0.25 !important; }
.resume-hero .hero-particles { color: var(--ink-faint) !important; }
.resume-hero .hero-particles span,
.resume-hero .hero-particles div { color: var(--ink-faint) !important; }

/* Active sort link: keep its label on paper, not on green */
.sort-link.active {
  background: transparent !important;
  color: var(--accent) !important;
  border-color: transparent !important;
  font-weight: 600;
}

/* Timeline titles use the dark-theme --resume-deep variable directly */
.timeline-title,
.timeline-item .timeline-title {
  color: var(--ink) !important;
}
.timeline-item:hover .timeline-title { color: var(--accent) !important; }

/* Contact card values also use --resume-deep */
.contact-card-value,
.contact-card:hover .contact-card-value { color: var(--ink) !important; }
/* v8 — simplicity refinements are appended below after the v7 compatibility layer. */

/* About hero: keep content, remove visual effects entirely. */
.resume-hero {
  background: var(--paper) !important;
  border: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  border-radius: 0 !important;
  padding: 16px 0 36px !important;
  margin-bottom: 32px !important;
}
.resume-hero::before,
.resume-hero .hero-orb,
.resume-hero .hero-particles { display: none !important; }
.hero-content { transform: none !important; }
.hero-name { font-size: clamp(2.2rem, 6vw, 3.4rem) !important; }
.hero-stat-value { font-size: 1.35em; }

/* Homepage hero becomes a compact editorial introduction. */
.home-hero {
  background: var(--paper) !important;
  border: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  border-radius: 0 !important;
  padding: 16px 0 40px !important;
  margin-bottom: 32px !important;
  min-height: 0 !important;
  gap: 0;
}
.home-hero::before,
.archive-stage,
.hero-eyebrow,
.hero-facts { display: none !important; }
.home-hero h1 {
  max-width: none !important;
  font-size: clamp(2rem, 6vw, 3.2rem) !important;
  line-height: 1.15;
  letter-spacing: -0.035em;
  margin-bottom: 18px !important;
}
.home-hero h1 span { color: var(--accent) !important; }
.hero-description {
  max-width: 52ch;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.8;
  margin-bottom: 22px !important;
}
.hero-actions { flex-direction: row !important; align-items: center !important; }
.hero-actions .download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0 !important;
  color: var(--accent) !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.hero-actions .download-btn:hover { color: var(--primary-dark) !important; }

/* Recent writing: a single list, not three competing cards. */
.home-journal { margin-bottom: 32px !important; }
.home-journal .section-kicker { display: none !important; }
.section-heading {
  align-items: baseline;
  margin-bottom: 12px !important;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.section-heading h2 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}
.section-heading > a { font-size: 0.82rem; }
.home-writing-grid {
  display: block !important;
  border-top: 0 !important;
}
.home-writing-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 16px;
  min-height: 0 !important;
  padding: 17px 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid var(--line-soft) !important;
  border-radius: 0 !important;
}
.home-writing-card:hover { background: transparent !important; }
.home-writing-card time {
  color: var(--ink-faint);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}
.home-writing-card h3 {
  min-width: 0;
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
  font-weight: 600;
}
.home-writing-card h3 a { color: var(--ink); text-decoration: none; }
.home-writing-card h3 a:hover { color: var(--accent); text-decoration: underline; }
.home-writing-card p { display: none !important; }
.home-writing-card > a {
  margin: 0 !important;
  color: var(--ink-faint) !important;
  font-size: 0.78rem !important;
  white-space: nowrap;
}
.home-writing-card > a:hover { color: var(--accent) !important; }

/* A quiet author line replaces the profile card and status strip. */
.home-profile {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 22px 0 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-top: 1px solid var(--line) !important;
}
.home-profile-mark,
.home-profile-copy .section-kicker { display: none !important; }
.home-profile-copy h2 { font-size: 0.92rem; font-weight: 500; margin: 0; }
.home-profile-copy p { display: none !important; }
.home-profile-links {
  margin-left: auto;
  padding: 0 !important;
  border: 0 !important;
}
.home-profile-links a:last-child { display: none !important; }
.home-profile-links a { font-size: 0.82rem; white-space: nowrap; }
.home-status,
.home-page .footer p:last-child { display: none !important; }
.home-page .footer { margin-top: 32px; padding-top: 16px; }

/* Keep the pinned post as one compact, clearly labelled entry. */
.home-notice {
  border: 0 !important;
  border-top: 1px solid var(--line) !important;
  border-bottom: 1px solid var(--line) !important;
  border-radius: 0 !important;
  margin: 24px 0 0 !important;
}
.home-notice summary { padding: 14px 0 !important; gap: 10px !important; }
.home-notice summary .notice-label {
  padding: 1px 6px !important;
  background: transparent !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--ink-faint) !important;
  font-family: var(--font-sans) !important;
  font-size: 0.68rem !important;
}
.home-notice summary strong { font-size: 0.92rem; font-weight: 500; }
.home-notice .post-body { max-height: 280px; overflow: auto; padding: 8px 0 20px !important; }

/* Blog list: title + one useful metadata line, no duplicate read-more. */
.blog-post { padding: 22px 0 !important; }
.blog-post h2 { font-size: 1.16rem; line-height: 1.45; }
.blog-post .post-meta { gap: 3px 12px; font-size: 0.8rem; }
.blog-post .post-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.94rem;
  line-height: 1.75;
}
.blog-post .read-more { display: none !important; }
.blog-list .back-link { margin-bottom: 8px; }

/* Consolidate secondary blog controls onto one quiet row. */
.category-filter { border-bottom: 0 !important; }
.per-page-bar {
  padding: 0 0 12px !important;
  margin-bottom: 8px !important;
  border-bottom: 1px solid var(--line-soft);
}
.per-page-label,
.per-page-divider,
.excerpt-toggle { display: none !important; }
.per-page-total { font-size: 0.8rem; }

/* Reading pages: remove the sidebar's repeated recent-post list. */
body:has(.blog-list) .sidebar .sidebar-section:has(.recent-posts),
body:has(.blog-content) .sidebar .sidebar-section:has(.recent-posts) { display: none !important; }

/* Narrow screens: reading remains linear and touch-friendly. */
@media (max-width: 640px) {
  .home-writing-card {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    padding: 15px 0 !important;
  }
  .home-writing-card time { grid-column: 1 / -1; font-size: 0.74rem; }
  .home-writing-card > a { font-size: 0.74rem !important; }
  .home-profile { flex-wrap: wrap; gap: 8px 12px; }
  .home-profile-links { margin-left: 0; width: 100%; }
  .resume-hero { padding-top: 8px !important; }
  .hero-stats { gap: 20px !important; }
}
@media (pointer: coarse) {
  .home-writing-card h3 a { padding-block: 6px; }
}

/* v8 final spacing: a compact masthead and no entrance flash. */
.home-page .content-wrapper > .container { animation: none !important; }
.home-hero { padding-top: 0 !important; padding-bottom: 28px !important; }
.home-hero h1 { margin-bottom: 12px !important; }
.hero-description { margin-bottom: 16px !important; }
.home-journal .section-heading { margin-bottom: 4px !important; }

/* Content must never depend on animation JavaScript to become visible. */
.about-page .reveal,
.about-page .hero-badge,
.about-page .hero-name,
.about-page .hero-typing-wrap,
.about-page .hero-stat {
  opacity: 1 !important;
  transform: none !important;
}

/* OJ names in the solved panel must use light-theme ink, not --resume-deep. */
.solved-bar-platform {
  color: var(--ink) !important;
}
.solved-bar-tag {
  color: var(--ink-soft) !important;
  background: var(--paper-soft) !important;
  border: 1px solid var(--line) !important;
}
