/* ============================================================
   KAYLEE — Personal Website
   Visual direction: quiet editorial, art-tech, light mode only
   ============================================================ */

/* ==================== TOKENS ==================== */

:root {
  --bg:           #0C0B09;
  --bg-tinted:    rgba(22, 18, 14, 0.44);
  --sage:         #7EB8D4;
  --sage-mid:     #4A94BA;
  --sage-light:   #2B6A90;
  --sage-faint:   rgba(126, 184, 212, 0.18);
  --butter:       #ede5d8;
  --butter-light: rgba(210, 195, 170, 0.20);
  --butter-dark:  #e8e0d0;
  --text:         #F4F1ED;
  --text-muted:   #C0B8A8;
  --text-light:   #8C8478;
  --border:       rgba(200, 195, 185, 0.16);
  --white:        rgba(255, 255, 255, 0.92);

  --font-body:    'Plus Jakarta Sans', sans-serif;
  --font-display: 'Fraunces', serif;

  --radius:       8px;
  --radius-lg:    16px;
  --shadow-sm:    0 1px 8px rgba(0,0,0,0.24);
  --shadow:       0 10px 32px rgba(0,0,0,0.26);
  --shadow-hover: 0 18px 56px rgba(86, 86, 86, 0.18);

  --container:    1100px;
  --nav-h:        64px;

  /* ==================== LIQUID GLASS CONFIG ====================
     Tune these first. Higher blur/saturation = stronger glass.
     Cursor vars are updated in script.js on pointer movement.
     ============================================================ */
  --glass-bg:             rgba(32, 28, 24, 0.48);
  --glass-bg-strong:      rgba(44, 38, 30, 0.52);
  --glass-bg-soft:        rgba(14, 12, 9, 0.52);
  --glass-border:         rgba(126, 184, 212, 0.14);
  --glass-border-shadow:  rgba(126, 184, 212, 0.10);
  --glass-blur:           34px;
  --glass-saturate:       1.6;
  --glass-radius:         26px;
  --glass-shadow:         0 22px 70px rgba(0, 0, 0, 0.40), 0 0 44px rgba(0, 0, 0, 0.12);
  --glass-highlight:      rgba(255, 255, 255, 0.14);
  --glass-noise-opacity:  0.30;

  --mist-base:            #1e1c18;
  --mist-sage:            rgba(80, 70, 60, 0.3);
  --mist-cream:           rgba(140, 130, 115, 0.16);
  --mist-lilac:           rgba(150, 140, 130, 0.42);
  --mist-ink:             rgba(0, 0, 0, 0.929);
  --mist-blur:            56px;
  --mist-opacity:         0.94;
}

/* ==================== RESET ==================== */

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

html {
  scroll-padding-top: var(--nav-h);
  font-size: 16px;
  scroll-behavior: smooth;
  overscroll-behavior: none;
}

body {
  overscroll-behavior: none;
}

body {
  background:
    radial-gradient(ellipse 80% 50% at 20% 10%, rgba(126, 184, 212, 0.04) 0%, transparent 55%),
    radial-gradient(ellipse 70% 55% at 80% 85%, rgba(80, 145, 185, 0.03) 0%, transparent 50%),
    #0C0B09;
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  word-spacing: 0.08em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  isolation: isolate;
}

@keyframes mistDrift {
  0% {
    transform: translate3d(-2%, -1%, 0) scale(1);
  }
  100% {
    transform: translate3d(2%, 1.5%, 0) scale(1.04);
  }
}

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

ul { list-style: none; }
a  { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 3px;
  border-radius: 4px;
}

#nav,
.nav-drawer,
.hero-photo img,
.hero-socials a,
.hero-action,
.tag,
.project-card,
.life-panel,
.life-row,
.life-body,
.map-wrapper,
.map-panel,
.panel-close,
.leaflet-control-zoom,
.leaflet-control-attribution,
.photo-item img,
footer,
.mu-role-card,
.mu-track,
.mu-fav-item,
.mu-empty-state,
.gl-visual-empty,
.hover-card,
.location-count,
.map-timeline,
.empty-msg,
#world-wrap {
  background: linear-gradient(160deg, var(--glass-bg-strong) 0%, var(--glass-bg-soft) 60%, rgba(0,0,0,0.55) 100%);
  border: none;
  box-shadow:
    0 24px 72px rgba(0, 0, 0, 0.62),
    0 6px 22px rgba(0, 0, 0, 0.38),
    0 0 0 0.5px rgba(255, 255, 255, 0.10),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.28),
    inset 1px 0 0 rgba(255, 255, 255, 0.09),
    inset -1px 0 0 rgba(0, 0, 0, 0.18),
    inset 0 -2px 10px rgba(0, 0, 0, 0.28);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
}

.project-card,
.life-panel,
.life-row,
.mu-role-card,
.mu-fav-item,
.mu-empty-state,
.gl-visual-empty,
#world-wrap {
  position: relative;
}

.project-card::before,
.life-panel::before,
.life-row::before,
.mu-role-card::before,
.mu-fav-item::before,
.mu-empty-state::before,
.gl-visual-empty::before,
#world-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, transparent 36%),
    radial-gradient(ellipse at 28% 0%, rgba(255, 255, 255, 0.34), transparent 50%);
  opacity: 1;
  mix-blend-mode: screen;
  transition: background 0.06s ease;
}

/* ==================== NAVIGATION ==================== */

#nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}

#nav::before {
  display: none;
}

#nav.scrolled {
  background: rgba(12, 11, 9, 0.92);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom-color: rgba(126, 184, 212, 0.08);
  box-shadow: none;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 32px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-links a {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--sage);
  transition: width 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 10px;
  font-size: 1rem;
  color: var(--text-muted);
  transition: color 0.2s, border-color 0.2s;
}

.nav-menu-btn:hover { color: var(--text); border-color: var(--sage-mid); }

/* ==================== MOBILE NAV DRAWER ==================== */

.nav-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 300;
  width: 260px;
  background: var(--white);
  border-left: 1px solid var(--border);
  padding: 80px 32px 40px;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-drawer.open { transform: translateX(0); }

.nav-drawer ul { display: flex; flex-direction: column; gap: 4px; }

.nav-drawer a {
  display: block;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}

.nav-drawer a:last-child { border-bottom: none; }
.nav-drawer a:hover { color: var(--sage); }

.drawer-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: none;
  font-size: 1.25rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.drawer-close:hover { background: var(--sage); color: white; border-color: var(--sage); }

.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: rgba(42, 40, 38, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
}
.nav-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ==================== LAYOUT HELPERS ==================== */

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

