:root {
  --bg: #0c0d10;
  --bg-elevated: #12141a;
  --text: #e8e6e1;
  --text-muted: #9a968c;
  --mint: #9fd8c4;
  --peach: #f0c4b0;
  --butter: #e8d9a8;
  --line: rgba(232, 230, 225, 0.12);
  --font-display: "Syne", sans-serif;
  --font-body: "Manrope", sans-serif;
  --max: 68rem;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: soft-light;
}

a {
  color: var(--mint);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--butter);
}

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

.site-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem var(--pad);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  color: var(--mint);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.85rem 1.25rem;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  position: relative;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.25rem;
  height: 1px;
  background: var(--peach);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

.site-nav a[aria-current="page"]::after,
.site-nav a:hover::after {
  transform: scaleX(1);
}

.site-main {
  flex: 1;
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4rem) var(--pad) 4rem;
  animation: page-in 0.55s ease both;
}

.site-footer {
  padding: 1.5rem var(--pad) 2rem;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 0.88rem;
}

.site-footer-inner {
  width: min(100%, var(--max));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--mint);
}

/* Home hero */
.home {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 2rem var(--pad) 3rem;
  min-height: calc(100vh - 5.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.home-atmosphere {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(165deg, #141d1a 0%, var(--bg) 100%);
  opacity: 0.5;
}

.home-content {
  padding: 2rem 0;
  max-width: 52rem;
  animation: page-in 0.7s ease 0.08s both;
}

.home-hero-image-container {
  margin-bottom: 3.5rem;
  max-width: 100%;
  border-radius: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.home-hero-image {
  width: 100%;
  height: auto;
  display: block;
}

.home-brand {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.8rem, 9vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--text);
}

.home-headline {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.25rem, 2.6vw, 1.65rem);
  line-height: 1.3;
  color: var(--butter);
}

.home-lede {
  margin: 0 0 2rem;
  color: var(--text-muted);
  max-width: 44rem;
  font-size: 1.05rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  align-items: center;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.2rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid var(--mint);
  color: var(--bg);
  background: var(--mint);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.cta:hover {
  background: transparent;
  color: var(--mint);
}

.cta-ghost {
  background: transparent;
  color: var(--peach);
  border-color: rgba(240, 196, 176, 0.45);
}

.cta-ghost:hover {
  color: var(--butter);
  border-color: var(--butter);
  background: transparent;
}

/* Inner pages */
.page-header {
  margin-bottom: clamp(2rem, 5vw, 3rem);
  max-width: 40rem;
}

.page-kicker {
  margin: 0 0 0.6rem;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--peach);
}

.page-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.page-intro {
  margin: 0;
  color: var(--text-muted);
}

.prose {
  max-width: 40rem;
}

.prose p {
  margin: 0 0 1.15rem;
}

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

.about-layout {
  display: grid;
  gap: 2rem 3rem;
  align-items: start;
}

@media (min-width: 720px) {
  .about-layout {
    grid-template-columns: 18rem 1fr;
  }
}

.portrait {
  width: 18rem;
  aspect-ratio: 1;
  border-radius: 0.35rem;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  object-fit: cover;
  object-position: top;
}

.portrait-caption {
  margin: 0.55rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.meta-list {
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.meta-list strong {
  color: var(--text);
  font-weight: 600;
}

/* Experience Gantt */
.gantt {
  margin: 0 0 3rem;
}

.gantt-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-bottom: 1.25rem;
}

.gantt-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}

.gantt-note {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.gantt-scroll {
  width: 100%;
}

.gantt-chart {
  position: relative;
  width: 100%;
  --label-w: 7.5rem;
}

.gantt-axis {
  position: relative;
  height: 1.4rem;
  margin-left: var(--label-w);
  margin-bottom: 0.35rem;
  border-bottom: 1px solid var(--line);
}

.gantt-axis span {
  position: absolute;
  left: var(--t);
  transform: translateX(-50%);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.gantt-now {
  position: absolute;
  top: 1.4rem;
  bottom: 0;
  left: calc(var(--label-w) + (100% - var(--label-w)) * 1);
  width: 1px;
  background: rgba(240, 196, 176, 0.55);
  pointer-events: none;
  z-index: 2;
}

.gantt-now::after {
  content: "now";
  position: absolute;
  top: 0.15rem;
  right: 0.35rem;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--peach);
}

.gantt-rows {
  display: grid;
  gap: 0.55rem;
}

.gantt-row {
  display: grid;
  grid-template-columns: var(--label-w) 1fr;
  gap: 0.75rem;
  align-items: center;
  min-height: 2.1rem;
}

.gantt-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.gantt-label img {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.25rem;
  object-fit: cover;
  background: #fff;
  flex-shrink: 0;
}

.gantt-label span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gantt-track {
  position: relative;
  height: 1.85rem;
  border-radius: 0.25rem;
  background:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent calc(100% / 9 - 1px),
      rgba(232, 230, 225, 0.06) calc(100% / 9 - 1px),
      rgba(232, 230, 225, 0.06) calc(100% / 9)
    );
}

.gantt-bar {
  position: absolute;
  top: 0.2rem;
  bottom: 0.2rem;
  left: var(--start);
  width: var(--span);
  min-width: 0.35rem;
  border-radius: 0.2rem;
  display: flex;
  align-items: center;
  padding: 0 0.45rem;
  overflow: hidden;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.gantt-bar:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  z-index: 1;
}

.gantt-bar-text {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: rgba(12, 13, 16, 0.78);
}

.gantt-bar-text--short {
  font-size: 0.62rem;
}

.gantt-bar--mint {
  background: linear-gradient(90deg, #9fd8c4, #7ec8b0);
}

.gantt-bar--peach {
  background: linear-gradient(90deg, #f0c4b0, #e8a990);
}

.gantt-bar--butter {
  background: linear-gradient(90deg, #e8d9a8, #dcc87a);
}

.gantt-bar--coral {
  background: linear-gradient(90deg, #e8b4b0, #d9989a);
}

@media (max-width: 719px) {
  .gantt-chart {
    --label-w: 5.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gantt-bar:hover {
    transform: none;
  }
}

/* Experience places map */
.geo-map {
  margin: 0 0 3rem;
}

.geo-map-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-bottom: 1.25rem;
}

.geo-map-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}

.geo-map-note {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.geo-map-frame {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  background:
    radial-gradient(ellipse 70% 55% at 50% 45%, rgba(159, 216, 196, 0.08), transparent 70%),
    #101218;
  overflow: hidden;
  --map-scale: 1.7;
  --map-origin-x: 97.5%;
  --map-origin-y: 36.4%;
}

.geo-map-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  transform-origin: var(--map-origin-x) var(--map-origin-y);
  transform: scale(var(--map-scale));
}

.geo-map-img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0.72;
  pointer-events: none;
  user-select: none;
}

.geo-pins {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.geo-pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%) scale(calc(1 / var(--map-scale)));
  z-index: 1;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.geo-pin-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border: 1px solid rgba(232, 230, 225, 0.28);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(12, 13, 16, 0.55);
  cursor: pointer;
  overflow: hidden;
}

.geo-pin-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.geo-pin-badge--stack {
  width: auto;
  height: 1.85rem;
  padding: 0.12rem;
  gap: 0.12rem;
  border-radius: 999px;
}

.geo-pin-badge--stack img {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
}

.geo-pin-label {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.55rem);
  transform: translateX(-50%);
  min-width: max-content;
  padding: 0.35rem 0.55rem;
  background: rgba(12, 13, 16, 0.92);
  border: 1px solid var(--line);
  border-radius: 0.25rem;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, visibility 0.18s ease;
  pointer-events: none;
}

.geo-pin-label strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
}

.geo-pin-label span {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.7rem;
  color: var(--mint);
}

.geo-pin:hover .geo-pin-label,
.geo-pin:focus-within .geo-pin-label,
.geo-pin.is-hot .geo-pin-label {
  opacity: 1;
  visibility: visible;
}

.geo-map-credit {
  margin: 0.65rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.geo-map-credit a {
  color: var(--text-muted);
}

.geo-map-credit a:hover {
  color: var(--mint);
}

/* Cross-highlight: Gantt ↔ map ↔ detail list */
.experience-sync .gantt-row,
.experience-sync .timeline-item {
  transition: opacity 0.18s ease;
  cursor: pointer;
}

.experience-sync .gantt-row:focus,
.experience-sync .timeline-item:focus,
.experience-sync .geo-pin-badge:focus {
  outline: 1px solid var(--mint);
  outline-offset: 2px;
}

.experience-sync.is-dimming .gantt-row:not(.is-hot),
.experience-sync.is-dimming .geo-pin:not(.is-hot),
.experience-sync.is-dimming .timeline-item:not(.is-hot) {
  opacity: 0.28;
}

.experience-sync .gantt-row.is-hot .gantt-bar {
  filter: brightness(1.12);
  box-shadow: 0 0 0 1px rgba(232, 230, 225, 0.35);
}

.experience-sync .gantt-row.is-hot .gantt-label {
  color: var(--text);
}

.experience-sync .geo-pin.is-hot {
  z-index: 4;
  transform: translate(-50%, -50%) scale(calc(1.15 / var(--map-scale)));
}

.experience-sync .geo-pin.is-hot .geo-pin-badge {
  box-shadow: 0 0 0 2px rgba(12, 13, 16, 0.7), 0 0 0 4px rgba(159, 216, 196, 0.55);
}

.experience-sync .timeline-item.is-hot {
  border-color: rgba(159, 216, 196, 0.35);
}

@media (prefers-reduced-motion: reduce) {
  .experience-sync .gantt-row,
  .experience-sync .timeline-item,
  .geo-pin {
    transition: none;
  }
}

/* Experience timeline */
.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.timeline-item {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 0.85rem 1.5rem;
  align-items: start;
}

@media (min-width: 720px) {
  .timeline-item {
    grid-template-columns: max-content 3rem 1fr;
  }
}

@media (max-width: 719px) {
  .timeline-item {
    grid-template-columns: 3rem 1fr;
    grid-template-areas:
      "logo when"
      "logo body";
  }

  .timeline-when {
    grid-area: when;
    align-self: center;
  }

  .timeline-logo {
    grid-area: logo;
  }

  .timeline-item > div {
    grid-area: body;
  }
}

.timeline-when {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.timeline-logo {
  width: 3rem;
  height: 3rem;
  border-radius: 0.45rem;
  object-fit: cover;
  background: #fff;
  border: 1px solid var(--line);
}

.timeline-role {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.25;
}

.timeline-org {
  margin: 0.15rem 0 0.65rem;
  color: var(--mint);
  font-size: 0.98rem;
}

.timeline-notes {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
  display: grid;
  gap: 0.4rem;
}

.timeline-notes li {
  padding-left: 1rem;
  position: relative;
}

.timeline-notes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 0.4rem;
  height: 1px;
  background: var(--peach);
}

/* Education */
.edu-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 2rem;
}

.edu-item h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}

.edu-meta {
  margin: 0 0 0.75rem;
  color: var(--mint);
  font-size: 0.95rem;
}

.edu-item p {
  margin: 0;
  color: var(--text-muted);
  max-width: 40rem;
}

/* Interests */
.interest-stack {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 2.25rem;
  max-width: 40rem;
}

.interest-stack h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--butter);
}

.interest-stack p {
  margin: 0;
  color: var(--text-muted);
}

/* Contact */
.contact-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1.25rem;
  max-width: 28rem;
}

.contact-list dt {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--peach);
}

.contact-list dd {
  margin: 0.25rem 0 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
}

.contact-list a {
  text-decoration: none;
  color: var(--text);
}

.contact-list a:hover {
  color: var(--mint);
}

.note {
  margin-top: 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 36rem;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(0.6rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(-1.5%, 1.5%, 0) scale(1.03);
  }
}

@media (max-width: 640px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    justify-content: flex-start;
  }
}

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

  .site-main,
  .home-content,
  .home-atmosphere {
    animation: none;
  }

  .site-nav a::after {
    transition: none;
  }
}
