:root {
  color-scheme: light;
  --bg: #eef3f8;
  --paper: #f8fbff;
  --white: #ffffff;
  --ink: #18212d;
  --muted: #657285;
  --line: #dce4ee;
  --line-strong: #b8c7d8;
  --blue: #2d6cdf;
  --teal: #0e8f88;
  --navy: #17202b;
  --navy-soft: #223044;
  --soft-blue: #e9f0fb;
  --shadow: 0 18px 45px rgba(24, 33, 45, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

a {
  color: inherit;
}

#signal-field {
  display: none;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px max(24px, calc((100vw - 1180px) / 2 + 20px));
  border-bottom: 1px solid rgba(24, 33, 45, 0.08);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.brand {
  color: var(--ink);
  font-size: 17px;
  font-weight: 850;
  text-decoration: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.nav a {
  padding: 8px 11px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
}

.nav a:hover {
  background: var(--soft-blue);
  color: var(--blue);
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 64px;
}

.hero {
  min-height: 430px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 34px;
  align-items: center;
  padding: 38px 0 48px;
}

.eyebrow {
  color: var(--blue);
  font-family: "Cascadia Mono", "DejaVu Sans Mono", monospace;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1 {
  margin-top: 14px;
  color: var(--ink);
  font-size: clamp(58px, 10vw, 118px);
  line-height: 0.94;
  font-weight: 880;
}

.hero-copy {
  max-width: 650px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.6;
}

.hero-photo,
.about-photo {
  width: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-photo {
  max-width: 280px;
  aspect-ratio: 1 / 1.08;
  justify-self: end;
}

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

.actions a,
.project-actions a,
.resume-actions a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--blue);
  text-decoration: none;
  background: var(--white);
  font-size: 14px;
  font-weight: 800;
}

.actions a:first-child,
.project-actions a:first-child,
.resume-actions a:first-child {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}

.section {
  padding: 56px 0 0;
  scroll-margin-top: 74px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.section h2 {
  margin-top: 6px;
  color: var(--ink);
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.04;
}

.project-carousel,
.about-copy,
.resume-grid article,
.skill-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.project-carousel {
  overflow: hidden;
}

.carousel-status {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  color: var(--blue);
  font-family: "Cascadia Mono", "DejaVu Sans Mono", monospace;
  font-size: 13px;
  font-weight: 800;
}

.project-slide {
  min-height: 340px;
  display: none;
  grid-template-columns: minmax(0, 500px) 1fr;
}

.project-slide.is-active {
  display: grid;
}

.project-media {
  position: relative;
  min-height: 340px;
  display: block;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: #f8fbff;
}

.project-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  padding: 14px;
}

.project-media::after {
  position: absolute;
  inset: 0;
  content: "";
  border: 1px solid rgba(24, 33, 45, 0.04);
  pointer-events: none;
}

.project-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  padding: 28px;
}

.project-type,
.resume-kicker {
  color: var(--blue);
  font-family: "Cascadia Mono", "DejaVu Sans Mono", monospace;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.project-copy h3 {
  margin-top: 8px;
  color: var(--ink);
  font-size: 34px;
}

.project-copy p:not(.project-type) {
  margin-top: 14px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.58;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tags li {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border-radius: 999px;
  color: #344257;
  background: #eef3f8;
  font-size: 13px;
  font-weight: 750;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.carousel-controls {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: stretch;
  gap: 1px;
  border-top: 1px solid var(--line);
  background: var(--line);
}

.carousel-controls button,
.project-tabs button {
  min-height: 48px;
  border: 0;
  color: var(--muted);
  background: var(--white);
  font: inherit;
  font-weight: 760;
  cursor: pointer;
}

.project-prev,
.project-next {
  min-width: 92px;
  color: var(--blue) !important;
  font-family: "Cascadia Mono", "DejaVu Sans Mono", monospace !important;
}

.project-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--line);
}

.project-tabs button {
  padding: 0 12px;
  font-size: 14px;
}

.project-tabs button.is-active {
  color: var(--white);
  background: var(--blue);
  font-weight: 850;
}

.synthetic {
  display: grid;
  place-items: center;
  padding: 24px;
}

.site-facts {
  width: min(100%, 360px);
  display: grid;
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
}

.site-facts div {
  padding: 18px;
  background: var(--white);
}

.site-facts span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.site-facts strong {
  display: block;
  margin-top: 8px;
  color: var(--blue);
  font-size: 18px;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: stretch;
}

.about-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 26px;
  padding: 28px;
  background: var(--navy);
  color: var(--white);
}

.about-copy p {
  color: #d8e3ef;
  font-size: 17px;
  line-height: 1.65;
}

.about-photo {
  min-height: 320px;
  height: 100%;
}

.about-highlights,
.resume-grid,
.contact-grid {
  display: grid;
  gap: 12px;
}

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

.about-highlights article {
  min-height: 94px;
  padding: 15px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.about-highlights strong,
.contact-grid strong {
  display: block;
  color: var(--white);
  font-size: 19px;
}

.about-highlights span {
  display: block;
  margin-top: 6px;
  color: #b8c6d6;
  font-size: 13px;
  line-height: 1.4;
}

.resume-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.resume-grid article {
  min-height: 210px;
  padding: 22px;
  box-shadow: none;
}

.resume-grid h3,
.skill-group h3 {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 20px;
}

.resume-grid p:not(.resume-kicker) {
  margin-top: 12px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.62;
}

.resume-poster {
  height: clamp(320px, 44vw, 460px);
  display: block;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.resume-poster img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  padding: 12px;
}

.resume-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.skills-groups {
  display: grid;
  gap: 14px;
}

.skill-group {
  padding: 22px;
  box-shadow: none;
}

.skill-group h3 {
  margin: 0 0 14px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 9px;
}

.skills-grid article {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.skills-grid img {
  width: 18px !important;
  height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  flex: 0 0 18px;
  object-fit: contain;
}

.skills-grid img[src*="simple-icons"],
.skills-grid img[src*="azuresqldatabase"] {
  filter: invert(38%) sepia(76%) saturate(1629%) hue-rotate(207deg) brightness(91%) contrast(89%);
}

.skills-grid span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 780;
}

.skill-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
  border-radius: 5px;
  color: var(--white) !important;
  background: var(--blue);
  font-family: "Cascadia Mono", "DejaVu Sans Mono", monospace;
  font-size: 8px !important;
  line-height: 1;
}

.contact-section {
  margin-top: 56px;
  padding: 58px 28px;
  border-radius: 8px;
  background: var(--navy);
  color: var(--white);
  box-shadow: var(--shadow);
}

.contact-section .section-head {
  display: block;
  margin-bottom: 12px;
  text-align: center;
}

.contact-section h2 {
  color: var(--white);
}

.contact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 820px;
  margin: 0 auto;
}

.contact-grid a {
  min-height: 112px;
  display: grid;
  grid-template-columns: 46px 1fr;
  align-content: center;
  column-gap: 14px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--white);
  text-decoration: none;
  background: var(--navy-soft);
  transition:
    transform 180ms ease,
    background 180ms ease;
}