.section {
  padding: 56px 0;
}

#experience {
  padding-top: 72px;
}

.section-tinted {
  background: var(--sage-faint);
}

.section-label {
  margin-bottom: 64px;
}

.section-num {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--sage);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--text);
}

.section-subtitle {
  margin-top: 14px;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* ==================== HERO ==================== */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--nav-h);
  padding-bottom: 32px;
  position: relative;
}

.hero-content {
  max-width: var(--container);
  margin: 0 auto;
  padding: 60px 48px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.hero-header {
  margin-bottom: 36px;
}

.hero-body {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 80px;
  align-items: start;
}

.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--sage);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(60px, 8.5vw, 100px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 0;
}

.hero-statement {
  font-size: 0.96rem;
  line-height: 1.85;
  color: var(--text-muted);
  max-width: 540px;
  margin-bottom: 18px;
}

.hero-statement:last-of-type {
  margin-bottom: 40px;
}

/* Highlighted organization names within hero prose */
.hero-statement .org {
  color: var(--sage);
  font-weight: 500;
}

/* Linked org names */
.hero-statement .org-link {
  color: var(--sage);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1.5px solid transparent;
  padding-bottom: 1px;
  transition: border-color 0.2s;
}
.hero-statement .org-link:hover {
  border-color: var(--sage);
}

/* Logo tooltip for org-logo-link */
.org-logo-tip {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.24);
  opacity: 0;
  transform: translateY(6px) scale(0.96);
  transition: opacity 0.18s ease, transform 0.18s ease;
  white-space: nowrap;
}
.org-logo-tip.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.org-logo-tip img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
}
.org-logo-tip span {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 4px 0 26px;
}

.hero-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s;
}

.hero-action:hover {
  color: var(--sage);
  border-color: var(--sage-light);
  background: var(--sage-faint);
  transform: translateY(-1px);
}

.tag {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--sage-faint);
  color: var(--sage);
  border: 1px solid var(--sage-light);
}

.tag-accent {
  background: var(--butter-light);
  color: var(--butter-dark);
  border-color: var(--butter);
}

/* Hero photo */
.hero-photo { position: relative; }

.photo-placeholder,
.hero-photo img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-placeholder {
  background: var(--sage-faint);
  border: 1px dashed var(--sage-mid);
  color: var(--sage-mid);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-photo img {
  height: auto; /* let aspect-ratio win over the height="533" attribute */
  object-fit: cover;
  display: block;
}

/* Social icons under photo */
.hero-socials {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 18px;
}

.hero-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--white);
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s;
}

.hero-socials a:hover {
  color: var(--sage);
  border-color: var(--sage-light);
  background: var(--sage-faint);
  transform: translateY(-2px);
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0.35;
}

.hero-scroll-hint span {
  font-size: 0.6875rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.scroll-line {
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
  animation: scrollPulse 2.2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(1.08); }
}

/* ==================== EXPERIENCE ==================== */

.exp-group {
  margin-bottom: 56px;
}
.exp-group:last-child { margin-bottom: 0; }

.exp-group-title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 0;
  padding-bottom: 14px;
}

.exp-card {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 36px;
  padding: 28px 32px;
  border: 2px solid rgba(74, 148, 186, 0.48);
  border-radius: 14px;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  margin-bottom: 16px;
  transition: border-color 0.2s ease;
}

.exp-card:last-child {
  margin-bottom: 0;
}

.exp-card:hover {
  border-color: rgba(74, 148, 186, 0.75);
}

.exp-meta {
  padding-top: 4px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

/* Logo badge — floats to the right of the role/org text */

.exp-date {
  font-size: 0.8125rem;
  color: var(--text-light);
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

.exp-badge {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 100px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: var(--sage-faint);
  color: var(--sage);
  border: 1px solid var(--sage-light);
}

.exp-badge-upcoming {
  background: var(--butter-light);
  color: var(--butter-dark);
  border-color: var(--butter);
}

.exp-role {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
  line-height: 1.4;
}

.exp-org {
  font-size: 0.9375rem;
  color: var(--sage);
  font-weight: 500;
  margin-bottom: 12px;
}

.exp-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 14px;
}

.exp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.exp-tags span {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* ==================== EXPERIENCE LIST ==================== */

.exp-list {
  display: flex;
  flex-direction: column;
  gap: 52px;
}

.exp-group-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.exp-entries {
  display: flex;
  flex-direction: column;
}

.exp-entry {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 32px;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.exp-entry-org {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 2px;
}

.exp-entry-role {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.exp-entry-meta {
  font-size: 0.84rem;
  color: var(--text-light);
  line-height: 1.65;
  margin-bottom: 10px;
}

.exp-entry-left {
  display: flex;
  flex-direction: column;
}

.exp-entry-right {
  padding-top: 3px;
}

.exp-entry-date {
  font-size: 0.8125rem;
  color: var(--text-light);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Badge variant used for project status labels */
.exp-entry-badge {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--sage);
  letter-spacing: 0.02em;
  font-variant-numeric: normal;
}

/* ── Linked rows (Blogs, Life) ── */
.exp-entry-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  /* Negative margin + matching padding creates room for the inset shadow
     without shifting surrounding content */
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
  border-radius: 6px;
  transition:
    background 0.22s ease,
    box-shadow 0.22s ease;
}

.exp-entry-link:hover {
  background: rgba(126, 184, 212, 0.05);
  box-shadow: inset 3px 0 0 var(--sage);
}

html[data-theme="light"] .exp-entry-link:hover {
  background: rgba(26, 98, 160, 0.04);
  box-shadow: inset 3px 0 0 var(--sage);
}

.exp-entry-link .exp-entry-org {
  transition: color 0.22s ease;
}

.exp-entry-link:hover .exp-entry-org {
  color: var(--sage);
}

.exp-entry-arrow {
  display: inline-block;
  font-size: 1rem;
  color: var(--text-light);
  transition: transform 0.22s ease, color 0.22s ease;
}

.exp-entry-link:hover .exp-entry-arrow {
  transform: translateX(5px);
  color: var(--sage);
}

/* Light-mode overrides for exp-entry */
html[data-theme="light"] .exp-entry-org {
  color: var(--text);
}
html[data-theme="light"] .exp-entry-role {
  color: var(--text-muted);
}
html[data-theme="light"] .exp-entry-date,
html[data-theme="light"] .exp-entry-meta {
  color: var(--text-light);
}

/* ==================== PROJECTS ==================== */

.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.project-card {
  /* glass bg from global rule — dark gradient + backdrop blur */
  border: 1px solid rgba(126, 184, 212, 0.12);
  border-left: 2px solid rgba(126, 184, 212, 0.30); /* left accent: echoes edu card */
  border-radius: var(--radius-lg);
  padding: 28px 28px 28px 24px;
  position: relative;
  will-change: transform;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 52px rgba(0, 0, 0, 0.36), 0 0 0 1px rgba(126, 184, 212, 0.16);
}

/* In-progress: ghost style on dark */
.project-card-soft {
  background: transparent;
  border: 1px dashed rgba(126, 184, 212, 0.22);
  border-left-width: 1px; /* restore uniform dashed */
}
.project-card-soft:hover {
  transform: none;
  box-shadow: none;
}

.project-card-muted {
  /* inherits dark glass from global rule — no white override */
}

.project-status {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(126, 184, 212, 0.82);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.project-num {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--sage);
  letter-spacing: 0.12em;
}

.project-wip {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(126, 184, 212, 0.40);
}

.project-link {
  font-size: 0.9375rem;
  color: var(--text-muted);
  transition: color 0.2s, transform 0.2s;
  display: inline-block;
}
.project-link:hover { color: var(--sage); transform: translate(2px, -2px); }

.project-title {
  font-family: var(--font-display);
  font-size: 1.3125rem;
  font-weight: 400;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.3;
}

.project-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 22px;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-stack span {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 500;
  background: rgba(74, 148, 186, 0.18);
  color: rgba(126, 184, 212, 0.82);
  border: 1px solid rgba(74, 148, 186, 0.38);
  letter-spacing: 0.02em;
}

/* ==================== WORLD / MAP ==================== */

.map-wrapper {
  position: relative;
  overflow: hidden;
  margin-top: 40px;
  /* subtle top + bottom borders to frame the map */
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

#map {
  width: 100%;
  height: 580px;
  background: var(--sage-faint);
}

/* Map side panel */
.map-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 380px;
  height: 100%;
  background: var(--white);
  border-left: 1px solid var(--border);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 20;
}

.map-panel.open { transform: translateX(0); }

.panel-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white);
  font-size: 1.125rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.panel-close:hover { background: var(--sage); color: white; border-color: var(--sage); }

.panel-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--sage-faint);
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.panel-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  inset: 0;
}

