/* ============================================================
   Portfolio — editorial, warm, animation-driven
   ============================================================ */

/* --- Tokens (light mode default) --- */
:root {
  --bg:         #faf8f5;
  --bg-alt:     #f1ede8;
  --bg-nav:     rgba(250, 248, 245, 0.88);
  --bg-mobile:  rgba(250, 248, 245, 0.97);
  --bg-dark:    #1a1816;
  --text:       #2c2824;
  --text-soft:  #7a7067;
  --accent:     #c4653a;
  --accent-hover: #a8502c;
  --border:     rgba(44, 40, 36, 0.10);
  --border-md:  rgba(44, 40, 36, 0.18);
  --card-bg:    #ffffff;
  --card-shadow: rgba(0, 0, 0, 0.06);
  --serif:      "Geist", system-ui, -apple-system, sans-serif;
  --sans:       "Geist", system-ui, -apple-system, sans-serif;
  --mono:       "Geist Mono", ui-monospace, monospace;
  --ease:       cubic-bezier(0.22, 1, 0.36, 1);
  --max-w:      1400px;
}

/* --- Dark mode --- */
[data-theme="dark"] {
  --bg:         #111110;
  --bg-alt:     #1a1918;
  --bg-nav:     rgba(17, 17, 16, 0.88);
  --bg-mobile:  rgba(17, 17, 16, 0.97);
  --bg-dark:    #0c0c0b;
  --text:       #eae8e4;
  --text-soft:  #8a857e;
  --accent:     #d4734a;
  --accent-hover: #e08050;
  --border:     rgba(234, 232, 228, 0.08);
  --border-md:  rgba(234, 232, 228, 0.14);
  --card-bg:    #1a1918;
  --card-shadow: rgba(0, 0, 0, 0.25);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.08rem);
  font-weight: 400;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}

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

::selection {
  background: var(--accent);
  color: #fff;
}

/* --- THEME TRANSITION on key elements --- */
.nav, .section, .section--alt, .project, .interest, .post, .footer,
.mobile-nav, .pill, .project__stack span {
  transition: background-color 0.5s var(--ease), border-color 0.5s var(--ease), color 0.5s var(--ease);
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem clamp(1rem, 3vw, 2rem);
  background: var(--bg-nav);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
  transition: opacity 0.3s;
}

.nav__logo:hover { opacity: 0.7; }

.nav__logo-mark {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text);
  border: 1.5px solid var(--text);
  padding: 0.15rem 0.35rem;
  line-height: 1;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}

.nav__logo:hover .nav__logo-mark {
  background: var(--text);
  color: var(--bg);
}

.nav__logo-name {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  color: var(--text-soft);
  transition: color 0.3s;
}

.nav__logo:hover .nav__logo-name {
  color: var(--text);
}

@media (max-width: 480px) {
  .nav__logo-name { display: none; }
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav__links a {
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--text-soft);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border-md);
  border-radius: 999px;
  white-space: nowrap;
  transition: color 0.3s var(--ease), border-color 0.3s, background 0.3s;
}

.nav__links a:hover {
  color: var(--text);
  border-color: var(--text);
}

.nav__links a.is-active {
  color: var(--bg);
  background: var(--text);
  border-color: var(--text);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  flex-shrink: 0;
}

/* Theme toggle */
.theme-toggle {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-md);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  line-height: 1;
  color: var(--text-soft);
  transition: border-color 0.3s, color 0.3s, transform 0.35s var(--ease);
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--text);
  transform: scale(1.08);
}

/* Hamburger */
.nav__menu {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
}

.nav__menu span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s;
}

.nav__menu.is-open span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav__menu.is-open span:last-child  { transform: translateY(-3.5px) rotate(-45deg); }

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  background: var(--bg-mobile);
  backdrop-filter: blur(20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
}

.mobile-nav.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav a {
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 500;
  color: var(--text);
  transition: color 0.3s;
}

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

@media (max-width: 640px) {
  .nav__links { display: none; }
  .nav__menu  { display: flex; }
}

/* ============================================================
   HERO — cinematic, photo background, animated text
   ============================================================ */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5rem clamp(1.25rem, 5vw, 3rem) clamp(2.5rem, 4vw, 3rem);
  padding-top: 30vh;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background: url("../img/hero-rudraksh.jpg") center 42% / cover no-repeat;
  opacity: 1.0;
  animation: ken-burns 28s ease-out forwards;
  will-change: transform;
}

