:root {
  --bg-url: none;
  --surface-alpha: 0.4;
  /* Small blocks inside sections: chips / publication items / project mini cards */
  --surface-alpha-small: 0.6;
  --surface-alpha-small-hover: 1.0;
  --safe-top: max(env(safe-area-inset-top), 0px);
  --topbar-h: 64px;
  --topbar-total-h: calc(var(--topbar-h) + var(--safe-top));
  --content-w: min(80vw, 980px);
  --text: rgba(15, 18, 24, 0.92);
  --muted: rgba(15, 18, 24, 0.66);
  --link: rgba(8, 96, 220, 0.95);
}

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

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica,
    Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.55;
  overflow-x: hidden;
  background: #0b0e14;
}

a {
  color: var(--link);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ========= Center lane (4/5 width translucent background) ========= */
.centerLane {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: var(--content-w);
  background: rgba(255, 255, 255, var(--surface-alpha));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-left: 1px solid rgba(255, 255, 255, 0.22);
  border-right: 1px solid rgba(255, 255, 255, 0.22);
  z-index: 1;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.centerLane.is-hidden {
  opacity: 0;
}

/* ========= Background ========= */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #0b0e14;
}

.bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--bg-url);
  background-size: cover;
  background-position: center;
  filter: none;
  transform: none;
}

.bg__vignette {
  display: none;
}

.bg__noise {
  display: none;
}

/* Left/right 1/10 click zones */
.bgNav {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 10vw;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  z-index: 5;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.bgNav:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.75);
  outline-offset: -2px;
}

.bgNav--prev {
  left: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0));
  opacity: 0.2;
}
.bgNav--next {
  right: 0;
  background: linear-gradient(to left, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0));
  opacity: 0.2;
}

/* Hover hint for photo switch zones (mouse/trackpad) */
@media (hover: hover) and (pointer: fine) {
  .bgNav {
    opacity: 0.18;
    transition: opacity 120ms ease, background-color 120ms ease;
  }

  .bgNav:hover {
    opacity: 0.55;
    background-color: rgba(255, 255, 255, 0.08);
  }

  .bgNav::after {
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.86);
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    padding: 10px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.22);
    opacity: 0;
    transition: opacity 120ms ease, transform 120ms ease;
    pointer-events: none;
    text-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  }

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

  .bgNav--prev::after {
    content: "← Prev";
    left: 14px;
    transform: translateY(-50%) translateX(-4px);
  }
  .bgNav--prev:hover::after {
    transform: translateY(-50%) translateX(0);
  }

  .bgNav--next::after {
    content: "Next →";
    right: 14px;
    transform: translateY(-50%) translateX(4px);
  }
  .bgNav--next:hover::after {
    transform: translateY(-50%) translateX(0);
  }
}

@media (hover: none) {
  .bgNav--prev,
  .bgNav--next {
    opacity: 0.12;
  }
}

/* ========= Topbar ========= */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  height: var(--topbar-total-h);
  display: flex;
  align-items: center;
  padding: var(--safe-top) 18px 0 18px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
}

.topbar__inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
}

.brand__name {
  font-weight: 650;
  letter-spacing: 0.2px;
}
.brand__tag {
  font-size: 12px;
  opacity: 0.88;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.navlink {
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
}
.navlink:hover {
  text-decoration: none;
  background: rgba(255, 255, 255, 0.12);
}
.navlink:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.75);
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .brand__tag {
    display: none;
  }
  .topbar__right {
    gap: 6px;
  }
  .navlink {
    font-size: 13px;
    padding: 8px 8px;
  }
}

/* ========= Content ========= */
.page {
  position: relative;
  z-index: 2;
  padding-top: var(--topbar-total-h);
}

.section {
  scroll-margin-top: calc(var(--topbar-total-h) + 12px);
  padding: 10px 0;
}

.section--blank {
  min-height: calc(100svh - var(--topbar-total-h));
  padding: 0;
  /* Make the last screen a positioning context for the footer */
  position: relative;
}

/* On the blank (Gallery) page keep it bottom-centered, with a tighter bottom padding. */
.section--blank .footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  padding: 0;
}

