:root {
  --ink: #0b0d0f;
  --panel: #111417;
  --panel-2: #171b1f;
  --paper: #e9e7df;
  --paper-2: #c8c6be;
  --line: #30353a;
  --accent: #ff4a3d;
  --accent-dark: #bd2f26;
  --black: #050607;
  --max: 1620px; /* 1480px */
  --gutter: clamp(18px, 3vw, 48px);
  --sans:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  background: var(--ink);
}
body {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: var(--black);
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input {
  font: inherit;
}
button {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--paper);
  color: var(--ink);
  transform: translateY(-160%);
}
.skip-link:focus {
  transform: translateY(0);
}

.scroll-meter {
  position: fixed;
  z-index: 999;
  inset: 0 0 auto 0;
  height: 3px;
  background: transparent;
}
.scroll-meter span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
}

.mono {
  font-family: var(--mono);
}
.muted {
  color: #8e9499;
}
.accent {
  color: var(--accent);
}
.eyebrow {
  margin: 0 0 18px;
  color: var(--paper-2);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-header {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 84px;
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line);
  background: var(--ink);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  font-weight: 650;
}
.wordmark-mark {
  display: block;
  width: 34px;
  height: 34px;
  border: 1px solid #030303;
  border-radius: 50%;
  object-fit: cover;
}
.wordmark-text {
  letter-spacing: -0.02em;
}
.site-nav {
  display: flex;
  gap: clamp(18px, 3vw, 42px);
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
}
.site-nav a {
  padding: 8px 0;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover,
.site-nav a:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}
.header-status {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--paper-2);
}
.status-dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
}
.menu-button {
  display: none;
  align-items: center;
  gap: 8px;
  border: 0;
  background: none;
  padding: 8px 0;
  cursor: pointer;
  line-height: 1;
}
.menu-button span {
  display: block;
}

.hero {
  display: grid;
  grid-template-columns: minmax(120px, 0.18fr) minmax(0, 1fr) minmax(
      400px,
      0.5fr
    );
  min-height: calc(100svh - 84px);
  max-width: var(--max);
  margin: 0 auto;
  border-inline: 1px solid var(--line);
}
.hero-index {
  padding: 28px 22px;
  border-right: 1px solid var(--line);
  color: var(--paper-2);
  font-size: 0.68rem;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
.hero-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(36px, 6vw, 88px) clamp(24px, 5vw, 76px) 34px;
}
.hero h1 {
  margin: auto 0;
  font-size: clamp(4.9rem, 11.3vw, 11.3rem);
  font-weight: 600;
  letter-spacing: -0.085em;
  line-height: 0.78;
}
.hero-bottom {
  display: flex;
  align-items: end;
  justify-content: flex-start;
  gap: 24px;
}
.hero-role {
  margin: 0;
  font-size: clamp(1.1rem, 2vw, 1.8rem);
  letter-spacing: -0.035em;
  line-height: 1.08;
}
.hero-console {
  align-self: end;
  margin: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 12px 12px 0 var(--black);
}
.console-bar {
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--paper-2);
  text-transform: uppercase;
}
.console-bar span:last-child {
  color: var(--accent);
}
.hero-console pre {
  margin: 0;
  padding: 24px;
  min-height: 380px;
  overflow: auto;
  color: var(--paper);
  font-family: var(--mono);
  font-size: clamp(0.72rem, 1vw, 0.9rem);
  line-height: 1.75;
}
.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  margin-left: 5px;
  background: var(--accent);
  vertical-align: -0.2em;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

.ticker {
  max-width: var(--max);
  margin: 0 auto;
  overflow: hidden;
  border-inline: 1px solid var(--line);
  border-block: 1px solid var(--black);
  background: var(--panel);
  color: var(--paper);
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent,
    #000 6%,
    #000 94%,
    transparent
  );
  mask-image: linear-gradient(
    90deg,
    transparent,
    #000 6%,
    #000 94%,
    transparent
  );
}
.ticker-track {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  animation: ticker 18s linear infinite;
  will-change: transform;
}
.ticker-group {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 0 0 auto;
  padding: 14px var(--gutter);
  white-space: nowrap;
}
.ticker-track i {
  font-style: normal;
  font-size: 1rem;
  color: var(--paper-2);
}
@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

