/* ==========================================================================
   DAVID TIMOTEUS — ARCHITECTURAL EDITORIAL PORTFOLIO SYSTEM
   Design Language: Swiss Hairline Grid × Sanity Editorial × Crimson Kinetic
   Zero Generic Template Cards — Built on Typography, Hairlines & Motion
   ========================================================================== */

:root,
[data-theme="obsidian-crimson"] {
  --bg: #080708;
  --bg-alt: #0e0b0d;
  --bg-elevated: #140f12;
  --bg-hover: rgba(225, 29, 72, 0.065);
  --bg-active: rgba(225, 29, 72, 0.12);

  /* Dominant Crimson & Vermilion Palette */
  --red: #e11d48;
  --red-bright: #ff2e55;
  --red-light: #fb7185;
  --red-dark: #881337;
  --red-glow: rgba(225, 29, 72, 0.32);

  --ink: #faf7f8;
  --ink-2: #c2b6ba;
  --ink-3: #7e7075;

  /* Structural Hairlines */
  --line: rgba(255, 240, 245, 0.09);
  --line-strong: rgba(255, 240, 245, 0.18);
  --line-red: rgba(225, 29, 72, 0.5);

  --emerald: #10b981;
}

[data-theme="velvet-crimson"] {
  --bg: #130508;
  --bg-alt: #1b070c;
  --bg-elevated: #260b12;
  --bg-hover: rgba(255, 46, 85, 0.1);
  --bg-active: rgba(255, 46, 85, 0.18);

  --red: #ff2e55;
  --red-bright: #ff5c7c;
  --red-light: #fda4af;
  --red-dark: #9f1239;
  --red-glow: rgba(255, 46, 85, 0.4);

  --ink: #fff5f7;
  --ink-2: #e4c5cd;
  --ink-3: #a67d88;

  --line: rgba(255, 215, 225, 0.12);
  --line-strong: rgba(255, 215, 225, 0.22);
  --line-red: rgba(255, 92, 124, 0.6);
}

[data-theme="swiss-red"] {
  --bg: #f8f5f2;
  --bg-alt: #f0ebe6;
  --bg-elevated: #ffffff;
  --bg-hover: rgba(217, 27, 56, 0.055);
  --bg-active: rgba(217, 27, 56, 0.11);

  --red: #d91b38;
  --red-bright: #b8112b;
  --red-light: #e11d48;
  --red-dark: #fecdd3;
  --red-glow: rgba(217, 27, 56, 0.18);

  --ink: #140d0f;
  --ink-2: #483c40;
  --ink-3: #78696e;

  --line: rgba(20, 13, 15, 0.11);
  --line-strong: rgba(20, 13, 15, 0.22);
  --line-red: rgba(217, 27, 56, 0.55);
}

:root {
  --font-display: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;

  --max-w: 1320px;
  --pad-x: clamp(1.15rem, 4vw, 3.25rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================================================================
   1. RESET & GLOBAL CANVAS
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
  overflow-x: hidden;
}

body {
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.4s var(--ease-out), color 0.3s ease;
}

::selection {
  background: var(--red);
  color: #ffffff;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

.wrap {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

/* Architectural Vertical Guide Rails (Desktop) */
.arch-frame {
  max-width: var(--max-w);
  margin-inline: auto;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  position: relative;
}

/* Custom Magnetic Cursor Follower (Desktop Only) */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--red-bright);
  box-shadow: 0 0 10px var(--red);
}

.cursor-ring {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-red);
  transition: width 0.25s var(--ease-out), height 0.25s var(--ease-out), background-color 0.25s ease;
}

.cursor-ring.is-active {
  width: 58px;
  height: 58px;
  background: rgba(225, 29, 72, 0.12);
  border-color: var(--red-bright);
}

@media (hover: none), (max-width: 1024px) {
  .cursor-dot,
  .cursor-ring {
    display: none !important;
  }
  .arch-frame {
    border-left: none;
    border-right: none;
  }
}

