/* Site styles. Loaded AFTER knowura.css, which is never edited.
   Clean class names below carry the exact declarations of the *-reference patterns. */

html { scroll-behavior: smooth; }

html { background: var(--dark); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-size: 18px;
  line-height: 1.65;
  overflow-x: hidden;
}

/* ocean photo sits underneath (.ocean in fx.css); this veil keeps it deep blue and text-safe, with soft glows */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 82% 8%, color-mix(in srgb, var(--blue-deep) 55%, transparent), transparent 70%),
    radial-gradient(50% 45% at 8% 92%, color-mix(in srgb, var(--blue) 18%, transparent), transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--dark) 30%, transparent), color-mix(in srgb, var(--dark) 52%, transparent) 70%, color-mix(in srgb, var(--dark) 66%, transparent));
}

/* faint cyan pixel particles (CSS layer, the WebGL layer adds more near the laptop) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  --p: color-mix(in srgb, var(--cyan) 50%, transparent);
  --p2: color-mix(in srgb, var(--cyan) 28%, transparent);
  background-image:
    radial-gradient(2px 2px at 8% 18%, var(--p), transparent),
    radial-gradient(2px 2px at 23% 72%, var(--p2), transparent),
    radial-gradient(3px 3px at 37% 34%, var(--p2), transparent),
    radial-gradient(2px 2px at 52% 88%, var(--p), transparent),
    radial-gradient(2px 2px at 64% 12%, var(--p2), transparent),
    radial-gradient(3px 3px at 77% 58%, var(--p), transparent),
    radial-gradient(2px 2px at 91% 80%, var(--p2), transparent),
    radial-gradient(2px 2px at 95% 28%, var(--p), transparent),
    radial-gradient(2px 2px at 15% 46%, var(--p2), transparent),
    radial-gradient(2px 2px at 44% 56%, var(--p2), transparent);
}

a { color: var(--cyan); }

/* ---------- components ---------- */

.glass {
  background: var(--panel-strong);
  backdrop-filter: blur(24px) saturate(150%);
  border: 3px solid var(--ink);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  color: var(--text);
}

.glass-light {
  background: var(--panel);
  backdrop-filter: blur(20px) saturate(140%);
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  color: var(--text-dim);
}

.btn {
  color: var(--cyan) !important;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(255,255,255,0.03);
  border: 2px solid var(--ink);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  /* layout extras (not part of the reference look) */
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  font-size: 16px;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--ink);
  background: rgba(47,107,255,0.2);
}

.btn-icon { padding: 0; width: 56px; height: 56px; justify-content: center; font-size: 28px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.btn:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }

.input {
  background: var(--panel-strong) !important;
  backdrop-filter: blur(24px) saturate(150%);
  border: 2.5px solid var(--ink) !important;
  border-radius: 12px !important;
  color: var(--text) !important;
  box-shadow: inset 2px 2px 0 rgba(0,0,0,0.4);
  width: 100%;
  padding: 12px 14px;
  font-size: 17px;
}

.input:focus {
  border-color: var(--cyan) !important;
  box-shadow: inset 2px 2px 0 rgba(0,0,0,0.4), 0 0 0 3px rgba(34,229,255,0.2) !important;
  outline: none;
}

/* ---------- 3D laptop stage ---------- */

.laptop-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
.laptop-stage.is-hidden, .laptop-stage.is-booting { opacity: 0; }
.laptop-stage canvas { display: block; width: 100%; height: 100%; }

/* reduced motion: the laptop is a still image living inside the hero, no scroll drift */
.reduced-motion .laptop-stage { position: absolute; top: 0; height: 100vh; height: 100svh; }

.laptop-fallback { display: none; }
.no-webgl .laptop-fallback {
  display: block;
  position: absolute;
  top: 50%; left: 70%;
  width: min(420px, 80vw);
  transform: translate(-50%, -50%);
}
/* phones: sit in the gap between UDAY (above) and SINGH (below) so the flat laptop never covers the name */
@media (max-width: 860px) { .no-webgl .laptop-fallback { left: 50%; top: 33%; width: min(300px, 74vw); } }

