﻿:root {
  --ink: #2a241c;
  --ink-soft: #4a4034;
  --muted: #7a6f5f;
  --line: rgba(122, 155, 168, 0.28);
  --coffee: #6b5344;
  --coffee-deep: #4a372c;
  --coffee-soft: #c4a882;
  --sky: #a8d4e6;
  --sky-deep: #6fa8c0;
  --mint: #b8d9c4;
  --mint-deep: #6fa887;
  --paper: #f4f8f6;
  --cream: #faf7f2;
  --white: #fcfdfc;
  --night: #1e2a28;
  --shell: min(1120px, calc(100% - 2.5rem));
  --display: "Cinzel", Georgia, serif;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Outfit", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; overflow: hidden; }
body {
  margin: 0; height: 100svh; max-height: 100svh; overflow: hidden;
  display: flex; flex-direction: column; color: var(--ink);
  font-family: var(--sans); line-height: 1.5; background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
main { flex: 1 1 auto; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
a { color: inherit; text-underline-offset: 0.18em; }
button, input, textarea { font: inherit; }
img { max-width: 100%; display: block; }

.atmosphere {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(900px 520px at 8% -5%, rgba(168, 212, 230, 0.45), transparent 55%),
    radial-gradient(820px 480px at 100% 0%, rgba(184, 217, 196, 0.4), transparent 55%),
    linear-gradient(180deg, #e8f4f8 0%, #f4f8f6 42%, #faf7f2 100%);
}
.atmosphere__stars {
  position: absolute; inset: 0; opacity: 0.5;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 20%, rgba(107, 83, 68, 0.7), transparent),
    radial-gradient(1px 1px at 28% 55%, rgba(255,255,255,0.9), transparent),
    radial-gradient(1.5px 1.5px at 62% 18%, rgba(111, 168, 192, 0.9), transparent),
    radial-gradient(1px 1px at 78% 42%, rgba(111, 168, 135, 0.85), transparent),
    radial-gradient(1.5px 1.5px at 90% 70%, rgba(196, 168, 130, 0.8), transparent);
  animation: twinkle 5s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.3; } to { opacity: 0.75; } }

.shell { width: var(--shell); margin-inline: auto; }
.shell--narrow { width: min(680px, calc(100% - 2.5rem)); }

.nav {
  position: relative; z-index: 40; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.65rem 1.1rem;
  border-bottom: 1px solid rgba(107, 83, 68, 0.14);
  background: rgba(252, 253, 252, 0.75); backdrop-filter: blur(14px);
}
.nav__brand {
  display: inline-flex; align-items: center; gap: 0.45rem; text-decoration: none;
  font-family: var(--display); font-weight: 600; font-size: 0.92rem; color: var(--ink);
}
.nav__crown { color: var(--coffee); font-size: 1rem; }
.nav__links { display: flex; flex-wrap: wrap; gap: 0.85rem 1.1rem; font-size: 0.84rem; font-weight: 500; }
.nav__links a { text-decoration: none; color: var(--ink-soft); opacity: 0.78; }
.nav__links a:hover, .nav__links a.is-active {
  opacity: 1; color: var(--coffee-deep);
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 0.28em;
}
.nav__link-ext { font-size: 0.8rem; font-weight: 600; color: var(--sky-deep); text-decoration: none; }

.page {
  flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column;
  padding: clamp(0.75rem, 2vh, 1.35rem) 0;
}
.page--night { padding: 0; }

.section__head { margin-bottom: 0.85rem; }
.section__head h2 {
  margin: 0.2rem 0 0.35rem; font-family: var(--display);
  font-size: clamp(1.55rem, 3.2vw, 2.25rem); font-weight: 700; line-height: 1.15;
}
.section__head p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.eyebrow {
  margin: 0; font-family: var(--display); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--coffee);
}
.eyebrow--light { color: rgba(196, 168, 130, 0.95); }

.hero--split {
  position: relative; flex: 1; min-height: 0; height: 100%;
  display: grid; gap: clamp(1rem, 2.5vw, 2rem); align-items: center;
  padding: clamp(0.75rem, 2vh, 1.5rem) clamp(1rem, 3vw, 2rem); overflow: hidden;
  background:
    radial-gradient(700px 420px at 12% 18%, rgba(168, 212, 230, 0.25), transparent 60%),
    radial-gradient(640px 380px at 92% 8%, rgba(184, 217, 196, 0.22), transparent 55%),
    linear-gradient(135deg, #1e2a28 0%, #3d4f48 40%, #4a372c 100%);
  color: var(--cream);
}
.hero--split .hero__copy { position: relative; z-index: 2; max-width: 560px; }
.hero__stage {
  position: relative; z-index: 2; justify-self: center; width: min(100%, 420px);
  max-height: 100%; display: flex; flex-direction: column; min-height: 0;
}
.hero__frame {
  position: relative; flex: 1; min-height: 0; border-radius: 22px; overflow: hidden;
  border: 2px solid rgba(196, 168, 130, 0.55);
  box-shadow: 0 0 0 6px rgba(250, 247, 242, 0.06), 0 20px 50px rgba(0,0,0,0.35);
  background: #1e2a28; aspect-ratio: 3 / 4; max-height: min(68vh, 560px);
}
.hero--split .hero__photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 15%;
}
.hero__caption {
  margin: 0.85rem 0 0; text-align: center; font-family: var(--display);
  font-size: 0.78rem; letter-spacing: 0.12em; color: var(--coffee-soft);
}
.hero__orbs, .atmosphere__orbs, .profile__orbs {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden;
}
.orb {
  position: absolute; bottom: -10%; width: 16px; height: 16px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff8ef, #c4a882 55%, transparent 72%);
  box-shadow: 0 0 16px rgba(196, 168, 130, 0.7);
  animation: orbRise linear infinite; opacity: 0.85;
}
.orb--sky {
  background: radial-gradient(circle at 35% 30%, #e8f7ff, #a8d4e6 55%, transparent 72%);
  box-shadow: 0 0 16px rgba(168, 212, 230, 0.8);
}
.orb--mint {
  background: radial-gradient(circle at 35% 30%, #f0fff4, #b8d9c4 55%, transparent 72%);
  box-shadow: 0 0 16px rgba(184, 217, 196, 0.8);
}
.atmosphere__orbs .orb { opacity: 0.5; width: 12px; height: 12px; }
@keyframes orbRise {
  0% { transform: translate3d(0,0,0) scale(calc(var(--orb-scale,1)*0.8)); opacity: 0; }
  14% { opacity: 0.9; }
  100% { transform: translate3d(16px,-115vh,0) scale(calc(var(--orb-scale,1)*1.05)); opacity: 0; }
}

.hero__kicker {
  margin: 0 0 0.85rem; font-family: var(--display); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--coffee-soft);
}
.hero__brand {
  margin: 0; font-family: var(--display); font-size: clamp(1.85rem, 5vw, 3.4rem);
  font-weight: 700; line-height: 1.05;
  background: linear-gradient(120deg, #faf7f2 0%, #c4a882 40%, #a8d4e6 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 10px 28px rgba(0,0,0,0.35));
}
.hero__title {
  margin: 0.3rem 0 0.7rem; font-family: var(--serif);
  font-size: clamp(1.4rem, 3.2vw, 2.15rem); font-weight: 500; font-style: italic;
  color: rgba(250, 247, 242, 0.92);
}
.hero__lede {
  margin: 0 0 1rem; max-width: 40ch; color: rgba(250, 247, 242, 0.78);
  font-size: clamp(0.92rem, 1.6vw, 1.05rem); font-weight: 300;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1rem; }
.hero__stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem; margin: 0; max-width: 440px;
}
.hero__stats div {
  padding: 0.85rem 0.7rem; border: 1px solid rgba(196, 168, 130, 0.4);
  background: rgba(30, 42, 40, 0.4); backdrop-filter: blur(8px); text-align: center;
}
.hero__stats dt {
  margin: 0; font-family: var(--display); font-size: 1.25rem; font-weight: 600; color: var(--coffee-soft);
}
.hero__stats dd {
  margin: 0.25rem 0 0; color: rgba(250, 247, 242, 0.65); font-size: 0.68rem;
  letter-spacing: 0.04em; text-transform: uppercase;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.72rem 1.15rem; border-radius: 999px; border: 1px solid transparent;
  background: linear-gradient(135deg, #8a6d55, #6b5344); color: #faf7f2;
  font-weight: 600; font-size: 0.9rem; text-decoration: none; cursor: pointer;
  box-shadow: 0 10px 24px rgba(74, 55, 44, 0.32); transition: transform 0.2s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn--ghost {
  background: transparent; border-color: rgba(250, 247, 242, 0.5); color: #faf7f2; box-shadow: none;
}
.page .btn--ghost { border-color: rgba(111, 168, 192, 0.45); color: var(--sky-deep); }

.profile { display: grid; gap: 1rem; flex: 1; min-height: 0; align-items: stretch; overflow: hidden; }
.profile__portrait {
  position: relative; border-radius: 20px; overflow: hidden;
  border: 1px solid rgba(196, 168, 130, 0.45); box-shadow: 0 16px 40px rgba(30, 42, 40, 0.14);
  min-height: 0; height: 100%; background: #1e2a28;
}
.profile__portrait img {
  display: block; width: 100%; height: 100%; min-height: min(58vh, 520px);
  object-fit: cover; object-position: center 12%;
}
.profile__portrait figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 1.1rem 1.2rem;
  background: linear-gradient(transparent, rgba(30, 42, 40, 0.9));
  color: var(--coffee-soft); font-family: var(--display); font-size: 0.85rem; letter-spacing: 0.08em; z-index: 2;
}
.profile__main {
  padding: 1rem 1.15rem; border-radius: 20px; background: rgba(252, 253, 252, 0.88);
  border: 1px solid var(--line); box-shadow: 0 12px 36px rgba(107, 83, 68, 0.1);
  overflow: auto; min-height: 0;
}
.profile__main h3 {
  margin: 0 0 0.45rem; font-family: var(--display); font-size: clamp(1.5rem, 2.8vw, 2rem); font-weight: 700;
}
.profile__role { margin: 0 0 0.9rem; color: var(--sky-deep); font-weight: 600; font-size: 0.95rem; }
.profile__bio { margin: 0 0 1.25rem; color: var(--ink-soft); font-size: 0.95rem; }
.profile__facts { display: grid; gap: 0.65rem; margin: 0; }
.profile__facts div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 0.5rem; align-items: baseline; }
.profile__facts dt {
  margin: 0; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
}
.profile__facts dd { margin: 0; font-weight: 500; }
.profile__facts a { color: var(--sky-deep); font-weight: 600; }

.path {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 0.65rem;
  flex: 1; min-height: 0; overflow: auto;
}
.path__item {
  display: grid; grid-template-columns: 8.5rem 1fr; gap: 0.85rem;
  padding: 0.85rem 1rem; border-radius: 16px;
  background: rgba(252, 253, 252, 0.84); border: 1px solid var(--line);
}
.path__item time { font-family: var(--display); font-size: 0.82rem; font-weight: 700; color: var(--coffee); }
.path__item h3 { margin: 0 0 0.2rem; font-family: var(--display); font-size: 1.05rem; }
.path__item .org { margin: 0 0 0.25rem; color: var(--sky-deep); font-weight: 600; font-size: 0.88rem; }
.path__item p:last-child { margin: 0; color: var(--ink-soft); font-size: 0.9rem; }

.work {
  display: grid; gap: 0.75rem; flex: 1; min-height: 0;
}

.scholar {
  display: grid;
  gap: 0.85rem;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.scholar__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.scholar__stats div {
  padding: 0.7rem 0.55rem;
  text-align: center;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(252, 253, 252, 0.86);
}

.scholar__stats strong {
  display: block;
  font-family: var(--display);
  font-size: 1.35rem;
  color: var(--coffee);
}

.scholar__stats span {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.papers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
  overflow: auto;
  min-height: 0;
}

.papers li {
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(252, 253, 252, 0.84);
}

.papers__meta {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sky-deep);
  margin-bottom: 0.15rem;
}

.papers h3 {
  margin: 0 0 0.15rem;
  font-family: var(--display);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.25;
}

.papers p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.section__head a {
  color: var(--coffee);
  font-weight: 600;
  text-decoration: none;
}

.section__head a:hover {
  text-decoration: underline;
}
.work__item {
  padding: 1rem 1.05rem; border-radius: 18px; background: rgba(252, 253, 252, 0.86);
  border: 1px solid var(--line); box-shadow: 0 10px 28px rgba(107, 83, 68, 0.08);
}
.work__item span {
  display: inline-block; font-family: var(--display); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 0.35rem; color: var(--coffee);
}
.work__item h3 { margin: 0 0 0.35rem; font-family: var(--display); font-size: 1.2rem; }
.work__item p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }
.work__item em {
  display: block; margin-top: 0.55rem; font-style: normal; font-size: 0.75rem;
  font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}

.letter {
  padding: 1.25rem 1.35rem; border-radius: 20px; background: rgba(252, 253, 252, 0.9);
  border: 1px solid var(--line); box-shadow: 0 14px 36px rgba(107, 83, 68, 0.1);
  overflow: auto; max-height: 100%;
}
.letter p {
  margin: 0 0 0.9rem; font-family: var(--serif); font-size: 1.12rem;
  line-height: 1.65; color: var(--ink-soft);
}
.letter__sign { font-family: var(--display); font-size: 1rem !important; color: var(--ink) !important; }

.guestbook { display: grid; gap: 1rem; flex: 1; min-height: 0; }
.guestbook__form {
  display: grid; gap: 0.75rem; padding: 1rem; border-radius: 18px;
  background: rgba(252, 253, 252, 0.88); border: 1px solid var(--line);
}
.guestbook__form label { display: grid; gap: 0.35rem; }
.guestbook__form label span {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.guestbook__form input, .guestbook__form textarea {
  width: 100%; padding: 0.7rem 0.8rem; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); resize: none;
}
.guestbook__form input:focus, .guestbook__form textarea:focus {
  outline: 2px solid rgba(168, 212, 230, 0.5); border-color: var(--sky-deep);
}
.guestbook__list {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 0.65rem; overflow: auto; min-height: 0;
}
.guestbook__list:empty::before {
  content: "No notes yet — leave the first message ✦";
  display: block; padding: 1rem; border-radius: 16px;
  border: 1px dashed rgba(107, 83, 68, 0.3); color: var(--muted);
  font-family: var(--serif); font-style: italic;
}
.wish {
  padding: 0.85rem 1rem; border-radius: 14px;
  background: rgba(252, 253, 252, 0.88); border: 1px solid var(--line);
}
.wish__name { margin: 0 0 0.25rem; font-family: var(--display); font-weight: 700; }
.wish__message { margin: 0 0 0.35rem; color: var(--ink-soft); }
.wish__time { font-size: 0.72rem; color: var(--muted); }

.footer {
  flex: 0 0 auto; padding: 0.55rem 0;
  border-top: 1px solid rgba(107, 83, 68, 0.14);
  background: rgba(252, 253, 252, 0.65); backdrop-filter: blur(10px);
}
.footer__row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  font-size: 0.82rem; color: var(--muted);
}
.footer__name { margin: 0; font-family: var(--display); font-weight: 700; color: var(--ink); }
.footer__links { display: flex; gap: 0.85rem; }
.footer__links a { text-decoration: none; color: var(--coffee); font-weight: 600; }

