/* =========================================================
   Wisdom Malata — Portfolio
   Design system: warm paper, ink, aqua accent, editorial type
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --paper: #f3f0e8;
  --paper-2: #ebe7dc;
  --paper-3: #e3ded1;
  --card: #fbf9f3;
  --ink: #111411;
  --ink-2: #252a25;
  --muted: #62695f;
  --faint: #5f665c;
  --line: #d6d1c3;
  --line-strong: #bcb6a5;
  --aqua: #0b6b58;
  --aqua-hover: #085343;
  --aqua-soft: #dbe9e2;
  --aqua-bright: #64e2c2;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --container: 1260px;
  --gutter: clamp(20px, 4.2vw, 56px);
  --nav-h: 76px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --shadow-soft: 0 24px 60px -32px rgba(17, 20, 17, 0.32);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { display: block; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
::selection { background: var(--aqua); color: var(--paper); }
:focus-visible { outline: 2px solid var(--aqua); outline-offset: 3px; }
h1, h2, h3, h4 { font-weight: 400; text-wrap: balance; }
p { text-wrap: pretty; }

/* ---------- Utilities ---------- */
.wrap {
  width: min(var(--container), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}
.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  display: inline-block;
  vertical-align: -0.12em;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 300;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  font-size: 13px;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}
.skip-link:focus { transform: none; }
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--aqua);
  flex: none;
  box-shadow: 0 0 0 4px rgba(11, 107, 88, 0.12);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: background 0.25s var(--ease), color 0.25s var(--ease),
    border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn .icon { width: 15px; height: 15px; transition: transform 0.3s var(--ease); }
