/* —— Fonts —— */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/assets/fonts/InterVariable.woff2') format('woff2-variations'),
       url('/assets/fonts/InterVariable.woff2') format('woff2');
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  line-height: 1.5;
}

body.theme-menu-open { overflow: hidden; }

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

button {
  font: inherit;
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 200;
  padding: 0.5rem 1rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0.25rem;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.content {
  max-width: 800px;
  margin: 0 auto;
}

/* —— Theme tokens —— */
:root,
[data-theme="monochrome"] {
  color-scheme: light;
  --font-body: Inter, system-ui, sans-serif;
  --bg: #ffffff;
  --bg-nav: #ffffff;
  --border-nav: rgba(0, 0, 0, 0.1);
  --text: #000000;
  --text-muted: #000000;
  --text-subtle: #000000;
  --heading: #000000;
  --link: #000000;
  --link-underline: rgba(42, 42, 42, 0.3);
  --btn-border: 1px solid rgba(0, 0, 0, 0.22);
  --btn-bg: rgba(0, 0, 0, 0.05);
  --btn-hover: rgba(0, 0, 0, 0.09);
  --focus: #000000;
  --section-gap: clamp(2.5rem, 5vw, 3.5rem);
  --hero-title-weight: 600;
  --hero-tagline-weight: 600;
  --section-title-weight: 600;
  --section-title-style: normal;
  --writing-intro-style: normal;
  --writing-intro-text: #3a3a3a;
  --list-border: #e5e5e5;
  --badge-bg: rgba(0, 0, 0, 0.06);
  --badge-text: #666666;
  --collapsible-hover: rgba(0, 0, 0, 0.03);
  --collapsible-border: none;
  --skip-bg: #000000;
  --skip-text: #ffffff;
  --main-padding-top: 2rem;
}

[data-theme="dark"] {
  color-scheme: dark;
  --font-body: Inter, system-ui, sans-serif;
  --bg: #1a1a1a;
  --bg-nav: #1a1a1a;
  --border-nav: rgba(255, 255, 255, 0.1);
  --text: #ffffff;
  --text-muted: #d9d9d9;
  --text-subtle: #b3b3b3;
  --heading: #ffffff;
  --link: #d9d9d9;
  --link-underline: rgba(255, 255, 255, 0.3);
  --btn-border: 1px solid rgba(255, 255, 255, 0.28);
  --btn-bg: rgba(255, 255, 255, 0.08);
  --btn-hover: rgba(255, 255, 255, 0.14);
  --focus: #ffffff;
  --hero-tagline-weight: 600;
  --writing-intro-text: #d9d9d9;
  --list-border: #404040;
  --badge-bg: rgba(255, 255, 255, 0.1);
  --badge-text: #b3b3b3;
  --collapsible-hover: rgba(255, 255, 255, 0.05);
  --skip-bg: #ffffff;
  --skip-text: #000000;
}

[data-theme="high-contrast"] {
  color-scheme: dark;
  --font-body: Inter, system-ui, sans-serif;
  --bg: #000000;
  --bg-nav: #000000;
  --border-nav: #ffff00;
  --text: #ffffff;
  --text-muted: #ffffff;
  --heading: #ffffff;
  --link: #ffff00;
  --btn-border: 2px solid #ffff00;
  --btn-bg: rgba(255, 255, 0, 0.1);
  --btn-hover: rgba(255, 255, 0, 0.18);
  --focus: #ffff00;
  --nav-brand: #ffff00;
  --hero-title-weight: 600;
  --hero-tagline-weight: 600;
  --section-title-weight: 900;
  --writing-intro-text: #ffffff;
  --list-border: #ffff00;
  --badge-bg: #ffff00;
  --badge-text: #000000;
  --collapsible-border: 2px solid #ffff00;
  --collapsible-hover: rgba(255, 255, 0, 0.1);
  --skip-bg: #ffff00;
  --skip-text: #000000;
}

[data-theme="y2k"] {
  color-scheme: light;
  --font-body: Verdana, Arial, sans-serif;
  --bg: #f0f8ff;
  --bg-pattern: linear-gradient(45deg, #e8f4ff 25%, transparent 25%),
    linear-gradient(-45deg, #e8f4ff 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e8f4ff 75%),
    linear-gradient(-45deg, transparent 75%, #e8f4ff 75%);
  --bg-size: 8px 8px;
  --bg-pos: 0 0, 0 4px, 4px -4px, -4px 0px;
  --main-padding-top: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
}

[data-theme="y2k"] body {
  background-image: var(--bg-pattern);
  background-size: var(--bg-size);
  background-position: var(--bg-pos);
}

/* Show / hide layout variants */
.only-y2k { display: none; }
.only-standard { display: block; }

[data-theme="y2k"] .only-y2k { display: block; }
[data-theme="y2k"] .only-standard { display: none; }

[data-theme="y2k"] .site-nav {
  background: #ffffff;
  border-bottom-color: #cccccc;
}

[data-theme="y2k"] .nav-brand { color: #000000; font-family: Arial, Helvetica, sans-serif; }

/* —— Nav —— */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-nav);
  border-bottom: 1px solid var(--border-nav);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform: translateZ(0);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.nav-brand {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--nav-brand, var(--heading));
  position: relative;
  min-width: 2.5rem;
  min-height: 1.5rem;
  transition: min-width 0.3s ease;
}

.nav-brand:has(.nav-name-full.is-visible) {
  min-width: 9.375rem;
}

.nav-name-full {
  position: absolute;
  left: 0;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}

.nav-name-full.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-name-short {
  transition: opacity 0.3s, transform 0.3s;
}

.nav-name-short.is-hidden {
  opacity: 0;
  transform: translateY(-5px);
  pointer-events: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-linkedin {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0.5rem 0.75rem;
  border: var(--btn-border);
  border-radius: 0.375rem;
  background: var(--btn-bg, transparent);
  color: var(--nav-brand, var(--heading));
  text-decoration: none;
}

.nav-linkedin:hover {
  background: var(--btn-hover, var(--collapsible-hover));
}

.nav-linkedin:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

[data-theme="high-contrast"] .nav-linkedin:focus-visible {
  outline-width: 4px;
}

/* —— Theme switcher —— */
.theme-switcher { position: relative; }

#theme-switcher-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 36px;
  line-height: 1;
  padding: 0.5rem 0.75rem;
  border: var(--btn-border);
  border-radius: 0.375rem;
  background: var(--btn-bg, transparent);
  color: var(--nav-brand, var(--heading));
}

[data-theme="high-contrast"] #theme-switcher-btn {
  font-weight: 700;
  color: #ffff00;
}

#theme-switcher-btn:hover {
  background: var(--btn-hover, var(--collapsible-hover));
}

#theme-switcher-btn:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.theme-chevron {
  transition: transform 0.2s;
}