@keyframes ken-burns {
  from { transform: scale(1.08); }
  to   { transform: scale(1.0); }
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    175deg,
    rgba(0, 0, 0, 0.05) 0%,
    rgba(0, 0, 0, 0.10) 40%,
    rgba(0, 0, 0, 0.45) 100%
  );
}

/* Blends the hero bottom into the page bg */
.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.4));
  z-index: 2;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 3;
  max-width: var(--max-w);
}

/* Hero text — always light over photo */
.hero__headline {
  margin: 0 0 0.75rem;
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: #ffffff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.3);
  min-height: 2.6em;
  max-width: 60%;
  margin-top: clamp(2rem, 6vw, 5rem);
}

.hero__headline .wave {
  display: inline-block;
  animation: wave-hand 1.8s ease-in-out 0.3s;
  transform-origin: 70% 80%;
}

@keyframes wave-hand {
  0%   { transform: rotate(0deg); }
  15%  { transform: rotate(14deg); }
  30%  { transform: rotate(-8deg); }
  45%  { transform: rotate(14deg); }
  60%  { transform: rotate(-4deg); }
  75%  { transform: rotate(10deg); }
  100% { transform: rotate(0deg); }
}

.hero__role {
  margin: 0.6rem 0 0;
  font-family: var(--mono);
  font-size: clamp(0.82rem, 1.1vw, 0.92rem);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
  letter-spacing: 0.02em;
  min-height: 1.6em;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.hero__role.is-visible {
  opacity: 1;
}

.cursor-blink {
  color: var(--accent);
  animation: blink 0.9s step-end infinite;
  margin-left: 1px;
  font-weight: 400;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero__vibe {
  margin: 1.2rem 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(0.9rem, 1.3vw, 1.05rem);
  color: rgba(255, 255, 255, 0.75);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
  max-width: 28rem;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.hero__vibe.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero__scroll {
  position: absolute;
  bottom: clamp(2rem, 4vw, 3rem);
  right: clamp(1.25rem, 5vw, 3rem);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(250, 248, 245, 0.4);
  z-index: 3;
  opacity: 0;
  transition: opacity 0.7s var(--ease);
}

.hero__scroll.is-visible {
  opacity: 1;
}

.scroll-line {
  width: 48px;
  height: 1px;
  background: rgba(250, 248, 245, 0.15);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 24px;
  height: 1px;
  background: var(--accent);
  animation: scroll-hint 2.2s var(--ease) infinite;
}

@keyframes scroll-hint {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}

/* ============================================================
   SECTIONS SHARED
   ============================================================ */
.section {
  padding: clamp(4rem, 10vw, 6.5rem) clamp(1.25rem, 5vw, 3rem);
  background: var(--bg);
}

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

.section__head {
  max-width: var(--max-w);
  margin: 0 auto 3rem;
}

.section__label {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.section h2 {
  margin: 0 0 0.5rem;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.section__sub {
  margin: 0;
  color: var(--text-soft);
  max-width: 28rem;
}

/* ============================================================
   GLOBE — sidebar + canvas (no UI over the sphere)
   ============================================================ */
.section--globe-full {
  background: radial-gradient(120% 90% at 45% 42%, #1c1916 0%, #12100d 42%, #0c0b09 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  padding: 0;
  position: relative;
  overflow-x: hidden;
}

.globe-talklist-btn {
  position: absolute;
  top: 5rem;
  right: 2rem;
  z-index: 20;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: rgba(250, 248, 245, 0.7);
  background: rgba(250, 248, 245, 0.06);
  border: 1px solid rgba(250, 248, 245, 0.12);
  border-radius: 6px;
  padding: 0.5rem 1rem;
  text-decoration: none;
  transition: background 0.3s, color 0.3s;
}
.globe-talklist-btn:hover {
  background: rgba(250, 248, 245, 0.12);
  color: #faf8f5;
}

.globe-shell {
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  min-height: min(88vh, 900px);
  padding: 4.5rem 1rem 1rem;
}

.globe-sidebar {
  position: absolute;
  z-index: 12;
  right: clamp(0.5rem, 3vw, 1.75rem);
  left: auto;
  top: 50%;
  transform: translateY(-50%);
  width: min(232px, 38vw);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  align-items: stretch;
  pointer-events: none;
}

.globe-sidebar > * {
  pointer-events: auto;
}

.globe-sidebar__label {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(250, 248, 245, 0.38);
  margin: 0;
  padding-left: 2px;
}

/* --- Single sidebar card (image + text, reference style) --- */
.globe-side-card {
  min-height: 1px;
}

.globe-side-card__inner {
  background: rgba(26, 23, 20, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(250, 248, 245, 0.12);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(0, 0, 0, 0.2) inset;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.globe-side-card__inner:hover {
  border-color: rgba(196, 101, 58, 0.28);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(196, 101, 58, 0.08) inset;
}

.globe-side-card.is-entering .globe-side-card__inner {
  animation: globeSpotIn 0.5s var(--ease) both;
}

@keyframes globeSpotIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.globe-side-card__media {
  position: relative;
  width: 100%;
  max-height: 92px;
  aspect-ratio: 4 / 3;
  background: #1a1816;
}

.globe-side-card__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.globe-side-card__photo--empty {
  min-height: 88px;
  background: linear-gradient(160deg, #2a2622, #141210);
}

.globe-side-card__overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.4rem 0.55rem 0.45rem;
  font-family: var(--mono);
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  line-height: 1.3;
  color: #faf8f5;
  text-transform: uppercase;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.78));
}

.globe-side-card__body {
  padding: 0.55rem 0.65rem 0.65rem;
}

.globe-side-card__meta {
  margin: 0 0 0.35rem;
  font-family: var(--sans);
  font-size: 0.68rem;
  color: rgba(250, 248, 245, 0.52);
}

.globe-side-card__blurb {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.7rem;
  line-height: 1.45;
  color: rgba(250, 248, 245, 0.62);
}

.globe-resume-tour {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(196, 101, 58, 0.9);
  background: transparent;
  border: 1px solid rgba(196, 101, 58, 0.35);
  border-radius: 6px;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  align-self: flex-start;
  transition: background 0.2s, color 0.2s;
}
.globe-resume-tour:hover {
  background: rgba(196, 101, 58, 0.12);
  color: var(--accent);
}

/* --- Hover card on globe --- */
.globe-hover-tip {
  position: absolute;
  z-index: 15;
  width: 200px;
  pointer-events: none;
  background: rgba(34, 30, 27, 0.94);
  border: 1px solid rgba(250, 248, 245, 0.14);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
  transform: translate(-50%, calc(-100% - 10px));
  animation: globeHoverIn 0.22s ease both;
}

@keyframes globeHoverIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.globe-hover-tip__head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(250, 248, 245, 0.08);
}

.globe-hover-tip__pin {
  flex-shrink: 0;
  color: var(--accent);
}

.globe-hover-tip__city {
  flex: 1;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: #faf8f5;
}

.globe-hover-tip__badge {
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(250, 248, 245, 0.55);
  background: rgba(250, 248, 245, 0.08);
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.globe-hover-tip__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(250, 248, 245, 0.08);
}

.globe-hover-tip__stat-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(250, 248, 245, 0.38);
  margin-bottom: 2px;
}

.globe-hover-tip__stat-val {
  font-family: var(--sans);
  font-size: 1.15rem;
  font-weight: 600;
  color: #faf8f5;
}

.globe-hover-tip__event {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: rgba(250, 248, 245, 0.48);
}

.globe-canvas-wrap {
  position: relative;
  min-height: min(72vh, 820px);
  width: 100%;
  margin: 0 auto;
}

.globe-canvas-wrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  cursor: grab;
}

.globe-hint-full {
  text-align: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: rgba(250, 248, 245, 0.32);
  margin: 0.5rem 0 1rem;
  text-transform: lowercase;
}

/* --- Legacy globe-popup (unused on talks page) --- */
.globe-popup {
  position: absolute;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  width: 180px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 6;
  cursor: pointer;
  background: rgba(18, 16, 14, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(250, 248, 245, 0.08);
  border-radius: 8px;
  overflow: hidden;
  filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.7));
}
.globe-popup--side {
  width: 200px;
  max-width: min(200px, 42vw);
}
.globe-popup.no-img {
  flex-direction: column;
}
.globe-popup__img {
  width: 70px;
  min-height: 60px;
  object-fit: cover;
  flex-shrink: 0;
}
.globe-popup.no-img .globe-popup__img { display: none; }
.globe-popup__text {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-height: 60px;
}
.globe-popup__title {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(250, 248, 245, 0.9);
  line-height: 1.3;
}
.globe-popup__loc {
  font-family: var(--sans);
  font-size: 0.62rem;
  color: rgba(250, 248, 245, 0.45);
  line-height: 1.3;
}

/* --- Talks timeline list page (compact text rows) --- */
.talks-timeline {
  max-width: var(--max-w);
  margin: 0 auto;
}
.talks-year-group {
  margin-bottom: 1.25rem;
}
.talks-year-label {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.4rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid rgba(196, 101, 58, 0.2);
}
.talks-year-label--upcoming {
  color: #4ade80;
  border-bottom-color: rgba(74, 222, 128, 0.25);
}
.tl-card {
  display: block;
  padding: 0.38rem 0;
  border-bottom: 1px solid var(--border);
}
.tl-card:last-child {
  border-bottom: none;
}
.tl-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  align-items: flex-start;
}
.tl-card__body h3 {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 500;
  margin: 0;
  line-height: 1.25;
  color: var(--text);
}
.tl-card__place {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--text-soft);
  margin: 0;
  line-height: 1.3;
}
.tl-card__link {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  margin-top: 0.15rem;
  line-height: 1.35;
}
.tl-card__link:hover {
  text-decoration: underline;
}
.tl-card--upcoming .tl-card__link {
  color: #4ade80;
}
.tl-card--upcoming .tl-card__link:hover {
  color: #6ee7a0;
}