.btn:hover .icon { transform: translate(2px, -2px); }
.btn-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-primary:hover { background: var(--aqua); border-color: var(--aqua); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-nav { min-height: 38px; padding: 0 15px; font-size: 12px; gap: 8px; }
.btn-nav .icon { width: 13px; height: 13px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 0.35s var(--ease), backdrop-filter 0.35s var(--ease);
}
.site-header::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: var(--line);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(243, 240, 232, 0.87);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  backdrop-filter: blur(14px) saturate(1.1);
}
.site-header.is-scrolled::after { opacity: 1; }
body.nav-open .site-header {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
body.nav-open .site-header::after { opacity: 0; }

.nav {
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; flex: none; }
.brand-mark {
  position: relative;
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 23px;
  line-height: 1;
  padding-top: 2px;
  border: 1px solid var(--ink);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.brand-mark::after {
  content: "";
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 7px;
  height: 7px;
  background: var(--aqua);
  border: 1px solid var(--paper);
}
.brand:hover .brand-mark { background: var(--aqua); border-color: var(--aqua); }
.brand-text { display: flex; flex-direction: column; gap: 2px; }
.brand-name {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.05;
}
.brand-sub {
  font-family: var(--mono);
  font-size: 8.5px;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  position: relative;
  display: inline-block;
  padding: 6px 0;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.2s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--aqua);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after,
.nav-links a.is-active::after { transform: scaleX(1); }
.nav-links a.is-active { color: var(--aqua); }
.nav-right { display: flex; align-items: center; gap: 18px; }
.availability {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.availability .dot { width: 5px; height: 5px; }
.nav-toggle {
  display: none;
  position: relative;
  z-index: 120;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: background 0.25s, border-color 0.25s;
}
.nav-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
body.nav-open .nav-toggle span:first-child { transform: translateY(3.25px) rotate(45deg); }
body.nav-open .nav-toggle span:last-child { transform: translateY(-3.25px) rotate(-45deg); }
body.nav-open .nav-toggle { background: var(--ink); border-color: var(--ink); }
body.nav-open .nav-toggle span { background: var(--paper); }

/* ---------- Scroll progress & back to top ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  z-index: 200;
  background: var(--aqua);
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), background 0.25s;
}
.back-to-top .icon { width: 16px; height: 16px; transform: rotate(-45deg); }
.back-to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.back-to-top:hover { background: var(--aqua); }
body.lightbox-open { overflow: hidden; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: calc(var(--nav-h) + clamp(48px, 7vw, 92px));
  padding-bottom: clamp(56px, 7vw, 92px);
  overflow: hidden;
}
.hero-grid-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(17, 20, 17, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 20, 17, 0.055) 1px, transparent 1px);
  background-size: 92px 92px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 72%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 72%);
}
.hero::before {
  content: "";
  position: absolute;
  top: -180px;
  right: -120px;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(11, 107, 88, 0.11), transparent 66%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(320px, 0.86fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}
.hero-copy { position: relative; }
.eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow-rule { width: 26px; height: 1px; background: var(--aqua); }
.eyebrow .times { color: var(--aqua); font-size: 11px; }
.eyebrow-loc {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: 8px;
  padding-left: 18px;
  position: relative;
}
.eyebrow-loc::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 12px;
  transform: translateY(-50%);
  background: var(--line-strong);
}
.hero h1 {
  margin-top: 26px;
  font-family: var(--serif);
  font-size: clamp(3.1rem, 6.85vw, 6.55rem);
  line-height: 0.94;
  letter-spacing: -0.035em;
  max-width: 13ch;
}
.hero h1 em {
  font-style: italic;
  color: var(--aqua);
}
.hero-lede {
  max-width: 51ch;
  margin-top: 30px;
  font-size: clamp(15.5px, 1.35vw, 17.5px);
  line-height: 1.68;
  color: var(--ink-2);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}
.hero-facts {
  display: flex;
  align-items: stretch;
  margin-top: clamp(44px, 5.5vw, 64px);
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.fact {
  flex: 1;
  padding-left: 22px;
  border-left: 1px solid var(--line);
}
.fact:first-child { padding-left: 0; border-left: 0; }
.fact-label {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
}
.fact-num {
  font-family: var(--serif);
  font-size: clamp(26px, 2.7vw, 34px);
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.fact-num > span { color: var(--aqua); }
.fact-num small {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin-left: 3px;
}
.hero-portrait {
  position: relative;
  width: 100%;
  max-width: 430px;
  margin-left: auto;
  padding: 0 0 20px;
}
.portrait-offset {
  position: absolute;
  top: 16px;
  left: 16px;
  right: -16px;
  bottom: 4px;
  border: 1px solid var(--line-strong);
  z-index: 0;
}
.portrait-frame {
  position: relative;
  z-index: 1;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--paper-3);
  border: 1px solid var(--line-strong);
}
.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 38%;
  filter: saturate(0.92) contrast(1.03);
  transition: transform 1.4s var(--ease);
}
.hero-portrait:hover .portrait-frame img { transform: scale(1.025); }
.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(9, 12, 9, 0.76) 0%, rgba(9, 12, 9, 0.1) 38%, transparent 58%);
  pointer-events: none;
}
.portrait-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px;
  color: var(--paper);
}
.caption-name {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.caption-meta {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(243, 240, 232, 0.72);
}
.hero-cert {
  position: absolute;
  z-index: 3;
  left: -34px;
  top: 24px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 15px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-soft);
}
.hero-cert-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--aqua-bright);
  flex: none;
}
.hero-cert-icon .icon { width: 16px; height: 16px; }
.hero-cert-title {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.2;
}
.hero-cert-sub {
  display: block;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 3px;
}

/* Hero entrance */
@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}
.hero-eyebrow { animation: rise 0.9s var(--ease) 0.05s both; }
.hero h1 { animation: rise 0.9s var(--ease) 0.12s both; }
.hero-lede { animation: rise 0.9s var(--ease) 0.2s both; }
.hero-actions { animation: rise 0.9s var(--ease) 0.28s both; }
.hero-facts { animation: rise 0.9s var(--ease) 0.36s both; }
.hero-portrait { animation: rise 1.1s var(--ease) 0.3s both; }

/* ---------- Credential strip ---------- */
.cred-strip {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.cred-inner { display: grid; grid-template-columns: repeat(4, 1fr); }
.cred-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 20px 26px;
  border-left: 1px solid var(--line);
}
.cred-item:first-child { padding-left: 0; border-left: 0; }
.cred-item:last-child { padding-right: 0; }
.cred-mark {
  width: 27px;
  height: 27px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 14px;
  color: var(--aqua);
  background: var(--paper);
}
.cred-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cred-label {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.45;
  color: var(--ink-2);
}
.cred-sub { font-size: 11px; color: var(--muted); line-height: 1.4; }

/* ---------- Sections ---------- */
.section {
  position: relative;
  padding: clamp(76px, 9vw, 124px) 0;
}
.section--line { border-top: 1px solid var(--line); }
.section--tint {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-head {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: end;
  margin-bottom: clamp(44px, 5.5vw, 70px);
}
.section-index {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-index::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--aqua);
}
.section-index span { color: var(--aqua); }
.section-title {
  margin-top: 20px;
  font-family: var(--serif);
  font-size: clamp(2.45rem, 4.5vw, 4.1rem);
  line-height: 1.01;
  letter-spacing: -0.025em;
  max-width: 16ch;
}
.section-intro {
  max-width: 48ch;
  padding-bottom: 5px;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--muted);
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(40px, 7vw, 96px);
  align-items: start;
}
.about-lead {
  font-family: var(--serif);
  font-size: clamp(1.65rem, 2.55vw, 2.3rem);
  line-height: 1.16;
  letter-spacing: -0.015em;
  max-width: 22ch;
  margin-bottom: 26px;
}
.about-copy > p:not(.about-lead):not(.about-signature) {
  max-width: 55ch;
  margin-bottom: 16px;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--muted);
}
.about-copy strong { font-weight: 500; color: var(--ink-2); }
.about-signature {
  margin-top: 24px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 24px;
  color: var(--aqua);
}
.principles { border-top: 1px solid var(--line-strong); }
.principle {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 16px;
  padding: 23px 0 22px;
  border-bottom: 1px solid var(--line);
}
.principle-num {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--aqua);
  padding-top: 6px;
  letter-spacing: 0.06em;
}
.principle h3 {
  font-family: var(--serif);
  font-size: 23px;
  line-height: 1.1;
  margin-bottom: 7px;
}
.principle p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 39ch;
}

