/* =============================================================
   Senthil Palanisamy — portfolio
   Hand-written, dependency-free. Dark by default, light on request.
   ============================================================= */

/* ---------- tokens ---------- */
:root {
  color-scheme: dark;

  --bg:            #0a0e13;
  --bg-elevated:   #10161e;
  --surface:       #131b25;
  --surface-hover: #18222e;
  --border:        #1f2c3a;
  --border-strong: #2c3d4f;

  --text:          #e7eef6;
  --text-muted:    #93a3b5;
  --text-faint:    #64748b;

  --accent:        #2dd4bf;
  --accent-soft:   #0f766e;
  --accent-text:   #062a26;

  --radius:      14px;
  --radius-lg:   20px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / .4);
  --shadow-md: 0 8px 24px -8px rgb(0 0 0 / .6);
  --shadow-lg: 0 24px 60px -20px rgb(0 0 0 / .75);

  --nav-h: 64px;
  --measure: 68ch;

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --ease: cubic-bezier(.2, .7, .3, 1);
}

:root[data-theme="light"] {
  color-scheme: light;

  --bg:            #ffffff;
  --bg-elevated:   #f7f9fb;
  --surface:       #ffffff;
  --surface-hover: #f2f6f9;
  --border:        #e2e8f0;
  --border-strong: #cbd5e1;

  --text:          #0b1620;
  --text-muted:    #4a5b6d;
  --text-faint:    #7b8a9a;

  --accent:        #0d9488;
  --accent-soft:   #99f6e4;
  --accent-text:   #ffffff;

  --shadow-sm: 0 1px 2px rgb(15 23 42 / .06);
  --shadow-md: 0 8px 24px -12px rgb(15 23 42 / .18);
  --shadow-lg: 0 24px 60px -24px rgb(15 23 42 / .28);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
ul, ol { padding: 0; }

h1, h2, h3, h4 {
  line-height: 1.15;
  font-weight: 650;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

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

::selection { background: var(--accent); color: var(--accent-text); }

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

/* ---------- layout primitives ---------- */
.container {
  width: min(100% - 2.5rem, 1160px);
  margin-inline: auto;
}

.section {
  padding-block: clamp(4rem, 10vw, 7.5rem);
  scroll-margin-top: var(--nav-h);
}
.section--alt { background: var(--bg-elevated); }

.section__head { margin-bottom: clamp(2rem, 5vw, 3.5rem); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .875rem;
}
.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: currentColor;
}

.section__title { font-size: clamp(1.75rem, 4vw, 2.5rem); }

.section__lede {
  margin-top: .875rem;
  max-width: var(--measure);
  color: var(--text-muted);
  font-size: 1.0625rem;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100%;
  z-index: 200;
  padding: .625rem 1rem;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
}
.skip-link:focus { top: 1rem; text-decoration: none; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .7rem 1.25rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text);
  font-size: .9375rem;
  font-weight: 550;
  cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease), color .2s var(--ease);
}
.btn:hover {
  text-decoration: none;
  background: var(--surface-hover);
  border-color: var(--accent);
  transform: translateY(-1px);
}
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
}
.btn--primary:hover {
  background: color-mix(in oklab, var(--accent) 88%, white);
  border-color: color-mix(in oklab, var(--accent) 88%, white);
  color: var(--accent-text);
}
.btn--ghost { border-color: transparent; }
.btn--ghost:hover { border-color: var(--border-strong); }
.btn .icon { width: 1.05em; height: 1.05em; }

/* ---------- nav ---------- */
.nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 90;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.nav[data-scrolled="true"] { border-bottom-color: var(--border); }

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 2.5rem, 1160px);
  margin-inline: auto;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: .625rem;
  color: var(--text);
  font-weight: 650;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.nav__brand:hover { text-decoration: none; color: var(--accent); }
.nav__mark {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: .25rem;
  list-style: none;
  margin: 0;
}
.nav__link {
  display: block;
  padding: .5rem .7rem;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: .9rem;
  font-weight: 500;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav__link:hover { color: var(--text); background: var(--surface-hover); text-decoration: none; }
.nav__link[aria-current="true"] { color: var(--accent); }

.nav__actions { display: flex; align-items: center; gap: .5rem; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-hover); }
.icon-btn .icon { width: 18px; height: 18px; }