.panel-photo-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sage-mid);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.panel-content {
  padding: 28px 28px 36px;
  flex: 1;
}

.panel-year {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--sage);
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.panel-location {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 16px;
}

.panel-text {
  font-size: 0.9375rem;
  line-height: 1.85;
  color: var(--text-muted);
}

/* Custom Leaflet marker */
.map-pin {
  width: 12px;
  height: 12px;
  background: var(--sage);
  border-radius: 50%;
  border: 2.5px solid white;
  box-shadow: 0 2px 8px rgba(122, 158, 142, 0.55);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.map-pin.is-active {
  background: #4A7A68;
  transform: scale(1.55);
  box-shadow: 0 4px 16px rgba(74, 122, 104, 0.65);
}

/* Leaflet UI overrides */
.leaflet-control-zoom {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  overflow: hidden;
  box-shadow: var(--shadow-sm) !important;
}

.leaflet-control-zoom a {
  color: var(--text-muted) !important;
  background: var(--white) !important;
  border-color: var(--border) !important;
  transition: color 0.2s, background 0.2s !important;
}

.leaflet-control-zoom a:hover {
  color: var(--sage) !important;
  background: var(--sage-faint) !important;
}

.leaflet-control-attribution {
  font-size: 10px !important;
  background: rgba(250, 248, 245, 0.85) !important;
  color: var(--text-light) !important;
}

.leaflet-control-attribution a { color: var(--sage) !important; }

/* ==================== BLOGS ==================== */

.blog-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.blog-card {
  display: flex;
  gap: 44px;
  align-items: flex-start;
  padding: 32px 36px;
  border: 1px solid rgba(126, 184, 212, 0.12);
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 52px rgba(0, 0, 0, 0.36), 0 0 0 1px rgba(126, 184, 212, 0.16);
  border-color: rgba(126, 184, 212, 0.22);
}

.blog-card-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 80px;
  padding-top: 5px;
  flex-shrink: 0;
}

.blog-tag {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage);
}

.blog-date {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.blog-read {
  font-size: 0.8125rem;
  color: rgba(126, 184, 212, 0.55);
}

.blog-card-body {
  flex: 1;
}

.blog-title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 400;
  margin: 0 0 8px;
  line-height: 1.3;
  color: var(--text);
}

.blog-subtitle {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0 0 12px;
  font-style: italic;
  line-height: 1.6;
}

.blog-summary {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin: 0 0 20px;
  opacity: 0.82;
}

.blog-cta {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--sage);
  letter-spacing: 0.02em;
}

/* ────── Blog post page ────── */

.blog-post {
  max-width: 740px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 72px) 24px 96px;
}

.blog-post-header {
  margin-bottom: 56px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(126, 184, 212, 0.10);
}

.blog-post-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 36px;
  transition: color 0.2s;
}
.blog-post-back:hover { color: var(--sage); }

.blog-post-tag {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 16px;
}

.blog-post-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 16px;
  color: var(--text);
}

.blog-post-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.65;
  margin: 0 0 28px;
}

.blog-post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.8125rem;
  color: rgba(126, 184, 212, 0.65);
}
html[data-theme="light"] .blog-post-meta {
  color: rgba(40, 98, 140, 0.55);
}
.blog-post-meta span + span::before {
  content: "·";
  margin-right: 16px;
}

/* Article body */
.blog-post-body {
  font-size: 0.9375rem;
  line-height: 1.85;
  color: var(--text-muted);
}

.blog-post-body h2 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 400;
  color: var(--text);
  margin: 56px 0 16px;
  line-height: 1.3;
}

.blog-post-body h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 36px 0 12px;
  letter-spacing: 0.01em;
}

.blog-post-body p {
  margin: 0 0 20px;
}

.blog-post-body p.beat {
  color: var(--text);
  font-size: 1.0625rem;
  font-style: italic;
  margin: 28px 0;
  opacity: 0.9;
}

.blog-post-body .code-line {
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  font-size: 0.86rem;
  line-height: 1.65;
  letter-spacing: -0.01em;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 3px solid var(--sage);
  border-radius: 4px 8px 8px 4px;
  padding: 14px 20px;
  margin: 16px 0 24px;
  color: var(--text);
  display: block;
}

.blog-post-body .arrow {
  color: var(--sage);
  margin: 0 6px;
}

/* References */
.blog-references {
  margin-top: 72px;
  padding-top: 36px;
  border-top: 1px solid rgba(126, 184, 212, 0.10);
}