.theme-switcher.is-open .theme-chevron { transform: rotate(180deg); }

@media (max-width: 767px) {
  .theme-chevron { display: none; }
}

#theme-switcher-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.375rem);
  right: 0;
  min-width: 200px;
  background: var(--bg-nav);
  border: var(--btn-border);
  border-radius: 0.375rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10);
  overflow: hidden;
  z-index: 1000;
}

[data-theme="dark"] #theme-switcher-menu {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

[data-theme="high-contrast"] #theme-switcher-menu {
  box-shadow: 0 0 0 1px #ffff00, 0 4px 16px rgba(255, 255, 0, 0.2);
}

.theme-switcher.is-open #theme-switcher-menu {
  display: block;
}

@media (max-width: 767px) {
  #theme-switcher-menu { display: none !important; }
}

.theme-menu-divider {
  height: 1px;
  margin: 0.25rem 0;
  background: rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .theme-menu-divider {
  background: rgba(255, 255, 255, 0.1);
}

[data-theme="high-contrast"] .theme-menu-divider {
  background: #ffff00;
}

.theme-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  min-height: 48px;
  border: none;
  background: transparent;
  color: var(--heading);
  text-align: left;
}

.theme-option:hover {
  background: rgba(0, 0, 0, 0.08);
}

.theme-option:focus-visible {
  background: rgba(0, 0, 0, 0.08);
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

[data-theme="dark"] .theme-option { color: #fff; }
[data-theme="dark"] .theme-option:hover { background: rgba(255, 255, 255, 0.1); }

[data-theme="high-contrast"] .theme-option { color: #fff; }
[data-theme="high-contrast"] .theme-option:hover { background: rgba(255, 255, 0, 0.2); }

.theme-check { display: none; flex-shrink: 0; }
.theme-option.is-selected { font-weight: 600; }
.theme-option.is-selected .theme-check { display: block; }

/* Y2K skeuomorphic theme switcher */
[data-theme="y2k"] #theme-switcher-btn {
  border: 2px outset #cccccc;
  border-radius: 4px;
  background: linear-gradient(to bottom, #ffffff 0%, #e8e8e8 100%);
  color: #000000;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

[data-theme="y2k"] #theme-switcher-btn:hover {
  background: linear-gradient(to bottom, #f5f5f5 0%, #dcdcdc 100%);
}

[data-theme="y2k"] .theme-switcher.is-open #theme-switcher-btn {
  border-style: inset;
}

[data-theme="y2k"] #theme-switcher-menu {
  border: 2px outset #cccccc;
  border-radius: 4px;
  background: #f5f5f5;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.25);
}

[data-theme="y2k"] .theme-menu-divider {
  background: #8ba9c9;
}

[data-theme="y2k"] .theme-option:hover {
  background: #cce0f5;
}

[data-theme="y2k"] #theme-switcher-sheet {
  border-top: 3px outset #cccccc;
  background: #f5f5f5;
}

/* Mobile sheet */
#theme-switcher-backdrop,
#theme-switcher-sheet {
  display: none;
}

