:root {
  --bone: #f5f1e8;
  --ink: #171717;
  --teal: #2f7f73;
  --shell: min(1120px, calc(100vw - 2rem));
  --bg: var(--bone);
  --text: var(--ink);
  --line: rgba(23, 23, 23, 0.14);
  --line-strong: rgba(23, 23, 23, 0.28);
  --muted: rgba(23, 23, 23, 0.72);
  --surface: rgba(245, 241, 232, 0.86);
  --surface-strong: rgba(245, 241, 232, 0.96);
  --nav-bg: rgba(245, 241, 232, 0.88);
  --shadow-soft: 0 18px 45px rgba(23, 23, 23, 0.07);
  --shadow-lift: 0 24px 60px rgba(23, 23, 23, 0.12);
}

body[data-theme="dark"] {
  --bg: #111313;
  --text: #f5f1e8;
  --line: rgba(245, 241, 232, 0.14);
  --line-strong: rgba(245, 241, 232, 0.26);
  --muted: rgba(245, 241, 232, 0.72);
  --surface: rgba(22, 24, 24, 0.88);
  --surface-strong: rgba(28, 30, 30, 0.98);
  --nav-bg: rgba(17, 19, 19, 0.88);
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.25);
  --shadow-lift: 0 24px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 240ms ease, color 240ms ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.32), transparent 88%);
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease,
    transform 180ms ease, box-shadow 180ms ease;
}

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

h1,
h2 {
  font-family: "Newsreader", serif;
  letter-spacing: -0.05em;
  line-height: 0.98;
}

h1 {
  max-width: 11ch;
  margin-bottom: 1.3rem;
  font-size: clamp(3.2rem, 8vw, 6.4rem);
}

h2 {
  max-width: 14ch;
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h3 {
  margin-bottom: 0.5rem;
  font-size: 1.16rem;
}

.shell {
  width: var(--shell);
  margin: 0 auto;
}

.ambient {
  position: fixed;
  width: 26rem;
  height: 26rem;
  border-radius: 999px;
  filter: blur(72px);
  opacity: 0.16;
  pointer-events: none;
  z-index: 0;
  animation: drift 16s ease-in-out infinite;
}

.ambient-left {
  top: -8rem;
  left: -8rem;
  background: var(--teal);
}

.ambient-right {
  right: -10rem;
  top: 18rem;
  background: var(--text);
  animation-delay: -8s;
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  position: sticky;
  top: 0;
  padding-top: 0.8rem;
  z-index: 10;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color 180ms ease, backdrop-filter 180ms ease, background-color 180ms ease;
}

.nav.is-scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  border-color: var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.65rem;
  height: 2.65rem;
  border: 1px solid var(--text);
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  transition: background-color 240ms ease, color 240ms ease, border-color 240ms ease;
}

.brand-name {
  font-size: 0.96rem;
  font-weight: 700;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--teal);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.8rem;
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  transform: translateY(-1px);
}

.theme-toggle-sun,
.theme-toggle-moon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.1rem;
}

body[data-theme="light"] .theme-toggle-sun,
body:not([data-theme="dark"]) .theme-toggle-sun {
  color: var(--teal);
}

body[data-theme="dark"] .theme-toggle-moon {
  color: var(--teal);
}

.section {
  padding: 4.8rem 0 0;
}

.hero {
  padding-top: 5.4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.75fr);
  gap: 2rem;
  align-items: start;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.74rem;
  font-weight: 800;
}

.hero-copy,
.project-summary,
.timeline-content p,
.note-copy,
.intro-text p,
.cert-card p {
  color: var(--muted);
  font-size: 1.02rem;
}

.hero-copy {
  max-width: 60ch;
}

.hero-actions,
.tag-row,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.hero-actions {
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-weight: 700;
  box-shadow: var(--shadow-soft);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.button-ink {
  background: var(--text);
  color: var(--bg);
}

.button-outline {
  background: transparent;
}

.hero-side {
  display: grid;
  gap: 1rem;
}

.note-card,
.facts-card,
.project-row,
.cap-card,
.timeline-row,
.cert-card,
.contact-panel {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: transform 220ms ease, box-shadow 220ms ease, background-color 240ms ease,
    border-color 240ms ease;
}

.note-card:hover,
.facts-card:hover,
.project-row:hover,
.cap-card:hover,
.timeline-row:hover,
.cert-card:hover,
.contact-panel:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.note-card,
.facts-card,
.cap-card,
.cert-card {
  padding: 1.25rem;
}

.note-label,
.fact-label,
.timeline-role {
  color: var(--teal);
}

.note-label,
.fact-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.palette {
  display: flex;
  gap: 0.65rem;
  margin: 0.8rem 0 1rem;
}

.swatch {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.swatch-bone {
  background: var(--bone);
}

.swatch-ink {
  background: var(--ink);
}

.swatch-teal {
  background: var(--teal);
}

body[data-theme="dark"] .swatch-bone {
  background: #d8d1c2;
}

.facts-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.fact strong {
  display: block;
  font-size: 1rem;
}

.intro-band {
  padding-top: 2rem;
}

.intro-grid,
.section-head {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.section-key {
  display: grid;
  gap: 0.35rem;
}

.section-key span {
  color: var(--teal);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
}

.section-key p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.intro-text {
  border-top: 1px solid var(--line-strong);
  padding-top: 1rem;
}

.project-stack,
.timeline {
  margin-top: 1.8rem;
}

.project-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 1rem;
  padding: 1.25rem;
}

.project-row + .project-row,
.timeline-row + .timeline-row {
  margin-top: 1rem;
}

.project-index {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--teal);
}

.project-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.project-header p {
  color: var(--muted);
  white-space: nowrap;
  font-size: 0.95rem;
}

.project-list,
.quality-list {
  margin: 1rem 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
}

.project-list li,
.quality-list li {
  margin-bottom: 0.65rem;
}

.tag-row {
  margin-top: 1.15rem;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 2.2rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  font-size: 0.9rem;
  font-weight: 700;
  transition: transform 180ms ease, background-color 240ms ease, border-color 240ms ease;
}

.tag-row span:hover {
  transform: translateY(-1px);
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.8rem;
}

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

.timeline-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 1rem;
  padding: 1.2rem 1.25rem;
}