/* ---------- Services ---------- */
.services {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.service {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 268px;
  padding: 30px 34px 28px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}
.service-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.service-num {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--faint);
  padding-top: 4px;
  transition: color 0.35s var(--ease);
}
.service-icon {
  color: var(--aqua);
  transition: color 0.35s var(--ease);
}
.service-icon .icon { width: 27px; height: 27px; }
.service h3 {
  margin-top: auto;
  padding-top: 46px;
  font-family: var(--serif);
  font-size: 27px;
  line-height: 1.04;
  letter-spacing: -0.012em;
  max-width: 15ch;
}
.service > p {
  max-width: 43ch;
  margin-top: 11px;
  font-size: 13px;
  line-height: 1.68;
  color: var(--muted);
  transition: color 0.35s var(--ease);
}
.service:not(.service--feature):hover {
  background: var(--ink);
  color: var(--paper);
}
.service:not(.service--feature):hover .service-num { color: #8a9388; }
.service:not(.service--feature):hover .service-icon { color: var(--aqua-bright); }
.service:not(.service--feature):hover > p { color: #b9c1b7; }

.service--feature {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 36px;
  min-height: 0;
  padding: 38px 40px 34px;
  background: var(--ink);
  color: var(--paper);
}
.service--feature .service-num { color: #8a9388; }
.service--feature .service-icon { color: var(--aqua-bright); }
.service--feature h3 {
  margin-top: 32px;
  padding-top: 0;
  font-size: clamp(2rem, 3.4vw, 3rem);
  max-width: none;
}
.service--feature > .service-feature-main > p {
  max-width: 58ch;
  margin-top: 12px;
  font-size: 13.5px;
  line-height: 1.7;
  color: #b9c1b7;
}
.service-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 20px; }
.service-tags li {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 5px 9px;
  border: 1px solid rgba(243, 240, 232, 0.24);
  color: #dce1d9;
}
.service-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(243, 240, 232, 0.4);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: color 0.25s, border-color 0.25s;
}
.service-link .icon { width: 14px; height: 14px; }
.service-link:hover { color: var(--aqua-bright); border-color: var(--aqua-bright); }
.services-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  font-size: 13px;
  color: var(--muted);
}
.services-foot a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  border-bottom: 1px solid var(--aqua);
  padding-bottom: 2px;
  transition: color 0.2s;
}
.services-foot a:hover { color: var(--aqua); }
.services-foot .icon { width: 14px; height: 14px; }

