:root {
  color-scheme: dark;
  --bg: #111312;
  --bg-2: #181c1a;
  --surface: #f5f2ea;
  --surface-2: #ebe7db;
  --panel: #222724;
  --panel-2: #2f3531;
  --line: rgba(255, 255, 255, 0.14);
  --line-dark: rgba(17, 19, 18, 0.16);
  --text: #f7f5ef;
  --text-soft: #c8cbc4;
  --ink: #171a18;
  --ink-soft: #565d56;
  --cyan: #5cc8d7;
  --green: #71c187;
  --gold: #e0b75c;
  --red: #d86f67;
  --blue: #5b8def;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
}

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

button,
input {
  font: inherit;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 100;
  transform: translateY(-150%);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  padding: 0.65rem 0.85rem;
  font-weight: 750;
  transition: transform 160ms ease;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  background: rgba(17, 19, 18, 0.78);
  backdrop-filter: blur(18px);
  transition: border-color 160ms ease, background 160ms ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  background: rgba(17, 19, 18, 0.92);
}

.nav-shell {
  width: min(var(--max), calc(100% - 2rem));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 850;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--green), var(--cyan));
  color: #101411;
  font-size: 0.88rem;
  box-shadow: 0 10px 30px rgba(92, 200, 215, 0.24);
}

.brand-text {
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: 0.94rem;
  font-weight: 750;
  padding: 0.55rem 0.8rem;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  outline: none;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: currentColor;
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 10%, rgba(92, 200, 215, 0.16), transparent 34rem),
    linear-gradient(180deg, #111312 0%, #151917 100%);
  padding: 4.4rem 0 4.8rem;
}

.hero-grid,
.section,
.site-footer {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.76fr) minmax(380px, 1.24fr);
  gap: 3rem;
  align-items: center;
}

.eyebrow,
.card-kicker,
.project-topline,
.timeline-date {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1,
h2,
h3 {
  line-height: 1.05;
  letter-spacing: 0;
}

h1 {
  margin-bottom: 1.1rem;
  color: var(--text);
  font-size: clamp(2.8rem, 5vw, 5.1rem);
  max-width: 12.5ch;
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(2.1rem, 4vw, 4rem);
}

h3 {
  margin-bottom: 0.75rem;
  font-size: 1.28rem;
}

.hero-lede {
  max-width: 36rem;
  color: var(--text-soft);
  font-size: 1.05rem;
}

.hero-actions,
.contact-actions,
.resume-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.8rem;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  font-weight: 850;
  padding: 0.68rem 0.95rem;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.13);
  outline: none;
}

.button-primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  color: #101411;
}

.button-primary:hover,
.button-primary:focus-visible {
  background: linear-gradient(135deg, #8bd39b, #70d7e4);
}

.button-ghost {
  background: transparent;
}

.hero-visual {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-md);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(17, 19, 18, 0.18), transparent 32%),
    linear-gradient(180deg, transparent 70%, rgba(17, 19, 18, 0.18));
}

.hero-visual img {
  width: 100%;
  aspect-ratio: 21 / 10;
  object-fit: cover;
}

.section {
  padding: 5.5rem 0;
  color: var(--ink);
  background: var(--surface);
}

.band {
  width: 100%;
  max-width: none;
  background: var(--surface-2);
}

.band > * {
  width: min(var(--max), calc(100% - 2rem));
  margin-left: auto;
  margin-right: auto;
}

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

.section-heading p {
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.section-heading .eyebrow {
  color: #886a1d;
}

.section-heading.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.8fr);
  max-width: none;
  gap: 2rem;
  align-items: end;
}

.work-grid,
.capability-grid,
.project-grid {
  display: grid;
  gap: 1rem;
}

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

.feature-card,
.capability,
.project-card,
.contact-panel,
.stack-shell {
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-sm);
  background: #fffdf7;
  box-shadow: 0 14px 40px rgba(17, 19, 18, 0.08);
}

.feature-card {
  min-height: 300px;
  padding: 1.35rem;
}

.feature-card h3,
.capability h3,
.project-card h3,
.timeline-body h3 {
  color: var(--ink);
}

.feature-card p,
.capability p,
.project-card p,
.timeline-body p,
.stack-groups p,
.contact-panel p {
  color: var(--ink-soft);
}

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

.capability {
  padding: 1.3rem;
}

.capability-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  margin-bottom: 1.3rem;
  border-radius: var(--radius-sm);
  background: #e4f4ea;
  color: #225c36;
}

.capability:nth-child(2n) .capability-icon {
  background: #e4f0f4;
  color: #1d5360;
}

.capability:nth-child(3n) .capability-icon {
  background: #f7ecd0;
  color: #76540b;
}

.capability-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

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

.project-card {
  display: flex;
  min-height: 360px;
  flex-direction: column;
  padding: 1.35rem;
}

.project-card-wide {
  grid-column: span 2;
}

.project-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.3rem;
  color: #705618;
}

.status-pill {
  border-radius: 999px;
  background: #202622;
  color: var(--surface);
  padding: 0.26rem 0.56rem;
  font-size: 0.72rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: auto 0 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  border: 1px solid rgba(17, 19, 18, 0.12);
  border-radius: 999px;
  background: #f0eee6;
  color: #303630;
  font-size: 0.78rem;
  font-weight: 780;
  padding: 0.24rem 0.55rem;
}