@media (max-width: 767px) {
  #theme-switcher-backdrop.is-open {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    animation: fadeIn 0.2s ease;
  }

  #theme-switcher-sheet.is-open {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    max-height: 80vh;
    overflow: auto;
    overscroll-behavior: contain;
    background: var(--bg-nav);
    border-radius: 1rem 1rem 0 0;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s ease-out;
  }

  .theme-sheet-handle {
    display: flex;
    justify-content: center;
    padding: 0.75rem;
  }

  .theme-sheet-handle span {
    width: 2.5rem;
    height: 0.25rem;
    border-radius: 0.125rem;
    background: rgba(0, 0, 0, 0.2);
  }

  .theme-sheet-header {
    padding: 0 1.5rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }

  .theme-sheet-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
  }

  #theme-switcher-sheet .theme-option {
    font-size: 1.125rem;
    padding: 1rem 1.5rem;
    min-height: 56px;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* —— Main layout —— */
.site-main {
  padding-top: var(--main-padding-top);
}

/* —— Standard hero —— */
.hero-standard {
  padding-top: 3rem;
}

.hero-standard h1 {
  font-size: clamp(1.75rem, 6vw, 2.75rem);
  font-weight: var(--hero-title-weight);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--heading);
  margin: 0 0 clamp(1.5rem, 3vw, 2.5rem);
}

.hero-standard .hero-tagline {
  font-size: clamp(1.375rem, 4vw, 2rem);
  font-weight: var(--hero-tagline-weight);
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0;
}

/* —— Y2K hero —— */
.hero-y2k { margin: 20px 0; }

.y2k-panel {
  padding: 30px;
  background: #ffffff;
  border: 3px outset #cccccc;
  text-align: center;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
}

.hero-y2k h1 {
  font-size: clamp(1.5rem, 4.5vw, 2.25rem);
  font-weight: bold;
  color: #333;
  margin: 0 0 20px;
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 1px;
  text-shadow: 1px 1px 0 #fff, 2px 2px 0 #999, 3px 3px 2px rgba(0, 0, 0, 0.3);
}

.marquee-wrap {
  background: #f5f5f5;
  border: 2px inset #cccccc;
  overflow: hidden;
  padding: 12px 0;
}

.marquee-text {
  display: inline-block;
  padding-left: 100%;
  white-space: nowrap;
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  color: #000;
  animation: marquee 20s linear infinite;
}

@keyframes marquee {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-100%, 0); }
}

/* —— About —— */
.about-standard {
  padding-top: var(--section-gap);
}

.about-standard p {
  font-size: clamp(1.063rem, 2.75vw, 1.188rem);
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0 0 1.5rem;
}

.about-standard p:last-child { margin-bottom: 0; }

.about-standard a {
  color: var(--link);
  text-underline-offset: 3px;
}

[data-theme="high-contrast"] .about-standard a {
  font-weight: 900;
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}

.about-y2k { margin: 20px 0; }

.y2k-gold-panel {
  padding: 25px;
  background: linear-gradient(180deg, #fff9e6 0%, #ffedcc 100%);
  border: 3px ridge #cc9933;
  border-radius: 8px;
  box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.2);
}

.y2k-gold-panel h2 {
  font-size: 1.5rem;
  font-weight: bold;
  color: #663300;
  margin: 0 0 15px;
  border-bottom: 2px groove #cc9933;
  padding-bottom: 8px;
  letter-spacing: 1px;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.8), 2px 2px 0 rgba(102, 51, 0, 0.3);
}

.y2k-gold-panel p {
  font-size: 1rem;
  line-height: 1.6;
  color: #000;
  margin: 0 0 12px;
}