/* Top Scroll Progress Line */
.scroll-line {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--red-dark), var(--red), var(--red-bright));
  box-shadow: 0 0 12px var(--red);
  z-index: 2000;
}

/* Ambient Crimson Mesh Spotlight */
.ambient-light {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.ambient-glow {
  position: absolute;
  width: 650px;
  height: 650px;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.22;
  background: radial-gradient(circle, var(--red) 0%, transparent 70%);
  top: -260px;
  right: -120px;
}

.ambient-glow--left {
  top: 45%;
  left: -220px;
  right: auto;
  opacity: 0.15;
}

/* ==========================================================================
   2. ARCHITECTURAL TOP BAR (CLEAN DESKTOP & ZERO-OVERFLOW MOBILE)
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(8, 7, 8, 0.84);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

[data-theme="swiss-red"] .topbar {
  background: rgba(248, 245, 242, 0.88);
}

.topbar-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 0.85rem var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.brand-mark {
  width: 30px;
  height: 30px;
  background: var(--red);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-sep {
  color: var(--red);
  margin-inline: 0.35rem;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-3);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-link {
  position: relative;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  padding-block: 0.25rem;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: var(--red-bright);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s var(--ease-out);
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--ink);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.action-btn:hover {
  border-color: var(--red);
  color: var(--ink);
  background: var(--bg-hover);
}

.action-btn--primary {
  background: var(--red);
  border-color: var(--red);
  color: #ffffff;
  font-weight: 600;
}

.action-btn--primary:hover {
  background: var(--red-bright);
  border-color: var(--red-bright);
  color: #ffffff;
}

.burger-btn {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  place-items: center;
  flex-shrink: 0;
}

/* ==========================================================================
   3. HERO — SWISS EDITORIAL ASYMMETRIC COMPOSITION (ZERO CARD BLOAT)
   ========================================================================== */
.hero {
  position: relative;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  min-height: calc(100vh - 68px);
}

.hero-main {
  padding: clamp(2.5rem, 6vw, 5.5rem) var(--pad-x);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--line);
}

.eyebrow-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.7rem;
  background: var(--bg-active);
  border-left: 2px solid var(--red);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--red-bright);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red-bright);
  box-shadow: 0 0 8px var(--red-bright);
  animation: blink 2s infinite;
}

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

.eyebrow-loc {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-3);
}

.hero-display {
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 5.2vw, 4.65rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
}

.hero-display .red-stroke {
  color: var(--red-bright);
}

.hero-display .role-line {
  display: block;
  font-size: clamp(1.2rem, 2.4vw, 2rem);
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: -0.02em;
  margin-top: 0.5rem;
}

.hero-narrative {
  font-size: clamp(0.98rem, 1.2vw, 1.1rem);
  color: var(--ink-2);
  max-width: 64ch;
  line-height: 1.75;
  margin-bottom: 2.25rem;
}

.hero-narrative strong {
  color: var(--ink);
  font-weight: 600;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 3rem;
}

.btn-editorial {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid var(--line-strong);
  overflow: hidden;
  transition: color 0.3s ease, border-color 0.3s ease, transform 0.25s var(--ease-spring);
}

.btn-editorial--red {
  background: var(--red);
  border-color: var(--red);
  color: #ffffff;
  box-shadow: 0 10px 30px -8px var(--red-glow);
}

.btn-editorial--red:hover {
  background: var(--red-bright);
  border-color: var(--red-bright);
  transform: translateY(-2px);
}

.btn-editorial--outline:hover {
  border-color: var(--red);
  background: var(--bg-hover);
  transform: translateY(-2px);
}

/* Architectural Telemetry Ledger Row (Bottom of Hero Left) */
.hero-ledger {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  gap: 1.25rem;
}

.ledger-stat {
  border-left: 2px solid var(--line-strong);
  padding-left: 0.9rem;
  transition: border-color 0.3s ease;
}

.ledger-stat:hover {
  border-left-color: var(--red-bright);
}

.ledger-val {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
}

.ledger-val small {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--red-bright);
  font-weight: 500;
}

.ledger-lbl {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.25rem;
}