.blog-references h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text);
  margin: 0 0 28px;
}

.blog-ref-group {
  margin-bottom: 28px;
}

.blog-ref-group h3 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage);
  margin: 0 0 12px;
}

.blog-ref-group ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.blog-ref-group ul li {
  font-size: 0.875rem;
  color: var(--text-muted);
  padding-left: 16px;
  position: relative;
  line-height: 1.6;
}

.blog-ref-group ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: rgba(126, 184, 212, 0.35);
}

/* Blog post page: override body background for better readability */
/* Light mode: swap saturated lavender for near-neutral warm white */
html[data-theme="light"] body.blog-body {
  background: #FAF8F5;
}
/* Dark mode: already #000 — comfortable for reading, no change needed */

/* Light theme overrides for blog */
html[data-theme="light"] .blog-card {
  border-color: rgba(60, 130, 180, 0.12);
}
html[data-theme="light"] .blog-card:hover {
  border-color: rgba(60, 130, 180, 0.25);
}
html[data-theme="light"] .blog-post-body .code-line {
  background: #F1EDE6;               /* warm stone — sits on the #FAF8F5 page */
  border-color: #E4DED4;
  border-left-color: #1A4E7A;        /* deep navy accent */
  color: #1F2933;
}
html[data-theme="light"] .blog-post-body .arrow {
  color: #1A4E7A;
}

@media (max-width: 640px) {
  .blog-card {
    flex-direction: column;
    gap: 16px;
    padding: 24px;
  }
  .blog-card-meta {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
  }
}

/* ==================== LIFE — main page panels ==================== */

.life-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

/* Both panels animate together — prevents staggered translateY misalignment */
.life-panels .life-panel.fade-in {
  transition-delay: 80ms !important;
}

.life-panel[hidden] {
  display: none;
}

.life-panel {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(126, 184, 212, 0.16);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  will-change: transform;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.life-panel:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(20, 60, 110, 0.35), 0 0 0 1px rgba(126, 184, 212, 0.20);
}

/* Preview image area */
.life-panel-img {
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  position: relative;
}

.life-panel-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.life-panel:hover .life-panel-img img {
  transform: scale(1.04);
}

/* Placeholder colors — dark, moody; match the site palette */
.life-panel-img--travel {
  background: linear-gradient(150deg, rgba(14,45,68,1) 0%, rgba(5,18,28,1) 100%);
}
.life-panel-img--hobbies {
  background: linear-gradient(150deg, rgba(20,59,86,1) 0%, rgba(8,30,46,1) 100%);
}
.life-panel-img--photography { background: rgba(10, 30, 44, 0.95); }

/* Faint dot grid texture on placeholders (until real images are added) */
.life-panel-img--travel::after,
.life-panel-img--hobbies::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(167,218,255,0.08) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}

/* Info strip — dark glass, flush with panel */
.life-panel-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  background: rgba(8, 14, 28, 0.75);
  border-top: 1px solid rgba(126, 184, 212, 0.12);
  gap: 12px;
}

.life-panel-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 2px;
}

.life-panel-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.life-panel-arrow {
  font-size: 1.125rem;
  color: var(--sage);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.life-panel:hover .life-panel-arrow {
  transform: translateX(4px);
}

/* ==================== LIFE — hobbies sub-page rows ==================== */

.life-rows {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.life-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow 0.25s ease;
}

.life-row:hover {
  box-shadow: var(--shadow-hover);
}

/* ---- Left label panel ---- */
.life-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 36px 24px;
  text-align: center;
}

/* Per-row accent colours */
.life-label--cards       { background: #D4EBE0; }
.life-label--food        { background: #FDE8CC; }
.life-label--instruments { background: #E0E6F0; }
.life-label--arts        { background: #D8E9F5; }

.life-icon-row {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(10, 33, 50, 0.68);
}

.life-icon-row svg {
  display: block;
  flex-shrink: 0;
}

.life-title-row {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: rgba(10, 33, 50, 0.75);
}

/* ---- Right body panel ---- */
.life-body {
  background: var(--white);
  padding: 32px 36px;
}

.life-sub {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 8px;
  margin-top: 20px;
}

.life-sub:first-child { margin-top: 0; }

.life-body p {
  font-size: 0.9375rem;
  line-height: 1.85;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ==================== SUB-PAGE SHARED ==================== */

.subpage-header {
  margin-bottom: 56px;
  background: transparent;
  border: 0;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.subpage-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 28px;
  transition: color 0.2s;
}
.subpage-back:hover { color: var(--sage); }

/* ==================== FOOTER ==================== */

footer {
  padding: 48px 0;
  border-top: 1px solid var(--border);
}

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

.footer-name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--text);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--sage); }

.footer-copy {
  font-size: 0.8125rem;
  color: var(--text-light);
}

/* ==================== FADE-IN ANIMATIONS ==================== */

.fade-in {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.80s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.80s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered entry for cards in a grid/list — each child cascades */
.project-list .project-card.fade-in:nth-child(2)  { transition-delay: 80ms; }
.project-list .project-card.fade-in:nth-child(3)  { transition-delay: 160ms; }
.project-list .project-card.fade-in:nth-child(4)  { transition-delay: 240ms; }
.project-list .project-card.fade-in:nth-child(5)  { transition-delay: 320ms; }
.project-list .project-card.fade-in:nth-child(n+6){ transition-delay: 400ms; }

.blog-list .blog-card.fade-in:nth-child(2)  { transition-delay: 80ms; }
.blog-list .blog-card.fade-in:nth-child(3)  { transition-delay: 160ms; }
.blog-list .blog-card.fade-in:nth-child(n+4){ transition-delay: 240ms; }

/* ==================== LIQUID GLASS FINAL OVERRIDES ==================== */

.section,
.section-tinted,
.mu-section,
.mu-section--tinted,
.gl-photo-section {
  background: transparent;
}

.subpage-header {
  background: transparent;
  border: 0;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

#nav {
  background: linear-gradient(135deg, rgba(13, 29, 40, 0.96), rgba(3, 8, 12, 0.98));
  border-bottom-color: rgba(205, 234, 255, 0.16);
  -webkit-backdrop-filter: blur(10px) saturate(1.12);
  backdrop-filter: blur(10px) saturate(1.12);
}

#nav.scrolled {
  border-bottom-color: var(--glass-border);
  box-shadow: none;
}

.nav-drawer,
.hero-action,
.tag,
.hero-socials a,
.exp-card,
.project-card,
.project-card-soft,
.project-card-muted,
.life-panel,
.life-panel-info,
.life-row,
.life-body,
.map-panel,
.panel-close,
.photo-item img,
footer,
.mu-role-card,
.mu-track,
.mu-fav-item,
.mu-empty-state,
.gl-visual-empty,
.hover-card,
.location-count,
.map-timeline,
.empty-msg,
#world-wrap {
  background: linear-gradient(135deg, var(--glass-bg-strong), var(--glass-bg-soft));
  border-color: var(--glass-border);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
}

.hero-photo img,
.life-panel-img,
.gl-visual-placeholder,
.gl-photo-placeholder,
.mu-track-cover--ph,
.mu-fav-cover--ph,
.mu-vinyl-cover-ph {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36);
  filter: saturate(0.94) contrast(0.96);
}

