/* ============================================================
   Ankur Batta — one-page portfolio
   Warm-white "studio" ground · deep spruce accent · condensed
   display type (Big Shoulders) set large · quiet on-scroll motion
   ============================================================ */

:root {
  /* surfaces & ink */
  --paper: #f7f6f2;          /* page ground — warm white, not cream */
  --card: #ffffff;           /* raised surface (name kept: mascot CSS depends on it) */
  --surface-2: #fbfaf7;      /* faint alt surface */
  --ink: #1b1a17;            /* primary text — warm near-black */
  --sub: #6b6960;            /* secondary text */
  --hairline: #e7e4da;       /* borders / dividers */
  --hairline-2: #dbd7c9;     /* stronger rule */

  /* one accent — deep spruce (links, marks, one filled block per section) */
  --accent: #1f5741;
  --accent-strong: #2c6b4f;
  --accent-soft: #e8f0ea;
  --accent-onfill: #f4f7f2;

  /* radius + shadow scale */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --shadow-sm: 0 1px 2px rgba(24, 23, 18, 0.04);
  --shadow-md: 0 10px 26px -12px rgba(24, 23, 18, 0.14), 0 3px 8px -4px rgba(24, 23, 18, 0.06);
  --shadow-lg: 0 26px 60px -20px rgba(24, 23, 18, 0.22), 0 8px 20px -10px rgba(24, 23, 18, 0.10);

  /* type — override the Tailwind @theme vars (this sheet loads after tailwind.css) */
  --font-display: "Big Shoulders Display", "Arial Narrow", "Helvetica Neue", sans-serif;
  --font-sans: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  --maxw: 1180px;
  --gutter: clamp(1.25rem, 5vw, 3.25rem);
  --nav-h: 4.75rem;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* clears the floating pill nav (bottom edge ~73px) plus breathing room.
     Use ONLY this — do not also set scroll-margin-top on the targets, or the
     two clearances stack and every jump lands ~1 section-heading too low. */
  scroll-padding-top: 6.25rem;
  -webkit-text-size-adjust: 100%;
}

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

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

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

.no-js .reveal { opacity: 1 !important; transform: none !important; }
.hidden { display: none !important; }

/* keyboard focus */
a:focus-visible, button:focus-visible, canvas:focus-visible,
[tabindex]:focus-visible, .nav-cta:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
  border-radius: 4px;
}
::selection { background: rgba(31, 87, 65, 0.16); }

.skip-link {
  position: fixed;
  top: 0;
  left: 0.75rem;
  z-index: 200;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  font: 500 0.85rem/1 var(--font-mono);
  /* hidden until a keyboard user tabs to it; never appears on touch/scroll */
  transform: translateY(-110%);
  transition: transform 0.18s ease;
}
.skip-link:focus-visible { transform: translateY(0); text-decoration: none; }
@media (hover: none) and (pointer: coarse) { .skip-link { display: none; } }

/* ---------- quiet tonal backdrop ---------- */
.paper-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse 52% 44% at 96% -6%, rgba(31, 87, 65, 0.055), transparent 60%),
    radial-gradient(ellipse 50% 42% at -6% 104%, rgba(24, 23, 18, 0.03), transparent 60%);
}
.paper-grid::before { content: none; }

#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent-strong);
  z-index: 120;
  transition: width 0.1s linear;
}

/* ============================================================
   Type voice
   ============================================================ */
.display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: -0.005em;
  text-wrap: balance;
  margin: 0;
  color: var(--ink);
}
.display .accent { color: var(--accent); }

.kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.4rem;
}
.kicker::before {
  content: "";
  display: inline-block;
  width: 1.6rem;
  height: 1px;
  background: var(--accent);
  vertical-align: middle;
  margin-right: 0.7rem;
  margin-bottom: 0.18em;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--sub);
  margin: 0;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sub);
  margin: 0 0 0.9rem;
}

.blink { color: var(--accent); }

.text-link {
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}
.text-link:hover { text-decoration: underline; }