/* Hero Right Column: Full-Height Architectural Portrait Column */
.hero-aside {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg-alt);
  position: relative;
  overflow: hidden;
}

.portrait-showcase {
  position: relative;
  flex: 1;
  min-height: 420px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.portrait-showcase img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.7s var(--ease-out), filter 0.5s ease;
}

.portrait-showcase:hover img {
  transform: scale(1.04);
}

.portrait-crimson-wash {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 50%, rgba(8, 7, 8, 0.92) 100%),
    radial-gradient(circle at 15% 30%, rgba(225, 29, 72, 0.2), transparent 55%);
  pointer-events: none;
}

.portrait-overlay-meta {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
}

.portrait-tag {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  background: var(--red);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.portrait-caption-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}

.portrait-caption-sub {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: #d8c8cd;
}

/* Credentials Strip Below Portrait */
.aside-credentials {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.cred-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px dashed var(--line);
}

.cred-line:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.cred-line span:first-child {
  color: var(--ink-3);
}

.cred-line strong {
  color: var(--ink);
  text-align: right;
}

/* ==========================================================================
   4. KINETIC MARQUEE BAND
   ========================================================================== */
.ticker-band {
  border-bottom: 1px solid var(--line);
  background: var(--bg-elevated);
  padding-block: 0.9rem;
  overflow: hidden;
  user-select: none;
}

.ticker-track {
  display: flex;
  width: max-content;
  gap: 2.5rem;
  animation: ticker 32s linear infinite;
}

.ticker-band:hover .ticker-track {
  animation-play-state: paused;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}

.ticker-dot {
  width: 6px;
  height: 6px;
  background: var(--red);
  transform: rotate(45deg);
}

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ==========================================================================
   5. EDITORIAL SECTION HEADER (SWISS INDEX SYSTEM)
   ========================================================================== */
.ed-section {
  border-bottom: 1px solid var(--line);
}

.ed-section-head {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 2rem;
  align-items: baseline;
  padding: clamp(2.5rem, 5vw, 4rem) var(--pad-x) clamp(1.75rem, 3.5vw, 2.75rem);
  border-bottom: 1px solid var(--line);
}

.ed-index {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--red-bright);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ed-index::before {
  content: "";
  width: 14px;
  height: 2px;
  background: var(--red);
}

.ed-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.2vw, 2.65rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.ed-sub {
  color: var(--ink-2);
  font-size: 0.96rem;
  max-width: 60ch;
  margin-top: 0.45rem;
}

/* ==========================================================================
   6. EXPERIENCE & EDUCATION LEDGER (ARCHITECTURAL TABLE — NO BOXY CARDS!)
   ========================================================================== */
.ledger-row {
  display: grid;
  grid-template-columns: 220px 1fr 260px;
  gap: 2rem;
  padding: clamp(1.75rem, 3.5vw, 2.75rem) var(--pad-x);
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: background-color 0.3s ease;
}

.ledger-row:last-child {
  border-bottom: none;
}

.ledger-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--red);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.35s var(--ease-out);
}

.ledger-row:hover {
  background-color: var(--bg-hover);
}

.ledger-row:hover::before {
  transform: scaleY(1);
}

.ledger-period {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

.ledger-period strong {
  display: block;
  color: var(--red-bright);
  margin-bottom: 0.2rem;
}

.ledger-role {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.2rem;
}

.ledger-org {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--red-bright);
  margin-bottom: 1rem;
}

.ledger-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.ledger-points li {
  position: relative;
  padding-left: 1.2rem;
  font-size: 0.93rem;
  color: var(--ink-2);
}

.ledger-points li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--red);
  font-weight: 700;
}

.ledger-points li strong {
  color: var(--ink);
}

.ledger-tags {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  justify-content: flex-end;
  gap: 0.4rem;
}

.tag-mono {
  padding: 0.22rem 0.6rem;
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-2);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.ledger-row:hover .tag-mono {
  border-color: var(--line-red);
  color: var(--ink);
}