.text-link {
  color: #176373;
  font-weight: 850;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.timeline {
  display: grid;
  gap: 1rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 1rem;
  border-top: 1px solid var(--line-dark);
  padding-top: 1.3rem;
}

.timeline-date {
  color: #7a5c12;
}

.timeline-body p {
  max-width: 780px;
}

.stack-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: 2rem;
  padding: 1.5rem;
}

.stack-groups {
  display: grid;
  gap: 1rem;
}

.stack-groups h3 {
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

.stack-groups p {
  margin-bottom: 0;
}

.contact-section {
  padding-bottom: 6rem;
}

.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: center;
  padding: 1.6rem;
}

.contact-panel p {
  max-width: 650px;
  margin-bottom: 0;
}

.contact-actions {
  justify-content: flex-end;
  margin-top: 0;
}

.contact-actions .button {
  color: var(--ink);
  border-color: var(--line-dark);
}

.contact-actions .button-primary {
  color: #101411;
}

.site-footer {
  padding: 2.2rem 0 2.8rem;
  color: var(--ink-soft);
  text-align: center;
}

.site-footer p {
  margin: 0;
}

[data-reveal] {
  opacity: 1;
  transform: none;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.resume-page {
  background: #ece8dc;
  color: var(--ink);
}

.resume-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  width: min(980px, calc(100% - 2rem));
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 auto;
  color: var(--ink);
}

.resume-header .brand-text {
  color: var(--ink);
}

.resume-header .button {
  color: var(--ink);
  border-color: var(--line-dark);
}

.resume-header .button-primary {
  color: #101411;
}

.resume-sheet {
  width: min(980px, calc(100% - 2rem));
  margin: 0 auto 3rem;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-sm);
  background: #fffdf8;
  box-shadow: 0 22px 70px rgba(17, 19, 18, 0.14);
  padding: 3rem;
}

.resume-intro {
  border-bottom: 2px solid #171a18;
  margin-bottom: 1.2rem;
  padding-bottom: 1rem;
}

.resume-intro h1 {
  max-width: none;
  margin-bottom: 0.4rem;
  color: var(--ink);
  font-size: 2.4rem;
}

.resume-intro p,
.resume-block p,
.resume-role li {
  color: var(--ink);
}

.resume-intro a,
.resume-block a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.resume-block {
  margin-top: 1.25rem;
}

.resume-block h2 {
  border-bottom: 1px solid var(--line-dark);
  margin-bottom: 0.75rem;
  padding-bottom: 0.28rem;
  color: var(--ink);
  font-size: 1.06rem;
  text-transform: uppercase;
}

.resume-role {
  margin-top: 1rem;
}

.resume-role.compact {
  margin-top: 0.65rem;
}

.resume-role-heading {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  justify-content: space-between;
}

.resume-role h3 {
  margin-bottom: 0.15rem;
  color: var(--ink);
  font-size: 1.03rem;
}

.resume-role-heading span {
  flex: 0 0 auto;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 750;
}

.resume-role p,
.resume-skill-list p {
  margin-bottom: 0.45rem;
}

.resume-role ul {
  margin: 0.4rem 0 0;
  padding-left: 1.25rem;
}

.resume-role li {
  margin-bottom: 0.32rem;
}

@media (max-width: 980px) {
  .hero {
    padding-top: 3.6rem;
  }

  .hero-grid,
  .section-heading.split,
  .stack-shell,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    gap: 2rem;
  }

  h1 {
    max-width: 12ch;
  }

  .work-grid,
  .capability-grid,
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-card-wide {
    grid-column: auto;
  }

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

@media (max-width: 720px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: calc(100% + 0.4rem);
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(17, 19, 18, 0.98);
    padding: 0.45rem;
    box-shadow: var(--shadow);
  }

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

  .nav-links a {
    padding: 0.8rem;
  }

  .brand-text {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero {
    padding: 2.8rem 0 3.4rem;
  }

  h1 {
    font-size: 2.75rem;
  }

  h2 {
    font-size: 2.2rem;
  }

  .work-grid,
  .capability-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

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

  .section {
    padding: 4rem 0;
  }

  .feature-card,
  .project-card {
    min-height: auto;
  }

  .resume-header {
    position: static;
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 0;
  }

  .resume-sheet {
    padding: 1.25rem;
  }

  .resume-role-heading {
    display: block;
  }
}

@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;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

@media print {
  @page {
    margin: 0.45in;
  }

  body.resume-page {
    background: #fff;
    color: #000;
    font-size: 10.4pt;
    line-height: 1.35;
  }

  .resume-header,
  .skip-link {
    display: none !important;
  }

  .resume-sheet {
    width: auto;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
  }

  .resume-intro h1 {
    font-size: 20pt;
  }

  .resume-block {
    break-inside: avoid;
    margin-top: 0.85rem;
  }

  .resume-block h2 {
    font-size: 10.4pt;
  }

  .resume-role {
    break-inside: avoid;
  }

  .resume-role li {
    margin-bottom: 0.2rem;
  }
}
