/* Hallmark · CV v5 redesign: Editorial Minimalist with Premium Interactive Accents */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ── tokens & themes ───────────────────────────── */
:root {
  /* Default: Light Theme (Eggshell Blueprint) */
  --bg-paper: #faf9f6;
  --bg-panel: rgba(244, 243, 238, 0.75);
  --text-primary: #121312;
  --text-secondary: #4a4b49;
  --text-muted: #848682;
  --accent: #ef4f2f;
  --accent-soft: rgba(239, 79, 47, 0.05);
  --accent-soft-border: rgba(239, 79, 47, 0.12);
  --border-color: #e2e1db;
  --border-color-soft: #eeede6;

  --bg-grid-color: rgba(26, 28, 25, 0.02);
  --bg-grid-color-soft: rgba(26, 28, 25, 0.008);

  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Space Grotesk", "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "Space Grotesk", ui-monospace, "SFMono-Regular", "Roboto Mono", Menlo, Consolas, monospace;

  /* 4-pt spacing scale */
  --s-0: 0;
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-7: 32px;
  --s-8: 40px;
  --s-9: 56px;
  --s-10: 72px;
  --s-11: 96px;
  --s-12: 128px;

  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --shell-pad: clamp(24px, 5vw, 64px);
  --content-max: 1200px;
  
  color-scheme: light;
}

html.dark {
  /* Dark Theme overrides (Matte Graphite / Electric Ember) */
  --bg-paper: #111211;
  --bg-panel: rgba(22, 23, 22, 0.8);
  --text-primary: #f2f3f2;
  --text-secondary: #a3a5a1;
  --text-muted: #6e706c;
  --accent: #ff5e3a;
  --accent-soft: rgba(255, 94, 58, 0.08);
  --accent-soft-border: rgba(255, 94, 58, 0.18);
  --border-color: #262726;
  --border-color-soft: #1d1e1d;

  --bg-grid-color: rgba(255, 255, 255, 0.012);
  --bg-grid-color-soft: rgba(255, 255, 255, 0.005);
  
  color-scheme: dark;
}

/* ── reset & globals ──────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background: var(--bg-paper);
  overflow-x: clip;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-paper);
  background-image:
    radial-gradient(circle at 40% 35%, rgba(255, 255, 255, 0.01), transparent 30%),
    linear-gradient(var(--bg-grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid-color) 1px, transparent 1px),
    linear-gradient(var(--bg-grid-color-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid-color-soft) 1px, transparent 1px);
  background-size: auto, 80px 80px, 80px 80px, 20px 20px, 20px 20px;
  color: var(--text-primary);
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  overflow-x: clip;
  text-rendering: optimizeLegibility;
  transition: background-color 0.4s var(--ease-in-out), color 0.4s var(--ease-in-out), background-image 0.4s var(--ease-in-out);
}

::selection {
  background: var(--accent);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── skip link ──────────────────────────────── */
.skip-link {
  background: var(--text-primary);
  border-radius: 4px;
  color: var(--bg-paper);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  left: 12px;
  letter-spacing: 0.06em;
  padding: var(--s-2) var(--s-3);
  position: absolute;
  text-decoration: none;
  text-transform: uppercase;
  top: -100px;
  transition: top 0.18s var(--ease-out);
  z-index: 100;
}

.skip-link:focus {
  top: 12px;
}

/* ── general links ──────────────────────────── */
a {
  color: var(--text-primary);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.25s var(--ease-out);
}

a:hover,
a:focus-visible {
  color: var(--accent);
}

/* ── shell ──────────────────────────────────── */
.cv-shell {
  margin: 0 auto;
  max-width: 1200px;
  padding: var(--s-10) var(--shell-pad) var(--s-12);
}

/* ── cursor follower ────────────────────────── */
.cursor-follower {
  position: fixed;
  width: 20px;
  height: 20px;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%) scale(1);
  opacity: 0;
  mix-blend-mode: difference;
  transition: opacity 0.25s ease, transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: none;
}

