/* ── Reset ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-regular);
  line-height: var(--leading-loose);
}

/* ── Buttons & Links ────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-xxs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: var(--color-accent);
  padding: var(--space-3) var(--space-6);
  border: none;
  border-radius: 100px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-primary:hover  { background: var(--blue-90); }
.btn-primary:active { background: var(--blue-100); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-xxs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: none;
  border: 1.5px solid var(--color-accent);
  border-radius: 100px;
  padding: var(--space-3) var(--space-6);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-secondary:hover  { background: var(--blue-20); }
.btn-secondary:active { background: var(--blue-30); }

.link {
  font-family: var(--font-body);
  font-size: var(--text-xxs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  text-decoration: none;
  opacity: 0.5;
  transition: opacity 0.2s;
}
.link:hover { opacity: 1; }

.toggle {
  position: fixed;
  bottom: var(--space-8);
  right: var(--space-8);
  z-index: 9999;
  font-family: var(--font-body);
  font-size: var(--text-xxs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: var(--space-2) var(--space-4);
  border-radius: 100px;
  border: 1px solid var(--grey-50);
  background: var(--grey-0);
  color: var(--grey-160);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.toggle--on {
  background: var(--grey-160);
  color: var(--grey-0);
  border-color: var(--grey-160);
}

/* ── Site nav ───────────────────────────────────── */
.site-nav {
  position: fixed;
  top: var(--space-6);
  right: var(--space-8);
  display: flex;
  align-items: center;
  gap: var(--space-8);
  z-index: 100;
}

.site-nav__link {
  font-family: var(--font-body);
  font-size: var(--text-xxs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  text-decoration: none;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.site-nav__link:hover { opacity: 1; }

/* ════════════════════════════════════════════════
   SHARED — used by both sections
════════════════════════════════════════════════ */

/* Outer section wrapper */
.section {
  padding: var(--space-16) var(--gutter);
}

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

.section__inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* Page-level title */
.section__title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-normal);
  color: var(--color-text-muted);
  margin-bottom: var(--space-16);
}

/* Two-column row (label | items) */
.row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-12) var(--space-8);
  padding-top: var(--space-12);
  border-top: 1px solid var(--color-border);
  margin-bottom: var(--space-12);
}
.row:last-child { margin-bottom: 0; }

/* Left label (year or category name) */
.row__label {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  line-height: var(--leading-normal);
  color: var(--color-text-muted);
  white-space: pre-line;
  position: sticky;
  top: var(--space-8);
  align-self: start;
}

/* Right content column — spans the remaining 2 of 3 columns */
.row__items {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
  grid-column: span 2;
}

/* Single card */
.item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: var(--space-2) var(--space-6);
  align-items: start;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.item.visible { opacity: 1; transform: translateY(0); }

/* Icon badge */
.item__icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: var(--text-xxs);
  font-weight: var(--weight-bold);
  letter-spacing: -0.02em;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Icon image */
.item__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
}

/* Text block */
.item__body { display: flex; flex-direction: column; gap: var(--space-1); }

.item__title {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--color-accent);
  line-height: var(--leading-normal);
}

.item__subtitle {
  font-family: var(--font-body);
  font-size: var(--text-xxs);
  font-weight: var(--weight-regular);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
}

.item__description {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-regular);
  color: var(--color-text);
  line-height: var(--leading-loose);
}

/* Bold emphasis within descriptions */
.item__description strong {
  font-weight: var(--weight-bold);
  color: var(--color-accent);
}

/* ── Books grid ─────────────────────────────────── */
.books {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-12) var(--space-8);
}

.book {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--space-6);
  align-items: start;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.book.visible { opacity: 1; transform: translateY(0); }

.book__cover {
  width: 120px;
  height: auto;
  display: block;
  border-radius: 3px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.book__body {
  display: flex;
  flex-direction: column;
}

.book__title {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--color-accent);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-2);
}

.book__author {
  font-family: var(--font-body);
  font-size: var(--text-xxs);
  font-weight: var(--weight-regular);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
}

.book__description {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-regular);
  color: var(--color-text);
  line-height: var(--leading-loose);
}

