/* =============================================
   E P THEEKSHANA — PORTFOLIO
   Linear / Raycast Precision Tech Theme
   Palette: #070709 carbon · #FAFAFA platinum · #10B981 telemetry
   Type: Inter · JetBrains Mono
   ============================================= */

/* ── DESIGN TOKENS ────────────────────────── */
:root {
  --bg:            #070709;
  --surface:       #0D0D11;
  --surface-2:     #131318;
  --surface-3:     #1A1A22;
  --border:        rgba(255, 255, 255, 0.08);
  --border-bright: rgba(255, 255, 255, 0.18);

  --text:          #FAFAFA;
  --text-2:        #A1A1AA;
  --muted:         #71717A;
  --platinum:      #F4F4F5;
  --emerald:       #10B981;

  --font-sans:     'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:     'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  --ease:          cubic-bezier(0.16, 1, 0.3, 1);
  --radius:        14px;
  --header-h:      60px;
  --wrap-pad:      clamp(1.1rem, 3vw, 2.25rem);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  color-scheme: dark;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

body.modal-open {
  overflow: hidden;
}

::selection {
  background: rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
}

:focus-visible {
  outline: 1.5px solid rgba(255, 255, 255, 0.65);
  outline-offset: 3px;
}

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

a, button {
  -webkit-tap-highlight-color: transparent;
}

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

button {
  font-family: inherit;
  color: inherit;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.1rem 0.38rem;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1.2;
  color: var(--text-2);
}

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

.wrap {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 var(--wrap-pad);
}

section[id] {
  scroll-margin-top: calc(var(--header-h) + env(safe-area-inset-top) + 1.5rem);
}

/* ── PRECISION BACKDROP ───────────────────── */
.precision-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.top-radial-light {
  position: absolute;
  top: -220px;
  left: 50%;
  transform: translateX(-50%);
  width: 1100px;
  height: 560px;
  background: radial-gradient(ellipse at 50% 30%, rgba(255, 255, 255, 0.09) 0%, rgba(161, 161, 170, 0.03) 45%, transparent 72%);
}

.micro-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 15%, #000 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 15%, #000 20%, transparent 100%);
}

/* ── READING PROGRESS ─────────────────────── */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.35), #FFFFFF, var(--emerald));
  z-index: 1150;
  transition: width 0.08s linear;
}

/* ── HEADER ───────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--header-h) + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  z-index: 1000;
  background: rgba(7, 7, 9, 0.76);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.site-header.is-scrolled {
  background: rgba(7, 7, 9, 0.92);
  border-bottom-color: rgba(255, 255, 255, 0.13);
}

.header-bar {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: linear-gradient(135deg, #FFFFFF 0%, #71717A 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 0 14px rgba(255, 255, 255, 0.18);
}

.brand-role-tag {
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.nav-link {
  padding: 0.4rem 0.8rem;
  border-radius: 7px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.cmd-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 34px;
  padding: 0 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.cmd-trigger:hover {
  border-color: var(--border-bright);
  color: var(--text);
  background: var(--surface-2);
}

.btn-header {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 0.85rem;
  border-radius: 8px;
  background: var(--platinum);
  color: var(--bg);
  font-size: 0.8rem;
  font-weight: 600;
  transition: opacity 0.2s ease, transform 0.2s var(--ease);
}

.btn-header:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  cursor: pointer;
}

/* ── MOBILE MENU ──────────────────────────── */
.mobile-menu {
  position: fixed;
  top: calc(var(--header-h) + env(safe-area-inset-top));
  left: 0;
  right: 0;
  z-index: 995;
  padding: 0.75rem 1rem;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
}

.mobile-menu.is-open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.mobile-menu-panel {
  background: var(--surface);
  border: 1px solid var(--border-bright);
  border-radius: 14px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
}

.mobile-link {
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-2);
}

.mobile-link.active,
.mobile-link:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.mobile-menu-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}

/* ── BUTTONS ──────────────────────────────── */
.btn,
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 42px;
  padding: 0.68rem 1.2rem;
  border-radius: 9px;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s var(--ease), background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-platinum,
.btn-primary {
  background: var(--platinum);
  color: var(--bg);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 8px 24px rgba(255, 255, 255, 0.10);
}

.btn-platinum:hover,
.btn-primary:hover {
  background: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(255, 255, 255, 0.16);
}