.exp-card {
  border-radius: var(--glass-radius);
  padding: 28px;
  margin-bottom: 16px;
}

.project-card,
.life-panel,
.life-row,
.mu-role-card,
.mu-fav-item,
.mu-empty-state,
.gl-visual-empty,
#world-wrap {
  overflow: hidden;
}

.hero-statement,
.exp-desc,
.project-desc,
.life-panel-desc,
.life-body p,
.footer-copy,
.section-subtitle,
.mu-role-body,
.mu-section-desc,
.mu-fav-note,
.gl-section-desc {
  color: var(--text-muted);
}

.hero-name,
.section-title,
.project-title,
.life-panel-title,
.exp-role,
.footer-name,
.mu-page-title,
.mu-section-title,
.gl-page-title {
  color: var(--text);
}

.life-panel-img--travel,
.life-panel-img--hobbies {
  background:
    radial-gradient(circle at var(--cursor-x) var(--cursor-y), rgba(178, 223, 255, 0.26), transparent 0 22%),
    linear-gradient(135deg, rgba(55, 114, 156, 0.68), rgba(9, 22, 31, 0.74));
}

footer {
  border-top-color: rgba(255, 255, 255, 0.46);
}

/* ============================================================
   THEME TOGGLE BUTTON
   ============================================================ */

.nav-theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: 50%;
  padding: 5px;
  transition: color 0.2s, background 0.2s;
  flex-shrink: 0;
}
.nav-theme-btn:hover {
  color: var(--sage);
  background: rgba(74, 148, 186, 0.12);
}
.theme-icon {
  width: 16px;
  height: 16px;
  display: block;
  transition: opacity 0.2s;
}
/* Dark mode: show sun (click → go light) */
:root .theme-icon--moon { display: none; }
:root .theme-icon--sun  { display: block; }
/* Light mode: show moon (click → go dark) */
html[data-theme="light"] .theme-icon--sun  { display: none; }
html[data-theme="light"] .theme-icon--moon { display: block; }

/* ============================================================
   LIGHT THEME
   Redefine CSS custom properties + override hardcoded colours
   ============================================================ */

html[data-theme="light"] {
  /* Core palette — warm cream */
  --bg:             #FAF8F5;
  --bg-tinted:      rgba(100, 85, 70, 0.06);
  --sage:           #1A62A0;
  --sage-mid:       #4A94BA;
  --sage-light:     #7ABFDF;
  --sage-faint:     rgba(26, 98, 160, 0.08);
  --butter:         #1A4E80;
  --butter-light:   rgba(26, 98, 160, 0.08);
  --butter-dark:    #0F3060;
  --text:           #1C1917;
  --text-muted:     #44403C;
  --text-light:     #78716C;
  --border:         rgba(120, 100, 80, 0.14);
  --white:          rgba(255, 255, 255, 0.96);

  /* Glass — warm white variants */
  --glass-bg:            rgba(250, 248, 245, 0.84);
  --glass-bg-strong:     rgba(255, 254, 252, 0.90);
  --glass-bg-soft:       rgba(245, 243, 240, 0.78);
  --glass-border:        rgba(120, 100, 80, 0.14);
  --glass-border-shadow: rgba(100, 80, 60, 0.08);
  --glass-shadow:        0 8px 30px rgba(0, 0, 0, 0.07),
                         0 0 0 0.5px rgba(255, 255, 255, 0.80),
                         inset 0 1.5px 0 rgba(255, 255, 255, 0.95),
                         inset 1px 0 0 rgba(255, 255, 255, 0.65);
  --glass-highlight:     rgba(255, 255, 255, 0.75);
  --shadow:              0 6px 20px rgba(0, 0, 0, 0.07);
  --shadow-sm:           0 1px 6px rgba(0, 0, 0, 0.05);
  --shadow-hover:        0 12px 40px rgba(0, 0, 0, 0.10);
}

/* Body */
html[data-theme="light"] body {
  background:
    radial-gradient(ellipse 80% 50% at 15% 10%, rgba(26, 98, 160, 0.04) 0%, transparent 55%),
    radial-gradient(ellipse 70% 55% at 85% 80%, rgba(30, 65, 120, 0.03) 0%, transparent 50%),
    #FAF8F5;
  background-attachment: fixed;
}


/* Global glass elements — override the dark-ending gradient */
html[data-theme="light"] #nav,
html[data-theme="light"] .nav-drawer,
html[data-theme="light"] .hero-photo img,
html[data-theme="light"] .hero-socials a,
html[data-theme="light"] .hero-action,
html[data-theme="light"] .tag,
html[data-theme="light"] .project-card,
html[data-theme="light"] .life-panel,
html[data-theme="light"] .life-row,
html[data-theme="light"] .life-body,
html[data-theme="light"] .map-wrapper,
html[data-theme="light"] .map-panel,
html[data-theme="light"] .panel-close,
html[data-theme="light"] .leaflet-control-zoom,
html[data-theme="light"] .leaflet-control-attribution,
html[data-theme="light"] html[data-theme="light"] html[data-theme="light"] html[data-theme="light"] .photo-item img,
html[data-theme="light"] footer,
html[data-theme="light"] .mu-role-card,
html[data-theme="light"] .mu-track,
html[data-theme="light"] .mu-fav-item,
html[data-theme="light"] .mu-empty-state,
html[data-theme="light"] .gl-visual-empty,
html[data-theme="light"] .hover-card,
html[data-theme="light"] .location-count,
html[data-theme="light"] .map-timeline,
html[data-theme="light"] .empty-msg,
html[data-theme="light"] #world-wrap {
  background: linear-gradient(160deg, var(--glass-bg-strong) 0%, var(--glass-bg-soft) 60%, rgba(255,255,255,0.60) 100%);
  box-shadow:
    0 8px 30px rgba(0, 0, 0, 0.07),
    0 2px 8px rgba(20, 55, 110, 0.05),
    0 0 0 0.5px rgba(255, 255, 255, 0.70),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.92),
    inset 1px 0 0 rgba(255, 255, 255, 0.60);
}

