/* ==========================================================================
   prasadtirodkar.com — stylesheet
   --------------------------------------------------------------------------
   Plain CSS. No build step, no preprocessor. Edit and reload.

   Organised in the order the page renders:
     1  fonts            7  work
     2  tokens           8  writing preview
     3  base + type      9  how I lead
     4  nav             10  contact
     5  hero            11  footer
     6  logo strip      12  ask ai widget
                        13  writing pages
   ========================================================================== */

/* 1 ------------------------------------------------------------------ fonts */
/* Self-hosted with stable filenames so all three faces can be preloaded.
   Fetching them late is what caused layout shift on first paint. */
@font-face {
  font-family: "Geist";
  src: url("../fonts/geist.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/mono.woff2") format("woff2-variations");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/serif-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ---------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
img, svg, canvas { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; }

/* 2 ----------------------------------------------------------------- tokens */
/* Dark only — there is no light theme by design. */
:root {
  color-scheme: dark;

  --bg: #08090b;
  --bg-2: #0e1013;
  --bg-3: #15181d;
  --card: rgba(255, 255, 255, 0.026);
  --card-hi: rgba(255, 255, 255, 0.05);

  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.16);

  --text: #f4f5f7;
  --text-2: #a5a9b3;
  --text-3: #6b707a;

  --accent: #ff6a3d;
  --accent-2: #ffb08a;
  --live: #37d67a;

  --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-italic: "Instrument Serif", Georgia, serif;

  /* Type keeps scaling up to ~2200-2600px viewports rather than going flat
     around 1300px while the layout around it keeps widening. */
  --step--2: clamp(0.8rem, 0.75rem + 0.18vw, 0.95rem);
  --step--1: clamp(0.98rem, 0.9rem + 0.3vw, 1.15rem);
  --step-0: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem);
  --step-1: clamp(1.4rem, 1.2rem + 0.8vw, 1.85rem);
  --step-2: clamp(1.8rem, 1.4rem + 1.8vw, 2.85rem);
  --step-3: clamp(2.4rem, 1.7rem + 3.4vw, 4.2rem);
  --step-4: clamp(2.9rem, 1.7rem + 6vw, 6.4rem);

  --gutter: clamp(1.25rem, 3.5vw, 4rem);
  --measure: 62ch;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 999px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* 3 ------------------------------------------------------------ base + type */
html {
  /* Anchor links glide instead of jumping. Honoured natively by the browser,
     and automatically disabled under prefers-reduced-motion below. */
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.62;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* soft ambient glow, fixed behind everything */
  background-image:
    radial-gradient(60rem 40rem at 78% -8%, rgba(255, 106, 61, 0.09), transparent 62%),
    radial-gradient(50rem 36rem at 8% 12%, rgba(120, 150, 255, 0.05), transparent 60%);
  background-attachment: fixed;
}

::selection { background: var(--accent); color: #0a0a0a; }

.display {
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.display em {
  font-family: var(--font-italic);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text-2);
}
.display .hi { color: var(--accent); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 500;
}

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.lede { font-size: var(--step-1); line-height: 1.5; color: var(--text-2); text-wrap: pretty; }
.prose { max-width: var(--measure); color: var(--text-2); text-wrap: pretty; }
.prose p + p { margin-top: 1.05em; }

/* --------------------------------------------------------------- layout */
.wrap { width: 100%; max-width: min(94vw, 1680px); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(4.5rem, 11vh, 9rem); }

/* section label: 01 —— CONTACT */
.slabel { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 2.25rem; }
.slabel .n { font-family: var(--font-mono); font-size: var(--step--2); color: var(--text-3); }
.slabel .bar { width: 2.5rem; height: 1px; background: var(--line-2); }

/* The nav is fixed; only the hero handles its own clearance. */
main > *:first-child:not(.hero) { padding-top: clamp(7.5rem, 16vh, 11rem); }

.sr-only,
.sr-list {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------- cards */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  backdrop-filter: blur(8px);
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease),
    transform 0.45s var(--ease);
}
.card:hover { background: var(--card-hi); border-color: var(--line-2); }

