/* bakaloff.com — Spec Index: engineering specimen, cool steel */
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600&family=Syne:wght@500;600;700;800&display=swap");

:root {
  --ink: #06101c;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: rgba(6, 16, 28, 0.09);
  --line-strong: rgba(6, 16, 28, 0.16);
  --paper: #dce6f0;
  --snow: #f7fafc;
  --panel: rgba(247, 250, 252, 0.82);
  --teal: #0a7c75;
  --teal-deep: #055750;
  --steel: #163247;
  --radius: 4px;
  --nav-h: 60px;
  --tab-h: 58px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font-ui: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-display: "Syne", var(--font-ui);
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --mx: 50%;
  --my: 18%;
  --progress: 0;
  --px: 0;
  --py: 0;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

::selection {
  background: rgba(11, 127, 120, 0.22);
  color: var(--ink);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 18px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.012em;
  color: var(--ink);
  background:
    radial-gradient(880px 480px at var(--mx) var(--my), rgba(10, 124, 117, 0.11), transparent 58%),
    radial-gradient(640px 420px at 88% 8%, rgba(22, 50, 71, 0.08), transparent 50%),
    linear-gradient(168deg, #eef3f8 0%, var(--paper) 46%, #c5d3e3 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  cursor: crosshair;
}

a,
button,
.btn,
.nav-cta,
.specimen,
.contact-link,
.contact-mini {
  cursor: pointer;
}

/* Atmosphere */
.field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.field .grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(7, 17, 31, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(7, 17, 31, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at var(--mx) var(--my), #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at var(--mx) var(--my), #000 20%, transparent 70%);
  transform: translate3d(calc(var(--px) * 0.35px), calc(var(--py) * 0.35px), 0);
}

.blob {
  position: absolute;
  border-radius: 40% 60% 55% 45%;
  filter: blur(40px);
  opacity: 0.5;
  will-change: transform;
}

.blob-a {
  width: min(48vw, 380px);
  height: min(48vw, 380px);
  top: -6%;
  left: -4%;
  background: rgba(11, 127, 120, 0.28);
  animation: morph-a 16s ease-in-out infinite;
}

.blob-b {
  width: min(40vw, 320px);
  height: min(40vw, 320px);
  right: -8%;
  top: 22%;
  background: rgba(26, 58, 82, 0.18);
  animation: morph-b 21s ease-in-out infinite;
}

@keyframes morph-a {
  0%, 100% { transform: translate(0, 0) rotate(0deg); border-radius: 40% 60% 55% 45%; }
  50% { transform: translate(12%, 10%) rotate(18deg); border-radius: 55% 45% 40% 60%; }
}

@keyframes morph-b {
  0%, 100% { transform: translate(0, 0) rotate(0deg); border-radius: 60% 40% 45% 55%; }
  50% { transform: translate(-14%, 8%) rotate(-12deg); border-radius: 45% 55% 60% 40%; }
}

.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  z-index: 200;
  transform-origin: left center;
  transform: scaleX(var(--progress));
  background: linear-gradient(90deg, var(--teal), var(--steel));
  pointer-events: none;
}

.spine {
  display: none;
  position: fixed;
  top: 50%;
  left: 10px;
  z-index: 90;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(7, 17, 31, 0.35);
  white-space: nowrap;
  pointer-events: none;
}

.coords {
  display: none;
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(7, 17, 31, 0.4);
  pointer-events: none;
  background: rgba(244, 247, 250, 0.7);
  border: 1px solid var(--line);
  padding: 6px 10px;
  backdrop-filter: blur(8px);
}

@media (min-width: 1100px) {
  .spine,
  .coords {
    display: block;
  }
}

a {
  color: var(--teal);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1080px, calc(100% - 36px));
  margin-inline: auto;
}

@media (min-width: 1100px) {
  .shell {
    width: min(1080px, calc(100% - 72px));
  }
}

/* Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  background: rgba(216, 226, 236, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  transition: border-color 0.25s ease, background 0.25s ease;
}

body.scrolled .site-header {
  border-bottom-color: var(--line);
  background: rgba(244, 247, 250, 0.84);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1080px, calc(100% - 36px));
  margin-inline: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: inherit;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-text small {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.navlinks {
  display: none;
  gap: 2px;
}

.navlinks a {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background 0.15s ease, color 0.15s ease;
}

.navlinks a[aria-current="true"],
.navlinks a:hover {
  background: rgba(11, 127, 120, 0.1);
  color: var(--teal-deep);
}

.nav-cta {
  height: 34px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff !important;
  background: var(--ink);
  clip-path: polygon(0 0, 100% 0, 100% 70%, 88% 100%, 0 100%);
  transition: background 0.2s ease, transform 0.15s ease;
}

.nav-cta:hover {
  background: var(--teal);
}

@media (min-width: 880px) {
  .navlinks {
    display: flex;
  }
}

/* Hero */
.hero {
  padding: 28px 0 8px;
  min-height: min(78vh, 680px);
  display: flex;
  align-items: center;
}

.hero-stage {
  position: relative;
  width: 100%;
  display: grid;
  gap: 28px;
  align-items: end;
}

@media (min-width: 900px) {
  .hero-stage {
    grid-template-columns: 1.35fr 0.55fr;
    gap: 40px;
  }
}

.watermark {
  position: absolute;
  right: -4%;
  top: -8%;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(140px, 28vw, 280px);
  line-height: 0.8;
  letter-spacing: -0.08em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(7, 17, 31, 0.08);
  pointer-events: none;
  user-select: none;
  transform: translate3d(calc(var(--px) * -0.5px), calc(var(--py) * -0.35px), 0) rotate(-6deg);
  z-index: 0;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-meta .live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(11, 127, 120, 0.18);
  animation: live 2.2s ease-in-out infinite;
}

@keyframes live {
  50% { box-shadow: 0 0 0 8px rgba(11, 127, 120, 0.05); }
}

.hero-name {
  position: relative;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(52px, 13vw, 104px);
  line-height: 0.88;
  letter-spacing: -0.06em;
  color: var(--ink);
}

.hero-name .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.05em;
}

