/* =========================================================
   AYUSH KUMAR — PORTFOLIO
   Design system: "Secure Intelligence"
   ========================================================= */
:root {
  --bg: #07070a;
  --bg-2: #0d0d12;
  --panel: rgba(255, 255, 255, 0.035);
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #ecebe6;
  --dim: #8a8a93;
  --accent: #b4ff39; /* acid lime — "verified" */
  --accent-rgb: 180, 255, 57;
  --violet: #7c5cff;
  --red: #ff4d6d;
  --amber: #fbbf24;
  --f-display: "Clash Display", "Satoshi", system-ui, sans-serif;
  --f-body: "Satoshi", system-ui, -apple-system, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;
  --f-sans: var(--f-body);
  --fg: var(--text);
  --pad: clamp(1.25rem, 4vw, 4rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 22px;
  --f-xs: 0.75rem;
  --f-sm: 0.875rem;
  --f-base: 1rem;
  --f-md: 1.125rem;
  --f-lg: 1.25rem;
  --f-xl: 1.5rem;
  --f-2xl: 2.2rem;
  --f-3xl: 3rem;
  --f-4xl: 5rem;
  
  --text-muted: #c4c4cb;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 18px;

}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  -webkit-text-size-adjust: 100%;
}
html.lenis,
html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: var(--f-base);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.is-loading {
  overflow: hidden;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}
img {
  display: block;
  max-width: 100%;
}
ul,
ol {
  list-style: none;
}
::selection {
  background: var(--accent);
  color: #000;
}

.mono {
  font-family: var(--f-mono);
  font-size: var(--f-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.dim {
  color: var(--dim);
}
.accent {
  color: var(--accent);
  font-style: normal;
}
.outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--text);
}
.anchor {
  position: absolute;
  top: 0;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: 0.8rem;
  left: 0.8rem;
  z-index: 1001;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  background: var(--accent);
  color: #000;
  font: 700 var(--f-sm) var(--f-body);
  transform: translateY(-160%);
  transition: transform 0.3s var(--ease);
}
.skip-link:focus-visible {
  transform: none;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
:focus:not(:focus-visible) {
  outline: none;
}

/* custom cursor only once JS has actually mounted it (never leave users cursor-less) */
html.has-cursor body,
html.has-cursor a,
html.has-cursor button,
html.has-cursor input,
html.has-cursor textarea,
html.has-cursor select {
  cursor: none;
}

/* ================= BOOT ================= */
#boot {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: var(--bg);
}
.boot-inner {
  width: min(560px, 88vw);
  position: relative;
  z-index: 2;
  font-family: var(--f-mono);
  font-size: var(--f-xs);
}
.boot-head,
.boot-foot {
  display: flex;
  justify-content: space-between;
  color: var(--dim);
  letter-spacing: 0.08em;
}
.boot-head {
  border-bottom: 1px dashed var(--line-2);
  padding-bottom: 0.6rem;
  margin-bottom: 1rem;
}
#boot-log {
  min-height: 190px;
  white-space: pre-wrap;
  color: var(--text-muted);
  line-height: 1.75;
  font-family: var(--f-mono);
}
#boot-log .ok {
  color: var(--accent);
}
#boot-log .warn {
  color: var(--amber);
}
.boot-bar {
  height: 2px;
  background: var(--line);
  margin: 1rem 0 0.6rem;
  overflow: hidden;
}
#boot-bar-fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  box-shadow: 0 0 20px var(--accent);
}
#boot-pct {
  color: var(--accent);
  font-size: var(--f-xl);
  font-weight: 700;
  letter-spacing: 0;
}
.boot-foot {
  align-items: flex-end;
}
.boot-skip {
  margin-top: 1.6rem;
  color: var(--dim);
  opacity: 0.6;
  letter-spacing: 0.08em;
  text-align: center;
  animation: blink 1.6s steps(1) infinite;
}
.boot-shutter {
  position: absolute;
  left: 0;
  right: 0;
  height: 50%;
  background: var(--bg);
  z-index: 1;
}
.boot-shutter.top {
  top: 0;
}
.boot-shutter.bottom {
  bottom: 0;
}

/* ================= CURSOR ================= */
#cursor,
#cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 999;
}
#cursor {
  width: 38px;
  height: 38px;
  margin: -19px 0 0 -19px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition:
    width 0.35s var(--ease),
    height 0.35s var(--ease),
    margin 0.35s var(--ease),
    background 0.35s,
    border-color 0.35s;
  mix-blend-mode: difference;
}
#cursor.is-hover {
  width: 86px;
  height: 86px;
  margin: -43px 0 0 -43px;
  background: #fff;
  border-color: #fff;
}
/* outline "drag" cursor over large surfaces (the case-file strip) */
#cursor.is-hover.is-ghost {
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  background: rgba(7, 7, 10, 0.35);
  border-color: rgba(255, 255, 255, 0.55);
  mix-blend-mode: normal;
}
#cursor.is-ghost .cursor-label {
  color: var(--text);
}
#cursor.is-hover.is-archive-hover {
  background: rgba(7, 7, 10, 0.55);
  border-color: rgba(255, 255, 255, 0.4);
  mix-blend-mode: normal;
  backdrop-filter: blur(4px);
}
#cursor .cursor-label {
  font: 600 var(--f-xs) var(--f-mono);
  color: #000;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0;
  transition: opacity 0.2s;
  white-space: nowrap;
}
#cursor.is-hover .cursor-label {
  opacity: 1;
}
#cursor.is-hover.is-archive-hover .cursor-label {
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}
#cursor-dot {
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  background: var(--accent);
  border-radius: 50%;
}
@media (hover: none), (pointer: coarse) {
  #cursor,
  #cursor-dot {
    display: none;
  }
}

/* ================= GLOBAL LAYERS ================= */
#neural {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0; /* JS fades it in once you leave the hero */
  transition: opacity 0.6s;
}
#cipher {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(130% 100% at 50% 45%, #000 55%, transparent 100%);
  mask-image: radial-gradient(130% 100% at 50% 45%, #000 55%, transparent 100%);
}
.grain {
  position: fixed;
  inset: -50%;
  z-index: 998;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain {
  0%,
  100% {
    transform: translate(0, 0);
  }
  20% {
    transform: translate(-5%, 3%);
  }
  40% {
    transform: translate(4%, -6%);
  }
  60% {
    transform: translate(-3%, 5%);
  }
  80% {
    transform: translate(6%, 2%);
  }
}
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 101;
}
.scroll-progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(0);
}

main,
footer {
  position: relative;
  z-index: 2;
}
main {
  overflow-x: clip;
}

/* ================= HEADER ================= */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem var(--pad);
  transition:
    transform 0.5s var(--ease),
    background 0.4s,
    backdrop-filter 0.4s;
}
#site-header.scrolled {
  background: rgba(7, 7, 10, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
#site-header.hidden {
  transform: translateY(-110%);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.brand-logo {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.brand-name {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  color: var(--text);
  letter-spacing: -0.02em;
  margin-top: auto;
}
@keyframes ping {
  0% {
    box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.6);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(var(--accent-rgb), 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0);
  }
}
#main-nav {
  display: flex;
  gap: 0.3rem;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(13, 13, 18, 0.6);
  backdrop-filter: blur(10px);
}
#main-nav a {
  transition:
    background 0.3s,
    color 0.3s;
  }
#main-nav a:hover,
#main-nav a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}
#main-nav a.active {
  color: #000;
  background: var(--accent);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.kbd-btn {
  display: flex;
  gap: 3px;
  transition:
    color 0.3s,
    border-color 0.3s;
}
.kbd-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.kbd-btn span {
  min-width: 12px;
  text-align: center;
}
.pill-btn {
  transition: background 0.3s;
  display: inline-block;
}
.pill-btn:hover {
  background: var(--accent);
}
#menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-md);
  position: relative;
}
#menu-toggle span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.4s var(--ease);
}
#menu-toggle span:first-child {
  top: 17px;
}
#menu-toggle span:last-child {
  top: 25px;
}
body.menu-open #menu-toggle span:first-child {
  transform: translateY(4px) rotate(45deg);
}
body.menu-open #menu-toggle span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}
#mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--pad);
  gap: 0.4rem;
  clip-path: circle(0% at calc(100% - 40px) 40px);
  visibility: hidden;
  transition:
    clip-path 0.7s var(--ease),
    visibility 0s 0.7s;
}
#mobile-menu a {
  font: 600 clamp(2.4rem, 11vw, 4rem) var(--f-display);
  line-height: 1.1;
}
.mobile-search-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-md);
  color: var(--dim);
  text-align: left;
  padding: 1.2rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  cursor: pointer;
  font: 500 1.2rem var(--f-sans);
  width: 100%;
  transition: all 0.2s var(--ease);
}
.mobile-search-btn:active {
  border-color: var(--dim);
  background: rgba(255, 255, 255, 0.06);
}
.mobile-search-btn svg {
  color: currentColor;
  width: 1.2rem;
  height: 1.2rem;
  flex-shrink: 0;
}
body.menu-open #mobile-menu {
  clip-path: circle(150% at calc(100% - 40px) 40px);
  visibility: visible;
  transition-delay: 0s;
}
.mobile-dossier {
  margin-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.4rem;
  border-radius: var(--radius-md);
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  color: var(--accent);
  font: 600 var(--f-lg) var(--f-body);
  text-align: left;
}

/* ghost button — outline pill used for secondary CTAs */
.ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 1.3rem;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(13, 13, 18, 0.78);
  color: var(--text);
  font: 600 var(--f-sm) var(--f-body);
  white-space: nowrap;
  transition:
    border-color 0.3s,
    color 0.3s,
    background 0.3s;
}
.ghost-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.06);
}
.ghost-btn .bolt {
  color: var(--accent);
}