.section--bio {
  min-height: calc(100svh - var(--topbar-total-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 0 56px 0;
  position: relative;
}

.contentCard {
  width: var(--content-w);
  margin: 0 auto;
  background: transparent;
  box-shadow: none;
  border: 0;
  padding: 10px 26px;
}

.bioGrid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  align-items: start;
}

.bioGrid__left {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.avatar {
  width: 200px;
  height: 200px;
  border-radius: 28px;
  background: rgba(0, 0, 0, 0.18);
  background-image: url("../images/avatar.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
}

.h1 {
  margin: 0 0 10px 0;
  font-size: 34px;
  letter-spacing: -0.2px;
}

.h2 {
  margin: 0 0 14px 0;
  font-size: 24px;
  letter-spacing: -0.2px;
}

.sectionHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.sectionHeader__title {
  margin: 0;
}

.segmented {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px;
  background: rgba(255, 255, 255, var(--surface-alpha-small));
  border: 1px solid rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.segmented__btn {
  border: 0;
  background: transparent;
  color: rgba(0, 0, 0, 0.72);
  font-size: 13px;
  padding: 7px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.segmented__btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.segmented__btn:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.35);
  outline-offset: 2px;
}

.segmented__btn.is-active {
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
  color: rgba(0, 0, 0, 0.86);
}

.subtitle {
  margin: 0 0 12px 0;
  color: var(--muted);
}

.p {
  margin: 0 0 16px 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.chips--left {
  margin-top: 12px;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
}

.chips--left .chip {
  justify-content: center;
}

.chip--icon {
  width: 40px;
  height: 40px;
  padding: 0;
  gap: 0;
  justify-content: center;
}

.chip__icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.chip__icon svg {
  width: 20px;
  height: 20px;
  fill: rgba(0, 0, 0, 0.72);
}

@media (max-width: 820px) {
  .chips--left {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, var(--surface-alpha-small));
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.82);
  text-decoration: none;
}
.chip:hover {
  text-decoration: none;
  background: rgba(255, 255, 255, var(--surface-alpha-small-hover));
}

.hint {
  margin-top: 14px;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.58);
}

.scrollCue {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  user-select: none;
}

.scrollCue__text {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.scrollCue__line {
  width: 1px;
  height: 34px;
  background: rgba(255, 255, 255, 0.7);
  opacity: 0.85;
  animation: cue 1.6s ease-in-out infinite;
}

@keyframes cue {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.55;
  }
  50% {
    transform: translateY(8px);
    opacity: 1;
  }
}

.list {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.list__item {
  padding: 14px 14px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, var(--surface-alpha-small));
}

/* Bio card: intentionally NOT sharing styles with `.list__item` (copied for easier future edits) */
.bioCard {
  padding: 18px 18px;
  border-radius: 28px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, var(--surface-alpha-small));
}

.itemTitle {
  font-weight: 650;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
}

.itemVenue {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.58);
  font-weight: 600;
}

.itemMeta {
  margin-top: 6px;
  color: rgba(0, 0, 0, 0.62);
  font-size: 14px;
}

.itemLinks {
  margin-top: 8px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.miniCard {
  padding: 14px 14px;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, var(--surface-alpha-small));
}

.miniCard__title {
  font-weight: 700;
  margin-bottom: 8px;
}
.miniCard__desc {
  color: rgba(0, 0, 0, 0.65);
  margin-bottom: 10px;
}
.miniCard__links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.bullets {
  margin: 10px 0 0 18px;
  color: rgba(0, 0, 0, 0.7);
}

.footer {
  /* Closer to the bottom edge */
  padding: 14px 0 22px 0;
}
.footer__inner {
  /* Center within the viewport and allow it to sit closer to the side edges */
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 18px;
  color: rgba(255, 255, 255, 0.82);
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  text-align: center;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
}

.footer__hint {
  width: 100%;
  flex: 0 0 100%;
  font-size: 13px;
  letter-spacing: 0.02em;
  opacity: 0.88;
}
.dot {
  opacity: 0.6;
}

@media (max-width: 820px) {
  /* Mobile: tighten spacing between sections */
  .section {
    padding: 6px 0;
  }

  .footer__hint {
    display: none;
  }

  /* Mobile: hide the scroll cue (and its animation) */
  .scrollCue {
    display: none;
  }

  /* Mobile: make the center lane span the full viewport width */
  .centerLane {
    left: 0;
    transform: none;
    width: 100vw;
    border-left: 0;
    border-right: 0;
  }

  /* Mobile: main content should be full width */
  .contentCard {
    width: 100%;
    padding: 20px 16px;
  }

  /* Mobile: no need for background photo nav zones */
  .bgNav {
    display: none;
  }

  .bioGrid {
    grid-template-columns: 1fr;
  }
  .avatar {
    width: 160px;
    height: 160px;
    border-radius: 26px;
  }
}

