/* ============================================
   GREG BARBER — Personal Site Design System
   Neumorphism + Retrofuturism + Bold Typography
   Mobile-first | Palette: Sage, Blush, Charcoal
   ============================================ */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@300;400;500&display=swap');

/* --- CSS Custom Properties --- */
:root {
  /* Palette */
  --sage:        #5F7666;
  --sage-light:  #9FB7A6;
  --sage-mist:   #DDE6DF;
  --white:       #FFFDFC;
  --blush:       #E7C7D1;
  --charcoal:    #1F2421;

  /* Functional Colors */
  --bg:          #FBFAF8;
  --bg-alt:      #F2F2EF;
  --text:        var(--charcoal);
  --text-muted:  #5A6560;
  --text-light:  #8E9690;
  --accent:      var(--sage);
  --accent-soft: var(--sage-light);
  --highlight:   var(--blush);
  --surface:     var(--white);
  --border:      #EAE8E4;

  /* Modern Shadows (lighter, more contemporary) */
  --neu-light:   rgba(255, 255, 255, 0.9);
  --neu-dark:    rgba(31, 36, 33, 0.06);
  --neu-dark-md: rgba(31, 36, 33, 0.10);
  --neu-raised:  0 4px 12px rgba(31, 36, 33, 0.05), 0 1px 2px rgba(31, 36, 33, 0.04);
  --neu-raised-sm: 0 2px 6px rgba(31, 36, 33, 0.04), 0 1px 2px rgba(31, 36, 33, 0.03);
  --neu-raised-lg: 0 12px 32px rgba(31, 36, 33, 0.08), 0 2px 6px rgba(31, 36, 33, 0.04);
  --neu-inset:   inset 0 2px 4px rgba(31, 36, 33, 0.05);
  --neu-flat:    0 1px 3px rgba(31, 36, 33, 0.06);

  /* Typography */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Sizing */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  /* Radius */
  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  28px;
  --radius-full: 50%;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition: 0.3s var(--ease-out);
  --transition-slow: 0.6s var(--ease-out);

  /* Layout */
  --container: min(92vw, 1200px);
  --container-narrow: min(92vw, 800px);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection {
  background: var(--blush);
  color: var(--charcoal);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

h1 { font-size: clamp(2.5rem, 7.5vw, 4.8rem); font-weight: 700; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.9rem, 5vw, 3rem); letter-spacing: -0.03em; }
h3 { font-size: clamp(1.3rem, 3.5vw, 1.75rem); }
h4 { font-size: clamp(1.05rem, 2.5vw, 1.25rem); }

p { max-width: 65ch; }

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

/* Monospace labels — the retrofuturist touch */
.label-mono {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.label-mono::before {
  content: '// ';
  opacity: 0.4;
}

/* Section index numbers */
.section-index {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--accent-soft);
  display: block;
  margin-bottom: var(--space-sm);
}

/* --- Layout --- */
.container { width: var(--container); margin: 0 auto; }
.container-narrow { width: var(--container-narrow); margin: 0 auto; }

.section {
  padding: var(--space-3xl) 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-dark {
  background: var(--charcoal);
  color: var(--white);
}

.section-dark .text-muted,
.section-dark .label-mono { color: var(--sage-light); }
.section-dark .section-index { color: var(--sage); }

/* Grid */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* --- Neumorphic Components --- */
.neu-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--neu-raised);
  padding: var(--space-xl);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

.neu-card:hover {
  box-shadow: var(--neu-raised-lg);
  transform: translateY(-2px);
  border-color: var(--sage-light);
}

.neu-card-flat {
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: var(--space-lg);
}

.neu-inset {
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: var(--space-lg);
}

.neu-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 0.4rem 0.95rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: var(--transition);
}

.neu-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--charcoal);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent);
  color: var(--white);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 0.6rem 1rem;
}

.btn-ghost:hover {
  color: var(--accent);
  background: var(--bg-alt);
}

.btn-blush {
  background: var(--blush);
  color: var(--charcoal);
}

.btn-blush:hover {
  background: #d4a8b7;
  transform: translateY(-1px);
}

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.btn-icon:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.btn-icon svg {
  width: 20px;
  height: 20px;
}