/* ==========================================================================
   7. INTERACTIVE PROJECT ACCORDION INDEX (AWWWARDS / RAUNO STYLE)
   ========================================================================== */
.project-accordion-item {
  border-bottom: 1px solid var(--line);
  transition: background-color 0.3s ease;
}

.project-accordion-item:last-child {
  border-bottom: none;
}

.project-trigger {
  width: 100%;
  text-align: left;
  padding: clamp(1.35rem, 2.6vw, 2rem) var(--pad-x);
  display: grid;
  grid-template-columns: 64px 1.3fr 0.9fr 140px 44px;
  gap: 1.25rem;
  align-items: center;
  transition: background-color 0.25s ease, padding-left 0.3s var(--ease-out);
}

.project-trigger:hover,
.project-accordion-item.is-open .project-trigger {
  background: var(--bg-hover);
}

.proj-num {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--red-bright);
  font-weight: 600;
}

.proj-heading {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  transition: transform 0.3s var(--ease-out), color 0.25s ease;
}

.project-trigger:hover .proj-heading {
  transform: translateX(8px);
  color: var(--red-bright);
}

.proj-context {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-2);
}

.proj-year {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-3);
  text-align: right;
}

.proj-icon {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--ink-2);
  transition: transform 0.35s var(--ease-out), background-color 0.25s ease, border-color 0.25s ease;
}

.project-accordion-item.is-open .proj-icon {
  transform: rotate(45deg);
  background: var(--red);
  border-color: var(--red);
  color: #ffffff;
}

/* Smooth CSS Grid Row Collapse / Expand */
.project-drawer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease-out);
}

.project-accordion-item.is-open .project-drawer {
  grid-template-rows: 1fr;
}

.project-drawer-inner {
  overflow: hidden;
}

.project-drawer-content {
  padding: 0.5rem var(--pad-x) 2.25rem calc(var(--pad-x) + 64px + 1.25rem);
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 2.5rem;
  border-top: 1px dashed var(--line);
  padding-top: 1.5rem;
}

.proj-desc {
  font-size: 0.96rem;
  color: var(--ink-2);
  margin-bottom: 1.1rem;
  line-height: 1.7;
}

.proj-spec-table {
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.proj-spec-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.proj-spec-row span:first-child {
  color: var(--ink-3);
}

.proj-spec-row strong {
  color: var(--ink);
  text-align: right;
}

/* GitHub Live Ticker Strip */
.github-strip {
  padding: 2rem var(--pad-x);
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
}

.github-strip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.repo-ledger-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.repo-cell {
  padding: 1.35rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  transition: background-color 0.25s ease;
}

.repo-cell:hover {
  background: var(--bg-hover);
}

/* ==========================================================================
   8. INTERACTIVE SPLIT-STAGE CERTIFICATE INSPECTOR (NO 6 BOXY CARDS!)
   ========================================================================== */
.cert-inspector {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
}

.cert-selector-list {
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.cert-selector-btn {
  text-align: left;
  padding: 1.35rem var(--pad-x);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 1rem;
  align-items: center;
  position: relative;
  transition: background-color 0.25s ease;
}

.cert-selector-btn:last-child {
  border-bottom: none;
}

.cert-selector-btn::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--red);
  transform: scaleY(0);
  transition: transform 0.25s var(--ease-out);
}

.cert-selector-btn:hover,
.cert-selector-btn.is-active {
  background: var(--bg-active);
}

.cert-selector-btn.is-active::before {
  transform: scaleY(1);
}

.cert-idx {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--red-bright);
  font-weight: 600;
}

.cert-btn-title {
  font-family: var(--font-display);
  font-size: 1.04rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}

.cert-btn-issuer {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-3);
  margin-top: 0.2rem;
}

.cert-btn-arrow {
  font-family: var(--font-mono);
  color: var(--ink-3);
  transition: transform 0.25s ease, color 0.25s ease;
}

.cert-selector-btn.is-active .cert-btn-arrow {
  color: var(--red-bright);
  transform: translateX(4px);
}

