:root {
  --bg: #f4f1ea;
  --bg-deep: #eae3d7;
  --surface: #fffdf9;
  --surface-2: #f7f2e9;
  --ink: #16212b;
  --ink-soft: #394650;
  --muted: #66737c;
  --accent: #0d3b59;
  --accent-deep: #08283d;
  --gold: #b17a3d;
  --gold-light: #d9b98b;
  --line: rgba(22, 33, 43, 0.14);
  --shadow: 0 24px 60px rgba(22, 33, 43, 0.12);
  --shadow-sm: 0 10px 30px rgba(22, 33, 43, 0.08);
  --radius: 24px;
  --radius-sm: 14px;
  --max: 1120px;
  --header-h: 78px;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, "Noto Sans", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 8% 0%, rgba(177, 122, 61, 0.11), transparent 30rem),
    radial-gradient(circle at 100% 18%, rgba(13, 59, 89, 0.08), transparent 32rem),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--gold);
}

::selection {
  background: var(--gold-light);
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--gold-light);
  outline-offset: 3px;
}

.wrap {
  width: min(calc(100% - 2.5rem), var(--max));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  transform: translateY(-200%);
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: var(--accent-deep);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 241, 234, 0.88);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-right: auto;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--accent), var(--accent-deep));
  box-shadow: 0 8px 18px rgba(13, 59, 89, 0.24);
  color: #fff;
  font-family: var(--serif);
  font-size: 1rem;
  letter-spacing: 0.08em;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.brand-role {
  max-width: 300px;
  margin-top: 0.22rem;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.site-nav a {
  position: relative;
  padding: 0.55rem 0.68rem;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a::after {
  position: absolute;
  right: 0.68rem;
  bottom: 0.28rem;
  left: 0.68rem;
  height: 2px;
  background: var(--gold);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.site-nav a:hover::after,
.site-nav a.is-active::after {
  transform: scaleX(1);
}

.site-nav a.is-active {
  color: var(--accent);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.68rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink-soft);
  font-size: 0.78rem;
  text-decoration: none;
}

.lang-switch:hover {
  border-color: var(--gold);
  color: var(--ink);
}

.lang-code {
  color: var(--accent);
  font-weight: 850;
  letter-spacing: 0.08em;
}

.lang-name {
  font-weight: 600;
}

.mobile-menu {
  display: none;
  position: relative;
}

.mobile-menu summary {
  display: grid;
  place-content: center;
  gap: 4px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  list-style: none;
}

.mobile-menu summary::-webkit-details-marker {
  display: none;
}

.mobile-menu summary span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
}

.mobile-menu nav {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  display: flex;
  flex-direction: column;
  min-width: 224px;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.mobile-menu nav a {
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  color: var(--ink-soft);
  font-weight: 650;
  text-decoration: none;
}

.mobile-menu nav a:hover,
.mobile-menu nav a.is-active {
  background: var(--surface-2);
  color: var(--accent);
}

.mobile-menu nav .mobile-lang {
  margin-top: 0.35rem;
  border-top: 1px solid var(--line);
  color: var(--gold);
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3.6rem, 7vw, 6rem) 0 clamp(4.5rem, 8vw, 7rem);
  background:
    radial-gradient(circle at 82% 18%, rgba(217, 185, 139, 0.2), transparent 24rem),
    linear-gradient(135deg, #0a2638 0%, #0d3b59 55%, #15506f 100%);
  color: #fff;
}

.hero::before {
  position: absolute;
  right: -12%;
  bottom: -55%;
  width: 65%;
  height: 90%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 185, 139, 0.16), transparent 68%);
  content: "";
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.72fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--gold-light);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 0.98;
}

.hero-role {
  margin: 1.3rem 0 0;
  color: #d7e4ec;
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
}

.hero-lead {
  max-width: 42rem;
  margin-top: 1.6rem;
  color: #e7eef2;
  font-size: 1.04rem;
}

.hero-lead p {
  margin: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.8rem 1.25rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 750;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  color: var(--accent-deep);
}