.cursor-follower.active {
  transform: translate(-50%, -50%) scale(2.2);
  border-color: rgba(255, 255, 255, 1);
  background: rgba(255, 255, 255, 0.15);
}

@media (pointer: fine) {
  .cursor-follower {
    display: block;
  }
}

@media (pointer: coarse) {
  .cursor-follower {
    display: none !important;
  }
}

/* ── top nav & theme toggle ─────────────────── */
.top-nav {
  align-items: center;
  display: flex;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  gap: var(--s-2);
  justify-content: center;
  letter-spacing: 0.06em;
  margin-bottom: var(--s-11);
  opacity: 0;
  text-transform: uppercase;
}

.top-nav-item {
  display: inline-flex;
  align-items: center;
}

.top-nav-item a {
  color: var(--text-muted);
  font-weight: 500;
  min-height: 44px;
  padding: var(--s-1);
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: color 0.2s var(--ease-out);
}

.top-nav-item a:hover,
.top-nav-item a:focus-visible {
  color: var(--accent);
}

.top-nav-sep {
  color: var(--text-muted);
  user-select: none;
}

/* theme toggle button */
.theme-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s var(--ease-out);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  position: relative;
  outline: none;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  color: var(--accent);
}

.theme-toggle-icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  transition: transform 0.5s var(--ease-out);
}

.theme-toggle:hover .theme-toggle-icon {
  transform: rotate(45deg);
}

.theme-icon-circle {
  transition: r 0.4s var(--ease-out), fill 0.4s var(--ease-out);
}

.theme-icon-rays {
  transform-origin: center;
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}

html.dark .theme-icon-rays {
  opacity: 0;
  transform: scale(0.4) rotate(45deg);
}

html.dark .theme-icon-circle {
  r: 6px;
  fill: currentColor;
}

/* ── hero section ───────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 55fr 45fr;
  gap: var(--s-9);
  margin-bottom: var(--s-12);
  min-width: 0;
}

.hero-left,
.hero-right {
  min-width: 0;
}

.hero-eyebrow {
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  margin: 0 0 var(--s-5);
  text-transform: uppercase;
}

h1 {
  display: flex;
  flex-direction: column;
  font-family: var(--display);
  font-weight: 700;
  gap: 0.04em;
  letter-spacing: -0.05em;
  line-height: 0.9;
  margin: 0 0 var(--s-7);
  min-width: 0;
}

.h1-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.1em;
}

.h1-line--a {
  font-size: clamp(64px, 10vw, 144px);
  font-weight: 700;
  letter-spacing: -0.05em;
}

.h1-line--b {
  font-size: clamp(36px, 5vw, 80px);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text-secondary);
}

/* word-mask reveal */
.word-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}

.word-inner {
  display: inline-block;
  clip-path: inset(0 100% 0 0);
}

/* flower loader */
.flower-loader {
  display: inline-block;
  width: 0.28em;
  height: 0.28em;
  vertical-align: middle;
  margin-left: 0.04em;
  flex-shrink: 0;
  color: var(--accent);
}

.hero-lead {
  color: var(--text-secondary);
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  margin: 0;
  max-width: 52ch;
}

/* ── stat panel (Downloads widget) ──────────── */
.stat-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  padding: var(--s-7) var(--s-6);
  margin-bottom: var(--s-6);
  border-radius: 4px;
  transition: background-color 0.4s var(--ease-in-out), border-color 0.4s var(--ease-in-out);
}

.stat-figure {
  align-items: baseline;
  color: var(--text-primary);
  display: flex;
  font-family: var(--display);
  font-size: clamp(52px, 7vw, 88px);
  font-weight: 700;
  justify-content: center;
  letter-spacing: -0.03em;
  line-height: 0.9;
  margin: 0;
}

.stat-plus {
  color: var(--accent);
  font-size: 0.4em;
  font-weight: 700;
  margin-left: 0.02em;
}