/* Right Stage: Live Certificate Document Viewer */
.cert-stage {
  padding: clamp(1.5rem, 3vw, 2.5rem);
  background: var(--bg-alt);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
}

.cert-stage-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.cert-stage-issuer {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--red-bright);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cert-stage-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 0.15rem;
}

.cert-stage-reg {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  color: var(--ink-3);
  margin-top: 0.15rem;
}

.cert-page-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.cert-page-tab {
  padding: 0.38rem 0.8rem;
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-2);
  transition: all 0.2s ease;
}

.cert-page-tab.is-active,
.cert-page-tab:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.cert-canvas-frame {
  position: relative;
  background: #050405;
  border: 1px solid var(--line-strong);
  padding: 0.75rem;
  display: grid;
  place-items: center;
  min-height: 360px;
  cursor: zoom-in;
}

.cert-canvas-frame img {
  max-height: 440px;
  width: auto;
  object-fit: contain;
  transition: opacity 0.25s ease, transform 0.3s var(--ease-out);
}

.cert-stage-desc {
  font-size: 0.9rem;
  color: var(--ink-2);
  line-height: 1.65;
}

/* ==========================================================================
   9. ARCHITECTURAL SKILL & SKKNI SPECIFICATION MATRIX (NO BOXES!)
   ========================================================================== */
.spec-matrix-row {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  padding: 1.75rem var(--pad-x);
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.spec-matrix-row:last-child {
  border-bottom: none;
}

.spec-domain-label {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
}

.spec-domain-sub {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--red-bright);
  margin-top: 0.2rem;
}

.skkni-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.skkni-item {
  border-left: 2px solid var(--red);
  padding-left: 0.85rem;
}

.skkni-code {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--red-bright);
  font-weight: 600;
}

.skkni-text {
  font-size: 0.86rem;
  color: var(--ink-2);
  margin-top: 0.15rem;
}

/* ==========================================================================
   10. EDITORIAL FOOTER & CONTACT LEDGER
   ========================================================================== */
.contact-ledger {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
}

.contact-left {
  padding: clamp(2.5rem, 5vw, 4.5rem) var(--pad-x);
  border-right: 1px solid var(--line);
}

.contact-right {
  display: flex;
  flex-direction: column;
}

.contact-link-row {
  flex: 1;
  padding: 1.35rem var(--pad-x);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: background-color 0.25s ease, padding-left 0.25s var(--ease-out);
}

.contact-link-row:last-child {
  border-bottom: none;
}

.contact-link-row:hover {
  background: var(--bg-hover);
  padding-left: calc(var(--pad-x) + 8px);
}

.contact-lbl {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-3);
  text-transform: uppercase;
}

.contact-val {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  word-break: break-word;
}

/* ==========================================================================
   11. ATS CV MODAL & FULLSCREEN ZOOM MODAL
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(5, 4, 5, 0.88);
  backdrop-filter: blur(12px);
  display: grid;
  place-items: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-sheet {
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--line-red);
  padding: clamp(1rem, 2.5vw, 1.5rem);
}

.modal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

/* Exact Single-Column ATS Paper (David Timoteus_Assignment 5-CV ATS.pdf) */
.ats-paper {
  background: #ffffff;
  color: #111111;
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
  padding: clamp(1.25rem, 4vw, 2.75rem);
  line-height: 1.48;
  font-size: 0.88rem;
}

.ats-paper h1 {
  text-align: center;
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  font-weight: 800;
  color: #000;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.ats-contact-line {
  text-align: center;
  font-size: 0.78rem;
  color: #222;
  margin-bottom: 1.1rem;
  word-break: break-word;
}

.ats-contact-line a {
  color: #000;
  text-decoration: underline;
}

.ats-section {
  margin-bottom: 0.95rem;
}

.ats-section-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: #000;
  border-bottom: 1.5px solid #000;
  padding-bottom: 0.15rem;
  margin-bottom: 0.5rem;
}

.ats-entry {
  margin-bottom: 0.65rem;
}