.hero-name .line-inner {
  display: block;
}

.hero-name .last .line-inner {
  background: linear-gradient(100deg, var(--ink) 20%, var(--teal) 55%, var(--steel) 95%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: ink-flow 8s ease-in-out infinite;
}

@keyframes ink-flow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-role {
  margin: 18px 0 0;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal-deep);
}

.hero-lead {
  margin: 16px 0 0;
  max-width: 28em;
  font-size: clamp(17px, 2.2vw, 20px);
  line-height: 1.45;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-side {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  backdrop-filter: blur(10px);
}

.side-block {
  padding: 18px 18px;
  border-bottom: 1px solid var(--line);
}

.side-block:last-child {
  border-bottom: none;
}

.side-k {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.side-block strong {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  border: none;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s ease;
  will-change: transform;
  clip-path: polygon(0 0, 100% 0, 100% 72%, 92% 100%, 0 100%);
}

.btn-primary {
  background: var(--teal);
  color: #fff !important;
}

.btn-primary:hover {
  background: var(--teal-deep);
}

.btn-ghost {
  background: transparent;
  color: var(--ink) !important;
  border: 1px solid var(--line-strong);
  clip-path: none;
  border-radius: 2px;
}

.btn-ghost:hover {
  border-color: var(--teal);
  color: var(--teal-deep) !important;
}

.btn-sm {
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
}

/* Sections */
.section {
  padding: 52px 0 8px;
}

.section-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: 16px;
  margin-bottom: 22px;
}

.section-id {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 72px);
  font-weight: 800;
  line-height: 0.8;
  letter-spacing: -0.06em;
  color: rgba(7, 17, 31, 0.1);
}

.section-kicker {
  margin: 0 0 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-deep);
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 4.5vw, 42px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
}

.section-note {
  margin: 0;
  max-width: 14em;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  letter-spacing: 0.02em;
}

@media (max-width: 700px) {
  .section-head {
    grid-template-columns: auto 1fr;
  }
  .section-note {
    grid-column: 2;
    text-align: left;
    max-width: none;
  }
}

/* Album / specimens — centered grid */
.album-wrap {
  overflow: visible;
  margin: 0;
}

.album {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  overflow: visible;
  padding: 0;
  cursor: default;
  max-width: 920px;
  margin-inline: auto;
  width: 100%;
}