.section {
  display: grid;
  grid-template-columns: minmax(140px, 0.18fr) minmax(0, 1fr);
  max-width: var(--max);
  margin: 0 auto;
  border-inline: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-label {
  padding: 38px 22px;
  border-right: 1px solid var(--line);
  color: var(--paper-2);
  font-size: 0.68rem;
}
.section-content {
  min-width: 0;
  padding: clamp(58px, 8vw, 126px) clamp(24px, 5vw, 78px);
}
.section h2 {
  margin: 0;
  font-size: clamp(2.8rem, 6.7vw, 7rem);
  font-weight: 530;
  letter-spacing: -0.065em;
  line-height: 0.94;
}

.about {
  background: #0b0d0f;
  color: #e9e7df;
  border-color: #a9a79f;
}
.about .section-label {
  border-color: #a9a79f;
  color: #5f615f;
}
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 72px 58px;
}
.about-grid h2 {
  grid-column: 1 / -1;
  max-width: 1100px;
}
.about-copy {
  max-width: 670px;
  font-size: clamp(1.08rem, 1.7vw, 1.42rem);
  letter-spacing: -0.02em;
}
.about-copy p:first-child {
  margin-top: 0;
}
.fact-list {
  margin: 0;
  border-top: 1px solid #a9a79f;
}
.fact-list div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 0;
  border-bottom: 1px solid #a9a79f;
}
.fact-list dt {
  color: #666862;
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
}
.fact-list dd {
  margin: 0;
  text-align: right;
}
.stack-block {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 0.1fr 1fr;
  padding-top: 30px;
  border-top: 1px solid #a9a79f;
}
.stack-block p {
  margin: 0;
  font-size: clamp(1.25rem, 2.5vw, 2.5rem);
  line-height: 1.25;
  letter-spacing: -0.04em;
}

.infra {
  background: #0b0d0f;
  color: #e9e7df;
  border-color: #a9a79f;
}
.infra .section-label {
  border-color: #a9a79f;
  color: #a2a19b;
}
.infra-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
}
.infra-copy {
  max-width: none;
}
.infra-copy h2 {
  max-width: none;
}
.infra-copy p:last-child {
  max-width: none;
  color: #c8c6be;
}
.infra-shell {
  position: relative;
  min-height: 760px;
  border: 1px solid #a9a79f;
  background: #111417;
  box-shadow: 12px 12px 0 rgba(0, 0, 0, 0.4);
  overflow: hidden;
}
.infra-hud {
  position: absolute;
  z-index: 2;
  inset: 12px 14px auto;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  font-size: 0.66rem;
  color: #c8c6be;
  text-transform: uppercase;
}
.infra-diagram {
  position: absolute;
  inset: 38px 10px 10px;
}
.infra-diagram svg {
  display: block;
  width: 100%;
  height: 100%;
}

.resume-section {
  background: #050607;
  color: #e9e7df;
  border-color: #a9a79f;
}
.resume-section .section-label {
  border-color: #a9a79f;
  color: #a2a19b;
}
.resume-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: 42px;
  align-items: start;
}
.resume-copy {
  max-width: 620px;
}
.resume-copy p:last-child {
  max-width: 560px;
  color: #c8c6be;
}
.resume-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.resume-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  padding: 13px 16px;
  border: 1px solid #e9e7df;
  background: rgba(255, 255, 255, 0.02);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.35);
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    color 160ms ease;
}
.resume-button.alt {
  border-color: #a9a79f;
  color: #c8c6be;
}
.resume-button:hover {
  background: var(--accent);
  color: var(--black);
  border-color: var(--accent);
  transform: translate(-2px, -2px);
}
.resume-shell {
  border: 1px solid #a9a79f;
  background: #111417;
  min-height: 760px;
  box-shadow: 12px 12px 0 rgba(0, 0, 0, 0.4);
  overflow: hidden;
}
.resume-frame {
  display: block;
  width: 100%;
  height: min(78svh, 760px);
  border: 0;
  background: #fff;
}

