:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --surface-soft: #eef3f1;
  --ink: #17201d;
  --muted: #65706b;
  --line: #d8ded9;
  --accent: #2f6758;
  --accent-strong: #17483c;
  --warm: #c88443;
  --shadow: 0 24px 70px rgba(28, 41, 36, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 72px);
  background: rgba(247, 245, 240, 0.9);
  border-bottom: 1px solid rgba(216, 222, 217, 0.85);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: var(--surface);
  font-size: 0.8rem;
}

.top-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
}

.top-tabs a {
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.top-tabs a:hover,
.top-tabs a:focus-visible,
.top-tabs a.is-active {
  background: var(--accent);
  color: var(--surface);
  outline: none;
}

main {
  overflow: hidden;
}

.profile-section {
  display: grid;
  grid-template-columns: minmax(240px, 380px) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 78px);
  align-items: center;
  width: min(1120px, calc(100% - 40px));
  min-height: calc(100vh - 76px);
  margin: 0 auto;
  padding: clamp(42px, 7vw, 86px) 0;
}

.profile-photo {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid rgba(23, 32, 29, 0.12);
  border-radius: 8px;
  background: var(--surface-soft);
  box-shadow: var(--shadow);
}

.profile-photo span {
  border: 1px solid rgba(47, 103, 88, 0.22);
  border-radius: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent-strong);
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  font-weight: 800;
  text-align: center;
}

.profile-copy {
  max-width: 680px;
}

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(3rem, 8vw, 6.75rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
  line-height: 1.25;
}

.role {
  margin-bottom: 22px;
  color: var(--warm);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 800;
}

.summary {
  max-width: 58ch;
  color: var(--muted);
  font-size: 1.08rem;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.primary-action,
.secondary-action,
.cv-link {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 11px 18px;
  font-weight: 800;
  text-decoration: none;
}

.primary-action {
  background: var(--accent);
  color: var(--surface);
}

.secondary-action,
.cv-link {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--accent-strong);
}

.primary-action:hover,
.primary-action:focus-visible,
.secondary-action:hover,
.secondary-action:focus-visible,
.cv-link:hover,
.cv-link:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.content-band {
  padding: clamp(58px, 8vw, 104px) clamp(20px, 5vw, 72px);
}

.content-band.muted {
  background: var(--surface-soft);
  border-block: 1px solid var(--line);
}

.section-heading {
  width: min(960px, 100%);
  margin: 0 auto 28px;
}

.section-heading p:not(.eyebrow) {
  max-width: 66ch;
  color: var(--muted);
}

.about-grid,
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  width: min(960px, 100%);
  margin: 0 auto;
}

.about-grid article,
.project-card {
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 24px;
}

.about-grid p,
.project-card p,
.site-footer p {
  color: var(--muted);
}

.project-card {
  display: flex;
  flex-direction: column;
}

.card-label {
  align-self: flex-start;
  margin-bottom: 18px;
  border: 1px solid rgba(47, 103, 88, 0.22);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
}

.project-card a {
  margin-top: auto;
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.spec-list {
  display: grid;
  width: min(960px, 100%);
  margin: 0 auto;
  border-top: 1px solid var(--line);
}

.spec-list div {
  display: grid;
  grid-template-columns: minmax(160px, 240px) minmax(0, 1fr);
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

dt {
  color: var(--accent-strong);
  font-weight: 800;
}

dd {
  margin: 0;
  color: var(--muted);
}

.site-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(42px, 6vw, 72px) clamp(20px, 5vw, 72px);
  background: var(--ink);
  color: var(--surface);
}

.site-footer h2 {
  margin-bottom: 8px;
}

.site-footer p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.68);
}

.site-footer .eyebrow {
  color: #90c5b7;
}

.cv-link {
  flex: 0 0 auto;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: var(--surface);
}

@media (max-width: 820px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .top-tabs {
    width: 100%;
    overflow-x: auto;
    border-radius: 8px;
  }

  .profile-section,
  .about-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .profile-section {
    min-height: auto;
  }

  .profile-photo {
    max-width: 420px;
  }

  .spec-list div,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .site-footer {
    display: grid;
    align-items: start;
  }

  .cv-link {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .brand {
    width: 100%;
  }

  .profile-actions {
    display: grid;
  }

  .primary-action,
  .secondary-action {
    width: 100%;
  }

  .content-band {
    padding-inline: 18px;
  }
}
