:root {
  --bg: #f7f4ef;
  --surface: #ffffff;
  --surface-alt: #f1eee9;
  --border: rgba(24, 31, 38, 0.12);
  --text: #1d2328;
  --muted: #5d6670;
  --heading: #171d22;
  --accent: #1d4a74;
  --accent-soft: rgba(29, 74, 116, 0.1);
  --shadow: 0 12px 28px rgba(20, 27, 32, 0.05);
  --max-width: 1100px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

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

p,
ul,
ol {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--heading);
  line-height: 1.2;
  margin-top: 0;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 3.3vw, 4rem);
  margin-bottom: 0.8rem;
}

h2 {
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  margin-bottom: 0.8rem;
}

h3 {
  font-size: 1.3rem;
  margin-bottom: 0.7rem;
}

.container {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(247, 244, 239, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem 0;
  gap: 1.25rem;
}

.brand {
  color: var(--heading);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.primary-nav a {
  color: var(--muted);
  font-size: 0.96rem;
  text-decoration: none;
}

.primary-nav a[aria-current="page"] {
  color: var(--heading);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  width: 2.8rem;
  height: 2.8rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 1.2rem;
  height: 2px;
  margin: 0.25rem auto;
  background: var(--text);
}

main {
  padding: 2rem 0 4rem;
}

.anchored-section {
  scroll-margin-top: 5.5rem;
}

.section-block,
.intro-section {
  margin-bottom: 2.8rem;
}

.intro-section {
  padding-top: 3.5rem;
  padding-bottom: 1rem;
}

.book-cover {
  margin: 0;
  width: 100%;
  max-width: 260px;
}

.book-cover img {
  width: 100%;
  display: block;
  border-radius: 0.35rem;
  box-shadow: var(--shadow);
}

.book-description {
  line-height: 1.75;
}

.feature-grid {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
}

.book-feature {
  padding-top: 0.5rem;
}

.subtitle {
  color: var(--muted);
  font-style: italic;
  margin-bottom: 1rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card-label {
  margin-bottom: 0.6rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 700;
}

.tag-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.tag-list li {
  background: var(--accent-soft);
  color: var(--heading);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
}

.detail-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.timeline {
  display: grid;
  gap: 1.25rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: minmax(170px, 220px) minmax(0, 1fr);
  gap: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.timeline-meta {
  color: var(--muted);
  display: grid;
  gap: 0.3rem;
}

.timeline-employer {
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.detail-list {
  padding-left: 1.4rem;
  color: var(--text);
}

.muted-text {
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 2.25rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.footer-name {
  margin: 0;
  font-weight: 600;
}

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

.text-center {
  text-align: center;
}

.small-space {
  padding-top: 2rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 3px solid rgba(29, 74, 116, 0.4);
  outline-offset: 2px;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 3rem;
  align-items: center;
}

.profile-portrait {
  width: 220px;
  margin: 0;
  justify-self: end;
}

.profile-portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 25%;
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow);
}

.construction-section {
  min-height: 55vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  align-items: center;
}

.construction-section h1 {
  margin-bottom: 1rem;
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-block;
  }

  .primary-nav {
    display: none;
    position: absolute;
    right: 1rem;
    top: calc(100% + 0.5rem);
    flex-direction: column;
    align-items: flex-start;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 0.85rem 1rem;
    box-shadow: var(--shadow);
  }

  .primary-nav.is-open {
    display: flex;
  }

  .footer-inner {
    align-items: flex-start;
  }

  .intro-section {
    padding-top: 2.25rem;
  }

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

  .profile-portrait {
    width: min(220px, 70vw);
    justify-self: start;
  }
}
