/* ============================================
   Will Soprano - Personal Website
   Design System & Styles
   ============================================ */

/* Fonts loaded via <link> in head.php — not @import — to avoid render-blocking chain */

/* --- CSS Custom Properties --- */
:root {
  --bg: #0c0a12;
  --surface: #16121f;
  --primary: #00e88f;
  --secondary: #8b5cf6;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --border: #231c30;
  --font-heading: 'Inter', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --max-width: 1200px;
  --nav-height: 72px;
  --radius: 8px;
  --radius-lg: 16px;
  --transition: 0.3s ease;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.4s var(--ease-out-expo);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* --- Texture & Edge ---
   Noise overlay + tattoo-style SVG line art for grit */

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* Tattoo line art — Will's actual tattoo outlines as page backgrounds.
   Each page gets 1-2 large-scale tattoos positioned as if the page itself is inked. */
body::after {
  content: '';
  position: fixed;
  pointer-events: none;
  z-index: 0;
  opacity: 0.04;
  background-repeat: no-repeat;
}

/* --- Per-page tattoo assignments --- */

/* Home — heart with tree, bottom-right */
.page-home::after {
  bottom: -10%;
  right: -8%;
  width: 70vw;
  height: 90vh;
  background-image: url('/images/tattoos/heart-tree.svg');
  background-size: contain;
  background-position: bottom right;
}

/* About — crying eye, center-right */
.page-about::after {
  top: 15%;
  right: -5%;
  width: 55vw;
  height: 75vh;
  background-image: url('/images/tattoos/eye.svg');
  background-size: contain;
  background-position: center right;
}

/* Accomplishments — grapes with roses, bottom-left */
.page-accomplishments::after {
  bottom: -5%;
  left: -8%;
  width: 60vw;
  height: 80vh;
  background-image: url('/images/tattoos/grapes.svg');
  background-size: contain;
  background-position: bottom left;
}

/* Giving Back — grapes with roses, bottom-left */
.page-giving-back::after {
  bottom: -5%;
  left: -8%;
  width: 60vw;
  height: 80vh;
  background-image: url('/images/tattoos/grapes.svg');
  background-size: contain;
  background-position: bottom left;
}

/* Olimar — Sicilian sun, center-right */
.page-olimar::after {
  top: 15%;
  right: -5%;
  width: 55vw;
  height: 75vh;
  background-image: url('/images/tattoos/sun.svg');
  background-size: contain;
  background-position: center right;
}

/* Gallery — no tattoo background, keep it clean */

/* Short Stories — eye, top-left */
.page-short-stories::after {
  top: 10%;
  left: -5%;
  width: 50vw;
  height: 70vh;
  background-image: url('/images/tattoos/eye.svg');
  background-size: contain;
  background-position: center left;
}

/* All real content above the texture layers */
.nav,
main,
.hero,
.section,
.breadcrumb,
.page-header,
.footer,
.section--alt {
  position: relative;
  z-index: 1;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: #33edaa;
  text-decoration: underline;
}

ul, ol {
  list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1.25rem;
  color: var(--text-muted);
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section--alt {
  background-color: var(--surface);
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(12, 10, 18, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav__logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav__logo:hover {
  color: var(--primary);
  text-decoration: none;
}

.nav__logo span {
  color: var(--primary);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__links > a,
.nav__links > .nav__dropdown > .nav__dropdown-toggle {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition);
  position: relative;
}

.nav__links > a:hover,
.nav__links > a.active {
  color: var(--primary);
  text-decoration: none;
}

.nav__links > a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}

/* --- Nav Dropdown (Explore) --- */
.nav__dropdown {
  position: relative;
}

.nav__dropdown-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: color var(--transition);
}

.nav__dropdown-toggle:hover {
  color: var(--text);
}

.nav__dropdown-arrow {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform 0.2s;
}

.nav__dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 160px;
  padding: 0.5rem 0;
  padding-top: calc(0.5rem + 8px);
  z-index: 50;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  flex-direction: column;
}

.nav__dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}

.nav__dropdown-menu a:hover {
  color: var(--primary);
}

.nav__dropdown-menu a.active {
  color: var(--primary);
}

/* Desktop-only hover — prevents touch devices from triggering dropdown on first tap */
@media (hover: hover) {
  .nav__dropdown:hover .nav__dropdown-menu {
    display: flex;
    flex-direction: column;
  }

  .nav__dropdown:hover .nav__dropdown-arrow {
    transform: rotate(180deg);
  }
}

/* Back button — hidden everywhere, shown only in mobile drill-down */
.nav__dropdown-back {
  display: none;
}

