:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --surface: #111713;
  --surface-raised: #17211d;
  --text: #e8f2ed;
  --muted: #a7bab1;
  --accent: #36f9b0;
  --accent-soft: rgb(54 249 176 / 12%);
  --border: #29443a;
  --focus: #fff06a;
  --max: 74rem;
  --reading: 48rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 82% 6%, rgb(54 249 176 / 8%), transparent 26rem),
    var(--bg);
  color: var(--text);
  font: 1rem/1.7 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: .22em; }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2, h3 { margin-top: 0; line-height: 1.08; letter-spacing: -.035em; text-wrap: balance; }
h1 { font-size: clamp(3rem, 8vw, 6rem); }
h2 { font-size: clamp(2rem, 5vw, 3.5rem); }
h3 { font-size: clamp(1.3rem, 2.4vw, 1.8rem); }
p { max-width: 68ch; }
.container { width: min(calc(100% - 2rem), var(--max)); margin-inline: auto; }
.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; top: 1rem; left: 1rem; z-index: 100; padding: .65rem 1rem; background: var(--accent); color: #00140d; font-weight: 800; transform: translateY(-180%); }
.skip-link:focus { transform: none; }
.eyebrow, .project-type { color: var(--accent); font-size: .75rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }

.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid rgb(255 255 255 / 8%); background: rgb(10 10 10 / 90%); backdrop-filter: blur(14px); }
.nav-wrap { min-height: 4.75rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--text); font-weight: 800; text-decoration: none; }
.brand img { width: 2.8rem; height: 2.8rem; }
.site-nav { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2rem); }
.site-nav a { color: var(--muted); font-size: .9rem; font-weight: 700; text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent); }
.menu-button { display: none; padding: .45rem .7rem; border: 1px solid var(--border); border-radius: .25rem; background: transparent; color: var(--text); font: inherit; }