/* ---------- Toolkit ---------- */
.stack {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.stack-col {
  padding: 28px 34px 8px;
  border-right: 1px solid var(--line);
}
.stack-col:first-child { padding-left: 0; }
.stack-col:last-child { border-right: 0; padding-right: 0; }
.stack-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
}
.stack-head h3 {
  font-family: var(--serif);
  font-size: 27px;
  line-height: 1;
  letter-spacing: -0.01em;
}
.stack-count {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--muted);
  flex: none;
}
.skill {
  display: grid;
  grid-template-columns: 1fr auto;
  row-gap: 9px;
  padding: 13px 0 11px;
  border-bottom: 1px solid var(--line);
}
.skill-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  line-height: 1.2;
}
.skill-pct {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  line-height: 1.2;
}
.skill-bar {
  position: relative;
  grid-column: 1 / -1;
  height: 2px;
  background: rgba(17, 20, 17, 0.09);
  overflow: hidden;
}
.skill-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w);
  background: var(--aqua);
  transform: scaleX(1);
  transform-origin: left;
  transition: transform 1.15s var(--ease);
  transition-delay: calc(var(--i) * 55ms);
}
.js .skill-bar i { transform: scaleX(0); }
.js .stack-col.is-visible .skill-bar i { transform: scaleX(1); }
.stack-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 22px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.02em;
  color: var(--faint);
}
.stack-note .icon { width: 12px; height: 12px; color: var(--aqua); }

/* ---------- Credentials ---------- */
.credentials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.cred-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 330px;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}
.cred-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft);
}
.cred-card--feature {
  grid-column: span 2;
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  padding: 30px;
}
.cred-card--feature:hover { border-color: var(--ink); }
.cred-feature-top {
  display: flex;
  align-items: center;
  gap: 20px;
}
.cred-feature-top h3 {
  margin-top: 7px;
  font-family: var(--serif);
  font-size: clamp(2rem, 3vw, 2.7rem);
  line-height: 1;
}
.cred-top {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 21px;
}
.cred-badge {
  width: 54px;
  height: 54px;
  flex: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
}
.cred-badge img { width: 100%; height: 100%; object-fit: cover; }
.cred-badge--lg { width: 88px; height: 88px; border-color: rgba(243, 240, 232, 0.2); }
.cred-badge--mark {
  background: var(--ink);
  color: var(--aqua-bright);
  border-color: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.25;
  text-align: center;
}
.cred-issuer {
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}
.cred-card--feature .cred-issuer { color: #9ba497; }
.cred-card h3 {
  font-family: var(--serif);
  font-size: 25px;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin-top: 0;
}
.cred-desc {
  margin-top: 10px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
}
.cred-card--feature .cred-desc {
  margin-top: 22px;
  max-width: 64ch;
  font-size: 13px;
  line-height: 1.75;
  color: #b9c1b7;
}
.cred-meta {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 8.5px;
  line-height: 1.55;
  color: var(--faint);
}
.cred-card--feature .cred-meta {
  border-color: rgba(243, 240, 232, 0.16);
  color: #8f988c;
  margin-top: 24px;
}
.cred-meta span {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.cred-meta .icon { width: 11px; height: 11px; margin-top: 1px; color: var(--aqua); }
.cred-card--feature .cred-meta .icon { color: var(--aqua-bright); }
.cred-id { overflow-wrap: anywhere; }
.cred-btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 16px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line-strong);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.015em;
  color: var(--ink-2);
  transition: color 0.2s, border-color 0.2s;
}
.cred-btn .icon { width: 12px; height: 12px; }
.cred-btn:hover { color: var(--aqua); border-color: var(--aqua); }
.cred-card--feature .cred-btn { color: var(--paper); border-color: rgba(243, 240, 232, 0.4); }
.cred-card--feature .cred-btn:hover { color: var(--aqua-bright); border-color: var(--aqua-bright); }