/* Final-override block also targets these — match with light versions */
html[data-theme="light"] .nav-drawer,
html[data-theme="light"] .hero-action,
html[data-theme="light"] .tag,
html[data-theme="light"] .hero-socials a,
html[data-theme="light"] .exp-card,
html[data-theme="light"] .project-card,
html[data-theme="light"] .project-card-soft,
html[data-theme="light"] .project-card-muted,
html[data-theme="light"] .life-panel,
html[data-theme="light"] .life-panel-info,
html[data-theme="light"] .life-row,
html[data-theme="light"] .life-body,
html[data-theme="light"] .map-panel,
html[data-theme="light"] .panel-close,
html[data-theme="light"] html[data-theme="light"] html[data-theme="light"] html[data-theme="light"] .photo-item img,
html[data-theme="light"] footer,
html[data-theme="light"] .mu-role-card,
html[data-theme="light"] .mu-track,
html[data-theme="light"] .mu-fav-item,
html[data-theme="light"] .mu-empty-state,
html[data-theme="light"] .gl-visual-empty,
html[data-theme="light"] .hover-card,
html[data-theme="light"] .location-count,
html[data-theme="light"] .map-timeline,
html[data-theme="light"] .empty-msg,
html[data-theme="light"] #world-wrap {
  background: linear-gradient(135deg, var(--glass-bg-strong), var(--glass-bg-soft));
  border-color: rgba(120, 100, 80, 0.13);
  box-shadow: var(--glass-shadow);
}

/* ── Experience cards — transparent + blue border ── */
html[data-theme="light"] .exp-v2-card {
  background: transparent;
  border-color: rgba(26, 98, 160, 0.32);
}
html[data-theme="light"] .exp-v2-card:hover {
  border-color: rgba(26, 98, 160, 0.60);
}

/* ── Timeline hardcoded colours — deep blue ── */
/* Base blue: rgb(22, 73, 110) — saturated, elegant on light bg */

html[data-theme="light"] .tl-dot {
  background: #eaf3fa;
  border-color: rgba(22, 73, 110, 0.80);
  box-shadow: 0 0 8px rgba(22, 73, 110, 0.18);
}

html[data-theme="light"] .tl-spine-line::after {
  background: linear-gradient(
    to bottom,
    rgba(22, 73, 110, 0.04),
    rgba(22, 73, 110, 0.30) 10%,
    rgba(22, 73, 110, 0.30) 90%,
    rgba(22, 73, 110, 0.04)
  );
}

html[data-theme="light"] .tl-col-label {
  color: rgba(22, 73, 110, 0.72);
}

html[data-theme="light"] .tl-year {
  color: rgba(22, 73, 110, 0.75);
}

html[data-theme="light"] .tl-edu-card {
  border-left-color: rgba(22, 73, 110, 0.52);
}
html[data-theme="light"] .tl-edu-cell--sticky::before {
  background: rgba(22, 73, 110, 0.52);
}
html[data-theme="light"] .tl-edu-period {
  color: rgba(22, 73, 110, 0.75);
}
html[data-theme="light"] .tl-edu-note {
  color: rgba(22, 73, 110, 0.60);
}
html[data-theme="light"] .tl-edu-detail {
  color: rgba(18, 59, 88, 0.62);
}

html[data-theme="light"] .tl-plain-text {
  color: rgba(18, 59, 88, 0.72);
}
html[data-theme="light"] .tl-plain-dim {
  color: rgba(18, 59, 88, 0.42);
}
html[data-theme="light"] .tl-hl {
  color: rgba(22, 73, 110, 0.92);
}
html[data-theme="light"] .tl-turning-point {
  color: rgba(22, 73, 110, 0.82);
}

html[data-theme="light"] .tl-era-gap::after {
  color: rgba(22, 73, 110, 0.42);
}

html[data-theme="light"] .tl-toggle-invite {
  color: rgba(18, 59, 88, 0.58);
}
html[data-theme="light"] .tl-toggle-invite em {
  color: rgba(22, 73, 110, 0.85);
}

html[data-theme="light"] .exp-v2-toggle {
  background: rgba(22, 73, 110, 0.07);
  border-color: rgba(22, 73, 110, 0.28);
}
html[data-theme="light"] .exp-v2-toggle-track {
  background: rgba(22, 73, 110, 0.20);
}

html[data-theme="light"] .exp-v2-quote {
  color: rgba(22, 73, 110, 0.82);
  border-left-color: rgba(22, 73, 110, 0.45);
}
html[data-theme="light"] .tl-card-date {
  color: rgba(22, 73, 110, 0.72);
}

/* Project cards */
html[data-theme="light"] .project-card {
  border-color: rgba(62, 126, 172, 0.14);
  border-left-color: rgba(62, 126, 172, 0.32);
}
html[data-theme="light"] .project-card:hover {
  box-shadow: 0 12px 40px rgba(20, 55, 110, 0.13),
              0 0 0 1px rgba(26, 98, 160, 0.18);
}
html[data-theme="light"] .project-card-soft {
  border-color: rgba(26, 98, 160, 0.22);
  border-left-color: rgba(26, 98, 160, 0.22);
}
html[data-theme="light"] .project-stack span {
  background: rgba(26, 98, 160, 0.09);
  border-color: rgba(26, 98, 160, 0.26);
  color: rgba(26, 98, 160, 0.88);
}

/* Life panels */
html[data-theme="light"] .life-panel {
  border-color: rgba(26, 98, 160, 0.18);
}
html[data-theme="light"] .life-panel:hover {
  box-shadow: 0 14px 44px rgba(20, 55, 110, 0.14),
              0 0 0 1px rgba(26, 98, 160, 0.18);
}
html[data-theme="light"] .life-panel-img--travel {
  background: linear-gradient(150deg, rgba(184, 217, 240, 0.70) 0%, rgba(160, 198, 225, 0.55) 100%);
}
html[data-theme="light"] .life-panel-img--hobbies {
  background: linear-gradient(150deg, rgba(200, 228, 248, 0.70) 0%, rgba(178, 211, 234, 0.55) 100%);
}
html[data-theme="light"] .life-panel-img--travel::after,
html[data-theme="light"] .life-panel-img--hobbies::after {
  background-image: radial-gradient(circle, rgba(26, 98, 160, 0.12) 1px, transparent 1px);
}
html[data-theme="light"] .life-panel-info {
  background: rgba(224, 240, 252, 0.80);
  border-top-color: rgba(90, 152, 196, 0.15);
}

