/* ==========================================================
   Maira Athar — shared site styles
   Graphic, color-blocked style in light blue, white & purple.
   ========================================================== */

:root {
  --bg: #f5f7ff;
  --white: #ffffff;
  --sky: #e3ecff;
  --sky-2: #cfdcff;
  --periwinkle: #9db4ff;
  --blue: #4a7dff;
  --blue-2: #2f5ee8;
  --purple: #7b5cff;
  --purple-deep: #4b2fc9;
  --lavender: #cdbfff;
  --lilac: #ede7ff;
  --ink: #1b1650;
  --muted: #5d5a8a;
  --line: rgba(27, 22, 80, .14);

  --grad: linear-gradient(150deg, var(--blue) 0%, var(--purple) 60%, var(--purple-deep) 100%);

  --font-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --font-body: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-script: "Mrs Saint Delafield", "Brush Script MT", cursive;

  --header-h: 76px;
  --gutter: clamp(20px, 5vw, 72px);
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.1; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
.spot-list { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
section[id] { scroll-margin-top: var(--header-h); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter);
  transition: background .3s, box-shadow .3s;
}
.site-header.scrolled {
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  width: 40px; height: 40px;
  background: var(--white);
  display: grid; place-items: center;
  clip-path: polygon(14% 0, 100% 0, 86% 100%, 0 100%);
  box-shadow: inset 0 0 0 2px var(--ink);
}
.brand-mark img { width: 26px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--font-display); font-size: 14px; letter-spacing: .14em; }
.brand-text small { font-size: 11px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }

.site-nav { display: flex; align-items: center; gap: clamp(16px, 2.6vw, 36px); }
.site-nav a {
  text-decoration: none; font-size: 14px; font-weight: 500; letter-spacing: .06em;
  position: relative; padding: 4px 0;
}
.site-nav a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 2px; background: var(--purple);
  transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.site-nav a:hover::after, .site-nav a.active::after { transform: scaleX(1); }

.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: var(--white) !important;
  border: 0; cursor: pointer;
  font-family: var(--font-body);
  padding: 10px 22px !important;
  text-transform: uppercase; text-decoration: none;
  font-weight: 700 !important; letter-spacing: .14em !important; font-size: 12px !important;
  transition: background .2s;
}
.nav-cta:hover { background: var(--purple); }

.nav-toggle { display: none; width: 44px; height: 44px; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; background: var(--ink); margin: 5px 0; transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-body); font-weight: 700; font-size: 14px;
  letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
  padding: 14px 26px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .2s, background .2s, color .2s, box-shadow .2s;
}
.btn:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--purple); }
.btn .arrow { transition: transform .2s; }
.btn:hover .arrow { transform: translateX(4px); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-light { background: var(--white); color: var(--ink); }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--white); }
.btn-accent { background: var(--purple); color: var(--white); margin-top: 28px; }
.btn-accent:hover { box-shadow: 6px 6px 0 var(--blue); }

/* ---------- Hero (home) ---------- */
.hero {
  position: relative;
  min-height: clamp(640px, 100vh, 1000px);
  min-height: clamp(640px, 100svh, 1000px);
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 40px) 0 80px;
  overflow: hidden;
  background:
    radial-gradient(50% 60% at 10% 90%, rgba(157,180,255,.35), transparent 70%),
    var(--white);
}
.hero-block {
  position: absolute; inset: 0 0 0 40%;
  background: var(--grad);
  clip-path: polygon(22% 0, 100% 0, 100% 100%, 0 100%);
}
.hero-block::after {
  content: ""; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='138.6' viewBox='0 0 80 138.6'%3E%3Cpath d='M0 0 80 138.6M80 0 0 138.6M0 69.3h80' stroke='%23ffffff' stroke-opacity='.12' fill='none'/%3E%3C/svg%3E");
}
.hero-inner {
  position: relative; z-index: 2;
  width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center;
}
.hero-copy { min-width: 0; }

