/* ==========================================================
   Portfolio — shared styles (desktop + mobile)
   ========================================================== */

:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --surface-2: #f4f4f5;
  --border: #e7e5e4;
  --divider: #cecac7;
  --text: #1c1917;
  --muted: #78716c;
  --accent: #e11d74;
  --accent-soft: #fde7f1;
  --verified-bg: #1d9bf0;
  --verified-tick: #ffffff;
  --heat-0: #ebedf0;
  --heat-1: #fbcfe0;
  --heat-2: #f78db8;
  --heat-3: #ec4f8f;
  --heat-4: #be185d;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .05);
  --radius: 18px;
  --font-sans: "Inter", system-ui, -apple-system, "PingFang SC", sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-script: "Dancing Script", cursive;
  --container: 780px;
}

:root[data-theme="dark"] {
  --bg: #0c0a09;
  --surface: #161412;
  --surface-2: #1f1c1a;
  --border: #2c2826;
  --divider: #49423e;
  --text: #f5f5f4;
  --muted: #a8a29e;
  --accent: #f472b6;
  --accent-soft: #3a1528;
  --verified-bg: #2aa4f4;
  --verified-tick: #ffffff;
  --heat-0: #24201e;
  --heat-1: #4a1d33;
  --heat-2: #8a2c58;
  --heat-3: #d9468a;
  --heat-4: #f9a8d4;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background .3s, color .3s;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------------- Navigation ---------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.scrolled { border-bottom-color: var(--border); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-family: var(--font-script);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}
.logo span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color .2s, background .2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); background: var(--surface-2); }

.nav-actions { display: flex; align-items: center; gap: 8px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: 500 14px/1 var(--font-sans);
  cursor: pointer;
  white-space: nowrap;
  transition: transform .15s, background .2s, border-color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn svg { width: 16px; height: 16px; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 18px; height: 18px; }

.theme-toggle,
.theme-toggle:hover {
  border: 0;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }


/* ---------------- Cards & sections ---------------- */
main { padding: 20px 0 48px; }

.card {
  position: relative;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 24px 0;
  margin-bottom: 20px;
}
.card + .card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: var(--divider);
  pointer-events: none;
}

.section-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.15;
  margin: 0 0 14px;
  letter-spacing: -.01em;
}
.section-title em { color: var(--accent); font-style: italic; }

.muted { color: var(--muted); }

/* ---------------- Halftone portrait ---------------- */
/* Sits directly on the page background — no card frame */
.portrait-card {
  display: flex;
  justify-content: center;
  padding: 76px 0 76px;
}
.portrait {
  height: 330px;
  max-width: 100%;
  aspect-ratio: 580 / 740;           /* matches the SVG viewBox */
  background: var(--text);           /* dot colour: dark in light theme, light in dark theme */
  -webkit-mask: url("../assets/portrait.svg") center / contain no-repeat;
  mask: url("../assets/portrait.svg") center / contain no-repeat;
}
/* Dark theme uses its own dot map (dot size follows brightness), so the face stays a positive image */
:root[data-theme="dark"] .portrait {
  -webkit-mask-image: url("../assets/portrait-dark.svg");
  mask-image: url("../assets/portrait-dark.svg");
}

/* ---------------- Hero ---------------- */
.name-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  column-gap: 14px;
}

.hero-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.about-text {
  margin: 10px 0 0;
  white-space: pre-line;             /* keep line breaks written in ABOUTME.md */
}

.name {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.3;
}
.verified { width: 22px; height: 22px; flex: none; }
.verified .badge { fill: var(--verified-bg); }
.verified .tick { stroke: var(--verified-tick); }

.role {
  font-size: 18px;
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
  min-height: 1.6em;
}
.role .cursor {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--accent);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.meta svg { width: 15px; height: 15px; }

.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, .6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* ---------------- Heatmaps (Winter Arc + GitHub) ---------------- */
.heat-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.heat-head .section-title { margin: 0; }
.heat-count { font-size: 14px; color: var(--muted); }
.heat-count strong { color: var(--text); font-size: 16px; }

.heat-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.heat-months {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--cell-step);
  font-size: 11px;
  color: var(--muted);
  height: 16px;
  margin-left: var(--label-w, 0px);
  width: max-content;
}
.heat-months span { white-space: nowrap; }

.heat-body { display: flex; gap: 6px; width: max-content; }
.heat-days {
  display: grid;
  grid-template-rows: repeat(7, var(--cell));
  gap: var(--gap);
  font-size: 10px;
  color: var(--muted);
  width: calc(var(--label-w, 0px) - 6px);
}
.heat-days span { line-height: var(--cell); }

