/* ---------- Design tokens ---------- */
:root {
  --bg: #fbf8f3;
  --bg-alt: #f3ede1;
  --card: #ffffff;
  --text: #2b2620;
  --text-muted: #6b6358;
  --accent: #3a5a40;
  --accent-dark: #274430;
  --highlight: #7b1de2;
  --border: #e6ddcc;
  --shadow: 0 4px 18px rgba(43, 38, 32, 0.08);
  --radius: 14px;
  --max-width: 1080px;
  --ink: #14120e;
  --cream: #f5f1e8;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  color: var(--accent-dark);
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-top: 0; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--highlight); }

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

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

/* ---------- Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 248, 243, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-bar {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--accent-dark);
  white-space: nowrap;
}

.brand:hover { color: var(--accent-dark); opacity: 0.8; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--accent-dark);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.3rem 0.1rem;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--accent-dark);
  border-bottom-color: var(--highlight);
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--border);
    margin-top: 0.8rem;
    padding-top: 0.5rem;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 0.6rem 0.2rem; }
  .nav-bar { flex-wrap: wrap; }
}

/* ---------- Profile orbit (main page) ---------- */
.home-orbit {
  background: var(--ink);
  background-image:
    radial-gradient(rgba(255,255,255,0.14) 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--cream);
  padding: 4.5rem 0 5rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--highlight);
  margin-bottom: 0.8rem;
}

.orbit-stage {
  position: relative;
  width: min(760px, 94vw);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}

.profile-center {
  position: absolute;
  inset: 0;
  margin: auto;
  width: min(240px, 55%);
  height: fit-content;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.3rem;
  z-index: 2;
}

.profile-photo {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
  margin-bottom: 0.6rem;
}

.home-orbit h1 {
  color: var(--cream);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 0.3rem;
}

.home-orbit .prose {
  color: rgba(245, 241, 232, 0.72);
  font-size: 0.9rem;
  max-width: 240px;
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.2rem;
  margin: 0.7rem 0 0;
  color: rgba(245, 241, 232, 0.6);
  font-size: 0.85rem;
}

.contact-row a { color: rgba(245, 241, 232, 0.85); }
.contact-row a:hover { color: var(--highlight); }

.orbit-ring {
  position: absolute;
  inset: 0;
}

/* Lets --angle be animated smoothly instead of jumping between values */
@property --angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

.orbit-item {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 112px;
  height: 112px;
  margin: -56px 0 0 -56px;
  --radius: 300px;
  transform: rotate(var(--angle)) translate(var(--radius)) rotate(calc(-1 * var(--angle)));
  opacity: 0;
  animation:
    orbit-in 0.6s ease both,
    orbit-spin 42s linear infinite;
  z-index: 1;
}

.orbit-item:hover { animation-play-state: paused, paused; }

/* Starting angle (matches each circle's position) + fade-in delay,
   expressed as a negative spin delay so it begins already in place. */
.orbit-item:nth-child(1) { animation-delay: 0.15s, -31.5s; }
.orbit-item:nth-child(2) { animation-delay: 0.22s, -37.5s; }
.orbit-item:nth-child(3) { animation-delay: 0.29s, -1.5s; }
.orbit-item:nth-child(4) { animation-delay: 0.36s, -7.5s; }
.orbit-item:nth-child(5) { animation-delay: 0.43s, -13.5s; }
.orbit-item:nth-child(6) { animation-delay: 0.50s, -19.5s; }
.orbit-item:nth-child(7) { animation-delay: 0.57s, -25.5s; }

@keyframes orbit-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes orbit-spin {
  from { --angle: 0deg; }
  to { --angle: 360deg; }
}

.orbit-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  text-decoration: none;
  color: var(--cream);
  text-align: center;
  padding: 0.5rem;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.orbit-circle:hover,
.orbit-circle:focus-visible {
  background: var(--highlight);
  border-color: var(--highlight);
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 10px 30px rgba(123, 29, 226, 0.5);
}

.orbit-emoji { font-size: 1.6rem; margin-bottom: 0.2rem; }

