/* ============================================================
   Tylerpmilligan.com — homepage design system
   "Paper & ink": warm editorial. Cream paper, serif display,
   one rust accent, monospace reserved for digits.
   Hand-built, no framework. (Blog pages keep css/styles.css —
   this file is loaded by index.html only.)
   ============================================================ */

:root {
  --paper: #f7f3ec;
  --paper-2: #fffdf8;
  --paper-3: #f0e9dc;
  --ink: #211d18;
  --muted: #6c655a;
  --faint: #99917f;
  --rust: #b4490f;
  --rust-deep: #8f3a0c;
  --olive: #637d3b;
  --hairline: rgba(33, 29, 24, 0.16);
  --hairline-soft: rgba(33, 29, 24, 0.09);
  --shadow-soft: 0 10px 30px rgba(33, 29, 24, 0.09);
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --container: 1120px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  color-scheme: light;
  background: var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--rust); color: var(--paper-2); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
em { font-style: italic; }

:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* ---------- type helpers ---------- */

.accent {
  font-style: italic;
  color: var(--rust);
}

.kicker {
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rust);
}

/* ---------- scroll progress ---------- */

.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--rust);
  z-index: 200;
}

/* ---------- nav ---------- */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  background: transparent;
  transition: background 0.35s ease, border-color 0.35s ease;
}

.site-nav.scrolled {
  background: rgba(247, 243, 236, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--hairline-soft);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 70px;
}

.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.18rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand .dot { color: var(--rust); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.7rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--muted);
  transition: color 0.2s ease;
}

.nav-links a:hover { color: var(--ink); }

.nav-cta {
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.nav-cta:hover {
  background: var(--ink);
  color: var(--paper-2);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  margin: 4px 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  z-index: 99;
  background: rgba(255, 253, 248, 0.97);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline-soft);
  padding: 0.6rem 24px 1.4rem;
}

.mobile-menu.open { display: block; }

.mobile-menu a {
  display: block;
  padding: 0.85rem 0;
  font-size: 1.05rem;
  color: var(--muted);
  border-bottom: 1px solid var(--hairline-soft);
}

.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover { color: var(--ink); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: 150px 0 80px;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--muted);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 0.45rem 1.05rem;
  margin-bottom: 2.2rem;
  background: var(--paper-2);
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--olive);
  box-shadow: 0 0 0 0 rgba(99, 125, 59, 0.45);
  animation: pulse 2.6s infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(99, 125, 59, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(99, 125, 59, 0); }
  100% { box-shadow: 0 0 0 0 rgba(99, 125, 59, 0); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 7vw, 5rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin: 0 0 1.7rem;
  max-width: 15ch;
}

.hero-sub {
  font-size: clamp(1.05rem, 1.6vw, 1.18rem);
  color: var(--muted);
  max-width: 620px;
  margin: 0 0 2.5rem;
}

.hero-sub strong { color: var(--ink); font-weight: 600; }

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 4.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.7rem;
  border-radius: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper-2);
}

.btn-primary:hover {
  background: var(--rust-deep);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.btn-ghost {
  border: 1px solid var(--hairline);
  color: var(--ink);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--ink);
  background: var(--paper-2);
  transform: translateY(-2px);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--hairline-soft);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  overflow: hidden;
}

.stat {
  background: var(--paper-2);
  padding: 1.4rem 1.5rem;
}

.stat-num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  letter-spacing: -0.02em;
  color: var(--ink);
}

.stat-label {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

/* ---------- sections ---------- */

.section { padding: 6rem 0; }

.section-head {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-bottom: 2.6rem;
}

.sec-num {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--rust);
  letter-spacing: 0.08em;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

.section-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hairline-soft);
  margin-left: 0.6rem;
}

.section-lede {
  color: var(--muted);
  max-width: 700px;
  margin: -1.4rem 0 2.6rem;
  font-size: 1.05rem;
}