/* ---------- Work ---------- */
.projects { border-top: 1px solid var(--line); }
.project {
  display: grid;
  grid-template-columns: 1.22fr 0.78fr;
  gap: clamp(30px, 5vw, 72px);
  align-items: center;
  padding: clamp(38px, 5vw, 60px) 0;
  border-bottom: 1px solid var(--line);
}
.project:nth-child(even) { grid-template-columns: 0.78fr 1.22fr; }
.project:nth-child(even) .project-media { order: 2; }
.project-media {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--paper-3);
}
.project-media img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.9s var(--ease);
}
.project:hover .project-media img { transform: scale(1.025); }
.project-copy { padding-block: 4px; }
.project-index {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--faint);
}
.project-index > .project-num { color: var(--aqua); }
.project-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 11px;
  padding-left: 13px;
  border-left: 1px solid var(--line-strong);
  color: var(--faint);
}
.project-state::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--aqua);
  flex: none;
}
.project h3 {
  margin: 15px 0 13px;
  font-family: var(--serif);
  font-size: clamp(2rem, 3.1vw, 3rem);
  line-height: 0.99;
  letter-spacing: -0.022em;
}
.project p {
  max-width: 46ch;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--muted);
}
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
.project-tags li {
  padding: 5px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 25px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--ink);
  font-size: 12px;
  font-weight: 500;
  transition: color 0.2s, border-color 0.2s;
}
.project-link .icon { width: 13px; height: 13px; }
.project-link:hover { color: var(--aqua); border-color: var(--aqua); }