.eyebrow { font-size: 13px; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 18px; color: var(--muted); }
.eyebrow span, .section-index span, .side-label span { color: var(--purple); font-weight: 700; }

.hero-title { display: flex; flex-direction: column; font-family: var(--font-display); }
.hero-title .script {
  font-family: var(--font-script); font-weight: 400;
  font-size: clamp(48px, 7vw, 92px);
  color: var(--purple);
  line-height: .6; margin-left: .2em;
  position: relative; z-index: 2;
}
.hero-title .solid, .hero-title .outline {
  font-weight: 900;
  font-size: clamp(60px, 10vw, 150px);
  letter-spacing: -.01em; line-height: .95;
}
.hero-title .solid { color: var(--ink); }
.hero-title .solid, .hero-title .outline, .page-title { -webkit-text-stroke: 8px var(--white); paint-order: stroke fill; }
.hero-title .outline { color: var(--blue); }

.highlight-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 28px 0 34px; }
.highlight-stack span {
  background: var(--ink); color: var(--white);
  font-weight: 700; padding: 6px 14px;
  font-size: clamp(15px, 1.5vw, 19px); letter-spacing: .02em;
}
.highlight-stack.big span { font-family: var(--font-display); font-size: clamp(22px, 3vw, 38px); padding: 10px 18px; }
.highlight-stack.big span:nth-child(2) { background: var(--purple); }
.highlight-stack.big span:nth-child(3) { background: var(--blue); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-photo { position: relative; justify-self: center; width: min(100%, 420px); }
.photo-frame {
  aspect-ratio: 4 / 5;
  clip-path: polygon(16% 0, 100% 0, 84% 100%, 0 100%);
}
.hero-photo::before {
  content: ""; position: absolute; inset: 24px -24px -24px 24px;
  background: var(--white);
  clip-path: polygon(16% 0, 100% 0, 84% 100%, 0 100%);
  z-index: -1;
}
.photo-tag {
  position: absolute; left: -10px; bottom: 28px;
  background: var(--white); color: var(--ink);
  padding: 8px 16px; font-size: 12px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  box-shadow: 4px 4px 0 var(--ink);
}

.scroll-cue {
  position: absolute; right: var(--gutter); bottom: 40px; z-index: 3;
  writing-mode: vertical-rl; color: var(--white);
  font-size: 11px; letter-spacing: .3em; text-transform: uppercase; text-decoration: none;
  display: flex; align-items: center; gap: 14px;
}
.scroll-cue::after {
  content: ""; width: 1px; height: 80px; background: var(--white);
  animation: scrollLine 2s ease-in-out infinite; transform-origin: top;
}
@keyframes scrollLine {
  0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- Page hero (sub pages) ---------- */
.page-hero {
  position: relative; overflow: hidden;
  padding: calc(var(--header-h) + clamp(48px, 8vw, 96px)) 0 clamp(56px, 8vw, 96px);
  background: var(--white);
}
.page-hero .hero-block { inset: 0 0 0 58%; }
.page-hero .container { position: relative; z-index: 2; }
.page-title {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(44px, 8vw, 112px);
  line-height: .95; letter-spacing: -.01em;
}
.page-title em { font-style: normal; color: var(--blue); }
.page-hero .script {
  display: block;
  font-family: var(--font-script);
  font-size: clamp(40px, 5.5vw, 72px);
  color: var(--purple); line-height: .7; margin: 0 0 6px .15em;
  -webkit-text-stroke: 0;
}
.page-lede { max-width: 54ch; font-size: 18px; color: var(--muted); margin-top: 26px; }

/* Sparkles */
.sparkle { position: absolute; fill: var(--white); z-index: 1; animation: twinkle 3.5s ease-in-out infinite; }
.sparkle.s1 { width: 34px; top: 18%; right: 8%; }
.sparkle.s2 { width: 18px; top: 32%; right: 44%; animation-delay: .8s; fill: var(--lavender); }
.sparkle.s3 { width: 22px; bottom: 16%; right: 12%; animation-delay: 1.6s; }
.sparkle.s4 { width: 14px; top: 14%; left: 46%; animation-delay: 2.2s; fill: var(--purple); }
.sparkle.s5 { width: 40px; top: 16%; right: 6%; }
.sparkle.s6 { width: 22px; bottom: 18%; left: 42%; fill: var(--purple); animation-delay: 1.2s; }
@keyframes twinkle {
  0%, 100% { transform: scale(1) rotate(0); opacity: 1; }
  50% { transform: scale(.55) rotate(45deg); opacity: .5; }
}

/* ---------- Image placeholders ---------- */
.ph {
  position: relative; overflow: hidden;
  background:
    repeating-linear-gradient(135deg, rgba(27,22,80,.06) 0 12px, transparent 12px 24px),
    var(--sky);
}
.ph::after {
  content: attr(data-label);
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 12px; letter-spacing: .1em; color: var(--muted);
  text-align: center; padding: 12px;
}
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }

/* ---------- Sections ---------- */
.section { position: relative; padding: clamp(80px, 11vw, 140px) 0; }
.section-grid {
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='138.6' viewBox='0 0 80 138.6'%3E%3Cpath d='M0 0 80 138.6M80 0 0 138.6M0 69.3h80' stroke='%231b1650' stroke-opacity='.06' fill='none'/%3E%3C/svg%3E");
}
.section-white { background: var(--white); }
.section-sky { background: linear-gradient(180deg, var(--sky), var(--lilac)); }
.section-deep { background: var(--grad); color: var(--white); }
.section-deep .section-head { border-color: rgba(255,255,255,.3); }
.section-deep .section-index { border-color: var(--white); }
.section-deep .section-index span { color: var(--lavender); }
.section-deep .display small { color: var(--lilac); }

.side-label {
  position: absolute; left: 22px; top: clamp(80px, 11vw, 140px);
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-size: 11px; letter-spacing: .25em; text-transform: uppercase; opacity: .6;
}

.section-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap;
  padding-bottom: 28px; margin-bottom: 48px;
  border-bottom: 1px solid var(--line);
}
.display {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(30px, 7.5vw, 84px);
  letter-spacing: .04em; overflow-wrap: anywhere;
}
.display small {
  display: block; font-family: var(--font-body);
  font-size: 14px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase;
  margin-top: 12px; color: var(--muted);
}
.section-index {
  font-size: 14px; padding-top: 14px;
  border-top: 2px solid var(--ink);
  min-width: 220px; margin-left: auto; text-align: right;
}
.hazard {
  width: 64px; height: 8px; margin: -24px 0 48px;
  background: repeating-linear-gradient(-45deg, var(--ink) 0 6px, transparent 6px 12px);
}

