:root {
  --ink: #151821;
  --text: #313849;
  --muted: #697084;
  --line: #dfe3ea;
  --paper: #fbfcff;
  --soft: #f0f4f6;
  --panel: #ffffff;
  --primary: #2e3b8c;
  --primary-dark: #1f2868;
  --teal: #0f766e;
  --gold: #b7791f;
  --radius: 8px;
  --shadow: 0 18px 50px rgba(21, 24, 33, 0.12);
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Inter", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

.narrow {
  width: min(980px, calc(100% - 32px));
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  border-bottom: 1px solid rgba(223, 227, 234, 0.76);
  background: rgba(251, 252, 255, 0.88);
  backdrop-filter: blur(16px);
  transition: box-shadow 180ms ease, background 180ms ease;
}

.site-header.is-scrolled {
  background: rgba(251, 252, 255, 0.96);
  box-shadow: 0 10px 35px rgba(21, 24, 33, 0.08);
}

.nav-shell {
  min-height: 68px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}

.brand {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  font-weight: 800;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 22px;
}

.site-nav a,
.nav-socials a {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  transition: color 160ms ease;
}

.site-nav a:hover,
.nav-socials a:hover {
  color: var(--primary);
}

.nav-socials {
  display: flex;
  gap: 12px;
}

.nav-socials a,
.contact-actions a {
  align-items: center;
  display: inline-flex;
  gap: 9px;
}

.nav-socials svg,
.contact-actions svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex: 0 0 auto;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 124px 0 72px;
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(13, 20, 42, 0.8) 0%, rgba(13, 20, 42, 0.48) 43%, rgba(13, 20, 42, 0.08) 76%, rgba(13, 20, 42, 0.04) 100%),
    linear-gradient(180deg, rgba(13, 20, 42, 0.12), rgba(13, 20, 42, 0.26));
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #8ee6d8;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  color: var(--ink);
  line-height: 1.03;
}

h1 {
  margin: 0 0 24px;
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6.8rem);
}

h2 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  font-weight: 800;
}

h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 1.18rem;
}

.hero-copy {
  max-width: 610px;
  margin: 0 0 32px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.hero h1 {
  color: #fff;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 12px 18px;
  font-weight: 800;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease;
}

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

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-outline {
  border-color: rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-light {
  background: #fff;
  color: var(--primary);
}

.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.72);
  color: #fff;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 26px;
  width: 24px;
  height: 24px;
  border-right: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: translateX(-50%) rotate(45deg);
  animation: bob 1.5s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% {
    translate: 0 0;
  }
  50% {
    translate: 0 8px;
  }
}

.section {
  padding: clamp(72px, 10vw, 128px) 0;
}

.section-soft {
  background: var(--soft);
}

.section-heading {
  max-width: 780px;
  margin-bottom: 46px;
}

.section-heading::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  margin-top: 26px;
  background: linear-gradient(90deg, var(--primary), var(--teal), var(--gold));
  border-radius: 999px;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(300px, 1fr);
  gap: 42px 70px;
  align-items: center;
}

.profile-grid .section-heading {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.portrait-stack {
  position: relative;
  min-height: 0;
}

.portrait-card {
  margin: 0;
  overflow: hidden;
  border: 8px solid #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #fff;
}

.portrait-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portrait-main {
  width: min(100%, 390px);
  aspect-ratio: 4 / 5;
}

.profile-copy p,
.about-copy > p {
  margin: 0 0 20px;
  font-size: 1.08rem;
}

.profile-facts {
  display: grid;
  gap: 14px;
  margin: 28px 0 0;
}

.profile-facts div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.profile-facts dt {
  color: var(--ink);
  font-weight: 800;
}

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

.split {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(300px, 1fr);
  gap: 70px;
}

.principles {
  display: grid;
  gap: 18px;
  margin-top: 30px;
}

.principles article {
  padding-left: 20px;
  border-left: 4px solid var(--primary);
}

.principles p,
.timeline-item p,
.project-card p,
.client-tile p {
  margin: 0;
  color: var(--muted);
}

.timeline {
  display: grid;
  gap: 18px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 28px;
  padding: 26px;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(21, 24, 33, 0.07);
}

.timeline-item > p {
  grid-column: 1 / -1;
}

.timeline-item div p {
  margin: 0;
  color: var(--primary);
  font-weight: 800;
}

.timeline-item time {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.86rem;
}

.image-band {
  position: relative;
  overflow: hidden;
}

.band-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(251, 252, 255, 0.9), rgba(251, 252, 255, 0.92)),
    url("../images/skills-bg.jpg") center / cover;
}

.band-content {
  position: relative;
  z-index: 1;
}

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