.y2k-gold-panel a { color: #0066cc; }

/* —— Experience / Writing sections —— */
.section-standard {
  padding-top: var(--section-gap);
}

.collapsible-heading { margin: 0; }

.collapsible-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: -0.75rem -0.75rem 2rem;
  padding: 0.75rem;
  border: var(--collapsible-border);
  border-radius: 0.5rem;
  background: none;
  color: var(--heading);
  text-align: left;
  cursor: pointer;
}

.collapsible-trigger-text {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 1.75rem);
  font-weight: var(--section-title-weight);
  font-style: var(--section-title-style, normal);
  line-height: 1.2;
}

.collapsible-trigger:hover { background: var(--collapsible-hover); }

.collapsible-trigger:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

[data-theme="high-contrast"] .collapsible-trigger:focus-visible {
  outline-width: 4px;
}

.collapsible-trigger.is-expanded .collapsible-chevron {
  transform: rotate(180deg);
}

.collapsible-chevron {
  flex-shrink: 0;
  transition: transform 0.3s;
  color: var(--heading);
}

[data-theme="high-contrast"] .collapsible-chevron {
  stroke-width: 3;
  color: #ffff00;
}

.collapsible-panel {
  overflow: hidden;
  max-height: 10000px;
  opacity: 1;
  transition: max-height 0.5s ease-in-out, opacity 0.4s ease-in-out;
}

.collapsible-panel.is-collapsed {
  max-height: 0;
  opacity: 0;
}

.writing-intro {
  font-size: var(--writing-intro-size, clamp(1.063rem, 2.75vw, 1.188rem));
  line-height: 1.7;
  color: var(--writing-intro-text);
  font-style: var(--writing-intro-style, normal);
  font-weight: 400;
  margin: 0 0 clamp(2.5rem, 5vw, 3.5rem);
}

/* Experience entries */
.exp-entry { margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.exp-entry:last-child { margin-bottom: 0; }

.exp-entry h3 {
  font-size: clamp(1.125rem, 3vw, 1.625rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--heading);
  margin: 0 0 0.5rem;
}

.exp-company {
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--heading);
}

.exp-industry,
.exp-period {
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  margin: 0 0 0.5rem;
  color: var(--text-muted);
}

