:root {
  color-scheme: dark;
  --ink: #eef5f1;
  --muted: #a5b3ad;
  --paper: #0e1514;
  --surface: #151f1d;
  --surface-strong: #1b2926;
  --line: #2b3a36;
  --teal: #43c0ad;
  --teal-dark: #2b9b8c;
  --brass: #d6a65e;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.38);
  --font-body: "IBM Plex Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-tech: "IBM Plex Mono", "Roboto Mono", "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 54px);
  background: rgba(14, 21, 20, 0.86);
  border-bottom: 1px solid rgba(74, 94, 88, 0.55);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-tech);
  font-weight: 750;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #07110f;
  background: var(--teal);
  border-radius: 8px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: clamp(12px, 2.4vw, 28px);
  color: var(--muted);
  font-family: var(--font-tech);
  font-size: 0.94rem;
}

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

.hero {
  position: relative;
  display: grid;
  min-height: clamp(560px, 82vh, 760px);
  overflow: hidden;
  isolation: isolate;
}

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
  z-index: -2;
  filter: saturate(0.75) brightness(0.42) contrast(1.08);
}

.hero-shade {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(14, 21, 20, 0.98) 0%, rgba(14, 21, 20, 0.9) 46%, rgba(14, 21, 20, 0.46) 100%),
    linear-gradient(0deg, rgba(14, 21, 20, 0.95) 0%, rgba(14, 21, 20, 0) 34%);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
  gap: clamp(26px, 5vw, 72px);
  align-items: center;
  width: min(1220px, 100%);
  padding: clamp(64px, 9vw, 112px) clamp(20px, 6vw, 82px);
}

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

.eyebrow {
  margin: 0 0 12px;
  color: var(--brass);
  font-family: var(--font-tech);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 12ch;
  margin: 0;
  font-family: var(--font-tech);
  font-size: clamp(3.8rem, 9vw, 7.8rem);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-family: var(--font-tech);
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-family: var(--font-tech);
  font-size: 1.1rem;
  line-height: 1.25;
}

.summary {
  max-width: 650px;
  margin: 26px 0 0;
  color: #c5d2cd;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-family: var(--font-tech);
  font-weight: 750;
}

.portrait-panel {
  align-self: center;
  justify-self: end;
  width: min(390px, 100%);
  overflow: hidden;
  border: 1px solid rgba(105, 134, 127, 0.72);
  border-radius: 8px;
  background: rgba(21, 31, 29, 0.72);
  box-shadow: var(--shadow);
}

.portrait-panel img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 28%;
  filter: saturate(0.92) contrast(1.04);
}

.portrait-caption {
  display: grid;
  gap: 6px;
  padding: 14px 16px 16px;
  border-top: 1px solid rgba(105, 134, 127, 0.48);
  background: rgba(14, 21, 20, 0.86);
}

.portrait-caption span,
.portrait-caption strong,
.fact-label,
.tag,
.contact-link {
  font-family: var(--font-tech);
}

.portrait-caption span {
  color: var(--brass);
  font-size: 0.74rem;
  text-transform: uppercase;
}

.portrait-caption strong {
  color: #d6e7e1;
  font-size: 0.88rem;
}

.button.primary {
  color: #07110f;
  background: var(--teal);
}

.button.secondary {
  color: var(--teal);
  border-color: rgba(67, 192, 173, 0.38);
  background: rgba(21, 31, 29, 0.7);
}

.quick-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  width: min(1180px, calc(100% - 36px));
  margin: -54px auto 0;
  position: relative;
  z-index: 2;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.quick-facts > div {
  min-height: 112px;
  padding: 22px;
  background: rgba(21, 31, 29, 0.95);
}

.fact-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.quick-facts strong {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.section {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(70px, 10vw, 116px) 0 0;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(190px, 0.35fr) 1fr;
  gap: 24px;
  align-items: end;
  margin-bottom: 34px;
}

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

.timeline-item,
.project-card,
.skill-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
}

.timeline-item {
  display: grid;
  grid-template-columns: minmax(170px, 0.28fr) 1fr;
  gap: 24px;
  padding: clamp(20px, 3vw, 30px);
}

.meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.timeline-item ul,
.project-card ul {
  margin: 16px 0 0;
  padding-left: 20px;
}

.timeline-item li,
.project-card li {
  margin: 8px 0;
}

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

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

.tag-list,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag,
.contact-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid rgba(67, 192, 173, 0.28);
  border-radius: 8px;
  color: #8ce4d5;
  background: rgba(67, 192, 173, 0.1);
  font-size: 0.88rem;
  font-weight: 700;
}

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

.skill-group {
  padding: 24px;
}

.skill-group p {
  margin: 12px 0 0;
  color: var(--muted);
}

.contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  width: min(1180px, calc(100% - 36px));
  margin: clamp(70px, 10vw, 116px) auto 38px;
  padding: clamp(28px, 5vw, 44px);
  color: var(--ink);
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.contact .eyebrow {
  color: #d7ae74;
}

.contact-link {
  color: #8ce4d5;
  border-color: rgba(67, 192, 173, 0.3);
  background: rgba(67, 192, 173, 0.1);
}

.contact-action {
  cursor: pointer;
  font: inherit;
}

@media (max-width: 820px) {
  .site-header,
  .contact {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .hero {
    min-height: 680px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 48px;
    padding-bottom: 76px;
  }

  .portrait-panel {
    justify-self: start;
    width: min(320px, 100%);
  }

  .hero-shade {
    background:
      linear-gradient(180deg, rgba(14, 21, 20, 0.98) 0%, rgba(14, 21, 20, 0.88) 58%, rgba(14, 21, 20, 0.52) 100%);
  }

  h1 {
    font-size: clamp(3.2rem, 16vw, 5rem);
  }

  .quick-facts,
  .timeline-item,
  .section-heading,
  .project-grid,
  .skill-groups {
    grid-template-columns: 1fr;
  }

  .quick-facts {
    margin-top: -28px;
  }
}

@media (max-width: 520px) {
  .site-header {
    position: static;
  }

  .nav {
    gap: 10px 16px;
  }

  .hero-content {
    padding-top: 46px;
  }

  .hero-inner {
    padding-top: 34px;
  }

  .portrait-panel {
    width: 100%;
  }

  .button {
    width: 100%;
  }
}
