* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #07160f;
  --bg-elev: rgba(255, 255, 255, 0.05);
  --text: #e7f6ee;
  --muted: rgba(231, 246, 238, 0.75);
  --line: rgba(255, 255, 255, 0.12);

  --accent: #22c55e;
  --accent-2: #2dd4bf;
  --on-accent: #06210f;

  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --container: 1100px;

  --focus: rgba(45, 212, 191, 0.55);

  --nav-height: 68px;

  /* Swap this to url("images/your-hero.jpg") to self-host the hero image. */
  --hero-image: url("https://images.unsplash.com/photo-1441716844725-09cedc13a4e7?auto=format&fit=crop&w=1920&q=70");

  --glass: rgba(0, 0, 0, 0.28);
  --glass-2: rgba(0, 0, 0, 0.18);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 16px);
}

body {
  font-family: "Montserrat", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  position: relative;
  isolation: isolate;
}

/* Easter egg: Night Hike mode */
body.night-hike {
  --accent: #7c3aed;
  --accent-2: #38bdf8;
  --focus: rgba(56, 189, 248, 0.55);
}

body.night-hike::after {
  content: "";
  position: fixed;
  inset: -20%;
  pointer-events: none;
  z-index: 8;
  opacity: 0;
  mix-blend-mode: screen;
  background:
    radial-gradient(900px 600px at 20% 20%, rgba(56, 189, 248, 0.18), transparent 58%),
    radial-gradient(900px 600px at 80% 35%, rgba(124, 58, 237, 0.18), transparent 60%),
    conic-gradient(from 180deg at 50% 50%, rgba(45, 212, 191, 0.0), rgba(56, 189, 248, 0.10), rgba(124, 58, 237, 0.10), rgba(45, 212, 191, 0.0));
  filter: blur(10px) saturate(1.1);
  animation: aurora-in 420ms ease-out forwards, aurora-drift 6.2s ease-in-out infinite alternate;
}

@keyframes aurora-in {
  from { opacity: 0; transform: translate3d(0px, 14px, 0px) scale(1.02); }
  to { opacity: 0.65; transform: translate3d(0px, 0px, 0px) scale(1); }
}

@keyframes aurora-drift {
  0% { transform: translate3d(-8px, 6px, 0px) rotate(-1deg); }
  100% { transform: translate3d(10px, -6px, 0px) rotate(1deg); }
}

.easter-hint {
  position: fixed;
  left: calc(18px + env(safe-area-inset-left, 0px));
  bottom: calc(172px + env(safe-area-inset-bottom, 0px));
  z-index: 22;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.40);
  backdrop-filter: blur(10px);
  color: rgba(231, 246, 238, 0.88);
  letter-spacing: 0.02em;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  animation: hint-in 280ms ease-out;
}

@keyframes hint-in {
  from { opacity: 0; transform: translate3d(0px, 6px, 0px); }
  to { opacity: 1; transform: translate3d(0px, 0px, 0px); }
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background:
    radial-gradient(900px 600px at 20% 10%, rgba(45, 212, 191, 0.12), transparent 55%),
    radial-gradient(700px 520px at 80% 20%, rgba(34, 197, 94, 0.12), transparent 60%),
    repeating-radial-gradient(
      circle at 25% 20%,
      rgba(231, 246, 238, 0.06) 0px,
      rgba(231, 246, 238, 0.06) 1px,
      transparent 1px,
      transparent 18px
    );
  mix-blend-mode: overlay;
  z-index: -1;
}

/* FUN MODE (pure vibes) */
body.fun-on::before {
  opacity: 0.5;
  animation: fun-drift 18s ease-in-out infinite alternate;
}

@keyframes fun-drift {
  0% {
    transform: translate3d(0px, 0px, 0px);
    filter: saturate(1) contrast(1);
  }
  100% {
    transform: translate3d(14px, -10px, 0px);
    filter: saturate(1.05) contrast(1.02);
  }
}

.fun-canvas {
  position: fixed;
  inset: 0;
  z-index: 9;
  opacity: 0.9;
  mix-blend-mode: screen;
}