/* section headings — big, condensed, two-tone */
.section-h {
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  margin: 0 0 1.1rem;
}
@media (min-width: 560px) and (max-width: 940px) {
  .section-h br, .hero-name br, .contact-h br { display: none; }
}
.section-intro {
  max-width: 46ch;
  font-size: 1.08rem;
  color: var(--sub);
  margin: 0 0 2.4rem;
}

/* justified body copy — hyphens: auto keeps the lines tight at every width */
.lead,
.section-intro,
.story-copy p,
.work-lede,
.timeline-item p,
.resume-block p:last-child,
.skills-list dd,
.mini-card p,
.demo-note p {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* ============================================================
   Layout rhythm
   ============================================================ */
main { display: block; }

.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3.5rem, 6vw, 5.75rem) var(--gutter);
  border-top: 1px solid var(--hairline);
}
.section:first-of-type { border-top: 0; }
.section-tight {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.25rem, 4vw, 3.5rem) var(--gutter);
}

/* ============================================================
   Nav — floating pill
   ============================================================ */
.site-nav {
  position: sticky;
  top: 0.9rem;
  z-index: 100;
  padding: 0 var(--gutter);
  margin-top: 0.9rem;
}
.nav-shell {
  max-width: 940px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0.6rem 0.5rem 1.15rem;
  background: #faf9f5;
  border: 1px solid var(--hairline-2);
  border-radius: 999px;
  box-shadow: 0 3px 16px -4px rgba(20, 30, 24, 0.12), 0 1px 3px rgba(20, 30, 24, 0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.nav-brand {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.nav-brand:hover { text-decoration: none; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-link {
  position: relative;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--sub);
  transition: color 0.18s ease;
}
.nav-link:hover { color: var(--ink); text-decoration: none; }
.nav-link.active { color: var(--accent); }
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-link.active::after { transform: scaleX(1); }

.nav-actions { display: flex; align-items: center; gap: 0.5rem; }
.nav-kbd {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--sub);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 0.42rem 0.7rem;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease;
}
.nav-kbd:hover { border-color: var(--accent); color: var(--accent); }
.nav-cta {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  background: var(--ink);
  border-radius: 999px;
  padding: 0.55rem 1.15rem;
  transition: background 0.18s ease;
}
.nav-cta:hover { background: #000; text-decoration: none; }
.nav-burger {
  display: none;
  width: 2.3rem;
  height: 2.3rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: transparent;
  color: var(--sub);
  cursor: pointer;
}
.mobile-menu {
  display: none;
  list-style: none;
  margin: 0.6rem auto 0;
  max-width: 940px;
  padding: 0.6rem;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
}
.mobile-menu:not(.hidden) { display: block; }
.mobile-menu li { margin: 0; }
.mobile-menu .nav-link {
  display: block;
  padding: 0.7rem 0.8rem;
  border-radius: var(--r-sm);
}
.mobile-menu .nav-link:hover { background: var(--surface-2); }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-kbd { display: none; }
  .nav-burger { display: inline-flex; }
}

/* ============================================================
   Buttons
   ============================================================ */
.btn-solid, .btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.92rem;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.btn-solid {
  color: #fff;
  background: var(--ink);
  border: 1px solid var(--ink);
}
.btn-solid:hover { background: #000; box-shadow: var(--shadow-md); transform: translateY(-1px); text-decoration: none; }
.btn-outline {
  color: var(--ink);
  border: 1px solid var(--hairline-2);
  background: var(--card);
}
.btn-outline:hover { border-color: var(--ink); text-decoration: none; }

.mono-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sub);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease;
}
.mono-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ============================================================
   Scroll reveal (the on-scroll animation, kept + calmed)
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.visible { opacity: 1; transform: none; }

/* ============================================================
   Hero
   ============================================================ */
.hero { padding-top: clamp(2rem, 4vw, 3.25rem); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "intro photo"
    "copy  photo";
  column-gap: clamp(2rem, 6vw, 5rem);
  row-gap: 1.5rem;
  align-items: start;
}
.hero-intro { grid-area: intro; }
.hero-copy  { grid-area: copy; }
.hero-photo { grid-area: photo; align-self: center; }
.status {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  line-height: 1.5;
  letter-spacing: 0.03em;
  color: var(--ink);
  margin: 0 0 1.4rem;
}
@media (max-width: 400px) { .status { flex-wrap: wrap; } }
.status .status-time { white-space: nowrap; }
@media (max-width: 480px) { .status .status-time { display: none; } }
.hero-name {
  font-size: clamp(3.2rem, 9vw, 6rem);
  font-weight: 800;
  margin: 0 0 0.9rem;
}
.hero-thesis {
  font-size: clamp(1.9rem, 4.4vw, 3.15rem);
  font-weight: 600;
  line-height: 1.04;
  color: var(--ink);
  max-width: 23ch;
  text-wrap: balance;
  margin: 0 0 1.6rem;
}
.lead {
  max-width: 52ch;
  font-size: 1.12rem;
  line-height: 1.62;
  color: var(--sub);
  margin: 0 0 2rem;
}
.lead a { font-weight: 500; text-decoration: underline; text-decoration-color: rgba(31, 87, 65, 0.35); }
.lead a:hover { text-decoration-color: var(--accent); }
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.3rem;
}
/* hero photo — framed, spruce-duotone by default, full colour on hover/focus */
.hero-photo {
  position: relative;
  margin: 0;
  width: clamp(12rem, 25vw, 17.5rem);
  padding: 0.5rem;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
}
.hero-photo-inner {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--r-xl) - 0.4rem);
  aspect-ratio: 4 / 5;
}
.hero-photo-inner::after {          /* soft inner vignette so the photo seats in the frame */
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 3rem rgba(20, 24, 20, 0.16);
  pointer-events: none;
}
.hero-photo-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
  transition: transform 1.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hero-photo-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.7rem 0.7rem 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
  background: linear-gradient(transparent, rgba(11, 24, 18, 0.72));
  pointer-events: none;
  transition: padding-bottom 0.4s ease;
}
@media (max-width: 820px) {
  .hero-photo-cap { font-size: 0.54rem; letter-spacing: 0.08em; }
}
.hero-photo:hover .hero-photo-inner img,
.hero-photo:focus-visible .hero-photo-inner img { transform: scale(1.06); }
.hero-photo:hover .hero-photo-cap,
.hero-photo:focus-visible .hero-photo-cap { padding-bottom: 0.85rem; }