/* Intro */
.intro-body { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.intro-body .highlight-stack { margin: 0; }
.intro-text p { font-size: 18px; color: var(--muted); }
.quick-stats { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.quick-stats li {
  flex: 1 1 110px; background: var(--white);
  border: 2px solid var(--ink); padding: 16px 18px;
  display: flex; flex-direction: column;
  box-shadow: 5px 5px 0 var(--lavender);
}
.quick-stats strong { font-family: var(--font-display); font-size: 22px; color: var(--purple); }
.quick-stats span { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* Resume */
.resume-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 6vw, 80px); }
.col-title { font-family: var(--font-display); font-size: 16px; letter-spacing: .2em; text-transform: uppercase; color: var(--purple); margin: 0 0 24px; }
.col-title:not(:first-child) { margin-top: 44px; }

.timeline-item { position: relative; padding: 0 0 32px 32px; border-left: 2px solid var(--sky-2); }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ""; position: absolute; left: -8px; top: 4px;
  width: 14px; height: 14px; background: var(--purple); transform: rotate(45deg);
}
.t-date { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--blue-2); margin-bottom: 6px; }
.timeline-item h4, .edu-card h4 { font-family: var(--font-display); font-size: 20px; font-weight: 500; margin-bottom: 4px; }
.t-org { color: var(--muted); font-size: 15px; margin-bottom: 8px; }
.t-points { padding-left: 18px; list-style: square; }
.t-points li { margin-bottom: 6px; font-size: 15px; }
.t-points li::marker { color: var(--blue); }
.t-points strong { color: var(--purple-deep); }