.section-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 30px;
  margin-bottom: clamp(60px, 8vw, 110px);
}
.section-heading-row p {
  max-width: 220px;
  margin: 0 0 10px;
  color: var(--paper-2);
}
.project {
  border-top: 1px solid var(--line);
}
.project:last-child {
  border-bottom: 1px solid var(--line);
}
.project-trigger {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) minmax(160px, 0.5fr) 30px;
  width: 100%;
  padding: 28px 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.project-trigger:hover .project-title,
.project-trigger:focus-visible .project-title {
  color: var(--accent);
}
.project-number {
  color: var(--paper-2);
  font-size: 0.72rem;
}
.project-title {
  font-size: clamp(1.75rem, 4vw, 4.2rem);
  letter-spacing: -0.05em;
  line-height: 1;
  transition: color 160ms ease;
}
.project-type {
  align-self: center;
  color: var(--paper-2);
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
}
.project-toggle {
  align-self: center;
  justify-self: end;
  font-family: var(--mono);
  font-size: 1.5rem;
}
.project-panel {
  overflow: hidden;
}
.project-panel-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr) auto;
  gap: 40px;
  padding: 12px 0 48px 70px;
}
.project-lead {
  max-width: 680px;
  margin: 0;
  font-size: clamp(1.05rem, 1.55vw, 1.35rem);
}
.project-meta {
  padding-top: 4px;
}
.project-meta p {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 14px;
  margin: 0 0 10px;
  color: var(--paper-2);
  font-size: 0.85rem;
}
.project-meta span {
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.69rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
}
.text-link {
  align-self: end;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  white-space: nowrap;
}
.text-link:hover {
  color: var(--paper);
}

.lab {
  background: var(--accent);
  color: var(--black);
  border-color: var(--black);
}
.lab .section-label {
  border-color: var(--black);
  color: var(--black);
}
.lab-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) minmax(0, 1fr);
  gap: 50px;
}
.lab-copy {
  align-self: center;
}
.lab-copy .eyebrow {
  color: var(--black);
}
.lab-copy h2 {
  font-size: clamp(2.7rem, 5vw, 5.3rem);
}
.lab-copy > p:last-of-type {
  max-width: 520px;
  font-size: 1.02rem;
}
kbd {
  padding: 2px 6px;
  border: 1px solid var(--black);
  background: transparent;
  font-family: var(--mono);
}
.mode-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 30px;
}
.mode-button {
  padding: 9px 12px;
  border: 1px solid var(--black);
  background: transparent;
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  cursor: pointer;
}
.mode-button.is-active,
.mode-button:hover {
  background: var(--black);
  color: var(--accent);
}
.canvas-shell {
  position: relative;
  min-height: 580px;
  border: 1px solid var(--black);
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
}
.canvas-shell canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 580px;
  cursor: crosshair;
}
.canvas-hud {
  position: absolute;
  z-index: 2;
  inset: 14px 16px auto;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  font-size: 0.68rem;
}
.canvas-help {
  position: absolute;
  z-index: 2;
  right: 16px;
  bottom: 14px;
  margin: 0;
  color: #94999e;
  font-size: 0.6rem;
  pointer-events: none;
}

