:root {
  --ink: #151d1a;
  --text: #25312d;
  --muted: #68746f;
  --paper: #eef1e8;
  --paper-2: #f8f6ef;
  --panel: rgba(255, 255, 255, 0.78);
  --line: rgba(21, 29, 26, 0.14);
  --line-strong: rgba(21, 29, 26, 0.26);
  --green: #15362d;
  --blue: #244e73;
  --gold: #d6a23d;
  --rust: #a9563a;
  --shadow: 0 18px 46px rgba(21, 29, 26, 0.1);
  --radius: 8px;
  --page-gutter: max(28px, 7vw);
  --body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --display: "Playfair Display", Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  color: var(--ink);
  line-height: 1.55;
  background:
    linear-gradient(rgba(21, 29, 26, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 29, 26, 0.045) 1px, transparent 1px),
    linear-gradient(135deg, #eef1e8 0%, #f8f6ef 48%, #e5ece3 100%);
  background-size: 64px 64px, 64px 64px, auto;
}

body.menu-open {
  overflow: hidden;
}

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

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 200;
  transform: translateY(calc(-100% - 24px));
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  transition: transform 0.18s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: rgba(238, 241, 232, 0.88);
  backdrop-filter: blur(18px);
}

.site-header__inner,
main,
.site-footer__inner,
.site-footer__bottom {
  width: calc(100% - (var(--page-gutter) * 2));
  margin: 0 auto;
}

.site-header__inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.brand__mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 0.8rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.94rem;
  color: var(--text);
}

.site-nav a {
  transition: color 0.18s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--rust);
}

.nav-pill {
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
}

.menu-toggle span::before {
  content: "≡";
  margin-right: 8px;
}

main {
  padding: 54px 0 88px;
}

.hero {
  min-height: min(720px, calc(100vh - 118px));
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(420px, 0.68fr);
  gap: 24px;
  align-items: stretch;
}

.hero__content,
.hero__summary,
.signal-grid article,
.project,
.resume-grid article,
.stack-grid article,
.experience-card,
.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero__content {
  position: relative;
  overflow: hidden;
  padding: clamp(34px, 5vw, 66px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hero__content::after {
  content: "resume";
  position: absolute;
  right: 28px;
  top: 18px;
  color: rgba(21, 29, 26, 0.055);
  font-family: var(--display);
  font-size: clamp(5rem, 15vw, 12rem);
  line-height: 1;
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--rust);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

h1,
.section-heading h2 {
  font-family: var(--display);
  line-height: 0.98;
  letter-spacing: 0;
}

h1 {
  position: relative;
  z-index: 1;
  margin-bottom: 22px;
  max-width: 8.6ch;
  font-size: clamp(4.2rem, 6.8vw, 7.2rem);
}

.hero__lead {
  position: relative;
  z-index: 1;
  max-width: 760px;
  color: var(--text);
  font-size: clamp(1.14rem, 1.55vw, 1.45rem);
}

.hero__actions,
.contact-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
}

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

.button--secondary {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.62);
}

.hero__summary {
  padding: 22px;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 16px;
  background: var(--green);
  color: #edf3ed;
}

.summary-card {
  min-height: 380px;
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: rgba(255, 255, 255, 0.08);
}

.summary-card__label {
  color: #c7d4cd;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.summary-card strong {
  font-family: var(--display);
  font-size: clamp(2.35rem, 3vw, 3.7rem);
  line-height: 1;
}

.summary-card p {
  margin-bottom: 0;
  color: #d9e2dc;
  font-size: 1.02rem;
}

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

.summary-metrics div {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.summary-metrics span {
  display: block;
  font-family: var(--display);
  font-size: 2rem;
  line-height: 1;
}

.summary-metrics p {
  margin: 8px 0 0;
  color: #d9e2dc;
  font-size: 0.92rem;
}

.section {
  padding: 78px 0 0;
}

.section--tight {
  padding-top: 34px;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(160px, 0.28fr) minmax(0, 0.72fr);
  gap: 24px;
  align-items: end;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2.4rem, 4.3vw, 4.8rem);
}

.resume-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.72fr);
  gap: 16px;
  margin-bottom: 16px;
}

.resume-grid article,
.signal-grid article,
.project,
.stack-grid article {
  padding: 24px;
}

.resume-lead h3,
.project h3 {
  max-width: 780px;
  font-size: clamp(1.45rem, 2.2vw, 2.1rem);
  line-height: 1.12;
}

.resume-grid p,
.signal-grid p,
.project p,
.stack-grid p,
.experience-card p,
.contact-card p,
.clean-list {
  color: var(--text);
}

.clean-list {
  margin: 0;
  padding-left: 20px;
}

.clean-list li + li {
  margin-top: 8px;
}

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

.signal-grid span,
.project__meta,
.experience-card span {
  color: var(--rust);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.signal-grid h3,
.stack-grid h3 {
  margin-bottom: 10px;
  font-size: 1.32rem;
}

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

.project--featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: 26px;
  background: rgba(255, 255, 255, 0.82);
}

.project__tags {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.project__tags span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--text);
  font-size: 0.9rem;
}

.experience-line {
  position: relative;
  display: grid;
  gap: 18px;
  padding-left: 24px;
}

.experience-line::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(180deg, var(--rust), var(--green), var(--blue));
}