.stat-label {
  color: var(--text-muted);
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.4;
  margin: var(--s-3) 0 var(--s-5);
  text-align: center;
  text-transform: uppercase;
}

.stat-bar-track {
  height: 4px;
  background: var(--border-color-soft);
  overflow: hidden;
  margin: 0 auto;
  max-width: 320px;
  position: relative;
  border-radius: 2px;
}

.stat-bar {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  /* Segmented LED visual meter */
  background-image: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 4px,
    var(--bg-paper) 4px,
    var(--bg-paper) 6px
  );
  transition: background-image 0.4s var(--ease-in-out);
}

/* ── facts ──────────────────────────────────── */
.facts {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
}

.facts-row {
  align-items: baseline;
  display: grid;
  gap: var(--s-4);
  grid-template-columns: 88px minmax(0, 1fr);
  padding: var(--s-3) 0;
  border-top: 1px solid var(--border-color-soft);
}

.facts-row:first-of-type {
  border-top: 1px solid var(--border-color);
}

.facts-row:last-of-type {
  border-bottom: 1px solid var(--border-color-soft);
}

.facts dt {
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.facts dd {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

/* ── editorial sections ─────────────────────── */
.section {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--s-9);
  padding-top: var(--s-11);
  min-width: 0;
  opacity: 0;
  transform: translateY(32px);
  transition: border-color 0.4s var(--ease-in-out);
}

.section:first-of-type {
  padding-top: 0;
}

.section-num {
  font-family: var(--display);
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.85;
  color: var(--border-color);
  user-select: none;
  padding-top: 0.04em;
  will-change: transform;
  transition: color 0.4s var(--ease-in-out);
}

.section-body {
  min-width: 0;
}

.section-label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 var(--s-6);
  line-height: 1.2;
}

.section p {
  color: var(--text-secondary);
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.65;
  max-width: 60ch;
}

.section p + p {
  margin-top: var(--s-3);
}

/* ── competencies grid ──────────────────────── */
.comp-grid {
  display: grid;
  gap: var(--s-7) var(--s-8);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.comp-grid article {
  min-width: 0;
}

.comp-grid h3 {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 0 0 var(--s-4);
  padding-top: var(--s-4);
  border-top: 1px solid var(--text-primary);
  transition: border-color 0.4s var(--ease-in-out);
}

.comp-grid ul {
  color: var(--text-secondary);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
  list-style: none;
}

.comp-grid li {
  padding-left: var(--s-5);
  position: relative;
}

.comp-grid li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 1px;
  background: var(--text-muted);
}

.comp-grid li + li {
  margin-top: var(--s-2);
}

/* ── sliding underlines for text links ──────── */
.section-body a,
.psx-layout a,
.bullet-list a {
  position: relative;
  text-decoration: none;
  color: var(--text-primary);
  transition: color 0.2s var(--ease-out);
}

.section-body a::after,
.psx-layout a::after,
.bullet-list a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.3s var(--ease-out);
}

.section-body a:hover,
.psx-layout a:hover,
.bullet-list a:hover {
  color: var(--accent);
}

.section-body a:hover::after,
.psx-layout a:hover::after,
.bullet-list a:hover::after {
  transform: scaleX(1);
  transform-origin: left center;
}

/* ── project list ───────────────────────────── */
.project-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.project-item {
  border-top: 1px solid var(--border-color-soft);
  padding: var(--s-4) 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  min-width: 0;
  transition: border-color 0.4s var(--ease-in-out);
}

.project-item:first-child {
  border-top: 1px solid var(--border-color);
}

.project-item:last-child {
  border-bottom: 1px solid var(--border-color-soft);
}

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-2);
}

.project-title {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  text-decoration: none;
}

.project-badge {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--accent-soft-border);
  transition: background-color 0.4s var(--ease-in-out), border-color 0.4s var(--ease-in-out);
}

.project-desc {
  color: var(--text-secondary);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
}

