:root {
  --bg: #f4efe7;
  --paper: #fffaf3;
  --paper-strong: #fffdf8;
  --ink: #1f2a2c;
  --muted: #5f6b6d;
  --line: rgba(31, 42, 44, 0.12);
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --accent-soft: #d8ece8;
  --shadow: 0 18px 50px rgba(24, 36, 38, 0.08);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Source Sans 3", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.14), transparent 28%),
    linear-gradient(180deg, #f7f2ea 0%, #f3eee5 100%);
}

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

a {
  color: inherit;
  text-decoration: none;
}

.inline-link {
  color: #1d4ed8;
  text-decoration: underline;
}

.inline-link:hover,
.inline-link:focus-visible {
  color: #1e40af;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.site-header {
  position: sticky;
  top: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 20px;
  margin-bottom: 24px;
  background: rgba(255, 250, 243, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(14px);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.brand,
h1,
h2,
h3 {
  font-family: "Playfair Display", serif;
}

.brand {
  font-size: 1.2rem;
  font-weight: 700;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 16px;
  color: var(--muted);
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--accent);
}

.hero,
.section {
  background: rgba(255, 250, 243, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 360px);
  gap: 28px;
  padding: 36px;
}

.eyebrow {
  margin: 0 0 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(2.6rem, 5vw, 4.8rem);
  line-height: 0.98;
}

.hero-text,
.section p,
.cv-item p,
.contact-card p,
li {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.quick-facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.quick-facts li,
.info-card,
.note-card,
.cv-item,
.gallery-card,
.contact-card {
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.quick-facts li {
  padding: 16px;
}

.quick-facts strong,
.meta {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}

.profile-card {
  padding: 18px;
  background: linear-gradient(180deg, rgba(216, 236, 232, 0.9), rgba(255, 253, 248, 0.96));
  border-radius: 28px;
  border: 1px solid rgba(15, 118, 110, 0.15);
}

.profile-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 20px;
  margin-bottom: 16px;
}

.profile-meta h2 {
  margin: 0 0 8px;
}

.profile-meta p {
  margin: 6px 0;
  color: var(--muted);
}

.section {
  margin-top: 24px;
  padding: 30px;
}

.section-heading {
  margin-bottom: 20px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 2.8rem);
}

.two-column,
.cv-layout {
  display: grid;
  gap: 20px;
}

.two-column {
  grid-template-columns: 1.5fr 1fr;
}

.note-card,
.info-card,
.cv-item,
.contact-card {
  padding: 20px;
}

.note-card h3,
.info-card h3,
.cv-item h3,
.timeline-item h3 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1.35rem;
}

.note-card ul {
  margin: 0;
  padding-left: 20px;
}

.card-grid,
.gallery-grid {
  display: grid;
  gap: 18px;
}

.card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cv-layout {
  grid-template-columns: 240px 1fr;
}

.tab-list {
  display: grid;
  gap: 10px;
  align-content: start;
}

.tab-button {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper-strong);
  color: var(--ink);
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.tab-button.active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.tab-panel {
  display: none;
  gap: 14px;
}

.tab-panel.active {
  display: grid;
}

.timeline {
  position: relative;
  display: grid;
  gap: 16px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 70px;
  width: 2px;
  background: rgba(15, 118, 110, 0.18);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 18px;
  align-items: start;
}

.year {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  padding: 8px 0;
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 700;
}

.gallery-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gallery-card {
  overflow: hidden;
}

.gallery-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery-card figcaption {
  padding: 16px;
  color: var(--muted);
  line-height: 1.6;
}

.contact-section {
  margin-bottom: 20px;
}

@media (max-width: 920px) {
  .hero,
  .two-column,
  .cv-layout,
  .card-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .quick-facts {
    grid-template-columns: 1fr;
  }

  .site-header {
    border-radius: 28px;
    align-items: flex-start;
    flex-direction: column;
  }

  .main-nav {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 12px;
  }

  .hero,
  .section {
    padding: 22px;
  }

  h1 {
    font-size: 2.4rem;
  }

  .timeline::before {
    left: 24px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    padding-left: 46px;
  }

  .year {
    position: absolute;
    left: 0;
    top: 0;
    width: 48px;
  }
}
