:root {
  --ink: #101719;
  --ink-soft: #263235;
  --paper: #f6f5f0;
  --white: #ffffff;
  --line: rgba(16, 23, 25, 0.16);
  --muted: #5d686a;
  --teal: #00a8a8;
  --teal-dark: #007878;
  --lime: #b8ff19;
  --violet: #d577f5;
  --max: 1180px;
  --radius: 24px;
  --shadow: 0 24px 70px rgba(16, 23, 25, 0.12);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 82px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body.dialog-open { overflow: hidden; }

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

a { color: inherit; }

button,
a { -webkit-tap-highlight-color: transparent; }

button,
input,
textarea { font: inherit; }

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

h1,
h2,
h3 {
  letter-spacing: -0.035em;
  line-height: 1.08;
}

h1 {
  margin-bottom: 28px;
  font-size: clamp(2.75rem, 5.2vw, 5rem);
  font-weight: 650;
}

h2 {
  margin-bottom: 22px;
  font-size: clamp(2.25rem, 4vw, 4rem);
  font-weight: 620;
}

h3 {
  margin-bottom: 14px;
  font-size: clamp(1.35rem, 2vw, 2rem);
  font-weight: 620;
}

.shell {
  width: min(calc(100% - 48px), var(--max));
  margin-inline: auto;
}

.section { padding: 120px 0; }

.eyebrow {
  margin-bottom: 14px;
  color: var(--teal-dark);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.3;
  text-transform: uppercase;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--white);
  color: var(--ink);
  transform: translateY(-160%);
}

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

.site-header {
  position: fixed;
  z-index: 100;
  inset: 0 0 auto;
  border-bottom: 1px solid transparent;
  color: var(--white);
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.site-header.is-scrolled,
.site-header.nav-open {
  border-color: var(--line);
  background: rgba(246, 245, 240, 0.96);
  color: var(--ink);
  backdrop-filter: blur(14px);
}

.nav-shell {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.62rem;
  letter-spacing: 0.05em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.78rem;
  font-weight: 700;
}

.site-nav a {
  text-decoration: none;
  transition: opacity 150ms ease;
}

.site-nav a:hover { opacity: 0.62; }

.nav-resume {
  padding: 8px 16px;
  border: 1px solid currentColor;
  border-radius: 999px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  background: transparent;
  color: inherit;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  background: currentColor;
}

.hero {
  position: relative;
  display: grid;
  min-height: 810px;
  padding: 150px 0 88px;
  align-items: center;
  overflow: hidden;
  background: #141719;
  color: var(--white);
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 18, 20, 0.96) 0%, rgba(11, 18, 20, 0.84) 48%, rgba(11, 18, 20, 0.4) 100%),
    url("/assets/header-background.jpg") center / cover;
  transform: scale(1.02);
}

.hero::after {
  content: "";
  position: absolute;
  right: -8vw;
  bottom: -18vw;
  width: 52vw;
  height: 52vw;
  border: 1px solid rgba(184, 255, 25, 0.4);
  border-radius: 50%;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.7fr);
  align-items: end;
  gap: 80px;
}

.hero-copy { max-width: 860px; }

.hero .eyebrow { color: var(--lime); }

.hero-lede {
  max-width: 720px;
  margin-bottom: 36px;
  color: rgba(255, 255, 255, 0.8);
  font-size: clamp(1.1rem, 1.6vw, 1.42rem);
  line-height: 1.55;
}

.hero-actions,
.case-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