/* Staggered slide-down (scoped; does not affect other .reveal) */
.talks-timeline .tl-card.reveal {
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.42s var(--ease), transform 0.42s var(--ease);
}
.talks-timeline .tl-card.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.talks-year-group .tl-card:nth-of-type(1) { transition-delay: 0s; }
.talks-year-group .tl-card:nth-of-type(2) { transition-delay: 0.04s; }
.talks-year-group .tl-card:nth-of-type(3) { transition-delay: 0.08s; }
.talks-year-group .tl-card:nth-of-type(4) { transition-delay: 0.12s; }
.talks-year-group .tl-card:nth-of-type(5) { transition-delay: 0.16s; }
.talks-year-group .tl-card:nth-of-type(6) { transition-delay: 0.2s; }
.talks-year-group .tl-card:nth-of-type(7) { transition-delay: 0.24s; }
.talks-year-group .tl-card:nth-of-type(8) { transition-delay: 0.28s; }
.talks-year-group .tl-card:nth-of-type(9) { transition-delay: 0.32s; }
.talks-year-group .tl-card:nth-of-type(10) { transition-delay: 0.36s; }
.talks-year-group .tl-card:nth-of-type(11) { transition-delay: 0.4s; }
.talks-year-group .tl-card:nth-of-type(12) { transition-delay: 0.44s; }