/* ---------- Contact ---------- */
.contact {
  background: var(--ink);
  color: var(--paper);
  padding-bottom: clamp(80px, 9vw, 120px);
}
.contact .section-index { color: #9aa295; }
.contact .section-index::before { background: var(--aqua-bright); }
.contact .section-index span { color: var(--aqua-bright); }
.contact .section-title { color: var(--paper); }
.contact .section-intro { color: #a8b0a5; }
.contact-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: clamp(40px, 6vw, 82px);
  align-items: start;
}
.contact-lead {
  font-family: var(--serif);
  font-size: clamp(2rem, 3.4vw, 3rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  max-width: 16ch;
}
.contact-lead em { font-style: italic; color: var(--aqua-bright); }
.contact-body {
  max-width: 42ch;
  margin-top: 20px;
  font-size: 13.5px;
  line-height: 1.75;
  color: #a8b0a5;
}
.contact-list {
  margin-top: 38px;
  border-top: 1px solid rgba(243, 240, 232, 0.16);
}
.contact-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(243, 240, 232, 0.16);
}
.contact-label {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #828b80;
  flex: none;
}
.contact-list a,
.contact-value {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  text-align: right;
  color: var(--paper);
  transition: color 0.2s;
  overflow-wrap: anywhere;
}
.contact-list .icon { width: 13px; height: 13px; color: #828b80; transition: color 0.2s, transform 0.2s; }
.contact-list a:hover { color: var(--aqua-bright); }
.contact-list a:hover .icon { color: var(--aqua-bright); transform: translate(2px, -2px); }
.contact-tz {
  font-family: var(--mono);
  font-size: 8px;
  color: #828b80;
  margin-left: 6px;
  white-space: nowrap;
}
.contact-socials { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.contact-socials a {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(243, 240, 232, 0.2);
  border-radius: 50%;
  color: #cfd5cb;
  transition: color 0.25s, border-color 0.25s, transform 0.25s;
}
.contact-socials .icon { width: 14px; height: 14px; }
.contact-socials a:hover {
  color: var(--aqua-bright);
  border-color: var(--aqua-bright);
  transform: translateY(-2px);
}

.contact-form-wrap { padding-top: 6px; }
.contact-form {
  padding: clamp(24px, 3vw, 34px);
  background: var(--card);
  color: var(--ink);
  border: 1px solid rgba(243, 240, 232, 0.14);
  border-radius: 3px;
  box-shadow: 0 44px 90px -50px rgba(0, 0, 0, 0.7);
}
.form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.form-head h3 {
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.01em;
}
.form-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.form-badge .dot { width: 5px; height: 5px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label {
  display: block;
  margin-bottom: 3px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.field label span { color: var(--aqua); }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 8px 0 10px;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  transition: border-color 0.2s ease;
}
.field textarea { resize: vertical; min-height: 92px; }
.field ::placeholder { color: #9ba294; opacity: 1; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--aqua);
}
.select-wrap { position: relative; }
.select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 26px;
  cursor: pointer;
}
.select-arrow {
  position: absolute;
  right: 2px;
  top: 50%;
  width: 13px;
  height: 13px;
  color: var(--muted);
  transform: translateY(-50%) rotate(90deg);
  pointer-events: none;
}
.honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}
.btn-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 4px;
  justify-content: space-between;
  padding: 0 17px;
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.btn-submit:hover { background: var(--aqua); border-color: var(--aqua); color: #fff; }
.btn-submit:disabled { opacity: 0.65; cursor: wait; }
.form-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 13px;
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.5;
  color: var(--faint);
}
.form-note .icon { width: 11px; height: 11px; color: var(--aqua); }
.form-status {
  display: none;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.55;
  background: var(--paper);
}
.form-status.is-visible { display: block; }
.form-status.is-success { border-color: #9dc6b9; background: #e6f0eb; color: #174f41; }
.form-status.is-error { border-color: #d9b2a9; background: #f6e9e6; color: #7c2f21; }

/* ---------- Footer ---------- */
.footer {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 7vw, 88px) 0 26px;
  background: #0b0e0b;
  color: #8f978c;
}
.footer-top { padding-bottom: clamp(32px, 4vw, 46px); border-bottom: 1px solid rgba(243, 240, 232, 0.12); }
.footer-kicker {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7e867b;
}
.footer-wordmark {
  margin: 16px 0 clamp(26px, 3vw, 36px);
  font-family: var(--serif);
  font-size: clamp(3.3rem, 9.5vw, 8.2rem);
  line-height: 0.86;
  letter-spacing: -0.035em;
  color: var(--paper);
  white-space: nowrap;
}
.footer-dot { color: var(--aqua-bright); }
.footer-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 36px;
}
.footer-intro p {
  max-width: 49ch;
  font-size: 13px;
  line-height: 1.72;
  color: #9aa295;
}
.footer-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(243, 240, 232, 0.42);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--paper);
  transition: color 0.2s, border-color 0.2s;
}
.footer-cta .icon { width: 13px; height: 13px; }
.footer-cta:hover { color: var(--aqua-bright); border-color: var(--aqua-bright); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.55fr repeat(3, 1fr);
  gap: 40px;
  padding: clamp(36px, 4.5vw, 52px) 0 clamp(40px, 5vw, 60px);
}
.brand--footer .brand-mark {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}
.brand--footer .brand-mark::after { border-color: #0b0e0b; }
.brand--footer .brand-name { color: var(--paper); }
.brand--footer .brand-sub { color: #7a8277; }
.footer-note {
  margin-top: 20px;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.8;
  letter-spacing: 0.03em;
  color: #7a8277;
}
.footer-col h4 {
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #7e867b;
}
.footer-col ul { display: grid; gap: 9px; }
.footer-col a { font-size: 12.5px; color: #b7beb4; transition: color 0.2s; }
.footer-col a:hover { color: var(--paper); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
  border-top: 1px solid rgba(243, 240, 232, 0.12);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.02em;
  color: #8a9287;
}
.footer-time { display: inline-flex; align-items: center; gap: 8px; }
.footer-time .dot { width: 5px; height: 5px; background: var(--aqua-bright); box-shadow: none; }
.footer-top-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #aab1a7;
  transition: color 0.2s;
}
.footer-top-link .icon { width: 12px; height: 12px; }
.footer-top-link:hover { color: var(--paper); }

/* ---------- Reveal ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--delay, 0ms);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Lightbox ---------- */
.lightbox {
  width: min(1060px, 92vw);
  max-width: none;
  max-height: 92vh;
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  overflow: visible;
}
.lightbox::backdrop {
  background: rgba(8, 10, 8, 0.8);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.lightbox[open] { animation: lightboxIn 0.32s var(--ease); }
@keyframes lightboxIn {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
.lightbox-inner {
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  box-shadow: 0 60px 120px -40px rgba(0, 0, 0, 0.8);
}
.lightbox-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 2px 2px 16px;
}
.lightbox-kicker {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--aqua);
  margin-bottom: 6px;
}
.lightbox-head h3 {
  font-family: var(--serif);
  font-size: clamp(20px, 2.5vw, 28px);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.lightbox-close {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.lightbox-close .icon { width: 16px; height: 16px; }
.lightbox-close:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.lightbox-stage {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: clamp(12px, 2vw, 22px);
  background: var(--paper-2);
  border: 1px solid var(--line);
  overflow: auto;
}
.lightbox-stage img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 62vh;
  box-shadow: 0 20px 40px -24px rgba(17, 20, 17, 0.4);
  background: #fff;
}
.lightbox-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 2px 0;
}
.lightbox-nav {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 0;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}
.lightbox-nav .icon { width: 13px; height: 13px; }
.lightbox-nav:hover { color: var(--ink); }
.lightbox-count {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  color: var(--faint);
}

/* ---------- 404 ---------- */
.error-main {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 48px) 0 80px;
}
.error-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}
.error-title {
  margin-top: 22px;
  font-family: var(--serif);
  font-size: clamp(3.2rem, 7vw, 6.4rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
  max-width: 10ch;
}
.error-title em { font-style: italic; color: var(--aqua); }
.error-text {
  max-width: 42ch;
  margin-top: 24px;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--muted);
}
.error-copy .hero-actions { margin-top: 30px; }
.error-code {
  font-family: var(--serif);
  font-size: clamp(9rem, 24vw, 21rem);
  line-height: 0.72;
  letter-spacing: -0.055em;
  text-align: right;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-strong);
  user-select: none;
}
.footer--minimal { padding: 0 0 22px; }
.footer--minimal .footer-bottom { border-top: 1px solid rgba(243, 240, 232, 0.12); }

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1180px) {
  .availability { display: none; }
  .nav-links { gap: 22px; }
}