/* ── PSX section ────────────────────────────── */
.psx-layout {
  display: grid;
  gap: var(--s-8);
  grid-template-columns: minmax(0, 1fr) minmax(0, 280px);
}

.psx-main h2 {
  margin-bottom: var(--s-4);
}

.psx-main p {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: var(--s-5);
  color: var(--text-secondary);
}

.psx-dl {
  display: grid;
  gap: 0;
}

.psx-dl > div {
  border-top: 1px solid var(--border-color-soft);
  display: grid;
  gap: var(--s-3);
  grid-template-columns: 96px minmax(0, 1fr);
  padding: var(--s-3) 0;
  transition: border-color 0.4s var(--ease-in-out);
}

.psx-dl > div:last-child {
  border-bottom: 1px solid var(--border-color-soft);
}

.psx-dl dt {
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.psx-dl dd {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.psx-links-kicker {
  color: var(--text-muted);
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: var(--s-4);
  text-transform: uppercase;
}

.psx-links-list {
  color: var(--text-secondary);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
}

.psx-links-list a {
  font-weight: 500;
}

/* ── bullet list ────────────────────────────── */
.bullet-list {
  color: var(--text-secondary);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
  list-style: none;
}

.bullet-list li {
  padding-left: var(--s-5);
  position: relative;
}

.bullet-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 1px;
  background: var(--text-muted);
}

.bullet-list li + li {
  margin-top: var(--s-3);
}

/* ── categorized tools ──────────────────────── */
.tools-categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-6) var(--s-8);
  margin-top: var(--s-4);
}

.tools-cat-group {
  min-width: 0;
}

.tools-cat-title {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--s-4);
  border-bottom: 1px solid var(--border-color-soft);
  padding-bottom: var(--s-2);
  transition: border-color 0.4s var(--ease-in-out);
}

.tools-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  list-style: none;
}

.tools-list li {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  cursor: pointer;
  position: relative;
  padding: 2px 0;
  display: flex;
  align-items: center;
  min-height: auto;
  transition: color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
  will-change: transform;
}

.tools-list li::before {
  content: "//";
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  margin-right: var(--s-2);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}

.tools-list li:hover {
  color: var(--accent);
  transform: translateX(4px);
}

.tools-list li:hover::before {
  opacity: 1;
  transform: translateX(0);
}

/* ── footer ─────────────────────────────────── */
.cv-footer {
  margin-top: var(--s-11);
}

.footer-rule {
  border: 0;
  border-top: 1px solid var(--border-color);
  margin: 0 0 var(--s-5);
  transform: scaleX(0);
  transform-origin: left center;
  width: 100%;
  transition: border-color 0.4s var(--ease-in-out);
}

.footer-inner {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  gap: var(--s-2) var(--s-4);
  justify-content: center;
  letter-spacing: 0.04em;
}

.footer-brand {
  color: var(--text-primary);
  font-weight: 600;
}

.footer-links {
  align-items: center;
  display: inline-flex;
  gap: var(--s-2);
  color: var(--text-muted);
}

.footer-links a,
.footer-pdf {
  color: var(--text-muted);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}

.footer-links a:hover,
.footer-links a:focus-visible,
.footer-pdf:hover,
.footer-pdf:focus-visible {
  color: var(--accent);
}

.footer-pdf {
  min-height: 44px;
  display: flex;
  align-items: center;
}

/* ── responsive — tablet (≤768px) ───────────── */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    gap: var(--s-8);
  }

  .stat-panel {
    padding: var(--s-5) var(--s-4);
  }

  .section {
    grid-template-columns: 1fr;
    gap: var(--s-4);
  }

  .section-num {
    font-size: clamp(32px, 8vw, 48px);
    padding-top: 0;
  }

  .comp-grid {
    grid-template-columns: 1fr;
    gap: var(--s-6);
  }

  .psx-layout {
    grid-template-columns: 1fr;
    gap: var(--s-6);
  }

  .tools-categories {
    grid-template-columns: 1fr;
    gap: var(--s-6);
  }

  .facts-row {
    grid-template-columns: 80px minmax(0, 1fr);
  }

  .footer-inner {
    justify-content: flex-start;
  }
}