/* ---------- about ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 4rem;
  align-items: center;
}

.about-copy p { color: var(--muted); margin: 0 0 1.2rem; }
.about-copy p strong { color: var(--ink); font-weight: 600; }

.pull-line {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 1.4rem;
}

.about-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.8rem;
}

.chip {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 0.32rem 0.8rem;
  background: var(--paper-2);
  white-space: nowrap;
}

.about-photo-wrap {
  position: relative;
  max-width: 390px;
  justify-self: end;
}

.about-photo-wrap::before {
  content: "";
  position: absolute;
  inset: 14px -14px -14px 14px;
  border: 1px solid var(--rust);
  border-radius: 18px;
  opacity: 0.55;
  z-index: 0;
}

.about-photo {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid var(--hairline);
}

.photo-caption {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.88rem;
  color: var(--faint);
  margin-top: 1.1rem;
  text-align: right;
}

/* ---------- flagship ---------- */

.flagship {
  position: relative;
  border-radius: 18px;
  padding: clamp(2rem, 5vw, 3.6rem);
  background: var(--paper-2);
  border: 1px solid var(--hairline);
  overflow: hidden;
}

.flagship::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--ink);
}

.flag-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.8rem;
}

.flag-name {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.9rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0.45rem 0 0.3rem;
}

.flag-tag {
  color: var(--muted);
  font-size: 1.02rem;
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
}

.flag-link {
  font-size: 0.84rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--ink);
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  color: var(--ink);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}

.flag-link:hover {
  background: var(--ink);
  color: var(--paper-2);
  transform: translateY(-1px);
}

.flag-body {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  margin-bottom: 2.4rem;
}

.flag-body p { color: var(--muted); margin: 0 0 1.1rem; }
.flag-body p strong { color: var(--ink); font-weight: 600; }

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

.flag-list li {
  position: relative;
  padding: 0 0 0.95rem 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.flag-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--rust);
}

.flag-list li strong { color: var(--ink); font-weight: 600; }

.flag-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--hairline-soft);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.flag-stat { background: var(--paper); padding: 1.3rem 1.4rem; }

.flag-stat .n {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(1.25rem, 2.1vw, 1.7rem);
  color: var(--rust);
}

.flag-stat .l {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.flag-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.flag-foot-note {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--muted);
  width: 100%;
  margin: 1.2rem 0 0;
}

/* ---------- project cards ---------- */

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 1.7rem;
  background: var(--paper-2);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(33, 29, 24, 0.32);
  box-shadow: var(--shadow-soft);
}

.card-kicker {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 0.9rem;
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.7rem;
}

.card p {
  color: var(--muted);
  font-size: 0.94rem;
  margin: 0 0 1.4rem;
}

.card p strong { color: var(--ink); font-weight: 600; }

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
  margin-bottom: 1.3rem;
}

.card-meta .chip { background: var(--paper); }

.card-link {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.card-link .arrow { transition: transform 0.2s ease; }
.card:hover .card-link .arrow { transform: translateX(4px); }
.card:hover .card-link { color: var(--rust); }

/* ---------- consulting ---------- */

#consulting { padding-bottom: 7rem; }

.consult {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(2.4rem, 5vw, 3.6rem) clamp(1.4rem, 4vw, 3rem);
  background: var(--paper-3);
  border-radius: 18px;
  border: 1px solid var(--hairline-soft);
}

.consult h2 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 1rem 0 1.2rem;
}

.consult > p {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0 0 1.8rem;
}

.consult > p strong { color: var(--ink); font-weight: 600; }

.consult-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2.2rem;
}

/* ---------- timeline ---------- */

.timeline { border-bottom: 1px solid var(--hairline-soft); }

.t-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 2rem;
  padding: 1.5rem 0.4rem;
  border-top: 1px solid var(--hairline-soft);
  transition: background 0.2s ease;
}

.t-row:hover { background: var(--paper-2); }

.t-when {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--faint);
  padding-top: 0.3rem;
  white-space: nowrap;
}

.t-role {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
  margin: 0 0 0.2rem;
}

.t-org { color: var(--rust); font-weight: 600; }

.t-note {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0.25rem 0 0;
  max-width: 640px;
}

/* ---------- writing ---------- */

.post-list { border-bottom: 1px solid var(--hairline-soft); }

.post-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 0.4rem;
  border-top: 1px solid var(--hairline-soft);
  transition: background 0.2s ease;
}

