:root {
  color-scheme: light;
  --ink: #102a43;
  --muted: #526579;
  --line: #b8d6ec;
  --paper: #ffffff;
  --soft: #eaf5ff;
  --accent: #1769aa;
  --accent-dark: #0b3d5c;
  --gold: #5aa9e6;
  --green: #2d6a4f;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, #ffffff 0%, #f3f9ff 34%, #ffffff 72%),
    var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.nav {
  width: min(1120px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
  font-size: 1.18rem;
  letter-spacing: 0.08em;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
  font-size: 0.92rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
}

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

.nav-links a[aria-current="page"] {
  color: var(--accent-dark);
  font-weight: 800;
}

.hero {
  position: relative;
  width: min(1120px, calc(100% - 32px));
  min-height: calc(100vh - 68px);
  margin: 0 auto;
  padding: 64px 0 56px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.8fr);
  gap: 56px;
  align-items: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0 -28px auto;
  height: 330px;
  z-index: -1;
  background: linear-gradient(180deg, rgba(23, 105, 170, 0.14), rgba(255, 255, 255, 0));
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.6rem, 8vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.lead {
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  color: #263747;
}

.value {
  margin-top: 22px;
  padding-left: 18px;
  border-left: 4px solid var(--gold);
  color: #263747;
  font-weight: 700;
}

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

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

.quick-facts {
  margin: 20px 0 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-facts span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
  color: #263747;
  font-size: 0.9rem;
  font-weight: 700;
}

.button {
  cursor: pointer;
  font: inherit;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
}

.button.primary {
  color: white;
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
}

.button.secondary {
  color: var(--accent);
  background: white;
}

.hero-photo-wrap {
  justify-self: center;
  width: min(100%, 410px);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 22px 60px rgba(18, 63, 82, 0.18);
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.section {
  padding: 76px max(16px, calc((100vw - 1120px) / 2));
}

.page-hero {
  min-height: 46vh;
  padding: 96px max(16px, calc((100vw - 1120px) / 2)) 70px;
  background:
    linear-gradient(135deg, rgba(11, 61, 92, 0.94), rgba(23, 105, 170, 0.88)),
    var(--accent-dark);
  color: white;
}

.page-hero .eyebrow,
.page-hero .lead {
  color: #d8ecfb;
}

.page-hero h1 {
  width: min(860px, 100%);
  margin: 0 0 18px;
  font-size: clamp(2.35rem, 5vw, 4.7rem);
  line-height: 1;
  letter-spacing: 0;
}

.page-hero .lead {
  width: min(780px, 100%);
}

.section.alt {
  background:
    linear-gradient(180deg, #eaf5ff, #f8fcff);
}

.section-heading {
  width: min(760px, 100%);
  margin-bottom: 34px;
}

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

h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

p {
  margin: 0 0 12px;
}

.two-column,
.skills-grid,
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.resume-panel {
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(23, 105, 170, 0.12), rgba(90, 169, 230, 0.14)),
    var(--paper);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

article,
.contact-grid a {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 12px 30px rgba(11, 61, 92, 0.07);
}

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

.text-link {
  color: var(--accent);
  font-weight: 800;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  padding: 0;
}

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

.project-image-link {
  display: block;
  border-bottom: 1px solid var(--line);
  background: #eaf0f4;
}

.project-image-link img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top left;
}

.project-content {
  padding: 22px;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.project-content .text-link {
  margin-top: auto;
}

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

.service-section {
  padding-top: 68px;
}

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

.service-card {
  min-height: 230px;
  position: relative;
  overflow: hidden;
}

.service-card::after {
  content: "";
  position: absolute;
  inset: auto -24px -62px auto;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: rgba(90, 169, 230, 0.16);
}

.service-number {
  display: inline-flex;
  margin-bottom: 20px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.service-cta {
  margin-top: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(23, 105, 170, 0.12), rgba(90, 169, 230, 0.14)),
    var(--paper);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  box-shadow: 0 12px 30px rgba(11, 61, 92, 0.07);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.modal.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 61, 92, 0.54);
  backdrop-filter: blur(6px);
}

.modal-panel {
  position: relative;
  width: min(540px, 100%);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 28px 80px rgba(11, 61, 92, 0.28);
}

.modal-panel h2 {
  margin: 0 44px 22px 0;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.05;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent-dark);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}

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

.modal-links a {
  display: block;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  background: #f8fcff;
}

.modal-links a:hover {
  border-color: var(--accent);
  background: var(--soft);
}

.modal-links span {
  display: block;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.modal-open {
  overflow: hidden;
}

ul {
  margin: 0;
  padding-left: 18px;
}

li + li {
  margin-top: 8px;
}

.contact-grid a {
  color: var(--ink);
  text-decoration: none;
}

.contact-grid span {
  display: block;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition:
      opacity 720ms ease,
      transform 720ms cubic-bezier(0.2, 0.65, 0.2, 1);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
  }

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

  .button,
  .project-image-link img,
  .nav-links a {
    transition:
      color 180ms ease,
      background 180ms ease,
      border-color 180ms ease,
      transform 180ms ease,
      box-shadow 180ms ease;
  }

  .button:hover,
  .project-card:hover .project-image-link img {
    transform: translateY(-2px);
  }
}

@media (max-width: 820px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .hero,
  .two-column,
  .resume-panel,
  .service-cta,
  .experience-grid,
  .project-grid,
  .cert-list,
  .service-grid,
  .skills-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
    padding-top: 38px;
    gap: 34px;
  }

  .hero-photo-wrap {
    justify-self: start;
    max-width: 360px;
  }

  .resume-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .service-cta {
    align-items: flex-start;
    flex-direction: column;
  }
}