/* ================= HERO ================= */
.hero {
  min-height: 100svh;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6.5rem var(--pad) 2rem;
}
.hero-meta,
.hero-content {
  position: relative;
  z-index: 1;
}
.hero-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--dim);
}
.hero-meta.top {
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
}
.hero-content {
  padding: 2vh 0;
}
.hero-eyebrow {
  color: var(--accent);
  margin-bottom: 1rem;
  font-size: var(--f-sm);
  text-transform: none;
}
#hero-coords {
  text-transform: none;
}
.blink {
  animation: blink 1s steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
.hero-title {
  font-family: var(--f-display);
  font-weight: 600;
  /* width-driven, but capped by viewport height so the hero always fits the fold */
  font-size: clamp(4rem, min(17.5vw, 22svh), 17rem);
  line-height: 0.86;
  letter-spacing: -0.03em;
}
.hero-title .line {
  display: flex;
  align-items: center;
  gap: 4vw;
  overflow: hidden;
  padding-bottom: 0.04em;
}
.hero-title .line-2 {
  justify-content: flex-start;
  padding-left: 18vw;
}
.hero-title .word {
  white-space: nowrap;
  display: inline-flex;
}
.hero-title .char {
  display: inline-block;
  will-change: transform;
}
.hero-portrait {
  width: clamp(90px, 0.92em, 250px); /* scales with the title */
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  border: 1px solid var(--line-2);
  clip-path: inset(0 100% 0 0 round 50%);
}
.hero-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  filter: grayscale(1) contrast(1.1);
  transition:
    filter 0.6s,
    transform 0.8s var(--ease);
  transform: scale(1);
}
.hero-portrait:hover img {
  filter: grayscale(0);
  transform: scale(1.05);
}
.hero-sub {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-top: 1.6rem;
  flex-wrap: wrap;
}
/* a soft static vignette + dark halo keep hero copy legible over decrypted glyphs */
.hero-left,
.hero-right {
  position: relative;
}
.hero-left::before,
.hero-right::before {
  content: "";
  position: absolute;
  inset: -2rem -3.2rem;
  z-index: -1;
  background: radial-gradient(
    closest-side,
    rgba(7, 7, 10, 0.88) 58%,
    rgba(7, 7, 10, 0)
  );
  pointer-events: none;
}
.hero-sub p,
.hero-eyebrow,
.scroll-cue-text {
  text-shadow:
    0 0 14px var(--bg),
    0 0 6px var(--bg),
    0 0 2px var(--bg);
}
.hero-left {
  display: grid;
  gap: 0.9rem;
}
.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0.02em;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  position: relative;
}
.hero-right {
  display: grid;
  gap: 1.5rem;
  justify-items: start;
}
.hero-ctas {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}
.hero-ctas .pill-btn span {
  display: inline-block;
  margin-left: 0.3rem;
  transition: transform 0.4s var(--ease);
}
.hero-ctas .pill-btn:hover span {
  transform: translate(2px, 2px);
}
.hero-role {
  font-size: clamp(1rem, 1.6vw, 1.3rem);
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.role-text {
  font-family: var(--f-mono);
  color: var(--accent);
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  border-right: 2px solid var(--accent);
  padding-right: 4px;
}
.hero-tagline {
  max-width: 30ch;
  font-size: clamp(1.2rem, 2.1vw, 1.75rem);
  line-height: 1.3;
  font-weight: 500;
}
.hero-tagline em {
  font-style: normal;
  font-family: var(--f-display);
}
.hero-meta.bottom {
  align-items: flex-end;
}
.scroll-cue {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--text);
}
.scroll-cue-line {
  width: 1px;
  height: 54px;
  background: var(--line-2);
  position: relative;
  overflow: hidden;
}
.scroll-cue-line::after {
  content: "";
  position: absolute;
  left: 0;
  top: -40%;
  width: 100%;
  height: 40%;
  background: var(--accent);
  animation: drip 1.8s var(--ease) infinite;
}
@keyframes drip {
  to {
    top: 110%;
  }
}
.scroll-cue-text {
  display: grid;
  gap: 0.35rem;
}
.cipher-hint {
  font-size: var(--f-xs);
  text-transform: none;
  letter-spacing: 0.02em;
  transition: opacity 0.8s, color 0.4s;
}
.cipher-hint.found {
  color: var(--accent);
}
.hero-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.hero-badges span {
  }

/* ================= MARQUEE ================= */
.marquee {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: var(--accent);
  color: #000;
  transform: rotate(-2deg) scale(1.04);
  margin: 3rem 0;
  /* own compositing layer: smooth (non-jagged) edges on the rotated band */
  backface-visibility: hidden;
  outline: 1px solid transparent;
}
.marquee-track {
  display: flex;
  width: max-content;
  padding: 1rem 0;
  animation: marquee 30s linear infinite;
  font: 600 clamp(1.4rem, 3vw, 2.4rem) var(--f-display);
  white-space: nowrap;
  align-items: center;
  will-change: transform;
}
/* spacing lives on each item (not `gap`) so both halves are exactly equal
   and translateX(-50%) lands on a perfect loop — no jump every cycle */
.marquee-track > * {
  margin-right: 2rem;
}
.marquee-track b {
  font-size: var(--f-sm);
}
@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ================= SECTIONS ================= */
.section {
  padding: clamp(5rem, 12vh, 9rem) var(--pad);
  position: relative;
}
.section-label {
  color: var(--dim);
  display: flex;
  gap: 0.8rem;
  align-items: center;
  margin-bottom: 2.5rem;
}
.section-label span {
  color: var(--accent);
}
.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.section-title {
  font: 600 clamp(2.4rem, 6.5vw, 6rem) var(--f-display);
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin-bottom: 3.5rem;
  max-width: 16ch;
}

/* ================= ABOUT ================= */
.about-statement {
  font: 500 clamp(1.6rem, 3.8vw, 3.6rem) var(--f-display);
  line-height: 1.15;
  letter-spacing: -0.015em;
  max-width: 26ch;
  margin-bottom: 5rem;
}
/* scroll-to-decrypt: each word keeps its real layout box (text is transparent)
   while a mono ciphertext overlay sits on top until the word is decrypted */
.about-statement .w {
  position: relative;
  color: transparent;
  transition: color 0.5s var(--ease);
}
.about-statement .w::after {
  content: attr(data-c);
  position: absolute;
  left: 0;
  top: 52%;
  transform: translateY(-50%);
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  font: 500 0.52em/1 var(--f-mono);
  letter-spacing: 0.06em;
  color: rgba(var(--accent-rgb), 0.32);
  transition: opacity 0.35s;
}
.about-statement .w.on {
  color: var(--text);
}
.about-statement .w.on::after {
  opacity: 0;
}
.about-statement .w.hot {
  color: var(--accent);
  transition: none;
}
.about-statement.plain .w {
  color: var(--text);
}
.about-statement.plain .w::after {
  display: none;
}
.about-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.about-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: border-color 0.4s;
}
.about-card:hover {
  border-color: var(--line-2);
}
.about-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    400px circle at var(--mx, 50%) var(--my, 50%),
    rgba(var(--accent-rgb), 0.09),
    transparent 40%
  );
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.about-card:hover::before {
  opacity: 1;
}
.stat {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  min-height: 180px;
  align-content: space-between;
}
.stat-num {
  font: 600 clamp(3.5rem, 6vw, 5.5rem) var(--f-display);
  line-height: 1;
}
.stat-plus {
  font: 600 var(--f-2xl) var(--f-display);
  color: var(--accent);
}
.stat-label {
  width: 100%;
  color: var(--dim);
  margin-top: 1rem;
}
.principle {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  min-height: 220px;
}
.principle p {
  font: 600 clamp(1.5rem, 2.6vw, 2.3rem) var(--f-display);
  line-height: 1.12;
}
.now {
  grid-column: span 2;
}
.now-list {
  margin-top: 1.4rem;
  display: grid;
  gap: 0.9rem;
}
.now-list li {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  font-size: var(--f-md);
  padding-bottom: 0.9rem;
  border-bottom: 1px dashed var(--line);
}
.now-list li:last-child {
  border: 0;
  padding: 0;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot.green {
  background: var(--accent);
}
.dot.violet {
  background: var(--violet);
}
.dot.amber {
  background: var(--amber);
}
.dot.red {
  background: var(--red);
}

/* ================= WORK ================= */
.work {
  position: relative;
}
.work-pin {
  padding: clamp(5rem, 12vh, 9rem) 0 clamp(3rem, 7vh, 5rem);
}
.work-head {
  padding: 0 var(--pad);
  position: relative;
}
.work-head .section-label {
  margin-bottom: 1.2rem;
}
.work-head .section-title {
  margin-bottom: 2rem;
  max-width: none;
  padding-right: 15rem; /* room for the counter + arrows on the right */
  font-size: clamp(2.2rem, 5vw, 4.6rem);
}
.work-counter {
  position: absolute;
  right: calc(var(--pad) + 112px);
  bottom: 2.35rem;
  font-size: var(--f-base);
  color: var(--dim);
}
.work-counter #work-current {
  color: var(--accent);
  font-size: var(--f-2xl);
  font-family: var(--f-display);
}
.work-nav {
  display: flex;
  gap: 0.5rem;
  position: absolute;
  right: var(--pad);
  bottom: 2.1rem;
}
.work-nav button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  font: 500 var(--f-md) var(--f-mono);
  transition:
    border-color 0.3s,
    color 0.3s,
    opacity 0.3s;
}
.work-nav button:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.work-nav button:disabled {
  opacity: 0.3;
  pointer-events: none;
}
/* a native sideways strip: swipe / drag / Shift+wheel / arrows; it never
   captures vertical scrolling, so the page moves straight on to Archive */