@media (prefers-reduced-motion: reduce) {
  .hero-photo-inner img { transform: none; }
  .hero-photo:hover .hero-photo-inner img,
  .hero-photo:focus-visible .hero-photo-inner img { transform: none; }
}

/* open-to-work dot */
.pulse-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-strong);
  flex-shrink: 0;
}
.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--accent-strong);
  animation: pulse-ring 3s ease-out infinite;
}
@keyframes pulse-ring {
  0%   { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* stats */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem 1rem;
  margin: clamp(3rem, 6vw, 4.5rem) 0 0;
  padding-top: 2.2rem;
  border-top: 1px solid var(--hairline);
}
.stats div { margin: 0; }
.stats dt {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stats dd {
  margin: 0.5rem 0 0;
  font-size: 0.86rem;
  line-height: 1.4;
  color: var(--sub);
}

@media (max-width: 820px) {
  .hero-grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1.6rem;
  }
  .hero-intro { order: 1; }
  .hero-photo { order: 2; align-self: stretch; width: 100%; }
  .hero-copy  { order: 3; }
  .hero-photo-inner { aspect-ratio: 16 / 11; }
  .hero-photo-inner img { object-position: 50% 32%; transform: none; }
  .hero-thesis { max-width: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   Credential strip
   ============================================================ */
.cred-strip { border-top: 1px solid var(--hairline); }
.cred-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.cred-list li {
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--sub);
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 0.55rem 1rem;
}
.cred-k { color: var(--ink); font-weight: 600; }
@media (max-width: 640px) {
  .cred-list { gap: 0.55rem; }
  .cred-list li { font-size: 0.82rem; }
}

/* ============================================================
   Story
   ============================================================ */
.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.story-grid .section-h {
  font-size: clamp(2.4rem, 6vw, 4rem);
  margin: 0;
  position: sticky;
  top: 6.5rem;
}
.story-copy { display: grid; gap: 1.3rem; }
.story-copy p { font-size: 1.1rem; color: var(--ink); max-width: 58ch; }
.story-copy p + p { color: var(--sub); }

@media (max-width: 820px) {
  .story-grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .story-grid .section-h { position: static; }
}

/* ============================================================
   Work
   ============================================================ */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.4rem;
}
.work-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 3vw, 2.2rem);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.work-card:hover {
  border-color: var(--hairline-2);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.work-card.feature {
  grid-column: 1 / -1;
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-onfill);
}
@media (min-width: 781px) {
  .work-card.feature {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
    column-gap: clamp(2rem, 5vw, 4rem);
  }
  .work-card.feature .work-tag,
  .work-card.feature h3,
  .work-card.feature .work-links { grid-column: 1 / -1; }
  .work-card.feature .work-lede { grid-column: 1; align-self: start; margin: 0.2rem 0 0; }
  .work-card.feature .work-points { grid-column: 2; margin: 0 0 1.5rem; }
}
.work-card.wide { grid-column: 1 / -1; }
.work-card.wide .work-lede { max-width: 46ch; }
.work-card.wide .work-points { max-width: 60ch; }
@media (min-width: 781px) {
  .work-card.wide {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
    column-gap: clamp(2rem, 5vw, 4rem);
    row-gap: 0;
  }
  .work-card.wide .work-tag,
  .work-card.wide h3,
  .work-card.wide .work-links { grid-column: 1 / -1; }
  .work-card.wide .work-lede { grid-column: 1; align-self: start; margin: 0.2rem 0 0; font-size: 1.05rem; }
  .work-card.wide .work-points { grid-column: 2; margin: 0 0 1.4rem; }
}
.work-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sub);
  margin: 0 0 1rem;
}
.work-card.feature .work-tag { color: rgba(244, 247, 242, 0.7); }
.work-card h3 {
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.012em;
  line-height: 1.12;
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  margin: 0 0 0.7rem;
}
.work-card.feature h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 0.96;
  color: #fff;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
}
.work-lede {
  font-size: 1.02rem;
  color: var(--sub);
  margin: 0 0 1.2rem;
  max-width: 54ch;
}
.work-card.feature .work-lede { color: rgba(244, 247, 242, 0.9); font-size: 1.1rem; }
.work-points {
  list-style: none;
  margin: 0 0 1.4rem;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}