.button {
  display: inline-flex;
  min-height: 52px;
  padding: 0 23px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px 999px 999px 9px;
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

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

.button-primary { background: var(--lime); color: var(--ink); }
.button-primary:hover { background: #cdff5e; }
.button-ghost { border-color: rgba(255,255,255,0.58); color: var(--white); }
.button-ghost:hover { background: var(--white); color: var(--ink); }
.button-dark { background: var(--ink); color: var(--white); }
.button-light { background: var(--white); color: var(--ink); }

.personal-note {
  margin: 26px 0 0;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.76rem;
}

.hero-card {
  position: relative;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(14, 23, 25, 0.76);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero-card::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 26px;
  width: 72px;
  height: 14px;
  border-radius: 50%;
  background: var(--violet);
}

.hero-card-label {
  margin-bottom: 18px;
  color: var(--lime);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero-card h2 { font-size: 1.6rem; }
.hero-card p:not(.hero-card-label) { color: rgba(255,255,255,0.72); font-size: 0.89rem; }
.hero-card a { font-size: 0.8rem; font-weight: 800; text-underline-offset: 4px; }

.proof {
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.proof-grid div {
  min-height: 142px;
  padding: 30px;
  border-left: 1px solid var(--line);
}

.proof-grid div:last-child { border-right: 1px solid var(--line); }

.proof-grid strong {
  display: block;
  margin-bottom: 5px;
  font-size: 2.15rem;
  letter-spacing: -0.05em;
  line-height: 1;
}

.proof-grid span {
  color: var(--muted);
  font-size: 0.76rem;
}

.intro-grid {
  display: grid;
  grid-template-columns: 0.9fr 1fr;
  gap: 10vw;
}

.intro h2 { max-width: 640px; }

.intro-copy {
  padding-top: 42px;
  color: var(--ink-soft);
  font-size: 1.1rem;
}

.intro-copy p:last-child { margin-bottom: 0; }

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.6fr);
  align-items: end;
  gap: 80px;
  margin-bottom: 64px;
}

.section-heading h2 { margin-bottom: 0; }

.section-heading > p {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.93rem;
}

.section-heading.compact { display: block; }

.work-section { background: var(--white); }

.case-card {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  margin-bottom: 62px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 16px 50px rgba(16,23,25,0.08);
}

.case-card:last-child { margin-bottom: 0; }

.case-card-reverse .case-image { order: 2; }

.case-image {
  min-height: 540px;
  overflow: hidden;
  background: #e4e4e4;
}

.case-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 500ms ease;
}

.case-card:hover .case-image img { transform: scale(1.018); }

.case-content {
  display: flex;
  padding: clamp(34px, 4vw, 58px);
  flex-direction: column;
  justify-content: center;
}

.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 22px;
}

.case-meta span {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 700;
}

.case-content > p {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.metric-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 24px 0 30px;
}

.metric-list div {
  padding-top: 14px;
  border-top: 2px solid var(--teal);
}

.metric-list dt {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.metric-list dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.4;
}

.outcome-list {
  padding: 0;
  margin: 18px 0 30px;
  list-style: none;
}

.outcome-list li {
  position: relative;
  padding: 10px 0 10px 24px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.outcome-list li::before {
  content: "↗";
  position: absolute;
  top: 10px;
  left: 0;
  color: var(--teal-dark);
  font-weight: 800;
}

.text-button,
.text-link {
  padding: 0 0 4px;
  border: 0;
  border-bottom: 2px solid currentColor;
  background: transparent;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.text-link { color: var(--teal-dark); }

.capability-section {
  background: var(--ink);
  color: var(--white);
}

.capability-section .eyebrow { color: var(--lime); }

.capability-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(255,255,255,0.18);
  border-left: 1px solid rgba(255,255,255,0.18);
}

.capability-card {
  min-height: 370px;
  padding: 28px;
  border-right: 1px solid rgba(255,255,255,0.18);
  border-bottom: 1px solid rgba(255,255,255,0.18);
}

.card-number {
  display: block;
  margin-bottom: 100px;
  color: var(--lime);
  font-size: 0.7rem;
  font-weight: 800;
}

.capability-card h3 { font-size: 1.4rem; }
.capability-card p { color: rgba(255,255,255,0.62); font-size: 0.82rem; }

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

.project-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 40px rgba(16,23,25,0.12);
}

.project-card img {
  width: 100%;
  height: auto;
  display: block;
  background: #ddd;
}

.project-card > div { padding: 24px; }