.work-track {
  display: flex;
  gap: 1.5rem;
  padding: 0.3rem var(--pad) 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--pad);
  overscroll-behavior-x: contain; /* no accidental browser back/forward swipes */
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}
.work-track::-webkit-scrollbar {
  display: none;
}
.work-track:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  border-radius: var(--radius);
}
/* while a wheel/drag gesture is live the strip tracks it 1:1; JS then glides
   to a card and restores snapping (mandatory snap would fight small steps) */
.work-track.free {
  scroll-snap-type: none;
}
.work-track.dragging {
  cursor: grabbing;
  user-select: none;
}
.work-track.dragging .case {
  pointer-events: none;
}
.work-track .case {
  scroll-snap-align: start;
}
.work-progress {
  margin: 1.2rem var(--pad) 0;
  height: 1px;
  background: var(--line);
}
.work-progress span {
  display: block;
  height: 100%;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(0);
}
.work-swipe {
  margin-top: 0.9rem;
  text-align: center;
  font-size: var(--f-xs);
  text-transform: none;
}

.case {
  --c: var(--accent);
  width: min(78vw, 980px);
  height: min(68vh, 600px);
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.01)
  );
  position: relative;
  transition: border-color 0.5s;
}
.case:hover {
  border-color: color-mix(in srgb, var(--c) 45%, transparent);
}
.case-info {
  padding: clamp(1.4rem, 2.5vw, 2.4rem);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-width: 0;
  overflow: hidden;
}
.case-top {
  display: flex;
  justify-content: space-between;
  color: var(--dim);
  gap: 1rem;
}
.case-top .cat {
  color: var(--c);
}
.case-top .meta {
  display: inline-flex;
  gap: 0.8rem;
  align-items: center;
  white-space: nowrap;
}
.case-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--f-xs);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  color: var(--text-muted);
}
.case-status.live {
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.4);
}
.case-status.live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: beacon 2s ease-in-out infinite;
}
.case-title {
  font: 600 clamp(1.8rem, 3.4vw, 3.2rem) var(--f-display);
  line-height: 1;
  letter-spacing: -0.02em;
}
.case-kicker {
  color: var(--dim);
  font-size: var(--f-base);
  margin-top: -0.4rem;
}
.case-award {
  align-self: flex-start;
}
.case-desc {
  font-size: var(--f-base);
  color: var(--text-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 7;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-shrink: 1;
  min-height: 0;
}
.case-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  flex-shrink: 0;
}
.case-links {
  margin-top: auto;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  flex-shrink: 0;
  padding-top: 0.4rem;
}
.case-links a {
  transition:
    background 0.3s,
    color 0.3s,
    border-color 0.3s;
  display: inline-flex;
  gap: 0.4rem;
}
.case-links a:hover {
  background: var(--c);
  color: #000;
  border-color: var(--c);
}
.case-visual {
  position: relative;
  border-left: 1px solid var(--line);
  background:
    radial-gradient(
      120% 90% at 70% 20%,
      color-mix(in srgb, var(--c) 22%, transparent),
      transparent 60%
    ),
    #0a0a0e;
  overflow: hidden;
}
.case-visual canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.case-metrics {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
.case-metrics div {
  background: rgba(9, 9, 13, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.7rem 0.8rem;
}
.case-metrics b {
  display: block;
  font: 600 var(--f-lg) var(--f-display);
  color: var(--c);
  line-height: 1.1;
}
.case-metrics small {
  font: 500 var(--f-xs) var(--f-mono);
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.case-index {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  font: 600 var(--f-4xl) var(--f-display);
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.14);
  line-height: 1;
  z-index: 1;
}
.case.end-card {
  width: clamp(300px, 34vw, 520px);
  grid-template-columns: 1fr;
  place-items: center;
  text-align: center;
  background: var(--bg-2);
  color: var(--fg);
  border: 1px solid var(--line);
}
.case.end-card h3 {
  font: 600 clamp(2rem, 4vw, 3.6rem) var(--f-display);
  line-height: 1;
  padding: 2rem;
}
.case.end-card a {
  display: inline-block;
  margin-top: 1.4rem;
}

.gh-logo-wrapper {
  margin: 0 auto 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.case.end-card:hover .gh-logo-wrapper {
  transform: scale(1.15) rotate(4deg);
}
.gh-logo-float {
  width: 76px;
  height: 76px;
  color: var(--fg);
  animation: float-up-down 3.5s ease-in-out infinite;
}
@keyframes float-up-down {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ================= ARCHIVE ================= */
.archive-list {
  border-top: 1px solid var(--line);
  margin-bottom: 2.5rem;
}
.archive-item a {
  display: grid;
  grid-template-columns: 3rem 1.3fr 2fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem 0.5rem;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  transition:
    padding 0.5s var(--ease),
    color 0.4s;
}
.archive-item a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.5s var(--ease);
  z-index: -1;
}
.archive-item a:hover {
  padding-left: 1.5rem;
  color: #000;
}
.archive-item a:hover::before {
  transform: scaleY(1);
}
.archive-item a:hover .a-desc,
.archive-item a:hover .a-num {
  color: #000;
}
.a-num {
  font: 500 var(--f-sm) var(--f-mono);
  color: var(--dim);
}
.a-title {
  font: 600 clamp(1.3rem, 2.4vw, 2rem) var(--f-display);
  line-height: 1.1;
}
.a-desc {
  color: var(--dim);
  font-size: var(--f-base);
  transition: color 0.4s;
}
.a-tag {
  white-space: nowrap;
}
.a-tag.live::before {
  content: "● ";
  color: var(--accent);
}
.archive-item a:hover .a-tag.live::before {
  color: #000;
}
.archive-item a:hover .a-tag {
  color: #000;
  border-color: rgba(0, 0, 0, 0.35);
}
.text-link {
  display: inline-flex;
  gap: 0.6rem;
  font: 600 var(--f-md) var(--f-display);
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 0.3rem;
  transition:
    color 0.3s,
    border-color 0.3s;
}
.text-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}
/* floating artwork preview that trails the cursor over archive rows */
#archive-preview {
  position: fixed;
  top: 0;
  left: 0;
  width: clamp(200px, 17vw, 260px);
  aspect-ratio: 1;
  pointer-events: none;
  z-index: 998;
  opacity: 0;
  will-change: transform, opacity;
  transition: opacity 0.3s var(--ease);
}
#archive-preview .ap-inner {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8);
  transform: scale(0.6);
  transition: transform 0.5s var(--ease);
}
#archive-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s;
}
#archive-preview img.on {
  opacity: 1;
}
#archive-preview.is-active {
  opacity: 1;
}
#archive-preview.is-active .ap-inner {
  transform: scale(1);
}
.a-thumb {
  display: none;
}

/* ================= STACK / BENTO ================= */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
}
.bento-card {
  grid-column: span 2;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  position: relative;
  overflow: hidden;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  transition:
    border-color 0.4s,
    transform 0.5s var(--ease);
}
.bento-card:nth-child(1),
.bento-card:nth-child(2) {
  grid-column: span 3;
}
.bento-card:hover {
  border-color: rgba(var(--accent-rgb), 0.45);
}
.bento-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    500px circle at var(--mx, 50%) var(--my, 50%),
    rgba(var(--accent-rgb), 0.08),
    transparent 40%
  );
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.bento-card:hover::before {
  opacity: 1;
}
.bento-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.bento-head h3 {
  font: 600 var(--f-xl) var(--f-display);
}
.bento-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-2);
  font-size: var(--f-lg);
  color: var(--accent);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.chip {
  transition:
    background 0.3s,
    color 0.3s,
    transform 0.3s var(--ease);
}
.chip:hover {
  background: var(--accent);
  color: #000;
  transform: translateY(-2px);
}
.chip.has-proof {
  position: relative;
  border-color: rgba(var(--accent-rgb), 0.32);
}
.chip.has-proof::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}
.chip.has-proof:hover::after {
  background: #000;
  box-shadow: none;
}
.bento-path {
  display: block;
  margin-bottom: 0.3rem;
  font: 500 var(--f-xs) var(--f-mono);
  color: var(--dim);
  letter-spacing: 0.04em;
}
.stack-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: -2rem 0 2rem;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0.02em;
}
.proof-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}
#chip-tip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 997;
  max-width: min(300px, 86vw);
  padding: 0.75rem 0.95rem;
  background: rgba(13, 13, 18, 0.95);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.7);
  font: 500 var(--f-xs) / 1.55 var(--f-mono);
  color: var(--text-muted);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, calc(-100% - 6px)) scale(0.96);
  transform-origin: 50% 100%;
  transition:
    opacity 0.2s,
    transform 0.25s var(--ease);
}
#chip-tip.on {
  opacity: 1;
  transform: translate(-50%, calc(-100% - 12px)) scale(1);
}
#chip-tip.below {
  transform: translate(-50%, 6px) scale(0.96);
  transform-origin: 50% 0;
}
#chip-tip.below.on {
  transform: translate(-50%, 12px) scale(1);
}
#chip-tip b {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
#chip-tip li::before {
  content: "↳ ";
  color: var(--dim);
}
.bento-count {
  margin-top: auto;
  font: 500 var(--f-sm) var(--f-mono);
  color: var(--dim);
  text-transform: uppercase;
}
.gh-live {
  margin-top: 4rem;
  padding-top: 1rem;
  color: var(--dim);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  text-transform: none;
  clear: both;
  width: 100%;
  position: relative;
  z-index: 10;
}
.gh-live b {
  color: var(--text);
}
.gh-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  position: relative;
}