/* ── Experience layout ──────────────────────────── */
.exp-bio {
  max-width: 66.66%;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: var(--leading-loose);
  margin-bottom: var(--space-12);
}

.exp-jobs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-12) var(--space-8);
}

.exp-job {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
}

.exp-job__meta {
  font-size: var(--text-xxs);
  font-weight: var(--weight-regular);
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
}

.exp-job__role {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--color-accent);
  line-height: var(--leading-normal);
}

/* ── Responsive ────────────────────────────────── */
@media (max-width: 1280px) {
  .books { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .exp-bio { max-width: 100%; }
  .exp-jobs { grid-template-columns: repeat(2, 1fr); }

  .row {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  .row__label {
    font-size: var(--text-base);
    position: static;
    white-space: normal;
  }
  .books { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .section__title { font-size: var(--text-base); }
  .item { gap: var(--space-2) var(--space-3); }
  .book { grid-template-columns: 90px 1fr; }
  .book__cover { width: 90px; }
  .exp-jobs { grid-template-columns: 1fr; }
}

/* ── About section ── */

/* Two-column hero layout */
.about-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-12);
  align-items: center;
  margin-bottom: var(--space-12);
}

.about-content {
  min-width: 0;
}

.about-photo {
  position: sticky;
  top: var(--space-8);
}

.about-photo__img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

/* About hero */
.about-hero__greeting {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-regular);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-1);
}
.about-hero__headline {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  line-height: var(--leading-normal);
  max-width: 540px;
  margin-bottom: var(--space-6);
}
.about-hero__sub {
  font-size: var(--text-sm);
  max-width: 560px;
  line-height: var(--leading-loose);
}
.about-hero__email {
  display: inline-block;
  margin-top: var(--space-6);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  transition: color 0.15s;
}
.about-hero__email:hover {
  color: var(--color-text);
}

/* Kings — three equal columns */
.kings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-12) var(--space-8);
  margin-bottom: 0;
}
.king-card {
  padding: var(--space-8) 0;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.king-card.visible { opacity: 1; transform: none; }
.king-card__header {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: var(--space-4);
  align-items: start;
  margin-bottom: var(--space-6);
}
.king-card__icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--weight-bold);
  font-size: var(--text-xxs);
  margin-top: 2px;
}
.king-card__icon img { width: 100%; height: 100%; object-fit: contain; }
.king-card__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.king-card__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--color-accent);
  line-height: var(--leading-tight);
}
.king-card__institution {
  font-size: var(--text-xxs);
  font-weight: var(--weight-regular);
  color: var(--color-text-secondary);
}
.king-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: var(--leading-loose);
  margin-bottom: var(--space-3);
}
.king-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-bottom: var(--space-2);
}
.king-card__tag {
  font-family: var(--font-body);
  font-size: var(--text-xxs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text);
  background: var(--color-surface);
  padding: var(--space-1) var(--space-2);
  border-radius: 4px;
}

/* Disclosure */
.disclosure-trigger {
  display: flex;
  justify-content: center;
  margin-top: var(--space-12);
}
.disclosure-line { display: none; }
.disclosure-btn {
  font-family: var(--font-body);
  font-size: var(--text-xxs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: none;
  border: 1.5px solid var(--color-accent);
  border-radius: 100px;
  padding: var(--space-3) var(--space-6);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  white-space: nowrap;
  transition: background 0.2s;
}
.disclosure-btn:hover  { background: var(--blue-20); }
.disclosure-btn:active { background: var(--blue-30); }
.disclosure-chevron { display: inline-block; transition: transform 0.35s ease; }
.disclosure-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.45s ease; }
.disclosure-panel.is-open { grid-template-rows: 1fr; }
.disclosure-panel__inner { overflow: hidden; }
.disclosure-panel__content { padding-top: var(--space-8); }

/* Books intro */
.books__intro {
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  max-width: 560px;
  margin-bottom: var(--space-8);
  line-height: var(--leading-loose);
}

@media (max-width: 860px) {
  .about-layout {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  .about-photo {
    position: static;
    padding: 0 20%;
  }
}

@media (max-width: 700px) {
  .kings-grid { grid-template-columns: 1fr; }
}