@media (min-width: 720px) {
  .album {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .album .specimen.featured {
    grid-column: 1 / -1;
    width: auto;
    max-width: none;
  }
}

.album:active {
  cursor: default;
}

.specimen {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0;
  min-height: 280px;
  padding: 0;
  scroll-snap-align: start;
  color: inherit;
  text-align: left;
  font: inherit;
  background: var(--panel);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.25s ease,
    background 0.25s ease;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
}

.specimen::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--teal);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.specimen:hover {
  transform: translateY(-6px);
  border-color: rgba(11, 127, 120, 0.35);
  background: rgba(244, 247, 250, 0.95);
  color: inherit;
}

.specimen:hover::before {
  transform: scaleY(1);
}

.specimen.featured {
  background:
    linear-gradient(145deg, rgba(11, 127, 120, 0.14), transparent 45%),
    var(--panel);
  min-height: 320px;
}

.specimen-num {
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.85;
  color: rgba(7, 17, 31, 0.08);
  transition: color 0.3s ease, transform 0.35s ease;
}

.specimen:hover .specimen-num {
  color: rgba(11, 127, 120, 0.28);
  transform: translateX(4px);
}

.specimen-body h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.specimen-body p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.specimen-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal-deep);
  background: rgba(11, 127, 120, 0.12);
  border: 1px solid rgba(11, 127, 120, 0.2);
}

.tag.quiet {
  color: var(--muted);
  background: transparent;
  border-color: var(--line);
}

.specimen-go {
  align-self: flex-end;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--teal);
  font-size: 18px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.3s ease;
}

.specimen:hover .specimen-go {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
  transform: translateX(4px);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 18px;
}

.metric {
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.45);
}

.metric b {
  display: block;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.metric span {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Stack */
.stack-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  max-width: 720px;
  margin-inline: auto;
  background: transparent;
  border: none;
}

.stack-grid span {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1 1 126px;
  max-width: 160px;
  min-height: 56px;
  min-width: 126px;
  padding: 14px 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  background: var(--panel);
  border: 1px solid var(--line);
  transition: background 0.2s ease, color 0.2s ease, transform 0.25s ease,
    border-color 0.2s ease;
}

.stack-grid span:hover {
  background: rgba(11, 127, 120, 0.1);
  border-color: rgba(11, 127, 120, 0.35);
  color: var(--teal-deep);
  transform: translateY(-2px);
  position: relative;
  z-index: 1;
}

.domains {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.domains-label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.domains ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
}

.domains li {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
  position: relative;
}

.domains li::after {
  content: "/";
  margin-left: 18px;
  color: rgba(7, 17, 31, 0.2);
  font-weight: 400;
}

.domains li:last-child::after {
  content: none;
}

/* About */
.about-grid {
  display: grid;
  gap: 14px;
}

@media (min-width: 760px) {
  .about-grid {
    grid-template-columns: 1.4fr 0.8fr;
  }
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 24px;
  backdrop-filter: blur(8px);
}

.panel-quote {
  position: relative;
}

.panel-quote::before {
  content: "SPEC";
  position: absolute;
  top: 14px;
  right: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: rgba(7, 17, 31, 0.2);
}

.panel h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.panel p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 16px;
}

