:root {
  --ink: #111827;
  --muted: #5d6675;
  --paper: #f6f8fc;
  --white: #ffffff;
  --line: #dbe4f0;
  --blue: #1164d8;
  --blue-dark: #0d3575;
  --blue-soft: #eaf2ff;
  --sky: #39a3df;
  --coral: #d45342;
  --yellow: #f3c84b;
  --mint: #dff7ef;
  --panel: #fbfdff;
  --shadow: 0 22px 58px rgba(17, 35, 70, 0.13);
  --max: 1180px;
  --page-x: clamp(18px, 5vw, 72px);
  --shell: calc(var(--max) + var(--page-x) + var(--page-x));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body.nav-open {
  overflow: hidden;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes softPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(17, 100, 216, 0.2);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(17, 100, 216, 0);
  }
}

a {
  color: inherit;
}

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

section[id] {
  scroll-margin-top: 96px;
}

::selection {
  background: #cfe2ff;
  color: var(--blue-dark);
}

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

.skip-link {
  position: absolute;
  top: -80px;
  left: 16px;
  z-index: 30;
  padding: 10px 14px;
  background: var(--blue-dark);
  color: var(--white);
  border-radius: 6px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px max(var(--page-x), calc((100vw - var(--max)) / 2));
  background: rgba(246, 248, 252, 0.82);
  border-bottom: 1px solid rgba(219, 228, 240, 0.78);
  backdrop-filter: blur(18px) saturate(150%);
}

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

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  border-radius: 8px;
  font-size: 14px;
  box-shadow: 0 10px 24px rgba(17, 100, 216, 0.22);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.site-nav a {
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.is-active {
  background: var(--blue-soft);
  color: var(--blue);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 8px;
  padding: 0;
  color: var(--ink);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 170ms ease, opacity 170ms ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  justify-content: center;
  gap: 64px;
  align-items: center;
  min-height: 650px;
  max-width: var(--shell);
  margin: 0 auto;
  padding: clamp(56px, 7vw, 100px) var(--page-x);
  background:
    linear-gradient(132deg, rgba(232, 242, 255, 0.96), rgba(255, 255, 255, 0.55) 52%, rgba(243, 200, 75, 0.18));
}

.hero::before {
  position: absolute;
  inset: 24px 18px;
  z-index: -1;
  content: "";
  border: 1px solid rgba(17, 100, 216, 0.12);
  border-radius: 24px;
  background: radial-gradient(ellipse at 85% 20%, rgba(255, 255, 255, 0.7), transparent 65%);
}

.eyebrow,
.section-kicker,
.project-meta {
  margin: 0 0 14px;
  color: var(--coral);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.section-kicker::before {
  display: inline-block;
  width: 34px;
  height: 2px;
  content: "";
  background: var(--blue);
}

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

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(56px, 6.6vw, 88px);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

h2 {
  max-width: 820px;
  margin-bottom: 24px;
  font-size: clamp(32px, 3.7vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

h3 {
  margin-bottom: 10px;
  font-size: 23px;
  line-height: 1.18;
}

.hero-lead {
  max-width: 640px;
  color: var(--muted);
  font-size: 22px;
  line-height: 1.52;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

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

.button.primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  box-shadow: 0 16px 34px rgba(17, 100, 216, 0.22);
}

.button.secondary {
  color: var(--blue-dark);
  background: var(--white);
  border: 1px solid var(--line);
}

.hero-photo {
  justify-self: center;
  width: fit-content;
  max-width: 100%;
  margin: 0;
}

.portrait-frame {
  position: relative;
  width: 340px;
  max-width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 20px;
  background: var(--blue-soft);
  box-shadow: 0 22px 52px rgba(17, 35, 70, 0.16);
}

.portrait-frame::before {
  position: absolute;
  inset: 10px;
  z-index: 1;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 6px;
  pointer-events: none;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 32%;
  filter: saturate(0.96) contrast(1.02);
}

.hero-photo figcaption {
  display: grid;
  gap: 2px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
}

.hero-photo figcaption strong {
  color: var(--ink);
  font-size: 15px;
}

.stats {
  width: calc(100% - var(--page-x) - var(--page-x));
  max-width: var(--max);
  margin: -26px auto 0;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 50px rgba(17, 35, 70, 0.09);
  backdrop-filter: blur(10px);
}

.stats article {
  min-height: 150px;
  padding: 26px;
  border-right: 1px solid var(--line);
}

.stats article:last-child {
  border-right: 0;
}

.stats strong {
  display: block;
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 36px;
  line-height: 1;
}

.stats span {
  color: var(--muted);
  font-weight: 700;
}

.section {
  max-width: var(--shell);
  margin: 0 auto;
  padding: clamp(56px, 7vw, 96px) var(--page-x);
}

.section-grid,
.contact-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 80px);
  align-items: start;
}

.text-flow {
  color: var(--muted);
  font-size: 18px;
}

.text-flow p {
  max-width: 760px;
}

.note {
  padding: 18px 20px;
  border-left: 4px solid var(--yellow);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(219, 228, 240, 0.8);
}

.section-heading {
  max-width: 860px;
  margin-bottom: 34px;
}

.section-heading p,
.quote-band p,
.contact-layout p {
  color: var(--muted);
  font-size: 18px;
}

.timeline {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  max-width: none;
  padding: 8px 0 8px 34px;
}

.timeline::before {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 8px;
  width: 2px;
  content: "";
  background: linear-gradient(180deg, var(--blue), var(--sky), var(--yellow));
  border-radius: 2px;
}

.timeline-item,
.chapter,
.credential-list article {
  padding: 24px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(17, 35, 70, 0.06);
}

.timeline-item {
  position: relative;
  min-width: 0;
  overflow-wrap: anywhere;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  column-gap: 24px;
  min-height: auto;
  animation: fadeUp 520ms ease both;
}

.timeline-item::before {
  position: absolute;
  top: 30px;
  left: -34px;
  width: 14px;
  height: 14px;
  content: "";
  background: var(--white);
  border: 4px solid var(--blue);
  border-radius: 50%;
  box-shadow: 0 0 0 6px var(--paper);
}

.timeline-item::after {
  position: absolute;
  top: 36px;
  left: -18px;
  width: 18px;
  height: 2px;
  content: "";
  background: var(--line);
}

.year {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 10px;
  color: var(--blue-dark);
  background: linear-gradient(135deg, var(--blue-soft), #ffffff);
  border-radius: 6px;
  font-weight: 900;
}

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

.chapters {
  display: grid;
  gap: 20px;
  counter-reset: chapter;
}

.timeline-item .year {
  grid-row: 1 / span 2;
  align-self: start;
  justify-self: start;
}

.timeline-item h3,
.timeline-item p {
  grid-column: 2;
}

.timeline-item p {
  margin-bottom: 0;
  max-width: 78ch;
}

.chapter {
  display: grid;
  grid-template-columns: minmax(200px, 0.8fr) minmax(0, 1.7fr);
  column-gap: clamp(24px, 4vw, 64px);
  align-items: start;
  padding: clamp(24px, 3vw, 40px);
  counter-increment: chapter;
  border-radius: 16px;
  box-shadow: none;
}

.chapter h3 {
  grid-column: 1;
  grid-row: 1 / span 2;
  margin: 0;
  max-width: 24ch;
  line-height: 1.3;
}

.chapter h3::before {
  display: block;
  content: counter(chapter, decimal-leading-zero);
  margin-bottom: 16px;
  color: var(--blue);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.chapter p {
  grid-column: 2;
  margin: 0;
  max-width: 68ch;
}

.chapter p + p {
  margin-top: 16px;
}

.chapter p,
.credential-list p {
  color: var(--muted);
}

.projects-section {
  max-width: var(--shell);
  background: linear-gradient(180deg, #ffffff, #f0f6ff);
}

.projects-section > .section-kicker,
.projects-section > .section-heading,
.projects-section > .project-grid {
  max-width: none;
}

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

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 360px;
  padding: 24px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid rgba(219, 228, 240, 0.95);
  border-radius: 16px;
  box-shadow: 0 14px 36px rgba(17, 35, 70, 0.07);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  animation: fadeUp 560ms ease both;
}

.project-card:nth-child(2) {
  animation-delay: 60ms;
}

.project-card:nth-child(3) {
  animation-delay: 120ms;
}

.project-card:nth-child(4) {
  animation-delay: 180ms;
}

.project-card:nth-child(5) {
  animation-delay: 240ms;
}

.project-card:nth-child(6) {
  animation-delay: 300ms;
}

.project-card:nth-child(7) {
  animation-delay: 360ms;
}

.project-card:nth-child(8) {
  animation-delay: 420ms;
}

.project-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  content: "";
  background: var(--blue);
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(17, 100, 216, 0.32);
  box-shadow: 0 24px 60px rgba(17, 35, 70, 0.13);
}

.project-logo {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  margin-bottom: 18px;
  color: var(--blue-dark);
  background: var(--blue-soft);
  border: 1px dashed #8ab7f0;
  border-radius: 8px;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.project-logo--image {
  width: 100%;
  height: 112px;
  background: #172438;
  border: 1px solid #293b55;
  overflow: hidden;
}

.project-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  min-width: 0;
  min-height: 0;
  padding: 12px 16px;
}

.project-card a {
  width: fit-content;
  margin-top: auto;
  color: var(--blue);
  font-weight: 900;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.quote-band {
  max-width: var(--shell);
  background: var(--blue-dark);
  color: var(--white);
}

.credentials-section {
  background: rgba(255, 255, 255, 0.74);
}

.credentials-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.3fr);
  gap: 34px;
  align-items: start;
}

.credential-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.credential-list article {
  min-height: auto;
  padding: 18px;
}

.credential-list h3 {
  margin-bottom: 6px;
  font-size: 18px;
}

.credential-list p {
  margin-bottom: 0;
  font-size: 15px;
  line-height: 1.48;
}

.quote-band div {
  max-width: 900px;
}

.quote-band h2 {
  margin-bottom: 18px;
}

.quote-band p {
  color: rgba(255, 255, 255, 0.78);
}

.contact-list a {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--blue-dark);
  font-weight: 900;
  text-decoration: none;
  transition: transform 170ms ease, border-color 170ms ease, box-shadow 170ms ease, background-color 170ms ease;
}

.contact-list a:hover {
  border-color: var(--blue);
  color: var(--blue);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(17, 35, 70, 0.1);
}

.contact-section {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(234, 242, 255, 0.92)),
    #ffffff;
}