/* ================= JOURNEY ================= */
.timeline {
  position: relative;
  padding-left: clamp(1.5rem, 12vw, 12rem);
}
.timeline-rail {
  position: absolute;
  left: clamp(0.35rem, 8vw, 8rem);
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line);
}
.timeline-rail span {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform-origin: top;
  transform: scaleY(0);
  box-shadow: 0 0 12px var(--accent);
}
.t-item {
  position: relative;
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 2rem;
  padding: 2.2rem 0;
  border-bottom: 1px dashed var(--line);
}
.t-item::before {
  content: "";
  position: absolute;
  left: calc(-1 * clamp(1.5rem, 12vw, 12rem) + clamp(0.35rem, 8vw, 8rem) - 6px);
  top: 2.7rem;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line-2);
  transition:
    background 0.4s,
    border-color 0.4s,
    box-shadow 0.4s;
}
.t-item.lit::before {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 5px rgba(var(--accent-rgb), 0.15);
}
.t-date {
  font: 500 var(--f-sm) var(--f-mono);
  color: var(--dim);
  padding-top: 0.35rem;
}
.t-type {
  display: inline-block;
  margin-bottom: 0.7rem;
}
.t-type.INTERN {
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
}
.t-type.HACKATHON {
  background: rgba(124, 92, 255, 0.15);
  color: var(--violet);
}
.t-type.AWARD {
  background: rgba(251, 191, 36, 0.15);
  color: var(--amber);
}
.t-type.EDU {
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
}
.t-title {
  font: 600 clamp(1.3rem, 2.4vw, 2rem) var(--f-display);
  line-height: 1.15;
}
.t-org {
  color: var(--text);
  opacity: 0.75;
  margin: 0.3rem 0 0.6rem;
  font-weight: 500;
}
.t-desc {
  color: var(--dim);
  max-width: 62ch;
}

/* ================= CERTS ================= */
.cert-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.cert-filters button {
  transition: all 0.3s;
}
.cert-filters button.active,
.cert-filters button:hover {
  color: #000;
  background: var(--accent);
  border-color: var(--accent);
}
.cert-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 2rem;
}
.cert {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--line);
}
.cert.hide {
  display: none;
}
.cert-check {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  color: var(--accent);
  font-size: var(--f-sm);
}
.cert-name {
  font-weight: 600;
  font-size: var(--f-md);
  line-height: 1.3;
}
.cert-issuer {
  color: var(--dim);
  font-size: var(--f-sm);
}
.cert-year {
  font: 500 var(--f-sm) var(--f-mono);
  color: var(--dim);
}

/* ================= TERMINAL ================= */
.terminal-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 1rem;
  align-items: stretch;
}
.terminal {
  position: relative;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(9, 9, 13, 0.95);
  box-shadow: 0 40px 120px -40px rgba(var(--accent-rgb), 0.25);
  min-width: 0;
  /* column flex: the output area grows to fill however tall the grid row is
     (the CTF card beside it is taller), so there's no dead band at the bottom */
  display: flex;
  flex-direction: column;
  transition:
    border-color 0.5s ease,
    box-shadow 0.5s ease;
}

/* ---- CTF card ---- */
.ctf-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.4rem;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  background: linear-gradient(
      165deg,
      rgba(var(--accent-rgb), 0.08),
      rgba(255, 255, 255, 0.015) 45%
    ),
    rgba(9, 9, 13, 0.7);
  min-width: 0;
}
.ctf-card-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--dim);
  font-size: var(--f-xs);
}
.ctf-score {
  margin-left: auto;
  color: var(--accent);
  font-weight: 700;
}
.ctf-card h3 {
  font: 600 var(--f-xl) / 1.15 var(--f-display);
  letter-spacing: -0.01em;
}
.ctf-card p {
  color: var(--text-muted);
  font-size: var(--f-sm);
  line-height: 1.55;
}
.ctf-card code,
#term-output code {
  font-family: var(--f-mono);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.1);
  padding: 0.05em 0.35em;
  border-radius: 4px;
}
.ctf-board {
  display: grid;
  gap: 0.35rem;
  font: 500 var(--f-xs) var(--f-mono);
}
.ctf-board li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--dim);
  transition:
    color 0.4s,
    border-color 0.4s,
    background 0.4s;
}
.ctf-board li .nm {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ctf-board li .lvl {
  opacity: 0.7;
  text-transform: uppercase;
  font-size: 0.68rem;
}
.ctf-board li.got {
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.3);
  background: rgba(var(--accent-rgb), 0.06);
}
.ctf-board li.fresh {
  animation: ctfFresh 1.2s var(--ease);
}
@keyframes ctfFresh {
  0% {
    background: rgba(var(--accent-rgb), 0.45);
    transform: scale(1.03);
  }
  100% {
    background: rgba(var(--accent-rgb), 0.06);
    transform: none;
  }
}
.ctf-actions {
  margin-top: auto;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.ctf-actions .ghost-btn {
  font: 500 var(--f-xs) var(--f-mono);
  padding: 0.55rem 0.9rem;
}
.term-hints button.hot {
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.45);
}
.ctf-hud {
  position: fixed;
  left: 1.2rem;
  bottom: 1.2rem;
  z-index: 890;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: rgba(13, 13, 18, 0.94);
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  font-size: var(--f-xs);
  transform: translateY(180%);
  visibility: hidden;
  transition:
    transform 0.6s var(--ease),
    visibility 0s 0.6s;
}
.ctf-hud.show {
  transform: none;
  visibility: visible;
  transition-delay: 0s;
}
.ctf-hud b {
  color: var(--accent);
}
.ctf-hud.bump {
  animation: hudBump 0.7s var(--ease);
}
@keyframes hudBump {
  30% {
    transform: scale(1.18);
    box-shadow: 0 0 0 8px rgba(var(--accent-rgb), 0.18);
  }
}
/* ===== hack simulation dashboard (fictional / cosmetic only) ===== */
.hacksim {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.25rem 1.1rem;
  margin: 0.7rem 0 0.4rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(var(--accent-rgb), 0.5);
  border-radius: 10px;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(var(--accent-rgb), 0.045) 0 1px,
      transparent 1px 3px
    ),
    rgba(9, 9, 13, 0.55);
  box-shadow:
    0 0 0 1px rgba(var(--accent-rgb), 0.08),
    inset 0 0 30px -8px rgba(var(--accent-rgb), 0.3);
  font-size: 0.82em;
  line-height: 1.55;
  animation: hsIn 0.35s var(--ease) both;
}
@keyframes hsIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
.hacksim .hs-wide {
  grid-column: 1 / -1;
}
.hacksim .hs-col {
  display: grid;
  gap: 0.35rem;
  align-content: start;
  min-width: 0;
}
/* mid-run alert: border and glow flash red */
.hacksim {
  transition:
    border-color 0.25s,
    box-shadow 0.25s;
}
.hacksim.hs-alert {
  border-color: rgba(255, 77, 109, 0.85);
  box-shadow:
    0 0 0 1px rgba(255, 77, 109, 0.2),
    inset 0 0 36px -6px rgba(255, 77, 109, 0.45);
  animation: hsAlert 0.5s steps(2) infinite;
}
@keyframes hsAlert {
  50% {
    border-color: rgba(255, 77, 109, 0.35);
  }
}
/* "ACCESS GRANTED" jolt: a quick shake with an RGB-split flicker */
.terminal.hs-glitch {
  animation: termGlitch 0.6s steps(6) both;
}
@keyframes termGlitch {
  0% {
    transform: translate(0, 0);
    filter: none;
  }
  16% {
    transform: translate(-6px, 2px) skewX(-2deg);
    filter: drop-shadow(3px 0 0 rgba(255, 77, 109, 0.8))
      drop-shadow(-3px 0 0 rgba(56, 189, 248, 0.8));
  }
  33% {
    transform: translate(5px, -2px);
    filter: hue-rotate(40deg) saturate(1.6);
  }
  50% {
    transform: translate(-3px, 0) skewX(1.5deg);
    filter: drop-shadow(-2px 0 0 rgba(255, 77, 109, 0.8))
      drop-shadow(2px 0 0 rgba(56, 189, 248, 0.8));
  }
  66% {
    transform: translate(2px, 1px);
    filter: none;
  }
  100% {
    transform: none;
    filter: none;
  }
}
.hacksim .hs-panel {
  white-space: pre;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.hacksim .hs-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  white-space: nowrap;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 0.25rem;
  margin-bottom: 0.1rem;
}
.hacksim .hs-head b {
  font-weight: 600;
}
.hacksim .hs-tag {
  font-size: 0.86em;
  letter-spacing: 0.14em;
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  border-radius: 4px;
  padding: 0 0.35rem;
}
.hacksim .hs-h {
  color: var(--dim);
  letter-spacing: 0.06em;
}
.hacksim .hs-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: hsBlink 1.1s steps(1) infinite;
}
.hacksim .hs-blink {
  animation: hsBlink 0.7s steps(1) infinite;
}
@keyframes hsBlink {
  50% {
    opacity: 0.25;
  }
}
.hacksim .hs-granted {
  text-align: center;
  padding: 1.3rem 0.5rem;
  font: 700 clamp(1.1rem, 4vw, 1.7rem) / 1.2 var(--f-display);
  letter-spacing: 0.12em;
  color: var(--accent);
  text-shadow: 0 0 22px rgba(var(--accent-rgb), 0.7);
  animation: hsFlash 0.32s steps(2) 3;
}
.hacksim .hs-granted .hs-sub {
  display: block;
  margin-top: 0.4rem;
  font: 500 var(--f-sm) var(--f-mono);
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-shadow: none;
}
@keyframes hsFlash {
  50% {
    opacity: 0.35;
  }
}
@media (max-width: 620px) {
  .hacksim {
    grid-template-columns: 1fr;
    font-size: 0.76em;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hacksim,
  .hacksim .hs-granted,
  .terminal.hs-glitch {
    animation: none;
  }
}
/* ===== weather card (terminal `weather`) ===== */
#term-output .wx {
  white-space: normal; /* terminal lines are pre-wrap; the card lays itself out */
  display: grid;
  gap: 0.6rem;
  margin: 0.5rem 0 0.3rem;
  padding: 0.8rem 0.95rem 0.7rem;
  border: 1px solid rgba(var(--accent-rgb), 0.45);
  border-radius: 12px;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(var(--accent-rgb), 0.08), transparent 55%),
    rgba(9, 9, 13, 0.55);
  font-size: 0.88em;
  line-height: 1.45;
  color: var(--text);
  animation: hsIn 0.35s var(--ease) both;
}
.wx small {
  font-size: 0.72em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}