.experience-item {
  position: relative;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.experience-item::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 12px;
  width: 14px;
  height: 14px;
  border: 3px solid var(--paper);
  border-radius: 50%;
  background: var(--rust);
  box-shadow: 0 0 0 1px var(--line-strong);
}

.experience-item--current::before {
  background: var(--green);
}

.experience-item--side::before {
  background: var(--gold);
}

.experience-date {
  position: sticky;
  top: 98px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

.experience-card {
  padding: 22px 24px;
}

.experience-card h3 {
  margin: 8px 0 10px;
  font-size: clamp(1.35rem, 2vw, 1.9rem);
}

.experience-card p {
  max-width: 860px;
  margin-bottom: 0;
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.tool-card {
  min-height: 210px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 20px;
}

.tool-card img,
.tool-card__mark {
  width: 46px;
  height: 46px;
}

.tool-card img {
  object-fit: contain;
}

.tool-card__mark {
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(21, 29, 26, 0.06);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.tool-card h3 {
  margin-bottom: 8px;
  font-size: 1.26rem;
}

.tool-card p {
  margin-bottom: 0;
  color: var(--text);
}

.contact-card {
  padding: clamp(30px, 4vw, 46px);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(260px, 0.44fr);
  gap: 24px;
  align-items: center;
  background: var(--ink);
  color: #fff;
}

.contact-card h2 {
  margin-bottom: 10px;
  font-size: clamp(2.4rem, 4vw, 4.8rem);
  line-height: 1;
}

.contact-card .eyebrow {
  color: var(--gold);
}

.contact-card p {
  color: #d8dfd9;
}

.contact-actions {
  justify-content: flex-end;
  align-items: center;
}

.contact-card .button--primary {
  background: #fff;
  color: var(--ink);
}

.contact-card .button--secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 34px 0 42px;
}

.site-footer__inner,
.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--text);
}

.site-footer__bottom {
  margin-top: 26px;
  color: var(--muted);
  font-size: 0.9rem;
}

.mobile-contact {
  display: none;
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 90;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.mobile-contact.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@media (max-width: 1020px) {
  .hero,
  .resume-grid,
  .project--featured,
  .contact-card {
    grid-template-columns: 1fr;
  }

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

  .summary-card {
    min-height: 280px;
  }
}

@media (max-width: 760px) {
  :root {
    --page-gutter: 14px;
  }

  html,
  body {
    overflow-x: hidden;
  }

  .site-header__inner,
  main,
  .site-footer__inner,
  .site-footer__bottom {
    width: calc(100% - (var(--page-gutter) * 2));
  }

  .site-header__inner {
    min-height: 68px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: fixed;
    inset: 76px 14px auto;
    display: grid;
    gap: 10px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: rgba(247, 246, 238, 0.98);
    box-shadow: none;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, max-height 0.2s ease, padding 0.2s ease, visibility 0.2s ease;
  }

  body.menu-open .site-nav {
    max-height: calc(100vh - 110px);
    padding: 18px;
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    box-shadow: var(--shadow);
    border-color: var(--line);
  }

  main {
    padding-top: 28px;
  }

  .hero {
    min-height: auto;
    gap: 14px;
  }

  .hero__content,
  .hero__summary,
  .signal-grid article,
  .project,
  .resume-grid article,
  .stack-grid article,
  .experience-card,
  .contact-card {
    min-width: 0;
    max-width: 100%;
  }

  .hero__content,
  .summary-card,
  .signal-grid article,
  .project,
  .resume-grid article,
  .stack-grid article,
  .experience-card,
  .contact-card {
    padding: 22px;
  }

  .hero__content::after {
    right: -20px;
    top: 16px;
    font-size: 6rem;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(3rem, 15vw, 4.1rem);
    overflow-wrap: anywhere;
  }

  .hero__lead {
    font-size: 1.05rem;
  }

  .hero__actions {
    align-items: stretch;
  }

  .hero__actions .button {
    flex: 1 1 100%;
    width: 100%;
  }

  .summary-card {
    min-height: 260px;
  }

  .summary-card strong {
    font-size: 2.55rem;
  }

  .section {
    padding-top: 54px;
  }

  .section-heading,
  .signal-grid,
  .project-list,
  .stack-grid {
    grid-template-columns: 1fr;
  }

  .section-heading h2,
  .contact-card h2 {
    font-size: clamp(2.2rem, 12vw, 3.6rem);
  }

  .experience-line {
    padding-left: 18px;
  }

  .experience-line::before {
    left: 5px;
  }

  .experience-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .experience-item::before {
    left: -20px;
  }

  .experience-date {
    position: static;
    width: fit-content;
  }

  .button,
  .nav-pill,
  .project__tags span,
  .hero__lead,
  .summary-card p {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .button,
  .nav-pill {
    white-space: normal;
    text-align: center;
  }

  .contact-actions {
    justify-content: flex-start;
    align-items: stretch;
  }

  .contact-actions .button {
    width: 100%;
  }

  .site-footer__inner,
  .site-footer__bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .mobile-contact {
    display: inline-flex;
  }

  body.menu-open .mobile-contact {
    opacity: 0;
    pointer-events: none;
  }
}

@media (max-width: 420px) {
  .brand span:last-child {
    display: none;
  }

  .hero__content::after {
    display: none;
  }

  h1 {
    font-size: clamp(2.8rem, 14vw, 3.7rem);
  }

  .summary-card strong {
    font-size: 2.25rem;
  }
}

@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;
    scroll-behavior: auto !important;
  }
}