.heat-grid {
  display: grid;
  grid-template-rows: repeat(7, var(--cell));
  grid-auto-flow: column;
  grid-auto-columns: var(--cell);
  gap: var(--gap);
}
.heat-grid i {
  display: block;
  width: var(--cell);
  height: var(--cell);
  border-radius: 3px;
  background: var(--heat-0);
  transition: transform .15s;
}
.heat-grid i:hover { transform: scale(1.35); }
.heat-grid i.empty { background: transparent; pointer-events: none; }
.heat-grid i.today { outline: 2px solid var(--accent); outline-offset: 1px; }
.heat-grid i[data-l="1"] { background: var(--heat-1); }
.heat-grid i[data-l="2"] { background: var(--heat-2); }
.heat-grid i[data-l="3"] { background: var(--heat-3); }
.heat-grid i[data-l="4"] { background: var(--heat-4); }

#github { --cell: 8.5px; --gap: 2.5px; --cell-step: calc(var(--cell) + var(--gap)); --label-w: 30px; }

.heat-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}
.heat-legend i { width: 11px; height: 11px; border-radius: 3px; display: block; }

.tooltip {
  position: fixed;
  z-index: 100;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  font-size: 12px;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -120%);
  transition: opacity .12s;
  white-space: nowrap;
}
.tooltip.show { opacity: 1; }

/* ---------------- Tech marquee ---------------- */
.marquee {
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee + .marquee { margin-top: 12px; }
.marquee-track {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: scroll 32s linear infinite;
}
.marquee.reverse .marquee-track { animation-direction: reverse; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes scroll { to { transform: translateX(calc(-50% - 6px)); } }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.chip img { width: 20px; height: 20px; flex: none; }
.chip .chip-glyph { width: 20px; height: 20px; flex: none; color: var(--muted); }   /* generic icons follow the theme */
:root[data-theme="dark"] .chip img.invert { filter: invert(1); }

/* ---------------- Tags ---------------- */
.tag {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
}

/* ---------------- Experience ---------------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.job {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 4px 16px;
  align-items: start;
  padding: 16px 0;
  border-top: 1px solid var(--border);
}
.job:first-child { border-top: 0; padding-top: 4px; }
.job-logo {
  grid-row: span 2;
  width: 48px; height: 48px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-weight: 700; font-size: 18px;
  color: #fff;
}
.job h3 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.35; }
.job .company { color: var(--muted); font-size: 14px; }
.job .date {
  grid-row: span 2;
  text-align: right;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.job .date b { display: block; color: var(--text); font-weight: 500; }
.job p { grid-column: 2 / -1; margin: 6px 0 0; font-size: 14px; color: var(--muted); }

/* Native scroll remains untouched; only opacity and transforms are animated. */
.reveal { opacity: 1; transform: none; }
.motion-ready .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 800ms ease, transform 900ms cubic-bezier(.22, 1, .36, 1);
  transition-delay: var(--entry-delay, 0ms);
}
.motion-ready .reveal.in { opacity: 1; transform: none; }
.motion-ready .reveal-part {
  opacity: 0;
  transform: translateY(10px);
}
.motion-ready .reveal.in .reveal-part {
  animation: part-arrive 750ms cubic-bezier(.22, 1, .36, 1) both;
  animation-delay: calc(var(--entry-delay, 0ms) + var(--part-delay, 0ms));
}
.intro-leaving .nav-inner, .intro-leaving .dock {
  animation: opening-fade 750ms cubic-bezier(.22, 1, .36, 1) both;
}
.intro-leaving main:not([hidden]) {
  animation: opening-page 750ms cubic-bezier(.22, 1, .36, 1) both;
}
.intro-leaving .reveal.in { opacity: 1; transform: none; transition: none; }
@keyframes opening-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes opening-page {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes part-arrive {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .motion-ready .reveal, .motion-ready .reveal-part { opacity: 1; transform: none; transition: none; animation: none !important; }
  .motion-ready .nav-inner, .motion-ready .dock { animation: none; }
  .marquee-track { animation: none; }
  html { scroll-behavior: auto; }
}

/* ==========================================================
   Resume page
   ========================================================== */
.resume-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.contact-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--muted); }
.contact-list li { display: inline-flex; align-items: center; gap: 6px; }
.contact-list svg { width: 15px; height: 15px; }
.contact-list a:hover { color: var(--accent); }

.r-section h2 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}
.r-item { padding: 12px 0; border-top: 1px dashed var(--border); }
.r-item:first-of-type { border-top: 0; padding-top: 0; }
.r-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.r-row h3 { margin: 0; font-size: 16px; font-weight: 600; }
.r-row .date { font-size: 13px; color: var(--muted); white-space: nowrap; }
.r-sub { font-size: 14px; color: var(--muted); margin: 2px 0 6px; }
.r-item ul { margin: 6px 0 0; padding-left: 18px; font-size: 14px; }
.r-item li { margin: 3px 0; }