.nav__toggle { display: none; }

/* theme toggle icon swap */
.theme-toggle .icon--sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon--sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon--moon { display: none; }

@media (max-width: 900px) {
  .nav__toggle { display: grid; }
  .nav__links {
    position: fixed;
    top: var(--nav-h);
    inset-inline: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .5rem .75rem 1rem;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
  }
  .nav__links[data-open="true"] { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav__link { padding: .75rem 1rem; border-radius: var(--radius); font-size: 1rem; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  display: grid;
  align-content: center;
  min-height: min(94svh, 880px);
  padding-block: calc(var(--nav-h) + 3rem) 4rem;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60ch 40ch at 12% 8%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(50ch 40ch at 88% 92%, color-mix(in srgb, #6366f1 14%, transparent), transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--border) 55%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--border) 55%, transparent) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(80ch 60ch at 50% 40%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(80ch 60ch at 50% 40%, #000, transparent 75%);
  opacity: .5;
  pointer-events: none;
}
.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 4.5rem);
}
.hero__status {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .75rem .35rem .55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--text-muted);
}
.hero__status .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.hero__title {
  margin-top: 1.25rem;
  font-size: clamp(2.5rem, 7vw, 4.25rem);
  letter-spacing: -0.035em;
}
.hero__role {
  margin-top: .75rem;
  font-size: clamp(1.125rem, 2.4vw, 1.5rem);
  font-weight: 550;
  color: var(--accent);
  letter-spacing: -0.015em;
}
.hero__lede {
  margin-top: 1.25rem;
  max-width: 56ch;
  color: var(--text-muted);
  font-size: 1.0625rem;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 2rem;
}
.hero__portrait {
  position: relative;
  justify-self: center;
  width: min(320px, 70vw);
  aspect-ratio: 1;
}
.hero__portrait img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
}
.hero__portrait::before {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent);
  animation: spin 40s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hero__stats {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 5vw, 3.5rem);
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.stat__num {
  font-size: 1.75rem;
  font-weight: 680;
  letter-spacing: -0.03em;
}
.stat__label {
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

@media (max-width: 880px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__portrait { grid-row: 1; width: min(200px, 50vw); justify-self: start; }
}

/* ---------- work grid ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr));
  gap: 1.5rem;
  list-style: none;
  margin: 0;
}

.card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: inherit;
  cursor: pointer;
  transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}
.card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-elevated);
}
.card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s var(--ease), filter .4s var(--ease);
}
.card:hover .card__media img { transform: scale(1.04); }
.card__cue {
  position: absolute;
  inset: auto .75rem .75rem auto;
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(8px);
  color: var(--text);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.card:hover .card__cue, .card:focus-visible .card__cue { opacity: 1; transform: translateY(0); }
.card__cue .icon { width: 16px; height: 16px; }

.card__body {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 1.125rem 1.25rem 1.375rem;
}
.card__title {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.card__meta {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--text-faint);
  letter-spacing: .02em;
}

/* ---------- project dialog ---------- */
.project-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(58rem, calc(100vw - 2rem));
  max-height: min(calc(100dvh - 3rem), 60rem);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
/* Only style display on the open state: a bare `display` here would override
   the UA rule that keeps closed dialogs out of the page. */
.project-dialog[open] {
  display: flex;
  flex-direction: column;
}
.project-dialog::backdrop {
  background: rgb(2 6 12 / .72);
  backdrop-filter: blur(4px);
}
.project-dialog[open] { animation: dialog-in .25s var(--ease); }
@keyframes dialog-in {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
}

.project-dialog__bar {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.project-dialog__bar h2 {
  font-size: 1.0625rem;
  font-weight: 600;
}
.project-dialog__scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.5rem clamp(1.25rem, 4vw, 2.5rem) 2.5rem;
}
.project-dialog__hero {
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 1.5rem;
  background: var(--bg-elevated);
}
.project-dialog__hero img {
  max-height: min(48vh, 440px);
  object-fit: contain;
}
.project-dialog__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.5rem;
  list-style: none;
}
.tag {
  padding: .25rem .625rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--text-muted);
}

