:root {
  --bg: #f5f2ec;
  --bg-soft: #ebe5da;
  --surface: #fffaf2;
  --surface-strong: #ffffff;
  --text: #171717;
  --muted: #606064;
  --line: rgba(23, 23, 23, 0.14);
  --accent: #146b64;
  --accent-strong: #0c4f4a;
  --accent-warm: #c06432;
  --shadow: 0 22px 70px rgba(23, 23, 23, 0.12);
  --focus-ring: 0 0 0 3px rgba(20, 107, 100, 0.22);
}

body.light {
  --bg: #f5f2ec;
  --bg-soft: #ebe5da;
  --surface: #fffaf2;
  --surface-strong: #ffffff;
  --text: #171717;
  --muted: #606064;
  --line: rgba(23, 23, 23, 0.14);
  --accent: #146b64;
  --accent-strong: #0c4f4a;
  --accent-warm: #c06432;
  --shadow: 0 22px 70px rgba(23, 23, 23, 0.12);
  --focus-ring: 0 0 0 3px rgba(20, 107, 100, 0.22);
}

body:not(.light) {
  --bg: #111312;
  --bg-soft: #1b1f1d;
  --surface: #171a19;
  --surface-strong: #202522;
  --text: #f7f2ea;
  --muted: #b9b0a3;
  --line: rgba(247, 242, 234, 0.14);
  --accent: #5cc7b8;
  --accent-strong: #87dfd1;
  --accent-warm: #df8c55;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
  --focus-ring: 0 0 0 3px rgba(92, 199, 184, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(20, 107, 100, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(20, 107, 100, 0.06) 1px, transparent 1px),
    var(--bg);
  background-size: 52px 52px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.motion-ready .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

body.motion-ready .reveal.show {
  opacity: 1;
  transform: translateY(0);
}

a,
button {
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.skip-link {
  position: absolute;
  left: 18px;
  top: -50px;
  z-index: 50;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  text-decoration: none;
}

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

.site-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  width: 100%;
  padding: 16px clamp(18px, 5vw, 56px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px);
}

.brand {
  font-size: 1rem;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: clamp(12px, 3vw, 34px);
}

.nav-links a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

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

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

main {
  overflow: hidden;
}

.hero {
  min-height: calc(100vh - 74px);
  display: flex;
  align-items: center;
  padding: 80px clamp(18px, 5vw, 56px) 64px;
}

.hero-inner,
.section-inner {
  width: min(1160px, 100%);
  margin: 0 auto;
}

.eyebrow,
.section-kicker,
.project-type {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  width: min(960px, 100%);
  margin-top: 18px;
  font-size: clamp(2.8rem, 7.8vw, 7.4rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-text {
  width: min(720px, 100%);
  margin-top: 28px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.75;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
}

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

.btn-primary {
  background: var(--text);
  color: var(--bg);
}

.btn-secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

.hero-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  width: min(760px, 100%);
  margin-top: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
}

.hero-summary div {
  padding: 20px;
  background: var(--surface);
}

.hero-summary strong {
  display: block;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
}

.hero-summary span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.intro-band,
.section-block {
  padding: 86px clamp(18px, 5vw, 56px);
}

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

.intro-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr 1.1fr;
  gap: 30px;
  align-items: start;
}

h2 {
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.section-lead {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

.section-heading {
  display: grid;
  grid-template-columns: 0.8fr 2fr;
  gap: 30px;
  align-items: end;
  margin-bottom: 34px;
}

.project-list {
  display: grid;
  gap: 18px;
}

.project-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 26px;
  align-items: start;
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.project-index {
  color: var(--accent-warm);
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  font-weight: 900;
  line-height: 0.9;
}

.project-content h3 {
  margin-top: 10px;
  font-size: clamp(1.65rem, 3vw, 2.55rem);
  line-height: 1.05;
}

.project-content p:not(.project-type) {
  width: min(720px, 100%);
  margin-top: 16px;
  color: var(--muted);
  line-height: 1.75;
}

.project-content ul {
  margin: 18px 0 0;
  padding-left: 18px;
  color: var(--text);
  line-height: 1.65;
}

.project-content li + li {
  margin-top: 7px;
}

.tech-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 20px;
}

.tech-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.project-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.project-action:hover {
  background: var(--text);
  color: var(--bg);
}

.muted-block,
.metrics-block {
  background: var(--bg-soft);
}

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

.skill-card,
.metric-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.skill-card {
  min-height: 250px;
  padding: 24px;
}

.skill-card i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  font-size: 1.25rem;
}

.skill-card h3 {
  margin-top: 26px;
  font-size: 1.15rem;
}

.skill-card p {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.65;
}

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

.course-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: clamp(22px, 4vw, 32px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent-warm) 8%, transparent), transparent 42%),
    var(--surface);
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.course-badge {
  width: fit-content;
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, var(--accent-warm) 38%, var(--line));
  border-radius: 999px;
  color: var(--accent-warm);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.course-card h3 {
  margin-top: 20px;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.08;
}