/* Hamburger */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav__toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav__toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav__toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Close button — hidden on desktop, shown in mobile nav */
.nav__close {
  display: none;
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  width: 36px;
  height: 36px;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  transition: border-color var(--transition);
}

.nav__close:hover {
  border-color: var(--primary);
}

.nav__close::before,
.nav__close::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 1.5px;
  background: var(--text);
  border-radius: 1px;
}

.nav__close::before {
  transform: rotate(45deg);
}

.nav__close::after {
  transform: rotate(-45deg);
}

/* Calendar CTA in mobile nav — hidden on desktop */
.nav__book {
  display: none;
  margin-top: auto;
  width: 100%;
  padding-top: 1.5rem;
}

.nav__book a {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.625rem 0;
  transition: color var(--transition);
  border-bottom: none !important;
}

.nav__book a:hover {
  color: var(--text);
}

.nav__book-icon {
  width: 24px;
  height: 24px;
  position: relative;
  flex-shrink: 0;
}

.nav__book-icon::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 0;
  width: 24px;
  height: 20px;
  border: 1.5px solid var(--primary);
  border-radius: 3px;
}

.nav__book-icon::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 0;
  width: 24px;
  height: 7px;
  border: 1.5px solid var(--primary);
  border-radius: 3px 3px 0 0;
  background: var(--primary);
}

/* --- Hero --- */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 232, 143, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero__split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 1;
}


.hero__tagline {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero__title {
  margin-bottom: 1.5rem;
}

.hero__subtitle {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  color: var(--text-muted);
  max-width: 640px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.hero__cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius);
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}

.btn:hover {
  text-decoration: none;
}

.btn--primary {
  background: var(--primary);
  color: var(--bg);
}

.btn--primary:hover {
  background: #33edaa;
  color: var(--bg);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 232, 143, 0.25);
}

.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

/* --- Cards --- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition);
}

.card:hover {
  border-color: rgba(0, 232, 143, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.card__icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.card__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.card__text {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 1rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.card__link::after {
  content: '\2192';
  transition: transform var(--transition);
}

.card__link:hover::after {
  transform: translateX(4px);
}

/* Card Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* --- Section Headers --- */
.section__header {
  margin-bottom: 3rem;
}

.section__label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.section__title {
  margin-bottom: 1rem;
}

.section__desc {
  max-width: 640px;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* --- Stats Row --- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin: 3rem 0;
}

.stat {
  text-align: center;
  padding: 1.5rem;
}

.stat__number {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.stat__label {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* --- Numbers Grid (tasteful alternative to stats cards) --- */
.numbers-grid {
  display: grid;
  gap: 0;
  margin: 2rem 0;
}

.number-line {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.number-line:first-child {
  border-top: 1px solid var(--border);
}

.number-line__value {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--primary);
  min-width: 100px;
  letter-spacing: -0.02em;
  font-family: var(--font-mono);
}

.number-line__label {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- Image & Video Styles --- */
.hero__image img,
.hero__image video {
  width: 100%;
  min-height: 450px;
  max-height: 600px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  display: block;
}

.story-block__image img,
.story-block__image video {
  width: 100%;
  min-height: 320px;
  max-height: 500px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  display: block;
}

.story-block__text img,
.story-block__text video {
  width: 100%;
  min-height: 300px;
  max-height: 500px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  display: block;
}

.img-pair img,
.img-pair video {
  width: 100%;
  min-height: 240px;
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  display: block;
}

.img-break img,
.img-break video {
  width: 100%;
  min-height: 300px;
  max-height: 500px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  display: block;
}

.gallery img,
.gallery video {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}

/* --- Content Styles --- */
.content {
  max-width: 800px;
}

.content p {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.content h2 {
  margin-top: 3rem;
}

.content h3 {
  margin-top: 2rem;
}

.content ul,
.content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.content ul {
  list-style: disc;
}

.content ol {
  list-style: decimal;
}

.content li {
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
  line-height: 1.7;
}

.content li::marker {
  color: var(--primary);
}

/* Highlight / Accent text */
.accent {
  color: var(--primary);
  font-weight: 600;
}

.accent--purple {
  color: var(--secondary);
}

/* --- Breadcrumb --- */
.breadcrumb {
  padding: 1rem 0;
  margin-top: var(--nav-height);
  font-size: 0.85rem;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb span {
  color: var(--text-muted);
  margin: 0 0.5rem;
}

.breadcrumb .current {
  color: var(--text);
}

/* --- Page Header with TOC --- */
.page-header {
  padding: 3rem 0 2rem;
}

.page-header h1 {
  margin-bottom: 1rem;
}

.page-header p {
  max-width: 640px;
  font-size: 1.125rem;
  color: var(--text-muted);
}

.page-header--with-toc {
  padding: 3rem 0 2rem;
}

.page-header__split {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 3rem;
}

.page-header__left {
  flex: 1;
}

.page-header__left h1 {
  margin-bottom: 1rem;
}

.page-header__left p {
  max-width: 640px;
  font-size: 1.125rem;
  color: var(--text-muted);
}

/* --- Table of Contents --- */
.toc {
  flex-shrink: 0;
  width: 260px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: sticky;
  top: calc(var(--nav-height) + 1.5rem);
}

.toc__title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
  font-weight: 600;
}

.toc__list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.toc__list a {
  display: block;
  padding: 0.5rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  border-left: 2px solid var(--border);
  padding-left: 1rem;
  transition: all var(--transition);
}

.toc__list a:hover {
  color: var(--primary);
  border-left-color: var(--primary);
  text-decoration: none;
  background: rgba(0, 232, 143, 0.03);
}

/* --- About page: header with connect split --- */
.about-header-split {
  display: flex;
  align-items: flex-start;
  gap: 3rem;
}

.about-header-split__left {
  flex: 1;
}

.about-header-split__right {
  flex-shrink: 0;
  width: 280px;
}

.connect-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.connect-box__title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
  font-weight: 600;
}

.connect-box__links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.connect-box__links a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius);
  transition: all var(--transition);
}

.connect-box__links a:hover {
  color: var(--primary);
  background: rgba(0, 232, 143, 0.05);
  text-decoration: none;
}

/* --- Social Links --- */
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
}