.project-card p {
  margin-bottom: 7px;
  color: var(--teal-dark);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-card h3 { margin-bottom: 8px; font-size: 1.25rem; }
.project-card span { display: block; color: var(--muted); font-size: 0.75rem; }

.experience-section { border-top: 1px solid var(--line); background: #e9e8e2; }

.experience-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  align-items: start;
  gap: 10vw;
}

.experience-intro {
  position: sticky;
  top: 120px;
}

.experience-intro > p:not(.eyebrow) { color: var(--muted); }

.timeline { border-top: 1px solid var(--line); }

.timeline article {
  display: grid;
  grid-template-columns: 120px 1fr;
  padding: 34px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-date {
  grid-row: 1 / span 3;
  color: var(--teal-dark);
  font-size: 0.7rem;
  font-weight: 800;
}

.timeline h3 { margin-bottom: 5px; font-size: 1.35rem; }
.timeline h3 span { color: var(--muted); font-size: 0.72em; font-weight: 500; }
.timeline-role { margin-bottom: 10px; color: var(--ink); font-size: 0.76rem; font-weight: 800; }
.timeline article > p:last-child { margin-bottom: 0; color: var(--muted); font-size: 0.78rem; }

.contact-section {
  padding: 110px 0;
  background: var(--teal-dark);
  color: var(--white);
}

.contact-section .eyebrow { color: var(--lime); }

.contact-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  align-items: end;
  gap: 80px;
}

.contact-grid h2 { max-width: 760px; }
.contact-grid p:not(.eyebrow) { max-width: 760px; color: rgba(255,255,255,0.72); }

.contact-actions { align-items: flex-start; flex-direction: column; }
.contact-actions > a:not(.button) { font-size: 0.82rem; font-weight: 800; text-underline-offset: 5px; }

.site-footer { padding: 28px 0; background: var(--ink); color: rgba(255,255,255,0.58); }

.site-footer .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-footer p,
.site-footer a { margin: 0; font-size: 0.68rem; }

.case-dialog {
  width: min(calc(100% - 40px), 1040px);
  max-height: min(90vh, 980px);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 24px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 40px 100px rgba(0,0,0,0.32);
}

.case-dialog::backdrop { background: rgba(8, 12, 14, 0.78); backdrop-filter: blur(7px); }

.case-dialog > img {
  width: 100%;
  max-height: 450px;
  object-fit: cover;
  object-position: top;
}

.dialog-close {
  position: fixed;
  z-index: 2;
  top: max(7vh, 20px);
  right: max(calc((100vw - 1040px) / 2 + 14px), 34px);
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.dialog-body { padding: clamp(30px, 6vw, 70px); }
.dialog-body > h2 { max-width: 820px; }

.dialog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px 50px;
  margin: 45px 0;
}

.dialog-grid section { padding-top: 20px; border-top: 1px solid var(--line); }
.dialog-grid h3 { font-size: 1.05rem; }
.dialog-grid p { margin-bottom: 0; color: var(--muted); font-size: 0.8rem; }

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.reveal.is-visible { opacity: 1; transform: none; }

:focus-visible { outline: 3px solid var(--violet); outline-offset: 4px; }

@media (min-width: 981px) {
  .case-image {
    background: #e8ebea;
  }

  .case-image img {
    object-fit: contain;
    object-position: center;
    padding: 24px;
  }
}

@media (max-width: 980px) {
  .hero { min-height: auto; }
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .hero-card { max-width: 520px; }
  .case-card { grid-template-columns: 1fr; }
  .case-card-reverse .case-image { order: 0; }
  .case-image { min-height: 420px; }
  .capability-grid { grid-template-columns: 1fr 1fr; }
  .capability-card { min-height: 300px; }
  .card-number { margin-bottom: 60px; }
  .project-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .shell { width: min(calc(100% - 32px), var(--max)); }
  .section { padding: 84px 0; }
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: 78px;
    left: 0;
    display: none;
    width: 100%;
    padding: 18px 24px 28px;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    background: rgba(246,245,240,0.98);
    color: var(--ink);
    box-shadow: 0 18px 35px rgba(16,23,25,0.1);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav-resume { border: 0; border-radius: 0; }
  .hero { padding: 130px 0 70px; }
  .hero::after { width: 90vw; height: 90vw; }
  .proof-grid { grid-template-columns: 1fr 1fr; }
  .proof-grid div { min-height: 120px; padding: 24px; }
  .proof-grid div:nth-child(2) { border-right: 1px solid var(--line); }
  .proof-grid div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .intro-grid,
  .section-heading,
  .experience-grid,
  .contact-grid { grid-template-columns: 1fr; gap: 38px; }
  .intro-copy { padding-top: 0; }
  .section-heading { margin-bottom: 40px; }
  .case-image { min-height: 300px; }
  .metric-list { grid-template-columns: 1fr; }
  .capability-grid { grid-template-columns: 1fr; }
  .capability-card { min-height: 240px; }
  .card-number { margin-bottom: 40px; }
  .project-grid { grid-template-columns: 1fr; }
  .experience-intro { position: static; }
  .timeline article { grid-template-columns: 1fr; }
  .timeline-date { grid-row: auto; margin-bottom: 8px; }
  .contact-section { padding: 84px 0; }
  .site-footer .shell { align-items: flex-start; flex-direction: column; }
  .dialog-grid { grid-template-columns: 1fr; }
  .dialog-close { top: 30px; right: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  .reveal { opacity: 1; transform: none; }
}