.nav-fun {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.18);
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.nav-fun:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.nav-fun[aria-pressed="true"] {
  color: var(--text);
  border-color: rgba(45, 212, 191, 0.28);
  background: rgba(45, 212, 191, 0.10);
}

.nav-fun:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.fun-fab {
  position: fixed;
  left: calc(18px + env(safe-area-inset-left, 0px));
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 22;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(10px);
  color: rgba(231, 246, 238, 0.88);
  padding: 12px 14px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

/* When Fun Mode is on, make space for the compass widget. */
body.fun-on .fun-fab {
  bottom: calc(118px + env(safe-area-inset-bottom, 0px));
}

.fun-fab:hover {
  color: var(--text);
  border-color: rgba(45, 212, 191, 0.28);
  background: rgba(255, 255, 255, 0.06);
}

.fun-fab[aria-pressed="true"] {
  color: var(--text);
  border-color: rgba(45, 212, 191, 0.28);
  background: rgba(45, 212, 191, 0.10);
}

.fun-fab:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.compass {
  position: fixed;
  left: calc(18px + env(safe-area-inset-left, 0px));
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  width: 84px;
  height: 84px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    radial-gradient(40px 40px at 30% 30%, rgba(45, 212, 191, 0.14), transparent 65%),
    radial-gradient(50px 50px at 70% 60%, rgba(34, 197, 94, 0.12), transparent 70%),
    rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  z-index: 21;
  opacity: 0.92;
  pointer-events: none;
}

.compass-face {
  position: absolute;
  inset: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    repeating-conic-gradient(
      from 0deg,
      rgba(231, 246, 238, 0.0) 0deg,
      rgba(231, 246, 238, 0.0) 12deg,
      rgba(231, 246, 238, 0.08) 12deg,
      rgba(231, 246, 238, 0.08) 13deg
    );
  opacity: 0.55;
}

.compass-needle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 32px;
  height: 2px;
  transform-origin: 0% 50%;
  transform: rotate(45deg);
  background: linear-gradient(90deg, rgba(45, 212, 191, 0.0), rgba(45, 212, 191, 0.95));
  filter: drop-shadow(0 0 10px rgba(45, 212, 191, 0.35));
}

.compass-center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.12);
}

.compass-label {
  position: absolute;
  right: 10px;
  bottom: 8px;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: rgba(231, 246, 238, 0.75);
}

/* Trail HUD (scroll minimap) */
.trail-hud {
  position: fixed;
  right: 18px;
  bottom: 78px;
  width: 120px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  z-index: 21;
  padding: 12px 12px 10px;
}

.trail-hud-title {
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(231, 246, 238, 0.75);
  margin-bottom: 10px;
}

.trail-track {
  position: relative;
  height: 110px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.trail-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0%;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  opacity: 0.92;
}

.trail-markers {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.trail-marker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(231, 246, 238, 0.88);
  cursor: pointer;
  text-align: left;
}

.trail-marker .trail-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
}

.trail-marker.is-active {
  border-color: rgba(45, 212, 191, 0.28);
  background: rgba(45, 212, 191, 0.10);
}

.trail-marker.is-active .trail-dot {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  border-color: rgba(45, 212, 191, 0.24);
}

.trail-marker:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

@media (max-width: 860px) {
  .trail-hud {
    display: none;
  }
}

/* Command palette */
.modal-dialog.cmdk {
  width: min(720px, 100%);
}

.cmdk-input {
  width: 100%;
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.22);
  color: rgba(231, 246, 238, 0.95);
}

.cmdk-input::placeholder {
  color: rgba(231, 246, 238, 0.55);
}

.cmdk-input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.cmdk-list {
  margin-top: 12px;
  display: grid;
  gap: 10px;
  max-height: min(45vh, 380px);
  overflow: auto;
  padding-right: 6px;
}

.cmdk-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(231, 246, 238, 0.92);
  cursor: pointer;
}

.cmdk-item .cmdk-kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.88rem;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.18);
  color: rgba(231, 246, 238, 0.82);
}

.cmdk-item.is-active {
  border-color: rgba(45, 212, 191, 0.28);
  background: rgba(45, 212, 191, 0.10);
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.12), 0 14px 36px rgba(0, 0, 0, 0.25);
}

.cmdk-item:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.cmdk-hint {
  margin-top: 12px;
}

