.page-shell {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
  padding: calc(var(--header-offset) + var(--header-gap) + 16px) 0 48px;
}

.page-shell::before {
  content: "";
  position: absolute;
  top: 40px;
  right: -120px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(23, 95, 99, 0.14) 0%, rgba(23, 95, 99, 0) 68%);
  pointer-events: none;
  filter: blur(4px);
}

.page-top-anchor {
  position: absolute;
  top: 0;
}

.site-header {
  position: fixed;
  top: var(--header-gap);
  left: 50%;
  width: min(calc(100% - 32px), var(--container));
  margin: 0;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 999px;
  background: rgba(255, 251, 245, 0.7);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-md);
  transition: padding 180ms ease, margin-top 180ms ease, border-radius 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

body.is-scrolled .site-header {
  margin-top: 0;
  padding: 12px 18px;
  border-radius: 26px;
}

.header-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: 1;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: var(--accent-deep);
  color: #f8f3e8;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  box-shadow: 0 14px 24px rgba(20, 43, 49, 0.18);
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 0.98rem;
}

.brand-copy span {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.site-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a:not(.header-download) {
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--ink-soft);
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.site-nav a:not(.header-download):hover,
.site-nav a[data-active="true"] {
  background: rgba(23, 95, 99, 0.1);
  color: var(--accent-deep);
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(23, 95, 99, 0.08);
}

.header-download {
  flex-shrink: 0;
  white-space: nowrap;
}

main {
  display: grid;
  gap: 28px;
}

.section {
  position: relative;
  scroll-margin-top: calc(var(--header-offset) + var(--header-gap) + 10px);
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.88) 0%, rgba(255, 248, 239, 0.72) 100%);
  box-shadow: var(--shadow-lg);
  overflow: clip;
}

.section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 34px;
  width: 118px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), rgba(168, 106, 60, 0.72));
}

.section-note {
  padding: 18px 24px;
  box-shadow: var(--shadow-md);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.8fr);
  gap: 26px;
  align-items: start;
  background:
    radial-gradient(circle at 0% 0%, rgba(23, 95, 99, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(255, 252, 247, 0.92) 0%, rgba(255, 248, 239, 0.78) 100%);
}

.hero::before {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 106, 60, 0.16) 0%, rgba(168, 106, 60, 0) 72%);
  pointer-events: none;
}

.hero-copy,
.hero-panel,
.project-card,
.timeline-item,
.credential-card {
  position: relative;
  z-index: 1;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 20px;
  padding-right: 8px;
}

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

.hero h1 {
  max-width: 22ch;
  font-size: clamp(2.2rem, 3.45vw, 3.35rem);
  line-height: 1.06;
  text-wrap: balance;
}

.lead {
  max-width: 60ch;
  font-size: 1.04rem;
  line-height: 1.72;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(23, 95, 99, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--accent-deep);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.hero-inline-links a,
.inline-action {
  color: var(--accent-deep);
  font-weight: 600;
}

.inline-action {
  padding: 0;
  cursor: pointer;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background-color 180ms ease;
  cursor: pointer;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--accent-deep);
  color: #f9f4ea;
  box-shadow: 0 12px 30px rgba(20, 43, 49, 0.18);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(24, 40, 44, 0.08);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 12px 14px;
  border: 1px solid rgba(24, 40, 44, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--accent-deep);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.theme-toggle:hover {
  transform: translateY(-2px);
}

.theme-toggle-floating {
  position: fixed;
  right: 12px;
  bottom: 10px;
  z-index: 19;
  min-height: auto;
  padding: 7px 10px;
  gap: 6px;
  border-radius: 999px;
}

.theme-toggle-floating .theme-toggle-track {
  width: 46px;
  height: 24px;
  padding: 3px;
}

.theme-toggle-floating .theme-toggle-thumb {
  width: 18px;
  height: 18px;
}

.theme-toggle-floating .theme-toggle-copy {
  display: grid;
  gap: 0;
  min-width: 34px;
}

.theme-toggle-floating .theme-toggle-title {
  display: none;
}

.theme-toggle-floating .theme-toggle-copy [data-theme-label] {
  font-size: 0.74rem;
  line-height: 1;
  font-weight: 700;
}

body[data-theme="dark"] .theme-toggle-floating {
  flex-direction: row-reverse;
}

.theme-toggle-track {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 52px;
  height: 28px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(20, 43, 49, 0.14);
}

.theme-toggle-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--warm);
  box-shadow: 0 8px 14px rgba(20, 43, 49, 0.2);
  transition: transform 180ms ease, background-color 180ms ease;
}