.work-points li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink);
  max-width: 62ch;
}
.work-card.feature .work-points li { max-width: 72ch; }
.work-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-strong);
}
.work-card.feature .work-points li { color: rgba(244, 247, 242, 0.92); }
.work-card.feature .work-points li::before { background: rgba(244, 247, 242, 0.7); }
.work-card strong { font-weight: 700; }
.work-card.feature strong { color: #fff; }
.work-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.3rem;
  margin-top: auto;
  padding-top: 0.4rem;
}
.work-card.feature .text-link { color: #fff; text-decoration-color: rgba(255,255,255,0.5); }

.more-kicker { margin-top: clamp(3rem, 6vw, 4.5rem); }
.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.mini-card {
  display: block;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 1.3rem 1.4rem;
  color: inherit;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.mini-card:hover { border-color: var(--accent); background: var(--card); text-decoration: none; }
.mini-card h4 {
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 1.12rem;
  margin: 0 0 0.4rem;
  color: var(--ink);
}
.mini-card p { font-size: 0.9rem; color: var(--sub); margin: 0; }

@media (max-width: 780px) {
  .work-grid, .mini-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Case studies — Instagram carousels
   ============================================================ */
.case { margin-top: 3.2rem; }
.case:first-of-type { margin-top: 0; }
.case-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}
.case-head h3 {
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: clamp(1.3rem, 2.4vw, 1.6rem);
  margin: 0;
}
.case-sub { font-size: 0.95rem; color: var(--sub); margin: 0.25rem 0 0; max-width: 44ch; }
@media (max-width: 640px) {
  .case-head { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .carousel-slide { flex-basis: 87%; }
  .carousel-viewport { gap: 0.75rem; }
}

.carousel {
  position: relative;
  background: #efece2;
  border: 1px solid var(--hairline-2);
  border-radius: var(--r-lg);
  padding: clamp(0.85rem, 2vw, 1.25rem);
}
.carousel-tag {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sub);
  margin: 0 0 0.75rem;
}
.carousel-viewport {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.9rem;
  scrollbar-width: none;
  cursor: grab;
}
.carousel-viewport::-webkit-scrollbar { display: none; }
.carousel-viewport.dragging { cursor: grabbing; scroll-behavior: auto; }
.carousel-slide {
  flex: 0 0 min(300px, 74%);
  scroll-snap-align: center;
  scroll-snap-stop: always;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--card);
  aspect-ratio: 4 / 5;
  cursor: zoom-in;
}
.carousel-viewport.dragging .carousel-slide { cursor: grabbing; }
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
}
.carousel-ui {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}
.carousel-dots {
  display: flex;
  gap: 0.4rem;
  flex: 1;
  flex-wrap: nowrap;
  overflow: hidden;
}
@media (max-width: 430px) { .carousel-dots { display: none; } }
.carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: var(--hairline-2);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.carousel-dot.active { background: var(--accent); transform: scale(1.35); }
.carousel-count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--sub);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.carousel-nav { display: flex; gap: 0.4rem; }
.carousel-arrow {
  width: 2.1rem;
  height: 2.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hairline-2);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.95rem;
  transition: border-color 0.18s ease, color 0.18s ease;
}
.carousel-arrow:hover { border-color: var(--accent); color: var(--accent); }
.carousel-arrow[disabled] { opacity: 0.35; cursor: default; }