body.modal-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.inline-link {
  color: rgba(182, 243, 209, 0.95);
  text-decoration: none;
  border-bottom: 1px dashed rgba(45, 212, 191, 0.35);
}

.inline-link:hover {
  border-bottom-color: rgba(45, 212, 191, 0.75);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 10px;
  background: rgba(0, 0, 0, 0.75);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  z-index: 9999;
}

.skip-link:focus {
  left: 12px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

/* HERO */
.hero {
  height: 100vh;
  min-height: 680px;
  background:
    radial-gradient(1200px 700px at 20% 10%, rgba(45, 212, 191, 0.12), transparent 50%),
    radial-gradient(900px 600px at 80% 30%, rgba(34, 197, 94, 0.12), transparent 55%),
    linear-gradient(to bottom, rgba(5, 20, 10, 0.50), rgba(5, 20, 10, 0.90)),
    var(--hero-image);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 28px 18px;
}

.overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 520px at 50% 20%, rgba(45, 212, 191, 0.10), transparent 60%),
    linear-gradient(to bottom, rgba(5, 20, 10, 0.55), rgba(5, 20, 10, 0.88));
}

.nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: min(var(--container), calc(100% - 28px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(10px);
  z-index: 10;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.5px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--muted);
}

.nav a.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(45, 212, 191, 0.18);
}

.nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.nav a.nav-blog {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.16);
  color: rgba(231, 246, 238, 0.9);
}

.nav a.nav-blog:hover {
  border-color: rgba(45, 212, 191, 0.28);
  background: rgba(255, 255, 255, 0.08);
}

.nav-cta {
  border: 1px solid rgba(45, 212, 191, 0.25);
  background: rgba(45, 212, 191, 0.10);
  color: var(--text);
}

.hero-content {
  position: relative;
  text-align: center;
  z-index: 1;
  width: min(820px, 100%);
  padding: 0 10px;
}

.hero h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  letter-spacing: 2px;
}

.hero p {
  margin: 20px 0;
  opacity: 0.92;
  color: var(--muted);
}

.hero-highlights {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 0;
  padding: 0;
}

.hero-highlights li {
  font-size: 0.92rem;
  color: rgba(231, 246, 238, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
  padding: 8px 10px;
  border-radius: 999px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 50px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  color: var(--on-accent);
  text-decoration: none;
  font-weight: bold;
  transition: 0.4s;
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.btn:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.btn:hover {
  box-shadow: 0 0 30px rgba(45, 212, 191, 0.35);
  transform: scale(1.05);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  box-shadow: 0 0 40px rgba(34, 197, 94, 0.18);
}

/* SECTIONS */
.section {
  padding: 86px 18px;
  position: relative;
  z-index: 1;
}

/* Topo-like separators between sections */
.section::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 24px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(231, 246, 238, 0.00) 0px,
      rgba(231, 246, 238, 0.00) 18px,
      rgba(231, 246, 238, 0.06) 18px,
      rgba(231, 246, 238, 0.06) 19px
    ),
    radial-gradient(420px 40px at 50% 0%, rgba(45, 212, 191, 0.14), transparent 60%);
  opacity: 0.55;
  pointer-events: none;
}

/* Subtle rhythm tint (skip dark sections) */
main > .section:not(.dark):nth-of-type(even) {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.00));
}

.section > * {
  width: min(var(--container), 100%);
  margin-left: auto;
  margin-right: auto;
}

.section h2 {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  margin-bottom: 50px;
  color: rgba(182, 243, 209, 0.95);
}

/* Trail marker accent */
.section h2::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  margin-right: 10px;
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.10);
  transform: translateY(-1px);
}

@media (min-width: 980px) {
  .section > h2 {
    position: sticky;
    top: calc(var(--nav-height) + 24px);
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(10px);
    width: fit-content;
    z-index: 2;
  }
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.filter {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.18);
  color: rgba(231, 246, 238, 0.9);
  padding: 10px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: 0.25s;
}

.filter:hover {
  border-color: rgba(45, 212, 191, 0.35);
  box-shadow: 0 0 24px rgba(45, 212, 191, 0.14);
}