.theme-toggle-copy {
  display: grid;
  gap: 2px;
  text-align: left;
}

.theme-toggle-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.theme-toggle-copy [data-theme-label] {
  font-size: 0.9rem;
  font-weight: 600;
}

.hero-panel {
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(23, 95, 99, 0.1);
  border-radius: calc(var(--radius-lg) - 6px);
  background:
    linear-gradient(160deg, rgba(23, 95, 99, 0.08), transparent 48%),
    rgba(20, 43, 49, 0.97);
  color: #f7f1e8;
  box-shadow: 0 24px 44px rgba(20, 43, 49, 0.24);
}

.panel-portrait {
  position: relative;
  overflow: hidden;
  aspect-ratio: 5 / 4;
  border: 1px solid rgba(247, 241, 232, 0.12);
  border-radius: calc(var(--radius-lg) - 10px);
  background: rgba(255, 255, 255, 0.04);
}

.panel-portrait::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 34%;
  background: linear-gradient(180deg, rgba(20, 43, 49, 0) 0%, rgba(20, 43, 49, 0.3) 100%);
  pointer-events: none;
}

.panel-portrait picture {
  display: block;
  width: 100%;
  height: 100%;
}

.panel-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(247, 241, 232, 0.12);
  color: rgba(247, 241, 232, 0.78);
}

.panel-header p {
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.signal-grid {
  display: grid;
  gap: 14px;
}

.signal-card {
  padding: 18px;
  border: 1px solid rgba(247, 241, 232, 0.12);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.signal-card:hover {
  transform: translateY(-4px);
  border-color: rgba(247, 241, 232, 0.2);
  background: rgba(255, 255, 255, 0.06);
}

.signal-label {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(247, 241, 232, 0.62);
}

.signal-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.04rem;
}

.signal-card p {
  color: rgba(247, 241, 232, 0.72);
  line-height: 1.6;
}

.section-heading {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.section-heading h2 {
  max-width: 18ch;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1.1;
  text-wrap: balance;
}

.section-heading-wide h2 {
  max-width: none;
  font-size: clamp(1.7rem, 2.3vw, 2.3rem);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.project-card {
  display: grid;
  align-content: start;
  gap: 14px;
  height: 100%;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel-strong);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.project-card h3,
.timeline-body h3,
.credential-card h3 {
  margin-bottom: 12px;
  font-size: 1.35rem;
}

.project-card p,
.timeline-body li,
.credential-card p,
.link-list a {
  line-height: 1.7;
  color: var(--ink-soft);
}

.project-kicker {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.project-stack {
  color: var(--warm);
  font-weight: 700;
}

.project-card ul {
  display: grid;
  gap: 10px;
  padding-left: 1.15rem;
}

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

.timeline::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 204px;
  width: 1px;
  background: linear-gradient(180deg, rgba(23, 95, 99, 0.28), rgba(168, 106, 60, 0.18));
}

.timeline-item {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.timeline-meta {
  display: grid;
  align-content: start;
  gap: 8px;
  color: var(--accent-deep);
  font-weight: 600;
}

.timeline-meta span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(23, 95, 99, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
}

.timeline-period {
  font-size: 1.02rem;
}

.timeline-location {
  color: var(--ink-soft);
  font-weight: 500;
}

.timeline-role,
.education-title {
  margin-bottom: 14px;
  color: var(--warm);
  font-weight: 700;
}

.education-card {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr);
  gap: 24px;
  align-items: start;
}

.education-summary {
  display: grid;
  gap: 10px;
}

.education-school {
  color: var(--accent-deep);
  font-weight: 600;
}

.education-copy {
  max-width: 58ch;
}

.section-note::before {
  display: none;
}

.site-note {
  display: block;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink);
}

.timeline-body ul,
.link-list {
  display: grid;
  gap: 10px;
}

.credentials-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 18px;
}

.credential-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel-strong);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.link-list {
  list-style: none;
  padding: 0;
}

.link-list a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(24, 40, 44, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.48);
  color: var(--accent-deep);
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.link-list a::after {
  content: "Open";
  font-size: 0.95rem;
  font-weight: 700;
}

.link-list a:hover {
  transform: translateX(4px);
  border-color: rgba(23, 95, 99, 0.16);
  background: rgba(255, 255, 255, 0.72);
}