.wx-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.2rem 1rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px dashed var(--line);
}
.wx-top b {
  color: var(--accent);
  font-weight: 600;
}
.wx-main {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
}
#term-output .wx-art {
  margin: 0;
  font: 600 0.9em / 1.15 var(--f-mono);
  white-space: pre;
}
.wx-art.wx-rain,
.wx-wet {
  color: #38bdf8;
}
.wx-art.wx-fog {
  color: var(--text-muted);
}
.wx-temp {
  font: 600 3.1em / 0.95 var(--f-display);
  letter-spacing: -0.03em;
}
.wx-temp small {
  font: 500 0.36em var(--f-mono);
  letter-spacing: 0;
  color: var(--text-muted);
  vertical-align: top;
  margin-left: 0.15em;
}
.wx-cond {
  margin: 0.35rem 0 0.1rem;
  font-weight: 600;
  font-size: 1.05em;
}
.wx-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
}
.wx-cell {
  display: grid;
  gap: 0.05rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}
.wx-cell b {
  font-weight: 600;
}
.wx-cell span {
  font-size: 0.8em;
  color: var(--dim);
}
.wx-aqi {
  display: grid;
  gap: 0.35rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}
.wx-aqi-top,
.wx-aqi-sub {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.2rem 1rem;
}
.wx-aqi-sub {
  font-size: 0.85em;
}
.wx-aqi-sub b {
  font-weight: 600;
}
.wx-aqibar {
  position: relative;
  height: 6px;
  border-radius: 99px;
  background: linear-gradient(
    90deg,
    #34d399 0 16.7%,
    #fbbf24 16.7% 33.3%,
    #fb923c 33.3% 50%,
    #ff4d6d 50% 66.7%,
    #a78bfa 66.7% 100%
  );
}
.wx-aqibar i {
  position: absolute;
  top: 50%;
  width: 13px;
  height: 13px;
  margin-left: -6.5px;
  border-radius: 50%;
  background: var(--text);
  border: 3px solid #07070a;
  transform: translateY(-50%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5);
}
#term-output .wx.wx-quiet {
  animation: none; /* in-place redraw when air quality arrives */
}
.wx-aqi-wait .wx-aqibar {
  opacity: 0.35;
  animation: hsBlink 1.2s ease-in-out infinite;
}
.wx-hours-h {
  margin-bottom: -0.4rem;
}
.wx-hours {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.4rem;
}
.wx-hour {
  display: grid;
  justify-items: center;
  gap: 0;
  padding: 0.3rem 0.2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}
.wx-hour small {
  letter-spacing: 0.02em;
}
.wx-emo {
  font-size: 1.25em;
  line-height: 1.3;
}
.wx-foot {
  font-size: 0.78em;
}
@media (max-width: 620px) {
  #term-output .wx {
    padding: 0.75rem 0.75rem 0.7rem;
  }
  .wx-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .wx-hours {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .wx-temp {
    font-size: 2.6em;
  }
  /* keep the sky picture beside the temperature instead of stacking */
  .wx-main {
    flex-wrap: nowrap;
    gap: 0.8rem;
  }
  .wx-now {
    min-width: 0;
  }
  #term-output .wx-art {
    font-size: 0.62em;
    flex-shrink: 0;
  }
}

.term-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--dim);
}
.term-dots {
  display: flex;
  gap: 6px;
}
.term-dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #333;
}
.term-dots i:nth-child(1) {
  background: #ff5f57;
}
.term-dots i:nth-child(2) {
  background: #febc2e;
}
.term-dots i:nth-child(3) {
  background: #28c840;
}
.term-body {
  flex: 1 1 420px; /* 420px baseline, stretches to fill the terminal */
  min-height: 0; /* long output scrolls instead of growing the terminal */
  overflow-y: auto;
  padding: 1.2rem 1.3rem;
  font: 400 var(--f-base)/1.7 var(--f-mono);
}
.term-body::-webkit-scrollbar {
  width: 6px;
}
.term-body::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: var(--radius-sm);
}
#term-output .ln {
  white-space: pre-wrap;
  word-break: break-word;
}
#term-output .cmd {
  color: var(--text);
}
#term-output .cmd b {
  color: var(--accent);
  font-weight: 400;
}
#term-output .out {
  color: var(--text-muted);
}
#term-output .hl {
  color: var(--accent);
}
#term-output .vi {
  color: var(--violet);
}
#term-output .rd {
  color: var(--red);
}
#term-output .am {
  color: var(--amber);
}
/* flags printed in the terminal select in one click, ready to copy */
#term-output .sel {
  user-select: all;
  -webkit-user-select: all;
  cursor: text;
  border-bottom: 1px dashed rgba(var(--accent-rgb), 0.45);
}
#term-output a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.term-line {
  display: flex;
  gap: 0.7rem;
  align-items: center;
}
.term-prompt {
  color: var(--accent);
  font-size: var(--f-base);
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
}
#term-input {
  flex: 1;
  min-width: 0; /* inputs have an intrinsic width — let it shrink on small phones */
  background: none;
  border: 0;
  outline: 0;
  color: var(--text);
  font-size: var(--f-base);
  caret-color: var(--accent);
  text-transform: none;
  letter-spacing: 0;
}
.term-hints {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  color: var(--dim);
}
.term-hints button {
  transition: all 0.3s;
}
.term-hints button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@keyframes shakeHard {
  0%,
  100% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-10px);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(10px);
  }
}
.shake-hard {
  animation: shakeHard 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
  border-color: var(--red) !important;
  box-shadow: 0 40px 120px -40px rgba(255, 77, 109, 0.4) !important;
}

/* Xeyes */
.xeyes-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  gap: 0.5rem;
  z-index: 9999;
  transition:
    opacity 0.3s,
    transform 0.3s;
  pointer-events: none;
}
.xeyes-container.hidden {
  opacity: 0;
  transform: translateY(20px) scale(0.8);
}
.eye {
  width: 50px;
  height: 70px;
  background: #fff;
  border-radius: 50%;
  border: 3px solid #000;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.pupil {
  width: 18px;
  height: 18px;
  background: #000;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.05s linear;
}

/* ================= CONTACT ================= */
.contact-title {
  font: 600 clamp(3rem, 10vw, 9.5rem) var(--f-display);
  line-height: 0.92;
  letter-spacing: -0.035em;
  margin-bottom: 4rem;
}
.contact-title .line {
  display: block;
  overflow: hidden;
}
.contact-title .line > span {
  display: inline-block;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
}
.contact-copy {
  font-size: var(--f-lg);
  color: var(--text-muted);
  max-width: 44ch;
  margin-bottom: 2rem;
}
.contact-copy b {
  color: var(--text);
}
.ist-status {
  margin: -0.8rem 0 1.4rem;
  color: var(--dim);
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: var(--f-xs);
}
.ist-status b {
  color: var(--text);
  font-weight: 500;
}
.email-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  padding: 1.4rem 1.6rem;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  width: 100%;
  text-align: left;
  transition:
    border-color 0.3s,
    background 0.3s;
  margin-bottom: 1.2rem;
}
.email-copy:hover {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.05);
}
.email-text {
  font: 600 clamp(1.1rem, 2.2vw, 1.7rem) var(--f-display);
  overflow-wrap: anywhere; /* prefers the <wbr> after "@" over breaking mid-word */
}
.copy-state {
  color: var(--accent);
}
.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}
.social-grid a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--f-base);
  transition: all 0.3s;
}
.social-grid a span {
  font: 500 var(--f-xs) var(--f-mono);
  color: var(--dim);
  transition: color 0.3s;
}
.social-grid a:hover {
  background: var(--text);
  color: #000;
  border-color: var(--text);
}
.social-grid a:hover span {
  color: #000;
}
.resume-btn {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}
.resume-btn .arrow {
  width: 28px;
  height: 28px;
  background: #000;
  color: var(--accent);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: transform 0.4s var(--ease);
}
.resume-btn:hover .arrow {
  transform: translateY(3px);
}

.contact-form {
  display: grid;
  gap: 1rem;
  align-content: start;
  padding: clamp(1.4rem, 3vw, 2.4rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 16, 21, 0.9);
}
.field {
  position: relative;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  padding: 1.6rem 0 0.7rem;
  color: var(--text);
  font: 500 var(--f-md) var(--f-body);
  outline: none;
  resize: vertical;
  transition: border-color 0.3s;
  border-radius: 0;
  appearance: none;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--accent);
}