.reveal {
  opacity: 0; transform: translateY(12px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (min-width: 900px) {
  .hero--split { grid-template-columns: 1.05fr 0.95fr; }
  .hero__frame { max-height: none; height: min(100%, 62vh); }
  .profile { grid-template-columns: 1fr 1.05fr; }
  .path__item { grid-template-columns: 9rem 1fr; }
  .work { grid-template-columns: repeat(3, 1fr); }
  .scholar { grid-template-columns: 11rem 1fr; align-items: start; }
  .scholar__stats { grid-template-columns: 1fr; }
  .guestbook { grid-template-columns: 0.95fr 1.05fr; align-items: start; }
}
@media (max-width: 899px) {
  .nav { flex-wrap: wrap; padding: 0.5rem 0.75rem; }
  .nav__links {
    display: flex; order: 3; width: 100%; gap: 0.6rem 0.85rem;
    padding-top: 0.2rem; overflow-x: auto; flex-wrap: nowrap;
  }
  .nav__link-ext { display: none; }
  .hero--split { grid-template-rows: auto minmax(0, 1fr); gap: 0.75rem; }
  .hero__stats { max-width: none; }
  .hero__stats dd { font-size: 0.58rem; }
  .profile__facts div { grid-template-columns: 1fr; gap: 0.1rem; }
  .hero__brand { font-size: clamp(1.55rem, 7vw, 2.2rem); }
  .hero__frame { max-height: min(42vh, 320px); aspect-ratio: 4 / 5; }
  .hero__caption { display: none; }
  .footer__links { display: none; }
  .path__item { grid-template-columns: 1fr; gap: 0.2rem; }
  .path__item p:last-child { display: none; }
  .work__item p {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .guestbook__list { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .atmosphere__stars, .orb, .reveal { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