.skill-grid { display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px; font-size: 14px; }
.skill-grid dt { font-weight: 600; }
.skill-grid dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }

/* ==========================================================
   Responsive — tablet & mobile
   ========================================================== */
@media (max-width: 720px), (max-width: 1024px) and (orientation: portrait) {
  body { font-size: 14.5px; }
  .container { padding: 0 16px; }

  .nav-inner { height: 58px; }
  .logo { font-size: 25px; }
  /* On phones and portrait tablets the top bar keeps only the logo + theme toggle;
     navigation moves to the floating glass dock at the bottom. */
  .nav-links, .nav-actions .talk-btn { display: none; }
  body { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

  .card { padding: 20px 0; margin-bottom: 16px; }
  .section-title { font-size: 26px; }

  .portrait-card { padding: 56px 0 56px; }
  .portrait { height: auto; width: 58%; }

  .name-row { column-gap: clamp(6px, 2.4vw, 10px); }
  .name { font-size: clamp(17px, 5.5vw, 22px); gap: 6px; }   /* shrink a little on narrow phones */
  .verified { width: 19px; height: 19px; }
  .role { font-size: clamp(12px, 3.8vw, 15px); }             /* so the longest keyword stays on the name line */
  .hero-cta .btn { flex: 1; }

  .job { grid-template-columns: 42px 1fr; gap: 2px 12px; }
  .job-logo { width: 42px; height: 42px; font-size: 16px; grid-row: span 3; }
  .job .date { grid-row: auto; grid-column: 2; text-align: left; display: flex; gap: 8px; flex-wrap: wrap; }
  .job .date b { display: inline; }
  .job p { grid-column: 2; }

  #github { --cell: 11px; }

  .resume-head { flex-direction: column; align-items: stretch; }
  .resume-head .btn { width: 100%; }
  .skill-grid { grid-template-columns: 1fr; gap: 4px; }
  .skill-grid dd { margin-bottom: 10px; }
}

@media (max-width: 1024px) and (orientation: portrait) {
  .card {
    margin-inline: clamp(16px, 3vw, 24px);
    margin-bottom: clamp(32px, 5vw, 40px);
  }
}


/* ==========================================================
   Mobile bottom dock — "Liquid Glass"
   Layers: frosted backdrop + specular rim (::before)
           + top sheen (::after) + sliding glass lens
   ========================================================== */
/* Clear glass body, specular rim and a separate sliding optical lens. */
.dock {
  --glass-tint: rgba(255, 255, 255, .025);
  --glass-rim-hi: rgba(255, 255, 255, .85);
  --glass-rim-lo: rgba(60, 64, 72, .44);
  --glass-sheen: rgba(255, 255, 255, .24);
  --lens-top: rgba(80, 85, 95, .08);
  --lens-bottom: rgba(80, 85, 95, .1);
  --dock-ink: #1c1c1e;
  --dock-ink-active: #007aff;
  --dock-padding: 6px;
  --dock-item-height: 62px;
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 60;
  display: none;
  align-items: center;
  gap: 2px;
  padding: var(--dock-padding);
  border-radius: 999px;
  transform: translate3d(-50%, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  isolation: isolate;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .12), transparent 12%, transparent 88%, rgba(255, 255, 255, .05)),
    var(--glass-tint);
  box-shadow: none;
}

.dock::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: .5px solid var(--glass-rim-lo);
  pointer-events: none;
  z-index: 2;
}

.dock::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background:
    radial-gradient(ellipse at 15% 0%, var(--glass-sheen), transparent 16%),
    radial-gradient(ellipse at 90% 100%, rgba(255, 255, 255, .1), transparent 14%);
  -webkit-backdrop-filter: blur(.65px) saturate(130%);
  backdrop-filter: blur(.65px) saturate(130%);
  pointer-events: none;
  z-index: 0;
}

.dock a {
  position: relative;
  z-index: 3;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: var(--dock-item-height);
  min-width: 72px;
  padding: 0 18px;
  border-radius: 999px;
  color: var(--dock-ink);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 700;
  -webkit-tap-highlight-color: transparent;
  transition: color .2s, transform .2s ease;
}
.dock a svg { width: 28px; height: 28px; flex: none; stroke-width: 2.3; }
.dock a span {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  transition: max-width .3s ease, opacity .2s;
}
.dock a.active { color: var(--dock-ink-active); }
.dock a.active { cursor: grab; }
.dock.is-dragging, .dock.is-dragging a { cursor: grabbing; }
.dock.is-dragging a, .dock.is-dragging a:active { transform: none; }
.dock.is-dragging a.active { color: var(--dock-ink); }
.dock.is-dragging a.drag-target { color: var(--dock-ink-active); }
.dock.is-dragging .dock-lens { transition: none; }
.dock a.active span { max-width: 80px; opacity: 1; }
.dock a:active { transform: scale(.96); }
.dock a:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }

