:root {
  --bg: #f5f8ff;
  --surface: #ffffff;
  --surface-alt: #edf2ff;
  --text: #1b2540;
  --muted: #445069;
  --accent: #2563eb;
  --accent-alt: #0ea5a0;
  --accent-warm: #f97316;
  --accent-purple: #8b5cf6;
  --border: #d7e0f2;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.section {
  padding: 4.5rem 0;
}

.section-alt {
  background: var(--surface-alt);
}

#education {
  background: #ffffff;
}

#project {
  background: #ebf3ff;
}

#skills {
  background: #f0fbf7;
}

#certifications {
  background: #fff6ea;
}

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

h1 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.2;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 1.25rem;
  color: #1d2d50;
  border-left: 4px solid var(--accent);
  padding-left: 0.55rem;
}

h3 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(243, 246, 250, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-row {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  text-decoration: none;
  color: #1e3a8a;
  font-weight: 700;
  font-size: 1.1rem;
}

.site-nav {
  display: flex;
  gap: 1rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  padding: 0.35rem 0.45rem;
  border-radius: 6px;
  transition: background-color 180ms ease, color 180ms ease;
}

.site-nav a:hover,
.site-nav a.active {
  background: #e6eeff;
  color: #1e40af;
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
  padding: 9px 8px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  margin-bottom: 6px;
}

.menu-toggle span:last-child {
  margin-bottom: 0;
}

.intro-section {
  padding-top: 5.5rem;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: center;
}

.kicker {
  color: var(--accent-alt);
  font-weight: 700;
  margin-bottom: 0.7rem;
}

.hello-inline {
  display: inline-block;
  margin-right: 0.35rem;
  font-size: 0.9em;
  vertical-align: 0.04em;
}

.role-title {
  margin-top: 0.5rem;
  color: #1e3a8a;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-weight: 700;
}

.lead {
  margin-top: 1rem;
  color: var(--muted);
}

.facts {
  margin-top: 1.4rem;
  display: grid;
  gap: 0.9rem;
}

.facts div {
  padding: 0.9rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

.facts dt {
  font-weight: 700;
}

.facts dd {
  margin: 0.3rem 0 0;
  color: var(--muted);
}

.intro-media {
  background: #000000;
  border: 1px solid #111827;
  border-radius: 8px;
  overflow: hidden;
}

.carousel-viewport {
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transform: translateX(0);
  transition: transform 700ms ease-in-out;
}

.carousel-slide {
  width: 100%;
  flex: 0 0 100%;
  aspect-ratio: 4 / 3;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  background: #000000;
}

.traffic-slide img {
  object-fit: cover;
  object-position: top center;
}

.logo-slide img {
  width: min(68%, 340px);
  height: auto;
  max-height: 70%;
  object-fit: contain;
}

.intro-media figcaption {
  padding: 0.75rem 0.9rem;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  background: #000000;
  text-align: center;
}

.education-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 1rem;
}

.entry {
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 5px 14px rgba(27, 37, 64, 0.08);
  border-top: 4px solid var(--accent);
}

.education-grid .entry:nth-child(2) {
  border-top-color: var(--accent-warm);
}

.education-grid .entry:nth-child(3) {
  border-top-color: var(--accent-alt);
}

.meta {
  color: var(--muted);
}

.split-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.split-list > div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 5px 14px rgba(27, 37, 64, 0.08);
}

ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}

.project-org {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.current-project,
.past-project {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.1rem;
  box-shadow: 0 8px 18px rgba(27, 37, 64, 0.1);
}

.current-project {
  border-left: 6px solid var(--accent-warm);
  margin-bottom: 1rem;
}

.past-project {
  border-left: 6px solid var(--accent-purple);
}

.project-badge {
  display: inline-block;
  width: fit-content;
  color: #9a3412;
  background: #ffedd5;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.project-summary {
  margin-top: 0.65rem;
  color: var(--muted);
}

.project-list {
  margin-top: 1rem;
  display: grid;
  gap: 0.45rem;
}

.compact-list {
  margin-bottom: 1rem;
}

.project-button {
  display: inline-flex;
  align-items: center;
  margin-top: 0.25rem;
}

.project-list li::marker {
  color: var(--accent-purple);
}

.skills-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 1rem;
}

.skills-layout article {
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 5px 14px rgba(27, 37, 64, 0.08);
  border-left: 4px solid var(--accent-alt);
}

.skills-layout article:nth-child(2n) {
  border-left-color: var(--accent-warm);
}

.skills-layout p {
  color: var(--muted);
}

.certification-card {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 1.25rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.1rem;
  box-shadow: 0 8px 18px rgba(27, 37, 64, 0.1);
  border-left: 6px solid var(--accent);
}

.certification-copy {
  min-width: 0;
}

.certification-image {
  margin: 0;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.certification-image img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  object-position: left center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  text-decoration: none;
  color: #ffffff;
  background: #1d4ed8;
  border: 1px solid #1d4ed8;
  border-radius: 6px;
  padding: 0.6rem 0.95rem;
  font-weight: 600;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.24);
}

.certification-copy .button {
  margin-top: 1rem;
}

.button:hover {
  opacity: 0.88;
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(27, 37, 64, 0.25);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.1rem 0;
  background: var(--surface);
}

.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  color: var(--muted);
}

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

  .certification-card {
    grid-template-columns: 1fr;
  }

  .education-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 720px) {
  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 64px;
    right: 4%;
    left: 4%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
    display: none;
    flex-direction: column;
    gap: 0.35rem;
  }

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

  .education-grid,
  .split-list,
  .skills-layout {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 3.6rem 0;
  }
}