.orbit-label {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 0.82rem;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

@media (max-width: 1000px) and (min-width: 761px) {
  .orbit-item {
    --radius: 230px;
    width: 96px;
    height: 96px;
    margin: -48px 0 0 -48px;
  }
  .profile-photo { width: 112px; height: 112px; }
}

/* ---------- Mobile menu list (main page, small screens) ---------- */
.mobile-menu-list {
  display: none;
}

@media (max-width: 760px) {
  .home-orbit { padding: 3rem 0 1rem; }
  .orbit-stage {
    width: 100%;
    aspect-ratio: auto;
  }
  .profile-center {
    position: static;
    width: 100%;
    margin: 0 auto;
  }
  .orbit-ring { display: none; }

  .mobile-menu-list {
    display: block;
    margin-top: 2.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
  }

  .mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 0.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    text-decoration: none;
    color: var(--cream);
  }

  .mobile-menu-num {
    font-size: 0.8rem;
    color: rgba(245, 241, 232, 0.4);
    width: 1.6rem;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
  }

  .mobile-menu-emoji { font-size: 1.3rem; flex-shrink: 0; }

  .mobile-menu-label {
    font-family: "Fraunces", Georgia, serif;
    font-weight: 600;
    font-size: 1.05rem;
    flex: 1;
    transition: color 0.2s ease, transform 0.2s ease;
  }

  .mobile-menu-item:hover .mobile-menu-label,
  .mobile-menu-item:active .mobile-menu-label {
    color: var(--highlight);
    transform: translateX(6px);
  }
}

/* ---------- Page transitions ---------- */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) { animation: vt-out 0.38s cubic-bezier(.4,0,.2,1) both; }
::view-transition-new(root) { animation: vt-in 0.38s cubic-bezier(.4,0,.2,1) both; }

@keyframes vt-out {
  to { opacity: 0; transform: translateX(-24px); }
}

@keyframes vt-in {
  from { opacity: 0; transform: translateX(24px); }
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

main { animation: page-in 0.55s cubic-bezier(.16,1,.3,1) both; }

@media (prefers-reduced-motion: reduce) {
  main { animation: none; }
  .orbit-item { animation: none; opacity: 1; }
  .orbit-circle { animation: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* ---------- Generic page sections ---------- */
.page-header {
  padding: 3rem 0 1rem;
}

section.block {
  padding: 1.5rem 0 2.5rem;
}

.prose {
  max-width: 700px;
  font-size: 1.05rem;
}

.prose p { margin-bottom: 1.1em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.65rem 1.3rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
}

.btn:hover { background: var(--accent-dark); color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--accent-dark);
  border: 1.5px solid var(--accent);
}

.btn-outline:hover { background: var(--accent); color: #fff; }

/* ---------- Hobbies ---------- */
.hobby-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.hobby-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem;
  box-shadow: var(--shadow);
}

.hobby-card .hobby-icon { font-size: 1.6rem; margin-bottom: 0.5rem; }

.entry { margin-bottom: 1.3rem; }
.entry-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.15rem;
}
.entry-title { font-weight: 700; color: var(--text); }
.entry-role { font-style: italic; color: var(--text-muted); font-size: 0.95rem; }
.entry-date { color: var(--text-muted); font-size: 0.88rem; white-space: nowrap; }
.entry ul { margin: 0.3rem 0 0; padding-left: 1.2rem; }
.entry li { margin-bottom: 0.25rem; }

/* ---------- Awards ---------- */
.award-list { list-style: none; margin: 0; padding: 0; }
.award-list li {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--highlight);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.7rem;
  font-weight: 500;
}

/* ---------- Galleries ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.9rem;
}

.gallery-grid figure { margin: 0; }

.gallery-grid button.thumb {
  width: 100%;
}

.gallery-grid button.thumb {
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  cursor: zoom-in;
  background: var(--card);
  box-shadow: var(--shadow);
}

.gallery-grid img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}

.gallery-grid button.thumb:hover img { transform: scale(1.05); }

.pub-caption {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.5rem 0.6rem 0.7rem;
  text-align: center;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 14, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 2rem;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.lightbox-close {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  font-size: 1.8rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  cursor: pointer;
}

.lightbox-nav:hover { background: rgba(255,255,255,0.25); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

/* ---------- Publications ---------- */
.book-list { list-style: none; margin: 0; padding: 0; }
.book-list li {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  margin-bottom: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow);
}

.book-list .book-title { font-weight: 600; color: var(--text); }
.book-list .book-meta { font-size: 0.88rem; color: var(--text-muted); }

.note {
  background: var(--bg-alt);
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* ---------- Journal ---------- */
.journal-entry {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.3rem;
  overflow: hidden;
}

.journal-entry summary {
  cursor: pointer;
  padding: 1.1rem 1.3rem;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--accent-dark);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.journal-entry summary::-webkit-details-marker { display: none; }
.journal-entry summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--highlight);
  margin-left: 1rem;
}
.journal-entry[open] summary::after { content: "\2212"; }

.journal-body {
  padding: 0 1.3rem 1.4rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  white-space: pre-line;
  color: var(--text);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding: 2rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}