/* ── responsive — mobile (≤520px) ────────────── */
@media (max-width: 520px) {
  body {
    font-size: 16px;
  }

  .cv-shell {
    padding: var(--s-7) var(--s-4) var(--s-9);
  }

  .top-nav {
    font-size: 11px;
    margin-bottom: var(--s-8);
  }

  .h1-line--a {
    font-size: clamp(48px, 14vw, 72px);
  }

  .h1-line--b {
    font-size: clamp(28px, 8vw, 44px);
  }

  .hero {
    gap: var(--s-6);
    margin-bottom: var(--s-9);
  }

  .hero-lead {
    font-size: 16px;
  }

  .stat-figure {
    font-size: clamp(44px, 12vw, 64px);
  }

  .facts-row {
    grid-template-columns: 1fr;
    gap: var(--s-1);
  }

  .project-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-1);
  }

  .project-badge {
    align-self: flex-start;
  }

  .psx-dl > div {
    grid-template-columns: 1fr;
    gap: var(--s-1);
  }

  .tools-list li {
    font-size: 14px;
  }

  .section {
    padding-top: var(--s-9);
  }

  .section-label {
    font-size: 11px;
    margin-bottom: var(--s-5);
  }

  .section p {
    font-size: 16px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    font-size: 11px;
  }

  .comp-grid li,
  .bullet-list li {
    font-size: 14px;
  }
}

/* ── reduced motion overrides ───────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .word-inner {
    clip-path: inset(0 0% 0 0);
  }

  .stat-bar {
    transform: scaleX(1);
  }

  .top-nav {
    opacity: 1;
  }

  .section {
    opacity: 1;
    transform: none;
  }

  .footer-rule {
    transform: scaleX(1);
  }
}

/* ── print styling (optimized for A4) ───────── */
@page {
  margin: 13mm;
  size: A4;
}

