/*
 * DeathBurger visual system
 * Internal house-style name only: a semi-dark retro-futurist editorial layer.
 * Keeps the existing semantic markup, content APIs, and article components intact.
 */

:root {
  --bg: #12151b;
  --bg-surface: #191d25;
  --bg-card: #20252d;
  --bg-elevated: #292f38;
  --text: #f3ead8;
  --text-muted: #c8c0b1;
  --text-dim: #a4b4b8;
  --text-muted-warm: #c5ad93;
  --accent: #ff6b4a;
  --accent-secondary: #54d9df;
  --accent-hover: #ff876b;
  --warm: #dfff6a;
  --warm-hover: #eaff9a;
  --border: #303844;
  --border-light: #495563;
  --radius: 0;
  --radius-lg: 0;
  --max-width: 900px;
  --max-width-wide: 1180px;
  --ease: cubic-bezier(0.2, 0.75, 0.25, 1);
  --panel-shadow: 10px 10px 0 rgba(5, 7, 10, 0.28);
  --cut: 18px;
}

html { scroll-padding-top: 92px; }

body {
  border-top: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(90deg, transparent calc(50% - 0.5px), rgba(84, 217, 223, 0.08) 50%, transparent calc(50% + 0.5px)),
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 100% 100%, 100% 48px;
  color: var(--text);
  line-height: 1.72;
}

body::before {
  z-index: 0;
  opacity: 0.24;
  background:
    linear-gradient(135deg, transparent 0 76%, rgba(255, 107, 74, 0.16) 76% 76.25%, transparent 76.25%),
    linear-gradient(90deg, transparent 0 8vw, rgba(84, 217, 223, 0.12) 8vw calc(8vw + 1px), transparent calc(8vw + 1px));
  background-size: 420px 420px, 100% 100%;
}

body::after {
  z-index: 0;
  opacity: 0.025;
  mix-blend-mode: soft-light;
}

#webgl-bg {
  z-index: 0;
  opacity: 0.26;
  filter: saturate(0.78) contrast(1.05);
}

