:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --text: #1d1b18;
  --muted: #6b665e;
  --line: #e7e2d9;
  --accent: #b4532a;
  --accent-soft: #f6e6dc;
  --fur-line: #5d554f;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161412;
    --surface: #1f1c19;
    --text: #efe9df;
    --muted: #a39b8f;
    --line: #34302b;
    --accent: #e98a5c;
    --accent-soft: #3a261c;
    --fur-line: #8a8178;
  }
}

:root[data-theme="dark"] {
  --bg: #161412;
  --surface: #1f1c19;
  --text: #efe9df;
  --muted: #a39b8f;
  --line: #34302b;
  --accent: #e98a5c;
  --accent-soft: #3a261c;
  --fur-line: #8a8178;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Hero */
.hero {
  padding: 96px 0 56px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(44px, 9vw, 72px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 20px 0 0;
  max-width: 34em;
  color: var(--muted);
  font-size: 20px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 32px;
}

.nav a {
  color: var(--text);
  font-size: 15px;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.15s, color 0.15s;
}

.nav a:hover,
.nav a.active {
  color: var(--accent);
  border-color: var(--accent);
}

/* Sections */
.section {
  padding: 56px 0;
  border-bottom: 1px solid var(--line);
}

/* Only hide for the reveal when JS is running; otherwise content stays visible. */
.js .section {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.js .section.visible {
  opacity: 1;
  transform: none;
}

.section:last-child { border-bottom: 0; }

/* Credits sit below the bio at a smaller size. */
.section-quiet { font-size: 15px; }
.section-quiet h2 { font-size: 20px; color: var(--muted); }

h2 {
  margin: 0 0 20px;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
}

.prose p { margin: 0 0 1em; }
.prose p:last-child { margin-bottom: 0; }

.cards {
  display: grid;
  gap: 16px;
}

.cards-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.card h3 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.note {
  margin: -8px 0 20px;
  color: var(--muted);
  font-size: 15px;
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  position: relative;
  padding: 0 0 20px 28px;
  border-left: 2px solid var(--line);
  margin-left: 6px;
}

.steps li:last-child { padding-bottom: 0; }

.steps li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 7px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}

.step-who {
  font-weight: 500;
}

.step-what {
  display: block;
  color: var(--muted);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.links a {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}

.links a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.links a.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  font-weight: 500;
}

.links a.primary::after { content: " →"; }

.links a.primary:hover {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

/* Graphics */
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon,
.hero-art use {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon {
  width: 22px;
  height: 22px;
  flex: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.hero-art {
  order: -1;
  width: 150px;
  height: auto;
  margin-left: -10px;
  color: var(--accent);
  overflow: visible;
}

@media (min-width: 720px) {
  .hero-grid {
    grid-template-columns: 1fr 230px;
    align-items: center;
    gap: 24px;
  }

  .hero-art {
    order: 0;
    width: 100%;
    margin: 0;
  }
}

.art-dot { fill: var(--line); }
.art-blob { fill: var(--accent-soft); }

.art-ring {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-dasharray: 3 7;
  stroke-linecap: round;
  opacity: 0.55;
}


use.art-spark { stroke: var(--accent); }

.art-badge circle {
  fill: var(--surface);
  stroke: var(--line);
  stroke-width: 1.5;
}

.art-badge {
  animation: bob 6s ease-in-out infinite;
  animation-delay: var(--d);
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.card-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}

.interests {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.interests li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 15px;
}

.interests .icon {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

/* Polaroids: each falls gently into place when the pile scrolls into view.
   --r is the resting tilt and --i the drop order (both set in script.js). */
.photos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 40px 0 16px;
  padding-top: 12px;
}

.photo {
  --r: -2deg;
  position: relative;
  width: min(100%, 440px);
  margin: 0;
  padding: 12px 12px 0;
  background: #fdfcf9;
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: rotate(var(--r));
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

/* Several photos: smaller, overlapping, scattered. */
.pile .photo { width: 250px; margin: 0 -14px 24px; }
.pile .photo:nth-child(even) { margin-top: 22px; }

@media (max-width: 600px) {
  .pile { flex-direction: column; }
  .pile .photo { width: 78%; margin: 0 0 -4px; }
  .pile .photo:nth-child(odd) { align-self: flex-start; margin-right: auto; }
  .pile .photo:nth-child(even) { margin-top: 0; margin-left: auto; }
  .pile .photo:last-child { margin-bottom: 16px; }
}

.photo:hover {
  z-index: 1;
  transform: rotate(0deg) translateY(-3px) scale(1.02);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08), 0 14px 32px rgba(0, 0, 0, 0.16);
}

.photo img {
  display: block;
  width: 100%;
  height: auto;
}

.photo figcaption {
  padding: 12px 0 14px;
  color: #6b665e;
  font-family: var(--serif);
  font-size: 17px;
  font-style: italic;
  text-align: center;
}

.pile .photo figcaption { padding: 8px 0 10px; font-size: 15px; }

/* A strip of tape pressed on once each photo lands. */
.photo::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  width: 28%;
  min-width: 64px;
  height: 24px;
  background: rgba(233, 190, 160, 0.55);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  transform: translateX(-50%) rotate(3deg);
}

/* Hidden only when JS runs, so the photos show without it. */
.js .photo:not(.landed),
.js .photo:not(.landed)::before { opacity: 0; }

.photo.landed {
  animation: photo-drop 1.5s cubic-bezier(0.22, 0.7, 0.3, 1) calc(var(--i, 0) * 0.35s) both;
}

.photo.landed::before {
  animation: tape-press 0.35s ease-out calc(var(--i, 0) * 0.35s + 1.25s) both;
}

/* Once it has landed, drop the animation so the hover tilt can take over. */
.photo.settled { animation: none; }

/* Drifts down with a slight sway, overshoots a touch, and settles at its resting tilt.
   The shadow starts soft and wide (far from the page) and tightens as it lands. */
@keyframes photo-drop {
  0% {
    opacity: 0;
    transform: translateY(-140px) rotate(calc(var(--r) - 10deg)) scale(1.08);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.04);
  }
  15% { opacity: 1; }
  55% {
    transform: translateY(10px) rotate(calc(var(--r) + 4.5deg)) scale(1.01);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
  }
  78% { transform: translateY(-4px) rotate(calc(var(--r) - 1deg)) scale(1); }
  100% {
    opacity: 1;
    transform: rotate(var(--r));
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.12);
  }
}

@keyframes tape-press {
  from { opacity: 0; transform: translateX(-50%) rotate(3deg) scale(1.3); }
  to { opacity: 1; transform: translateX(-50%) rotate(3deg) scale(1); }
}

/* Footer */
.footer {
  padding: 32px 0 48px;
  color: var(--muted);
  font-size: 14px;
}

.footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.theme-toggle {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
}

.theme-toggle:hover { border-color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .section { opacity: 1; transform: none; transition: none; }
  .art-badge { animation: none; }
  .js .photo:not(.landed),
  .js .photo:not(.landed)::before { opacity: 1; }
  .photo.landed,
  .photo.landed::before { animation: none; }
}
