:root {
  --bg: #f5f5f5;
  --surface: #f5f5f5;
  --text: #111111;
  --muted: #5a5a5a;
  --primary: #111111;
  --border: #dbdbdb;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

p {
  text-align: justify;
}

.container {
  width: min(900px, 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(245, 245, 245, 0.95);
  border-bottom: 1px solid var(--border);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  min-height: 52px;
  padding: 0.5rem 0;
}

.site-nav {
  display: flex;
  gap: 1.25rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.site-nav a:hover {
  color: var(--text);
}

.menu-toggle {
  display: none;
}

.layout {
  padding: 3rem 0 1.5rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(140px, 20vw) 1fr;
  gap: clamp(1rem, 2.5vw, 2rem);
  align-items: center;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.portrait-wrap {
  width: clamp(140px, 20vw, 195px);
  aspect-ratio: 4 / 5;
  border: 1px solid var(--border);
  overflow: hidden;
  background: #ececec;
  justify-self: center;
}

.portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.25;
}

h1 {
  margin-bottom: 0.35rem;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.9rem, 5vw, 2.7rem);
}

h2 {
  margin-bottom: 0.65rem;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
}

h3 {
  margin-bottom: 0.2rem;
  font-size: 1.02rem;
  font-weight: 600;
}

.subtitle {
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.lead {
  margin: 0;
  color: #262626;
  max-width: 640px;
}

.full-width-lead {
  max-width: none;
}

.hero-actions {
  margin-top: 1.1rem;
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.5rem 0.78rem;
  border-radius: 6px;
  border: 1px solid transparent;
  text-decoration: none;
  font-size: 0.9rem;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.btn-ghost {
  border-color: var(--border);
  color: var(--text);
  background: #ffffff;
}

.section {
  padding: 1.35rem 0 0.5rem;
}

.card {
  background: var(--surface);
  border: 0;
  border-radius: 0;
  padding: 0;
}

.research-item + .research-item {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.research-toggle summary {
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 1.4rem;
}

.research-toggle summary::-webkit-details-marker {
  display: none;
}

.research-toggle summary::after {
  content: "";
  position: absolute;
  right: 0.1rem;
  top: 0.2rem;
  width: 0.58rem;
  height: 0.58rem;
  border-right: 2px solid #7a7a7a;
  border-bottom: 2px solid #7a7a7a;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.research-toggle[open] summary::after {
  transform: rotate(225deg);
}

.toggle-title {
  display: inline-block;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text);
}

.research-toggle summary .research-meta {
  display: block;
  margin-top: 0.15rem;
}

.research-toggle > p {
  margin: 0.65rem 0 0;
}

.research-meta,
.note {
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer {
  margin-top: 2rem;
  padding: 1rem 0 1.8rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .portrait-wrap {
    width: clamp(140px, 40vw, 210px);
    justify-self: center;
  }
}

@media (max-width: 640px) {
  .nav-wrap {
    justify-content: flex-start;
    min-height: 52px;
    padding: 0.35rem 0;
    gap: 0.5rem;
  }

  .menu-toggle {
    display: inline-block;
    margin-right: auto;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    border-radius: 8px;
    padding: 0.42rem 0.7rem;
    font-size: 0.9rem;
  }

  .site-nav {
    display: none;
    position: absolute;
    right: 4%;
    top: 58px;
    flex-direction: column;
    padding: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
  }

  .site-nav.open {
    display: flex;
  }
}