.btn-carbon,
.btn-secondary {
  background: var(--surface-2);
  border-color: var(--border-bright);
  color: var(--text);
}

.btn-carbon:hover,
.btn-secondary:hover {
  background: var(--surface-3);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

/* ── CONIC LIGHT-BEAM & SPOTLIGHT CARDS ───── */
[data-spotlight] {
  position: relative;
  overflow: hidden;
  --mx: 50%;
  --my: 50%;
}

[data-spotlight]::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(380px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.07), transparent 65%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 0;
}

[data-spotlight]:hover::before {
  opacity: 1;
}

[data-spotlight] > * {
  position: relative;
  z-index: 1;
}

.beam-card {
  position: relative;
  border: 1px solid var(--border-bright);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 28px 70px rgba(0, 0, 0, 0.65);
}

.beam-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent);
  animation: beamSweep 5s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 2;
}

@keyframes beamSweep {
  0%   { transform: translateX(-22%); opacity: 0.45; }
  100% { transform: translateX(22%); opacity: 1; }
}

/* ── HERO + ENGINEERING WORKBENCH ─────────── */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 3rem) 0 3.5rem;
}

.hero-mobile-title {
  display: none;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 4.5vw, 4rem);
  align-items: center;
}

.telemetry-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
  flex-shrink: 0;
  animation: pulseDot 2.2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

.hero-title {
  font-size: clamp(2.45rem, 5vw, 4.1rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.045em;
  background: linear-gradient(180deg, #FFFFFF 15%, rgba(255, 255, 255, 0.58) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.25rem;
}

.hero-lede {
  font-size: 1.04rem;
  color: var(--text-2);
  max-width: 52ch;
  line-height: 1.68;
  margin-bottom: 1.85rem;
}

.hero-lede strong {
  color: var(--text);
  font-weight: 600;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Interactive 3D Geodesic Orbital Stage */
.orbital-stage {
  position: relative;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.orbital-halo {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.14) 0%, rgba(255, 255, 255, 0.05) 42%, transparent 72%);
  filter: blur(28px);
  pointer-events: none;
}

.orbital-ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.orbital-ring-outer {
  inset: 4%;
  border: 1px dashed rgba(255, 255, 255, 0.10);
  animation: orbitSpin 42s linear infinite;
}

.orbital-ring-inner {
  inset: 16%;
  border: 1px solid rgba(255, 255, 255, 0.06);
  animation: orbitSpinReverse 28s linear infinite;
}

@keyframes orbitSpin {
  to { transform: rotate(360deg); }
}

@keyframes orbitSpinReverse {
  to { transform: rotate(-360deg); }
}

.orbital-canvas {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: pan-y;
}

.orbital-canvas:active {
  cursor: grabbing;
}

.hud-node {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  background: rgba(13, 13, 17, 0.84);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-bright);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text);
  pointer-events: none;
  white-space: nowrap;
  animation: hudFloat 5.2s ease-in-out infinite;
}

.hud-node i {
  color: var(--emerald);
  font-size: 0.74rem;
}

.hud-1 { top: 6%; left: 0%; animation-delay: 0s; }
.hud-2 { top: 12%; right: 0%; animation-delay: 1.6s; }

@keyframes hudFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}

.portrait-mode-bar {
  position: absolute;
  bottom: 0.35rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.28rem;
  border-radius: 999px;
  background: rgba(13, 13, 17, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-bright);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.65);
}

.p3d-mode-btn {
  padding: 0.34rem 0.78rem;
  border-radius: 999px;
  border: none;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.p3d-mode-btn:hover {
  color: var(--text);
}

.p3d-mode-btn.active {
  background: var(--platinum);
  color: var(--bg);
  font-weight: 600;
}

/* ── TECH STRIP ───────────────────────────── */
.tech-strip {
  position: relative;
  z-index: 2;
  padding: 1.1rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(13, 13, 17, 0.7);
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}

.strip-track {
  display: flex;
  gap: 1.75rem;
  width: max-content;
  animation: stripScroll 34s linear infinite;
}

.tech-strip:hover .strip-track {
  animation-play-state: paused;
}

.strip-item {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-2);
  white-space: nowrap;
}

.strip-item i {
  color: var(--text);
  opacity: 0.85;
}

@keyframes stripScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── SECTIONS ─────────────────────────────── */
.section {
  padding: clamp(4.5rem, 8vw, 6.5rem) 0;
  border-bottom: 1px solid var(--border);
}