.credential-note {
  margin-top: 16px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 4px 8px;
  color: var(--ink-soft);
  border-top: 1px solid rgba(24, 40, 44, 0.08);
}

.site-footer a {
  color: var(--accent-deep);
  font-weight: 600;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 16px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 72px;
  z-index: 20;
  max-width: calc(100vw - 32px);
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(20, 43, 49, 0.92);
  color: #f8f3e8;
  box-shadow: 0 18px 40px rgba(20, 43, 49, 0.22);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

html.js-ready .reveal {
  opacity: 0;
  transform: translateY(24px);
  will-change: opacity, transform;
  transition: opacity 560ms ease, transform 560ms ease;
}

html.js-ready .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.project-card:hover,
.timeline-item:hover,
.credential-card:hover {
  transform: translateY(-4px);
  border-color: rgba(23, 95, 99, 0.16);
  box-shadow: 0 20px 38px rgba(23, 38, 44, 0.1);
}

body[data-theme="dark"] .site-header {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(12, 18, 22, 0.82);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
}

body[data-theme="dark"] .brand-mark {
  background: #dbeae6;
  color: #102023;
}

body[data-theme="dark"] .brand-copy span,
body[data-theme="dark"] .site-nav a:not(.header-download),
body[data-theme="dark"] .lead,
body[data-theme="dark"] .hero-inline-links,
body[data-theme="dark"] .project-card p,
body[data-theme="dark"] .timeline-body li,
body[data-theme="dark"] .credential-card p,
body[data-theme="dark"] .site-footer,
body[data-theme="dark"] .timeline-location {
  color: #a6b3b2;
}

body[data-theme="dark"] .hero-inline-links a,
body[data-theme="dark"] .inline-action {
  color: #edf5f2;
}

body[data-theme="dark"] .site-nav a:not(.header-download):hover,
body[data-theme="dark"] .site-nav a[data-active="true"] {
  background: rgba(127, 211, 197, 0.12);
  color: #edf5f2;
  box-shadow: inset 0 0 0 1px rgba(127, 211, 197, 0.12);
}

body[data-theme="dark"] .section {
  border-color: rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(17, 25, 30, 0.92) 0%, rgba(13, 19, 23, 0.86) 100%);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

body[data-theme="dark"] .section::before {
  background: linear-gradient(90deg, #7fd3c5, rgba(216, 159, 109, 0.8));
}

body[data-theme="dark"] .site-note {
  color: #eaf0ed;
}

body[data-theme="dark"] .hero {
  background:
    radial-gradient(circle at 0% 0%, rgba(127, 211, 197, 0.05), transparent 32%),
    linear-gradient(180deg, rgba(17, 25, 30, 0.94) 0%, rgba(13, 19, 23, 0.88) 100%);
}

body[data-theme="dark"] .hero::before {
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(168, 106, 60, 0.07) 0%, rgba(168, 106, 60, 0) 74%);
}

body[data-theme="dark"] .button-primary {
  background: #7fd3c5;
  color: #102023;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

body[data-theme="dark"] .button-secondary,
body[data-theme="dark"] .theme-toggle {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: #eaf0ed;
}

body[data-theme="dark"] .theme-toggle-track {
  background: rgba(127, 211, 197, 0.2);
}

body[data-theme="dark"] .theme-toggle-thumb {
  transform: translateX(24px);
  background: #7fd3c5;
}

body[data-theme="dark"] .theme-toggle-floating .theme-toggle-thumb {
  transform: translateX(22px);
}

body[data-theme="dark"] .theme-toggle-title {
  color: #a6b3b2;
}

body[data-theme="dark"] .hero-badges span,
body[data-theme="dark"] .timeline-meta span,
body[data-theme="dark"] .link-list a {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #edf5f2;
}

body[data-theme="dark"] .link-list a:hover {
  border-color: rgba(127, 211, 197, 0.2);
  background: rgba(255, 255, 255, 0.06);
}

body[data-theme="dark"] .hero-panel {
  border-color: rgba(127, 211, 197, 0.16);
  background:
    linear-gradient(160deg, rgba(127, 211, 197, 0.09), transparent 48%),
    rgba(6, 10, 12, 0.94);
}

body[data-theme="dark"] .panel-portrait {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

body[data-theme="dark"] .panel-header,
body[data-theme="dark"] .signal-card p,
body[data-theme="dark"] .signal-label {
  color: rgba(234, 240, 237, 0.72);
}

body[data-theme="dark"] .signal-card {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

body[data-theme="dark"] .project-card,
body[data-theme="dark"] .timeline-item,
body[data-theme="dark"] .credential-card {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(20, 29, 34, 0.76);
}

body[data-theme="dark"] .eyebrow,
body[data-theme="dark"] .project-kicker {
  color: #7fd3c5;
}

body[data-theme="dark"] .timeline::before {
  background: linear-gradient(180deg, rgba(127, 211, 197, 0.32), rgba(168, 106, 60, 0.3));
}

body[data-theme="dark"] .timeline-meta,
body[data-theme="dark"] .link-list a,
body[data-theme="dark"] .site-footer a {
  color: #edf5f2;
}

body[data-theme="dark"] .timeline-role,
body[data-theme="dark"] .education-title {
  color: #d89f6d;
}

body[data-theme="dark"] .education-school {
  color: #edf5f2;
}

body[data-theme="dark"] .toast {
  background: rgba(234, 240, 237, 0.94);
  color: #102023;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
}

body[data-theme="dark"] .site-footer {
  border-top-color: rgba(255, 255, 255, 0.08);
}

@media (max-width: 1024px) {
  .credentials-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .section-heading h2 {
    max-width: none;
  }

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

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

  .education-card {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .timeline-meta {
    position: relative;
  }

  .timeline-meta::before {
    content: "";
    position: absolute;
    top: 8px;
    left: -19px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--warm);
    box-shadow: 0 0 0 6px rgba(168, 106, 60, 0.12);
  }
}

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

  .hero h1 {
    max-width: none;
  }
}

@media (max-width: 860px) {
  .brand {
    gap: 0;
  }

  .brand-copy {
    display: none;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(calc(100% - 8px), var(--container));
  }

  .site-header,
  .site-footer {
    border-radius: 22px;
  }

  .site-footer,
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .site-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    width: min(calc(100% - 8px), var(--container));
    min-width: 260px;
    gap: 8px;
    padding: 10px;
  }

  body.is-scrolled .site-header {
    padding: 8px 10px;
    gap: 8px;
    border-radius: 18px;
  }

  .brand {
    gap: 8px;
    min-width: 0;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    font-size: 0.88rem;
  }

  .brand-copy {
    min-width: 0;
  }

  .brand-copy strong {
    display: block;
    max-width: 118px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 0.8rem;
  }

  .brand-copy span {
    display: none;
  }

  .header-controls {
    min-width: 0;
    justify-content: flex-end;
    align-items: center;
    gap: 0;
  }

  .site-nav .header-download {
    display: flex;
  }

  .theme-toggle-floating {
    right: 10px;
    bottom: 8px;
    padding: 7px 9px;
  }

  .site-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
    justify-content: stretch;
    width: 100%;
    gap: 6px;
  }

  .site-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 7px 6px;
    font-size: 0;
    text-align: center;
  }

  .site-nav a::before {
    content: attr(data-short);
    display: block;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.1;
  }

  .site-nav .header-download {
    min-height: 42px;
    padding: 7px 6px;
  }

  .hero-badges {
    gap: 8px;
  }

  .section,
  .hero-panel,
  .project-card,
  .credential-card,
  .timeline-item {
    padding: 16px;
  }

  .section-note {
    padding: 16px;
  }

  .hero {
    min-height: auto;
    gap: 18px;
  }

  .panel-portrait {
    justify-self: stretch;
    width: 100%;
    max-height: none;
  }

  .hero-copy {
    gap: 18px;
    padding-right: 0;
  }

  .hero h1 {
    font-size: clamp(2.15rem, 10vw, 3.15rem);
  }

  .lead {
    font-size: 1rem;
    line-height: 1.65;
  }

  .button {
    width: 100%;
    min-height: 42px;
  }

  .hero-actions {
    gap: 8px;
  }

  .hero-inline-links {
    gap: 12px;
    font-size: 0.86rem;
  }

  .timeline {
    gap: 16px;
  }

  .site-footer {
    padding-inline: 0;
  }

  .footer-links {
    justify-content: flex-start;
    gap: 12px;
  }

  .toast {
    right: 16px;
    bottom: 64px;
  }
}

@media (max-width: 480px) {
  .site-header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .brand {
    gap: 0;
  }

  .brand-copy {
    display: none;
  }

  .site-nav a {
    padding: 6px 4px;
  }

  .site-nav a::before {
    font-size: 0.68rem;
  }

  .hero h1 {
    font-size: clamp(1.95rem, 10vw, 2.7rem);
  }
}