/* ---------- full-screen lightbox ---------- */
body.lightbox-open { overflow: hidden; }
.lightbox[hidden] { display: none; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  background: rgba(10, 12, 10, 0.5);
  opacity: 0;
  transition: opacity 0.22s ease, background 0.22s ease;
}
.lightbox.open { opacity: 1; background: rgba(10, 12, 10, 0.985); }
.lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  flex-shrink: 0;
}
.lightbox-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}
.lightbox-close {
  width: 2.4rem;
  height: 2.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.5); }
.lightbox-track {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
}
.lightbox-track::-webkit-scrollbar { display: none; }
.lightbox-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 clamp(0.5rem, 4vw, 4rem) clamp(1.5rem, 5vh, 3.5rem);
}
.lightbox-slide img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  -webkit-user-drag: none;
}
.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.lightbox-arrow:hover { background: rgba(255, 255, 255, 0.2); }
.lightbox-arrow.prev { left: clamp(0.5rem, 2vw, 1.5rem); }
.lightbox-arrow.next { right: clamp(0.5rem, 2vw, 1.5rem); }
.lightbox-arrow[disabled] { opacity: 0.25; cursor: default; }
.lightbox-count {
  position: absolute;
  bottom: clamp(0.75rem, 3vh, 1.5rem);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.8);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 640px) {
  .lightbox-arrow { display: none; }
  .lightbox-slide { padding-left: 0; padding-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .lightbox { transition: none; }
  .lightbox-track { scroll-behavior: auto; }
}

/* ============================================================
   Demo
   ============================================================ */
.demo-card {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 2.8rem);
  align-items: start;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: clamp(1.6rem, 4vw, 2.6rem);
}
.demo-pad { display: grid; gap: 0.9rem; }
#digit-pad {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  cursor: crosshair;
  touch-action: none;
  width: 100%;
  max-width: 224px;
  aspect-ratio: 1;
}
.demo-padrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  max-width: 224px;
}
#digit-verdict { font-size: 0.9rem; color: var(--sub); margin: 0; }
.demo-bars { display: grid; gap: 0.4rem; align-self: center; width: 100%; max-width: 18rem; }
.digit-bar-track {
  background: #efeee7;
  border-radius: 999px;
  height: 7px;
  overflow: hidden;
}
.digit-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent-strong);
  width: 0%;
  transition: width 0.18s ease;
}
.digit-row.top .digit-bar-fill { background: var(--accent); }
.digit-row.top .digit-name { color: var(--accent); font-weight: 700; }
.demo-note {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--sub);
  border-left: 1px solid var(--hairline);
  padding-left: clamp(1rem, 3vw, 2rem);
  display: grid;
  gap: 0.8rem;
}
.demo-note .mono-label { margin-bottom: 0.1rem; }