.edu-card { background: var(--purple); color: var(--white); padding: 26px 28px; border-bottom: 6px solid var(--blue); }
.edu-card .t-org { color: var(--lilac); }
.edu-card p:last-child { margin: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips li {
  background: var(--white); border: 1px solid var(--periwinkle);
  padding: 6px 14px; font-size: 14px; font-weight: 500;
  transition: background .2s, color .2s;
}
.chips li:hover { background: var(--blue); border-color: var(--blue); color: var(--white); }

.certs li { padding: 10px 0 10px 26px; position: relative; border-bottom: 1px solid var(--line); }
.certs li::before {
  content: ""; position: absolute; left: 4px; top: 17px;
  width: 10px; height: 10px; background: var(--blue); transform: rotate(45deg);
}

/* Projects */
.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; align-items: start; }
.project-card {
  position: relative; color: var(--ink);
  display: flex; flex-direction: column;
  transition: transform .3s, box-shadow .3s;
}
.project-card:nth-child(even) { margin-top: 64px; }
.project-card:nth-child(odd):not(:first-child) { margin-top: -32px; }
.project-card:hover { transform: translateY(-8px); box-shadow: 0 30px 50px rgba(27,22,80,.3); }
.c-purple { background: var(--purple); color: var(--white); border-bottom: 6px solid var(--ink); }
.c-sky { background: var(--sky); border-bottom: 6px solid var(--purple); }
.c-lavender { background: var(--lavender); border-bottom: 6px solid var(--blue); }
.c-white { background: var(--white); border-bottom: 6px solid var(--blue); }

.p-num {
  position: absolute; top: 16px; left: 18px; z-index: 2;
  font-family: var(--font-display); font-size: 24px; font-weight: 700;
  color: var(--white); text-shadow: 0 2px 10px rgba(0,0,0,.35);
}
.p-num small { font-size: 12px; color: var(--lavender); margin-left: 2px; }
.p-img { aspect-ratio: 16 / 9; }
.p-body { padding: 24px 24px 28px; display: flex; flex-direction: column; flex: 1; }
.p-date { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .7; margin-bottom: 8px; }
.p-body h3 { font-family: var(--font-display); font-size: 21px; font-weight: 700; margin-bottom: 12px; }
.p-body p { font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; }
.tags li { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 4px 9px; background: rgba(27,22,80,.08); }
.c-purple .tags li { background: rgba(255,255,255,.18); }

/* Fun facts */
.fun-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(220px, auto); gap: 18px; }
.fun-tile {
  padding: 28px; position: relative;
  display: flex; flex-direction: column; justify-content: flex-end;
  transition: transform .3s;
}
.fun-tile:hover { transform: rotate(-1.2deg) scale(1.02); }
.fun-tile h3 { font-family: var(--font-display); font-size: 22px; margin-bottom: 10px; }
.fun-tile p { margin: 0; font-size: 15px; }
.f-num { position: absolute; top: 18px; right: 22px; font-family: var(--font-display); font-size: 48px; font-weight: 900; opacity: .22; line-height: 1; }
.t-photo { grid-row: span 2; padding: 0; min-height: 300px; }
.t-purple { background: var(--purple); color: var(--white); grid-column: span 2; }
.t-sky { background: var(--sky-2); }
.t-lavender { background: var(--lavender); }
.t-blue { background: var(--blue); color: var(--white); grid-column: 1 / -1; min-height: 160px; }