.section-header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--emerald);
  margin-bottom: 0.55rem;
}

.section-heading {
  font-size: clamp(1.9rem, 3.8vw, 2.85rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.section-desc {
  color: var(--text-2);
  max-width: 42ch;
  font-size: 0.94rem;
}

/* ── SEGMENTED FILTERS & WORK GRID ────────── */
.segmented-filters {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.3rem;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.82rem;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.filter-btn span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  opacity: 0.7;
}

.filter-btn:hover {
  color: var(--text);
}

.filter-btn.active {
  background: var(--surface-3);
  border-color: var(--border-bright);
  color: var(--text);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
}

.work-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: border-color 0.25s ease, transform 0.25s var(--ease), background-color 0.25s ease;
}

.work-card:hover {
  border-color: var(--border-bright);
  background: var(--surface-2);
  transform: translateY(-3px);
}

.work-card.is-hidden {
  display: none;
}

.work-card.pop {
  animation: cardFadeIn 0.38s var(--ease) both;
}

@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

.work-media {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  overflow: hidden;
  background: var(--mat, var(--surface-2));
  border: 1px solid var(--border);
}

.work-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease);
}

.work-media.contain img {
  object-fit: contain;
  padding: var(--mat-pad, 0.65rem);
}

.work-card:hover .work-media img {
  transform: scale(1.03);
}

.work-body {
  padding: 0 0.2rem 0.2rem;
}

.work-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.work-tags span {
  padding: 0.16rem 0.5rem;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--text-2);
}

.work-ext {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
  transition: color 0.2s ease, transform 0.2s ease;
}

.work-card:hover .work-ext {
  color: var(--text);
  transform: translate(2px, -2px);
}

.work-body h3 {
  font-size: 1.04rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.18rem;
}

.work-body p {
  font-size: 0.84rem;
  color: var(--muted);
}

.work-controls {
  display: none;
}

/* ── CHANGELOG / WRITING ──────────────────── */
.changelog-list {
  display: grid;
  gap: 1rem;
}

.changelog-card {
  display: grid;
  grid-template-columns: 190px 1fr 240px;
  gap: 2rem;
  align-items: center;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color 0.25s ease, background-color 0.25s ease;
}

.changelog-card:hover {
  border-color: var(--border-bright);
  background: var(--surface-2);
}

.changelog-meta {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.changelog-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text);
}

.changelog-badge {
  align-self: flex-start;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-2);
}

.changelog-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 0.6rem;
}

.changelog-content p {
  font-size: 0.92rem;
  color: var(--text-2);
  margin-bottom: 1rem;
}

.changelog-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
}

.changelog-link i {
  font-size: 0.76rem;
  transition: transform 0.2s var(--ease);
}

.changelog-link:hover i {
  transform: translateX(3px);
}

.changelog-thumb {
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.changelog-thumb.is-dark {
  background: #121212;
}

.changelog-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.changelog-thumb.is-dark img {
  object-fit: contain;
}

/* ── PRECISION BENTO (ABOUT & STACK) ──────── */
.precision-bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
}

.p-card {
  border-radius: var(--radius);
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.25s ease;
}

.p-card:hover {
  border-color: var(--border-bright);
}

.p-span-4 { grid-column: span 4; }
.p-span-2 { grid-column: span 2; }

.p-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.p-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.p-card h4 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.p-card p {
  font-size: 0.9rem;
  color: var(--text-2);
}

.p-card strong {
  color: var(--text);
}

.p-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-bright);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  color: var(--text);
}

.p-metrics {
  justify-content: space-between;
}

.p-metric-grid {
  display: grid;
  gap: 0.95rem;
}

.p-metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.p-metric-row:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.p-stat {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--font-sans);
  font-size: 2.15rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.p-stat-num {
  color: var(--text);
}

.p-stat-plus {
  font-size: 0.75em;
  font-weight: 600;
  color: var(--emerald);
  margin-left: 0.08em;
}

.p-metric-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-2);
  text-align: right;
}

.p-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.25rem;
}

.p-chips span {
  padding: 0.34rem 0.7rem;
  border-radius: 7px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-2);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.p-chips span:hover {
  border-color: var(--border-bright);
  color: var(--text);
}