/* ---------------------------------------------------------------- pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.62rem 1.15rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  background: var(--card);
  font-size: var(--step--1);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease),
    border-color 0.3s var(--ease), transform 0.4s var(--ease);
}
.pill:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.3); }
.pill--solid { background: var(--text); color: #0a0b0d; border-color: transparent; }
.pill--solid:hover { background: #fff; color: #0a0b0d; }
.pill svg { width: 15px; height: 15px; flex: none; }

.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); flex: none; }
.dot--pulse { box-shadow: 0 0 0 0 rgba(55, 214, 122, 0.55); animation: pulse 2.4s infinite; }
@keyframes pulse {
  70% { box-shadow: 0 0 0 8px rgba(55, 214, 122, 0); }
  100% { box-shadow: 0 0 0 0 rgba(55, 214, 122, 0); }
}

/* --------------------------------------------------------------- reveals */
/* Content is visible by default. Only once JS confirms it is running (it adds
   .js to <html>) do elements hide themselves to be revealed on scroll — so a
   JS failure leaves a readable page rather than a blank one. */
.r-mask { overflow: hidden; display: block; }
.js .r-mask > * { display: block; transform: translateY(108%); transition: transform 1s var(--ease); }
.js .r-mask.is-in > * { transform: none; }

.js .r-up {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s ease, transform 0.75s var(--ease);
}
.js .r-up.is-in { opacity: 1; transform: none; }

/* ------------------------------------------------------------------ link */
.link { position: relative; text-decoration: none; display: inline-block; }
.link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.link:hover::after { transform: scaleX(1); transform-origin: left; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* --------------------------------------------------------- skip + progress */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--text); color: #000; padding: 0.75rem 1.25rem; text-decoration: none;
}
.skip:focus { left: 0; }

.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 70; pointer-events: none; }
.progress span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0); transform-origin: left;
}

/* ------------------------------------------------------------ cursor glow */
/* Decorative only. pointer-events:none so it can never intercept a click;
   starts at opacity 0 so it never flashes at a stale position on load.
   Touch devices and reduced-motion skip it (see js/motion.js). */
.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 90;
  opacity: 0;
  background: radial-gradient(circle, rgba(255, 106, 61, 0.55), rgba(255, 106, 61, 0) 70%);
  transition: opacity 0.35s ease, width 0.35s var(--ease), height 0.35s var(--ease), margin 0.35s var(--ease);
  will-change: transform;
}
.cursor-glow.is-hover {
  width: 54px;
  height: 54px;
  margin: -27px 0 0 -27px;
  background: radial-gradient(circle, rgba(255, 106, 61, 0.4), rgba(255, 106, 61, 0) 72%);
}
@media (hover: none) {
  .cursor-glow { display: none; }
}

/* 4 -------------------------------------------------------------------- nav */
.nav {
  position: fixed;
  top: clamp(0.7rem, 1.6vw, 1.35rem);
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  justify-content: center;
  padding-inline: var(--gutter);
  pointer-events: none;
}
.nav-shell {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  width: 100%;
  max-width: 1120px;
  padding: 0.75rem 0.75rem 0.75rem 1.35rem;
  border-radius: var(--r-pill);
  /* A visible stroke — an 8%-opacity line disappears against a page this dark. */
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(20, 22, 27, 0.82);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}
.nav-mark {
  text-decoration: none;
  font-weight: 900;
  font-size: var(--step-0);
  letter-spacing: -0.04em;
  margin-right: auto;
  color: var(--text);
}
.nav-mark:hover { opacity: 0.8; transition: opacity 0.25s ease; }