/* ---------- big name (under the canvas, behind the laptop) ---------- */

.name-bg {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 100vh;
  height: 100svh;
  z-index: 0;
  pointer-events: none;
  overflow-x: clip; /* never clip the bottom: SINGH may hang past the fold */
}
.name-stack {
  --u: clamp(48px, min(8.2vw, 12.5vh), 140px);
  position: absolute;
  left: 70%;
  top: 49%;
  width: 0; height: 0;
  margin: 0;
  font-weight: 400;
}
.tag {
  position: absolute;
  display: block;
  white-space: nowrap;
  font-size: var(--u);
  line-height: 1;
  padding: 0.14em 0.3em 0.1em;
  border: 4px solid var(--ink);
  border-radius: 0.2em;
  box-shadow: var(--shadow-lg);
}
.tag-uday {
  right: 0.7em;
  bottom: 1.75em;
  transform: rotate(-5deg);
  color: var(--text);
  background: var(--blue);
  text-shadow: 4px 4px 0 var(--ink);
}
.tag-singh {
  left: -4em;
  top: 2.2em;
  transform: rotate(3.5deg);
  color: var(--cyan);
  background: color-mix(in srgb, var(--blue-deep) 38%, var(--dark));
  text-shadow: 4px 4px 0 var(--ink);
}
.icon { width: 1.15em; height: 1.15em; flex: none; }

.star {
  position: absolute;
  width: calc(var(--u) * var(--s));
  height: calc(var(--u) * var(--s));
  left: calc(var(--u) * var(--dx));
  top: calc(var(--u) * var(--dy));
  color: var(--cyan);
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--cyan) 75%, transparent)) drop-shadow(3px 3px 0 var(--ink));
  animation: twinkle 3.4s ease-in-out var(--t) infinite;
}
.star.alt {
  color: var(--text);
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--text) 60%, transparent)) drop-shadow(3px 3px 0 var(--ink));
}
@keyframes twinkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  50% { transform: scale(0.7) rotate(20deg); opacity: 0.5; }
}

@media (max-width: 860px) {
  .name-stack { --u: clamp(42px, 16vw, 110px); left: 50%; top: 30%; }
  .tag-uday { right: -2em; bottom: 1.25em; }
  .tag-singh { left: -2.4em; top: 2.1em; }
  .star { left: calc(var(--u) * var(--mx)); top: calc(var(--u) * var(--my)); }
}
/* short phones (SE, small Androids): shrink the name a little so SINGH stays clear of the intro pill */
@media (max-width: 860px) and (max-height: 700px) { .name-stack { --u: clamp(32px, min(16vw, 8.4vh), 110px); top: 29%; } }

/* ---------- hero ---------- */

main { position: relative; z-index: 1; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 24px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 96px 24px 64px;
}
.hero-copy { max-width: 620px; }
.eyebrow {
  display: inline-block;
  padding: 6px 12px;
  margin: 0 0 20px;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
}
.hero .tagline {
  margin: 0 0 32px;
  font-size: clamp(20px, 2.4vw, 26px);
  color: var(--text-dim);
}
.actions { display: flex; flex-wrap: wrap; gap: 16px; }

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    align-items: end;
    padding-top: 40vh;
    padding-bottom: 48px;
  }
}
/* very short viewports (landscape phones, tiny windows): the intro text starts below the names and the page scrolls */
@media (max-width: 860px) and (max-height: 560px) { .hero { padding-top: 78vh; } .name-stack { top: 36%; } }


/* ---------- nav ---------- */