@media (max-width: 900px) {
  .globe-shell {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4.25rem 1rem 0.5rem;
    min-height: auto;
  }
  .globe-sidebar {
    position: static;
    transform: none;
    width: min(232px, 88vw);
    margin: 0 auto 0.75rem;
    order: 1;
  }
  .globe-canvas-wrap {
    order: 2;
    min-height: min(58vh, 500px);
    width: 100%;
  }
}

@media (max-width: 640px) {
  .globe-talklist-btn { top: 4.5rem; right: 1rem; font-size: 0.7rem; padding: 0.4rem 0.7rem; }
  .globe-hover-tip { width: min(200px, 52vw); }
}

/* ============================================================
   PROJECTS — horizontal scroll
   ============================================================ */
.projects-header {
  max-width: var(--max-w);
  margin: 0 auto 2rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.projects-header h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
}

.projects-hint {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--text-soft);
}

.hscroll {
  overflow: hidden;
  padding-bottom: 1rem;
  position: relative;
  max-width: var(--max-w);
  margin: 0 auto;
}

.hscroll::before,
.hscroll::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(40px, 6vw, 100px);
  z-index: 2;
  pointer-events: none;
}

.hscroll::before {
  left: 0;
  background: linear-gradient(to right,
    var(--bg-alt) 0%,
    rgba(0, 0, 0, 0) 100%);
}

.hscroll::after {
  right: 0;
  background: linear-gradient(to left,
    var(--bg-alt) 0%,
    rgba(0, 0, 0, 0) 100%);
}

.hscroll__track {
  display: flex;
  gap: 1.5rem;
  padding: 0;
  width: max-content;
  animation: hscroll-slide 15s linear infinite;
}