@media print {
  :root {
    --bg-paper: #ffffff;
    --bg-panel: #ffffff;
    --text-primary: #111111;
    --text-secondary: #333333;
    --text-muted: #666666;
    --accent: #cc3a20;
    --border-color: #cccccc;
    --border-color-soft: #e8e8e8;
  }

  html,
  body {
    background: #ffffff !important;
    font-size: 11px;
    line-height: 1.45;
  }

  .web-only,
  .flower-loader,
  .cursor-follower,
  .skip-link,
  .theme-toggle,
  .stat-panel,
  .footer-pdf,
  .psx-links {
    display: none !important;
  }

  .cv-shell {
    max-width: none;
    padding: 0;
  }

  .top-nav {
    display: none !important;
  }

  .hero {
    display: block;
    margin-bottom: 5mm;
  }

  .hero-eyebrow {
    font-size: 9px;
    margin-bottom: 1mm;
    color: var(--text-muted);
  }

  h1 {
    margin-bottom: 2mm;
    gap: 1px;
  }

  .h1-line--a {
    font-size: 24px;
    font-weight: 700;
  }

  .h1-line--b {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-secondary);
  }

  .word-inner {
    clip-path: inset(0 0% 0 0);
  }

  .hero-lead {
    font-size: 10px;
    line-height: 1.4;
    color: var(--text-secondary);
    margin-top: 1mm;
  }

  .facts {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5mm 4mm;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 2mm 0;
    margin-top: 3mm;
  }

  .facts-row {
    display: flex;
    align-items: baseline;
    gap: 1.5mm;
    border: none !important;
    padding: 0 !important;
  }

  .facts dt {
    font-size: 8.5px;
    font-weight: 700;
    color: var(--text-muted);
  }

  .facts dd {
    font-size: 9.5px;
    font-weight: 500;
  }

  .section {
    display: block;
    padding-top: 4mm;
    opacity: 1 !important;
    transform: none !important;
    break-inside: avoid;
  }

  .section-num {
    display: none !important;
  }

  .section-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-primary);
    border-bottom: 1.5px solid var(--text-primary);
    padding-bottom: 1mm;
    margin-bottom: 2mm;
  }

  .section p {
    font-size: 10px;
    line-height: 1.4;
    color: var(--text-secondary);
  }

  .comp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3mm 6mm;
  }

  .comp-grid article {
    break-inside: avoid;
  }

  .comp-grid h3 {
    font-size: 9.5px;
    font-weight: 700;
    margin-bottom: 1.5mm;
    padding-top: 1.5mm;
    border-top: 1px solid var(--border-color);
  }

  .comp-grid ul {
    font-size: 9px;
    line-height: 1.35;
  }

  .comp-grid li {
    padding-left: 3mm;
  }

  .comp-grid li::before {
    top: 0.5em;
    width: 4px;
    height: 1px;
    background: var(--text-muted);
  }

  .project-list {
    display: flex;
    flex-direction: column;
    gap: 1.5mm;
  }

  .project-item {
    display: block;
    border: none !important;
    padding: 0 !important;
    margin-bottom: 1.5mm;
    break-inside: avoid;
  }

  .project-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5mm;
  }

  .project-title {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-primary);
  }

  .project-badge {
    font-size: 8px;
    font-weight: 600;
    color: var(--text-muted);
    background: none !important;
    border: none !important;
    padding: 0 !important;
    font-family: var(--mono);
  }

  .project-desc {
    font-size: 9.5px;
    line-height: 1.35;
    color: var(--text-secondary);
  }

  .psx-layout {
    display: block;
  }

  .psx-main p {
    font-size: 10px;
    margin-bottom: 2mm;
  }

  .psx-dl {
    display: flex;
    flex-wrap: wrap;
    gap: 2mm 5mm;
    border-top: 1px solid var(--border-color);
    padding-top: 2mm;
  }

  .psx-dl > div {
    display: flex;
    align-items: baseline;
    gap: 1.5mm;
    border: none !important;
    padding: 0 !important;
  }

  .psx-dl dt {
    font-size: 8.5px;
    font-weight: 700;
    color: var(--text-muted);
  }

  .psx-dl dd {
    font-size: 9.5px;
    font-weight: 500;
  }

  .bullet-list {
    font-size: 9.5px;
    line-height: 1.4;
  }

  .bullet-list li {
    padding-left: 3mm;
  }

  .bullet-list li::before {
    top: 0.5em;
    width: 4px;
    height: 1px;
    background: var(--text-muted);
  }

  .bullet-list li + li {
    margin-top: 1mm;
  }

  .tools-categories {
    display: flex;
    flex-direction: column;
    gap: 2.5mm;
    margin-top: 1mm;
  }

  .tools-cat-group {
    display: flex;
    align-items: baseline;
    gap: 2mm;
    border: none;
    padding: 0;
  }

  .tools-cat-title {
    font-size: 9px;
    font-weight: 700;
    width: 25mm;
    flex-shrink: 0;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--text-muted);
  }

  .tools-list {
    display: block !important;
  }

  .tools-list li {
    display: inline !important;
    font-size: 9.5px;
    font-weight: 500;
    padding: 0 !important;
    margin: 0 !important;
  }

  .tools-list li::before {
    display: none !important;
  }

  .tools-list li::after {
    content: " · ";
    color: var(--text-muted);
    font-weight: normal;
  }

  .tools-list li:last-child::after {
    content: "";
  }

  .cv-footer {
    margin-top: 5mm;
  }

  .footer-rule {
    border-top: 1px solid var(--border-color);
    transform: scaleX(1) !important;
  }

  .footer-inner {
    font-size: 8.5px;
    justify-content: space-between;
  }

  .footer-links {
    gap: 3mm;
  }

  a {
    color: #111;
    text-decoration: none;
  }
}