.post-row:hover { background: var(--paper-2); }

.post-title {
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.25rem;
  transition: color 0.2s ease;
}

.post-row:hover .post-title { color: var(--rust); }

.post-sub {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.post-tag {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--faint);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.post-row .arrow { transition: transform 0.2s ease; color: var(--muted); }
.post-row:hover .arrow { transform: translateX(4px); color: var(--rust); }

.writing-foot {
  display: flex;
  gap: 1.8rem;
  margin-top: 1.8rem;
  flex-wrap: wrap;
}

.writing-foot a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.writing-foot a:hover { color: var(--rust); border-color: var(--rust); }

/* ---------- off the clock collage ---------- */

.collage {
  columns: 3 240px;
  column-gap: 1.2rem;
}

.collage figure {
  break-inside: avoid;
  margin: 0 0 1.2rem;
}

.collage img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--hairline);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.collage figure:hover img {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}

.collage figcaption {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.88rem;
  color: var(--faint);
  margin-top: 0.45rem;
  padding-left: 0.2rem;
}

/* ---------- on rotation (hero music bar) ---------- */

.rotation-bar {
  margin-top: 1.1rem;
  background: var(--paper-2);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 0.85rem 1.15rem;
}

.rotation-main {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

#rotation-art {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid var(--hairline);
  flex-shrink: 0;
}

.rotation-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.rotation-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--faint);
}

.rotation-track {
  font-size: 0.98rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rotation-track strong {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
}

.rotation-track em { color: var(--muted); }

.rotation-live {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  flex-shrink: 0;
}

.rotation-play {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--ink);
  color: var(--paper-2);
  border: none;
  border-radius: 999px;
  padding: 0.52rem 1.15rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}

.rotation-play:hover {
  background: var(--rust-deep);
  transform: translateY(-1px);
}

.rotation-play svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.rotation-artists {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--hairline-soft);
}

.rotation-artists .rotation-label { margin-right: 0.35rem; }

.rotation-embed { margin-top: 0.85rem; }

.rotation-embed iframe {
  display: block;
  width: 100%;
  height: 80px;
  border: 0;
  border-radius: 12px;
}

/* ---------- what's on the menu ---------- */

.menu-block, .map-block { margin-top: 3rem; }

.menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.menu-arrows { display: flex; gap: 0.5rem; }

.menu-arrow {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: var(--paper-2);
  color: var(--ink);
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.menu-arrow:hover {
  border-color: var(--rust);
  color: var(--rust);
  transform: translateY(-1px);
}

.menu-lede {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0.3rem 0 1.2rem;
}

.menu-track {
  display: flex;
  gap: 1.1rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: 0.6rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.menu-card {
  flex: 0 0 235px;
  scroll-snap-align: start;
  margin: 0;
}

.menu-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--hairline);
}

.menu-card figcaption {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.88rem;
  color: var(--faint);
  margin-top: 0.45rem;
}

/* ---------- where I've been (map) ---------- */

.world-map {
  position: relative;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  overflow: hidden;
  background: #fdfcf7;
}

.world-map img {
  display: block;
  width: 100%;
  height: auto;
  filter: sepia(0.22) saturate(0.6) contrast(0.97) opacity(0.92);
}

.map-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  padding: 0;
  transform: translate(-50%, -50%);
  background: var(--rust);
  border: 1.5px solid var(--paper-2);
  border-radius: 50%;
  cursor: default;
}

.map-dot::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: rgba(180, 73, 15, 0.18);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.map-dot::after {
  content: attr(data-name);
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  background: var(--ink);
  color: var(--paper-2);
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 2;
}

.map-dot:hover::before,
.map-dot:focus::before,
.map-dot:hover::after,
.map-dot:focus::after { opacity: 1; }

.map-credit {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--faint);
  text-align: right;
  margin-top: 0.5rem;
}