.nav-links { display: flex; gap: clamp(0.9rem, 2.2vw, 1.9rem); }
.nav-links a {
  text-decoration: none;
  font-size: var(--step--1);
  color: var(--text-2);
  transition: color 0.25s var(--ease);
  white-space: nowrap;
}
.nav-links a:hover { color: var(--text); }

.nav-cv { padding: 0.75rem 1.3rem; font-size: var(--step--1); }

/* the pill can't hold five things on a phone — links move to the page */
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-shell { max-width: 100%; }
}

/* 5 ------------------------------------------------------------------- hero */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100svh;
  padding-block: 8rem 5rem;
  overflow: hidden;
}
.hero-in { position: relative; z-index: 1; }
.hero-h1 { font-size: var(--step-4); margin-block: 0 1.75rem; }
.hero .lede { max-width: 40ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 2.5rem; }
.hero-cue {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  writing-mode: vertical-rl; letter-spacing: 0.35em;
}

/* generative canvas behind the hero copy */
.surface {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(95% 80% at 68% 52%, #000 18%, transparent 78%);
  mask-image: radial-gradient(95% 80% at 68% 52%, #000 18%, transparent 78%);
}

/* 6 ------------------------------------------------------------- logo strip */
.strip { border-block: 1px solid var(--line); padding-block: clamp(2rem, 4.5vh, 3rem); }
.strip-viewport {
  margin-top: 1.75rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.strip-track { display: flex; width: max-content; }
.strip-row {
  display: flex; align-items: center;
  gap: clamp(2.5rem, 6vw, 5rem);
  padding-right: clamp(2.5rem, 6vw, 5rem);
}
.logo-item { display: grid; place-items: center; min-width: 4rem; height: 2.6rem; }
/* Sources are pre-normalised to white silhouettes with real transparency,
   so no filters or blend modes are needed. */
.logo-item img {
  height: auto;
  max-height: clamp(1.7rem, 2.8vw, 2.5rem);
  max-width: clamp(6rem, 11vw, 9.5rem);
  width: auto;
  object-fit: contain;
  opacity: 0.45;
  transition: opacity 0.45s var(--ease);
}
.logo-item:hover img { opacity: 1; }
.logo-fallback {
  display: none;
  font-size: clamp(0.95rem, 0.8rem + 0.5vw, 1.25rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text-3);
  white-space: nowrap;
  transition: color 0.4s var(--ease);
}
.logo-item:hover .logo-fallback { color: var(--text); }
.logo-item.no-img img { display: none; }
.logo-item.no-img .logo-fallback { display: block; }

/* ------------------------------------------------------------------ about */
.about-grid {
  display: grid; grid-template-columns: 1.25fr 1fr;
  gap: clamp(2.5rem, 5vw, 5rem); align-items: start;
}
.about-left { display: grid; gap: 1.75rem; }
.about-h2 { font-size: var(--step-3); max-width: 18ch; }
.about-left .prose { font-size: var(--step-0); }

/* Large and black-and-white — the photo carries visual weight on its own
   rather than sitting small beside the copy. */
.portrait {
  margin: 0;
  position: sticky;
  top: clamp(6rem, 14vh, 9rem);
}
.portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-2);
  filter: grayscale(1) contrast(1.05);
}

.domains {
  list-style: none; padding: 0; margin-top: 0.25rem;
  display: flex; flex-wrap: wrap; gap: 0.45rem 0.5rem;
}
.domains li {
  font-family: var(--font-mono); font-size: var(--step--2);
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3);
  border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 0.34rem 0.75rem;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.domains li:hover { color: var(--text-2); border-color: var(--line-2); }

.stats-head {
  display: flex; align-items: center; gap: 1rem;
  margin-top: clamp(4.5rem, 10vh, 7rem);
}
.stats-head .rule-line { flex: 1; height: 1px; background: var(--line); }

/* ------------------------------------------------------------- stat cards */
.stats-rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-top: clamp(2.5rem, 6vh, 4rem);
}
.stat { padding: 0.7rem 0.7rem 1.4rem; overflow: hidden; }
.stat:hover { transform: translateY(-4px); }