.social-link:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
  transform: translateY(-2px);
}

/* --- Featured Links / Writings --- */
.link-list {
  margin-top: 1.5rem;
}

.link-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.link-item:last-child {
  border-bottom: none;
}

.link-item__icon {
  color: var(--primary);
  font-size: 1.25rem;
  margin-top: 0.125rem;
  flex-shrink: 0;
}

.link-item__content {
  flex: 1;
}

.link-item__title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.link-item__title a {
  color: var(--text);
}

.link-item__title a:hover {
  color: var(--primary);
}

.link-item__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* --- Accomplishment List --- */
.achievement-list {
  margin-top: 2rem;
}

.achievement {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.achievement:last-child {
  border-bottom: none;
}

.achievement__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.achievement__desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* --- Gallery Grid (Olimar) --- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}


/* --- Organization List --- */
.org-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.org-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all var(--transition);
}

.org-card:hover {
  border-color: rgba(0, 232, 143, 0.3);
}

.org-card__name {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.org-card__desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.org-card__link {
  font-size: 0.875rem;
  font-weight: 600;
}

/* --- Story Image Layouts (Homepage) --- */
.story-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  margin: 4rem 0;
}

.story-block--reverse {
  direction: rtl;
}

.story-block--reverse > * {
  direction: ltr;
}

.story-block__text {
  max-width: 560px;
}

.story-block__text p {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}


/* Image pair — two stacked or side-by-side */
.img-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 3rem 0;
}


/* Full-width image break */
.img-break {
  margin: 4rem 0;
}


/* Inline image — floated within text */
.img-inline {
  border-radius: var(--radius-lg);
  margin: 1.5rem 0;
}

/* --- Decorative elements for edge --- */
.divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), var(--primary), var(--border), transparent);
  margin: 0;
  position: relative;
  z-index: 1;
}

.divider--thick {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--secondary), var(--primary), transparent);
  opacity: 0.4;
  margin: 0;
  position: relative;
  z-index: 1;
}

/* Pull quote for story emphasis */
.pull-quote {
  padding: 3rem 1.5rem;
  margin: 3rem 0;
  text-align: center;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.pull-quote p {
  font-size: clamp(1.375rem, 2.5vw, 1.75rem);
  font-weight: 400;
  color: var(--text);
  font-style: italic;
  margin-bottom: 0;
  line-height: 1.6;
  letter-spacing: -0.01em;
}

.pull-quote cite {
  display: block;
  margin-top: 1rem;
  font-size: 0.85rem;
  font-style: normal;
  color: var(--text-muted);
}

/* --- Footer --- */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
  align-items: start;
}

.footer__brand {
  max-width: 320px;
}

.footer__logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
  margin-bottom: 1rem;
}

.footer__logo span {
  color: var(--primary);
}