@media (max-width: 900px) {
  .demo-card { grid-template-columns: 1fr; }
  .demo-note { border-left: 0; padding-left: 0; border-top: 1px solid var(--hairline); padding-top: 1.2rem; }
}

/* ============================================================
   Experience — timeline
   ============================================================ */
.timeline {
  position: relative;
  padding-left: 1.9rem;
  max-width: 46rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: var(--hairline-2);
}
.timeline-item { position: relative; padding-bottom: 2.6rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -1.9rem;
  top: 0.4rem;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--accent-strong);
  box-shadow: 0 0 0 4px var(--paper);
}
.timeline-item .mono-label { margin-bottom: 0.45rem; }
.timeline-item h3 {
  font-family: var(--font-sans);
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
  color: var(--ink);
  font-weight: 700;
}
.timeline-item .tl-org { color: var(--accent); font-weight: 600; }
.timeline-item p { color: var(--sub); font-size: 0.98rem; max-width: 58ch; }

/* ============================================================
   Volunteer
   ============================================================ */
.vol-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
.vol-card {
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 1.5rem 1.5rem 1.6rem;
}
.vol-card .mono-label { margin-bottom: 0.7rem; }
.vol-card h3 {
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 1.15rem;
  margin: 0 0 0.15rem;
  color: var(--ink);
}
.vol-org { font-size: 0.9rem; color: var(--accent); font-weight: 600; margin: 0 0 0.9rem; }
.vol-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.vol-card li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--sub);
}
.vol-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-strong);
}

@media (max-width: 900px) { .vol-grid { grid-template-columns: 1fr; } }

/* ============================================================
   Writing & research
   ============================================================ */
.writing-grid {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 52rem;
}
.writing-col .mono-label { margin-bottom: 1rem; }
#writing-list a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--hairline);
  color: var(--ink);
}
#writing-list a:hover { text-decoration: none; }
#writing-list a span:first-child { font-weight: 500; }
#writing-list a .mono-label { white-space: nowrap; flex-shrink: 0; }
#writing-list a:hover span:first-child { color: var(--accent); }
@media (max-width: 520px) {
  #writing-list a { flex-direction: column; gap: 0.2rem; }
}
#writing-toggle { margin-top: 1.2rem; }



/* ============================================================
   Résumé
   ============================================================ */
.resume-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.4rem;
  margin-bottom: 1.4rem;
}
.resume-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 3vw, 2rem);
}
.resume-card > .mono-label { margin-bottom: 1.2rem; }
.resume-block + .resume-block { margin-top: 1.4rem; padding-top: 1.4rem; border-top: 1px solid var(--hairline); }
.resume-h { font-weight: 600; color: var(--ink); margin: 0 0 0.3rem; font-size: 1.05rem; }
.resume-block .mono-label { margin: 0 0 0.5rem; }
.resume-block p:last-child { color: var(--sub); font-size: 0.95rem; }
.resume-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.resume-list li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 0.94rem;
  color: var(--ink);
}
.resume-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-strong);
}
.resume-lead { margin-top: 1.5rem; padding-top: 1.4rem; border-top: 1px solid var(--hairline); }
.resume-card > p:last-child { color: var(--sub); font-size: 0.95rem; }

.skills {
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: clamp(1.6rem, 3.5vw, 2.4rem);
}
.skills > .mono-label { margin-bottom: 1.4rem; }
.skills-list { margin: 0; display: grid; gap: 1.1rem; }
.skills-list div {
  display: grid;
  grid-template-columns: 12rem 1fr;
  gap: 1.2rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--hairline);
}
.skills-list div:last-child { border-bottom: 0; padding-bottom: 0; }
.skills-list dt {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 0.15rem;
}
.skills-list dd { margin: 0; font-size: 0.95rem; color: var(--ink); line-height: 1.55; max-width: 70ch; }