.stat-art {
  border-radius: 12px;
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  margin-bottom: 1.4rem;
}
.stat-art svg { width: 100%; height: 100%; }
.stat-art rect, .stat-art circle { fill: currentColor; }
.stat-art--a { background: linear-gradient(150deg, #2a1206, #120a14 70%); }
.stat-art--b { background: linear-gradient(150deg, #101a2c, #0d1016 70%); }
.stat-art--d { background: linear-gradient(150deg, #1d1526, #0f0d15 70%); }

.stat dl { padding-inline: 0.6rem; }
.stat dt {
  display: flex; align-items: baseline; flex-wrap: wrap;
  font-size: clamp(1.6rem, 1rem + 1.6vw, 2.4rem);
}
.stat dt i { font-style: normal; color: var(--accent); font-size: 0.52em; margin-inline: 0.26em; }
.stat .unit { font-size: 0.58em; margin-left: 0.06em; color: var(--text-2); }
.stat dd { margin: 0.8rem 0 0; color: var(--text-2); font-size: var(--step-0); max-width: 26ch; line-height: 1.5; }

@media (max-width: 1000px) {
  .stats-rail {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(72vw, 20rem);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.5rem;
    /* let the rail bleed to the screen edge like a real carousel */
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
  }
  .stat { scroll-snap-align: start; }
}

/* --------------------------------------------------------------- marquee */
.marquee { border-block: 1px solid var(--line); overflow: hidden; padding-block: 1.1rem; }
.marquee-track { display: flex; width: max-content; }
.marquee-row {
  display: flex; align-items: center; gap: 1.6rem; padding-right: 1.6rem;
  font-size: var(--step-1); font-weight: 500; letter-spacing: -0.02em;
  white-space: nowrap; color: var(--text-2);
}
.marquee-row i { font-style: normal; color: var(--accent); font-size: 0.5em; }

/* Looping is a pure CSS animation. JS only clones the row so the loop is
   seamless and sets the duration once.

   There is deliberately no scroll-velocity speed modulation: changing
   animation-duration on a running animation makes the browser recompute the
   current position proportionally, which reads as a visible jump on every
   scroll frame. A constant-speed marquee is the correct trade. */
@keyframes marquee-scroll {
  to { transform: translateX(-50%); }
}
[data-marquee] {
  animation: marquee-scroll var(--marquee-duration, 30s) linear infinite;
}

/* 7 ------------------------------------------------------------------- work */
.sect-lede { max-width: 46ch; margin-top: 1.25rem; }
.notes { display: grid; gap: 1rem; margin-top: 3rem; }
.note {
  display: grid; grid-template-columns: auto 1fr; gap: clamp(1rem, 3vw, 2.75rem);
  padding: clamp(1.5rem, 3.5vw, 2.75rem);
}
.note:hover { transform: translateY(-3px); }
.note-side { display: grid; gap: 0.7rem; align-content: start; }
.note-n { font-size: var(--step-1); color: var(--accent); }
.note-kind { writing-mode: vertical-rl; letter-spacing: 0.2em; }
.note-body h3 {
  font-size: var(--step-2); font-weight: 600; letter-spacing: -0.03em;
  line-height: 1.1; max-width: 20ch;
}
.note-pair { margin-top: 1.5rem; max-width: var(--measure); }
.note-pair .eyebrow { display: block; margin-bottom: 0.35rem; }
.note-pair p { color: var(--text-2); font-size: var(--step-0); line-height: 1.6; }
.note-outcome {
  margin-top: 1.75rem; padding-top: 1.1rem; border-top: 1px solid var(--line);
  font-weight: 500; letter-spacing: -0.02em;
}

/* 8 -------------------------------------------------------- writing preview */
.wp-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
}
.wp-all { flex: none; }
.wp-list { list-style: none; padding: 0; margin-top: 3rem; }
.wp-list li { border-top: 1px solid var(--line); }
.wp-list li:last-child { border-bottom: 1px solid var(--line); }
.wp-list a {
  display: grid; gap: 0.6rem;
  padding-block: clamp(1.75rem, 4vh, 2.5rem);
  text-decoration: none;
  transition: padding-left 0.45s var(--ease);
}
.wp-list a:hover { padding-left: 1.25rem; }
.wp-list h3 {
  font-size: var(--step-1); font-weight: 600; letter-spacing: -0.02em;
  max-width: 40ch; transition: color 0.25s ease;
}
.wp-list a:hover h3 { color: var(--accent); }
.wp-list p { color: var(--text-3); max-width: 58ch; font-size: var(--step--1); }
.wp-list .go {
  color: var(--accent); opacity: 0; transform: translateX(-6px);
  transition: opacity 0.3s ease, transform 0.35s var(--ease);
}
.wp-list a:hover .go { opacity: 1; transform: none; }

/* 9 ------------------------------------------------------------ how I lead */
.lead-h { font-size: var(--step-3); max-width: 22ch; margin-bottom: 1.5rem; }
.lead-h em { color: var(--text); font-style: normal; }

/* Pull-quote cards, each with its own mark and an accent rail. */
.beliefs {
  list-style: none;
  padding: 0;
  margin-top: clamp(2.5rem, 6vh, 4rem);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.beliefs li {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: var(--r-md);
  padding: clamp(2rem, 4vw, 2.75rem) clamp(1.75rem, 3.5vw, 2.5rem);
  transition: background-color 0.35s var(--ease), transform 0.35s var(--ease);
}
.beliefs li:hover { background: var(--bg); transform: translateY(-3px); }
.beliefs .q {
  width: 2rem; height: 1.5rem;
  color: var(--accent);
  opacity: 0.55;
  margin-bottom: 1.25rem;
}
.beliefs p {
  font-size: clamp(1.1rem, 0.75rem + 1.2vw, 1.6rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text-3);
}

/* 10 --------------------------------------------------------------- contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.contact-h2 { font-size: var(--step-3); margin-bottom: 1.5rem; }
.contact-grid .prose { font-size: var(--step-0); }

.tags {
  list-style: none; padding: 0; margin-top: 2.25rem;
  display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.tag {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.42rem 0.85rem;
  border: 1px solid var(--line-2); border-radius: var(--r-pill);
  font-size: var(--step--2); color: var(--text-2);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.tag:hover { color: var(--text); border-color: var(--text-3); background: rgba(255, 255, 255, 0.05); }
.tag svg { width: 11px; height: 11px; color: var(--accent); flex: none; }

.contact-rows { list-style: none; padding: 0; display: grid; gap: 0.75rem; align-content: start; }
.contact-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 0.85rem;
  padding: 1.25rem 1.35rem;
  /* Opaque. The translucent .card treatment let the page glow bleed through
     and read as blurry behind the text. */
  background: #101216;
  border-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: none;
}
.contact-row:hover {
  background: #14171c;
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}
.contact-ico { width: 19px; height: 19px; color: var(--text-3); }
.contact-meta { display: grid; gap: 0.15rem; min-width: 0; }
/* Never truncate a contact address — it has to be readable and copyable. */
.contact-val { font-size: var(--step-0); overflow-wrap: anywhere; }

.contact-copy {
  background: none; border: 0; cursor: pointer; color: var(--text-3);
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 8px; transition: color 0.25s, background-color 0.25s;
}
.contact-copy:hover { color: var(--text); background: rgba(255, 255, 255, 0.07); }
.contact-copy svg { width: 15px; height: 15px; }
.contact-copy.done { color: var(--live); }

.contact-act { padding: 0.48rem 0.9rem; font-size: var(--step--2); }

.avail {
  display: flex; align-items: center; gap: 0.6rem;
  margin-top: clamp(3rem, 7vh, 5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  letter-spacing: 0.12em;
}

/* 11 ---------------------------------------------------------------- footer */
.foot { border-top: 1px solid var(--line); padding-block: 2.25rem 5.5rem; }
.foot-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.foot a { text-decoration: none; }

/* 12 -------------------------------------------------------- ask ai widget */
.ask { position: fixed; right: clamp(0.9rem, 2.5vw, 2rem); bottom: clamp(0.9rem, 2.5vw, 2rem); z-index: 80; }

.ask-trigger {
  /* Solid accent rather than a translucent tint — at 5% of the viewport it
     needs to read as the primary action, not a ghost chip. */
  background: linear-gradient(145deg, #ff7a4f, #e84f22);
  border-color: transparent;
  color: #1a0600;
  font-weight: 600;
  font-size: var(--step-0);
  padding: 0.95rem 1.6rem;
  box-shadow: 0 18px 45px -12px rgba(255, 106, 61, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  margin-left: auto;
}
.ask-trigger:hover {
  background: linear-gradient(145deg, #ff8b63, #f45c2c);
  transform: translateY(-2px);
  box-shadow: 0 24px 55px -12px rgba(255, 106, 61, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}
.ask-trigger svg { color: #1a0600; width: 18px; height: 18px; }

.ask-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.7rem);
  width: min(92vw, 25rem);
  background: rgba(14, 16, 20, 0.94);
  backdrop-filter: blur(20px) saturate(150%);
  border-radius: var(--r-lg);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: bottom right;
  animation: ask-pop 0.4s var(--ease);
}
.ask-panel[hidden] { display: none; }
@keyframes ask-pop {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
}

.ask-panel header {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.95rem 0.85rem 0.95rem 1rem;
  border-bottom: 1px solid var(--line);
}
.ask-panel header .ask-t { font-size: var(--step-0); font-weight: 500; }
.ask-panel header .ask-s { font-size: var(--step--1); color: var(--text-3); }
.ask-panel header .ask-titles { margin-right: auto; }
.ask-panel header button {
  background: none; border: 0; cursor: pointer;
  color: var(--text-3); display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  transition: color 0.25s, background-color 0.25s, transform 0.4s var(--ease);
}
.ask-panel header button:hover { color: var(--text); background: rgba(255, 255, 255, 0.07); }
.ask-panel header [data-ask-restart]:hover { transform: rotate(-70deg); }
.ask-panel header button svg { width: 16px; height: 16px; }

.ask-log {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  max-height: min(46vh, 21rem);
  overflow-y: auto;
  font-size: var(--step--1);
  line-height: 1.55;
}
.ask-log .msg p { padding: 0.62rem 0.85rem; border-radius: 14px; }
.ask-log .msg.bot p {
  background: rgba(255, 255, 255, 0.06);
  border-bottom-left-radius: 5px;
  color: var(--text);
}
.ask-log .msg.user { align-self: flex-end; max-width: 88%; }
.ask-log .msg.user p {
  background: var(--accent);
  color: #180701;
  border-bottom-right-radius: 5px;
  font-weight: 500;
}
.ask-log .thinking { color: var(--text-3) !important; }

.ask-chips-label {
  padding: 0.7rem 1rem 0;
  transition: opacity 0.2s ease;
}
.ask-chips-label:has(+ .ask-chips[hidden]) { display: none; }
.ask-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0.5rem 1rem 0.85rem; }
.ask-chips[hidden] { display: none; }
.ask-chips .chip {
  background: none; border: 1px solid var(--line-2); color: var(--text-2);
  border-radius: var(--r-pill); padding: 0.36rem 0.75rem;
  font-size: var(--step--2); cursor: pointer; text-align: left;
  transition: color 0.25s, border-color 0.25s, background-color 0.25s;
}
.ask-chips .chip:hover {
  color: var(--text); border-color: var(--text-3); background: rgba(255, 255, 255, 0.05);
}

.ask-composer { display: flex; gap: 0.5rem; padding: 0.75rem; border-top: 1px solid var(--line); }
.ask-composer input {
  flex: 1; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 0.6rem 0.95rem; font-size: var(--step--1); outline: none;
  transition: border-color 0.25s;
}
.ask-composer input::placeholder { color: var(--text-3); }
.ask-composer input:focus { border-color: var(--accent); }
.ask-composer button {
  width: 40px; height: 40px; flex: none; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--text); color: #0a0b0d; display: grid; place-items: center;
  transition: transform 0.3s var(--ease);
}
.ask-composer button:hover { transform: scale(1.07); }
.ask-composer button svg { width: 17px; height: 17px; }

/* 13 -------------------------------------------------------- writing pages */
/* index */
.writing-head { padding-bottom: 0; }
.writing-h1 { font-size: var(--step-4); margin-block: 1.25rem 1.75rem; }
.writing-head .lede { max-width: 42ch; }
.writing-list { list-style: none; padding: 0; }
.writing-list li { border-top: 1px solid var(--line); }
.writing-list li:last-child { border-bottom: 1px solid var(--line); }
.writing-list a {
  display: grid;
  gap: 0.6rem;
  padding-block: clamp(1.75rem, 4vh, 2.75rem);
  text-decoration: none;
  transition: padding-left 0.45s var(--ease);
}
.writing-list a:hover { padding-left: 1.25rem; }
.writing-list h2 { font-size: var(--step-2); font-weight: 400; max-width: 26ch; transition: color 0.25s ease; }
.writing-list a:hover h2 { color: var(--accent); }
.writing-list p { color: var(--text-3); max-width: 58ch; font-size: var(--step--1); }
.writing-list .go {
  color: var(--accent); opacity: 0; transform: translateX(-6px);
  transition: opacity 0.3s ease, transform 0.35s var(--ease);
}
.writing-list a:hover .go { opacity: 1; transform: none; }

/* single essay */
.post-back { display: inline-block; text-decoration: none; margin-bottom: 2.5rem; }
.post-h1 { font-size: var(--step-3); max-width: 20ch; }
.post-date { margin-top: 1.25rem; }
.post-body { margin-top: 3.5rem; font-size: var(--step-0); }
.post-body h2 {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: var(--step-2);
  line-height: 1.1;
  color: var(--text);
  margin-top: 3rem;
  margin-bottom: 0.9rem;
  max-width: 22ch;
}
.post-body p { margin-bottom: 1.15rem; }
.post-body ul { margin: 0 0 1.5rem; padding-left: 1.1rem; }
.post-body li { margin-bottom: 0.65rem; }
.post-body li::marker { color: var(--accent); }
.post-body strong { color: var(--text); font-weight: 600; }
.post-rule { margin-block: 4rem 1.75rem; max-width: var(--measure); }
.post-end { color: var(--text-3); font-size: var(--step--1); }

/* --------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; grid-template-rows: auto auto; }
  .about-grid .portrait { order: -1; position: static; max-width: 22rem; }
  .about-h2 { max-width: none; }
}
@media (max-width: 640px) {
  .note { grid-template-columns: 1fr; gap: 0.5rem; }
  .note-side { grid-auto-flow: column; justify-content: start; align-items: center; gap: 0.9rem; }
  .note-kind { writing-mode: horizontal-tb; }
  .beliefs { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .contact-row { grid-template-columns: auto 1fr auto; row-gap: 0.9rem; }
  .contact-act { grid-column: 1 / -1; justify-content: center; }
}

/* ------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js .r-mask > * { transform: none !important; }
  .js .r-up { opacity: 1 !important; transform: none !important; }
  [data-marquee] { animation: none; }
}