.btn-primary:hover {
  background: var(--gold-light);
  color: var(--accent-deep);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.stats {
  display: flex;
  gap: 2.2rem;
  margin: 2.6rem 0 0;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.stats div {
  display: flex;
  flex-direction: column;
}

.stats dt {
  color: #fff;
  font-family: var(--serif);
  font-size: 1.7rem;
  line-height: 1;
}

.stats dd {
  margin: 0.35rem 0 0;
  color: #b9cbd7;
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-portrait {
  display: flex;
  justify-content: center;
}

.portrait-frame {
  position: relative;
  width: min(100%, 360px);
  padding: 0.65rem;
  border-radius: 30px 30px 30px 8px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.04));
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}

.portrait-frame::before {
  position: absolute;
  top: -1.2rem;
  right: -1.2rem;
  width: 8rem;
  height: 8rem;
  border: 1px solid rgba(217, 185, 139, 0.5);
  border-radius: 50%;
  content: "";
}

.portrait-frame img {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 24px 24px 24px 4px;
  filter: saturate(0.92) contrast(1.03);
  object-fit: cover;
}

/* Interior page heading */

.page-hero {
  padding: clamp(3rem, 6vw, 5rem) 0;
  background:
    radial-gradient(circle at 85% 20%, rgba(217, 185, 139, 0.16), transparent 22rem),
    linear-gradient(135deg, #0a2638 0%, #0d3b59 100%);
  color: #fff;
}

.page-hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.3rem, 5vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.page-lead {
  max-width: 48rem;
  margin: 1rem 0 0;
  color: #c9d8e1;
}

/* Content */

.content-section {
  padding: clamp(2.5rem, 5vw, 4.5rem) 0 clamp(4rem, 7vw, 6rem);
}

.content-layout .prose {
  position: relative;
  max-width: 920px;
  margin: -4.5rem auto 0;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.publications-layout {
  position: relative;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
  min-width: 0;
  margin-top: -3.5rem;
}

.publications-layout > * {
  min-width: 0;
}

.year-nav {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
  max-width: 100%;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.year-nav-title {
  margin: 0 0 0.7rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.year-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  width: 100%;
  min-width: 0;
  max-height: 60vh;
  overflow: auto;
}

.year-links a {
  padding: 0.28rem 0.52rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 650;
  text-decoration: none;
}

.year-links a:hover {
  background: var(--accent);
  color: #fff;
}

.publications-layout .prose {
  padding: clamp(1.5rem, 4vw, 3.5rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

/* Article typography */

.prose {
  overflow-wrap: break-word;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

.prose > :first-child {
  margin-top: 0;
}

.prose > :last-child {
  margin-bottom: 0;
}

.prose h2,
.prose h3 {
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.18;
}

.prose h2 {
  margin: 2.8rem 0 1rem;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
}

.prose h3 {
  margin: 2rem 0 0.8rem;
  font-size: 1.3rem;
}

.prose p {
  margin: 0 0 1.2rem;
}

.prose ul,
.prose ol {
  margin: 0 0 1.4rem;
  padding-left: 1.3rem;
}

.prose li {
  margin: 0.35rem 0;
}

.prose li::marker {
  color: var(--gold);
}

.prose strong {
  color: var(--ink);
}

.prose a {
  color: var(--accent);
}

.prose a:hover {
  color: var(--gold);
}

.prose blockquote {
  margin: 1.8rem 0;
  padding: 0.8rem 0 0.8rem 1.4rem;
  border-left: 3px solid var(--gold);
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 1.15rem;
}

.prose hr {
  margin: 2.5rem 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.page-about .prose > p:first-child::first-letter {
  float: left;
  padding: 0.15rem 0.5rem 0 0;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 4.2rem;
  line-height: 0.8;
}

/* Publications */

.page-publications .prose h2 {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 2.6rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--line);
}

.page-publications .prose h2:first-child {
  margin-top: 0;
}

.page-publications .prose h2::before {
  width: 0.55rem;
  height: 0.55rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--gold);
  content: "";
}

.page-publications .prose ul {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.page-publications .prose li {
  position: relative;
  padding: 0.75rem 1rem 0.75rem 1.5rem;
  border-left: 2px solid transparent;
  border-radius: 0 10px 10px 0;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.page-publications .prose li::before {
  position: absolute;
  top: 1.2rem;
  left: 0.35rem;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--gold);
  content: "";
  opacity: 0.7;
}

.page-publications .prose li:hover {
  border-left-color: var(--gold);
  background: var(--surface-2);
}

/* Contact */

.page-contact .prose p:first-of-type {
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 1.04rem;
}

.page-contact .prose ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.5rem;
  padding: 0;
  list-style: none;
}

.page-contact .prose li {
  margin: 0;
}

.page-contact .prose li a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.page-contact .prose li a::before {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--gold);
  content: "";
}

.page-contact .prose li a:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

/* 404 */

.page-error .prose {
  max-width: 640px;
  margin-inline: auto;
  text-align: center;
}

.page-error .prose .btn {
  margin-top: 0.5rem;
}

/* Footer */

.site-footer {
  padding: 3rem 0 2rem;
  background: #0a2638;
  color: #c9d8e1;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto;
  gap: 1.5rem;
  align-items: start;
}

.footer-brand {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}

.brand-mark.small {
  width: 38px;
  height: 38px;
  font-size: 0.85rem;
  box-shadow: none;
}

.footer-brand p {
  margin: 0;
  color: #e7eef2;
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.35;
}

.footer-brand p span {
  color: #8fa8b8;
  font-family: var(--sans);
  font-size: 0.74rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
}

.footer-nav a {
  color: #c9d8e1;
  font-size: 0.88rem;
  text-decoration: none;
}

.footer-nav a:hover {
  color: #fff;
}

.footer-meta {
  color: #8fa8b8;
  font-size: 0.78rem;
  text-align: right;
}

.footer-copy {
  margin: 0 0 0.75rem;
}

.footer-copy p {
  margin: 0;
}

.footer-copy p + p {
  margin-top: 0.4rem;
}

.to-top {
  color: var(--gold-light);
  font-weight: 750;
  text-decoration: none;
}

/* Responsive */

@media (max-width: 1180px) {
  .brand-role {
    display: none;
  }
}

@media (max-width: 1100px) {
  .lang-name {
    display: none;
  }
}

@media (max-width: 980px) {
  .site-nav {
    display: none;
  }

  .mobile-menu {
    display: block;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.6fr);
  }
}

@media (max-width: 760px) {
  .wrap {
    width: min(calc(100% - 1.5rem), var(--max));
  }

  .header-inner {
    gap: 0.75rem;
  }

  .hero {
    padding-top: 2.8rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    order: 1;
  }

  .hero-portrait {
    order: 2;
    margin-top: 0.75rem;
  }

  .portrait-frame {
    width: min(82vw, 320px);
  }

  .hero h1 {
    font-size: clamp(2.6rem, 13vw, 4rem);
  }

  .stats {
    gap: 1.5rem;
  }

  .content-layout .prose {
    margin-top: -3rem;
  }

  .publications-layout {
    grid-template-columns: 1fr;
    margin-top: -2.5rem;
  }

  .year-nav {
    position: static;
    overflow: hidden;
  }

  .year-links {
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
    max-height: none;
    padding-bottom: 0.25rem;
    overflow-x: auto;
  }

  .year-links a {
    white-space: nowrap;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-meta {
    text-align: left;
  }
}

@media (max-width: 520px) {
  .lang-switch {
    padding: 0.4rem 0.55rem;
  }

  .hero-actions .btn {
    flex: 1 1 100%;
  }

  .stats {
    gap: 1.2rem;
  }

  .stats dt {
    font-size: 1.4rem;
  }
}

@media (max-width: 380px) {
  .lang-switch {
    display: none;
  }

  .brand-name {
    font-size: 1rem;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  body {
    background: #fff;
    color: #000;
  }

  .site-header,
  .site-footer,
  .year-nav,
  .hero-actions,
  .stats,
  .skip-link {
    display: none !important;
  }

  .page-hero {
    padding: 0 0 1.5rem;
    background: none;
    color: #000;
  }

  .page-hero .eyebrow,
  .page-lead {
    color: #444;
  }

  .content-section {
    padding: 0;
  }

  .publications-layout {
    display: block;
    margin: 0;
  }

  .publications-layout .prose {
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .page-publications .prose li {
    break-inside: avoid;
  }
}