/* CTA */
.cta { position: relative; background: var(--lavender); padding: clamp(80px, 10vw, 130px) 0; overflow: hidden; }
.cta::before {
  content: ""; position: absolute; inset: 0 auto 0 -10%; width: 45%;
  background: var(--sky);
  clip-path: polygon(0 0, 100% 0, 70% 100%, 0 100%);
}
.cta-inner { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 40px; flex-wrap: wrap; }
.cta-title {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(42px, 7vw, 96px);
  color: var(--white); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill;
  line-height: 1;
}
.cta-list li {
  display: flex; gap: 18px; align-items: baseline;
  padding: 14px 0; border-bottom: 2px solid var(--ink);
  font-size: clamp(16px, 1.8vw, 20px); font-weight: 700;
  min-width: min(380px, 100%);
}
.cta-list span { width: 72px; flex: none; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; font-weight: 500; }
.cta-list a { text-decoration: none; overflow-wrap: anywhere; }
.cta-list a:hover { color: var(--purple-deep); }

/* Footer */
.site-footer { background: var(--ink); color: var(--white); padding: 40px 0; font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-pages { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer-inner a { text-decoration: none; opacity: .8; }
.footer-inner a:hover, .footer-inner a[aria-current="page"] { opacity: 1; color: var(--lavender); }

/* ==========================================================
   Page 2 — College Station spots
   ========================================================== */
.spots-layout { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(24px, 4vw, 48px); align-items: start; }
.map-wrap { position: sticky; top: calc(var(--header-h) + 16px); }
.map-frame {
  position: relative;
  height: clamp(420px, 72vh, 680px);
  border: 3px solid var(--ink);
  box-shadow: 10px 10px 0 var(--purple);
  background: var(--sky);
}
#map { position: absolute; inset: 0; z-index: 1; }
.leaflet-tile-pane { filter: saturate(.55) hue-rotate(8deg) brightness(1.04); }
.map-fallback { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; color: var(--muted); }
.map-caption { margin-top: 22px; font-size: 13px; color: var(--muted); }

.spot-pin {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: var(--purple); color: var(--white);
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  border: 3px solid var(--white);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 6px 16px rgba(27,22,80,.35);
  transition: background .2s, transform .2s;
}
.spot-pin span { transform: rotate(45deg); }
.spot-pin.active { background: var(--blue); transform: rotate(-45deg) scale(1.2); }
.leaflet-div-icon.pin-icon { background: none; border: 0; }
.leaflet-popup-content-wrapper { border-radius: 0 !important; box-shadow: 6px 6px 0 var(--ink) !important; border: 2px solid var(--ink); }
.leaflet-popup-content { font-family: var(--font-body); margin: 12px 16px !important; }
.leaflet-popup-content strong { font-family: var(--font-display); display: block; margin-bottom: 2px; }
.leaflet-container { font-family: var(--font-body); }

.spot-list { display: flex; flex-direction: column; gap: 30px; padding-top: 16px; }
.spot-card {
  position: relative;
  background: var(--white);
  border: 2px solid var(--ink);
  padding: 26px;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.spot-card:hover, .spot-card:focus-visible { transform: translate(-3px, -3px); box-shadow: 7px 7px 0 var(--blue); outline: none; }
.spot-card.active { background: var(--lilac); box-shadow: 7px 7px 0 var(--purple); }
.spot-card .s-num {
  position: absolute; top: -16px; left: 20px;
  background: var(--purple); color: var(--white);
  font-family: var(--font-display); font-weight: 700; font-size: 13px;
  padding: 4px 12px;
}
.spot-card h3 { font-family: var(--font-display); font-size: 22px; margin: 6px 0 2px; }
.s-kind { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--blue-2); margin-bottom: 12px; }
.spot-card p { font-size: 15.5px; margin-bottom: 14px; }
.s-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--muted); }
.s-meta a { color: var(--purple-deep); font-weight: 700; text-decoration: none; }
.s-meta a:hover { text-decoration: underline; }

/* ==========================================================
   Page 3 — Breakout
   ========================================================== */