.ats-row-split,
.ats-sub-split {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ats-row-split {
  font-weight: 700;
  color: #000;
}

.ats-sub-split {
  font-style: italic;
  color: #222;
}

.ats-bullets {
  padding-left: 1.2rem;
  margin-top: 0.2rem;
}

.ats-bullets li {
  margin-bottom: 0.2rem;
  color: #111;
}

.ats-skills-table {
  width: 100%;
  border-collapse: collapse;
}

.ats-skills-table td {
  padding: 0.15rem 0;
  vertical-align: top;
  color: #111;
}

.ats-skills-table td:first-child {
  font-weight: 700;
  width: 140px;
}

/* Scroll Reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 4000;
  padding: 0.7rem 1.1rem;
  background: var(--bg-elevated);
  color: var(--ink);
  border-left: 3px solid var(--red);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s var(--ease-out);
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   12. MOBILE & TABLET RESPONSIVE RULES (ZERO OVERFLOW GUARANTEED)
   ========================================================================== */
@media (max-width: 1024px) {
  .brand-sub {
    display: none;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-main {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .ed-section-head {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .ledger-row {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
  .ledger-tags {
    justify-content: flex-start;
  }
  .project-trigger {
    grid-template-columns: 42px 1fr auto;
  }
  .proj-context,
  .proj-year {
    display: none;
  }
  .project-drawer-content {
    padding-left: var(--pad-x);
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .repo-ledger-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .cert-inspector {
    grid-template-columns: 1fr;
  }
  .cert-selector-list {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .spec-matrix-row,
  .contact-ledger {
    grid-template-columns: 1fr;
  }
  .contact-left {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg-elevated);
    border-bottom: 2px solid var(--red);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.75);
  }
  .nav-links.is-open {
    display: flex;
  }
  .nav-links li {
    width: 100%;
    border-bottom: 1px solid var(--line);
  }
  .nav-link {
    display: block;
    width: 100%;
    padding: 0.95rem var(--pad-x);
  }
  .burger-btn {
    display: grid;
  }
  #theme-switch-btn span.theme-text {
    display: none;
  }
  .hero-ledger {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .portrait-showcase {
    min-height: 360px;
    max-height: 440px;
  }
  .repo-ledger-grid,
  .skkni-grid {
    grid-template-columns: 1fr;
  }
  .btn-editorial {
    width: 100%;
    justify-content: center;
  }
  .ats-skills-table td {
    display: block;
    width: 100% !important;
  }
  .ats-skills-table td:first-child {
    margin-top: 0.35rem;
  }
  .cmd-btn-desktop {
    display: none !important;
  }
}

/* ==========================================================================
   13. AWARD WEB CRAFT UPGRADE LAYER
   Synthesized from: godly.website, grainient.supply, 60fps.design,
   transitions.dev, navbar.gallery, ui.aceternity.com, cta.gallery & footer.design
   ========================================================================== */

/* 13A. Tactile Film Grain Overlay (Grainient aesthetic) */
.grain-overlay {
  position: fixed;
  inset: -15%;
  width: 130%;
  height: 130%;
  pointer-events: none;
  z-index: 950;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

[data-theme="swiss-red"] .grain-overlay {
  opacity: 0.02;
}

/* Subtle Hero Technical Blueprint Grid */
.hero-main {
  background-image:
    radial-gradient(rgba(225, 29, 72, 0.09) 1px, transparent 1px);
  background-size: 28px 28px;
}

[data-theme="swiss-red"] .hero-main {
  background-image:
    radial-gradient(rgba(217, 27, 56, 0.1) 1px, transparent 1px);
}

/* 13B. Editorial Mixed Sans + Italic Serif Typography */
.serif-italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.role-sep {
  color: var(--red-bright);
  margin-inline: 0.25rem;
}

/* Masked Line-by-Line Hero Reveal */
.line-mask {
  display: block;
  overflow: hidden;
  padding-bottom: 0.14em;
  margin-bottom: -0.08em;
}

.line-mask > span,
.line-mask > em {
  display: inline-block;
  transform: translateY(112%);
  opacity: 0;
  transition:
    transform 0.85s var(--ease-out),
    opacity 0.55s ease;
}

.hero-display.is-visible .line-mask > span,
.hero-display.is-visible .line-mask > em,
.line-mask.is-ready > span {
  transform: translateY(0);
  opacity: 1;
}

.line-mask[data-delay="1"] > span { transition-delay: 0.04s; }
.line-mask[data-delay="2"] > span { transition-delay: 0.14s; }
.line-mask[data-delay="3"] > span { transition-delay: 0.24s; }

/* 13C. Cursor-Tracked Surface Spotlight (Aceternity / HorizonX) */
.spotlight-surface {
  position: relative;
}

.spotlight-surface::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    460px circle at var(--spot-x, 50%) var(--spot-y, 50%),
    rgba(225, 29, 72, 0.13),
    transparent 65%
  );
  transition: opacity 0.35s ease;
  z-index: 1;
}

.spotlight-surface > * {
  position: relative;
  z-index: 2;
}

.spotlight-surface:hover::after {
  opacity: 1;
}

/* 13D. Scroll-Morphing Floating Island Navbar (Navbar.gallery) */
@media (min-width: 1025px) {
  .topbar {
    transition: padding 0.35s var(--ease-out), background-color 0.3s ease, border-color 0.3s ease;
  }
  .topbar-inner {
    transition:
      max-width 0.42s var(--ease-out),
      border-radius 0.42s var(--ease-out),
      padding 0.35s var(--ease-out),
      background-color 0.3s ease,
      box-shadow 0.35s ease;
  }
  .topbar.is-scrolled {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom-color: transparent;
    padding-top: 0.7rem;
    padding-inline: 1.5rem;
  }
  .topbar.is-scrolled .topbar-inner {
    max-width: 1180px;
    padding: 0.65rem 1.35rem;
    background: rgba(12, 9, 11, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    box-shadow:
      0 20px 45px -12px rgba(0, 0, 0, 0.72),
      0 0 0 1px rgba(225, 29, 72, 0.18);
  }
  [data-theme="swiss-red"] .topbar.is-scrolled .topbar-inner {
    background: rgba(250, 247, 244, 0.9);
    box-shadow: 0 18px 40px -12px rgba(20, 13, 15, 0.14);
  }
}

/* Keyboard Shortcut Pill */
.kbd-key {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 0.12rem 0.36rem;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-3);
}

/* 13E. Magnetic Specular Shimmer CTA (CTA.gallery) */
.btn-editorial--red::before {
  content: "";
  position: absolute;
  top: 0;
  left: -130%;
  width: 55%;
  height: 100%;
  background: linear-gradient(110deg, transparent, rgba(255, 255, 255, 0.32), transparent);
  transform: skewX(-18deg);
  transition: left 0.65s var(--ease-out);
  pointer-events: none;
}

.btn-editorial--red:hover::before {
  left: 145%;
}

/* Portrait Architectural Crosshair Coordinates */
.portrait-coords {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: rgba(255, 245, 247, 0.72);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.65);
  pointer-events: none;
  z-index: 3;
}

/* 13F. Project Filter Bar with Sliding Puck Indicator (60fps.design / Transitions.dev) */
.project-filter-bar {
  padding: 1rem var(--pad-x);
  border-bottom: 1px solid var(--line);
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.filter-pills {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.28rem;
  border: 1px solid var(--line-strong);
  background: var(--bg);
}

.filter-glider {
  position: absolute;
  top: 0.28rem;
  bottom: 0.28rem;
  left: 0;
  background: var(--red);
  transition: transform 0.32s var(--ease-spring), width 0.32s var(--ease-spring);
  z-index: 1;
  pointer-events: none;
}

.filter-pill-btn {
  position: relative;
  z-index: 2;
  padding: 0.42rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
  transition: color 0.25s ease;
}

.filter-pill-btn.is-active {
  color: #ffffff;
  font-weight: 600;
}

.project-accordion-item.is-hidden-filter {
  display: none;
}

/* Micro KPI Highlight inside Project Row */
.proj-kpi-badge {
  display: inline-block;
  margin-left: 0.65rem;
  padding: 0.14rem 0.48rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--red-bright);
  border: 1px solid var(--line-red);
  background: var(--bg-hover);
  vertical-align: middle;
}

/* 13G. Contact Conversion Monolith Gradient Wash */
.contact-left {
  background:
    radial-gradient(ellipse at 10% 90%, rgba(225, 29, 72, 0.14), transparent 60%),
    var(--bg);
}

/* 13H. Editorial Mega Footer (Footer.design) */
.ed-footer {
  max-width: var(--max-w);
  margin-inline: auto;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: var(--bg-alt);
}

.ed-footer-top {
  padding: clamp(2.5rem, 5vw, 4rem) var(--pad-x) 2rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-wordmark {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5vw, 4.2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.footer-wordmark em {
  color: var(--red-bright);
}

.footer-telemetry {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-2);
}

.footer-clock {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  margin-top: 0.25rem;
}

.ed-footer-grid {
  padding: 2rem var(--pad-x);
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
  border-bottom: 1px solid var(--line);
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--red-bright);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.85rem;
}

.footer-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-nav-list a,
.footer-nav-list button {
  font-size: 0.88rem;
  color: var(--ink-2);
  text-align: left;
  transition: color 0.2s ease, transform 0.2s var(--ease-out);
  display: inline-block;
}

.footer-nav-list a:hover,
.footer-nav-list button:hover {
  color: var(--red-bright);
  transform: translateX(4px);
}

.ed-footer-bottom {
  padding: 1.25rem var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-3);
}

/* 13I. Command Palette Modal (Ctrl+K) */
.cmd-sheet {
  width: 100%;
  max-width: 620px;
  background: var(--bg-elevated);
  border: 1px solid var(--line-red);
  box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.85);
  overflow: hidden;
}

.cmd-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
}