.dock-lens {
  position: absolute;
  z-index: 1;
  top: var(--dock-padding);
  left: 0;
  height: var(--dock-item-height);
  width: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--lens-top), var(--lens-bottom));
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  backdrop-filter: blur(8px) saturate(140%);
  box-shadow: inset 0 1px .5px rgba(255, 255, 255, .18);
  pointer-events: none;
}
.dock-lens.ready {
  transition: transform .4s cubic-bezier(.22, 1, .36, 1), width .4s cubic-bezier(.22, 1, .36, 1);
}

:root[data-theme="dark"] .dock {
  --glass-tint: rgba(28, 28, 32, .1);
  --glass-rim-hi: rgba(255, 255, 255, .42);
  --glass-rim-lo: rgba(255, 255, 255, .34);
  --glass-sheen: rgba(255, 255, 255, .08);
  --lens-top: rgba(255, 255, 255, .09);
  --lens-bottom: rgba(255, 255, 255, .12);
  --dock-ink: rgba(255, 255, 255, .9);
  --dock-ink-active: #5aabff;
  box-shadow: none;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .dock { --glass-tint: rgba(255, 255, 255, .9); }
  :root[data-theme="dark"] .dock { --glass-tint: rgba(28, 28, 32, .94); }
}
@media (prefers-reduced-motion: reduce) {
  .dock a, .dock a span, .dock-lens.ready { transition: none; }
}

@media (max-width: 720px), (max-width: 1024px) and (orientation: portrait) {
  html, body { overscroll-behavior-y: none; }
  .dock { display: flex; }
}

@media (max-width: 1024px) and (orientation: portrait) {
  .dock {
    --dock-padding: clamp(4px, 1.2vw, 6px);
    --dock-item-height: clamp(44px, 11.5vw, 56px);
    width: 58%;
    max-width: 288px;
    bottom: calc(10px + env(safe-area-inset-bottom));
  }
  .dock a {
    flex: 1;
    min-width: 0;
    padding-inline: clamp(6px, 2vw, 12px);
    font-size: clamp(9px, 2.5vw, 11px);
    gap: 2px;
  }
  .dock a svg {
    width: clamp(23px, 6vw, 28px);
    height: clamp(23px, 6vw, 28px);
  }
  .dock a span { max-width: 80px; opacity: 1; }
}

/* ---------------- Print (resume) ---------------- */
@media print {
  .nav, .dock, .no-print { display: none !important; }
  body { background: #fff; color: #000; font-size: 12px; }
  .card { box-shadow: none; border: 0; padding: 0 0 12px; margin: 0; scale: 1 !important; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; animation: none !important; }
  .motion-ready .reveal-part { opacity: 1 !important; transform: none !important; transition: none !important; animation: none !important; }
}

/* White opening screen, shown only for a full document load. */
.site-intro { display: none; }
.intro-pending .site-intro {
  display: grid;
  place-items: center;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #fff;
  color: #171717;
  opacity: 1;
  transition: opacity 550ms cubic-bezier(.4, 0, .2, 1);
}
.site-intro span {
  display: block;
  white-space: nowrap;
  font: 700 clamp(40px, 7vw, 56px)/1.4 "Dancing Script", cursive;
  clip-path: inset(0 100% 0 0);
  opacity: 1;
}
.intro-writing .site-intro span {
  animation: intro-write 650ms cubic-bezier(.25, .1, .25, 1) both;
}
.intro-finishing .site-intro span {
  clip-path: inset(0);
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity 220ms ease, transform 300ms ease;
  animation: none;
}
.intro-pending.intro-leaving .site-intro { opacity: 0; pointer-events: none; }
.intro-pending { overflow: hidden; }
.intro-pending:not(.intro-leaving) .nav,
.intro-pending:not(.intro-leaving) main,
.intro-pending:not(.intro-leaving) .dock { visibility: hidden; }
main[hidden] { display: none !important; }
.page-status {
  position: fixed; left: 50%; top: 90px; transform: translateX(-50%);
  z-index: 100; padding: 10px 16px; background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 12px; font-size: 13px;
}
@keyframes intro-write {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0); }
}
@media (prefers-reduced-motion: reduce) {
  .intro-pending .site-intro { display: none; }
  .intro-pending { overflow: auto; }
  .intro-pending .nav, .intro-pending main, .intro-pending .dock { visibility: visible; }
  .intro-leaving main, .intro-leaving .nav-inner, .intro-leaving .dock { animation: none; }
}
@media print { .site-intro, .page-status { display: none !important; } }