/* --- Navigation --- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-md) 0;
  transition: var(--transition);
}

.site-nav.scrolled {
  background: rgba(251, 250, 248, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.03em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav-logo-mark {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
  transition: var(--transition);
}

.nav-logo-mark svg {
  width: 100%;
  height: 100%;
}

.nav-logo:hover .nav-logo-mark {
  transform: rotate(-8deg);
  color: var(--charcoal);
}

/* Desktop nav links */
.nav-links {
  display: none;
  align-items: center;
  gap: var(--space-xs);
}

.nav-links a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  background: var(--bg-alt);
}

/* Mobile menu toggle */
.nav-toggle {
  width: 44px;
  height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
  transform-origin: center;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-2xl);
  transform: translateX(100%);
  transition: transform 0.5s var(--ease-out);
}

.mobile-menu.open {
  transform: translateX(0);
}

.mobile-menu a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  color: var(--text);
  display: block;
  padding: 0.6rem 0;
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.4s ease, transform 0.4s var(--ease-out), color 0.2s ease;
}

.mobile-menu.open a {
  opacity: 1;
  transform: translateX(0);
}

.mobile-menu a:hover { color: var(--accent); }

.mobile-menu.open a:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.open a:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu.open a:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu.open a:nth-child(4) { transition-delay: 0.25s; }
.mobile-menu.open a:nth-child(5) { transition-delay: 0.3s; }
.mobile-menu.open a:nth-child(6) { transition-delay: 0.35s; }
.mobile-menu.open a:nth-child(7) { transition-delay: 0.4s; }
.mobile-menu.open a:nth-child(8) { transition-delay: 0.45s; }

.mobile-menu-footer {
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
  opacity: 0;
  transition: opacity 0.4s ease 0.5s;
}

.mobile-menu.open .mobile-menu-footer { opacity: 1; }

.mobile-menu-footer .tagline {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

@media (min-width: 768px) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
}

/* --- Custom Icon System --- */
/* Geometric, circle-based, consistent stroke weight */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg-alt);
  color: var(--accent);
  flex-shrink: 0;
}

.icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.5;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sm { width: 36px; height: 36px; }
.icon-sm svg { width: 16px; height: 16px; }

.icon-lg { width: 64px; height: 64px; }
.icon-lg svg { width: 28px; height: 28px; }

.icon-accent { background: var(--accent); color: var(--white); }
.icon-blush { background: var(--blush); color: var(--charcoal); }

/* --- Dividers & Decorative --- */
.divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin: var(--space-xl) 0;
}

/* Retrofuturist geometric accent */
.geo-accent {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  margin: 0 var(--space-xs);
  vertical-align: middle;
}

/* Dot grid background pattern */
.dot-grid {
  background-image: radial-gradient(circle, #D8D5CF 1px, transparent 1px);
  background-size: 28px 28px;
}

/* Line accent */
.line-accent {
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: 3px;
  margin-bottom: var(--space-md);
}

/* --- Forms --- */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.1rem;
  transition: var(--transition);
  outline: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(95, 118, 102, 0.12);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-light);
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236B7A6F' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* Radio/Checkbox cards */
.option-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

.option-card {
  position: relative;
}

.option-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-card label {
  display: block;
  padding: 0.8rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.option-card input:checked + label {
  background: var(--charcoal);
  color: var(--white);
  border-color: var(--charcoal);
}

.option-card label:hover {
  border-color: var(--accent);
}

/* --- Tags --- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-alt);
  padding: 0.3rem 0.7rem;
  border-radius: 50px;
}

.tag-accent {
  background: var(--accent);
  color: var(--white);
}

.tag-blush {
  background: var(--blush);
  color: var(--charcoal);
}

/* --- Cards for Projects/Collabs --- */
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--neu-raised-lg);
}

.project-card-img {
  width: 100%;
  aspect-ratio: 16/10;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.project-card-img .placeholder-icon {
  color: var(--accent-soft);
}

.project-card-img .placeholder-icon svg {
  width: 40px;
  height: 40px;
  stroke-width: 1;
  fill: none;
  stroke: currentColor;
}

.project-card-body {
  padding: var(--space-lg);
}

.project-card-body h4 {
  margin-bottom: var(--space-xs);
}

.project-card-body p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- Writing Cards --- */
.writing-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: var(--transition);
  position: relative;
}

.writing-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--neu-raised-lg);
}

.writing-card-date {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--text-light);
  margin-bottom: var(--space-sm);
}

.writing-card h3 {
  margin-bottom: var(--space-sm);
  line-height: 1.25;
}

