@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/geist-latin-400.woff2") format("woff2");
}

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/geist-latin-500.woff2") format("woff2");
}

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/geist-latin-600.woff2") format("woff2");
}

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/geist-latin-700.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --bg: #07080b;
  --bg-elev: #10131a;
  --ink: #f4efe6;
  --muted: #9aa3b2;
  --line: rgba(244, 239, 230, 0.1);
  --accent: #7ee0c8;
  --accent-strong: #4fd1b5;
  --copper: #e2b07a;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --font: Geist, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: Geist, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1120px;
  --header-h: 68px;
  --dock-h: 76px;
  --pad: clamp(16px, 4vw, 28px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  background:
    radial-gradient(circle at 88% -10%, rgba(126, 224, 200, 0.16), transparent 28rem),
    radial-gradient(circle at 8% 12%, rgba(226, 176, 122, 0.1), transparent 22rem),
    var(--bg);
  overflow-x: hidden;
}

body.is-nav-open {
  overflow: hidden;
}

body.page-legal {
  padding-bottom: env(safe-area-inset-bottom);
}

a {
  color: inherit;
}

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

button,
input,
textarea {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 40;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
}

.skip-link:focus {
  top: 16px;
}

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

.wrap {
  width: min(var(--max), calc(100% - (var(--pad) * 2)));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(22px) saturate(140%);
  background: rgba(7, 8, 11, 0.72);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.brand-mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(244, 239, 230, 0.18);
  border-radius: 11px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-text {
  display: grid;
  min-width: 0;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.brand-text small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(244, 239, 230, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle .bar,
.nav-toggle .bar::before,
.nav-toggle .bar::after {
  display: block;
  width: 16px;
  height: 1.5px;
  margin: 0 auto;
  background: currentColor;
  border-radius: 99px;
  content: "";
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle .bar {
  position: relative;
}

.nav-toggle .bar::before,
.nav-toggle .bar::after {
  position: absolute;
  left: 0;
}

.nav-toggle .bar::before {
  top: -5px;
}

.nav-toggle .bar::after {
  top: 5px;
}

.nav-toggle[aria-expanded="true"] .bar {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .bar::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .bar::after {
  top: 0;
  transform: rotate(-45deg);
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav .btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.nav .btn-primary {
  color: #111318;
}

.nav a {
  text-decoration: none;
  color: rgba(244, 239, 230, 0.78);
  font-size: 0.92rem;
  font-weight: 500;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--ink);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.btn:active {
  transform: scale(0.98);
}

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

.btn-primary:hover {
  background: #fff;
}

.btn-ghost {
  border-color: rgba(244, 239, 230, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: rgba(244, 239, 230, 0.36);
  background: rgba(255, 255, 255, 0.08);
}

.btn-light {
  width: 100%;
  border-color: var(--line);
  background: transparent;
  color: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 300px);
  grid-template-areas:
    "eyebrow photo"
    "copy photo";
  column-gap: clamp(24px, 5vw, 56px);
  row-gap: 8px;
  align-items: start;
  margin: 36px auto 0;
}

.hero-copy {
  grid-area: copy;
  min-width: 0;
}

.eyebrow {
  grid-area: eyebrow;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  align-self: end;
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 16ch;
  margin-bottom: 16px;
  font-family: var(--display);
  font-size: clamp(2rem, 5.6vw, 3.4rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.subtitle {
  max-width: 38rem;
  margin-bottom: 12px;
  color: rgba(244, 239, 230, 0.74);
  font-size: clamp(1rem, 2.2vw, 1.18rem);
}

.hero-byline {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-cta .btn {
  flex: 0 0 auto;
  min-width: 168px;
}

.proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.proof li {
  margin: 0;
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
}

.proof strong {
  display: block;
  color: var(--ink);
  font-size: 0.95rem;
}

.profile-card {
  grid-area: photo;
  width: 100%;
}

.profile-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 22%;
  border-radius: 28px;
  border: 1px solid rgba(244, 239, 230, 0.14);
  box-shadow: var(--shadow);
}

.section {
  padding: clamp(48px, 8vw, 88px) 0 0;
}

.section-kicker,
.section-title {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section > h2 {
  max-width: 22ch;
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 4.2vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.lead {
  max-width: 62ch;
  margin-bottom: 24px;
  color: rgba(244, 239, 230, 0.78);
  font-size: 1.05rem;
}

.muted {
  color: var(--muted);
}

.muted a {
  color: var(--accent);
  text-decoration: none;
}

.muted a:hover {
  text-decoration: underline;
}

.grid-3,
.grid-2,
.stats,
.project-list {
  display: grid;
  gap: 14px;
}

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

.grid-2 {
  grid-template-columns: 1.1fr 0.9fr;
}

.panel,
.project,
.legal-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(16, 19, 26, 0.72);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

@media (hover: hover) {
  .panel:not(.form):hover,
  .project:hover {
    border-color: rgba(126, 224, 200, 0.28);
    background: rgba(16, 19, 26, 0.94);
    transform: translateY(-2px);
  }
}

.panel h3,
.project h3 {
  margin-bottom: 8px;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
}

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

.stat strong {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.8rem, 5vw, 2.3rem);
  font-weight: 600;
  letter-spacing: -0.04em;
}

.panel-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--copper);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.tech-details {
  margin-top: 14px;
}

.tech-details p,
.tech-sheet p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.tech-sheet {
  margin-top: 8px;
}

.tech-details summary,
.tech-sheet summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  margin: 0 -4px;
  padding: 8px 4px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  list-style: none;
}

.tech-sheet summary {
  display: inline-flex;
  width: auto;
  margin: 0;
  gap: 8px;
}

.tech-details summary::-webkit-details-marker,
.tech-sheet summary::-webkit-details-marker {
  display: none;
}

.tech-details summary::after,
.tech-sheet summary::after {
  content: "+";
  color: var(--copper);
  font-weight: 700;
}

.tech-details summary::after {
  margin-left: auto;
}

.tech-details[open] summary::after,
.tech-sheet[open] summary::after {
  content: "\2212";
}

.tech-details summary:focus-visible,
.tech-sheet summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 8px;
}

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

.stack-groups h3 {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.skill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0;
}

.skill-cloud + .skill-cloud {
  margin-top: 10px;
}

.skill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: #d7dce6;
  font-size: 0.82rem;
  font-weight: 500;
}

@media (hover: hover) {
  .skill:hover {
    border-color: rgba(126, 224, 200, 0.3);
    color: var(--ink);
  }
}

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

.project-time {
  color: var(--copper);
  font-size: 0.82rem;
  font-weight: 600;
}

.project .client {
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 500;
}

.outcome {
  margin-bottom: 0;
  color: rgba(244, 239, 230, 0.8);
}

ul {
  margin: 0;
  padding-left: 1.1rem;
}

li + li {
  margin-top: 6px;
}

.tech {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: #c5cbd6;
  font-size: 0.88rem;
}

.more-toggle {
  margin-top: 4px;
}

.project-list[data-more-projects] {
  margin-top: 14px;
}

.rate-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 4px 0 18px;
}

.rate-line strong {
  font-size: clamp(2.4rem, 6vw, 3.2rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1;
}

.rate-line span {
  color: var(--muted);
  font-size: 1rem;
}

.conditions {
  display: grid;
  gap: 12px;
  padding: 0;
}

.conditions li {
  list-style: none;
  padding-left: 0;
}

.form {
  display: grid;
  gap: 14px;
}

.form label {
  display: grid;
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 600;
}

.form input,
.form textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-size: 16px;
}

.form textarea {
  min-height: 140px;
  resize: vertical;
}

.form-status {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
}

.form-status[data-kind="ok"] {
  color: var(--accent);
}

.form-status[data-kind="err"] {
  color: #f0a8a0;
}

.form-status[data-kind="pending"] {
  color: var(--muted);
}

.form .btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.form input:focus,
.form textarea:focus,
.btn:focus-visible,
.nav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.contact-meta {
  display: grid;
  align-content: start;
  gap: 14px;
}

.contact-meta h3 {
  margin-bottom: 4px;
}

.contact-line {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  word-break: break-word;
}

.contact-line small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-line:hover {
  border-color: rgba(126, 224, 200, 0.32);
  color: var(--accent);
}

.contact-meta a:not(.contact-line) {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  word-break: break-word;
}

.site-footer {
  margin-top: 72px;
  padding: 24px 0 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
}

.footer-inner,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-inner {
  justify-content: space-between;
}

.footer-links a {
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.legal-page {
  padding: 40px 0 80px;
}

.legal-card h1 {
  font-family: var(--display);
  font-size: clamp(2.2rem, 8vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.04em;
}

.legal-card h3 {
  margin: 24px 0 8px;
}

.legal-card a {
  color: var(--accent);
}

.mobile-dock {
  display: none;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 220px);
  }

  .project,
  .grid-3,
  .grid-2,
  .stack-groups,
  .stats,
  .proof {
    grid-template-columns: 1fr;
  }

  .hero-cta .btn {
    flex: 1 1 160px;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-inline {
    display: flex;
    position: static;
    inset: auto;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 0;
    background: none;
    overflow: visible;
  }

  .nav-inline a {
    min-height: 40px;
    padding: 0;
    border-bottom: 0;
    font-size: 0.88rem;
  }

  .nav-inline .btn {
    margin-top: 0;
    width: auto;
    min-height: 40px;
    padding: 0 12px;
  }

  .nav:not(.nav-inline) {
    position: fixed;
    inset: calc(var(--header-h) + env(safe-area-inset-top)) 0 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 18px var(--pad) calc(28px + env(safe-area-inset-bottom));
    background: rgba(7, 8, 11, 0.96);
    overflow: auto;
  }

  .nav:not(.nav-inline).is-open {
    display: flex;
  }

  .nav:not(.nav-inline) a {
    min-height: 52px;
    display: flex;
    align-items: center;
    padding: 0 4px;
    border-bottom: 1px solid var(--line);
    font-size: 1.2rem;
  }

  .nav:not(.nav-inline) .btn {
    margin-top: 16px;
    width: 100%;
  }
}

@media (max-width: 760px) {
  body:not(.page-legal) {
    padding-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom));
  }

  .brand-text small {
    display: none;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) 84px;
    grid-template-areas:
      "eyebrow photo"
      "copy copy";
    align-items: center;
    column-gap: 14px;
    margin-top: 20px;
  }

  .eyebrow {
    margin-bottom: 0;
  }

  .profile-card {
    width: 84px;
    justify-self: end;
  }

  .profile-card img {
    aspect-ratio: 1;
    border-radius: 22px;
    object-position: center 18%;
    box-shadow: none;
  }

  .hero-cta {
    display: none;
  }

  h1 {
    max-width: none;
    margin-top: 12px;
  }

  .panel,
  .project,
  .legal-card {
    padding: 18px;
  }

  .mobile-dock {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 18;
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: 10px;
    padding: 10px var(--pad) calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(7, 8, 11, 0.88);
    backdrop-filter: blur(20px) saturate(140%);
  }

  .page-legal .mobile-dock {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}
