/* ===== Design tokens ===== */
:root {
  --bg: #f7f5f0;
  --bg-alt: #efeae0;
  --surface: #ffffff;
  --text: #1b1a17;
  --text-muted: #676155;
  --border: #ddd5c4;
  --accent: #1f2d50;
  --accent-hover: #16203c;
  --accent-soft: #e9ebf1;
  --accent-contrast: #ffffff;
  --shadow: 0 1px 2px rgba(20,18,12,0.04), 0 6px 16px rgba(20,18,12,0.05);
  --shadow-lg: 0 2px 4px rgba(20,18,12,0.05), 0 16px 32px rgba(20,18,12,0.08);
  --panel-ring: rgba(255,255,255,0.07);
  --radius: 4px;
  --max-width: 1120px;
  --font-heading: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15151a;
    --bg-alt: #1b1b21;
    --surface: #1f1f26;
    --text: #efeadf;
    --text-muted: #a29c8e;
    --border: #34333b;
    --accent: #c9a15a;
    --accent-hover: #d9b571;
    --accent-soft: #2a2517;
    --accent-contrast: #17140c;
    --shadow: 0 1px 2px rgba(0,0,0,0.3), 0 6px 18px rgba(0,0,0,0.32);
    --shadow-lg: 0 2px 4px rgba(0,0,0,0.3), 0 18px 36px rgba(0,0,0,0.4);
    --panel-ring: rgba(0,0,0,0.14);
  }
}

:root[data-theme="dark"] {
  --bg: #15151a;
  --bg-alt: #1b1b21;
  --surface: #1f1f26;
  --text: #efeadf;
  --text-muted: #a29c8e;
  --border: #34333b;
  --accent: #c9a15a;
  --accent-hover: #d9b571;
  --accent-soft: #2a2517;
  --accent-contrast: #17140c;
  --shadow: 0 1px 2px rgba(0,0,0,0.3), 0 6px 18px rgba(0,0,0,0.32);
  --shadow-lg: 0 2px 4px rgba(0,0,0,0.3), 0 18px 36px rgba(0,0,0,0.4);
  --panel-ring: rgba(0,0,0,0.14);
}

/* ===== Reset ===== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 600; line-height: 1.22; margin: 0; }
p { margin: 0; color: var(--text-muted); }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn--primary { background: var(--accent); color: var(--accent-contrast); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--secondary { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn--secondary:hover { background: var(--accent-soft); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--text); }
.btn--sm { padding: 8px 16px; font-size: 13.5px; }

/* ===== Navbar ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.2s ease;
}
.navbar.scrolled { box-shadow: 0 1px 0 rgba(0,0,0,0.02), 0 8px 20px -14px rgba(0,0,0,0.18); }
.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.navbar__brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-contrast);
  border-radius: 3px;
  letter-spacing: 0.02em;
}
.navbar__links {
  display: flex;
  gap: 30px;
}
.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 4px 0;
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent);
}
.navbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: grid;
  place-items: center;
  transition: border-color 0.15s ease;
}
.theme-toggle:hover { border-color: var(--accent); }
.icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: block; }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: transparent;
  border: none;
}
.hamburger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text);
  margin: 0 auto;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.hero__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 42%;
  background: var(--accent);
  z-index: 0;
}
.hero__panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-radial-gradient(circle at 28% 32%, transparent 0 34px, var(--panel-ring) 34px 35px);
}
.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 56px;
  align-items: center;
  padding: 96px 0 100px;
}
.eyebrow {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(34px, 4.6vw, 56px);
  margin-bottom: 22px;
  letter-spacing: -0.01em;
}
.hero__lead {
  font-size: 19px;
  color: var(--text);
  margin-bottom: 16px;
  max-width: 560px;
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.5;
}
.hero__sub {
  font-size: 16px;
  margin-bottom: 36px;
  max-width: 540px;
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.hero__visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-left: -52px;
}
.avatar {
  width: 208px;
  height: 208px;
  border-radius: 50%;
  background: var(--surface);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  outline: 7px solid var(--surface);
  outline-offset: -1px;
}
.avatar span {
  font-family: var(--font-heading);
  font-size: 54px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.hero__badge {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  box-shadow: var(--shadow);
}
.hero__iconrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
}
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  background: var(--surface);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.hero__iconrow-label {
  font-size: 13px;
  color: var(--text-muted);
}

/* ===== Pull quote band ===== */
.quote-band {
  background: var(--accent);
  padding: 76px 0;
}
.quote-band__inner {
  max-width: 740px;
  text-align: center;
  position: relative;
}
.quote-band__mark {
  display: block;
  font-family: var(--font-heading);
  font-size: 90px;
  line-height: 0.5;
  color: color-mix(in srgb, var(--accent-contrast) 32%, transparent);
  margin-bottom: 28px;
}
.quote-band__text {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(21px, 2.6vw, 28px);
  line-height: 1.55;
  color: var(--accent-contrast);
}
.quote-band__attr {
  margin-top: 26px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent-contrast) 65%, transparent);
  position: relative;
  padding-top: 20px;
}
.quote-band__attr::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 1px;
  background: color-mix(in srgb, var(--accent-contrast) 40%, transparent);
}

/* ===== Arrow link ===== */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--text);
}
.link-arrow__circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex: none;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.link-arrow:hover .link-arrow__circle {
  background: var(--accent);
  color: var(--accent-contrast);
  transform: translateX(3px);
}

