:root {
  --bg: #f6f7f2;
  --surface: #ffffff;
  --surface-soft: #eef3f1;
  --surface-warm: #fff8f1;
  --text: #182026;
  --muted: #59636e;
  --line: rgba(24, 32, 38, 0.14);
  --accent: #9a4d0d;
  --accent-strong: #783600;
  --cool: #154f55;
  --cool-soft: #dce9e7;
  --shadow: 0 18px 42px rgba(24, 32, 38, 0.08);
  --radius: 8px;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: linear-gradient(180deg, var(--bg), #ffffff 760px);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

body,
button,
input,
textarea,
select {
  font: inherit;
}

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

a:hover {
  color: var(--cool);
}

:focus-visible {
  outline: 3px solid var(--cool);
  outline-offset: 3px;
}

.container {
  width: min(100% - 40px, var(--max));
  margin: 0 auto;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -56px;
  z-index: 100;
  background: var(--text);
  color: #ffffff;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-weight: 800;
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 247, 242, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: var(--text);
  color: #ffffff;
  font-size: 0.86rem;
}

.brand-text {
  font-size: 1.05rem;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-links a {
  border-radius: var(--radius);
  padding: 8px 2px;
  transition: color 160ms ease;
}

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

.nav-toggle,
.lang-toggle {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius);
  padding: 9px 13px;
  cursor: pointer;
}

.nav-toggle {
  display: none;
  font-weight: 800;
}

.lang-toggle {
  min-width: 48px;
  font-weight: 800;
  color: var(--cool);
}

.section {
  padding: 88px 0;
}

.hero {
  padding-top: 82px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(280px, 0.68fr);
  gap: 48px;
  align-items: center;
}

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

h1,
h2,
h3,
p,
li,
dt,
dd {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  color: var(--text);
  letter-spacing: 0;
}

h1 {
  margin: 0;
  max-width: 820px;
  font-size: 4.15rem;
  line-height: 1.04;
}

h2 {
  margin: 0;
  max-width: 850px;
  font-size: 2.85rem;
  line-height: 1.08;
}

h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  line-height: 1.3;
}

.hero-lead {
  margin: 26px 0 0;
  max-width: 720px;
  color: var(--muted);
  font-size: 1.18rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: var(--radius);
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

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

.button.primary {
  background: var(--text);
  color: #ffffff;
  box-shadow: 0 14px 32px rgba(24, 32, 38, 0.18);
}

.button.secondary {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
}

.hero-card {
  padding: 28px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.profile-signal {
  display: grid;
  gap: 12px;
  min-height: 180px;
  margin-bottom: 26px;
  padding: 24px;
  border: 1px solid rgba(21, 79, 85, 0.22);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(21, 79, 85, 0.94), rgba(24, 32, 38, 0.96)),
    var(--cool);
  color: #ffffff;
}

.profile-signal span {
  align-self: end;
  font-size: 5rem;
  font-weight: 900;
  line-height: 0.95;
}

.profile-signal small {
  align-self: start;
  max-width: 18rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.92rem;
  font-weight: 800;
}

.quick-facts {
  margin: 0;
  display: grid;
  gap: 16px;
}

.quick-facts div {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.quick-facts dt {
  color: var(--muted);
  font-size: 0.86rem;
}

.quick-facts dd {
  margin: 2px 0 0;
  font-weight: 800;
}

.metrics {
  padding-top: 22px;
}

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

.metric-card {
  min-height: 138px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.metric-card strong {
  display: block;
  font-size: 2.2rem;
  line-height: 1;
}

.metric-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: 58px;
}

.rich-text p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 1.08rem;
}

.rich-text p:last-child {
  margin-bottom: 0;
}

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

.section-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 420px);
  gap: 32px;
  align-items: end;
  margin-bottom: 34px;
}

.note {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.cards {
  display: grid;
  gap: 18px;
}

.expertise-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 32px;
}

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

.writing-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 32px;
}

.card,
.project-card,
.resume-panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(24, 32, 38, 0.05);
}

.card,
.project-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.card p,
.project-card p,
.project-card li {
  color: var(--muted);
}

.card p,
.project-card p {
  margin: 0;
}

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

.project-card li + li {
  margin-top: 6px;
}

.project-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 30px;
  margin-bottom: 18px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: var(--radius);
  background: var(--surface-warm);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
}

.date {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 800;
}

.resume-panel {
  padding: 28px;
}

.timeline-item {
  position: relative;
  padding: 0 0 26px 28px;
  border-left: 2px solid var(--line);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--cool);
}

.timeline-item span {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
}

.timeline-item p {
  margin: 0;
  color: var(--muted);
}

.resume-download {
  margin-top: 4px;
}

.contact-section {
  padding-top: 70px;
  background: #ffffff;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.5fr);
  gap: 36px;
  align-items: center;
}

.contact-layout p {
  max-width: 720px;
  color: var(--muted);
}

.contact-links {
  display: grid;
  gap: 12px;
}

.contact-links a {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(24, 32, 38, 0.04);
}

.contact-links a:hover {
  border-color: rgba(21, 79, 85, 0.38);
  color: var(--text);
}

.contact-links span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.contact-links strong {
  font-size: 1rem;
  font-weight: 850;
}

.site-footer {
  padding: 34px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.footer-grid p {
  margin: 0;
}

@media (max-width: 1040px) {
  h1 {
    font-size: 3.55rem;
  }

  h2 {
    font-size: 2.5rem;
  }

  .hero-grid,
  .two-column,
  .section-header,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .expertise-grid,
  .project-grid,
  .writing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    padding-top: 56px;
  }

  .hero-card {
    max-width: 620px;
  }
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 76px;
  }

  .container {
    width: min(100% - 28px, var(--max));
  }

  .nav {
    min-height: 68px;
    gap: 14px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    inset: 68px 14px auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
  }

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

  .nav-links a,
  .lang-toggle {
    width: 100%;
    padding: 12px 14px;
    text-align: left;
  }

  .section {
    padding: 64px 0;
  }

  .hero {
    padding-top: 48px;
  }

  .hero-grid {
    gap: 34px;
  }

  h1 {
    font-size: 2.75rem;
    line-height: 1.06;
  }

  h2 {
    font-size: 2.15rem;
  }

  .hero-lead {
    font-size: 1.06rem;
  }

  .metrics-grid,
  .expertise-grid,
  .project-grid,
  .writing-grid {
    grid-template-columns: 1fr;
  }

  .metric-card {
    min-height: auto;
  }

  .profile-signal {
    min-height: 150px;
  }

  .profile-signal span {
    font-size: 4rem;
  }

  .footer-grid {
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .container {
    width: min(100% - 24px, var(--max));
  }

  .brand {
    gap: 10px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand-text {
    font-size: 0.98rem;
  }

  h1 {
    font-size: 2.35rem;
  }

  h2 {
    font-size: 1.9rem;
  }

  .button {
    width: 100%;
  }

  .hero-card,
  .resume-panel,
  .card,
  .project-card {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