.footer__tagline {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

.footer__heading {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer__links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer__links a:hover {
  color: var(--primary);
  text-decoration: none;
}

.footer__book {
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  transition: border-color var(--transition), background var(--transition);
}

.footer__book:hover {
  background: rgba(0, 232, 143, 0.04);
  border-color: var(--text);
}

.footer__book-icon {
  width: 32px;
  height: 32px;
  position: relative;
}

/* CSS-drawn calendar icon */
.footer__book-icon::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 0;
  width: 32px;
  height: 26px;
  border: 1.5px solid var(--primary);
  border-radius: 4px;
}

.footer__book-icon::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 0;
  width: 32px;
  height: 9px;
  border: 1.5px solid var(--primary);
  border-radius: 4px 4px 0 0;
  background: var(--primary);
}

/* Calendar handle pegs */
.footer__book-peg {
  position: absolute;
  width: 2px;
  height: 8px;
  background: var(--primary);
  border-radius: 1px;
  top: 0;
}

.footer__book-peg:first-child {
  left: 8px;
}

.footer__book-peg:last-child {
  right: 8px;
}

.footer__book a {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  line-height: 1.4;
  transition: color var(--transition);
}

.footer__book:hover a {
  color: var(--text);
}

.footer__book-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.footer__bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__copyright {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer__social {
  display: flex;
  gap: 1.5rem;
}

.footer__social a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer__social a:hover {
  color: var(--primary);
  text-decoration: none;
}

/* --- Utility --- */
.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;
}

.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }

/* --- Responsive --- */