/* ===== Sections ===== */
.section { padding: 88px 0; }
.section--alt { background: var(--bg-alt); }
.section-eyebrow {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(26px, 3.2vw, 36px);
  margin-bottom: 16px;
  padding-bottom: 18px;
  position: relative;
  letter-spacing: -0.01em;
}
.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 2px;
  background: var(--accent);
}
.section-intro {
  font-size: 16px;
  max-width: 600px;
  margin-bottom: 44px;
}
.subsection-title {
  font-size: 20px;
  margin: 56px 0 24px;
}

/* ===== About ===== */
.about__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  align-items: start;
}
.about__copy p { margin-bottom: 18px; font-size: 16px; }
.about__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.stat-card {
  background: var(--surface);
  padding: 26px 18px;
  text-align: center;
}
.stat-card__num {
  display: block;
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 600;
  color: var(--accent);
}
.stat-card__label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ===== Timeline ===== */
.timeline {
  position: relative;
  padding-left: 28px;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 34px;
}
.timeline__item { position: relative; }
.timeline__item--current .timeline__content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  padding: 18px 20px;
  margin-left: -20px;
}
.timeline__dot {
  position: absolute;
  left: -33px;
  top: 5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text-muted);
}
.timeline__item--current .timeline__dot {
  width: 10px;
  height: 10px;
  left: -34px;
  top: 23px;
  background: var(--accent);
}
.timeline__date {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
}
.timeline__content h3 {
  font-size: 18px;
  margin: 6px 0 4px;
  font-weight: 600;
}
.timeline__org { font-size: 14px; }

/* ===== Chips ===== */
.chip-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  padding: 9px 16px;
  border-radius: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.15s ease;
}
.chip:hover { border-color: var(--accent); }

/* ===== Cards ===== */
.card-grid { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); }
.card-grid--3 { grid-template-columns: repeat(3, 1fr); }
.card-grid--2 { grid-template-columns: repeat(2, 1fr); }

.pub-card, .mini-card, .award-card {
  position: relative;
  background: var(--surface);
  padding: 26px;
  transition: background 0.15s ease;
}
.pub-card:hover, .mini-card:hover, .award-card:hover { background: var(--bg-alt); }
.pub-card__tag {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.pub-card h3 { font-size: 17px; margin-bottom: 8px; font-weight: 600; }
.pub-card__meta { font-size: 13.5px; }

.mini-card__date {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--accent);
  margin-bottom: 10px;
}
.mini-card h4, .award-card h4 {
  font-family: var(--font-heading);
  font-size: 15.5px;
  font-weight: 600;
  margin-bottom: 6px;
}
.mini-card p, .award-card p { font-size: 13.5px; }

.award-card { padding-left: 74px; min-height: 76px; display: flex; flex-direction: column; justify-content: center; }
.award-card__icon {
  position: absolute;
  left: 26px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 3px;
  display: grid;
  place-items: center;
  color: var(--accent);
}

/* ===== Download callout ===== */
.download-callout {
  margin-top: 48px;
  padding: 28px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.download-callout p { color: var(--text); font-weight: 500; margin: 0; }

/* ===== Badges ===== */
.badge-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.badge {
  padding: 9px 15px;
  border-radius: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
}

/* ===== Resume section ===== */
.resume-section { padding: 0 0 88px; }
.resume-section__inner {
  text-align: center;
  max-width: 600px;
  padding: 52px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.resume-section__inner h2 { font-size: 28px; margin-bottom: 14px; }
.resume-section__inner p { margin-bottom: 28px; font-size: 15.5px; }

/* ===== Contact ===== */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
}
.contact__row {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.contact__row-text { display: flex; flex-direction: column; gap: 4px; }
.contact__icon {
  flex: none;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 3px;
  display: grid;
  place-items: center;
  color: var(--accent);
}
.contact__label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.contact__value {
  font-size: 16.5px;
  font-weight: 600;
  color: var(--text);
}
.contact__value--btn {
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 16.5px;
  font-weight: 600;
}
.contact__value--btn:hover { color: var(--accent); }
.copy-hint {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.contact__value--btn:hover .copy-hint { opacity: 1; }
.contact__value--muted { color: var(--text-muted); font-weight: 500; font-size: 14px; }

.contact__form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.contact__form label {
  font-size: 13px;
  font-weight: 600;
  margin-top: 14px;
}
.contact__form input, .contact__form textarea {
  padding: 12px 14px;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  resize: vertical;
}
.contact__form input:focus, .contact__form textarea:focus {
  border-color: var(--accent);
}
.contact__form button { margin-top: 22px; align-self: flex-start; }

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer__name { font-weight: 600; color: var(--text); font-family: var(--font-heading); }
.footer__tagline { font-size: 13px; }
.footer__copy { font-size: 13px; }
.footer__top { font-size: 13px; font-weight: 600; color: var(--accent); }

/* ===== Scroll animations ===== */
.fade-in {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero__panel { display: none; }
  .hero__inner { grid-template-columns: 1fr; text-align: center; padding-top: 56px; }
  .hero__lead, .hero__sub { max-width: 100%; margin-left: auto; margin-right: auto; }
  .hero__cta { justify-content: center; }
  .hero__iconrow { justify-content: center; }
  .hero__visual { margin-left: 0; order: -1; }
  .about__grid { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: 1fr; }
  .card-grid--3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .navbar__links {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 12px 24px 24px;
    gap: 4px;
    transform: translateY(-140%);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }
  .navbar__links.open { transform: translateY(0); opacity: 1; }
  .nav-link { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .hamburger { display: flex; }
  .navbar__actions .btn--ghost { display: none; }
  .card-grid--3, .card-grid--2 { grid-template-columns: 1fr; }
  .about__stats { grid-template-columns: 1fr 1fr; }
  .download-callout { flex-direction: column; align-items: flex-start; }
}