.panel ul {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

.panel li {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.panel li b {
  font-weight: 600;
  color: var(--teal-deep);
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.panel-company {
  background:
    linear-gradient(160deg, rgba(11, 127, 120, 0.12), transparent 50%),
    var(--panel);
}

/* Contact */
.contact-block {
  display: grid;
  gap: 10px;
}

.contact-link {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 22px 22px;
  background: var(--ink);
  color: #fff !important;
  clip-path: polygon(0 0, 100% 0, 100% 78%, 96% 100%, 0 100%);
  transition: transform 0.25s ease, background 0.2s ease;
}

.contact-link:hover {
  background: var(--steel);
  transform: translateY(-3px);
}

.contact-link strong {
  display: block;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.contact-link small {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.04em;
}

.contact-link .arrow {
  font-size: 24px;
  opacity: 0.7;
  transition: transform 0.25s ease;
}

.contact-link:hover .arrow {
  transform: translateX(6px);
}

.contact-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 560px) {
  .contact-row {
    grid-template-columns: 1fr;
  }
}

.contact-mini {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink) !important;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.contact-mini:hover {
  border-color: rgba(11, 127, 120, 0.4);
  transform: translateY(-2px);
}

.contact-mini span {
  color: var(--muted);
  font-weight: 500;
  font-size: 18px;
}

/* Footer / tab */
.site-footer {
  padding: 40px 0 calc(28px + var(--tab-h) + var(--safe-bottom));
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (min-width: 880px) {
  .site-footer {
    padding-bottom: 48px;
  }
  main {
    padding-bottom: 20px;
  }
}

.tabbar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(10px + var(--safe-bottom));
  z-index: 100;
  height: var(--tab-h);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 6px;
  background: rgba(244, 247, 250, 0.88);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tabbar a[aria-current="true"] {
  color: var(--teal-deep);
  background: rgba(11, 127, 120, 0.1);
}

.tabbar .tab-icon {
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
}

@media (min-width: 880px) {
  .tabbar {
    display: none;
  }
}

main {
  position: relative;
  z-index: 1;
  padding-bottom: calc(24px + var(--tab-h) + var(--safe-bottom));
}

/* Case pages (shared) */
.case-cover {
  margin: 0 0 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--ink);
}

.case-cover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
}

.case-hero {
  padding: 28px 0 20px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--teal);
}

.back-link::before {
  content: "←";
}

.case-eyebrow {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-deep);
}

.large-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(34px, 7vw, 52px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.hero-sub {
  margin: 14px 0 0;
  max-width: 38em;
  font-size: 18px;
  color: var(--ink-soft);
}

.case-points {
  margin-top: 8px;
}

.case-point {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.case-point:last-of-type {
  border-bottom: 1px solid var(--line);
}

.case-point b {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.case-point p {
  margin: 0;
  font-size: 16px;
  color: var(--ink);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  background: rgba(11, 127, 120, 0.08);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

/* —— Work popup —— */
.work-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 18px;
  padding-bottom: calc(18px + var(--tab-h) + var(--safe-bottom));
}

.work-modal[hidden] {
  display: none;
}

.work-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 17, 31, 0.48);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: none;
  cursor: pointer;
}

.work-modal-panel {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  max-height: min(82vh, 760px);
  overflow: auto;
  padding: 0 24px 28px;
  background: var(--snow);
  border: 1px solid var(--line-strong);
  box-shadow: 0 28px 80px rgba(7, 17, 31, 0.28);
  outline: none;
  animation: modal-in 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.work-modal-cover-wrap {
  margin: 0 -24px 20px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--ink);
}

.work-modal-cover {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
}

.work-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: rgba(244, 247, 250, 0.92);
  color: var(--ink);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.work-modal-close:hover {
  border-color: var(--teal);
  background: rgba(11, 127, 120, 0.1);
}

.work-modal-eyebrow {
  margin: 0 0 8px;
  padding-right: 40px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-deep);
}