.contact-section::before {
  position: absolute;
  right: var(--page-x);
  bottom: 42px;
  width: 180px;
  height: 180px;
  content: "";
  border: 1px solid rgba(17, 100, 216, 0.16);
  border-radius: 8px;
  transform: rotate(8deg);
  pointer-events: none;
}

.contact-layout {
  position: relative;
}

.contact-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  max-width: 620px;
  margin: 0;
  font-style: normal;
  animation: fadeUp 620ms ease both;
}

.contact-list a {
  min-height: 86px;
}

.contact-list a:hover .contact-icon {
  animation: softPulse 900ms ease;
  background: var(--blue);
  color: var(--white);
}

.contact-icon {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 8px;
  transition: background-color 170ms ease, color 170ms ease;
}

.contact-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.contact-list span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.contact-list small {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 26px max(var(--page-x), calc((100vw - var(--max)) / 2));
  color: var(--white);
  background: #0c1424;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  font-weight: 800;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

@media (max-width: 1020px) {
  .section-grid,
  .contact-layout,
  .credentials-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    grid-template-columns: minmax(0, 1fr) 260px;
    justify-content: stretch;
    gap: 34px;
  }

  .portrait-frame {
    width: 260px;
  }

  h1 {
    font-size: clamp(48px, 6.6vw, 68px);
  }

  h2 {
    font-size: 42px;
  }

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

  .stats article {
    padding: 22px;
  }

  .stats strong {
    font-size: 30px;
  }

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

  .credential-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .timeline-item {
    display: block;
    padding: 20px;
  }

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

  .chapter h3 {
    grid-row: auto;
    max-width: none;
    margin-bottom: 20px;
  }

  .chapter p {
    grid-column: 1;
  }

  .site-header {
    padding: 12px 16px;
  }

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

  .site-nav {
    position: fixed;
    inset: 64px 12px auto 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

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

  .site-nav a {
    padding: 12px;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 38px;
    gap: 32px;
  }

  .hero::before {
    inset: 16px 10px;
  }

  .hero-photo {
    justify-self: center;
    width: min(100%, 240px);
  }

  .portrait-frame {
    width: min(100%, 240px);
  }

  h1 {
    font-size: 48px;
  }

  h2 {
    font-size: 32px;
  }

  .hero-lead {
    font-size: 18px;
  }

  .stats,
  .contact-list {
    grid-template-columns: 1fr;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .stats article {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stats {
    margin-top: 0;
    border-radius: 16px;
  }

  .stats article:last-child {
    border-bottom: 0;
  }

  .timeline-item,
  .chapter,
  .credential-list article {
    min-height: auto;
  }

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


  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 380px) {
  .brand {
    font-size: 14px;
  }

  h1 {
    font-size: 42px;
  }

  .project-card {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