/* Tablet and below */
@media (max-width: 1024px) {
  .footer__inner {
    grid-template-columns: 1fr 1fr auto;
  }

  .footer__brand {
    grid-column: 1 / -1;
  }

  .footer__book {
    max-width: 220px;
  }

  .page-header__split {
    flex-direction: column;
    gap: 2rem;
  }

  .toc {
    width: 100%;
    position: static;
  }

  .toc__list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0;
  }

  .toc__list a {
    border-left: none;
    border-bottom: 2px solid var(--border);
    padding: 0.5rem 1rem 0.5rem 0;
  }

  .toc__list a:hover {
    border-bottom-color: var(--primary);
    border-left: none;
  }

  .hero__split {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-header-split {
    flex-direction: column;
    gap: 1.5rem;
  }

  .about-header-split__right {
    width: 100%;
  }

  .connect-box {
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
  }

  .connect-box__title {
    margin-bottom: 0.75rem;
  }

  .connect-box__links {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .connect-box__links a {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
  }

  .story-block {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .story-block--reverse {
    direction: ltr;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .nav__links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: var(--surface);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
    padding: calc(var(--nav-height) + 2rem) 2rem 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
    z-index: 999;
  }

  .nav__links.open {
    opacity: 1;
    visibility: visible;
  }

  .nav__links > a,
  .nav__links > .nav__dropdown {
    font-size: 1.5rem;
    font-weight: 600;
    width: 100%;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text);
  }

  .nav__links > a:last-of-type {
    border-bottom: none;
  }

  .nav__links > a.active {
    color: var(--primary);
  }

  .nav__links > a.active::after {
    display: none;
  }

  .nav__dropdown-toggle {
    font-size: 1.5rem !important;
    font-weight: 600;
    color: var(--text) !important;
    padding: 0;
  }

  /* Explore drill-down: hide main items, show sub-menu */
  .nav__links--explore-open > a,
  .nav__links--explore-open > .nav__dropdown > .nav__dropdown-toggle,
  .nav__links--explore-open > .nav__book {
    display: none;
  }

  .nav__dropdown-menu {
    position: static;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    min-width: 0;
    transform: none;
  }

  .nav__dropdown-menu.open {
    display: flex;
    flex-direction: column;
  }

  .nav__dropdown-back {
    display: none;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.75rem 0;
    margin-bottom: 0.5rem;
    text-align: left;
    transition: color var(--transition);
  }

  .nav__dropdown-menu.open .nav__dropdown-back {
    display: block;
  }

  .nav__dropdown-back:hover {
    color: var(--primary);
  }

  .nav__dropdown-menu a {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
  }

  .nav__dropdown-menu a:hover {
    background: transparent;
    color: var(--primary);
  }

  .nav__dropdown-menu a:last-child {
    border-bottom: none;
  }

  .nav__dropdown-menu a.active {
    color: var(--primary);
  }

  /* Close button inside mobile nav */
  .nav__close {
    display: flex;
  }

  /* Calendar CTA in mobile nav — compact */
  .nav__book {
    display: flex;
    border-top: none;
  }

  .nav__toggle {
    display: flex;
  }

  .hero {
    min-height: auto;
    padding-top: calc(var(--nav-height) + 3rem);
    padding-bottom: 3rem;
  }

  .hero__split {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .section {
    padding: 3rem 0;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer__brand {
    grid-column: 1 / -1;
  }

  .footer__book {
    grid-column: 1;
    justify-self: start;
    padding: 1.25rem 1rem;
    gap: 0.75rem;
    max-width: 200px;
  }

  .footer__book-sub {
    display: none;
  }

  .footer__bottom {
    flex-direction: column;
    text-align: left;
    align-items: flex-start;
  }

  .hero__cta {
    flex-direction: column;
  }

  .btn {
    justify-content: flex-start;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .org-list {
    grid-template-columns: 1fr;
  }

  .page-header {
    padding: 2rem 0 1rem;
  }

  .img-pair {
    grid-template-columns: 1fr;
  }

  .story-block {
    margin: 2.5rem 0;
  }

  .pull-quote {
    padding: 2rem 1rem;
  }
}

@media (max-width: 480px) {
  .stats {
    grid-template-columns: 1fr;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2rem;
  }
}

/* --- Scroll Reveal Animations --- */
.reveal-element {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s var(--ease-out-expo);
}

.reveal-element.revealed {
  opacity: 1;
  transform: none;
}

/* ============================================
   Gallery Page
   ============================================ */

/* --- Filters --- */
.gallery-filters {
  padding: 1.25rem 0;
  position: sticky;
  top: var(--nav-height);
  z-index: 10;
}

.gallery-filters__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  background: rgba(22, 18, 31, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.75rem 1.25rem;
}

.gallery-filters__group {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.gallery-filter {
  padding: 0.4rem 1rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.gallery-filter:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

.gallery-filter.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--bg);
}

.gallery-filter-select {
  padding: 0.4rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
}

.gallery-filter-select:focus {
  outline: none;
  border-color: var(--primary);
}

/* "More" dropdown for overflow categories */
.gallery-filter-more {
  position: relative;
}

.gallery-filter--more-btn {
  display: none; /* Hidden on desktop by default — shown via media query */
  align-items: center;
  gap: 0.35rem;
}

.gallery-filter--more-btn svg {
  transition: transform 0.2s ease;
}

.gallery-filter--more-btn[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.gallery-filter--more-btn.active-child {
  border-color: var(--primary);
  color: var(--primary);
}

.gallery-filter-more__menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  min-width: 160px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.375rem 0;
  z-index: 20;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.gallery-filter-more__menu.open {
  display: block;
}

.gallery-filter-more__item {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}

.gallery-filter-more__item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.gallery-filter-more__item.active {
  color: var(--primary);
}

/* Mobile: hide overflow categories, show "More" button */
@media (max-width: 768px) {
  .gallery-filters__bar {
    flex-wrap: wrap;
    gap: 0.625rem;
    padding: 0.625rem 1rem;
  }

  .gallery-filters__categories {
    width: 100%;
  }

  .gallery-filters__secondary {
    width: 100%;
    justify-content: flex-start;
  }

  .gallery-filter--overflow {
    display: none;
  }

  .gallery-filter--more-btn {
    display: inline-flex;
  }
}

/* --- Category Sections --- */
.gallery-category {
  margin-bottom: 3rem;
}

.gallery-category .section__header {
  margin-bottom: 1.5rem;
}

/* --- Instagram Grid --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.gallery-item {
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease-out-expo);
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.4s ease;
  pointer-events: none;
}

.gallery-item:hover img {
  transform: scale(1.02);
}

.gallery-item:hover::after {
  background: rgba(0, 0, 0, 0.15);
}

/* Gallery category link */
.gallery-category__link {
  text-decoration: none;
  color: inherit;
}

.gallery-category__link:hover {
  color: var(--primary);
}

/* Scroll reveal for gallery items */
.gallery-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s var(--ease-out-expo);
}

.gallery-item.revealed {
  opacity: 1;
  transform: none;
}

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
  }
}

/* --- Lightbox --- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #000;
  overflow: hidden;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.lightbox.active {
  display: block;
  animation: lb-fade-in 0.25s ease both;
}

.lightbox.closing {
  animation: lb-fade-out 0.2s ease both;
}

@keyframes lb-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes lb-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* Three-slide track */
.lb-track {
  display: flex;
  width: 300vw;
  height: 100vh;
  transform: translateX(-100vw);
  will-change: transform;
}

.lb-track.animating {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lb-slide {
  width: 100vw;
  height: 100vh;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-slide__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  will-change: transform;
}

.lb-slide img {
  max-width: 100vw;
  max-height: 100vh;
  object-fit: contain;
  -webkit-user-drag: none;
  will-change: transform;
}

/* Top bar with gradient scrim */
.lb-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.lb-topbar--visible {
  opacity: 1;
  pointer-events: auto;
}

.lb-counter {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.lb-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.lb-close:hover {
  color: #fff;
}

/* Arrow buttons — desktop only */
.lb-arrow {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 12px;
  z-index: 10;
  transition: color 0.2s;
}

.lb-arrow:hover {
  color: rgba(255, 255, 255, 0.9);
}

.lb-arrow--prev { left: 0.75rem; }
.lb-arrow--next { right: 0.75rem; }

@media (pointer: fine) {
  .lb-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Bottom caption bar */
.lb-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 1.5rem 1.25rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.lb-caption--visible {
  opacity: 1;
}

.lb-caption__text {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9375rem;
  text-align: center;
}

.lb-caption__date {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8125rem;
}

/* ============================================
   Short Stories Page
   ============================================ */

/* --- Scatter Visual (auto-scrolling tiles) --- */
.scatter {
  overflow: hidden;
  padding: 3rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.scatter__row {
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.scatter__track {
  display: flex;
  gap: 0.75rem;
  width: max-content;
  will-change: transform;
}

.scatter__row--left .scatter__track {
  animation: scatterLeft 40s linear infinite;
}

.scatter__row--right .scatter__track {
  animation: scatterRight 45s linear infinite;
}

.scatter__row:hover .scatter__track {
  animation-play-state: paused;
}

@keyframes scatterLeft {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes scatterRight {
  0%   { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

.scatter__tile {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 220px;
  max-width: 280px;
  text-decoration: none;
  border-left: 3px solid var(--border);
  transition: border-color var(--transition), transform var(--transition), background var(--transition);
  cursor: pointer;
}

.scatter__tile:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none;
}

/* Type-colored left accent */
.scatter__tile--person  { border-left-color: #00e88f; }
.scatter__tile--moment  { border-left-color: #8b5cf6; }
.scatter__tile--memory  { border-left-color: #f59e0b; }
.scatter__tile--place   { border-left-color: #3b82f6; }
.scatter__tile--other   { border-left-color: #94a3b8; }

.scatter__tile:hover.scatter__tile--person  { border-color: #00e88f; border-left-color: #00e88f; }
.scatter__tile:hover.scatter__tile--moment  { border-color: #8b5cf6; border-left-color: #8b5cf6; }
.scatter__tile:hover.scatter__tile--memory  { border-color: #f59e0b; border-left-color: #f59e0b; }
.scatter__tile:hover.scatter__tile--place   { border-color: #3b82f6; border-left-color: #3b82f6; }
.scatter__tile:hover.scatter__tile--other   { border-color: #94a3b8; border-left-color: #94a3b8; }

.scatter__tile-type {
  font-size: 0.5625rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--text-muted);
}

.scatter__tile--person .scatter__tile-type  { color: #00e88f; }
.scatter__tile--moment .scatter__tile-type  { color: #8b5cf6; }
.scatter__tile--memory .scatter__tile-type  { color: #f59e0b; }
.scatter__tile--place .scatter__tile-type   { color: #3b82f6; }
.scatter__tile--other .scatter__tile-type   { color: #94a3b8; }

.scatter__tile-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.scatter__tile-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* --- Timeline --- */
.timeline {
  position: relative;
  padding: 1rem 0 2rem 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* Left vertical line */
.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

/* Each timeline item */
.timeline__item {
  position: relative;
}

/* Every 3rd card spans full width for variety */
.timeline__item--wide {
  grid-column: 1 / -1;
}

/* Colored dot on the left line */
.timeline__dot {
  position: absolute;
  left: calc(-3rem + 1px);
  top: 0.75rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2.5px solid var(--bg);
  z-index: 2;
}

.timeline__dot--person  { background: #00e88f; box-shadow: 0 0 10px rgba(0, 232, 143, 0.4); }
.timeline__dot--moment  { background: #8b5cf6; box-shadow: 0 0 10px rgba(139, 92, 246, 0.4); }
.timeline__dot--memory  { background: #f59e0b; box-shadow: 0 0 10px rgba(245, 158, 11, 0.4); }
.timeline__dot--place   { background: #3b82f6; box-shadow: 0 0 10px rgba(59, 130, 246, 0.4); }
.timeline__dot--other   { background: #94a3b8; box-shadow: 0 0 10px rgba(148, 163, 184, 0.4); }

/* Card */
.timeline__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
}

.timeline__card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.timeline__card--highlight {
  border-color: var(--primary) !important;
  box-shadow: 0 0 20px rgba(0, 232, 143, 0.15);
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

/* Scroll reveal for timeline items */
.timeline__item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s var(--ease-out-expo);
}

.timeline__item.revealed {
  opacity: 1;
  transform: none;
}

.timeline__card-img {
  width: 100%;
  height: 160px;
  overflow: hidden;
}

.timeline__card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.timeline__card:hover .timeline__card-img img {
  transform: scale(1.03);
}

.timeline__card-body {
  padding: 1.25rem;
}

.timeline__card-type {
  display: inline-block;
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}

.timeline__card-type--person  { background: rgba(0, 232, 143, 0.12); color: #00e88f; }
.timeline__card-type--moment  { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
.timeline__card-type--memory  { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.timeline__card-type--place   { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.timeline__card-type--other   { background: rgba(148, 163, 184, 0.12); color: #94a3b8; }

.timeline__card-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.375rem;
}

.timeline__card-link-title {
  color: inherit;
  text-decoration: none;
}

.timeline__card-link-title:hover {
  color: var(--accent);
}

.timeline__card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.timeline__card-link {
  display: inline-block;
  margin-top: 0.75rem;
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
}

.timeline__card-link:hover {
  text-decoration: underline;
}

/* Wide card: horizontal layout */
.timeline__item--wide .timeline__card {
  display: flex;
  max-width: 720px;
}

.timeline__item--wide .timeline__card-img {
  width: 220px;
  min-width: 220px;
  height: auto;
}

/* Mobile: single column */
@media (max-width: 768px) {
  .timeline {
    grid-template-columns: 1fr;
    padding-left: 2.5rem;
  }

  .timeline::before {
    left: 5px;
  }

  .timeline__item,
  .timeline__item--wide {
    grid-column: 1;
  }

  .timeline__dot {
    left: calc(-2.5rem + 0px);
  }

  .timeline__item--wide .timeline__card {
    flex-direction: column;
  }

  .timeline__item--wide .timeline__card-img {
    width: 100%;
    min-width: 0;
    height: 160px;
  }
}

/* --- Hero (header + CTA box) --- */
.stories-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.stories-cta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: rgba(0, 232, 143, 0.08);
  border: 1px solid rgba(0, 232, 143, 0.3);
  border-radius: var(--radius);
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--transition), border-color var(--transition);
}

.stories-cta:hover {
  background: rgba(0, 232, 143, 0.15);
  border-color: var(--primary);
  text-decoration: none;
}

.stories-cta__icon {
  font-size: 1.1rem;
}

@media (max-width: 768px) {
  .stories-hero {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* --- Submission Form --- */
.stories-form {
  max-width: 640px;
  margin: 0 auto;
  position: relative;
}

.stories-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 480px) {
  .stories-form__row {
    grid-template-columns: 1fr;
  }
}

.stories-form__field {
  margin-bottom: 1.25rem;
}

.stories-form__field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.375rem;
}

.stories-form__field .required {
  color: #ef4444;
}

.stories-form .form-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color var(--transition);
}

.stories-form .form-input:focus {
  outline: none;
  border-color: var(--primary);
}

.stories-form textarea.form-input {
  resize: vertical;
  min-height: 120px;
}

/* --- Submission Alerts --- */
.stories-alert {
  max-width: 640px;
  margin: 0 auto 2rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
}

.stories-alert--success {
  background: rgba(0, 232, 143, 0.1);
  border: 1px solid rgba(0, 232, 143, 0.3);
  color: var(--primary);
}

.stories-alert--error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

/* ============================================
   Blog Page
   ============================================ */

/* Blog — wings tattoo, top-right */
.page-blog::after {
  top: 10%;
  right: -8%;
  width: 60vw;
  height: 80vh;
  background-image: url('/images/tattoos/wings.svg');
  background-size: contain;
  background-position: center right;
}

/* --- Category Pill Filters --- */
.blog-filters {
  padding: 1.25rem 0;
  position: relative;
  z-index: 10;
}

.blog-filters__bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  background: rgba(22, 18, 31, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.75rem 1.25rem;
}

.blog-filter {
  padding: 0.4rem 1rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
}

.blog-filter:hover {
  border-color: var(--text-muted);
  color: var(--text);
  text-decoration: none;
}

.blog-filter.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--bg);
}

.blog-filter.active:hover {
  text-decoration: none;
}

/* --- Blog Homepage — Category Sections --- */
.blog-category {
  margin-bottom: 3rem;
}

.blog-category .section__header {
  margin-bottom: 1.5rem;
}

.blog-category__link {
  text-decoration: none;
  color: inherit;
}

.blog-category__link:hover {
  color: var(--primary);
}

.blog-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.blog-card {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  border-color: rgba(0, 232, 143, 0.3);
  transform: translateY(-2px);
}

.blog-card__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.625rem;
}

.blog-card__title {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.blog-card__title a {
  color: var(--text);
  text-decoration: none;
}

.blog-card:hover .blog-card__title a {
  color: var(--primary);
}

.blog-card__excerpt {
  color: var(--text-muted);
  font-size: 0.8125rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: auto;
}

/* --- Post Grid (category page) --- */
.blog-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.blog-grid-card {
  display: flex;
  align-items: flex-start;
  gap: 1.75rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.blog-grid-card:first-child {
  border-top: 1px solid var(--border);
}

.blog-grid-card__num {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--border);
  font-weight: 400;
  flex-shrink: 0;
  padding-top: 0.125rem;
  transition: color var(--transition);
}

.blog-grid-card:hover .blog-grid-card__num {
  color: var(--primary);
}

.blog-grid-card__content {
  flex: 1;
  min-width: 0;
}

.blog-grid-card__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.blog-grid-card__category {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.blog-grid-card__category:hover {
  text-decoration: underline;
}

.blog-grid-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.blog-grid-card__title a {
  color: var(--text);
  text-decoration: none;
}

.blog-grid-card:hover .blog-grid-card__title a {
  color: var(--primary);
}

.blog-grid-card__excerpt {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Single Post Layout --- */
.blog-post__header {
  margin-bottom: 2rem;
}

.blog-post__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.blog-post__meta a {
  color: var(--primary);
  font-weight: 600;
}

.blog-post__byline {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.blog-post__byline a {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.blog-post__byline a:hover {
  color: var(--primary);
}

.blog-post__meta span {
  color: var(--text-muted);
}

/* --- Summary / TL;DR (collapsible) --- */
.blog-summary {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 2rem;
  background: var(--surface);
  width: fit-content;
  max-width: 600px;
}

.blog-summary__toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.blog-summary__toggle::-webkit-details-marker {
  display: none;
}

.blog-summary__toggle::before {
  content: '+';
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-muted);
  transition: transform var(--transition);
}

.blog-summary[open] .blog-summary__toggle::before {
  content: '\2212';
}

.blog-summary__text {
  padding: 0 1.25rem 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

.blog-post__featured-image {
  margin: 2rem 0 2.5rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.blog-post__featured-image img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
}

/* Content + TOC sidebar layout */
.blog-post__layout {
  display: flex;
  gap: 4rem;
  align-items: flex-start;
  position: relative;
}

.blog-post__body {
  flex: 1;
  min-width: 0;
  margin-bottom: 3rem;
}

/* --- Table of Contents (sticky sidebar) --- */
.blog-toc {
  position: sticky;
  top: calc(var(--nav-height) + 2rem);
  flex-shrink: 0;
  width: 180px;
}

.blog-toc__label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 0.625rem;
}

.blog-toc__list {
  display: flex;
  flex-direction: column;
}

.blog-toc__link {
  display: block;
  padding: 0.25rem 0;
  padding-left: 0.75rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  border-left: 1.5px solid var(--border);
  transition: color var(--transition), border-color var(--transition);
}

.blog-toc__link:hover {
  color: var(--primary);
  border-left-color: var(--primary);
  text-decoration: none;
}

.blog-toc__link--sub {
  padding-left: 1.25rem;
  font-size: 0.6875rem;
}

.blog-toc__link.active {
  color: var(--primary);
  border-left-color: var(--primary);
}

/* --- Prev/Next Navigation --- */
.blog-post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.blog-post-nav__link {
  display: inline-flex;
  flex-direction: column;
  gap: 0.125rem;
  padding: 0.625rem 0;
  text-decoration: none;
  max-width: 45%;
}

.blog-post-nav__link:hover {
  text-decoration: none;
}

.blog-post-nav__link--prev {
  text-align: left;
}

.blog-post-nav__link--next {
  text-align: right;
  margin-left: auto;
}

.blog-post-nav__label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.blog-post-nav__title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  transition: color var(--transition);
}

.blog-post-nav__link:hover .blog-post-nav__title {
  color: var(--primary);
}

/* --- Blog Pagination --- */
.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding-top: 2.5rem;
}

.blog-pagination__info {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* --- Blog Responsive --- */
@media (max-width: 1024px) {
  .blog-toc {
    display: none;
  }

  .blog-post__layout {
    display: block;
  }

  .blog-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .blog-card-grid {
    grid-template-columns: 1fr;
  }

  .blog-grid-card {
    gap: 1rem;
  }

  .blog-grid-card__num {
    font-size: 0.6875rem;
  }

  .blog-filters__bar {
    padding: 0.625rem 1rem;
  }

  .blog-post-nav {
    flex-direction: column;
  }

  .blog-post-nav__link {
    max-width: 100%;
  }

  .blog-post-nav__link--next {
    text-align: left;
  }
}