.terminal-section {
  background: var(--black);
}
.terminal-grid {
  display: grid;
  grid-template-columns: 0.45fr minmax(0, 1fr);
  gap: 70px;
  align-items: start;
}
.terminal-grid h2 {
  margin-bottom: 24px;
}
.terminal-grid > div:first-child > p:last-child {
  color: var(--paper-2);
}
.terminal-grid code {
  color: var(--accent);
  font-family: var(--mono);
}
.interactive-terminal {
  min-height: 440px;
  padding: 26px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-family: var(--mono);
  font-size: 0.82rem;
  box-shadow: 12px 12px 0 var(--accent-dark);
}
.terminal-output {
  max-height: 350px;
  overflow: auto;
}
.terminal-output p {
  margin: 0 0 8px;
  white-space: pre-wrap;
}
.terminal-output a {
  color: var(--accent);
  text-decoration: underline;
}
.terminal-form {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
}
.terminal-prompt {
  color: var(--accent);
  white-space: nowrap;
}
.terminal-form input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--paper);
  caret-color: var(--accent);
  font-family: var(--mono);
}

.contact {
  max-width: var(--max);
  margin: 0 auto;
  border-inline: 1px solid var(--line);
  background: #050607;
  color: #e9e7df;
}
.contact-top {
  padding: 34px var(--gutter);
  border-bottom: 1px solid #a9a79f;
  font-size: 0.68rem;
}
.contact-main {
  padding: clamp(70px, 10vw, 150px) var(--gutter);
}
.contact-main .eyebrow {
  color: #a2a19b;
}
.contact h2 {
  margin: 0 0 70px;
  font-size: clamp(4rem, 10vw, 10rem);
  font-weight: 560;
  letter-spacing: -0.08em;
  line-height: 0.82;
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.contact-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  min-height: 122px;
  padding: 18px 18px 16px;
  border: 1px solid #7c7e78;
  background: rgba(255, 255, 255, 0.02);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.28);
  text-align: left;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}
.contact-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: #b5b2a8;
  transform: translate(-2px, -2px);
  box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.28);
}
.contact-card-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a2a19b;
}
.contact-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: clamp(0.98rem, 1.8vw, 1.28rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
}
.contact-card-button {
  width: 100%;
  cursor: pointer;
  color: inherit;
}
.contact-card-button .contact-card-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
footer {
  display: grid;
  gap: 18px;
  padding: 18px var(--gutter);
  border-top: 1px solid #a9a79f;
  color: #5f615f;
  font-family: var(--mono);
  font-size: 0.62rem;
  text-transform: uppercase;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
}
.footer-links a,
.footer-links button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-transform: inherit;
  cursor: pointer;
}
.footer-links a:hover,
.footer-links button:hover {
  color: var(--accent-dark);
}
.footer-bar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
footer a:hover {
  color: var(--accent-dark);
}

.back-to-top {
  --scroll-progress: 0deg;
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 980;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: conic-gradient(
    var(--accent) var(--scroll-progress),
    rgba(233, 231, 223, 0.18) 0deg
  );
  color: var(--paper);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.35);
  font-family: var(--mono);
  font-size: 1rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    color 160ms ease;
}
.back-to-top::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: rgba(17, 20, 23, 0.96);
  border: 1px solid rgba(233, 231, 223, 0.28);
}
.back-to-top::after {
  content: "↑";
  position: relative;
  z-index: 1;
}
.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.back-to-top:hover,
.back-to-top:focus-visible {
  color: var(--accent);
  transform: translate(-2px, -2px);
}
.back-to-top:hover::before,
.back-to-top:focus-visible::before {
  border-color: var(--accent);
}