[data-theme="dark"] .exp-industry { color: #d9d9d9; }
[data-theme="dark"] .exp-period { color: #b3b3b3; font-weight: 300; }

.exp-description,
.experience-footer {
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  line-height: 1.7;
  color: var(--text-muted);
}

.experience-footer { margin-top: clamp(2rem, 4vw, 2.5rem); }

[data-theme="high-contrast"] .exp-entry h3,
[data-theme="high-contrast"] .exp-company,
[data-theme="high-contrast"] .exp-industry,
[data-theme="high-contrast"] .exp-period,
[data-theme="high-contrast"] .exp-description,
[data-theme="high-contrast"] .experience-footer {
  font-weight: 700;
}

[data-theme="high-contrast"] .exp-entry h3,
[data-theme="high-contrast"] .exp-company { font-weight: 900; }

/* Writing list */
.writing-list {
  border-top: 1px solid var(--list-border);
  border-bottom: 1px solid var(--list-border);
}

[data-theme="high-contrast"] .writing-list {
  border-width: 2px;
}

.writing-entry {
  padding: 1.5rem 8px;
  border-bottom: 1px solid var(--list-border);
}

.writing-entry:last-child { border-bottom: none; }

.writing-title-heading { margin: 0; }

.writing-title-link,
.writing-title-plain {
  display: inline-block;
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 0.75rem;
  color: var(--heading);
}

.writing-title-link {
  text-decoration: underline;
  text-decoration-color: var(--link-underline);
  text-underline-offset: 3px;
}

[data-theme="high-contrast"] .writing-title-link {
  color: #ffff00;
  font-weight: 900;
  text-decoration-thickness: 3px;
}

.writing-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.writing-badge {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: var(--badge-bg);
  color: var(--badge-text);
}

[data-theme="high-contrast"] .writing-badge {
  font-weight: 900;
  padding: 0.35rem 0.75rem;
}

.writing-description {
  font-size: clamp(0.938rem, 2vw, 1.063rem);
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0;
}

/* Standalone writing article pages */
.article-page .back-link {
  display: inline-block;
  margin-bottom: clamp(2rem, 5vw, 3rem);
  font-size: 0.938rem;
  color: var(--text-muted);
}

.article-page .writing-badges { margin-bottom: 1.25rem; }

.article-title {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--heading);
  margin: 0 0 1.25rem;
}

.article-page .writing-title-link {
  display: inline-block;
  margin-top: 1.5rem;
}

/* Y2K experience / writing */
.section-y2k { margin: 20px 0; }

.y2k-white-panel {
  padding: 20px;
  background: #fff;
  border: 3px outset #cccccc;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
}

.y2k-white-panel > h2 {
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;
  margin: 0 0 20px;
  font-family: Arial, Helvetica, sans-serif;
  border-bottom: 2px groove #cccccc;
  padding-bottom: 8px;
  text-shadow: 1px 1px 0 #fff, 2px 2px 0 #999, 3px 3px 2px rgba(0, 0, 0, 0.3);
}

.y2k-exp-item {
  padding: 15px;
  margin-bottom: 0;
  border-bottom: 1px dotted #cccccc;
}

.y2k-exp-item:last-child { border-bottom: none; }
.y2k-exp-alt-b { background: #f5f5f5; }

.y2k-exp-item h3 {
  font-size: 1.1rem;
  margin: 0 0 8px;
  font-family: Arial, Helvetica, sans-serif;
}

.y2k-exp-meta, .y2k-exp-period {
  font-size: 0.9rem;
  color: #666;
  margin: 0 0 5px;
}

.y2k-exp-item > p:last-child {
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

.y2k-writing-heading {
  text-align: center;
  font-size: 1.75rem;
}

.y2k-writing-sub {
  text-align: center;
  font-size: 1.05rem;
  color: #333;
  margin: 0 0 25px;
}

.y2k-writing-card {
  background: #fff;
  border: 2px inset #ddbb88;
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 15px;
}

.y2k-new-badge {
  display: inline-block;
  background: linear-gradient(135deg, #cc0000, #990000);
  color: #ff0;
  font-size: 0.7rem;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 3px;
  margin-right: 8px;
  text-transform: uppercase;
  border: 1px solid #900;
  animation: blink 1.5s infinite;
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.4; }
}

.y2k-writing-title { font-size: 1.1rem; margin: 0 0 8px; display: inline; }
.y2k-writing-title a { color: #0066cc; }
.y2k-link-arrow { color: #0066cc; margin-right: 6px; }
.y2k-writing-meta { font-size: 0.85rem; color: #666; font-style: italic; margin: 8px 0 10px; }

/* —— Footer —— */
.footer-standard {
  padding-top: var(--section-gap);
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

.footer-standard h2 {
  font-size: clamp(1.5rem, 4vw, 1.75rem);
  font-weight: var(--section-title-weight);
  font-style: var(--section-title-style, normal);
  color: var(--heading);
  margin: 0 0 1.5rem;
}

.footer-standard > .content > p {
  font-size: clamp(1.063rem, 2.75vw, 1.188rem);
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0 0 clamp(2.5rem, 5vw, 3rem);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
  width: fit-content;
  color: var(--link);
}

[data-theme="high-contrast"] .footer-links a {
  font-weight: 900;
  text-decoration-thickness: 3px;
}

.footer-email {
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  color: var(--text-muted);
}

/* Y2K footer */
.footer-y2k {
  margin: 20px 0 50px;
  padding-bottom: 40px;
}

.y2k-connect-panel { text-align: center; }

.y2k-connect-panel > p {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 20px;
}

.y2k-linkedin-btn {
  display: inline-block;
  padding: 10px 20px;
  background: linear-gradient(to bottom, #3573bb 0%, #2e5c8a 100%);
  color: #fff !important;
  text-decoration: none;
  font-weight: bold;
  border-radius: 6px;
  border: 1px solid #1e4c7a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3);
}

.y2k-linkedin-btn:hover {
  background: linear-gradient(to bottom, #2e5c8a 0%, #244566 100%);
}

.y2k-email-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.y2k-email-icon { animation: blink 1.5s step-start infinite; }

.visitor-block {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px dashed #999;
}

.visitor-block > p { font-size: 0.85rem; color: #666; }

.visitor-counter {
  display: inline-block;
  background: linear-gradient(to bottom, #1a1a1a, #000);
  border: 2px inset #666;
  padding: 8px 16px;
  border-radius: 4px;
  margin-top: 10px;
}

#visitor-count {
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.5rem;
  font-weight: bold;
  color: #0f0;
  text-shadow: 0 0 5px #0f0;
  letter-spacing: 3px;
}

.last-updated {
  font-size: 0.75rem;
  color: #767676;
  font-style: italic;
  margin-top: 20px;
}

@media (prefers-reduced-motion: reduce) {
  .marquee-text { animation: none; }
  .y2k-new-badge { animation: none; opacity: 1; }
  .y2k-email-icon { animation: none; opacity: 1; }
  #theme-switcher-backdrop.is-open { animation: none; }
  #theme-switcher-sheet.is-open { animation: none; }
}