/* ── CONTACT CONSOLE ──────────────────────── */
.contact-console {
  text-align: center;
  border-radius: 20px;
  padding: clamp(3rem, 6vw, 4.5rem) clamp(1.25rem, 4vw, 3rem);
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.06), transparent 65%), var(--surface);
}

.contact-heading {
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 0.85rem;
}

.contact-copy {
  color: var(--text-2);
  max-width: 52ch;
  margin: 0 auto 2rem;
  font-size: 0.96rem;
}

.contact-cta-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.copy-status {
  padding: 0.12rem 0.45rem;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--text-2);
}

.copy-email-btn.copied {
  border-color: rgba(16, 185, 129, 0.5);
}

.copy-email-btn.copied .copy-status {
  background: rgba(16, 185, 129, 0.18);
  color: #A7F3D0;
}

/* ── FOOTER ───────────────────────────────── */
.site-footer {
  padding: 3rem 0 2.25rem;
  background: rgba(7, 7, 9, 0.85);
}

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

.footer-brand-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
}

.footer-tagline {
  font-size: 0.88rem;
  color: var(--text-2);
  max-width: 40ch;
  line-height: 1.6;
}

.footer-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.34rem 0.75rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-2);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

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

.footer-col a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  font-size: 0.86rem;
  color: var(--text-2);
  transition: color 0.2s ease, transform 0.2s var(--ease);
}

.footer-col a:hover {
  color: var(--text);
  transform: translateX(2px);
}

.footer-bottom {
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--muted);
}

.footer-quick-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.footer-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease, transform 0.2s var(--ease);
}

.footer-icon-btn:hover {
  border-color: var(--border-bright);
  background: var(--surface-2);
  color: var(--text);
  transform: translateY(-1px);
}

.footer-top-btn {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 0.85rem;
  border-radius: 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-2);
  white-space: nowrap;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.footer-top-btn:hover {
  border-color: var(--border-bright);
  background: var(--surface-2);
  color: var(--text);
}

/* ── COMMAND PALETTE (⌘K MODAL) ───────────── */
.cmd-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 1rem 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.cmd-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.cmd-dialog {
  width: min(560px, 100%);
  background: var(--surface);
  border: 1px solid var(--border-bright);
  border-radius: 14px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  transform: scale(0.97) translateY(-6px);
  transition: transform 0.18s var(--ease);
}

.cmd-backdrop.is-open .cmd-dialog {
  transform: none;
}

.cmd-search-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
}

.cmd-search-row i {
  color: var(--muted);
  font-size: 0.9rem;
}

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

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

.cmd-list {
  max-height: 340px;
  overflow-y: auto;
  padding: 0.45rem;
  scrollbar-width: thin;
}

.cmd-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: var(--text-2);
  font-size: 0.86rem;
}

.cmd-item.is-active,
.cmd-item:hover {
  background: var(--surface-3);
  color: var(--text);
}

.cmd-item-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.cmd-item-left i {
  width: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
}

.cmd-item.is-active .cmd-item-left i {
  color: var(--text);
}

.cmd-item-group {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--muted);
  white-space: nowrap;
}

.cmd-empty {
  padding: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

.cmd-footer {
  display: flex;
  justify-content: space-between;
  padding: 0.55rem 0.9rem;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--muted);
}

/* ── ARTICLE PAGES ────────────────────────── */
.article-page {
  max-width: 780px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 3.5rem) 0 5rem;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-2);
  margin-bottom: 2rem;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.back-btn:hover {
  border-color: var(--border-bright);
  color: var(--text);
}

.article-pg-header {
  margin-bottom: 2.5rem;
}

.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.tag {
  padding: 0.18rem 0.55rem;
  border-radius: 5px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: #A7F3D0;
}

.headline {
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.035em;
  margin-bottom: 1.1rem;
}

.accent-word {
  color: #FFFFFF;
}

.article-lede {
  font-size: 1.1rem;
  color: var(--text-2);
  line-height: 1.72;
}

.article-hero-img {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-bright);
  background: var(--surface);
  margin-bottom: 2.75rem;
}

.article-hero-img img {
  width: 100%;
  height: auto;
}

.article-pg-body {
  font-size: 1.02rem;
  line-height: 1.82;
  color: var(--text-2);
}

.article-pg-body p {
  margin-bottom: 1.3rem;
}

.article-pg-body strong {
  color: var(--text);
  font-weight: 600;
}