.skip { position: absolute; left: -9999px; top: 8px; z-index: 200; padding: 8px 14px; background: var(--dark); color: var(--cyan); border: 2px solid var(--ink); }
.skip:focus { left: 8px; }

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 24px;
  background: color-mix(in srgb, var(--dark) 55%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 3px solid var(--ink);
}
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--text-dim); text-decoration: none; text-transform: uppercase; font-size: 15px; letter-spacing: 0.06em; }
.nav-links a:hover, .nav-links a:focus-visible { color: var(--cyan); }
.nav-cmd { width: 44px; height: 44px; padding: 0; justify-content: center; font-size: 22px; }

@media (max-width: 640px) {
  .nav { padding: 8px 14px; gap: 10px; }
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 13px; }
}

/* ---------- sections ---------- */

.section { padding: 72px 0; scroll-margin-top: 40px; }
.section-title {
  margin: 0 0 32px;
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 400;
  line-height: 1.1;
  text-shadow: 4px 4px 0 var(--ink);
}
.section-title .num { display: block; margin-bottom: 6px; font-size: 16px; letter-spacing: 0.12em; color: var(--cyan); text-shadow: none; }
.section-title .num::before { content: '// '; }

.js-reveal .reveal { opacity: 0; translate: 0 28px; transition: opacity 0.6s ease, translate 0.6s ease; }
.js-reveal .reveal.in { opacity: 1; translate: 0 0; }

.tags { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 20px 0 0; padding: 0; }
.tag-chip { color: var(--text); padding: 4px 12px; font-size: 15px; border-width: 2px; border-radius: 10px; box-shadow: var(--shadow-sm); }

/* about */
.about-card { max-width: 640px; padding: 32px; }
.about-card p { margin: 0 0 16px; font-size: 19px; }
.about-card p:first-child { font-size: 21px; }

/* projects */
.project-list { display: grid; gap: 48px; }
.project {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 36px;
  align-items: center;
  padding: 36px;
}
.project.flip .project-visual { order: -1; }
.project-copy, .project-visual { min-width: 0; }
.kicker { margin: 0 0 6px; color: var(--cyan); font-size: 16px; letter-spacing: 0.1em; text-transform: uppercase; }
.project h3 { margin: 0 0 14px; font-size: clamp(34px, 4.4vw, 56px); font-weight: 400; line-height: 1; text-shadow: 3px 3px 0 var(--ink); }
.project-copy p { font-size: 18px; color: var(--text); }
.project-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 26px; }