.writing-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.writing-card-arrow {
  position: absolute;
  top: var(--space-xl);
  right: var(--space-xl);
  color: var(--accent-soft);
  transition: var(--transition);
}

.writing-card:hover .writing-card-arrow {
  color: var(--accent);
  transform: translateX(3px);
}

/* --- Store Items --- */
.store-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.store-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--neu-raised-lg);
}

.store-card-img {
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.store-card-badge {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
}

.store-card-body {
  padding: var(--space-lg);
}

.store-card-body h4 {
  margin-bottom: 4px;
}

.store-card-price {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
}

/* --- Coaching Tiers --- */
.tier-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.tier-card:hover {
  border-color: var(--accent);
  box-shadow: var(--neu-raised-lg);
}

.tier-card.featured {
  background: var(--charcoal);
  color: var(--white);
  border-color: var(--charcoal);
}

.tier-card.featured .label-mono { color: var(--sage-mist); }
.tier-card.featured .label-mono::before { opacity: 0.5; }
.tier-card.featured .text-muted { color: var(--sage-light); }

.tier-card-duration {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.tier-card.featured .tier-card-duration { color: var(--sage-mist); }

.tier-card h3 {
  margin-bottom: var(--space-md);
}

.tier-card ul {
  margin-bottom: var(--space-lg);
}

.tier-card li {
  font-size: 0.88rem;
  color: var(--text-muted);
  padding: 0.4rem 0;
  padding-left: 1.4rem;
  position: relative;
}

.tier-card.featured li { color: var(--sage-mist); }

.tier-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-soft);
}

.tier-card.featured li::before { background: var(--blush); }

/* --- FAQ --- */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: var(--space-lg) 0;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  text-align: left;
  color: var(--text);
  padding: 0;
  cursor: pointer;
  gap: var(--space-md);
}

.faq-question svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-muted);
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
  transition: transform var(--transition);
}

.faq-item.open .faq-question svg {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease-out), padding 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding-top: var(--space-md);
}

.faq-answer p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* --- Slider/Range --- */
.range-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--charcoal);
  cursor: pointer;
  border: 3px solid var(--surface);
  box-shadow: 0 2px 6px rgba(31, 36, 33, 0.15);
}

.range-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--charcoal);
  cursor: pointer;
  border: 3px solid var(--surface);
  box-shadow: 0 2px 6px rgba(31, 36, 33, 0.15);
}

/* --- Footer --- */
.site-footer {
  background: var(--charcoal);
  color: var(--sage-light);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

@media (min-width: 640px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

.footer-tagline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--white);
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}

.footer-links h5 {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: var(--space-md);
}

.footer-links a {
  display: block;
  font-size: 0.88rem;
  color: var(--sage-light);
  padding: 0.3rem 0;
  transition: var(--transition);
}

.footer-links a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(95, 118, 102, 0.2);
  padding-top: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
}

@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-bottom p {
  font-size: 0.78rem;
  color: var(--sage);
}

.footer-socials {
  display: flex;
  gap: var(--space-sm);
}

.footer-socials a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: rgba(95, 118, 102, 0.15);
  color: var(--sage-light);
  transition: var(--transition);
}

.footer-socials a:hover {
  background: var(--accent);
  color: var(--white);
}

.footer-socials a svg {
  width: 16px;
  height: 16px;
}

/* --- Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Stagger children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.05s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.15s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.25s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }

/* --- Substack Embed --- */
.substack-embed {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--neu-raised);
}

.substack-embed iframe {
  width: 100%;
  border: none;
  border-radius: var(--radius-lg);
}

/* --- Misc Utilities --- */
.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.text-center { text-align: center; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* --- Page Header (inner pages) --- */
.page-header {
  padding-top: calc(80px + var(--space-3xl));
  padding-bottom: var(--space-2xl);
}

.page-header .label-mono {
  margin-bottom: var(--space-md);
}

.page-header h1 {
  margin-bottom: var(--space-md);
}

.page-header p {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* --- Responsive Adjustments --- */
@media (min-width: 768px) {
  .section { padding: var(--space-3xl) 0; }
  .page-header { padding-top: calc(80px + var(--space-3xl)); }
}

@media (min-width: 960px) {
  .section { padding: 5rem 0; }
}

/* Print styles */
@media print {
  .site-nav, .nav-toggle, .mobile-menu, .site-footer { display: none; }
  body { background: white; color: black; }
  .neu-card, .project-card, .writing-card { box-shadow: none; border: 1px solid #ccc; }
}