.timeline-date span {
  display: inline-flex;
  padding: 0.42rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 700;
  color: var(--teal);
}

.timeline-role {
  margin-bottom: 0.55rem;
  font-weight: 700;
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.8rem;
}

.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 2rem;
  padding: 1.4rem;
  margin-bottom: 1rem;
}

.page-hero {
  padding-top: 5.4rem;
}

.page-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 2rem;
  align-items: start;
}

.page-kicker {
  margin: 0 0 0.8rem;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.74rem;
  font-weight: 800;
}

.page-intro {
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.04rem;
}

.blog-main {
  display: grid;
  gap: 1rem;
}

.blog-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.46fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.blog-card,
.blog-quote,
.blog-aside {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: transform 220ms ease, box-shadow 220ms ease, background-color 240ms ease,
    border-color 240ms ease;
}

.blog-card:hover,
.blog-quote:hover,
.blog-aside:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.blog-card,
.blog-quote,
.blog-aside {
  padding: 1.35rem;
}

.blog-card h3,
.blog-quote h3,
.blog-aside h3 {
  margin-bottom: 0.65rem;
}

.blog-card p,
.blog-quote p,
.blog-aside p {
  color: var(--muted);
}

.blog-list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
}

.blog-list li + li {
  margin-top: 0.65rem;
}

.blog-sidebar,
.blog-entry {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: transform 220ms ease, box-shadow 220ms ease, background-color 240ms ease,
    border-color 240ms ease;
}

.blog-sidebar:hover,
.blog-entry:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.blog-sidebar {
  position: sticky;
  top: 6.25rem;
  display: grid;
  gap: 1rem;
  padding: 1.35rem;
}

.blog-sidebar p {
  margin-bottom: 0;
  color: var(--muted);
}

.blog-toc {
  display: grid;
  gap: 0.7rem;
}

.blog-toc a {
  display: inline-flex;
  align-items: center;
  min-height: 2.8rem;
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  background: var(--surface-strong);
  font-weight: 700;
}

.blog-toc a:hover,
.blog-toc a:focus-visible {
  color: var(--bone);
  background: var(--teal);
  border-color: var(--teal);
}

.blog-entries {
  display: grid;
  gap: 1rem;
}

.blog-entry {
  padding: 1.35rem;
}

.blog-entry-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.9rem;
}

.blog-entry-head p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.95rem;
  white-space: nowrap;
}

.blog-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--teal);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.blog-entry-intro {
  color: var(--muted);
  font-size: 1.02rem;
}

.blog-entry-muted {
  border-style: dashed;
}

.blog-entry > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.8rem;
}

.process-step {
  display: grid;
  gap: 0.8rem;
}

.process-step span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 2rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--teal);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.blog-aside {
  display: grid;
  gap: 1rem;
}

.blog-meta {
  display: grid;
  gap: 0.9rem;
}

.blog-meta div {
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}

.blog-meta div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.blog-meta span {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.blog-quote p:last-child {
  margin-bottom: 0;
}

.nav-link-current {
  color: var(--teal);
  font-weight: 700;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  font-weight: 700;
  box-shadow: var(--shadow-soft);
}

.contact-link:hover,
.contact-link:focus-visible {
  color: var(--bone);
  background: var(--teal);
  border-color: var(--teal);
  transform: translateY(-2px);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 3.4rem 0 2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

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

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

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(0, 18px, 0) scale(1.04);
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .page-hero-grid,
  .blog-layout,
  .contact-panel,
  .cert-grid,
  .capability-grid,
  .cap-card-wide,
  .timeline-row,
  .process-grid {
    grid-template-columns: 1fr;
  }

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

  .facts-card {
    grid-template-columns: 1fr 1fr;
  }

  .project-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .nav,
  .site-footer {
    flex-direction: column;
    align-items: start;
  }

  .intro-grid,
  .section-head {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 4.5rem;
  }

  .page-hero {
    padding-top: 4.5rem;
  }

  .facts-card {
    grid-template-columns: 1fr;
  }

  .project-header {
    flex-direction: column;
  }

  .blog-entry-head {
    flex-direction: column;
    align-items: start;
  }

  .blog-entry-head p {
    white-space: normal;
  }

  .blog-sidebar {
    position: static;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