.work-modal-title {
  margin: 0;
  padding-right: 36px;
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.work-modal-lead {
  margin: 12px 0 0;
  font-size: 16px;
  color: var(--ink-soft);
  letter-spacing: -0.01em;
}

.work-modal .metrics {
  margin-top: 18px;
}

.work-modal-points {
  margin-top: 8px;
}

.work-modal-points .case-point:first-child {
  border-top: 1px solid var(--line);
}

body.modal-open {
  overflow: hidden;
}

@media (min-width: 880px) {
  .work-modal {
    padding-bottom: 18px;
  }
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px) skewY(0.6deg);
  filter: blur(5px);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.hero-name .line-inner {
  opacity: 0;
  transform: translateY(115%);
  filter: blur(8px);
  transition: opacity 0.95s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.95s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.95s cubic-bezier(0.22, 1, 0.36, 1);
}

body.ready .hero-name .line-inner {
  opacity: 1;
  transform: none;
  filter: none;
}

body.ready .hero-name .line:nth-child(2) .line-inner {
  transition-delay: 0.12s;
}



/* —— Design polish v1 —— */
.site-header {
  background: rgba(238, 243, 248, 0.72);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
body.scrolled .site-header {
  background: rgba(247, 250, 252, 0.9);
  box-shadow: 0 10px 30px rgba(6, 16, 28, 0.045);
}
.navlinks a {
  position: relative;
  border-radius: 3px;
}
.navlinks a[aria-current="true"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  background: var(--teal);
}
.hero {
  padding: 40px 0 16px;
  min-height: min(82vh, 720px);
}
.watermark {
  right: -2%;
  top: -4%;
  font-size: clamp(120px, 24vw, 220px);
  -webkit-text-stroke: 1px rgba(6, 16, 28, 0.07);
  transform: translate3d(calc(var(--px) * -0.5px), calc(var(--py) * -0.35px), 0) rotate(-8deg);
}
.hero-meta {
  margin-bottom: 22px;
  padding: 6px 12px 6px 10px;
  border: 1px solid var(--line);
  background: rgba(247, 250, 252, 0.6);
  color: var(--ink-soft);
}
.hero-name {
  font-size: clamp(56px, 13.5vw, 108px);
  line-height: 0.86;
  letter-spacing: -0.065em;
}
.hero-role {
  margin-top: 20px;
  font-size: 14px;
  letter-spacing: 0.18em;
}
.hero-lead {
  margin-top: 18px;
  max-width: 30em;
  font-size: clamp(18px, 2.3vw, 21px);
  line-height: 1.5;
}
.hero-side {
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 50px rgba(6, 16, 28, 0.06);
}
.hero-side::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--steel));
}
.side-block {
  padding: 20px;
}
.side-block strong {
  font-size: 30px;
  letter-spacing: -0.045em;
}
.section {
  padding: 64px 0 12px;
}
.section-head {
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.album {
  max-width: 980px;
  gap: 16px;
}
.specimen {
  background: var(--snow);
  border-color: var(--line);
  box-shadow: 0 1px 0 rgba(6, 16, 28, 0.03);
}
.specimen-media {
  display: block;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--ink);
  aspect-ratio: 16 / 9;
}
.specimen-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease);
}
.specimen:hover .specimen-media img {
  transform: scale(1.04);
}
.specimen-num,
.specimen-body,
.specimen-go {
  margin: 0;
}
.specimen-num {
  position: absolute;
  top: calc(56.25% + 14px);
  left: 18px;
  z-index: 1;
  font-size: 42px;
  color: rgba(6, 16, 28, 0.12);
}
.specimen-body {
  padding: 22px 22px 20px;
  display: grid;
  gap: 8px;
}
.specimen-go {
  position: absolute;
  right: 18px;
  bottom: 18px;
}
.specimen.featured {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  min-height: 340px;
  background: var(--snow);
}
.specimen.featured .specimen-media {
  aspect-ratio: auto;
  height: 100%;
  min-height: 340px;
  border-bottom: none;
  border-right: 1px solid var(--line);
}
.specimen.featured .specimen-num {
  top: 18px;
  left: calc(50% + 18px);
}
.specimen.featured .specimen-body {
  padding: 28px 26px;
  align-content: center;
}
.specimen.featured .specimen-go {
  display: none;
}
@media (max-width: 860px) {
  .specimen.featured {
    grid-template-columns: 1fr;
  }
  .specimen.featured .specimen-media {
    min-height: 200px;
    aspect-ratio: 16 / 9;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .specimen.featured .specimen-num {
    top: calc(56.25% + 14px);
    left: 18px;
  }
}
.specimen:hover {
  transform: translateY(-5px);
  border-color: rgba(10, 124, 117, 0.35);
  box-shadow: 0 20px 48px rgba(6, 16, 28, 0.08);
}
.contact-link {
  clip-path: polygon(0 0, 100% 0, 100% 82%, 97% 100%, 0 100%);
}
.stack-grid {
  max-width: 760px;
}
.stack-grid span {
  border-radius: 2px;
  min-width: 132px;
}
.domains li {
  font-size: 17px;
}



/* —— Design polish v2 —— */
.hero-role {
  margin-top: 22px;
  font-size: 16px;
  letter-spacing: 0.2em;
  font-weight: 600;
}
.hero-lead {
  margin-top: 14px;
  max-width: 22em;
  font-size: clamp(18px, 2.2vw, 20px);
  line-height: 1.45;
  color: var(--ink-soft);
}
.section {
  padding: 80px 0 16px;
}
#work.section {
  padding-top: 72px;
}
#stack.section {
  padding-top: 88px;
}
#about.section {
  padding-top: 88px;
}
#contact.section {
  padding-top: 88px;
  padding-bottom: 28px;
}
.specimen-media img {
  transform: translate3d(var(--cx, 0), var(--cy, 0), 0) scale(1.04);
  will-change: transform;
}
.specimen:hover .specimen-media img {
  transform: translate3d(var(--cx, 0), var(--cy, 0), 0) scale(1.08);
}
.contact-link {
  padding: 26px 28px;
  min-height: 92px;
  box-shadow: 0 18px 48px rgba(6, 16, 28, 0.16);
}
.contact-link strong {
  font-size: clamp(20px, 3vw, 26px);
}
.contact-row-quiet {
  gap: 8px;
}
.contact-row-quiet .contact-mini {
  padding: 12px 14px;
  background: transparent;
  border-color: transparent;
  color: var(--muted) !important;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.contact-row-quiet .contact-mini span {
  font-size: 14px;
  opacity: 0.7;
}
.contact-row-quiet .contact-mini:hover {
  color: var(--teal-deep) !important;
  border-color: var(--line);
  background: rgba(247, 250, 252, 0.7);
  transform: none;
}
.tabbar {
  background: rgba(247, 250, 252, 0.9);
  padding: 5px;
}
.tabbar a {
  position: relative;
  border-radius: 3px;
  transition: color 0.2s ease, background 0.2s ease;
}
.tabbar a[aria-current="true"] {
  color: var(--teal-deep);
  background: transparent;
}
.tabbar a[aria-current="true"]::after {
  content: "";
  position: absolute;
  left: 22%;
  right: 22%;
  bottom: 5px;
  height: 2px;
  background: var(--teal);
}
.tabbar a[aria-current="true"] .tab-icon {
  color: var(--teal);
}



/* —— Design polish v3 —— */
.chapters {
  display: none;
  position: fixed;
  top: 50%;
  right: 14px;
  z-index: 90;
  transform: translateY(-50%);
  flex-direction: column;
  gap: 10px;
  pointer-events: auto;
}
@media (min-width: 1100px) {
  .chapters { display: flex; }
}
.chapters a {
  display: grid;
  justify-items: end;
  gap: 2px;
  color: rgba(6, 16, 28, 0.35);
  font-family: var(--font-mono);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s var(--ease);
}
.chapters a span {
  font-size: 11px;
  letter-spacing: 0.08em;
  font-weight: 500;
}
.chapters a small {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateX(4px);
  transition: opacity 0.2s ease, transform 0.2s var(--ease);
}
.chapters a:hover,
.chapters a[aria-current="true"] {
  color: var(--teal-deep);
}
.chapters a:hover small,
.chapters a[aria-current="true"] small {
  opacity: 0.8;
  transform: none;
}
.chapters a[aria-current="true"] span {
  position: relative;
}
.chapters a[aria-current="true"] span::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 50%;
  width: 5px;
  height: 1px;
  background: var(--teal);
  transform: translateY(-50%);
}