.game-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
.game-card { background: var(--ink); padding: 14px; box-shadow: 12px 12px 0 var(--purple); }
.game-hud {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  color: var(--white); font-family: var(--font-display); font-size: 13px; letter-spacing: .1em;
  padding: 6px 6px 12px;
}
.game-hud b { color: var(--lavender); font-weight: 700; }
.game-stage { position: relative; }
#breakout { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; background: var(--bg); touch-action: none; }
.game-overlay {
  position: absolute; inset: 0;
  display: grid; place-items: center; text-align: center;
  background: rgba(27,22,80,.6); color: var(--white);
  padding: 20px;
}
.game-overlay h3 { font-family: var(--font-display); font-size: clamp(24px, 4vw, 40px); margin-bottom: 10px; }
.game-overlay p { margin-bottom: 18px; color: var(--lilac); }
.game-help { color: var(--lilac); font-size: 13px; padding: 12px 6px 2px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.game-help kbd { font-family: var(--font-body); background: rgba(255,255,255,.14); padding: 1px 7px; font-size: 12px; }

.story h2 { font-family: var(--font-display); font-size: clamp(26px, 3vw, 36px); margin-bottom: 20px; }
.story p { color: var(--muted); }

/* ==========================================================
   Page 4 — Travel gallery
   ========================================================== */
.trip-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 260px; gap: 18px;
}
.trip-card { position: relative; overflow: hidden; border: 0; padding: 0; cursor: zoom-in; text-align: left; font: inherit; color: inherit; }
.trip-card.tall { grid-row: span 2; }
.trip-card.wide { grid-column: span 2; }
.trip-card img { transition: transform .5s ease; }
.trip-card:hover img { transform: scale(1.05); }
.trip-card:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
.trip-label {
  position: absolute; left: 14px; bottom: 14px; z-index: 2;
  background: var(--white); color: var(--ink);
  padding: 8px 14px; box-shadow: 4px 4px 0 var(--purple);
}
.trip-label strong { display: block; font-family: var(--font-display); font-size: 16px; }
.trip-label small { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.trip-card:nth-child(even) .trip-label { box-shadow: 4px 4px 0 var(--blue); }
.trip-tag {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  font-family: var(--font-display); font-size: 12px; font-weight: 700;
  background: var(--ink); color: var(--white); padding: 4px 10px;
}

.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(27,22,80,.9);
  display: grid; place-items: center; align-content: center; padding: 24px;
}
.lightbox img { max-height: 80vh; max-width: min(1100px, 100%); width: auto; border: 4px solid var(--white); box-shadow: 12px 12px 0 var(--purple); }
.lightbox p { color: var(--white); font-family: var(--font-display); text-align: center; margin: 22px 0 0; }
.lightbox button {
  position: absolute; top: 18px; right: 18px;
  width: 48px; height: 48px; border: 0; cursor: pointer;
  background: var(--white); color: var(--ink); font-size: 24px; font-weight: 700;
}