.article-pg-body h2 {
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
  margin: 2.75rem 0 0.95rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border);
}

.article-pg-body ul,
.article-pg-body ol {
  list-style: none;
  display: grid;
  gap: 0.8rem;
  margin: 1.2rem 0 1.65rem;
}

.article-pg-body ul li {
  position: relative;
  padding-left: 1.35rem;
}

.article-pg-body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
}

.article-pg-body ol {
  counter-reset: article-step;
}

.article-pg-body ol li {
  position: relative;
  counter-increment: article-step;
  padding-left: 2.4rem;
}

.article-pg-body ol li::before {
  content: "0" counter(article-step);
  position: absolute;
  left: 0;
  top: 0.2em;
  padding: 0.1rem 0.42rem;
  border-radius: 5px;
  background: var(--surface-3);
  border: 1px solid var(--border-bright);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text);
}

.article-pg-body code {
  font-family: var(--font-mono);
  font-size: 0.84em;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0.12rem 0.4rem;
  border-radius: 5px;
  word-break: break-word;
}

.article-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0 1.75rem;
}

.tech-stack-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}

.tech-stack-card {
  border-radius: 12px;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
}

.tech-stack-card h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.tech-stack-card h3 i {
  color: var(--emerald);
}

.tech-stack-card p {
  font-size: 0.86rem;
  line-height: 1.6;
  margin-bottom: 0;
}

.article-inline-link {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.article-footer-nav {
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.article-footer-nav .back-btn {
  margin-bottom: 0;
}

/* ── SCROLL REVEAL ────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

.reveal.active {
  opacity: 1;
  transform: none;
}

.reveal-delay-1 { transition-delay: 0.07s; }
.reveal-delay-2 { transition-delay: 0.14s; }
.reveal-delay-3 { transition-delay: 0.21s; }

/* ── CHATBOT ──────────────────────────────── */
.chatbot-fab {
  position: fixed;
  right: 1.5rem;
  bottom: max(1.5rem, calc(1rem + env(safe-area-inset-bottom)));
  z-index: 1050;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 1px solid var(--border-bright);
  background: var(--platinum);
  color: var(--bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.65);
  transition: transform 0.2s var(--ease), background-color 0.2s ease;
}

.chatbot-fab:hover {
  background: #FFFFFF;
  transform: translateY(-2px);
}

.chatbot-panel {
  position: fixed;
  right: 1.5rem;
  bottom: calc(5.25rem + env(safe-area-inset-bottom));
  z-index: 1045;
  width: min(385px, calc(100vw - 2rem));
  height: min(550px, calc(100svh - 7.5rem));
  background: var(--surface);
  border: 1px solid var(--border-bright);
  border-radius: 16px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

.chatbot-panel.is-open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.chatbot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
}

.chatbot-header-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.chatbot-avatar {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--surface-3);
  border: 1px solid var(--border-bright);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  flex-shrink: 0;
}

.chatbot-online-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--emerald);
  border: 2px solid var(--surface);
}

.chatbot-title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
}

.chatbot-subtitle {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chatbot-header-actions {
  display: flex;
  gap: 0.35rem;
}

.chatbot-icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  cursor: pointer;
}

.chatbot-icon-btn:hover {
  background: var(--surface-3);
  color: var(--text);
}

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  scrollbar-width: thin;
}

.chatbot-msg {
  max-width: 88%;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.chatbot-msg.bot  { align-self: flex-start; }
.chatbot-msg.user { align-self: flex-end; }

.chatbot-bubble {
  padding: 0.68rem 0.88rem;
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.5;
  white-space: pre-line;
  word-break: break-word;
}

.chatbot-msg.bot .chatbot-bubble {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
}

.chatbot-msg.user .chatbot-bubble {
  background: var(--platinum);
  color: var(--bg);
  font-weight: 500;
}

.chatbot-msg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.chatbot-action-link {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--border-bright);
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  cursor: pointer;
}

.chatbot-action-link:hover {
  background: var(--platinum);
  color: var(--bg);
}

.chatbot-typing {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.chatbot-typing span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-2);
  animation: chatDot 1.1s ease-in-out infinite;
}

.chatbot-typing span:nth-child(2) { animation-delay: 0.18s; }
.chatbot-typing span:nth-child(3) { animation-delay: 0.36s; }