.filter.is-active {
  border-color: rgba(45, 212, 191, 0.35);
  background: rgba(45, 212, 191, 0.10);
}

.filter:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.section.dark {
  background: linear-gradient(120deg, #06150e, #0b2b1b);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.facts {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: grid;
  gap: 10px;
}

.facts li {
  padding: 12px 14px 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.18);
  position: relative;
}

.facts li::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent-2);
  transform: translateY(-50%);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.12);
}

.facts li {
  padding-left: 30px;
}

.split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 30px;
  align-items: center;
}

.portrait {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.portrait img {
  width: 100%;
  height: 360px;
  object-fit: cover;
}

/* CARDS */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  gap: 30px;
}

.card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03)) padding-box,
    linear-gradient(135deg, rgba(45, 212, 191, 0.22), rgba(34, 197, 94, 0.18)) border-box;
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  backdrop-filter: blur(10px);
  transition: 0.4s;
  position: relative;
  overflow: hidden;
}

.card > * {
  position: relative;
  z-index: 1;
}

/* Weathered grain overlay */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(231, 246, 238, 0.04) 0px,
      rgba(231, 246, 238, 0.04) 1px,
      transparent 1px,
      transparent 9px
    );
  opacity: 0.06;
}

a.card {
  text-decoration: none;
  display: block;
}

a.card:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  letter-spacing: 0.2px;
}

.card p {
  color: var(--muted);
  line-height: 1.7;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(34, 197, 94, 0.18), transparent);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: 0.4s;
}

/* Cursor-following spotlight (uses --mx/--my set by JS) */
.card::after {
  background:
    radial-gradient(220px 180px at var(--mx, 50%) var(--my, 20%), rgba(45, 212, 191, 0.18), transparent 60%),
    linear-gradient(120deg, transparent, rgba(34, 197, 94, 0.14), transparent);
}

.card:hover::after {
  opacity: 1;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 0 40px rgba(34, 197, 94, 0.22);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tags span {
  font-size: 0.82rem;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(45, 212, 191, 0.18);
  background: rgba(45, 212, 191, 0.08);
  color: rgba(231, 246, 238, 0.85);
}

.card-actions {
  margin-top: 16px;
}

.card-bullets {
  margin-top: 12px;
  padding-left: 18px;
  color: rgba(231, 246, 238, 0.88);
}

.card-bullets li {
  margin-top: 8px;
}

/* BLOG UI */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 14px;
}

.tab {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.18);
  color: rgba(231, 246, 238, 0.9);
  padding: 10px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: 0.25s;
}

.tab:hover {
  border-color: rgba(45, 212, 191, 0.35);
  box-shadow: 0 0 24px rgba(45, 212, 191, 0.14);
}

.tab.is-active {
  border-color: rgba(45, 212, 191, 0.35);
  background: rgba(45, 212, 191, 0.10);
}

.tab:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.topic-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.topic {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.16);
  color: rgba(231, 246, 238, 0.9);
  padding: 10px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.topic:hover {
  border-color: rgba(34, 197, 94, 0.35);
  box-shadow: 0 0 24px rgba(34, 197, 94, 0.14);
}

.topic:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.modal-dialog.modal-note {
  width: min(820px, 100%);
  padding-top: 16px;
}

.read-progress {
  height: 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
  margin: 0 0 14px;
}

.read-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
}

.post-content {
  margin-top: 12px;
  max-height: min(60vh, 520px);
  overflow: auto;
  padding-right: 6px;
}

.post-content h4 {
  margin-top: 16px;
  margin-bottom: 8px;
  font-size: 1.05rem;
  color: rgba(231, 246, 238, 0.95);
}

.post-content ul {
  padding-left: 18px;
  margin-top: 8px;
  color: rgba(231, 246, 238, 0.88);
}

.post-content li {
  margin-top: 8px;
}

.modal-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.card-action {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.18);
  color: rgba(231, 246, 238, 0.92);
  padding: 10px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.card-action:hover {
  border-color: rgba(45, 212, 191, 0.35);
}

.card-action:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.repo-card {
  padding: 22px;
}

.github-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-start;
}

.lang-summary {
  margin: 14px 0 10px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.16);
}

.lang-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

.lang-row:first-child {
  margin-top: 0;
}