@media (max-width: 1020px) {
  .btn-nav { display: none; }
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    inset: 0;
    z-index: 95;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 0;
    padding: 110px var(--gutter) 48px;
    background: var(--paper);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    overflow-y: auto;
    transition: opacity 0.3s var(--ease), visibility 0.3s;
  }
  .nav-links a {
    padding: 15px 0;
    border-bottom: 1px solid var(--line);
    font-family: var(--serif);
    font-size: clamp(2rem, 7vw, 3rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1;
  }
  .nav-links a:first-child { border-top: 1px solid var(--line); }
  .nav-links a::after { display: none; }
  .nav-links a.is-active { color: var(--aqua); }
  body.nav-open .nav-links {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  body.nav-open { overflow: hidden; }
}

@media (max-width: 940px) {
  .error-main { align-items: flex-start; padding-top: calc(var(--nav-h) + 56px); }
  .error-grid { grid-template-columns: 1fr; gap: 34px; }
  .error-title { max-width: 14ch; }
  .error-code {
    text-align: left;
    font-size: clamp(7rem, 34vw, 13rem);
    line-height: 0.72;
    margin-top: 8px;
  }

  .hero-grid { grid-template-columns: 1fr; align-items: start; }
  .hero h1 { max-width: 14ch; }
  .hero-portrait { max-width: 470px; margin: 52px 0 0; }
  .portrait-offset { right: 0; left: 16px; bottom: -2px; }
  .hero-cert { left: auto; right: 18px; top: 18px; }

  .section-head { grid-template-columns: 1fr; gap: 22px; align-items: start; }
  .section-title { max-width: 20ch; }
  .section-intro { max-width: 56ch; padding-bottom: 0; }
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .about-lead { max-width: 26ch; }
  .principles { max-width: 620px; }

  .stack { grid-template-columns: 1fr; }
  .stack-col,
  .stack-col:first-child,
  .stack-col:last-child {
    padding: 28px 0 8px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .stack-col:first-child { padding-top: 24px; }
  .stack-col:last-child { border-bottom: 0; padding-bottom: 0; }
  .stack-head { padding-bottom: 14px; }
  .skill { padding: 14px 0 11px; }
  .skill-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 34px; }
  .skill:nth-child(odd) { border-bottom: 1px solid var(--line); }

  .credentials { grid-template-columns: 1fr 1fr; }
  .cred-card--feature { grid-column: span 2; }

  .project,
  .project:nth-child(even) { grid-template-columns: 1fr; gap: 26px; }
  .project:nth-child(even) .project-media { order: 0; }
  .project-media { order: -1; }
  .project h3 { margin-top: 12px; }
  .project p { max-width: 60ch; }

  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .contact-lead { max-width: 20ch; }
  .contact-body { max-width: 54ch; }
  .contact-form-wrap { padding-top: 0; }
}

@media (max-width: 820px) {
  .cred-inner { grid-template-columns: 1fr 1fr; }
  .cred-item { padding: 16px 20px; }
  .cred-item:nth-child(odd) { padding-left: 0; border-left: 0; }
  .cred-item:nth-child(even) { padding-right: 0; }
  .cred-item:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .credentials { grid-template-columns: 1fr; }
  .cred-card { min-height: 0; }
  .cred-card--feature { grid-column: span 1; }
  .cred-card .cred-meta { margin-top: 22px; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-col--brand { grid-column: 1 / -1; }
  .footer-intro { flex-direction: column; align-items: flex-start; gap: 22px; }
}

@media (max-width: 720px) {
  .section { padding: 72px 0; }
  .hero { padding-top: calc(var(--nav-h) + 42px); }
  .hero h1 { font-size: clamp(2.95rem, 12.8vw, 4.6rem); }
  .hero-lede { margin-top: 24px; }
  .hero-actions .btn { flex: 1; min-width: 0; padding: 0 14px; font-size: 12.5px; }
  .hero-facts { gap: 0; margin-top: 38px; }
  .fact { padding-left: 14px; }
  .fact-num { font-size: 26px; }
  .fact-num small { display: block; margin: 4px 0 0; font-size: 9px; }
  .hero-portrait { max-width: 100%; margin-top: 46px; }
  .hero-cert { right: 12px; top: 12px; }
  .eyebrow-loc { margin-left: 0; padding-left: 0; }
  .eyebrow-loc::before { display: none; }

  .services { grid-template-columns: 1fr; }
  .service { min-height: 0; padding: 26px 24px 24px; }
  .service h3 { padding-top: 40px; font-size: 25px; }
  .service--feature { display: block; padding: 30px 24px; }
  .service--feature h3 { margin-top: 28px; }
  .service-link { margin-top: 24px; }
  .services-foot { font-size: 12px; }

  .skill-list { grid-template-columns: 1fr; }
  .skill:nth-child(odd) { border-bottom: 1px solid var(--line); }

  .cred-card { padding: 22px; }
  .cred-card--feature { padding: 24px; }
  .cred-feature-top { align-items: flex-start; gap: 16px; }
  .cred-badge--lg { width: 68px; height: 68px; }

  .field-row { grid-template-columns: 1fr; gap: 0; }
  .form-head { align-items: flex-start; flex-direction: column; gap: 10px; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .footer-col--brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 12px; }
  .footer-wordmark { font-size: clamp(3rem, 13.6vw, 5rem); }
}

@media (max-width: 520px) {
  .error-title { font-size: clamp(2.8rem, 12.6vw, 3.6rem); }
  .error-code { font-size: 34vw; }
  .brand-sub { display: none; }
  .brand-name { font-size: 13px; }
  .nav-right { gap: 12px; }
  .cred-inner { grid-template-columns: 1fr; }
  .cred-item,
  .cred-item:nth-child(odd),
  .cred-item:nth-child(even) {
    padding: 14px 0;
    border-left: 0;
  }
  .cred-item:nth-child(n + 2) { border-top: 1px solid var(--line); }
  .cred-item:first-child { padding-top: 16px; }
  .contact-list li { flex-direction: column; align-items: flex-start; gap: 5px; }
  .contact-list a,
  .contact-value { text-align: left; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { font-size: 8px; }
  .lightbox { width: 96vw; }
  .lightbox-inner { padding: 12px; max-height: 94vh; }
  .lightbox-stage { padding: 8px; }
  .lightbox-stage img { max-height: 58vh; }
  .lightbox-head { padding-bottom: 12px; }
  .lightbox-close { width: 36px; height: 36px; }
  .lightbox-foot { padding-top: 10px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .js .skill-bar i { transform: scaleX(1); }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .back-to-top, .scroll-progress, .contact-form-wrap,
  .footer-grid, .footer-bottom, .hero-actions, .hero-cert,
  .cred-card .cred-btn, .service-link, .footer-cta { display: none !important; }
  body { background: #fff; color: #000; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero, .section { padding: 24px 0; }
  .contact { background: #fff; color: #000; }
  .contact .section-title, .contact .section-intro, .contact-body, .contact-list a, .contact-value { color: #000; }
  .contact-list { border-color: #ccc; }
  .contact-list li { border-color: #ddd; }
  .cred-card, .service, .project, .hero-portrait { break-inside: avoid; }
}