/* Footer in light */
html[data-theme="light"] footer {
  border-top-color: rgba(26, 98, 160, 0.18);
}

/* Nav link underline accent */
html[data-theme="light"] .nav-theme-btn:hover {
  background: rgba(26, 98, 160, 0.10);
}

/* Nav — light mode scrolled state (must be after big glass overrides) */
html[data-theme="light"] #nav {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom-color: transparent !important;
  box-shadow: none !important;
}
html[data-theme="light"] #nav.scrolled {
  background: rgba(250, 248, 245, 0.94) !important;
  backdrop-filter: blur(20px) saturate(1.3) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.3) !important;
  border-bottom-color: rgba(120, 100, 80, 0.08) !important;
  box-shadow: none !important;
}

/* Smooth transitions between themes */
html {
  transition: background-color 0.35s ease, color 0.35s ease;
}
body, #nav {
  transition: background 0.35s ease, color 0.35s ease;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .fade-in {
    opacity: 1;
    transform: none;
  }
}

/* ==================== RESPONSIVE — 1024px ==================== */

@media (max-width: 1024px) {
  .hero-body {
    grid-template-columns: 1fr 340px;
    gap: 56px;
  }
}

/* ==================== RESPONSIVE — 900px ==================== */

@media (max-width: 900px) {
  #nav { padding: 0 24px; }
  .nav-links { display: none; }
  .nav-menu-btn { display: flex; }

  .container { padding: 0 24px; }

  .hero-content {
    padding: 40px 24px 60px;
  }

  .hero-body {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* Photo shows below text on tablet */
  .hero-photo {
    max-width: 300px;
  }

  .exp-card {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .exp-meta {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }

  .projects-grid,
  .life-panels {
    grid-template-columns: 1fr;
  }

  .life-row {
    grid-template-columns: 1fr;
  }

  .life-label {
    flex-direction: row;
    justify-content: flex-start;
    padding: 20px 24px;
    gap: 14px;
  }

  .map-panel {
    width: 320px;
  }

  .section { padding: 88px 0; }
}

/* ==================== RESPONSIVE — 640px ==================== */

@media (max-width: 640px) {
  .hero-name { font-size: 52px; }

  /* On phones, show a smaller photo centered above the intro text */
  .hero-photo {
    order: -1;
    width: 100%;
    max-width: 240px;
    margin: 0 auto;
  }

  /* Map panel becomes a bottom sheet on mobile */
  .map-panel {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 72vh;
    border-left: none;
    border-top: 1px solid var(--border);
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
  }

  .map-panel.open { transform: translateY(0); }

  .panel-photo { aspect-ratio: 16 / 9; }

  .section { padding: 72px 0; }

  .section-label { margin-bottom: 44px; }

  footer .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* ==================== RESPONSIVE — 400px ==================== */

@media (max-width: 400px) {
  #nav { padding: 0 16px; }
  .container { padding: 0 16px; }
  .hero-content { padding: 32px 16px 48px; }
}

/* ============================================================
   EXPERIENCE V2 — DEMO (toggle + pull-quote)
   ============================================================ */

.exp-v2-demo-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(74, 148, 186, 0.10);
  border: 1px solid rgba(74, 148, 186, 0.32);
  border-radius: 100px;
  padding: 5px 16px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(126, 184, 212, 0.75);
  margin-bottom: 36px;
}

/* Toggle pill */
.exp-v2-toggle-wrap {
  margin-bottom: 52px;
}

.exp-v2-toggle {
  position: relative;
  display: inline-flex;
  background: rgba(74, 148, 186, 0.08);
  border: 1px solid rgba(74, 148, 186, 0.22);
  border-radius: 100px;
  padding: 3px;
}

.exp-v2-toggle-track {
  position: absolute;
  top: 3px;
  left: 0;
  height: calc(100% - 6px);
  background: rgba(74, 148, 186, 0.26);
  border-radius: 100px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.exp-v2-btn {
  position: relative;
  z-index: 1;
  padding: 5px 12px;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 100px;
  cursor: pointer;
  opacity: 0.45;
  transition: opacity 0.25s ease;
}

.exp-v2-btn.active {
  opacity: 1;
}

/* Cards */
.exp-v2-card {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 36px;
  padding: 18px 22px;
  border: 2px solid rgba(74, 148, 186, 0.42);
  border-radius: 12px;
  background: transparent;
  margin-bottom: 16px;
  transition: border-color 0.2s ease;
}

.exp-v2-card:last-child {
  margin-bottom: 0;
}

.exp-v2-card:hover {
  border-color: rgba(74, 148, 186, 0.72);
}

/* Pull-quote — always visible */
.exp-v2-quote {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 400;
  font-size: 15.5px;
  line-height: 1.6;
  color: rgba(126, 184, 212, 0.78);
  border-left: 2px solid rgba(74, 148, 186, 0.45);
  padding-left: 14px;
  margin: 10px 0 18px;
}

/* Pane crossfade via CSS grid stacking */
.exp-v2-pane-wrap {
  display: grid;
  grid-template-rows: 1fr;
  grid-template-columns: 1fr;
}

.exp-v2-pane {
  grid-row: 1;
  grid-column: 1;
  transition: opacity 0.35s ease;
}

/* Story pane hidden by default */
.exp-v2-story {
  opacity: 0;
  pointer-events: none;
}

/* Story mode: swap visibility */
[data-expmode="story"] .exp-v2-resume {
  opacity: 0;
  pointer-events: none;
}

[data-expmode="story"] .exp-v2-story {
  opacity: 1;
  pointer-events: auto;
}

/* Divider between demo and old section */
.exp-demo-divider {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 8px 0 0;
}

.exp-demo-divider::before,
.exp-demo-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(74, 148, 186, 0.18);
}

.exp-demo-divider span {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(126, 184, 212, 0.35);
  white-space: nowrap;
}

/* ============================================================
   EXPERIENCE TIMELINE — edu left · spine center · jobs right
   ============================================================ */

.exp-timeline {
  display: grid;
  grid-template-columns: 250px 52px 1fr;
  grid-auto-rows: auto;
  position: relative;
}

/* Remove bottom margin from cards living inside timeline cells */
.tl-job-cell .exp-v2-card {
  margin-bottom: 0;
}

/* ── Spine line ─────────────────────────────────────── */
.tl-spine-line {
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.tl-spine-line::after {
  content: '';
  width: 1.5px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(74, 148, 186, 0.05),
    rgba(74, 148, 186, 0.38) 10%,
    rgba(74, 148, 186, 0.38) 90%,
    rgba(74, 148, 186, 0.05)
  );
}

/* ── Column headers (row 1) ─────────────────────────── */
.tl-col-head {
  padding-bottom: 20px;
}

.tl-col-label {
  display: block;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(126, 184, 212, 0.65);
  margin-bottom: 0;
  font-weight: 500;
}

.tl-col-head-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Toggle + invite text in a horizontal row */
.tl-toggle-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

/* Invite text to the right of the toggle */
.tl-toggle-invite {
  font-size: 12px;
  line-height: 1.5;
  color: rgba(126, 184, 212, 0.4);
  margin: 0;
}

.tl-toggle-invite em {
  font-style: normal;
  color: rgba(126, 184, 212, 0.72);
}

/* ── Dot ────────────────────────────────────────────── */
.tl-dot-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 4px;
  gap: 6px;
  position: relative;
  z-index: 2;
}

.tl-year {
  font-size: 12px;
  letter-spacing: 0.05em;
  color: rgba(126, 184, 212, 0.62);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  font-weight: 500;
}

.tl-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #0a1f2e;
  border: 2px solid rgba(74, 148, 186, 0.9);
  box-shadow: 0 0 10px rgba(74, 148, 186, 0.4);
  flex-shrink: 0;
}