/* Custom Select Dropdown */
.custom-select-wrapper {
  position: relative;
  user-select: none;
}
.custom-select {
  display: flex;
  align-items: center;
  width: 100%;
  border-bottom: 1px solid var(--line-2);
  padding: 1.6rem 0 0.7rem;
  color: var(--text);
  font: 500 var(--f-md) var(--f-body);
  cursor: pointer;
  transition: border-color 0.3s;
}
.custom-select:focus,
.custom-select.open {
  border-color: var(--accent);
  outline: none;
}
.custom-select-trigger {
  flex: 1;
  pointer-events: none;
}
.custom-select::after {
  content: "↓";
  margin-left: auto;
  font-family: var(--f-mono);
  font-size: var(--f-sm);
  color: var(--dim);
  transition:
    transform 0.3s,
    color 0.3s;
}
.custom-select.open::after {
  transform: rotate(180deg);
  color: var(--accent);
}
.custom-options {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(13, 13, 18, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-md);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition:
    opacity 0.3s var(--ease),
    transform 0.3s var(--ease);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.custom-select.open .custom-options {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.custom-option {
  display: block;
  padding: 1rem 1.4rem;
  font-size: var(--f-base);
  color: var(--dim);
  transition:
    background 0.2s,
    color 0.2s,
    padding-left 0.2s;
}
.custom-option:hover {
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--text);
  padding-left: 1.7rem;
}
.custom-option.selected {
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
  padding-left: 1.7rem;
  border-left: 2px solid var(--accent);
}
.field label {
  position: absolute;
  left: 0;
  top: 1.5rem;
  color: var(--dim);
  pointer-events: none;
  transition: all 0.3s var(--ease);
  font-size: var(--f-base);
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label,
.field label.static {
  top: 0.2rem;
  font: 500 var(--f-sm) var(--f-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.field.error input,
.field.error textarea {
  border-color: var(--red);
}
.honey {
  position: absolute;
  left: -9999px;
  opacity: 0;
}
.submit-btn {
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.3s;
}
.submit-btn:hover {
  background: var(--accent);
}
.submit-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #000;
  color: var(--text);
  display: grid;
  place-items: center;
  transition: transform 0.4s var(--ease);
}
.submit-btn:hover .submit-icon {
  transform: rotate(-45deg);
}
.submit-btn.sending {
  pointer-events: none;
  opacity: 0.7;
}
.form-status {
  min-height: 1.2em;
  color: var(--dim);
  text-transform: none;
}
.form-status.ok {
  color: var(--accent);
}
.form-status.err {
  color: var(--red);
}

/* ================= FOOTER ================= */
#site-footer {
  padding: 4rem var(--pad) 2rem;
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.footer-big {
  /* sized to the available width so "AYUSH.KUMAR" never overflows */
  font: 700 min(13rem, calc((100vw - 2 * var(--pad)) / 7.9)) var(--f-display);
  line-height: 0.85;
  letter-spacing: -0.04em;
  text-align: center;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.2);
  margin-bottom: 2.5rem;
}
.footer-big .accent {
  -webkit-text-stroke: 0;
  color: var(--accent);
}
.footer-report {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1.4rem;
  padding: 0.9rem 0;
  margin-bottom: 1.2rem;
  border-block: 1px dashed var(--line);
  color: var(--dim);
  font-size: var(--f-xs);
  text-transform: none;
}
.footer-report > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.footer-report .gh-dot {
  display: inline-block;
}
.rep-ctf {
  margin-left: auto;
  font: inherit;
  color: var(--text-muted);
  transition: color 0.3s;
}
.rep-ctf b {
  color: var(--accent);
}
.rep-ctf:hover {
  color: var(--accent);
}
.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--dim);
  text-transform: none;
}
.footer-row b {
  color: var(--text);
  font-weight: 500;
}
.to-top:hover {
  color: var(--accent);
}

/* ================= PALETTE ================= */
#palette {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: start center;
  padding-top: 16vh;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition:
    opacity 0.3s,
    visibility 0s 0.3s;
}
#palette.open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition-delay: 0s;
}
.palette-box {
  width: min(620px, 92vw);
  background: #0f0f15;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transform: translateY(-12px) scale(0.98);
  transition: transform 0.4s var(--ease);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
}
#palette.open .palette-box {
  transform: none;
}
#palette-input {
  width: 100%;
  padding: 1.2rem 1.3rem;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  outline: none;
  color: var(--text);
  font-size: var(--f-base);
  text-transform: none;
  letter-spacing: 0;
}
#palette-list {
  max-height: 340px;
  overflow-y: auto;
  padding: 0.5rem;
}
#palette-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: var(--f-base);
}
#palette-list li small {
  font: 500 var(--f-sm) var(--f-mono);
  color: var(--dim);
  text-transform: uppercase;
}
#palette-list li.sel {
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
}
.palette-foot {
  display: flex;
  gap: 1.2rem;
  padding: 0.7rem 1.2rem;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: var(--f-xs);
}

/* ================= DOSSIER (30-second TL;DR sheet) ================= */
#dossier {
  position: fixed;
  inset: 0;
  z-index: 920;
  visibility: hidden;
  transition: visibility 0s 0.6s;
}
#dossier.open {
  visibility: visible;
  transition-delay: 0s;
}
.dossier-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.45s;
}
#dossier.open .dossier-scrim {
  opacity: 1;
}
.dossier-sheet {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(580px, 100%);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(1.3rem, 3vw, 2.2rem);
  background:
    radial-gradient(90% 40% at 100% 0%, rgba(var(--accent-rgb), 0.08), transparent 60%),
    #0b0b10;
  border-left: 1px solid var(--line-2);
  box-shadow: -40px 0 120px rgba(0, 0, 0, 0.6);
  transform: translateX(104%);
  transition: transform 0.6s var(--ease);
  outline: none;
}
#dossier.open .dossier-sheet {
  transform: none;
}
.d-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--dim);
  font-size: var(--f-xs);
  padding-bottom: 1rem;
  border-bottom: 1px dashed var(--line-2);
}
.d-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  font-size: 1.3rem;
  line-height: 1;
  transition:
    border-color 0.3s,
    color 0.3s,
    transform 0.4s var(--ease);
}
.d-close:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: rotate(90deg);
}
.d-id {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.2rem;
  align-items: center;
  margin-top: 1.5rem;
}
.d-photo {
  width: 92px;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  object-fit: cover;
  object-position: center 20%;
  border: 1px solid var(--line-2);
  filter: grayscale(0.2) contrast(1.05);
}
.d-name {
  font: 600 clamp(1.7rem, 4vw, 2.3rem) / 1 var(--f-display);
  letter-spacing: -0.02em;
}
.d-role {
  margin-top: 0.45rem;
  color: var(--accent);
  font-size: var(--f-xs);
}
.d-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin-top: 0.6rem;
  color: var(--text-muted);
  font-size: var(--f-sm);
}
.d-meta .status-dot {
  display: inline-block;
  margin-right: 0.4rem;
  vertical-align: middle;
}
.d-stamp {
  position: absolute;
  top: -0.6rem;
  right: 0;
  padding: 0.25rem 0.6rem;
  border: 2px solid rgba(var(--accent-rgb), 0.55);
  border-radius: 6px;
  color: rgba(var(--accent-rgb), 0.8);
  font: 700 0.68rem var(--f-mono);
  letter-spacing: 0.18em;
  transform: rotate(8deg);
  pointer-events: none;
}
#dossier.open .d-stamp {
  animation: stamp 0.5s 0.45s var(--ease) both;
}
@keyframes stamp {
  0% {
    opacity: 0;
    transform: rotate(8deg) scale(2.2);
  }
  100% {
    opacity: 1;
    transform: rotate(8deg) scale(1);
  }
}
.d-sec {
  margin-top: 1.9rem;
}
.d-sec > h3 {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.9rem;
  font: 500 var(--f-xs) var(--f-mono);
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.d-sec > h3::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.d-tldr {
  font: 500 var(--f-lg) / 1.4 var(--f-body);
}
.d-tldr em {
  font-style: normal;
  color: var(--accent);
}
.d-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
.d-facts div {
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
}
.d-facts small {
  display: block;
  font: 500 0.68rem var(--f-mono);
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}
.d-facts b {
  font-weight: 600;
  font-size: var(--f-sm);
  line-height: 1.35;
  display: block;
}
.d-list {
  display: grid;
  gap: 0.2rem;
}
.d-list li {
  display: grid;
  grid-template-columns: 5.6rem 1fr;
  gap: 0.8rem;
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--line);
  font-size: var(--f-sm);
}
.d-list li:last-child {
  border: 0;
}
.d-list .dt {
  font: 500 var(--f-xs) var(--f-mono);
  color: var(--dim);
  padding-top: 0.15rem;
}
.d-list b {
  font-weight: 600;
}
.d-list span.org {
  display: block;
  color: var(--dim);
  font-size: var(--f-xs);
}
.d-projects {
  display: grid;
  gap: 0.5rem;
}
.d-projects a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.2rem 1rem;
  align-items: center;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--c, var(--accent));
  border-radius: var(--radius-sm);
  transition:
    background 0.3s,
    border-color 0.3s;
}
.d-projects a:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line-2);
  border-left-color: var(--c, var(--accent));
}
.d-projects b {
  font: 600 var(--f-md) var(--f-display);
}
.d-projects small {
  grid-column: 1;
  color: var(--dim);
  font-size: var(--f-xs);
}
.d-projects .go {
  grid-row: 1 / span 2;
  grid-column: 2;
  font: 500 var(--f-xs) var(--f-mono);
  color: var(--dim);
}
.d-stack {
  display: grid;
  gap: 0.55rem;
  font-size: var(--f-sm);
}
.d-stack li {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.8rem;
}
.d-stack .g {
  font: 500 var(--f-xs) var(--f-mono);
  color: var(--accent);
  text-transform: uppercase;
  padding-top: 0.12rem;
}
.d-stack span:last-child {
  color: var(--text-muted);
}
.d-actions {
  position: sticky;
  bottom: calc(-1 * clamp(1.3rem, 3vw, 2.2rem));
  margin: 2rem calc(-1 * clamp(1.3rem, 3vw, 2.2rem)) calc(-1 * clamp(1.3rem, 3vw, 2.2rem));
  padding: 1rem clamp(1.3rem, 3vw, 2.2rem) 1.3rem;
  background: linear-gradient(to top, #0b0b10 70%, rgba(11, 11, 16, 0));
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.d-actions .pill-btn,
.d-actions .ghost-btn {
  font-size: var(--f-sm);
  padding: 0.7rem 1.1rem;
}
.d-res {
  display: grid;
  gap: 0.5rem;
}
.d-res .ghost-btn {
  justify-content: space-between;
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
}

/* ================= TOAST & MATRIX ================= */
#toast {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  transform: translate(-50%, 200%);
  visibility: hidden;
  z-index: 950;
  padding: 0.8rem 1.2rem;
  background: var(--accent);
  color: #000;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.5s var(--ease);
  text-transform: none;
}
#toast.show {
  transform: translate(-50%, 0);
  visibility: visible;
}
#matrix {
  position: fixed;
  inset: 0;
  z-index: 940;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s;
}
#matrix.on {
  opacity: 0.85;
}

