:root {
  --color-bg: #f6f3ec;
  --color-surface: #efeae0;
  --color-card: #ffffff;
  --color-text: #211f1a;
  --color-text-muted: #5f594e;
  --color-border: #e4ddd2;
  --color-border-strong: #d3cabb;
  --color-accent: #12564d;
  --color-accent-hover: #0e433c;
  --color-accent-soft: #e4efea;
  --color-on-accent: #f6f3ec;
  --color-footer-bg: #15211e;
  --color-footer-text: #d7ddd9;
  --color-footer-muted: #8ea39d;

  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  --container-max: 1120px;
  --container-narrow: 720px;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  --font-serif: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--color-accent); text-underline-offset: 2px; }
a:hover { color: var(--color-accent-hover); }

h1, h2, h3 {
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  font-weight: 500;
  line-height: 1.15;
  color: var(--color-text);
  margin: 0 0 var(--space-4);
  letter-spacing: -0.01em;
}

p { margin: 0 0 var(--space-4); }
ul { margin: 0; padding: 0; }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
}
.container.narrow { max-width: var(--container-max); }
.container.narrow > * { max-width: var(--container-narrow); }

.section { padding-block: var(--space-16); border-top: 1px solid var(--color-border); }
.section-alt { background: var(--color-surface); }

.section h2 {
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.15rem);
  margin-bottom: var(--space-6);
}
.section h2::before {
  content: "";
  display: block;
  width: 34px;
  height: 3px;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  margin-bottom: var(--space-4);
}
.section-intro {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  max-width: 60ch;
  margin-bottom: var(--space-8);
}
.section-cta { margin-top: var(--space-8); margin-bottom: 0; }

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  background: var(--color-accent);
  color: var(--color-on-accent);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus { top: var(--space-4); color: var(--color-on-accent); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: .72rem 1.4rem;
  font: inherit;
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-accent);
  color: var(--color-on-accent);
  border-color: var(--color-accent);
}
.btn-primary:hover { background: var(--color-accent-hover); border-color: var(--color-accent-hover); color: var(--color-on-accent); }

.btn-outline {
  background: transparent;
  color: var(--color-accent);
  border-color: var(--color-border-strong);
}
.btn-outline:hover { background: var(--color-accent-soft); border-color: var(--color-accent); color: var(--color-accent); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 243, 236, 0.9);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 4rem;
}
.namemark {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
}
.namemark:hover { color: var(--color-accent); }

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

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
}
.nav-menu a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: .01em;
  padding: var(--space-2) 0;
  border-bottom: 2px solid transparent;
}
.nav-menu a:hover { color: var(--color-text); }
.nav-menu a.is-active { color: var(--color-accent); border-bottom-color: var(--color-accent); }

.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  background: transparent;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text);
  position: relative;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

.hero { position: relative; overflow: hidden; padding-block: var(--space-16) var(--space-20); }
.hero-grid {
  display: grid;
  gap: var(--space-10);
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-portrait { order: -1; margin: 0; justify-self: center; position: relative; }
.hero-rings {
  position: absolute;
  inset: -10%;
  z-index: 0;
  display: grid;
  place-items: center;
  color: var(--color-accent);
  opacity: .2;
  pointer-events: none;
}
.hero-rings svg { width: 112%; height: 112%; }
.hero-portrait img {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 240px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface);
}
#hero-name {
  font-size: clamp(1.95rem, 1rem + 2.2vw, 3.1rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-3);
}
#hero-name .hn-first, #hero-name .hn-last { display: block; }
#hero-name .hn-last { white-space: nowrap; }
.hero-subtitle {
  font-family: var(--font-sans);
  font-size: clamp(1rem, .92rem + .5vw, 1.15rem);
  font-weight: 600;
  color: var(--color-accent);
  letter-spacing: .01em;
  margin-bottom: var(--space-4);
}
.hero-summary {
  font-size: 1.2rem;
  color: var(--color-text-muted);
  max-width: 52ch;
  margin-bottom: var(--space-5);
}
.hero-award {
  font-size: .92rem;
  color: var(--color-text-muted);
  border-left: 2px solid var(--color-accent);
  padding-left: var(--space-4);
  margin-bottom: var(--space-8);
  max-width: 52ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

#about p { font-size: 1.15rem; color: #35312a; }

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  list-style: none;
}
.card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-6);
  box-shadow: 0 1px 2px rgba(32, 22, 40, 0.04);
}
.card h3 { font-size: 1.3rem; margin-bottom: var(--space-2); }
.card p { color: var(--color-text-muted); margin-bottom: 0; }

.topic-list { list-style: none; display: grid; gap: var(--space-8); }
.topic-list h3 { font-size: 1.25rem; margin-bottom: var(--space-1); }
.topic-list p { color: var(--color-text-muted); margin-bottom: 0; max-width: 70ch; }

.link-list { list-style: none; display: grid; gap: 0; }
.link-list li { border-top: 1px solid var(--color-border); }
.link-list li:last-child { border-bottom: 1px solid var(--color-border); }
.link-list a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-5) 0;
  text-decoration: none;
  color: var(--color-text);
}
.link-list a:hover .link-title { color: var(--color-accent); text-decoration: underline; }
.link-title { font-family: var(--font-serif); font-weight: 600; font-size: 1.2rem; }
.link-desc { color: var(--color-text-muted); font-size: .95rem; }

.contact-email { margin: 0 0 var(--space-6); }
.email-address {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
  word-break: break-word;
}
.email-address:hover { text-decoration: underline; }

.site-footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding-block: var(--space-10);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}
.copyright { color: var(--color-footer-muted); font-size: .9rem; margin: 0; }
.footer-links { list-style: none; display: flex; gap: var(--space-5); }
.footer-links a { color: var(--color-footer-text); text-decoration: none; font-size: .9rem; }
.footer-links a:hover { color: #ffffff; }

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}
:focus:not(:focus-visible) { outline: none; }

.js .nav-toggle { display: inline-flex; }
.js .nav-menu {
  position: absolute;
  top: 4rem;
  left: 0;
  right: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 8px 16px rgba(32, 22, 40, 0.08);
  padding: var(--space-2) var(--space-6) var(--space-4);
  display: none;
}
.js .nav-menu.is-open { display: flex; }
.js .nav-menu li { width: 100%; }
.js .nav-menu a { display: block; width: 100%; padding: var(--space-3) 0; border-bottom: 1px solid var(--color-border); }
.js .nav-menu li:last-child a { border-bottom: none; }

@media (min-width: 768px) {
  .section { padding-block: var(--space-24); }
  .hero { padding-block: var(--space-20) var(--space-24); }

  .card-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }

  .topic-list { grid-template-columns: repeat(2, 1fr); gap: var(--space-10) var(--space-12); }

  .nav-toggle,
  .js .nav-toggle { display: none; }
  .nav-menu,
  .js .nav-menu {
    position: static;
    flex-direction: row;
    align-items: center;
    gap: var(--space-6);
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    display: flex;
  }
  .js .nav-menu a { border-bottom: 2px solid transparent; width: auto; padding: var(--space-2) 0; }
  .js .nav-menu a.is-active { border-bottom-color: var(--color-accent); }
}

@media (min-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr minmax(280px, 360px);
    gap: var(--space-16);
    align-items: center;
  }
  .hero-portrait { order: 0; justify-self: end; }
  .hero-portrait img { max-width: 320px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