.work-peek {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 250;
  width: min(240px, 28vw);
  pointer-events: none;
  border: 1px solid var(--line-strong);
  background: var(--ink);
  box-shadow: 0 18px 40px rgba(6, 16, 28, 0.18);
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.work-peek:not([hidden]) {
  opacity: 1;
}
.work-peek img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.contact-link {
  animation: contact-pulse 4.8s ease-in-out infinite;
}
@keyframes contact-pulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
.contact-link:hover {
  animation: none;
  transform: translateY(-4px);
}

.site-footer {
  display: grid;
  gap: 8px;
  justify-items: center;
}
.footer-status {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer-status .live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(10, 124, 117, 0.14);
}

body.case-page .case-hero {
  padding: 36px 0 28px;
}
body.case-page .case-cover {
  margin-bottom: 28px;
}
body.case-page .panel {
  margin-top: 22px;
}
body.case-page .card-actions {
  margin-top: 20px;
  gap: 10px;
}
body.case-page .card-actions .btn-ghost {
  border-color: transparent;
  color: var(--muted) !important;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
}
body.case-page .card-actions .btn-ghost:hover {
  border-color: var(--line);
  color: var(--teal-deep) !important;
  background: rgba(247, 250, 252, 0.7);
}



/* —— Design polish v4 —— */
.btn:active,
.nav-cta:active,
.contact-mini:active,
.work-modal-close:active {
  transform: translateY(1px);
}
.specimen:active {
  transform: translateY(-4px);
}
.btn:active {
  box-shadow: none;
}

.specimen-num {
  display: grid;
  align-items: start;
}
.specimen-num .num-a,
.specimen-num .num-b {
  grid-area: 1 / 1;
  transition: opacity 0.22s ease, transform 0.22s var(--ease);
}
.specimen-num .num-b {
  opacity: 0;
  transform: translateY(4px);
  color: var(--teal-deep);
  font-size: 0.55em;
  letter-spacing: 0.12em;
  font-family: var(--font-mono);
  font-weight: 600;
  padding-top: 0.35em;
}
.specimen:hover .specimen-num .num-a {
  opacity: 0;
  transform: translateY(-6px);
}
.specimen:hover .specimen-num .num-b {
  opacity: 1;
  transform: none;
}
.specimen.featured:hover .specimen-num .num-b {
  font-size: 0.42em;
  letter-spacing: 0.14em;
}

.lab-notes {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.lab-notes summary {
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lab-notes summary::-webkit-details-marker { display: none; }
.lab-notes summary::before {
  content: "+";
  font-weight: 600;
  color: var(--teal-deep);
}
.lab-notes[open] summary::before { content: "–"; }
.lab-notes-grid {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}
.lab-notes-grid b {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-deep);
  font-weight: 600;
}
.lab-notes-grid p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.55;
}
@media (min-width: 720px) {
  .lab-notes-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
}

.site-footer a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(6, 16, 28, 0.25);
}
.site-footer a:hover {
  color: var(--teal-deep);
  text-decoration-color: var(--teal);
}