/* ---------- photo pins ---------- */
.map-dot.has-photos {
  width: 13px;
  height: 13px;
  background: var(--ink);
  cursor: pointer;
  z-index: 3;
}
.map-dot.has-photos::before {
  inset: -8px;
  background: rgba(180, 73, 15, 0.35);
  opacity: 1;
  animation: pinPulse 2.4s ease-in-out infinite;
}
.map-dot.has-photos:hover {
  transform: translate(-50%, -50%) scale(1.18);
}
@keyframes pinPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50%      { transform: scale(1.6); opacity: 0.1; }
}
@media (prefers-reduced-motion: reduce) {
  .map-dot.has-photos::before { animation: none; }
}

/* ---------- trip lightbox ---------- */
.trip-lightbox { position: fixed; inset: 0; z-index: 1000; display: none; }
.trip-lightbox.open { display: block; }
.tl-backdrop {
  position: absolute; inset: 0;
  background: rgba(12, 10, 8, 0.93);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.tl-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.tl-figure {
  margin: 0; position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 0.7rem;
}
.tl-img {
  max-width: 90vw; max-height: 78vh; object-fit: contain;
  border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  background: #1a1714;
}
.tl-cap {
  color: #f2ede4; font-family: var(--font-mono);
  font-size: 0.8rem; letter-spacing: 0.02em;
}
.tl-count {
  position: absolute; bottom: 3.5vh; left: 50%; transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7); font-family: var(--font-mono); font-size: 0.72rem; z-index: 2;
}
.tl-close {
  position: absolute; top: 2.6vh; right: 4vw; z-index: 3;
  background: none; border: 0; color: #fff; font-size: 2.1rem; line-height: 1; cursor: pointer;
}
.tl-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  background: rgba(255, 255, 255, 0.1); border: 0; color: #fff;
  width: 54px; height: 54px; border-radius: 50%; font-size: 2.2rem; line-height: 1;
  cursor: pointer; transition: background 0.15s ease;
}
.tl-nav:hover { background: rgba(255, 255, 255, 0.22); }
.tl-prev { left: 3vw; }
.tl-next { right: 3vw; }
@media (max-width: 640px) {
  .tl-nav { width: 44px; height: 44px; font-size: 1.9rem; }
  .tl-prev { left: 1.5vw; } .tl-next { right: 1.5vw; }
}

/* ---------- contact actions ---------- */

.contact-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.copy-email.copied {
  border-color: var(--olive);
  color: var(--olive);
}

/* ---------- contact ---------- */

.contact {
  text-align: center;
  padding: 7.5rem 0 7rem;
}

.contact h2 {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 5.5vw, 3.6rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 1rem 0 1.1rem;
}

.contact > .container > p {
  color: var(--muted);
  max-width: 540px;
  margin: 0 auto 2.4rem;
  font-size: 1.05rem;
}

.contact-icons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.6rem;
}

.icon-link {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  color: var(--muted);
  background: var(--paper-2);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.icon-link:hover {
  color: var(--rust);
  border-color: var(--rust);
  transform: translateY(-3px);
}

.icon-link svg { width: 20px; height: 20px; fill: currentColor; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--hairline-soft);
  padding: 2rem 0 2.4rem;
  background: var(--paper-3);
}

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

.footer-inner p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 1.4rem;
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--muted);
  transition: color 0.2s ease;
}

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

/* ---------- reveal animations ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }
.reveal[data-delay="5"] { transition-delay: 0.4s; }

/* ---------- responsive ---------- */

@media (max-width: 1024px) {
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .flag-body { grid-template-columns: 1fr; gap: 1rem; }
}

@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }

  .about-grid { grid-template-columns: 1fr; gap: 2.8rem; }
  .about-photo-wrap { justify-self: start; max-width: 240px; }
  .photo-caption { text-align: left; }

  .hero { min-height: 0; padding: 135px 0 70px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }

  .flag-grid { grid-template-columns: repeat(2, 1fr); }

  .t-row { grid-template-columns: 1fr; gap: 0.3rem; padding: 1.3rem 0.2rem; }
  .t-when { padding-top: 0; }

  .section { padding: 4.5rem 0; }
}

@media (max-width: 640px) {
  .project-grid { grid-template-columns: 1fr; }
  .post-row { grid-template-columns: 1fr; gap: 0.6rem; }
  .post-tag { order: -1; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal { opacity: 1; transform: none; }
}