.course-card p {
  margin-top: 16px;
  color: var(--muted);
  line-height: 1.75;
}

.course-card ul {
  margin: 18px 0 0;
  padding-left: 18px;
  color: var(--text);
  line-height: 1.65;
}

.course-card li + li {
  margin-top: 7px;
}

.course-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 44px;
  margin-top: auto;
  padding: 18px 14px 0 0;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 900;
  text-decoration: none;
}

.course-action:hover {
  color: var(--accent);
}

.cert-marquee {
  position: relative;
  overflow: hidden;
  padding: 22px 0;
  border-block: 1px solid var(--line);
}

.cert-marquee::before,
.cert-marquee::after {
  position: absolute;
  top: 0;
  z-index: 2;
  width: min(120px, 18vw);
  height: 100%;
  content: "";
  pointer-events: none;
}

.cert-marquee::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg), transparent);
}

.cert-marquee::after {
  right: 0;
  background: linear-gradient(270deg, var(--bg), transparent);
}

.cert-track {
  display: flex;
  width: max-content;
  gap: 28px;
  animation: cert-scroll 18s linear infinite;
}

.cert-marquee:hover .cert-track {
  animation-play-state: paused;
}

.cert-tile {
  display: grid;
  place-items: center;
  gap: 14px;
  width: clamp(210px, 22vw, 250px);
  min-height: 250px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: center;
  text-decoration: none;
}

.cert-tile:hover {
  box-shadow: var(--shadow);
  transform: translateY(-6px);
}

.cert-badge {
  width: 176px;
  height: 176px;
  object-fit: contain;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.18));
}

.cert-code {
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
}

.cert-name {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 900;
  text-transform: uppercase;
}

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

.metric-card {
  padding: 26px;
}

.metric-card strong {
  display: block;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 0.95;
}

.metric-card span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-weight: 800;
}

.contact-inner {
  padding: clamp(28px, 7vw, 70px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-align: center;
}

.contact-inner h2 {
  width: min(720px, 100%);
  margin: 12px auto 0;
}

.contact-inner p:not(.section-kicker) {
  width: min(620px, 100%);
  margin: 18px auto 0;
  color: var(--muted);
  line-height: 1.75;
}

.contact-actions {
  justify-content: center;
}

footer {
  padding: 30px clamp(18px, 5vw, 56px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  font-size: 0.9rem;
}

footer p + p {
  margin-top: 6px;
}

@media (max-width: 900px) {
  .site-nav {
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .intro-grid,
  .section-heading,
  .project-card {
    grid-template-columns: 1fr;
  }

  .project-action {
    width: fit-content;
  }

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

@media (max-width: 620px) {
  .hero {
    min-height: auto;
    padding-top: 64px;
  }

  .hero-summary,
  .skill-grid,
  .metric-grid,
  .course-grid {
    grid-template-columns: 1fr;
  }

  .cert-marquee {
    margin-inline: calc(clamp(18px, 5vw, 56px) * -1);
  }
}

@keyframes cert-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@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;
  }
}