.skill-group,
.project-card,
.client-tile,
.tech-list article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
}

.skill-group {
  padding: 22px;
}

.tags,
.tech-items {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tags span,
.tech-items span {
  border-radius: 999px;
  background: rgba(46, 59, 140, 0.09);
  color: var(--primary);
  padding: 8px 12px;
  font-size: 0.88rem;
  font-weight: 800;
}

.small-tags span {
  border: 1px solid rgba(46, 59, 140, 0.18);
  background: rgba(46, 59, 140, 0.05);
  padding: 6px 10px;
  font-size: 0.78rem;
}

.project-card {
  padding: 26px;
  box-shadow: 0 12px 28px rgba(21, 24, 33, 0.06);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(15, 118, 110, 0.34);
  box-shadow: var(--shadow);
}

.project-card p {
  margin-bottom: 18px;
}

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

.client-tile {
  min-height: 190px;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 22px;
  text-align: center;
  transition: transform 160ms ease, border-color 160ms ease;
}

.client-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(46, 59, 140, 0.35);
}

.client-logo {
  width: 100%;
  height: 108px;
  display: grid;
  place-items: center;
  margin: 0 0 16px;
  padding: 10px;
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.client-logo img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
}

.client-tile h3 {
  margin-bottom: 4px;
  font-size: 0.98rem;
}

.tech-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 42px 64px;
  align-items: start;
}

.tech-layout .section-heading {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

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

.tech-list article {
  padding: 22px;
}

.logo-slider-section {
  overflow: hidden;
  padding: clamp(64px, 9vw, 110px) 0;
  background: #fff;
  border-top: 1px solid var(--line);
}

.slider-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
}

.slider-heading {
  margin-bottom: 34px;
}

.slider-copy {
  max-width: 680px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.slider-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 34px;
}

.slider-btn {
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--primary);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.slider-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(46, 59, 140, 0.35);
  background: #fff;
}

.slider-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.logo-slider {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding-left: 24px;
  overflow-x: auto;
  scroll-behavior: auto;
  scrollbar-width: none;
  cursor: grab;
  touch-action: pan-y;
}

.logo-slider::-webkit-scrollbar {
  display: none;
}

.logo-slider.is-dragging {
  cursor: grabbing;
}

.logo-track {
  display: flex;
  width: max-content;
  gap: 18px;
}

.logo-slide {
  width: 220px;
  min-height: 164px;
  display: grid;
  grid-template-rows: 102px auto;
  align-items: center;
  justify-items: center;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 10px 24px rgba(21, 24, 33, 0.05);
  user-select: none;
  overflow: hidden;
}

.logo-slide img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
}

.logo-slide h3 {
  width: 100%;
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

.achievement-grid p {
  position: relative;
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
}

.achievement-grid p::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
}

.contact-section {
  padding: clamp(72px, 10vw, 118px) 0;
  background: var(--primary);
  color: rgba(255, 255, 255, 0.9);
}

.contact-section .eyebrow,
.contact-section h2 {
  color: #fff;
}

.contact-section h2 {
  margin-bottom: 22px;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(280px, 0.8fr);
  gap: 48px;
  align-items: center;
}

.contact-panel {
  display: grid;
  gap: 16px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.contact-panel > a {
  font-weight: 800;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-inner p {
  margin: 0;
}

.footer-inner div {
  display: flex;
  gap: 18px;
}

.footer-inner a:hover {
  color: var(--primary);
}

@media (max-width: 980px) {
  .nav-shell {
    grid-template-columns: auto auto auto;
  }

  .menu-toggle {
    display: block;
    order: 3;
  }

  .site-nav {
    position: absolute;
    top: 68px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
  }

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

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

  .nav-socials {
    justify-self: end;
  }

  .profile-grid,
  .split,
  .tech-layout,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .tech-portrait {
    position: static;
    max-width: 420px;
  }

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

  .slider-header {
    grid-template-columns: 1fr;
  }

  .slider-controls {
    margin-bottom: 22px;
  }
}

@media (max-width: 700px) {
  .container,
  .narrow {
    width: min(100% - 24px, 1180px);
  }

  .nav-socials {
    display: none;
  }

  .hero {
    min-height: 86vh;
    padding-top: 112px;
  }

  .hero-overlay {
    background: linear-gradient(180deg, rgba(13, 20, 42, 0.84), rgba(13, 20, 42, 0.38));
  }

  .hero-media img {
    object-position: 68% 42%;
  }

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

  .portrait-stack {
    min-height: 0;
  }

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

  .profile-facts div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

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

  .footer-inner {
    flex-direction: column;
  }
}