/* ================= REVEAL BASE ================= */
.reveal-up {
  opacity: 0;
  transform: translateY(30px);
}
.no-js .reveal-up,
.reduced .reveal-up {
  opacity: 1;
  transform: none;
}

/* ================= THEME DIAL (auto-cycling accent) ================= */
.theme-ctl {
  position: relative;
}
.theme-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.theme-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg); /* countdown starts at 12 o'clock */
}
.theme-ring circle {
  fill: none;
  stroke-width: 2;
}
.theme-ring .track {
  stroke: rgba(var(--accent-rgb), 0.45);
  transition: stroke 0.3s;
}
.theme-ctl.is-auto .theme-ring .track {
  stroke: var(--line-2);
}
.theme-ring .prog {
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-dasharray: 100.53; /* 2πr, r = 16 */
  stroke-dashoffset: 100.53;
  opacity: 0;
}
.theme-ctl.is-auto .theme-ring .prog {
  opacity: 1;
  animation: themeCountdown 12s linear forwards;
}
@keyframes themeCountdown {
  to {
    stroke-dashoffset: 0;
  }
}
.theme-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.7);
  transition: transform 0.4s var(--ease);
}
.theme-btn:hover .theme-dot {
  transform: scale(1.2);
}
.theme-dot.pop {
  animation: dotPop 0.7s var(--ease);
}
@keyframes dotPop {
  40% {
    transform: scale(1.45);
  }
}
.theme-pop {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 5;
  width: 244px;
  padding: 0.95rem;
  background: rgba(13, 13, 18, 0.97);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  transition:
    opacity 0.25s var(--ease),
    transform 0.3s var(--ease),
    visibility 0s 0.3s;
}
.theme-ctl.open .theme-pop {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}
.theme-pop-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.8rem;
  color: var(--dim);
  font-size: var(--f-xs);
}
.theme-pop-head b {
  color: var(--accent);
  font-weight: 700;
}
.theme-swatches {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.9rem;
}
.sw {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  transition:
    transform 0.3s var(--ease),
    border-color 0.3s,
    box-shadow 0.3s;
}
.sw span {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--sw);
  box-shadow: 0 0 10px color-mix(in srgb, var(--sw) 60%, transparent);
}
.sw:hover {
  transform: translateY(-2px);
}
.sw[aria-pressed="true"] {
  border-color: var(--sw);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sw) 25%, transparent);
}
.theme-auto {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
}
.ta-label {
  display: grid;
  gap: 0.1rem;
}
.ta-label b {
  font-weight: 600;
  font-size: var(--f-sm);
}
.ta-label small {
  font-size: 0.68rem;
  color: var(--dim);
  text-transform: none;
  letter-spacing: 0.02em;
}
.ta-switch {
  position: relative;
  flex-shrink: 0;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: var(--line-2);
  transition: background 0.3s;
}
.ta-switch i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text);
  transition:
    transform 0.3s var(--ease),
    background 0.3s;
}
.theme-auto[aria-checked="true"] .ta-switch {
  background: var(--accent);
}
.theme-auto[aria-checked="true"] .ta-switch i {
  transform: translateX(16px);
  background: #000;
}
/* colour-change ripple: a small glowing ring scaled up — transform/opacity only */
.theme-wave {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 997;
  width: 120px;
  height: 120px;
  margin: -60px 0 0 -60px;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform, opacity;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1100px) {
  #main-nav {
    display: none;
  }
  .about-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bento-card,
  .bento-card:nth-child(1),
  .bento-card:nth-child(2) {
    grid-column: span 3;
  }
  .case {
    height: min(72vh, 620px);
  }
  .case-desc {
    -webkit-line-clamp: 5;
  }
}

/* short laptop screens (1280×720, 1024×768…): tighten the hero so it fits the fold */
@media (min-width: 861px) and (max-height: 800px) {
  .hero {
    padding-top: 5.6rem;
    padding-bottom: 1.4rem;
  }
  .hero-eyebrow {
    margin-bottom: 0.6rem;
  }
  .hero-sub {
    margin-top: 1.1rem;
  }
  .hero-right {
    gap: 1.1rem;
  }
}

/* touch devices of any width: no hover previews, so show thumbnails inline */
@media (hover: none), (max-width: 860px) {
  .archive-item a {
    grid-template-columns: 52px 1.3fr 2fr auto;
  }
  .a-num {
    display: none;
  }
  .a-thumb {
    display: block;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid var(--line-2);
    background: var(--panel);
  }
  .cmdk-hint {
    display: none;
  }
}

@media (max-width: 860px) {
  .kbd-btn {
    display: none;
  }
  #menu-toggle {
    display: block;
  }
  .header-actions .pill-btn {
    display: none;
  }
  .header-actions .ghost-btn {
    padding: 0.6rem 0.95rem;
    font-size: var(--f-xs);
  }
  .hero-meta.top span:nth-child(2) {
    display: none;
  }
  .hero-title .line-2 {
    justify-content: flex-start;
  }
  .hero-meta.bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }
  .hero-badges {
    justify-content: flex-start;
  }
  .hero-sub {
    margin-top: 1.8rem;
    gap: 1.6rem;
  }

  /* ---- case-file strip: counter + arrows drop below the title ---- */
  .work-head {
    padding-bottom: 3.4rem;
  }
  .work-head .section-title {
    margin-bottom: 1.2rem;
    padding-right: 0;
  }
  .work-counter {
    right: auto;
    left: var(--pad);
    bottom: 0.5rem;
  }
  .work-nav {
    bottom: 0;
  }
  .work-track {
    gap: 0.9rem;
    padding-bottom: 0.8rem;
  }
  .work-progress {
    margin: 0.6rem var(--pad) 0;
  }
  .case {
    flex: 0 0 min(86vw, 440px);
    width: auto;
    height: auto;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    border-radius: var(--radius-lg);
    scroll-snap-align: start;
  }
  .case-visual {
    height: 260px;
    border-left: 0;
    border-top: 0;
    border-bottom: 1px solid var(--line);
    order: -1;
  }
  .case-info {
    padding: 1.2rem 1.3rem 1.5rem;
    gap: 0.7rem;
  }
  .case-desc {
    -webkit-line-clamp: unset;
    font-size: var(--f-sm);
  }
  .case-title {
    font-size: clamp(1.5rem, 7vw, 2.2rem);
  }
  .case-kicker {
    font-size: var(--f-sm);
  }
  .case-top {
    font-size: var(--f-sm);
  }
  .case-links {
    padding-top: 0.6rem;
  }
  .case-metrics {
    gap: 0.4rem;
    left: 0.6rem;
    right: 0.6rem;
    bottom: 0.6rem;
  }
  .case-metrics div {
    padding: 0.5rem 0.6rem;
    border-radius: var(--radius-sm);
  }
  .case-metrics b {
    font-size: var(--f-md);
  }
  .case-metrics small {
    font-size: var(--f-xs);
  }
  .case-index {
    font-size: var(--f-3xl);
    top: 0.6rem;
    right: 0.8rem;
  }
  .case.end-card {
    flex-basis: min(72vw, 340px);
    width: auto;
    grid-template-rows: 1fr;
    border-radius: var(--radius-lg);
  }
  .case.end-card h3 {
    font-size: clamp(1.6rem, 6vw, 2.4rem);
    padding: 1.5rem;
  }

  .archive-item a {
    grid-template-columns: 52px 1fr auto;
    gap: 1rem;
    padding: 1.1rem 0.25rem;
  }
  .a-desc {
    display: none;
  }
  .bento-card,
  .bento-card:nth-child(1),
  .bento-card:nth-child(2) {
    grid-column: span 6;
  }
  .t-item {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
  .cert-list {
    grid-template-columns: 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .terminal-wrap {
    grid-template-columns: 1fr;
  }
  .term-body {
    flex-basis: 360px;
    font-size: var(--f-sm);
  }
  .rep-ctf {
    margin-left: 0;
  }
}
@media (max-width: 560px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
  }
  .principle,
  .now {
    grid-column: span 2;
  }
  .stat {
    min-height: 140px;
    padding: 1.2rem;
  }
  .hero {
    padding-top: 5.8rem;
  }
  .hero-meta.top span:last-child {
    display: none;
  }
  .hero-title {
    font-size: 19vw;
  }
  .hero-title .line {
    gap: 2.5vw;
  }
  .hero-portrait {
    width: 19vw;
    aspect-ratio: 1;
  }
  .hero-badges span {
    font-size: var(--f-xs);
    padding: 0.45rem 0.8rem;
  }
  .hero-ctas {
    width: 100%;
  }
  .hero-ctas > * {
    flex: 1 1 auto;
    justify-content: center;
    text-align: center;
  }
  #term-input,
  #palette-input {
    font-size: var(--f-base);
  }
  .case {
    border-radius: var(--radius-md);
  }
  .case-visual {
    height: 240px;
  }
  .case-info {
    padding: 1rem 1.1rem 1.3rem;
    gap: 0.6rem;
  }
  .case-title {
    font-size: clamp(1.3rem, 6.5vw, 1.8rem);
  }
  .case-kicker {
    font-size: var(--f-sm);
    margin-top: -0.2rem;
  }
  .case-stack {
    gap: 0.3rem;
  }
  .case-metrics {
    gap: 0.3rem;
    left: 0.5rem;
    right: 0.5rem;
    bottom: 0.5rem;
  }
  .case-metrics div {
    padding: 0.45rem 0.5rem;
    border-radius: var(--radius-sm);
  }
  .case-metrics b {
    font-size: var(--f-base);
  }
  .case-metrics small {
    font-size: var(--f-xs);
  }
  .case-index {
    font-size: var(--f-3xl);
    top: 0.5rem;
    right: 0.6rem;
  }
  .case.end-card h3 {
    font-size: clamp(1.3rem, 5.5vw, 2rem);
    padding: 1.2rem;
  }
  .d-stack li {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
  .d-stamp {
    top: -1.45rem;
    font-size: 0.58rem;
    padding: 0.18rem 0.45rem;
  }
  .footer-report {
    gap: 0.35rem 1rem;
  }
}
@media (max-width: 400px) {
  .brand-name {
    font-size: 1.25rem;
  }
  .brand {
    gap: 0.6rem;
  }
  .case-visual {
    height: 225px;
  }
  .case-info {
    padding: 0.9rem 1rem 1.2rem;
  }
  .case-title {
    font-size: var(--f-lg);
  }
  .case-desc {
    font-size: var(--f-sm);
  }
  .case-metrics b {
    font-size: var(--f-sm);
  }
  .case-metrics small {
    font-size: var(--f-xs);
    letter-spacing: 0.02em;
  }
  .case-metrics div {
    padding: 0.4rem 0.45rem;
  }
  .d-facts {
    grid-template-columns: 1fr;
  }
}
/* ---- phone / tablet vertical rhythm ----
   desktop spacing (up to 9rem above AND below each section) left 125–290px
   of dead space between sections on phones; this tightens it to ~70–90px */