/* Unlabeled dot (no year text) — push dot down to align with card top */
.tl-dot-cell--plain {
  padding-top: 28px;
  justify-content: flex-start;
}

/* ── Education cell (left) ──────────────────────────── */
.tl-edu-cell {
  padding-right: 20px;
  padding-bottom: 20px;
  display: flex;
  align-items: stretch;   /* card fills full spanned height */
}

.tl-edu-card {
  padding: 24px 0 24px 20px;
  border-left: 3px solid rgba(74, 148, 186, 0.50);
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

/* ── Sticky NYU edu card (spans the full 2021-2025 era) ─ */
/* The cell fills rows 2-8; the card sticks within that    */
/* region so it stays visible while scrolling TCL/TikTok. */
.tl-edu-cell--sticky {
  display: block;       /* allows sticky child to work     */
  position: relative;   /* anchors the ::before track      */
}

/* Full-height border track — replaces card's border-left  */
.tl-edu-cell--sticky::before {
  content: '';
  position: absolute;
  top: 24px;            /* aligns with card's padding-top  */
  bottom: 0;            /* extends to bottom of the span   */
  left: 0;
  width: 3px;
  background: rgba(74, 148, 186, 0.50);
  border-radius: 2px;
}

/* Card sticks as user scrolls through the NYU era rows    */
.tl-edu-cell--sticky .tl-edu-card {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
  height: auto;
  width: auto;
  border-left: none;    /* handled by ::before track       */
}

.tl-edu-period {
  display: block;
  font-size: 12px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(126, 184, 212, 0.65);
  margin-bottom: 10px;
}

.tl-edu-degree {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 400;
  font-size: 20px;
  line-height: 1.25;
  color: var(--text);
  margin: 0 0 7px;
}

.tl-edu-school {
  font-size: 15px;
  font-weight: 500;
  color: var(--sage);
  margin: 0 0 7px;
}

.tl-edu-note {
  display: block;
  font-size: 12px;
  color: rgba(126, 184, 212, 0.55);
  letter-spacing: 0.03em;
  margin-bottom: 12px;
}

.tl-edu-detail {
  font-size: 12.5px;
  line-height: 1.65;
  color: rgba(240, 249, 255, 0.45);
  margin: 0;
}

/* ── Job cell (right) ───────────────────────────────── */
.tl-job-cell {
  padding-bottom: 14px;
}

/* Cards inside timeline: single-column, no date meta column */
.tl-job-cell .exp-v2-card {
  grid-template-columns: 1fr;
  gap: 6px;
  margin-bottom: 0;
}

/* Timeline card content — slightly compact vs global defaults */
.tl-job-cell .exp-role  { font-size: 0.9375rem; }
.tl-job-cell .exp-org   { font-size: 0.875rem; margin-bottom: 8px; }
.tl-job-cell .exp-desc  { font-size: 0.9rem; line-height: 1.72; margin-bottom: 12px; }
.tl-job-cell .exp-v2-quote {
  font-size: 15px;
  margin: 8px 0 14px;
}

/* ── Card header: role+org left, date right ─────────── */
.tl-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 2px;
}

.tl-card-title {
  flex: 1;
  min-width: 0;
}

.tl-card-date {
  font-size: 11.5px;
  color: rgba(126, 184, 212, 0.75);
  letter-spacing: 0.03em;
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 3px;
  font-variant-numeric: tabular-nums;
}

/* ── Plain text cell (no card) ──────────────────────── */
.tl-plain-cell {
  /* padding-top ≈ dot-cell padding-top(4) + year-label height(~13) + gap(6)
     so text starts level with the dot circle, not the year label above it */
  padding: 22px 0 16px 4px;
  display: flex;
  align-items: flex-start;
}

.tl-plain-text {
  font-size: 13px;
  line-height: 1.8;
  color: rgba(240, 249, 255, 0.4);
  margin: 0;
  font-style: italic;
}

/* Dimmed items (non-tech roles in exploration list) */
.tl-plain-dim {
  color: rgba(240, 249, 255, 0.28);
}

/* Highlighted items (tech / ML-related) */
.tl-hl {
  color: rgba(126, 184, 212, 0.88);
  font-style: normal;
  font-weight: 500;
}

/* [Turning Point] marker */
.tl-turning-point {
  color: var(--sage);
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* ── Era gap row ────────────────────────────────────── */
.tl-era-gap {
  min-height: 16px;
  position: relative;
}

/* Subtle year-change label across the gap */
.tl-era-gap::after {
  content: '·  ·  ·';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: rgba(74, 148, 186, 0.28);
}

/* ── Responsive collapse ────────────────────────────── */
@media (max-width: 860px) {
  .exp-timeline {
    grid-template-columns: 200px 44px 1fr;
  }

  .tl-edu-degree { font-size: 14px; }
}

@media (max-width: 640px) {
  /* Stack into single column on mobile */
  .exp-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .tl-spine-line,
  .tl-dot-cell,
  .tl-era-gap { display: none; }

  .tl-edu-cell {
    padding-right: 0;
    padding-bottom: 12px;
  }

  .tl-edu-card {
    border-left: none;
    border-top: 2px solid rgba(74, 148, 186, 0.35);
    padding: 16px 0 0;
  }

  .tl-job-cell { padding-bottom: 12px; }

  .exp-v2-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