/* 404 specimen */
body.page-404 main {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 0 64px;
}
.missing-specimen {
  display: grid;
  gap: 0;
  max-width: 520px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  position: relative;
  overflow: hidden;
}
.missing-specimen .specimen-media {
  display: block;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, rgba(10, 124, 117, 0.12), transparent 50%),
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 10px,
      rgba(6, 16, 28, 0.03) 10px,
      rgba(6, 16, 28, 0.03) 11px
    ),
    var(--panel);
  position: relative;
}
.missing-specimen .specimen-media::after {
  content: "SPEC · NULL";
  position: absolute;
  inset: auto 16px 14px auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: rgba(6, 16, 28, 0.35);
}
.missing-specimen .specimen-num {
  position: static;
  padding: 18px 22px 0;
  font-size: 48px;
  color: rgba(6, 16, 28, 0.12);
}
.missing-specimen .specimen-body {
  padding: 8px 22px 22px;
}
.missing-specimen .error-code {
  margin: 0 0 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.missing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

/* Colophon */
body.colophon-page .case-hero {
  padding: 36px 0 48px;
  max-width: 720px;
}
.colophon-block {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.colophon-block h2 {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal-deep);
  font-weight: 600;
}
.colophon-block p,
.colophon-block li {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.6;
}
.colophon-block ul {
  margin: 0;
  padding-left: 1.1em;
  display: grid;
  gap: 6px;
}
.colophon-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.colophon-swatch {
  display: grid;
  gap: 6px;
  justify-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.colophon-swatch i {
  display: block;
  width: 44px;
  height: 28px;
  border: 1px solid var(--line-strong);
}

@media (prefers-reduced-motion: reduce) {
  .specimen:hover .specimen-num .num-a,
  .specimen:hover .specimen-num .num-b {
    transform: none;
  }
  .btn:active,
  .nav-cta:active,
  .specimen:active {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal,
  .hero-name .line-inner {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
  .hero-meta .live,
  .blob-a,
  .blob-b,
  .hero-name .last .line-inner,
  .contact-link,
  .footer-status .live {
    animation: none !important;
  }
  .work-peek { display: none !important; }
  .specimen:hover,
  .contact-link:hover,
  .stack-grid span:hover {
    transform: none;
  }
  .specimen:hover .specimen-media img,
  .specimen-media img {
    transform: none !important;
  }
  .work-modal-panel {
    animation: none;
  }
  body {
    cursor: auto;
  }
}