.ticket-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.ticket {
  position: relative; display: grid; grid-template-columns: 1fr auto;
  background: var(--white); border: 2px solid var(--ink);
  transition: transform .2s, box-shadow .2s;
}
.ticket:hover { transform: translate(-3px, -3px); box-shadow: 7px 7px 0 var(--purple); }
.ticket-main { padding: 20px 22px; }
.ticket-route { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 900; font-size: 30px; }
.ticket-route .mode { width: 24px; height: 24px; fill: none; stroke: var(--purple); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ticket-route .to { color: var(--blue-2); }
.ticket-city { font-weight: 700; margin-top: 4px; }
.ticket-meta { display: flex; gap: 22px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.ticket-meta b { display: block; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink); }
.ticket-stub {
  width: 60px;
  border-left: 2px dashed var(--ink);
  background: var(--lavender);
  display: grid; place-items: center;
}
.ticket:nth-child(even) .ticket-stub { background: var(--sky-2); }
.ticket-stub span {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: var(--font-display); font-weight: 700; font-size: 12px; letter-spacing: .2em;
}

/* ==========================================================
   Page 5 — Favorite media
   ========================================================== */
.media-group + .media-group { margin-top: clamp(56px, 8vw, 96px); }
.media-head { display: flex; align-items: center; gap: 18px; margin-bottom: 26px; }
.plan-group + .plan-group { margin-top: 56px; }
.media-head h2, .media-head h3 { font-family: var(--font-display); font-size: clamp(24px, 3.4vw, 40px); }
.media-head .count {
  font-family: var(--font-display); font-size: 13px; font-weight: 700;
  background: var(--ink); color: var(--white); padding: 4px 12px;
}
.media-head::after { content: ""; flex: 1; height: 2px; background: var(--ink); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px; }
.media-card {
  position: relative;
  display: flex; flex-direction: column;
  border: 2px solid var(--ink);
  transition: transform .25s, box-shadow .25s;
}
.media-card:hover { transform: translate(-4px, -4px) rotate(-.6deg); box-shadow: 8px 8px 0 var(--ink); }
.m-cover { aspect-ratio: 2 / 3; border-bottom: 2px solid var(--ink); }
.m-cover img { transition: transform .5s ease; }
.media-card:hover .m-cover img { transform: scale(1.04); }
.media-card .m-num {
  position: absolute; top: 0; left: 0; z-index: 2;
  background: var(--ink); color: var(--white);
  font-family: var(--font-display); font-weight: 700; font-size: 13px;
  padding: 6px 10px;
}
.m-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.media-card .m-type { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; opacity: .75; }
.media-card h3 { font-family: var(--font-display); font-size: 20px; margin: 8px 0 8px; }
.media-card p { font-size: 14.5px; margin: 0 0 16px; }
.m-link {
  margin-top: auto; align-self: flex-start;
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none;
  border-bottom: 2px solid currentColor; padding-bottom: 2px;
}
/* whole card is clickable via the wiki link */
.m-link::after { content: ""; position: absolute; inset: 0; z-index: 3; }
.m-link:focus-visible { outline: none; }
.media-card:focus-within { box-shadow: 8px 8px 0 var(--purple); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.m-white { background: var(--white); }
.m-sky { background: var(--sky-2); }
.m-lav { background: var(--lavender); }
.m-purple { background: var(--purple); color: var(--white); }
.m-blue { background: var(--blue); color: var(--white); }
.m-ink { background: var(--ink); color: var(--white); }

/* 404 */
.notfound {
  min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center; text-align: center;
  padding: var(--header-h) var(--gutter) 60px;
  position: relative; overflow: hidden; background: var(--white);
}
.notfound .big {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(110px, 26vw, 300px); line-height: .9;
  color: var(--white);
  -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill;
  text-shadow: 10px 10px 0 var(--purple);
}
.notfound .highlight-stack { align-items: center; margin: 24px 0 34px; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.project-card.reveal.in:hover { transform: translateY(-8px); }

/* ==========================================================
   Toast: logo button that opens contact info + page links
   (built by main.js on every page)
   ========================================================== */
.contact-toast {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 100;
}
.toast-btn {
  position: relative;
  width: 64px; height: 64px;
  border: 0; padding: 0; border-radius: 50%;
  background: var(--white);
  display: grid; place-items: center;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(27,22,80,.3), 0 0 0 3px var(--purple);
  transition: box-shadow .25s, transform .25s;
}
.toast-btn:hover { box-shadow: 0 14px 34px rgba(27,22,80,.3), 0 0 0 3px var(--blue); transform: translateY(-2px); }
.toast-btn img { width: 40px; transition: transform .35s; }
.contact-toast.open .toast-btn img { transform: rotate(-10deg) scale(1.05); }
.toast-btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.toast-ping {
  position: absolute; inset: 0; border-radius: 50%;
  animation: ping 2.4s ease-out 3; pointer-events: none;
}
.contact-toast.open .toast-ping { display: none; }
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(123,92,255,.55); }
  100% { box-shadow: 0 0 0 18px rgba(123,92,255,0); }
}

.toast-card {
  position: absolute; right: 0; bottom: 80px;
  width: min(320px, calc(100vw - 40px));
  max-height: calc(100vh - 120px); overflow-y: auto;
  background: var(--white); color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 8px 8px 0 var(--purple);
  transform-origin: bottom right;
  transform: translateY(10px) scale(.85);
  opacity: 0; visibility: hidden;
  transition: transform .3s cubic-bezier(.2,.9,.3,1.2), opacity .2s, visibility 0s .3s;
}
.contact-toast.open .toast-card {
  transform: none; opacity: 1; visibility: visible;
  transition: transform .3s cubic-bezier(.2,.9,.3,1.2), opacity .2s;
}
.toast-top { background: var(--grad); color: var(--white); padding: 18px 20px 16px; }
.toast-name { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: .03em; margin: 0 0 8px; }
.toast-top a { display: flex; align-items: center; gap: 9px; font-size: 14px; text-decoration: none; line-height: 1.75; }
.toast-top a:hover { text-decoration: underline; }
.toast-top svg { width: 14px; height: 14px; flex: none; stroke: currentColor; }
.toast-nav { padding: 14px 12px 12px; }
.toast-nav-title { font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 0 8px 6px; }
.toast-nav a {
  display: grid; grid-template-columns: 34px 1fr auto; align-items: center;
  padding: 9px 8px; text-decoration: none; font-weight: 700; font-size: 15px;
  transition: background .15s;
}
.toast-nav a .n { font-family: var(--font-display); font-size: 11px; color: var(--purple); }
.toast-nav a .go { color: var(--blue); opacity: 0; transform: translateX(-4px); transition: opacity .15s, transform .15s; }
.toast-nav a:hover, .toast-nav a:focus-visible { background: var(--lilac); outline: none; }
.toast-nav a:hover .go, .toast-nav a:focus-visible .go { opacity: 1; transform: none; }
.toast-nav a[aria-current="page"] { background: var(--ink); color: var(--white); }
.toast-nav a[aria-current="page"] .n { color: var(--lavender); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero .hero-block { inset: 45% 0 0 0; clip-path: polygon(0 18%, 100% 0, 100% 100%, 0 100%); }
  .page-hero .hero-block { inset: 0 0 0 72%; }
  .hero-photo { width: min(80%, 360px); margin-top: 20px; }
  .intro-body, .resume-grid, .spots-layout, .game-layout { grid-template-columns: 1fr; }
  .map-wrap { position: static; }
  .project-card:nth-child(n) { margin-top: 0; }
  .fun-grid { grid-template-columns: 1fr 1fr; }
  .t-purple { grid-column: span 2; }
  .t-photo { grid-row: span 1; }
  .trip-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .nav-toggle { display: block; position: relative; z-index: 2; }
  .site-nav {
    position: fixed; inset: 0;
    flex-direction: column; justify-content: center; gap: 28px;
    background: var(--white);
    clip-path: circle(0 at calc(100% - 44px) 38px);
    transition: clip-path .5s ease;
  }
  .site-nav.open { clip-path: circle(150% at calc(100% - 44px) 38px); }
  .site-nav a { font-family: var(--font-display); font-size: 26px; }
  .side-label { display: none; }
  .section-index { text-align: left; min-width: 0; margin-left: 0; }
  .scroll-cue { display: none; }
  .page-hero .hero-block { display: none; }
}

@media (max-width: 560px) {
  .project-grid, .fun-grid { grid-template-columns: 1fr; }
  .t-purple { grid-column: span 1; }
  .cta::before { width: 70%; }
  .trip-grid { grid-template-columns: 1fr; grid-auto-rows: 240px; }
  .trip-card.tall { grid-row: span 1; }
  .trip-card.wide { grid-column: span 1; }
  .brand-text small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