.lang-label {
  color: rgba(231, 246, 238, 0.82);
  font-size: 0.92rem;
}

.lang-bar {
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.lang-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
}

.repo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chip {
  font-size: 0.82rem;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(231, 246, 238, 0.88);
}

.chip-muted {
  color: rgba(231, 246, 238, 0.72);
  border-color: rgba(255, 255, 255, 0.10);
}

/* TEXT */
.wide {
  max-width: 800px;
  line-height: 1.8;
  font-size: 1.1rem;
  opacity: 0.9;
}

.subtle {
  opacity: 0.72;
  color: var(--muted);
  font-size: 0.95rem;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.95em;
}

/* TIMELINE */
.timeline {
  display: grid;
  gap: 18px;
  position: relative;
  padding-left: 18px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(to bottom, rgba(45, 212, 191, 0.65), rgba(34, 197, 94, 0.35));
  border-radius: 999px;
  opacity: 0.55;
}

.event-item {
  position: relative;
}

.event {
  width: 100%;
  padding: 25px;
  background: rgba(255, 255, 255, 0.04);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  transition: 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  text-align: left;

  appearance: none;
  display: block;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.event::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 22px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow:
    0 0 0 4px rgba(34, 197, 94, 0.14),
    0 0 28px rgba(34, 197, 94, 0.18);
}

.event:hover {
  background: rgba(34, 197, 94, 0.16);
  transform: translateX(12px);
}

.event-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
  font-size: 0.92rem;
  color: rgba(231, 246, 238, 0.7);
}

.event-hint::after {
  content: "▾";
  display: inline-block;
  transform: translateY(-1px);
  opacity: 0.85;
}

.event[aria-expanded="true"] {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(45, 212, 191, 0.18);
}

.event[aria-expanded="true"]:hover {
  transform: translateX(0);
}

.event[aria-expanded="true"] .event-hint::after {
  content: "▴";
}

.event-details {
  margin-top: 10px;
  margin-left: 14px;
  padding: 18px 22px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.18);
}

.event-bullets {
  margin-top: 12px;
  padding-left: 18px;
  color: rgba(231, 246, 238, 0.88);
}

.event-bullets li {
  margin-top: 8px;
}

/* CONTACT */
.contact-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
  color: rgba(231, 246, 238, 0.9);
}

.social:hover {
  border-color: rgba(45, 212, 191, 0.35);
  box-shadow: 0 0 24px rgba(45, 212, 191, 0.16);
}

.social:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

/* FOOTER */
footer {
  padding: 60px;
  text-align: center;
  opacity: 0.6;
  position: relative;
  z-index: 1;
}

.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  text-decoration: none;
  color: rgba(231, 246, 238, 0.92);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: 0.25s;
  z-index: 20;
}

.to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.to-top:hover {
  border-color: rgba(45, 212, 191, 0.35);
}

.to-top:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

/* MODAL */
.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
}

.modal-dialog {
  position: relative;
  width: min(720px, 100%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(7, 22, 15, 0.92);
  box-shadow: var(--shadow);
  padding: 22px;
}

.modal-dialog h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.modal-bullets {
  margin: 14px 0;
  padding-left: 18px;
  color: rgba(231, 246, 238, 0.88);
}

.modal-bullets li {
  margin-top: 8px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.18);
  color: rgba(231, 246, 238, 0.95);
  cursor: pointer;
}

.modal-close:hover {
  border-color: rgba(45, 212, 191, 0.35);
}

.modal-close:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

/* RESPONSIVE + A11Y */
@media (max-width: 860px) {
  .split {
    grid-template-columns: 1fr;
  }

  .portrait img {
    height: 300px;
  }
}

@media (max-width: 520px) {
  .nav {
    border-radius: var(--radius-lg);
  }

  .nav-links {
    gap: 6px;
  }

  .nav a {
    padding: 9px 10px;
  }
}

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

  .btn,
  .card,
  .event {
    transition: none !important;
  }

  .btn:hover,
  .card:hover,
  .event:hover {
    transform: none !important;
  }

  body.fun-on::before {
    animation: none !important;
  }

  body.night-hike::after {
    animation: none !important;
    opacity: 0.45;
  }
}