@media (max-width: 860px) {
  .section {
    padding-block: 2.5rem;
  }
  .hero {
    padding-bottom: 1.25rem;
  }
  .marquee {
    margin: 1.75rem 0 1.5rem;
  }
  .marquee-track {
    padding: 0.7rem 0;
    font-size: 1.15rem;
  }
  .marquee-track > * {
    margin-right: 1.2rem;
  }
  .work-pin {
    padding: 2.5rem 0 2.5rem;
  }
  .section-label {
    margin-bottom: 1.5rem;
  }
  .section-title {
    margin-bottom: 2rem;
  }
  .about-statement {
    margin-bottom: 2.5rem;
  }
  .stack-legend {
    margin: -0.8rem 0 1.4rem;
  }
  .gh-live {
    margin-top: 1.8rem;
  }
  .archive-list {
    margin-bottom: 1.8rem;
  }
  .t-item {
    padding: 1.5rem 0;
  }
  .cert-filters {
    margin-bottom: 1.2rem;
  }
  .term-hints {
    margin-top: 1rem;
  }
  .contact-title {
    margin-bottom: 2.2rem;
  }
  #site-footer {
    padding-top: 2.5rem;
  }
}
@media (max-width: 860px) {
  .theme-btn {
    width: 38px;
    height: 38px;
  }
  /* the dial sits mid-header on phones — anchor the popover to the viewport edge */
  .theme-pop {
    position: fixed;
    top: 72px;
    right: var(--pad);
  }
}
@media (max-width: 350px) {
  /* 320px phones: TL;DR stays reachable via the hero CTA + menu */
  .header-actions .ghost-btn {
    display: none;
  }
  .hero-role .dim {
    white-space: nowrap;
  }
  .hero-role {
    flex-wrap: wrap;
    gap: 0.2rem 0.6rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ================= CUSTOM SCROLLBAR ================= */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    rgba(var(--accent-rgb), 0.35),
    rgba(124, 92, 255, 0.35)
  );
  border-radius: 999px;
  border: 2px solid var(--bg);
  transition: background 0.3s;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg,
    rgba(var(--accent-rgb), 0.7),
    rgba(124, 92, 255, 0.7)
  );
}
::-webkit-scrollbar-corner {
  background: transparent;
}
/* Firefox */
html {
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.35) transparent;
}

/* ================= ⌘K QUICK MENU HINT ================= */
.cmdk-hint {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 900;
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  pointer-events: none;
  transition:
    opacity 0.5s var(--ease),
    transform 0.5s var(--ease);
}
.cmdk-hint.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  animation: cmdk-pulse 3s ease-in-out infinite;
}
@keyframes cmdk-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.25);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(var(--accent-rgb), 0);
  }
}
.cmdk-hint-inner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
  background: rgba(13, 13, 18, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: var(--f-mono);
  font-size: var(--f-sm);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.cmdk-hint svg {
  color: var(--accent);
  flex-shrink: 0;
}
.cmdk-keys {
  display: flex;
  gap: 3px;
}
.cmdk-keys kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  font: 600 var(--f-xs) var(--f-mono);
  color: var(--accent);
  line-height: 1;
}
.cmdk-label {
  color: var(--dim);
  white-space: nowrap;
}
.cmdk-close {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 50%;
  color: var(--dim);
  font-size: var(--f-sm);
  line-height: 1;
  display: grid;
  place-items: center;
  opacity: 0;
  transition:
    opacity 0.3s,
    color 0.3s,
    background 0.3s;
}
.cmdk-hint:hover .cmdk-close {
  opacity: 1;
}
.cmdk-close:hover {
  color: var(--text);
  background: var(--red);
  border-color: var(--red);
}

/* ================= RESUME DROPDOWN ================= */
.resume-dropdown {
  position: relative;
  display: inline-block;
}
.resume-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 0.6rem);
  min-width: 100%;
  width: max-content;
  background: rgba(13, 13, 18, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-md);
  padding: 0.45rem;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition:
    opacity 0.3s var(--ease),
    transform 0.3s var(--ease);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.4);
  z-index: 10;
}
.resume-dropdown.open .resume-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.resume-menu a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  font: 500 var(--f-sm) var(--f-body);
  color: var(--text);
  transition:
    background 0.25s,
    color 0.25s;
  white-space: nowrap;
}
.resume-menu a:hover {
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
}
.resume-menu a .r-icon {
  font-size: var(--f-base);
}
.resume-menu a .r-label {
  flex: 1;
}
.resume-menu a .r-dl {
  font: 500 var(--f-xs) var(--f-mono);
  color: var(--dim);
  text-transform: uppercase;
}

/* =========================================================
   STANDARDIZED BUTTON STYLES
   ========================================================= */
/* Style 1: Primary Action */
.pill-btn, .submit-btn, .resume-btn, .case.end-card a {
  background: var(--text);
  color: var(--bg);
  font: 700 var(--f-base) var(--f-body);
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  border: none;
}
/* Style 2: Secondary Action */
.cert-filters button, .case-links a, .a-tag, .chip, .hero-badges span {
  background: transparent;
  color: var(--text);
  font: 500 var(--f-sm) var(--f-body);
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--line-2);
}
/* Style 3: Tertiary Action */
.kbd-btn, .term-hints button, .t-type, .case-award, .case-stack span {
  background: transparent;
  color: var(--dim);
  font: 500 var(--f-xs) var(--f-mono);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-2);
}
/* Style 4: Ghost */
#main-nav a {
  background: transparent;
  color: var(--dim);
  font: 500 var(--f-sm) var(--f-mono);
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  border: none;
}
/* =========================================================
   TOILET COMMAND STYLES
   ========================================================= */
.toilet-text {
  font-family: var(--f-mono), monospace;
  white-space: pre;
  line-height: 1.0;
  font-size: clamp(0.55rem, 1.2vw, 0.85rem);
  letter-spacing: 0;
  margin: 0.5rem 0;
  display: block;
}

.toilet-text.figlet-text {
  font-size: var(--f-xs);
  line-height: 1.0;
  letter-spacing: 0;
}

/* =========================================================
   COMPOSITOR-FRIENDLY PULSES
   (transform/opacity only — no per-frame repaints, unlike box-shadow)
   ========================================================= */
.status-dot::after,
.gh-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: inherit;
  animation: ring 2s var(--ease) infinite;
}
@keyframes ring {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  80%,
  100% {
    transform: scale(2.8);
    opacity: 0;
  }
}
@keyframes beacon {
  50% {
    opacity: 0.35;
  }
}
.hero-meta .hero-badges span {
  background: rgba(7, 7, 10, 0.62);
}