/* fake browser window (Knowura live preview) */
.browser {
  background: var(--panel-strong);
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.browser-bar { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 3px solid var(--ink); background: color-mix(in srgb, var(--blue-deep) 35%, var(--dark)); }
.dots { display: flex; gap: 6px; }
.dots i { width: 12px; height: 12px; border: 2px solid var(--ink); border-radius: 50%; background: var(--text-dim); }
.dots i:nth-child(1) { background: var(--cyan); }
.dots i:nth-child(2) { background: var(--blue); }
.urlbar {
  flex: 1;
  min-width: 0;
  padding: 4px 12px;
  font-size: 15px;
  color: var(--text-dim);
  background: var(--panel-strong);
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  box-shadow: inset 2px 2px 0 rgba(0,0,0,0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.browser-view { --s: 0.4; position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--dark); }
.browser-view .fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.browser-view .frame {
  position: absolute;
  top: 0; left: 0;
  width: 1280px; height: 800px;
  border: 0;
  background: var(--dark);
  transform: scale(var(--s));
  transform-origin: 0 0;
  pointer-events: none; /* view-only: never hijacks page scroll */
}
.skeleton {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  color: var(--text-dim); font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase;
  background: linear-gradient(110deg, var(--dark) 30%, color-mix(in srgb, var(--blue-deep) 55%, var(--dark)) 50%, var(--dark) 70%) 0 0 / 200% 100%;
  animation: shimmer 1.6s linear infinite;
}
.skeleton[hidden] { display: none; }
.spinner { width: 28px; height: 28px; border: 4px solid var(--ink); border-top-color: var(--cyan); border-right-color: var(--cyan); animation: spin 0.9s steps(8) infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }
.browser.is-fallback .browser-note { display: block; }
.browser.is-fallback .browser-note::before { content: 'Live preview unavailable, showing a screenshot.'; color: var(--cyan); }
.browser-note { display: none; margin: 0; padding: 8px 12px; font-size: 14px; line-height: 1.4; color: var(--text-dim); border-top: 3px solid var(--ink); }

/* Samata signal monitor */
.demo-chip { flex: none; padding: 2px 8px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cyan); border: 2px solid var(--ink); border-radius: 8px; background: rgba(34,229,255,0.1); }
.device-body {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: 34% minmax(0, 1fr); gap: 12px; padding: 12px;
  background:
    linear-gradient(rgba(34,229,255,0.07) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(34,229,255,0.07) 1px, transparent 1px) 0 0 / 22px 22px,
    radial-gradient(80% 80% at 20% 10%, color-mix(in srgb, var(--blue-deep) 60%, transparent), transparent 70%),
    var(--dark);
}
.device-left { display: flex; flex-direction: column; align-items: center; justify-content: space-between; min-height: 0; }
.head { width: 100%; max-height: 78%; flex: 1; min-height: 0; overflow: visible; }
.head .skull { fill: var(--panel-strong); stroke: var(--text-dim); stroke-width: 3; stroke-linejoin: round; }
.head .ear { fill: var(--panel-strong); stroke: var(--text-dim); stroke-width: 3; }
.head .face { fill: none; stroke: var(--text-dim); stroke-width: 3; stroke-linecap: square; opacity: 0.6; }
.head .band { fill: none; stroke: var(--ink); stroke-width: 14; stroke-linecap: square; }
.head .band + .ring, .head .ring { fill: none; stroke: var(--cyan); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: ping 2.2s ease-out infinite; }
.head .ring.r2 { animation-delay: 0.7s; } .head .ring.r3 { animation-delay: 1.4s; }
.head .node { fill: var(--cyan); stroke: var(--ink); stroke-width: 2.5; filter: drop-shadow(0 0 4px var(--cyan)); }
.head .mod { fill: var(--blue); stroke: var(--ink); stroke-width: 3; }
.head .led { fill: var(--text); animation: twinkle 1.6s steps(2, end) infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: 0.9; } 100% { transform: scale(2.6); opacity: 0; } }
.leds { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.leds li { display: flex; align-items: center; gap: 5px; padding: 1px 7px; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text); border: 2px solid var(--ink); border-radius: 8px; background: var(--panel-strong); }
.leds li::before { content: ''; width: 6px; height: 6px; background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
.sig { display: flex; flex-direction: column; gap: 4px; min-height: 0; }
.sig-label { font-size: 11px; letter-spacing: 0.1em; color: var(--text-dim); }
.sig-panel { min-height: 0; border: 2px solid var(--ink); border-radius: 10px; background: var(--panel-strong); box-shadow: inset 2px 2px 0 rgba(0,0,0,0.4); overflow: hidden; }
.eegp { flex: 1; } .imup { flex: 0 0 26%; }
.sig-panel canvas { display: block; width: 100%; height: 100%; }
.badge { display: inline-block; margin: 26px 0 0; padding: 8px 14px; font-size: 16px; color: var(--cyan); border-width: 2px; border-radius: 10px; box-shadow: var(--shadow-sm); }

.media { overflow: hidden; aspect-ratio: 16 / 10; }
.media img, .media video { display: block; width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 860px) {
  .project { grid-template-columns: minmax(0, 1fr); padding: 22px; gap: 24px; }
  .project.flip .project-visual { order: 0; }
}

/* timeline */
.timeline { position: relative; list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
.timeline::before { content: ''; position: absolute; left: 106px; top: 8px; bottom: 8px; width: 4px; background: var(--blue-deep); border-left: 2px solid var(--ink); border-right: 2px solid var(--ink); }
.timeline li { position: relative; display: grid; grid-template-columns: 90px 1fr; gap: 36px; align-items: start; }
.timeline li::after { content: ''; position: absolute; left: 99px; top: 20px; width: 18px; height: 18px; background: var(--cyan); border: 3px solid var(--ink); }
.when { padding-top: 14px; color: var(--cyan); font-size: 18px; letter-spacing: 0.06em; text-align: right; }
.tl-card { padding: 18px 22px; }
.tl-card h3 { margin: 0 0 4px; font-size: 21px; font-weight: 400; color: var(--text); }
.tl-card p { margin: 0; font-size: 17px; }

@media (max-width: 640px) {
  .timeline::before { left: 7px; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; padding-left: 34px; }
  .timeline li::after { left: 0; top: 4px; }
  .when { text-align: left; padding-top: 0; }
}

/* quotes */
.quotes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.quote { margin: 0; padding: 32px 28px 28px; position: relative; }
.quote::before { content: '"'; display: block; margin-bottom: 4px; font-size: 64px; line-height: 0.7; color: var(--cyan); }
.quote p { margin: 0; font-size: 21px; line-height: 1.5; color: var(--text); }
.quote.l { rotate: -1.2deg; }
.quote.r { rotate: 1.2deg; margin-top: 18px; }
@media (max-width: 860px) { .quotes { grid-template-columns: 1fr; } .quote.r { margin-top: 0; } }

/* contact */
.contact-card { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); gap: 36px; padding: 36px; }
.contact-card form { display: grid; gap: 16px; }
.contact-card .intro { margin: 0; font-size: 19px; }
.contact-card label { display: grid; gap: 6px; color: var(--text-dim); font-size: 15px; letter-spacing: 0.06em; text-transform: uppercase; }
.contact-card textarea.input { resize: vertical; min-height: 120px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.status { margin: 0; font-size: 16px; color: var(--text-dim); }
.status { line-height: 1.4; }
.status.ok { color: var(--cyan); }
.status.ok::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 8px; background: var(--cyan); }
.status.err { color: #ff8f9b; }
.status.err::before { content: '! '; font-weight: 700; }
.contact-card .input[aria-invalid="true"] { border-color: #ff6b7a !important; box-shadow: inset 2px 2px 0 rgba(0,0,0,0.4), 0 0 0 3px rgba(255,107,122,0.22) !important; }
.btn:disabled { opacity: 0.6; cursor: progress; }
.socials { display: grid; align-content: center; justify-items: start; gap: 14px; }
.mail-line { margin: 0; font-size: 17px; word-break: break-all; color: var(--text); }
.handle { margin: 0; color: var(--text-dim); font-size: 16px; }
@media (max-width: 860px) { .contact-card { grid-template-columns: 1fr; padding: 22px; } }

/* footer */
.footer { position: relative; z-index: 1; padding: 40px 24px 72px; text-align: center; color: var(--text-dim); font-size: 15px; }
.footer p { margin: 0; }
.noscript { position: relative; z-index: 2; margin: 0; padding: 16px; text-align: center; }

/* command palette */
.palette {
  position: fixed; inset: 0; z-index: 100;
  display: flex; justify-content: center; align-items: flex-start;
  padding: 14vh 16px 16px;
  background: color-mix(in srgb, var(--dark) 65%, transparent);
  backdrop-filter: blur(6px);
}
.palette[hidden] { display: none; }
.palette-box { width: min(640px, 100%); overflow: hidden; background: color-mix(in srgb, var(--dark) 88%, var(--blue-deep)); }
.palette-input { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 3px solid var(--ink); }
.prompt { color: var(--cyan); font-size: 16px; white-space: nowrap; }
.palette-input input { flex: 1; min-width: 0; font-size: 18px; color: var(--text); background: transparent; border: 0; outline: 0; caret-color: var(--cyan); }
#palette-list { list-style: none; margin: 0; padding: 8px; max-height: 50vh; overflow-y: auto; }
#palette-list li { display: flex; justify-content: space-between; gap: 16px; padding: 9px 12px; border-left: 4px solid transparent; border-radius: 6px; cursor: pointer; font-size: 17px; }
#palette-list li.on { background: rgba(47,107,255,0.25); border-left-color: var(--cyan); }
#palette-list .c { color: var(--text); }
#palette-list .d { color: var(--text-dim); font-size: 15px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#palette-list .none { color: var(--text-dim); cursor: default; }
.palette-hint { margin: 0; padding: 10px 18px; font-size: 14px; color: var(--text-dim); border-top: 3px solid var(--ink); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .laptop-stage { transition: none; }
  .star, .skeleton, .spinner, .head .ring, .head .led { animation: none; }
  .js-reveal .reveal { opacity: 1; translate: 0 0; transition: none; }
}

/* ---------- wide Knowura panel: big frame, interactive on desktop ---------- */
.project.wide { grid-template-columns: minmax(0, 1fr); gap: 28px; }
.project.wide .project-copy { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 4px 40px; align-items: start; }
.project.wide .kicker, .project.wide h3 { grid-column: 1; }
.project.wide .project-copy > p:not(.kicker) { grid-column: 2; grid-row: 1 / span 2; margin: 0; align-self: center; }
.project.wide .tags, .project.wide .project-actions { grid-column: 1 / -1; }
.project.wide .tags { margin-top: 8px; }
.project.wide .project-actions { justify-self: start; }
.project.wide .project-visual { order: 2; }
@media (min-width: 1320px) { .project.wide { margin-inline: -90px; padding: 44px; } }
@media (max-width: 860px) { .project.wide .project-copy { display: block; } }

.view-lock {
  position: absolute; inset: 0; z-index: 3; width: 100%; padding: 0; border: 0;
  display: flex; align-items: flex-end; justify-content: center;
  background: linear-gradient(180deg, transparent 60%, rgba(5, 7, 15, 0.55));
  color: var(--cyan); font-size: 16px; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer;
  transition: opacity 0.25s;
}
.view-lock span { margin-bottom: 18px; padding: 8px 16px; border: 2px solid var(--ink); border-radius: 10px; background: var(--panel-strong); backdrop-filter: blur(10px); box-shadow: var(--shadow-sm); }
.view-lock:hover span { background: rgba(47, 107, 255, 0.35); }
.browser.is-live .view-lock { opacity: 0; pointer-events: none; }
.browser.is-live .frame { pointer-events: auto; }
.browser.is-live { box-shadow: var(--shadow-lg), 0 0 0 3px var(--cyan); }
.browser .frame { cursor: auto; }
/* phones and tablets stay view-only */
@media (max-width: 860px), (pointer: coarse) { .view-lock { display: none; } .browser.is-live .frame { pointer-events: none; } }
.browser.is-fallback .view-lock { display: none; }

/* ---------- tap targets: >= 44x44 px of tappable area, without changing how anything looks ---------- */
.nav-links a, .dp-list a, .nav-cmd { position: relative; }
.nav-links a::after { content: ''; position: absolute; inset: -14px -6px; } /* 21px text -> 49px tall hit area */
.dp-list a::after { content: ''; position: absolute; inset: -10px -4px; }    /* 25px link -> 45px */
.nav-cmd::after { content: ''; position: absolute; inset: -3px; }            /* 40px button -> 46px */

/* ---------- blog ---------- */
.blog-intro { margin: -8px 0 28px; max-width: 560px; font-size: 19px; color: var(--text); }
.post-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 28px; }
.post { display: flex; flex-direction: column; gap: 10px; padding: 26px; color: var(--text); text-decoration: none; transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s; }
.post:hover, .post:focus-visible { transform: translateY(-4px); outline: none; }
.post:focus-visible { outline: 3px solid var(--cyan); outline-offset: 4px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cyan); }
.post h3 { margin: 0; font-size: 28px; font-weight: 400; line-height: 1.08; color: var(--text); }
.post-sum { margin: 0; font-size: 17px; color: var(--text); opacity: 0.9; }
.post .tags { margin-top: 4px; }
.post-go { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 8px; font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cyan); }
.post:hover .post-go .icon { translate: 4px 0; }
.post-go .icon { transition: translate 0.2s; }