.hero { min-height: calc(100svh - 4.75rem); display: flex; align-items: center; padding: clamp(4rem, 10vw, 8rem) 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(16rem, .6fr); align-items: center; gap: clamp(3rem, 8vw, 7rem); }
.hero h1 { margin: .8rem 0 1.5rem; }
.hero h1 span { color: var(--accent); }
.hero-copy > p:not(.eyebrow) { color: var(--muted); font-size: clamp(1.1rem, 2vw, 1.35rem); }
.hero-logo { width: min(100%, 29rem); filter: drop-shadow(0 1.5rem 4rem rgb(54 249 176 / 20%)); }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.button { display: inline-flex; min-height: 3rem; align-items: center; justify-content: center; padding: .65rem 1rem; border: 1px solid var(--accent); border-radius: .35rem; background: var(--accent); color: #00140d; font-weight: 800; text-decoration: none; }
.button:hover { border-color: #fff; background: #fff; color: #00140d; }
.button.secondary { background: transparent; color: var(--accent); }

.section { padding: clamp(5rem, 10vw, 8rem) 0; border-top: 1px solid rgb(255 255 255 / 6%); }
.section-alt { background: rgb(255 255 255 / 2%); }
.split-heading { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 8vw, 7rem); }
.section-copy { color: var(--muted); font-size: 1.08rem; }
.tag-list { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; list-style: none; }
.tag-list li { padding: .28rem .7rem; border: 1px solid var(--border); border-radius: 999px; color: var(--text); font-size: .8rem; }
.section-heading { margin-bottom: 2.5rem; }
.section-heading h2 { margin-bottom: .75rem; }
.section-heading > p:last-child { color: var(--muted); font-size: 1.1rem; }

.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.project-card { position: relative; display: flex; min-height: 31rem; flex-direction: column; padding: clamp(1.4rem, 4vw, 2rem); overflow: hidden; border: 1px solid var(--border); border-radius: .6rem; background: linear-gradient(145deg, var(--surface-raised), var(--surface)); transition: border-color .2s, transform .2s; }
.project-card:hover { border-color: var(--accent); transform: translateY(-.25rem); }
.project-card.featured { background: linear-gradient(145deg, rgb(54 249 176 / 14%), var(--surface)); }
.project-number { position: absolute; top: 1rem; right: 1.25rem; color: rgb(232 242 237 / 14%); font-size: 3.5rem; font-weight: 900; line-height: 1; }
.project-card h3 { max-width: 16ch; margin: .8rem 0 1rem; }
.project-card > p:not(.project-type) { color: var(--muted); }
.feature-list { margin: .6rem 0 2rem; padding-left: 1.2rem; color: var(--muted); font-size: .9rem; }
.feature-list li::marker { color: var(--accent); }
.card-links { display: flex; flex-wrap: wrap; gap: .7rem 1.2rem; margin-top: auto; padding-top: 1.2rem; border-top: 1px solid var(--border); }
.card-links a { font-size: .85rem; font-weight: 800; }
.all-projects { margin: 2rem 0 0; text-align: right; }

.notes-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.note-card { padding: 1.5rem; border-left: 2px solid var(--border); }
.note-card:hover { border-color: var(--accent); }
.note-card h3 { font-size: 1.3rem; }
.note-card h3 a { color: var(--text); text-decoration: none; }
.note-card h3 a:hover { color: var(--accent); }
.note-card > p:not(.project-type) { color: var(--muted); }
.note-card time { color: var(--muted); font-size: .8rem; }
.text-link { font-weight: 800; }

.contact-inner { display: flex; align-items: end; justify-content: space-between; gap: 2rem; }
.contact-inner h2 { margin-bottom: .7rem; }
.contact-inner p { color: var(--muted); }
.contact-email { flex: none; font-size: clamp(1rem, 2.3vw, 1.4rem); font-weight: 800; }
.site-footer { padding: 2rem 0; border-top: 1px solid var(--border); color: var(--muted); }
.footer-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.footer-brand { display: flex; align-items: center; gap: .7rem; }
.footer-brand img { width: 2.6rem; height: 2.6rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.site-footer a { color: var(--muted); font-size: .85rem; }

.archive-header, .post-header, .not-found { width: min(calc(100% - 2rem), var(--max)); margin: auto; padding: clamp(5rem, 10vw, 8rem) 0; }
.archive-header h1, .post-header h1, .not-found h1 { margin: .8rem 0 1rem; }
.archive-header > p:last-child, .post-intro, .not-found > p { color: var(--muted); font-size: 1.2rem; }
.archive-list { width: min(calc(100% - 2rem), var(--max)); margin: auto; padding-bottom: 7rem; }
.archive-list article { display: grid; grid-template-columns: 1.5fr .5fr; gap: 2rem; padding: 2.5rem 0; border-top: 1px solid var(--border); }
.archive-list h2 { margin: .5rem 0 1rem; font-size: clamp(1.8rem, 4vw, 3rem); }
.archive-list h2 a { color: var(--text); text-decoration: none; }
.archive-list h2 a:hover { color: var(--accent); }
.archive-list article > div > p:last-child { color: var(--muted); }
.archive-meta { display: grid; align-content: end; gap: .7rem; color: var(--muted); font-size: .8rem; }
.post { width: min(calc(100% - 2rem), var(--max)); margin: auto; }
.post-header { width: 100%; border-bottom: 1px solid var(--border); }
.post-header h1 { max-width: 14ch; font-size: clamp(2.8rem, 7vw, 5.5rem); }
.back-link { display: inline-block; margin-bottom: 3rem; font-weight: 700; }
.post-meta { display: flex; gap: 2rem; margin-top: 1.5rem; color: var(--muted); font-size: .8rem; }
.post-body { width: min(100%, var(--reading)); margin: auto; padding: 4rem 0 7rem; font-size: 1.08rem; }
.post-body h2 { margin: 3rem 0 1rem; font-size: clamp(1.8rem, 4vw, 2.8rem); }
.post-body blockquote { margin: 2.5rem 0; padding: .5rem 0 .5rem 1.5rem; border-left: .25rem solid var(--accent); color: var(--muted); font-size: 1.2rem; }
.post-cta { padding: 4rem max(1rem, calc((100% - var(--max)) / 2)); border-top: 1px solid var(--border); background: var(--surface); }
.post-cta p:not(.eyebrow) { color: var(--muted); }
.not-found { min-height: 65vh; }

@media (max-width: 46rem) {
  .menu-button { display: block; }
  .site-nav { position: absolute; top: 100%; right: 1rem; left: 1rem; display: none; padding: 1rem; flex-direction: column; align-items: stretch; border: 1px solid var(--border); border-radius: .4rem; background: var(--surface-raised); box-shadow: 0 1rem 3rem rgb(0 0 0 / 40%); }
  .site-nav.is-open { display: flex; }
  .hero-grid, .split-heading { grid-template-columns: 1fr; }
  .hero-logo { order: -1; width: 12rem; }
  .hero { min-height: auto; }
  .project-grid, .notes-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 27rem; }
  .contact-inner { align-items: flex-start; flex-direction: column; }
  .archive-list article { grid-template-columns: 1fr; }
}

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