.hscroll:hover .hscroll__track {
  animation-play-state: paused;
}

@keyframes hscroll-slide {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.pcard {
  flex-shrink: 0;
  width: 340px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  transition: transform 0.4s var(--ease);
}

.pcard:hover {
  transform: translateY(-6px);
}

.pcard__img {
  width: 100%;
  height: 220px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  overflow: hidden;
  position: relative;
  transition: box-shadow 0.4s var(--ease);
}

.pcard:hover .pcard__img {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.pcard__diagram {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pcard__img-text {
  font-family: var(--mono);
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-align: center;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.18);
  text-transform: uppercase;
}

.pcard h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
  margin: 0 0 0.5rem;
}

.pcard p {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.55;
}

.pcard p strong {
  color: var(--accent);
  font-weight: 500;
}

.pcard__stack {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-soft);
  letter-spacing: 0.04em;
  margin-top: auto;
}

@media (max-width: 640px) {
  .pcard { width: 280px; }
  .pcard__img { height: 180px; }
  .projects-hint { display: none; }
}

/* ============================================================
   BLOG / POSTS
   ============================================================ */
.post-list {
  max-width: var(--max-w);
  margin: 0 auto;
}

.post {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  grid-template-rows: auto auto;
  gap: 0 2rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background 0.4s var(--ease);
}

.post:first-child { border-top: 1px solid var(--border); }

.post:hover {
  background: rgba(196, 101, 58, 0.035);
}

[data-theme="dark"] .post:hover {
  background: rgba(212, 115, 74, 0.06);
}

.post time {
  grid-row: 1 / -1;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-soft);
  padding-top: 0.2rem;
}

.post h3 {
  margin: 0 0 0.3rem;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
  grid-column: 2;
  transition: color 0.3s;
}

.post:hover h3 { color: var(--accent); }

.post p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-soft);
  grid-column: 2;
  max-width: 34rem;
}

.post__read {
  grid-row: 1 / -1;
  align-self: center;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.post:hover .post__read {
  opacity: 1;
  transform: translateX(0);
}

@media (max-width: 640px) {
  .post {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
  .post time       { grid-row: auto; }
  .post h3         { grid-column: 1; }
  .post p          { grid-column: 1; }
  .post__read      { display: none; }
}

/* ============================================================
   INTERESTS
   ============================================================ */
.interest-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.interest {
  padding: 1.75rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: transform 0.35s var(--ease), box-shadow 0.35s;
}

.interest:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px var(--card-shadow);
}

.interest__icon {
  display: block;
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.interest h3 {
  margin: 0 0 0.4rem;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
}

.interest p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-soft);
}

/* ============================================================
   CONTACT
   ============================================================ */
.section--contact {
  background: var(--bg-dark) !important;
  color: #faf8f5;
}

.contact-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  text-align: center;
}

.contact-inner h2 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  margin: 0 0 1rem;
  color: #faf8f5;
}

.contact-inner p {
  max-width: 30rem;
  margin: 0 auto 2rem;
  color: rgba(250, 248, 245, 0.65);
}

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 0.85rem 2rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}

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

.contact-socials {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 1.75rem;
}

.contact-socials a {
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  color: rgba(250, 248, 245, 0.55);
  transition: color 0.3s;
}

.contact-socials a:hover { color: #faf8f5; }

/* ============================================================
   SOCIAL CIRCLES (nav + footer)
   ============================================================ */
.nav__socials {
  display: flex;
  gap: 0.4rem;
}

.social-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  text-decoration: none;
  transition: border-color 0.3s, color 0.3s, transform 0.3s var(--ease), background 0.3s;
}

.social-circle:hover {
  color: var(--text);
  border-color: var(--text);
  transform: scale(1.08);
}

.social-circle--light {
  border-color: rgba(250, 248, 245, 0.25);
  color: rgba(250, 248, 245, 0.6);
}

.social-circle--light:hover {
  border-color: #faf8f5;
  color: #faf8f5;
  background: rgba(250, 248, 245, 0.1);
}