/* rich text coming from post front matter */
.prose { color: var(--text-muted); max-width: var(--measure); }
.prose > * + * { margin-top: 1rem; }
.prose h2 {
  margin-top: 2rem;
  font-size: 1.25rem;
  color: var(--text);
}
.prose h3 { margin-top: 1.5rem; font-size: 1.0625rem; color: var(--text); }
.prose ul, .prose ol { margin-left: 1.15rem; }
.prose li + li { margin-top: .35rem; }
.prose img {
  max-width: 100%;
  height: auto;
  margin-block: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.prose a { text-decoration: underline; text-underline-offset: 3px; }
/* Post write-ups embed fixed-size YouTube iframes and wide display math. */
.prose iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  margin-block: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.prose mjx-container {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}
.prose code {
  font-family: var(--font-mono);
  font-size: .875em;
  padding: .15em .4em;
  border-radius: 6px;
  background: var(--bg-elevated);
}

/* ---------- about ---------- */
.about-grid {
  display: grid;
  /* The full-width Publications panel spans every track, so auto-fit can never
     collapse one — size the tracks so two fill the row exactly. */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr));
  gap: 1.5rem;
  align-items: start;
}
.panel {
  height: 100%;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.panel__title {
  display: flex;
  align-items: center;
  gap: .625rem;
  font-size: 1.0625rem;
  margin-bottom: 1rem;
}
.panel__title .icon { width: 18px; height: 18px; color: var(--accent); }
.panel p, .panel li { color: var(--text-muted); }
.panel p + p { margin-top: .875rem; }

.panel--wide { grid-column: 1 / -1; }

.about-portrait {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 1.25rem;
}

.timeline { list-style: none; }
.timeline li {
  position: relative;
  padding-left: 1.375rem;
  padding-bottom: 1.125rem;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: 0; top: .55rem;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.timeline li::after {
  content: "";
  position: absolute;
  left: 3.5px; top: 1.2rem; bottom: 0;
  width: 1px;
  background: var(--border);
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::after { display: none; }
.timeline__role { display: block; color: var(--text); font-weight: 550; }
.timeline__meta { font-family: var(--font-mono); font-size: .75rem; color: var(--text-faint); }

.plain-list { list-style: none; display: grid; gap: .625rem; }
.plain-list li { padding-left: 1.125rem; position: relative; }
.plain-list li::before {
  content: "";
  position: absolute;
  left: 0; top: .7em;
  width: 6px; height: 1px;
  background: var(--accent);
}

.chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; }
.chips li {
  padding: .3rem .7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
  font-size: .8125rem;
  color: var(--text-muted);
}

/* ---------- endorsements (section currently not rendered) ---------- */
.quotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  gap: 1.5rem;
  list-style: none;
}
.quote {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.quote__mark {
  width: 28px; height: 28px;
  color: var(--accent);
  opacity: .55;
}
.quote__text { color: var(--text-muted); }
.quote__text p + p { margin-top: .875rem; }
.quote__author {
  display: flex;
  align-items: center;
  gap: .875rem;
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.quote__avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-strong);
  flex: none;
}
.quote__name { font-weight: 600; color: var(--text); font-size: .9375rem; }
.quote__title { font-size: .8125rem; color: var(--text-faint); }
.quote__note {
  margin-top: 1.5rem;
  font-size: .875rem;
  color: var(--text-faint);
}

/* ---------- contact ---------- */
.contact-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 3rem;
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 3rem;
  list-style: none;
}
.contact-list a { color: var(--text); }
.contact-list a:hover { color: var(--accent); }
.contact-item { display: flex; gap: .875rem; align-items: flex-start; }
.contact-item .icon { width: 18px; height: 18px; color: var(--accent); flex: none; margin-top: .3rem; }
.contact-item__label {
  display: block;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* ---------- footer ---------- */
.footer {
  padding-block: 3rem 2rem;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.footer__note { font-size: .875rem; color: var(--text-faint); }
.socials { display: flex; gap: .5rem; list-style: none; }
.socials .icon-btn:hover { color: var(--accent); border-color: var(--accent); }

.to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 80;
  background: var(--surface);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
}
.to-top[data-visible="true"] { opacity: 1; visibility: visible; transform: translateY(0); }

/* ---------- reveal on scroll ---------- */
@media (prefers-reduced-motion: no-preference) {
  :root.js .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .6s var(--ease), transform .6s var(--ease);
  }
  :root.js .reveal[data-revealed="true"] { opacity: 1; transform: none; }
}