.cmd-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.98rem;
}

.cmd-input::placeholder {
  color: var(--ink-3);
}

.cmd-list {
  max-height: 360px;
  overflow-y: auto;
  padding: 0.5rem;
}

.cmd-item {
  width: 100%;
  text-align: left;
  padding: 0.72rem 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--ink-2);
  border-left: 2px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.cmd-item:hover,
.cmd-item.is-selected {
  background: var(--bg-active);
  color: var(--ink);
  border-left-color: var(--red-bright);
}

.cmd-item-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-3);
}

/* Accessibility: Mandatory Reduced Motion Fallback */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .line-mask > span,
  .line-mask > em {
    transform: none !important;
    opacity: 1 !important;
  }
}

@media (max-width: 1024px) {
  .ed-footer {
    border-left: none;
    border-right: none;
  }
  .footer-telemetry {
    text-align: left;
  }
  .ed-footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .filter-pills {
    display: flex;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .filter-pills::-webkit-scrollbar {
    display: none;
  }
  .proj-kpi-badge {
    display: block;
    margin-left: 0;
    margin-top: 0.35rem;
    width: fit-content;
  }
  .ed-footer-top {
    flex-direction: column;
    align-items: flex-start;
  }
  .ed-footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ==========================================================================
   14. PRINT MEDIA — EXCLUSIVELY PRINTS CLEAN ATS CV
   ========================================================================== */
@media print {
  @page {
    size: A4;
    margin: 12mm 15mm;
  }
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .topbar,
  .grain-overlay,
  .ambient-light,
  .scroll-line,
  .cursor-dot,
  .cursor-ring,
  .arch-frame,
  footer,
  .modal-bar,
  #zoom-modal-overlay,
  #cmd-modal-overlay,
  .toast {
    display: none !important;
  }
  #ats-modal-overlay {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    background: none !important;
    padding: 0 !important;
    display: block !important;
  }
  #ats-modal-overlay .modal-sheet {
    max-width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    border: none !important;
    padding: 0 !important;
    background: #fff !important;
  }
  .ats-paper {
    padding: 0 !important;
  }
}