.contact-socials-row {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.mobile-nav__socials {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

@media (max-width: 640px) {
  .nav__socials { display: none; }
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-content {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-text {
  max-width: 38rem;
}

.about-text strong,
.pcard strong,
.post strong,
.talk-item strong,
.reading-item strong {
  color: var(--accent);
  font-weight: 600;
}

/* --- About photo slideshow --- */
.about-photos {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.about-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 58%;
  opacity: 0;
  transition: opacity 1.6s ease-in-out;
}

.about-photo.is-active {
  opacity: 1;
}

@media (max-width: 768px) {
  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .about-photos {
    order: -1;
    aspect-ratio: 16 / 10;
  }
}

.about-lead {
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  font-weight: 400;
  line-height: 1.6;
  margin: 0 0 1.25rem;
  color: var(--text-soft);
}

.about-text p {
  color: var(--text-soft);
  margin: 0 0 1rem;
}

.about-lead strong {
  color: var(--accent);
}

.about-currently {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--bg-alt);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  color: var(--text-soft) !important;
  font-size: 0.95rem;
  transition: background 0.5s var(--ease);
}

.about-currently strong {
  color: var(--accent);
}

/* ============================================================
   MARQUEE (projects scroll)
   ============================================================ */
.marquee {
  overflow: hidden;
  margin-bottom: 3rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.marquee__track {
  display: flex;
  align-items: center;
  gap: 0;
  width: max-content;
  animation: marquee-scroll 25s linear infinite;
}

.marquee:hover .marquee__track {
  animation-play-state: paused;
}

.marquee__item {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 500;
  white-space: nowrap;
  padding: 0 1.5rem;
  text-decoration: none;
  color: var(--text);
  transition: color 0.3s;
}

.marquee__item:hover {
  color: var(--accent);
}

.marquee__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  opacity: 0.6;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============================================================
   READING LIST
   ============================================================ */
.reading-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.reading-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.reading-item:first-child {
  border-top: 1px solid var(--border);
}

.reading-item__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.reading-item__label {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  white-space: nowrap;
}

.reading-item__label--done {
  background: rgba(60, 186, 110, 0.15);
  color: #3cba6e;
}

.reading-item__label--reading {
  background: rgba(212, 115, 74, 0.15);
  color: var(--accent);
}

.reading-item__label--queued {
  background: rgba(138, 133, 126, 0.12);
  color: var(--text-soft);
}

@keyframes pulse-read {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.2); }
}

.reading-item h3 {
  margin: 0 0 0.15rem;
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 500;
}

.reading-item__author {
  margin: 0 0 0.25rem;
  font-size: 0.85rem;
  color: var(--text-soft);
}

.reading-item__note {
  margin: 0;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-soft);
  opacity: 0.8;
}

/* ============================================================
   TALK LIST (talks page)
   ============================================================ */
.talk-list {
  max-width: var(--max-w);
  margin: 0 auto;
}

.talk-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.3s var(--ease);
}

.talk-item:first-child { border-top: 1px solid var(--border); }

.talk-item:hover {
  background: rgba(196, 101, 58, 0.04);
}

.talk-item__meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.talk-item__year {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
}

.talk-item__place {
  font-size: 0.85rem;
  color: var(--text-soft);
}

.talk-item__body h3 {
  margin: 0 0 0.35rem;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
}

.talk-item__body p,
.talk-item__desc,
.talk-item__desc p {
  margin: 0 0 0.6rem;
  color: var(--text-soft);
}

.talk-item__desc a {
  color: var(--accent);
  text-decoration: none;
}

.talk-item__desc a:hover { text-decoration: underline; }

.talk-item__tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 0.2rem 0.55rem;
  border: 1px solid rgba(196, 101, 58, 0.3);
  border-radius: 3px;
}

@media (max-width: 640px) {
  .talk-item { grid-template-columns: 1fr; gap: 0.5rem; }
}

/* ============================================================
   PAGE HERO (writings/talks subpages)
   ============================================================ */
.page-hero {
  padding-top: clamp(7rem, 12vw, 9rem);
}


/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 2rem clamp(1.25rem, 5vw, 3rem);
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-soft);
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer p { margin: 0; }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}

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

.reveal:nth-child(2)  { transition-delay: 0.08s; }
.reveal:nth-child(3)  { transition-delay: 0.16s; }
.reveal:nth-child(4)  { transition-delay: 0.24s; }
.reveal:nth-child(5)  { transition-delay: 0.30s; }
.reveal:nth-child(6)  { transition-delay: 0.36s; }

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .talks-timeline .tl-card.reveal { opacity: 1; transform: none; }
  .hero__im, .hero__name, .hero__role, .hero__vibe, .hero__scroll {
    opacity: 1 !important;
    transform: none !important;
  }
  .hero__bg { opacity: 0.3; }
}
