:root {
  --ink: #1f2827;
  --muted: #556562;
  --soft: #eef5f1;
  --surface: #ffffff;
  --surface-strong: #f8fbf9;
  --teal: #286b68;
  --teal-dark: #174c4a;
  --sage: #9bb7a5;
  --coral: #c76951;
  --line: #dbe7e1;
  --shadow: 0 18px 48px rgba(31, 40, 39, 0.11);
  --radius: 8px;
  --container: min(1120px, calc(100vw - 40px));
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #fbfdfb;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body.nav-open {
  overflow: hidden;
}

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

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

a:hover {
  color: var(--teal-dark);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(199, 105, 81, 0.42);
  outline-offset: 4px;
}

.container {
  width: var(--container);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(219, 231, 225, 0.92);
  background: rgba(251, 253, 251, 0.92);
  backdrop-filter: blur(16px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 750;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(40, 107, 104, 0.24);
  border-radius: 50%;
  background: linear-gradient(135deg, #ffffff 0%, #e5f0ec 100%);
  color: var(--teal-dark);
  font-size: 0.85rem;
}

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

.site-nav {
  position: relative;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  min-height: 44px;
  padding: 0 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.toggle-lines,
.toggle-lines::before,
.toggle-lines::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.toggle-lines {
  position: relative;
}

.toggle-lines::before,
.toggle-lines::after {
  content: "";
  position: absolute;
  left: 0;
}

.toggle-lines::before {
  top: -6px;
}

.toggle-lines::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .toggle-lines {
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .toggle-lines::before {
  transform: translateY(6px) rotate(90deg);
}

.nav-toggle[aria-expanded="true"] .toggle-lines::after {
  opacity: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.nav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  border-radius: var(--radius);
  padding: 0 11px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  transition: background 180ms ease, color 180ms ease;
}

.nav-list a:hover,
.nav-list a.is-active {
  background: rgba(40, 107, 104, 0.09);
  color: var(--teal-dark);
}

.hero {
  position: relative;
  min-height: min(690px, calc(100vh - 84px));
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
  z-index: -2;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(251, 253, 251, 0.98) 0%, rgba(251, 253, 251, 0.9) 35%, rgba(251, 253, 251, 0.52) 62%, rgba(251, 253, 251, 0.28) 100%),
    linear-gradient(180deg, rgba(251, 253, 251, 0.38), rgba(251, 253, 251, 0.82));
}

.hero-content {
  padding: clamp(64px, 8vw, 96px) 0 clamp(44px, 5vw, 72px);
}

.hero-content > * {
  max-width: 720px;
}

.eyebrow,
.section-kicker,
.card-meta,
.timeline-date,
.activity-list span {
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

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

.hero-role {
  max-width: 600px;
  margin-bottom: 18px;
  color: var(--teal-dark);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  font-weight: 750;
  line-height: 1.35;
}

.hero-intro {
  max-width: 680px;
  margin-bottom: 24px;
  color: #33413f;
  font-size: clamp(1rem, 1.4vw, 1.16rem);
}

.keyword-list,
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.keyword-list li,
.chip-list li {
  border: 1px solid rgba(40, 107, 104, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #344845;
  padding: 8px 12px;
  font-size: 0.9rem;
  font-weight: 700;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0 18px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
}

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

.button-primary {
  background: var(--teal-dark);
  color: #ffffff;
}

.button-primary:hover {
  background: #0f3d3a;
  color: #ffffff;
}

.button-secondary {
  border-color: rgba(40, 107, 104, 0.25);
  background: rgba(255, 255, 255, 0.76);
  color: var(--teal-dark);
}

.button-secondary:hover {
  border-color: rgba(199, 105, 81, 0.5);
  background: #ffffff;
}

.section {
  scroll-margin-top: 92px;
  padding: clamp(62px, 8vw, 104px) 0;
}

.section:nth-of-type(even) {
  background: var(--surface-strong);
}

.section-intro {
  padding-top: clamp(48px, 7vw, 86px);
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
  gap: clamp(30px, 6vw, 76px);
  align-items: center;
}

.profile-portrait {
  position: relative;
  width: min(calc(100% - 18px), 360px);
  margin: 0;
}

.profile-portrait::before {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(155, 183, 165, 0.22), rgba(199, 105, 81, 0.14));
  z-index: 0;
}

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

.profile-body .section-heading {
  margin-bottom: clamp(18px, 3vw, 28px);
}

.two-column {
  display: grid;
  grid-template-columns: minmax(260px, 0.88fr) minmax(0, 1.12fr);
  gap: clamp(32px, 6vw, 76px);
  align-items: start;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.section-heading.compact {
  max-width: 760px;
  margin-bottom: clamp(28px, 5vw, 48px);
}

.section-copy p {
  color: var(--muted);
  font-size: 1.05rem;
}

.section-copy p:last-child {
  margin-bottom: 0;
}

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

.timeline-item,
.experience-card,
.training-panel,
.skill-card,
.activity-list article,
.language-grid article,
.reference-list article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(31, 40, 39, 0.05);
}

.timeline-item {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 22px;
  padding: 24px;
}

.timeline-item h3,
.experience-card h3,
.skill-card h3,
.activity-list h3,
.language-grid h3,
.reference-list h3,
.training-panel h3 {
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.3;
}

.timeline-item p,
.experience-card p,
.skill-card p,
.activity-list p,
.language-grid p,
.reference-list p,
.training-panel p {
  margin-bottom: 0;
  color: var(--muted);
}

.experience-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 18px;
}

.experience-grid + .experience-card {
  margin-top: 18px;
}

.experience-card {
  padding: clamp(24px, 4vw, 34px);
}

.experience-card.featured {
  border-top: 4px solid var(--coral);
}

.project-title {
  color: var(--teal-dark);
  font-weight: 760;
}

.training-panel {
  margin-top: 18px;
  padding: clamp(22px, 4vw, 30px);
  background: linear-gradient(135deg, #ffffff 0%, #edf7f1 100%);
}

.training-panel h3 {
  margin-bottom: 16px;
}

.chip-list li {
  background: rgba(255, 255, 255, 0.84);
  font-weight: 650;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.skill-card {
  padding: 22px;
}

.skill-card h3 {
  min-height: 44px;
}

.teaching-section {
  background: var(--surface-strong);
  color: var(--ink);
}

.teaching-card {
  max-width: 820px;
  border-top: 4px solid var(--teal);
}

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

.activity-list article {
  padding: 22px;
}

.activity-list span {
  display: block;
  margin-bottom: 10px;
  color: var(--coral);
}

.language-section {
  padding-top: clamp(48px, 6vw, 78px);
}

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

.language-grid article {
  padding: 24px;
  text-align: center;
}

.language-grid h3 {
  margin-bottom: 4px;
  font-size: 1.2rem;
}

.contact-section {
  background: #ffffff;
}

.contact-layout {
  display: block;
}

.contact-content h2 {
  margin: 10px 0 16px;
  max-width: 900px;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.08;
}

.contact-content p {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.05rem;
}

.contact-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.contact-card {
  display: grid;
  gap: 4px;
  min-height: 96px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  padding: 18px;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.contact-card:hover {
  border-color: rgba(40, 107, 104, 0.34);
  box-shadow: 0 14px 34px rgba(31, 40, 39, 0.08);
  transform: translateY(-1px);
}

.contact-card span {
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-card strong {
  color: var(--ink);
  font-size: clamp(0.95rem, 1.6vw, 1.08rem);
  overflow-wrap: anywhere;
}

.references-section {
  background: var(--soft);
}

.references-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.86fr) minmax(0, 1.14fr);
  gap: clamp(30px, 6vw, 72px);
  align-items: start;
}

.references-layout h2 {
  margin: 10px 0 14px;
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  line-height: 1.12;
}

.references-layout > div > p {
  color: var(--muted);
}

.reference-list {
  display: grid;
  gap: 14px;
}

.reference-list article {
  padding: 20px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
  font-size: 0.95rem;
}

.footer-inner p {
  margin-bottom: 0;
}

.footer-inner a {
  color: var(--teal-dark);
  font-weight: 800;
}

@media (max-width: 980px) {
  .header-inner {
    min-height: 66px;
  }

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

  .nav-list {
    position: fixed;
    top: 76px;
    right: 20px;
    left: 20px;
    display: grid;
    gap: 4px;
    max-height: calc(100vh - 96px);
    overflow: auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .nav-list.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-list a {
    width: 100%;
    min-height: 48px;
    justify-content: flex-start;
    padding: 0 14px;
  }

  .hero {
    min-height: auto;
  }

  .hero-content {
    padding-top: 54px;
  }

  .hero-overlay {
    background:
      linear-gradient(90deg, rgba(251, 253, 251, 0.98) 0%, rgba(251, 253, 251, 0.91) 60%, rgba(251, 253, 251, 0.58) 100%),
      linear-gradient(180deg, rgba(251, 253, 251, 0.2), rgba(251, 253, 251, 0.84));
  }

  .two-column,
  .profile-layout,
  .experience-grid,
  .contact-layout,
  .references-layout {
    grid-template-columns: 1fr;
  }

  .profile-portrait {
    width: min(calc(100% - 14px), 360px);
  }

  .skills-grid,
  .activity-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  :root {
    --container: min(100vw - 28px, 1120px);
  }

  body.nav-open {
    overflow: hidden;
  }

  .brand-name {
    display: none;
  }

  .site-header {
    position: sticky;
  }

  .hero-image {
    object-position: 62% center;
  }

  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(251, 253, 251, 0.96) 0%, rgba(251, 253, 251, 0.88) 60%, rgba(251, 253, 251, 0.78) 100%),
      linear-gradient(90deg, rgba(251, 253, 251, 0.95), rgba(251, 253, 251, 0.52));
  }

  .hero-content {
    padding: 34px 0 42px;
  }

  h1 {
    font-size: clamp(3rem, 17vw, 4.6rem);
  }

  .keyword-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x proximity;
  }

  .keyword-list li {
    flex: 0 0 auto;
    max-width: 260px;
    scroll-snap-align: start;
    white-space: normal;
  }

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

  .button {
    width: 100%;
  }

  .section {
    padding: 54px 0;
    scroll-margin-top: 78px;
  }

  .section-heading h2 {
    font-size: clamp(1.8rem, 9vw, 2.45rem);
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 20px;
  }

  .skills-grid,
  .activity-list,
  .language-grid,
  .contact-actions {
    grid-template-columns: 1fr;
  }

  .profile-portrait::before {
    inset: 12px -12px -14px 12px;
  }

  .skill-card h3 {
    min-height: 0;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 18px 0;
  }
}

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

@media print {
  .site-header,
  .hero-actions,
  .site-footer {
    display: none;
  }

  body {
    background: #ffffff;
    color: #000000;
  }

  .section,
  .hero {
    padding: 24px 0;
  }

  .hero {
    min-height: 0;
  }
}