/* Composited drafting lines remain animated even when WebGL is unavailable. */
.ambient-linework {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.44;
  contain: strict;
  -webkit-mask-image: radial-gradient(ellipse at 50% 45%, #000 0 68%, transparent 100%);
  mask-image: radial-gradient(ellipse at 50% 45%, #000 0 68%, transparent 100%);
}

.ambient-linework__grid {
  position: absolute;
  inset: -200px;
  will-change: transform;
}

.ambient-linework__grid--fine {
  background-image:
    linear-gradient(rgba(84, 217, 223, 0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(84, 217, 223, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: ambient-grid-fine 72s linear infinite;
}

.ambient-linework__grid--deep {
  opacity: 0.72;
  background-image:
    linear-gradient(rgba(243, 234, 216, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(243, 234, 216, 0.04) 1px, transparent 1px);
  background-size: 192px 192px;
  animation: ambient-grid-deep 118s linear infinite;
}

.ambient-linework__trace {
  --trace-color: rgba(84, 217, 223, 0.22);
  --signal-color: rgba(84, 217, 223, 0.86);
  --trace-angle: 0deg;
  --signal-duration: 19s;
  position: absolute;
  left: -25vw;
  width: 150vw;
  height: 1px;
  overflow: hidden;
  background: linear-gradient(90deg, transparent 0 7%, var(--trace-color) 18% 82%, transparent 93% 100%);
  transform: rotate(var(--trace-angle));
  transform-origin: 50% 50%;
  animation: ambient-trace-breathe 13s ease-in-out infinite alternate;
}

.ambient-linework__trace i {
  position: absolute;
  inset: -1px auto -1px 0;
  width: 18%;
  background: linear-gradient(90deg, transparent, var(--signal-color) 46% 54%, transparent);
  filter: drop-shadow(0 0 4px var(--signal-color));
  transform: translate3d(-120%, 0, 0);
  will-change: transform;
  animation: ambient-signal var(--signal-duration) linear infinite;
}

.ambient-linework__trace--diagonal-one {
  --trace-color: rgba(255, 107, 74, 0.2);
  --signal-color: rgba(255, 107, 74, 0.88);
  --trace-angle: -38deg;
  --signal-duration: 22s;
  top: 32%;
}

.ambient-linework__trace--diagonal-two {
  --trace-color: rgba(255, 107, 74, 0.13);
  --signal-color: rgba(223, 255, 106, 0.72);
  --trace-angle: -38deg;
  --signal-duration: 29s;
  top: 79%;
  animation-delay: -6s;
}

.ambient-linework__trace--diagonal-two i { animation-delay: -17s; }

.ambient-linework__trace--horizontal {
  --signal-duration: 25s;
  top: 58%;
  animation-delay: -9s;
}

.ambient-linework__trace--horizontal i { animation-delay: -8s; }

.ambient-linework__trace--vertical {
  --trace-color: rgba(84, 217, 223, 0.15);
  --signal-color: rgba(223, 255, 106, 0.68);
  --trace-angle: 90deg;
  --signal-duration: 31s;
  top: 50%;
  animation-delay: -4s;
}

.ambient-linework__trace--vertical i { animation-delay: -21s; }

.ambient-linework.is-paused *,
.ambient-linework.is-paused *::before,
.ambient-linework.is-paused *::after {
  animation-play-state: paused !important;
}

@keyframes ambient-grid-fine {
  from { transform: translate3d(-48px, -48px, 0); }
  to { transform: translate3d(0, 0, 0); }
}

@keyframes ambient-grid-deep {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-192px, 192px, 0); }
}

@keyframes ambient-trace-breathe {
  0%, 12% { opacity: 0.45; }
  58% { opacity: 0.88; }
  100% { opacity: 0.62; }
}

@keyframes ambient-signal {
  from { transform: translate3d(-120%, 0, 0); }
  to { transform: translate3d(680%, 0, 0); }
}

main,
.footer {
  position: relative;
  z-index: 1;
}

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

a { color: var(--accent-secondary); }
a:hover { color: var(--text); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
  box-shadow: 0 0 0 6px var(--accent);
}

h1,
h2,
h3 {
  color: var(--text);
  text-wrap: balance;
}

h1 {
  font-weight: 400;
  letter-spacing: -0.055em;
}

h2 {
  font-weight: 400;
  letter-spacing: -0.035em;
}

.container { max-width: 1080px; }

.scroll-progress {
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent) 72%, var(--accent-secondary));
}

/* Navigation: framed print masthead, not glass chrome. */
.navbar,
.navbar.scrolled {
  background: rgba(18, 21, 27, 0.94);
  border-bottom: 1px solid var(--border-light);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-container {
  height: 72px;
  max-width: var(--max-width-wide);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-logo .nav-mark {
  display: block;
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.nav-links { gap: 0; }

.nav-links a {
  min-height: 72px;
  display: inline-flex;
  align-items: center;
  padding: 0 1.1rem;
  border-left: 1px solid var(--border);
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav-links a::after { display: none; }

.nav-links a:hover,
.nav-links a.active {
  color: var(--bg);
  background: var(--accent);
}

.nav-toggle span { background: var(--text); }

/* Hero: a two-panel comic/editorial spread. */
.hero {
  min-height: min(900px, 100vh);
  padding: 10.5rem 0 6rem;
  border-bottom: 1px solid var(--border-light);
}

.hero-container {
  max-width: var(--max-width-wide);
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: clamp(2.5rem, 6vw, 6.5rem);
  position: relative;
}

.hero-container::before {
  content: '';
  position: absolute;
  inset: -2rem 1rem -2rem;
  z-index: -1;
  border: 1px solid var(--border);
  background: linear-gradient(115deg, rgba(25, 29, 37, 0.92), rgba(18, 21, 27, 0.62));
  box-shadow: var(--panel-shadow);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
}

.hero-content { padding: 1rem 0; }

.hero-kicker {
  margin-bottom: 2rem;
  color: var(--accent-secondary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-kicker::before {
  content: '01';
  display: inline-block;
  margin-right: 0.8rem;
  padding: 0.2rem 0.42rem;
  color: var(--bg);
  background: var(--accent-secondary);
}

.hero-heading,
.hero-heading .accent,
.hero-tagline,
.hero-sub,
.hero-cta,
.hero-figure {
  opacity: 1;
  transform: none;
  animation: none;
}

.hero-heading {
  margin-bottom: 2.25rem;
  font-size: clamp(4.5rem, 10vw, 8.7rem);
  font-weight: 400;
  line-height: 0.77;
  letter-spacing: -0.07em;
  text-transform: uppercase;
}

.hero-heading .accent {
  display: inline-block;
  margin-left: 0.45em;
  color: var(--accent);
  text-shadow: none;
}

.hero-tagline {
  max-width: 560px;
  color: var(--text);
  font-size: clamp(1.2rem, 2.1vw, 1.65rem);
  font-weight: 500;
  line-height: 1.36;
}

.hero-sub {
  max-width: 520px;
  margin-bottom: 2.3rem;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.hero-sub strong { color: var(--warm); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.hero-cta,
.error-btn,
.newsletter-form button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--accent);
  color: var(--bg);
  background: var(--accent);
  box-shadow: 5px 5px 0 rgba(84, 217, 223, 0.55);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-cta:hover,
.error-btn:hover,
.newsletter-form button:hover {
  color: var(--bg);
  background: var(--text);
  border-color: var(--text);
  box-shadow: 2px 2px 0 var(--accent-secondary);
  transform: translate(3px, 3px);
}

.hero-text-link {
  padding: 0.8rem 0.65rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-light);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-text-link:hover { color: var(--accent-secondary); }

.hero-figure {
  position: relative;
  margin: 0;
  padding: 2.6rem 1rem 1rem;
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  box-shadow: var(--panel-shadow);
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 0 100%);
}

.hero-figure figcaption {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.85rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-image {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  filter: saturate(0.86) contrast(1.08) sepia(0.06);
}

.hero-figure::after {
  content: '';
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  width: 38%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent) 62%, transparent 62% 68%, var(--accent-secondary) 68% 82%, transparent 82% 88%, var(--warm) 88%);
}

.hero-orb,
.three-stage,
.cursor-glow { display: none !important; }

/* Shared section grammar. */
.about,
.product-showcase,
.experience,
.projects,
.latest-posts {
  position: relative;
  padding: 7rem 0;
  border-top: 0;
  border-bottom: 1px solid var(--border);
}

.about::before,
.experience::before,
.latest-posts::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(25, 29, 37, 0.62);
}

.section-label {
  margin-bottom: 1.25rem;
  color: var(--accent-secondary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
}

.section-label::before {
  width: 18px;
  height: 3px;
  border-radius: 0;
  background: var(--accent);
  box-shadow: none;
  animation: none;
}

.section-label::after {
  content: '';
  width: 64px;
  height: 1px;
  margin-left: 0.15rem;
  background: var(--border-light);
}

.about .container {
  display: grid;
  grid-template-columns: minmax(170px, 0.36fr) minmax(0, 1fr);
  gap: 0 4rem;
}

.about .section-label,
.about h2 { grid-column: 1; }

.about h2 { font-size: clamp(2.4rem, 5vw, 4rem); }

.about-content {
  grid-column: 2;
  grid-row: 1 / span 2;
  max-width: 690px;
  padding-left: 2rem;
  border-left: 1px solid var(--border-light);
  color: var(--text-muted);
}

.about-content strong { color: var(--text); }

.product-showcase { background: rgba(18, 21, 27, 0.78); }

.product-grid {
  gap: 1px;
  padding: 1px;
  background: var(--border-light);
  min-width: 0;
}

.product-hero {
  max-width: none;
  min-width: 0;
  padding: clamp(1.6rem, 4vw, 3rem);
  background: var(--bg-surface);
}

.product-head > div { min-width: 0; }
.product-title,
.product-tagline,
.product-cta a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.product-hero:first-child { border-top: 4px solid var(--warm); }
.product-hero:last-child { border-top: 4px solid var(--accent-secondary); }

.product-logo {
  border: 1px solid var(--border-light);
  border-radius: 0;
  background: var(--text);
}

.product-title { color: var(--text); }
.product-tagline { color: var(--accent-secondary); font-family: 'JetBrains Mono', monospace; }
.product-description { color: var(--text-muted); }
.product-cta a { color: var(--warm); font-family: 'JetBrains Mono', monospace; }

.tech-tag,
.project-badge {
  border: 1px solid var(--border-light);
  border-radius: 0;
  background: transparent;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.04em;
}

.tech-tag:hover { border-color: var(--warm); color: var(--warm); }

.timeline { padding-left: 0; }
.timeline-line { left: 58px; background: var(--border-light); }

.timeline-item {
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 2rem;
  padding: 0 0 3.5rem;
}

.timeline-marker {
  left: 54px;
  top: -9px;
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 0;
  background: var(--accent);
  transform: rotate(45deg);
}

.timeline-icon {
  border-color: var(--border-light);
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}

.timeline-item:hover .timeline-icon {
  border-color: var(--accent);
  box-shadow: 6px 6px 0 rgba(255, 107, 74, 0.24);
  transform: translate(-2px, -2px);
}

.timeline-content {
  padding: 0.2rem 0 2rem 2rem;
  border-left: 1px solid var(--border);
}

.timeline-content h3 a { color: var(--text); }
.timeline-content h3 a:hover { color: var(--accent); }
.timeline-role { color: var(--accent-secondary); font-family: 'JetBrains Mono', monospace; }
.timeline-date { color: var(--text-dim); font-family: 'JetBrains Mono', monospace; }

.project-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  background: var(--border-light);
  min-width: 0;
}

.project-card,
.project-card:nth-child(2),
.project-card:nth-child(odd),
.project-card.featured,
.project-card.featured:nth-child(odd) {
  min-height: 230px;
  min-width: 0;
  padding: 2rem;
  border: 0;
  background: var(--bg-surface);
  overflow: hidden;
}

.project-card h3,
.project-card p,
.project-tech { overflow-wrap: anywhere; }

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 28px;
  height: 28px;
  background: linear-gradient(225deg, var(--bg) 0 48%, var(--border-light) 49% 51%, transparent 52%);
}

.project-card:hover,
.project-card.featured:hover {
  z-index: 1;
  border: 0;
  background: var(--bg-card);
  box-shadow: inset 4px 0 0 var(--accent), 6px 6px 0 rgba(84, 217, 223, 0.16);
  transform: translate(-2px, -2px);
}

.project-card.featured .project-tech { color: var(--warm); opacity: 1; }
.project-badge { color: var(--accent); }

/* Blog index and cards. */
.latest-posts,
.blog-listing { padding: 9rem 0 7rem; }

.blog-listing h1 {
  font-size: clamp(4rem, 10vw, 8rem);
  text-transform: uppercase;
}

.blog-intro { color: var(--text-muted); }

.blog-search input {
  padding: 1rem 1.2rem;
  border-color: var(--border-light);
  border-radius: 0;
  color: var(--text);
  background: var(--bg-surface);
  font-family: 'JetBrains Mono', monospace;
}

.blog-search input:focus { border-color: var(--accent); }

.posts-grid,
.posts-preview { gap: 1px; background: var(--border-light); }

.post-card,
.posts-preview .post-card:first-child {
  border: 0;
  background: var(--bg-surface);
  box-shadow: none;
}

.post-card::after {
  top: 0;
  bottom: auto;
  width: 4px;
  height: 100%;
  background: var(--accent);
}

.post-card:hover {
  border-color: transparent;
  background: var(--bg-card);
  box-shadow: 6px 6px 0 rgba(84, 217, 223, 0.18);
  transform: translate(-3px, -3px);
}

.post-card-image {
  filter: saturate(0.8) contrast(1.08);
  opacity: 0.92;
}

.post-card:hover .post-card-image { filter: saturate(1) contrast(1.05); }
.post-card-body time,
.post-card-meta,
.reading-time { font-family: 'JetBrains Mono', monospace; }

/* Reading surfaces: industrial frame outside, quiet page inside. */
.blog-post { padding: 9rem 0 6rem; }
.blog-post > .container { max-width: 1020px; }

.breadcrumbs {
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.post-header {
  margin-bottom: 2rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.post-meta,
.back-link { font-family: 'JetBrains Mono', monospace; }

.toc,
.related-posts,
.author-card,
.newsletter-cta {
  border: 1px solid var(--border-light);
  border-radius: 0;
  background: var(--bg-surface);
  box-shadow: 6px 6px 0 rgba(5, 7, 10, 0.2);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}

.toc h4,
.author-card-label,
.post-share span {
  color: var(--accent-secondary);
  font-family: 'JetBrains Mono', monospace;
}

.post-content {
  padding: clamp(1.5rem, 5vw, 4rem);
  border: 1px solid var(--border-light);
  border-radius: 0;
  background: rgba(25, 29, 37, 0.97);
  box-shadow: 10px 10px 0 rgba(5, 7, 10, 0.26);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}

.post-content h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 400; }
.post-content h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 400; }
.post-content h3 { font-size: 1.25rem; }
.post-content p,
.post-content li { color: var(--text-muted); }
.post-content strong { color: var(--text); font-weight: 600; }

.post-content h2::before {
  content: '//';
  margin-right: 0.55rem;
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72em;
  letter-spacing: -0.15em;
}

.post-content img,
.post-content img.banner {
  border: 0;
  border-radius: 0;
  outline: 1px solid var(--border-light);
  outline-offset: -1px;
  filter: saturate(0.9) contrast(1.04);
}

.post-content blockquote {
  border-left: 4px solid var(--accent);
  border-radius: 0;
  background: var(--bg-card);
  color: var(--text);
}

.post-content code,
.post-content pre { border-radius: 0; }

.post-content a {
  color: var(--accent-secondary);
  text-decoration-color: rgba(84, 217, 223, 0.5);
}

.post-content a:hover { color: var(--text); text-decoration-color: var(--accent); }

.table-wrapper,
.benchmark-table-wrap { border-color: var(--border-light); }

.post-content th,
.post-content td,
.benchmark-metric { border-color: var(--border-light); }

.benchmark-metric,
.benchmark-table { background: var(--bg-card); }

.benchmark-series-original .benchmark-bar::after { background: var(--text-dim); }
.benchmark-series-rust .benchmark-bar::after { background: var(--accent); }

.post-share a,
.author-card-links a {
  border-color: var(--border-light);
  border-radius: 0;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.post-share a:hover,
.author-card-links a:hover {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(255, 107, 74, 0.12);
}

.newsletter-form input[type='email'] {
  min-height: 48px;
  border-color: var(--border-light);
  border-radius: 0;
  background: var(--bg);
  font-family: 'JetBrains Mono', monospace;
}

/* The standalone About route shares .blog-post but not .post-content. */
.blog-post > .container > h1 {
  margin: 1rem 0 2rem;
  font-size: clamp(3.4rem, 8vw, 6.8rem);
  text-transform: uppercase;
}

.blog-post > .container > p,
.blog-post > .container > ul,
.blog-post > .container > h2,
.blog-post > .container > h3 {
  max-width: var(--reading-width);
  margin-left: auto;
  margin-right: auto;
}

.blog-post > .container > p,
.blog-post > .container > ul {
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}

.blog-post > .container > h2 { margin-top: 4rem; }
.blog-post > .container > h3 { margin-top: 2rem; color: var(--accent-secondary); }

.footer {
  padding: 3.2rem 0;
  border-top: 1px solid var(--border-light);
  background: var(--bg-surface);
}

.footer-container {
  position: relative;
  max-width: var(--max-width-wide);
}

.footer-container::before {
  content: 'END / RETURN TO SIGNAL';
  display: block;
  margin-bottom: 2rem;
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
}

.footer-links a { font-family: 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: 0.06em; }

.glitch::before,
.glitch::after { display: none; animation: none; }

@media (max-width: 900px) {
  .hero-container { grid-template-columns: 1fr; }
  .hero-figure { max-width: 660px; }
  .about .container { grid-template-columns: 1fr; }
  .about .section-label,
  .about h2,
  .about-content { grid-column: 1; grid-row: auto; }
  .about-content { padding: 2rem 0 0; border-left: 0; border-top: 1px solid var(--border-light); }
}

@media (max-width: 768px) {
  .nav-container { height: 64px; }
  .nav-logo .nav-mark { width: 30px; height: 30px; }
  .nav-links {
    top: 64px;
    padding: 0;
    gap: 0;
    border-top: 1px solid var(--border-light);
    border-bottom-color: var(--border-light);
    background: rgba(18, 21, 27, 0.98);
  }
  .nav-links a {
    min-height: 50px;
    padding: 0 1.5rem;
    border: 0;
    border-bottom: 1px solid var(--border);
  }
  .hero { padding: 8rem 0 4.5rem; }
  .hero-container::before { inset: -1rem 0.75rem; }
  .hero-heading { font-size: clamp(4rem, 19vw, 6.8rem); }
  .hero-heading .accent { margin-left: 0.18em; }
  .hero-figure { order: initial; }
  .about,
  .product-showcase,
  .experience,
  .projects,
  .latest-posts { padding: 5rem 0; }
  .timeline-line { left: 42px; }
  .timeline-marker { left: 38px; }
  .timeline-content { padding-left: 1rem; }
  .project-card,
  .project-card:nth-child(2),
  .project-card:nth-child(odd),
  .project-card.featured,
  .project-card.featured:nth-child(odd) { min-height: 0; }
  .project-grid { grid-template-columns: minmax(0, 1fr); }
  .blog-listing,
  .blog-post { padding: 7rem 0 4rem; }
  .post-content { padding: 1.5rem 1.35rem 1.75rem; }
}

@media (max-width: 480px) {
  .nav-logo { font-size: 0; gap: 0; }
  .hero-container::before { clip-path: none; }
  .hero-kicker { margin-bottom: 1.3rem; }
  .hero-heading { font-size: clamp(3.5rem, 21vw, 5.2rem); }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .hero-cta,
  .hero-text-link { width: 100%; }
  .hero-figure { padding: 2.35rem 0.65rem 0.65rem; }
  .hero-figure figcaption { height: 2.35rem; }
  .timeline-item { grid-template-columns: 72px minmax(0, 1fr); gap: 0.8rem; }
  .timeline-icon { width: 72px; height: 72px; }
  .timeline-line { left: 35px; }
  .timeline-marker { left: 31px; }
  .post-card-image { max-height: 190px; }
  .related-posts li { align-items: flex-start; flex-direction: column; gap: 0.25rem; }
  .ambient-linework { opacity: 0.34; }
  .ambient-linework__grid--deep { display: none; }
  .ambient-linework__trace--diagonal-two { display: none; }
  .ambient-linework__trace i { filter: none; }
}

@media (prefers-reduced-motion: reduce) {
  #webgl-bg { display: none; }
  .ambient-linework { opacity: 0.3; }
  .ambient-linework * { animation: none !important; }
  .ambient-linework__trace i { display: none; }
  .hero-cta:hover,
  .error-btn:hover,
  .newsletter-form button:hover,
  .project-card:hover,
  .post-card:hover,
  .timeline-item:hover .timeline-icon { transform: none; }
}

html.motion-reduced #webgl-bg { display: none; }
html.motion-reduced .ambient-linework { opacity: 0.3; }
html.motion-reduced .ambient-linework * { animation: none !important; }
html.motion-reduced .ambient-linework__trace i { display: none; }

@media (forced-colors: active) {
  .hero-container::before,
  .hero-figure,
  .product-hero,
  .project-card,
  .post-card,
  .post-content,
  .toc,
  .related-posts,
  .author-card,
  .newsletter-cta { clip-path: none; box-shadow: none; }
  .hero-cta,
  .newsletter-form button { border: 2px solid ButtonText; box-shadow: none; }
}