.contact-grid a:hover {
  transform: translateY(-2px);
  background: #2a3b53;
}

.contact-icon {
  grid-row: span 2;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--white) !important;
  background: rgba(255, 255, 255, 0.12);
  font-family: "Cascadia Mono", "DejaVu Sans Mono", monospace;
  font-size: 13px !important;
  font-weight: 850;
}

.contact-grid span:last-child {
  display: block;
  margin-top: 6px;
  color: #b8c6d6;
  font-size: 13px;
  line-height: 1.4;
}

@media (max-width: 980px) {
  .hero,
  .about-grid,
  .resume-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

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

  .about-photo {
    max-height: 420px;
  }

  .about-highlights {
    grid-template-columns: 1fr;
  }

  .project-slide,
  .project-slide.is-active {
    display: block;
    min-height: 0;
  }

  .project-media {
    min-height: 260px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .carousel-controls {
    grid-template-columns: 1fr 1fr;
  }

  .project-tabs {
    grid-column: 1 / -1;
    grid-row: 1;
  }

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

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 16px;
  }

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

  .shell {
    width: min(100% - 22px, 1180px);
    padding-top: 18px;
  }

  .hero {
    min-height: 0;
    padding-top: 28px;
  }

  h1 {
    font-size: clamp(48px, 16vw, 72px);
  }

  .hero-copy {
    font-size: 17px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .project-media {
    min-height: 200px;
  }

  .project-copy {
    padding: 22px;
  }

  .project-copy h3 {
    font-size: 28px;
  }

  .contact-section {
    padding: 44px 18px;
  }
}