@media (max-width: 1050px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }
  .site-nav {
    position: absolute;
    inset: 84px 0 auto;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 14px var(--gutter) 28px;
    border-bottom: 1px solid var(--line);
    background: var(--ink);
  }
  .site-nav.is-open {
    display: flex;
  }
  .site-nav a {
    padding: 15px 0;
    border-bottom: 1px solid var(--line);
  }
  .menu-button {
    display: flex;
    justify-self: end;
    align-items: center;
    gap: 8px;
  }
  .header-status {
    display: none;
  }
  .hero {
    grid-template-columns: 70px minmax(0, 1fr);
  }
  .hero-console {
    grid-column: 2;
    margin: 0 24px 36px;
  }
  .hero-console pre {
    min-height: 300px;
  }
  .section {
    grid-template-columns: 70px minmax(0, 1fr);
  }
  .section-label,
  .hero-index {
    padding-inline: 20px;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-grid h2,
  .stack-block {
    grid-column: auto;
  }
  .stack-block {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .infra-grid,
  .resume-grid {
    grid-template-columns: 1fr;
  }
  .infra-shell {
    min-height: 620px;
  }
  .resume-shell {
    min-height: 640px;
  }
  .resume-frame {
    height: min(74svh, 640px);
  }
  .lab-grid,
  .terminal-grid {
    grid-template-columns: 1fr;
  }
  .canvas-shell,
  .canvas-shell canvas {
    min-height: 480px;
  }
}

@media (max-width: 720px) {
  .site-header {
    min-height: calc(70px + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
  }
  .wordmark {
    min-width: 0;
    max-width: calc(100vw - 96px);
  }
  .wordmark-text {
    display: none;
  }
  .site-nav {
    top: calc(70px + env(safe-area-inset-top));
  }
  .hero {
    display: block;
    min-height: auto;
    border-inline: 0;
  }
  .hero-index {
    writing-mode: initial;
    transform: none;
    padding: 20px var(--gutter);
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .hero-main {
    min-height: 62svh;
    padding: 42px var(--gutter) 24px;
  }
  .hero h1 {
    font-size: clamp(4rem, 21vw, 7rem);
  }
  .hero-bottom {
    align-items: center;
  }
  .hero-role {
    font-size: 1rem;
  }
  .hero-console {
    margin: 0 var(--gutter) 35px;
  }
  .hero-console pre {
    min-height: 0;
    max-height: 34svh;
    padding: 18px;
    font-size: 0.68rem;
  }
  .ticker-track {
    font-size: 0.68rem;
  }
  .ticker-group {
    padding-inline: var(--gutter);
    gap: 18px;
  }
  .section {
    display: block;
    border-inline: 0;
  }
  .section-label {
    padding: 22px var(--gutter);
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .about .section-label,
  .lab .section-label,
  .resume-section .section-label,
  .terminal-section .section-label {
    border-right: 0;
    border-bottom-color: currentColor;
  }
  .section-content {
    padding: 70px var(--gutter);
  }
  .section h2 {
    font-size: clamp(2.6rem, 13vw, 4.2rem);
  }
  .about-grid {
    gap: 42px;
  }
  .infra-grid,
  .resume-grid {
    gap: 30px;
  }
  .infra-shell {
    min-height: 460px;
  }
  .infra-diagram {
    inset: 32px 10px 10px;
  }
  .resume-shell {
    min-height: 440px;
  }
  .resume-frame {
    height: min(58svh, 440px);
  }
  .section-heading-row {
    display: block;
  }
  .section-heading-row p {
    margin-top: 22px;
  }
  .project-trigger {
    grid-template-columns: 44px minmax(0, 1fr) 24px;
    gap: 8px;
  }
  .project-type {
    grid-column: 2;
    grid-row: 2;
    margin-top: 10px;
  }
  .project-toggle {
    grid-column: 3;
    grid-row: 1 / 3;
  }
  .project-panel-inner {
    grid-template-columns: 1fr;
    padding: 10px 0 40px 52px;
  }
  .project-meta p {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
  }
  .text-link {
    justify-self: start;
  }
  .lab-grid {
    gap: 35px;
  }
  .canvas-shell,
  .canvas-shell canvas {
    min-height: 410px;
  }
  .canvas-help {
    display: none;
  }
  .terminal-grid {
    gap: 32px;
  }
  .interactive-terminal {
    min-height: 340px;
    padding: 18px;
    font-size: 0.7rem;
    box-shadow: 8px 8px 0 var(--accent-dark);
  }
  .terminal-form {
    display: grid;
    gap: 6px;
  }
  .contact {
    border-inline: 0;
  }
  .contact h2 {
    font-size: clamp(3.7rem, 18vw, 6rem);
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .contact-card {
    min-height: 104px;
  }
  .footer-bar {
    flex-direction: column;
  }
}

@media (max-width: 430px) {
  .site-header {
    grid-template-columns: 1fr auto;
    padding-inline: max(18px, env(safe-area-inset-left))
      max(18px, env(safe-area-inset-right));
  }
  .site-nav {
    padding-inline: max(18px, env(safe-area-inset-left))
      max(18px, env(safe-area-inset-right));
  }
  .menu-button span:last-child {
    font-size: 1.05rem;
    line-height: 1;
    transform: translateY(-1px);
  }
  .hero-main,
  .section-content,
  .contact-main,
  footer {
    padding-inline: max(18px, env(safe-area-inset-left))
      max(18px, env(safe-area-inset-right));
  }
  .hero-console {
    margin-inline: max(18px, env(safe-area-inset-left))
      max(18px, env(safe-area-inset-right));
  }
  .hero h1 {
    font-size: clamp(2.6rem, 22vw, 4.6rem);
  }
  .hero-console pre {
    padding: 16px;
    font-size: 0.64rem;
  }
  .section-content {
    padding-top: 56px;
    padding-bottom: 56px;
  }
  .resume-button {
    width: 100%;
  }
  .footer-links {
    flex-direction: column;
    gap: 10px;
  }
}

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

/* Admin auth */
.auth-page {
  min-height: 100svh;
}
.auth-shell {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(22px, 5vw, 72px);
}
.auth-panel {
  width: min(100%, 980px);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.72fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: stretch;
  border: 1px solid var(--line);
  background: rgba(17, 20, 23, 0.92);
  box-shadow: 18px 18px 0 var(--black);
  padding: clamp(24px, 4vw, 48px);
  position: relative;
  overflow: hidden;
}
.auth-panel::before {
  content: "AUTH / ADMIN";
  position: absolute;
  top: 18px;
  right: 20px;
  color: rgba(200, 198, 190, 0.22);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
}
.auth-brand {
  grid-column: 1 / -1;
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--paper);
  font-weight: 650;
}
.auth-brand img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  object-fit: cover;
}
.auth-copy {
  display: flex;
  flex-direction: column;
  justify-content: end;
  min-height: 320px;
}
.auth-copy h1 {
  margin: 0;
  max-width: 560px;
  font-size: clamp(3.1rem, 8vw, 7.2rem);
  font-weight: 560;
  letter-spacing: -0.075em;
  line-height: 0.86;
}
.auth-copy p:not(.eyebrow) {
  max-width: 430px;
  margin: 28px 0 0;
  color: var(--paper-2);
  margin-bottom: 20%;
}
.auth-form {
  align-self: end;
  border: 1px solid var(--line);
  background: rgba(5, 6, 7, 0.55);
  padding: clamp(20px, 3vw, 30px);
}
.auth-status {
  min-height: 1.5em;
  margin: 0 0 22px;
  color: var(--paper-2);
  font-family: var(--mono);
  font-size: 0.78rem;
}
.auth-form label {
  display: block;
  margin: 0 0 18px;
}
.auth-form label span {
  display: block;
  margin-bottom: 8px;
  color: var(--paper-2);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.auth-form input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  background: var(--panel);
  color: var(--paper);
}
.auth-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 74, 61, 0.16);
}
.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}
.auth-actions .resume-button {
  min-width: 0;
  flex: 1 1 150px;
}
.auth-actions button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}
@media (max-width: 820px) {
  .auth-panel {
    grid-template-columns: 1fr;
    gap: 30px;
    box-shadow: 10px 10px 0 var(--black);
  }
  .auth-copy {
    min-height: auto;
  }
  .auth-panel::before {
    display: none;
  }
}
@media (max-width: 520px) {
  .auth-shell {
    place-items: stretch;
    padding: 16px;
  }
  .auth-panel {
    padding: 20px;
  }
  .auth-brand span {
    display: inline;
  }
  .auth-copy h1 {
    font-size: clamp(3rem, 18vw, 4.8rem);
  }
}
