:root {
  color-scheme: dark light;
  --bg: #0d100e;
  --panel: #151a16;
  --panel-hover: #1a211c;
  --text: #f0ede2;
  --muted: #b2b3aa;
  --accent: #7edbe2;
  --border: #2a312b;
  --content-width: 68rem;
  --page-padding: clamp(1.25rem, 4vw, 3rem);
  --section-gap: clamp(4rem, 7vw, 5.75rem);
  --page-glow-1: rgba(126, 219, 226, .075);
  --page-glow-2: rgba(126, 219, 226, .035);
  --logo-color: #7edbe2;
  --logo-highlight: #ffffff;
  --logo-fade-1: .04;
  --logo-fade-2: .16;
  --logo-fade-3: .52;
  --logo-fade-4: .78;
}

:root[data-theme="light"] {
  --bg: #ece9de;
  --panel: #e3dfd3;
  --panel-hover: #ddd8cb;
  --text: #1a1d1b;
  --muted: #5f645f;
  --accent: #147f88;
  --border: #c9c5b9;
  --page-glow-1: transparent;
  --page-glow-2: transparent;
  --logo-color: #147f88;
  --logo-highlight: #405b5b;
  --logo-fade-1: .24;
  --logo-fade-2: .40;
  --logo-fade-3: .72;
  --logo-fade-4: .92;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #ece9de;
    --panel: #e3dfd3;
    --panel-hover: #ddd8cb;
    --text: #1a1d1b;
    --muted: #5f645f;
    --accent: #147f88;
    --border: #c9c5b9;
    --page-glow-1: transparent;
    --page-glow-2: transparent;
    --logo-color: #147f88;
    --logo-highlight: #526b6b;
    --logo-fade-1: .18;
    --logo-fade-2: .34;
    --logo-fade-3: .68;
    --logo-fade-4: .90;
  }
}

@font-face {
  font-family: "Inter";
  src: url("/static/InterVariable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 70rem 22rem at 50% 8rem, var(--page-glow-1), transparent 72%),
    radial-gradient(ellipse 90rem 34rem at 56% 18rem, var(--page-glow-2), transparent 76%),
    var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.55;
  transition: background .2s ease, color .2s ease;
}

h1, h2, h3, p { margin-block-start: 0; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  padding: .6rem .8rem;
  background: var(--text);
  color: var(--bg);
}
.skip-link:focus { top: 1rem; }

.shell {
  width: min(var(--content-width), calc(100% - (2 * var(--page-padding))));
  margin-inline: auto;
}

.site-header { padding-top: clamp(1.2rem, 3vw, 2rem); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.brand, .footer-brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: -.015em;
}
.brand-mark { width: 2.12rem; height: auto; color: var(--logo-color); flex: 0 0 auto; overflow: visible; }
.brand-mark-footer { width: 1.88rem; }
.header-actions { display: flex; align-items: center; gap: 1rem; }
.site-nav { display: flex; gap: 1.2rem; color: var(--muted); font-size: .88rem; }
.site-nav a:hover, .footer-links a:hover { color: var(--text); }
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.theme-toggle:hover { color: var(--text); border-color: var(--accent); }
.theme-icon { width: 1rem; height: 1rem; }
.theme-icon-moon { display: none; }
:root[data-theme="light"] .theme-icon-sun { display: none; }
:root[data-theme="light"] .theme-icon-moon { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .theme-icon-sun { display: none; }
  :root:not([data-theme]) .theme-icon-moon { display: block; }
}

.hero {
  position: relative;
  overflow: hidden;
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding: clamp(4rem, 10vh, 6.25rem) 0 clamp(3rem, 7vh, 5rem);
}

h1 {
  margin-bottom: 1.7rem;
  font-size: clamp(3rem, 6vw, 5.1rem);
  line-height: .96;
  letter-spacing: -.035em;
  font-weight: 620;
  white-space: nowrap;
}
.lead {
  max-width: 45rem;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  line-height: 1.65;
}

.section { margin-top: var(--section-gap); scroll-margin-top: 2rem; }
.section-kicker {
  margin-bottom: .75rem;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.section-kicker span { color: var(--accent); margin-right: .55rem; }
.about-identity {
  display: flex;
  align-items: baseline;
  gap: .65rem;
  margin-bottom: .9rem;
  color: var(--muted);
  font-size: 1rem;
}
.about-identity strong { color: var(--text); font-weight: 600; }
.about-identity span { font-size: .95rem; }
h2 {
  margin-bottom: 1.35rem;
  font-size: clamp(2rem, 4.4vw, 3.15rem);
  line-height: 1.04;
  letter-spacing: -.045em;
  font-weight: 500;
  max-width: none;
  white-space: nowrap;
}
.copy {
  max-width: 75ch;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.76;
}
.copy p + p { margin-top: 1.05rem; }

.context-note {
  margin-top: 1rem;
  color: var(--muted);
  padding-left: .8rem;
  border-left: 2px solid var(--border);
  font-size: .86rem;
  line-height: 1.6;
  max-width: 75ch;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.service {
  padding: 1.25rem 1.35rem 1.35rem 0;
}
.service + .service {
  padding-left: 1.35rem;
  border-left: 1px solid var(--border);
}
.service h3, .work-item h3, .security-note h3 {
  margin-bottom: .55rem;
  font-size: 1.05rem;
  font-weight: 600;
}
.service p, .project p, .work-item p, .security-note p, .note { color: var(--muted); }
.service p, .project p, .work-item p, .security-note p { margin-bottom: 0; line-height: 1.62; }

.security-note {
  max-width: 75ch;
  margin-top: 1.65rem;
  padding-top: 0;
}
.security-note h3 {
  margin: 0 0 .55rem;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
}
.standards-note {
  margin-top: .7rem !important;
  font-size: .9rem;
}

.selected-work {
  width: 100%;
  border-top: 1px solid var(--border);
}
.selected-work p { max-width: 75ch; }

.work-item {
  padding: 1.15rem 0 1.2rem;
  border-bottom: 1px solid var(--border);
}

.work-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
}

.work-item h3 {
  margin-bottom: .35rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.work-tech {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: .82rem;
  white-space: nowrap;
}

.work-item p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.62;
}

.note { margin-top: 1.4rem; font-size: .9rem; }

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.project {
  display: block;
  padding: 1.3rem;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.project:hover { border-color: var(--accent); background: var(--panel-hover); transform: translateY(-2px); }
.project-name { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .45rem; font-weight: 620; }
.project-name span:last-child { color: var(--accent); }

footer { padding: var(--section-gap) 0 2rem; }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.footer-links { display: flex; flex-wrap: wrap; gap: .4rem; color: var(--muted); font-size: .9rem; }

@media (max-width: 900px) {
  h1, h2 { white-space: normal; }
  .service-grid { grid-template-columns: 1fr; }
  .service { padding: 1.1rem 0; }
  .service + .service { padding-left: 0; border-left: 0; border-top: 1px solid var(--border); }
}

@media (max-width: 680px) {
  .about-identity { align-items: flex-start; flex-direction: column; gap: .15rem; }
  .header-inner, .footer-inner { align-items: flex-start; flex-direction: column; }
  .header-actions { width: 100%; justify-content: space-between; }
  .site-nav { gap: .7rem 1rem; flex-wrap: wrap; }
  .project-grid { grid-template-columns: 1fr; }
  .work-heading { align-items: flex-start; flex-direction: column; gap: .15rem; }
  .work-tech { white-space: normal; }
  .hero-inner { padding-top: 3.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