.resume-dl { margin-top: 1.8rem; }

@media (max-width: 780px) {
  .resume-grid { grid-template-columns: 1fr; }
  .skills-list div { grid-template-columns: 1fr; gap: 0.35rem; }
}

/* ============================================================
   Contact
   ============================================================ */
.contact-h { font-size: clamp(2.6rem, 7vw, 4.6rem); }
.contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.6rem;
  margin-bottom: 2rem;
}
.contact-mail {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--ink);
}
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  font-weight: 500;
}
.contact-links a { color: var(--sub); }
.contact-links a:hover { color: var(--accent); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--hairline);
  overflow: hidden;
}
.footer-wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.5rem, 17vw, 13rem);
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1px var(--hairline-2);
  text-align: center;
  margin: clamp(1.5rem, 4vw, 3rem) 0 -0.12em;
  letter-spacing: 0.01em;
  user-select: none;
}
.footer-row {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.6rem var(--gutter) 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem;
}

/* ============================================================
   Command palette
   ============================================================ */
#palette-dialog {
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 0;
  width: min(560px, 92vw);
  background: var(--card);
  box-shadow: var(--shadow-lg);
}
#palette-dialog::backdrop {
  background: rgba(24, 23, 18, 0.28);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.palette-item[aria-selected="true"] {
  background: var(--accent-soft);
  color: var(--accent);
}

/* ============================================================
   Skeleton shimmer (blog list only)
   ============================================================ */
.skeleton {
  border-radius: var(--r-md);
  background: linear-gradient(110deg, #f1f0ea 30%, #e9e8e1 50%, #f1f0ea 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.preserve-lines { white-space: pre-line; }
.rich-text strong, .preserve-lines strong { font-weight: 700; color: var(--ink); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #dad7cc; border-radius: 999px; border: 2px solid var(--paper); background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #c5c2b6; }

/* ============================================================
   Edge decoration — quiet gutter rails on wide screens
   ============================================================ */
.edge-deco { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.edge-deco::before { content: none; }
.edge-rail { position: fixed; top: 0; bottom: 0; width: 13px; }
.edge-rail-left  { left:  calc(50% - 620px); }
.edge-rail-right { right: calc(50% - 620px); }
.edge-rail::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--hairline) 18%, var(--hairline) 82%, transparent);
  opacity: 0.7;
}
.edge-rail-left::before  { left: 0; }
.edge-rail-right::before { right: 0; }
.edge-rail::after { content: none; }
.edge-label { display: none; }
@media (max-width: 1340px) { .edge-deco { display: none; } }

/* ============================================================
   MLESA art — the SVG parts, shared by the hide-and-seek game
   (js/mlesa-seek.js, js/mlesa-intro.js). No behaviour here; the
   game's own layout/animation lives in css/mlesa-seek.css.
   ============================================================ */
.pip-shadow { fill: rgba(28, 28, 26, 0.12); }
.pip-head   { fill: #ffffff; stroke: var(--accent-strong); stroke-width: 3; }
.pip-face   { fill: var(--accent-soft); }
.pip-eye    { fill: var(--ink); transform-box: fill-box; transform-origin: center; }
.pip-sclera { fill: #ffffff; stroke: var(--accent-strong); stroke-width: 1.1; }
.pip-pupil  { fill: var(--ink); }
.pip-smile  { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.pip-cheek  { fill: rgba(46, 107, 79, 0.22); }
.pip-leg    { fill: var(--accent-strong); }
.pip-antenna line   { stroke: var(--accent-strong); stroke-width: 3; stroke-linecap: round; }
.pip-antenna circle { fill: var(--accent); }

.pip-eye { animation: pip-blink 5s infinite; }
@keyframes pip-blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95%           { transform: scaleY(0.12); }
}
.pip-antenna { transform-box: fill-box; transform-origin: bottom center; animation: pip-sway 4s ease-in-out infinite; }
@keyframes pip-sway {
  0%, 100% { transform: rotate(-6deg); }
  50%      { transform: rotate(6deg); }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .carousel-viewport { scroll-behavior: auto; }
}