.reader {
  position: fixed; inset: 0; z-index: 110;
  display: flex; justify-content: center; align-items: flex-start;
  padding: 7vh 16px 16px; overflow-y: auto;
  background: color-mix(in srgb, var(--dark) 72%, transparent);
}
.reader[hidden] { display: none; }
.reader-open { overflow: hidden; }
.reader-box { position: relative; width: min(760px, 100%); max-height: calc(100vh - 7vh - 16px); max-height: calc(100svh - 7vh - 16px); overflow-y: auto; padding: 34px 34px 40px; background: color-mix(in srgb, var(--dark) 90%, var(--blue-deep)); outline: none; }
.reader-close { position: sticky; top: 0; float: right; margin: -10px -10px 8px 12px; min-height: 44px; min-width: 88px; justify-content: center; z-index: 2; }
.reader h2 { margin: 6px 0 14px; font-size: clamp(36px, 6vw, 56px); font-weight: 400; line-height: 1; clear: none; }
.reader .tags { margin: 0 0 24px; }
.prose p { margin: 0 0 18px; font-size: 18px; line-height: 1.7; color: var(--text); }
.prose h3 { margin: 30px 0 10px; font-size: 32px; font-weight: 400; line-height: 1.1; color: var(--text); }
.prose blockquote { margin: 24px 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--cyan); font-size: 20px; line-height: 1.5; color: var(--text); }
.prose pre { margin: 0 0 18px; padding: 16px; overflow-x: auto; font-size: 15px; background: var(--panel-strong); border: 2px solid var(--ink); border-radius: 10px; }
.prose h4 { margin: 24px 0 8px; font-size: 20px; font-weight: 400; line-height: 1.3; color: var(--cyan); letter-spacing: 0.04em; text-transform: uppercase; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 26px; font-size: 18px; line-height: 1.7; color: var(--text); }
.prose li { margin: 0 0 6px; }
.prose li::marker { color: var(--cyan); }
.prose a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--text); }
.prose strong { color: #fff; font-weight: 400; text-shadow: 0.6px 0 0 currentColor; }
.prose em { font-style: normal; color: var(--cyan); }
.prose :not(pre) > code { padding: 1px 6px; font-size: 0.86em; background: var(--panel-strong); border: 2px solid var(--ink); border-radius: 6px; }
.prose hr { margin: 28px 0; border: 0; border-top: 3px solid var(--ink); box-shadow: 0 2px 0 var(--blue-deep); }
@media (max-width: 640px) { .reader { padding: 12px 8px 8px; } .reader-box { padding: 22px 18px 28px; max-height: calc(100svh - 20px); } .post h3 { font-size: 26px; } }
@media (prefers-reduced-motion: reduce) { .post { transition: none; } }

/* phones: no keyboard, so the "/" palette button goes; that frees room for the 5 nav links on a 360px screen */
@media (max-width: 640px) { .nav-cmd { display: none; } .liquid .nav { padding: 6px 14px; } }

/* the tilted marquee bands are wider than the screen on purpose; clip them so they can't stretch the mobile layout viewport
   (innerWidth was 368 on a 360px phone, 399 on 390, 784 on 768 => the page could pan sideways / render slightly zoomed out) */
html, body, main, .footer { overflow-x: clip; }

/* phones: the timeline year/"Now" label sits straight on the photo (measured 2.4:1); give it a dark backing */
@media (max-width: 640px) { .when { display: inline-block; width: max-content; padding: 1px 9px; border-radius: 8px; background: color-mix(in srgb, var(--dark) 74%, transparent); } }