@keyframes chatDot {
  0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
  40%           { opacity: 1; transform: translateY(-3px); }
}

.chatbot-suggestions {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.5rem 0.85rem;
  border-top: 1px solid var(--border);
  scrollbar-width: none;
}

.chatbot-suggestions::-webkit-scrollbar {
  display: none;
}

.chatbot-chip {
  flex: 0 0 auto;
  padding: 0.32rem 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  cursor: pointer;
  white-space: nowrap;
}

.chatbot-chip:hover {
  border-color: var(--border-bright);
  color: var(--text);
}

.chatbot-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.68rem 0.85rem;
  border-top: 1px solid var(--border);
}

.chatbot-input {
  flex: 1;
  min-width: 0;
  padding: 0.58rem 0.78rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  outline: none;
}

.chatbot-input:focus {
  border-color: var(--border-bright);
}

.chatbot-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: none;
  background: var(--platinum);
  color: var(--bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  cursor: pointer;
  flex-shrink: 0;
}

/* ── RESPONSIVE ───────────────────────────── */
@media (max-width: 1080px) {
  .work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .changelog-card {
    grid-template-columns: 160px 1fr;
  }

  .changelog-thumb {
    display: none;
  }
}

@media (max-width: 960px) {
  .hero-layout {
    grid-template-columns: 1fr;
  }

  .precision-bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .p-span-4 {
    grid-column: span 2;
  }

  .p-span-2 {
    grid-column: span 1;
  }

  .tech-stack-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 56px;
    --wrap-pad: 1rem;
  }

  .site-nav,
  .btn-header,
  .cmd-trigger span,
  .cmd-trigger kbd,
  #heroCmdBtn kbd {
    display: none;
  }

  .cmd-trigger {
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
  }

  .menu-toggle {
    display: inline-flex;
    width: 40px;
    height: 40px;
  }

  .hero {
    min-height: auto;
    padding: calc(var(--header-h) + env(safe-area-inset-top) + 0.85rem) 0 2.25rem;
    flex-direction: column;
  }

  .hero-mobile-title {
    display: block;
    width: fit-content;
    margin: 0 auto 1rem;
    padding-bottom: 0.35rem;
    text-align: center;
    font-size: clamp(2.5rem, 11vw, 4rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.07em;
    background: linear-gradient(105deg, #FFFFFF 25%, #A7F3D0 68%, var(--emerald));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .hero-mobile-title::after {
    content: "";
    display: block;
    width: 38%;
    height: 3px;
    margin: 0.55rem auto 0;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, var(--emerald), transparent);
  }

  .hero-layout {
    gap: 1.25rem;
  }

  .hero-layout .orbital-stage {
    order: -1;
    max-width: min(360px, 88vw, 48svh);
  }

  .hero-title {
    display: none;
  }

  .hero-copy {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-lede {
    font-size: 0.94rem;
    margin-bottom: 1.25rem;
  }

  .hero-cta-row {
    width: 100%;
    justify-content: center;
  }

  .tech-strip {
    padding: 0.85rem 0;
  }

  .section {
    padding: 3rem 0;
  }

  .section-header-bar {
    margin-bottom: 1.5rem;
    gap: 1rem;
  }

  .section-heading {
    font-size: clamp(1.6rem, 6.8vw, 2.2rem);
  }

  .segmented-filters {
    max-width: calc(100% + var(--wrap-pad) * 2);
    margin: 0 calc(var(--wrap-pad) * -1);
    padding: 0.3rem var(--wrap-pad);
    border-radius: 0;
    border-left: none;
    border-right: none;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .segmented-filters::-webkit-scrollbar {
    display: none;
  }

  .filter-btn {
    min-height: 36px;
  }

  .work-grid {
    display: flex;
    gap: 0.9rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin: 0 calc(var(--wrap-pad) * -1);
    padding: 0.25rem var(--wrap-pad) 0.65rem;
    scroll-padding: 0 var(--wrap-pad);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .work-grid::-webkit-scrollbar {
    display: none;
  }

  .work-card {
    flex: 0 0 84%;
    max-width: 340px;
    scroll-snap-align: center;
  }

  .work-card.reveal {
    opacity: 1;
    transform: none;
  }

  .work-controls {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-top: 1rem;
  }

  .work-counter {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--text-2);
    white-space: nowrap;
  }

  .work-progress {
    flex: 1;
    height: 2px;
    background: var(--border);
    overflow: hidden;
  }

  .work-progress span {
    display: block;
    height: 100%;
    width: 0%;
    background: var(--platinum);
    transition: width 0.3s var(--ease);
  }

  .work-nav {
    display: flex;
    gap: 0.4rem;
  }

  .work-nav-btn {
    width: 44px;
    height: 44px;
    min-height: 44px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  .changelog-card,
  .precision-bento {
    grid-template-columns: 1fr;
  }

  .changelog-card {
    padding: 1.15rem;
    gap: 0.85rem;
  }

  .changelog-meta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .changelog-content h3 {
    font-size: 1.08rem;
  }

  .p-card {
    padding: 1.2rem;
  }

  .contact-console {
    padding: 2.25rem 1.15rem;
    border-radius: 16px;
  }

  .contact-heading {
    font-size: clamp(1.6rem, 7vw, 2.15rem);
  }

  .hud-node {
    font-size: 0.62rem;
    padding: 0.3rem 0.58rem;
  }

  .hud-1 { left: 2%; }
  .hud-2 { right: 2%; }

  .p3d-mode-btn {
    font-size: 0.64rem;
    padding: 0.3rem 0.65rem;
  }

  .p-span-4,
  .p-span-2 {
    grid-column: span 1;
  }

  .site-footer {
    padding: 2.25rem 0 calc(5.5rem + env(safe-area-inset-bottom));
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    padding-bottom: 1.5rem;
  }

  .footer-col a {
    min-height: 40px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
  }

  .footer-icon-btn,
  .footer-top-btn {
    height: 42px;
    min-width: 42px;
  }

  .article-page {
    padding: calc(var(--header-h) + env(safe-area-inset-top) + 1.5rem) 0 3rem;
  }

  .headline {
    font-size: clamp(1.55rem, 6.8vw, 2.15rem);
  }

  .article-lede {
    font-size: 0.96rem;
  }

  .article-pg-body {
    font-size: 0.96rem;
    line-height: 1.74;
  }

  .article-pg-body code {
    font-size: 0.78em;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 520px) {
  .section {
    padding: 2.5rem 0;
  }

  .hero-layout .orbital-stage {
    max-width: min(335px, 86vw, 46svh);
  }

  .hud-node {
    display: none;
  }

  .hero-cta-row {
    flex-wrap: nowrap;
    gap: 0.6rem;
  }

  .hero-cta-row .btn {
    flex: 1 1 0;
    min-height: 44px;
    padding: 0.65rem 0.75rem;
    font-size: 0.8rem;
  }

  .work-card {
    flex: 0 0 85%;
    max-width: 315px;
  }

  .p-stat {
    font-size: 1.85rem;
  }

  .p-chips span {
    font-size: 0.76rem;
    padding: 0.3rem 0.62rem;
  }

  .contact-cta-row .btn,
  .article-footer-nav .btn-primary,
  .article-footer-nav .back-btn {
    width: 100%;
    min-height: 46px;
    justify-content: center;
  }

  .copy-email-btn {
    white-space: normal;
    font-size: 0.78rem;
  }

  .article-footer-nav {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .cmd-backdrop {
    padding: max(0.85rem, env(safe-area-inset-top)) 0.75rem 1rem;
  }

  .cmd-item {
    min-height: 44px;
  }

  .chatbot-fab {
    right: 1rem;
    bottom: max(1rem, calc(0.75rem + env(safe-area-inset-bottom)));
  }

  .chatbot-panel {
    left: 0.75rem;
    right: 0.75rem;
    width: auto;
    height: min(70svh, 510px);
    height: min(70dvh, 510px);
    bottom: calc(4.75rem + env(safe-area-inset-bottom));
  }

  .chatbot-input,
  .cmd-input {
    font-size: 16px;
  }
}

@media (max-width: 430px) {
  .brand-role-tag {
    display: none;
  }
}

@media (max-width: 390px) {
  :root {
    --wrap-pad: 0.9rem;
  }

  .hero-layout .orbital-stage {
    max-width: min(310px, 85vw, 44svh);
  }
}

@media (pointer: coarse) {
  .cmd-footer {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .beam-card::after,
  .orbital-ring-outer,
  .orbital-ring-inner,
  .hud-node,
  .telemetry-dot,
  .strip-track,
  .work-card.pop,
  .chatbot-typing span {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
