:root {
  --bg: #0d0f12;
  --panel: #15191f;
  --panel-strong: #1b222b;
  --text: #f4f1e8;
  --muted: #b9b4a8;
  --soft: #868175;
  --line: rgba(244, 241, 232, 0.14);
  --teal: #4fc3b4;
  --amber: #e3a64b;
  --red: #dd6b5f;
  --white: #ffffff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

body.nav-open {
  overflow: hidden;
}

body.lightbox-open {
  overflow: hidden;
}

body.resource-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 56px);
  color: var(--white);
  transition: background 180ms ease, border-color 180ms ease, backdrop-filter 180ms ease;
}

.site-header.is-scrolled,
.site-header.is-open {
  border-bottom: 1px solid var(--line);
  background: rgba(13, 15, 18, 0.86);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  padding: 10px 14px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.94rem;
  font-weight: 600;
}

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

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  cursor: pointer;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
}

.hero {
  position: relative;
  min-height: 92svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}

.hero-media,
.hero-media img,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(13, 15, 18, 0.94) 0%, rgba(13, 15, 18, 0.68) 33%, rgba(13, 15, 18, 0.08) 78%),
    linear-gradient(0deg, var(--bg) 0%, rgba(13, 15, 18, 0.04) 36%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 144px clamp(20px, 5vw, 40px) 96px;
}

.eyebrow,
.section-label {
  margin: 0 0 14px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 720px;
  margin-bottom: 8px;
  font-size: clamp(3.8rem, 11vw, 8.8rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.hero-role {
  margin-bottom: 22px;
  color: var(--amber);
  font-size: clamp(1.28rem, 3vw, 2.4rem);
  font-weight: 800;
}

.hero-copy {
  max-width: 690px;
  color: rgba(244, 241, 232, 0.84);
  font-size: clamp(1.04rem, 1.6vw, 1.28rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid transparent;
  font-weight: 800;
}

.button.primary {
  background: var(--text);
  color: #101216;
}

.button.secondary {
  border-color: rgba(255, 255, 255, 0.28);
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
}

.section {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 88px clamp(20px, 5vw, 40px);
}

.intro {
  padding-top: 72px;
}

.intro-grid,
.section-heading,
.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 1.1fr);
  gap: clamp(32px, 7vw, 96px);
  align-items: start;
}

.section-heading {
  align-items: end;
  margin-bottom: 34px;
}

.section-heading:has(> div:only-child) {
  display: block;
}

.section-heading.compact {
  display: block;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4.8vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.section-heading p,
.intro-copy,
.contact p {
  color: var(--muted);
}

.intro-copy p:last-child,
.contact p:last-child {
  margin-bottom: 0;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.project-card {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 18px;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(79, 195, 180, 0.46);
  background: var(--panel-strong);
}

.project-card h3 {
  margin-bottom: 12px;
  font-size: 1.06rem;
  line-height: 1.2;
}

.project-card p {
  color: var(--muted);
  font-size: 0.9rem;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(244, 241, 232, 0.16);
  color: rgba(244, 241, 232, 0.8);
  font-size: 0.78rem;
  font-weight: 700;
}

.status {
  margin-bottom: 18px;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.case-studies {
  padding-top: 20px;
}

.case-study {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: start;
  padding: 42px 0;
  border-top: 1px solid var(--line);
}

.case-study.has-media {
  grid-template-columns: minmax(420px, 1.25fr) minmax(320px, 0.85fr);
  gap: clamp(28px, 5vw, 58px);
  padding: 48px 0;
}

.case-study:last-child {
  border-bottom: 1px solid var(--line);
}

.case-visual {
  position: sticky;
  top: 96px;
}

.case-visual-header {
  margin-bottom: 20px;
}

.case-visual-header h3 {
  margin-bottom: 14px;
  font-size: clamp(1.9rem, 4.2vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.case-visual-header .case-summary {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.02rem;
}

.case-visual-header .project-meta {
  margin-top: 18px;
  margin-bottom: 0;
}

.case-study.has-media .case-visual {
  position: sticky;
}

.brain-model-card {
  position: relative;
  height: clamp(210px, 24vw, 300px);
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid rgba(244, 241, 232, 0.16);
  background:
    radial-gradient(circle at 42% 52%, rgba(79, 195, 180, 0.2), transparent 32%),
    linear-gradient(145deg, rgba(19, 26, 33, 0.96), rgba(5, 7, 11, 0.98));
  box-shadow: var(--shadow);
  isolation: isolate;
}

.brain-model-card--content {
  height: clamp(220px, 26vw, 320px);
  margin-bottom: 24px;
}

.brain-model-card::before {
  content: "";
  position: absolute;
  inset: 14px;
  z-index: -1;
  border: 1px solid rgba(244, 241, 232, 0.08);
  background-image:
    linear-gradient(rgba(244, 241, 232, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 241, 232, 0.055) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at center, #000, transparent 72%);
}

.brain-model-card canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

.brain-model-card canvas:active {
  cursor: grabbing;
}

.site-preview-card {
  position: relative;
  height: clamp(240px, 28vw, 340px);
  margin-bottom: 24px;
  overflow: hidden;
  border: 1px solid rgba(244, 241, 232, 0.16);
  background:
    radial-gradient(circle at 52% 48%, rgba(79, 195, 180, 0.16), transparent 28%),
    linear-gradient(145deg, rgba(19, 26, 33, 0.96), rgba(5, 7, 11, 0.98));
  box-shadow: var(--shadow);
}

.site-preview-card iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1600px;
  height: 900px;
  border: 0;
  transform: translate(-50%, -50%) scale(0.62);
  transform-origin: center;
}

.site-preview-card--earth iframe {
  top: 52%;
  transform: translate(-50%, -50%) scale(0.64);
}

.site-preview-expand {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(244, 241, 232, 0.22);
  background: rgba(5, 7, 11, 0.68);
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 800;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.site-preview-expand:hover {
  border-color: rgba(79, 195, 180, 0.64);
  color: var(--teal);
}

.brain-model-overlay {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(244, 241, 232, 0.14);
  background: rgba(5, 7, 11, 0.68);
  backdrop-filter: blur(12px);
  pointer-events: none;
}

.brain-model-overlay span {
  color: var(--teal);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brain-model-overlay strong {
  color: var(--text);
  font-size: 0.92rem;
}

.media-frame {
  min-height: 360px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(79, 195, 180, 0.16), transparent 36%),
    linear-gradient(315deg, rgba(227, 166, 75, 0.16), transparent 42%),
    #12161b;
  box-shadow: var(--shadow);
}

.case-study.has-media .media-frame {
  min-height: 0;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #05070b;
  box-shadow: var(--shadow);
}

.media-placeholder {
  width: calc(100% - 40px);
  min-height: 280px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(244, 241, 232, 0.3);
  color: var(--muted);
  text-align: center;
  padding: 22px;
}

.media-placeholder strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
}

.media-placeholder span {
  display: block;
  margin-top: 8px;
  color: var(--soft);
  font-size: 0.9rem;
}

.media-carousel {
  width: 100%;
}

.media-carousel--phone .screenshot-link {
  height: clamp(520px, 72vw, 720px);
}

.media-slides {
  position: relative;
  width: 100%;
  overflow: hidden;
  touch-action: pan-y;
}

.media-slide {
  display: none;
  margin: 0;
}

.media-slide.is-active {
  display: block;
}

.media-slide.is-leaving {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  background: #05070b;
  pointer-events: none;
}

.media-slide.is-entering {
  position: relative;
  z-index: 2;
}

.media-slide.is-entering.from-next {
  animation: slideInNext 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.media-slide.is-entering.from-prev {
  animation: slideInPrev 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.media-slide.is-leaving.from-next {
  animation: slideOutNext 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.media-slide.is-leaving.from-prev {
  animation: slideOutPrev 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.screenshot-link {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: clamp(300px, 38vw, 430px);
  padding: 10px;
  border: 0;
  background:
    radial-gradient(circle at 50% 48%, rgba(79, 195, 180, 0.08), transparent 34%),
    #05070b;
  cursor: zoom-in;
}

.screenshot-link::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 3px solid rgba(244, 241, 232, 0.16);
  border-top-color: var(--teal);
  border-radius: 999px;
  opacity: 0;
  animation: spin 0.8s linear infinite;
  pointer-events: none;
}

.screenshot-link:has(img.is-loading)::after {
  opacity: 1;
}

.media-slide img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  object-position: center;
  opacity: 1;
  transition: opacity 180ms ease;
}

.media-slide img.is-loading {
  opacity: 0.22;
}

.media-slide figcaption {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-top: 1px solid rgba(244, 241, 232, 0.12);
  background: rgba(13, 15, 18, 0.94);
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.media-slide figcaption span {
  flex: 0 0 auto;
  color: var(--teal);
  font-weight: 700;
}

.carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(244, 241, 232, 0.1);
  background: rgba(5, 7, 11, 0.96);
}

.carousel-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 1px solid rgba(244, 241, 232, 0.34);
  border-radius: 999px;
  background: rgba(244, 241, 232, 0.22);
  cursor: pointer;
}

.carousel-dots button.is-active {
  width: 28px;
  background: var(--teal);
  border-color: var(--teal);
}

.lightbox[hidden] {
  display: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 34px);
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(14px);
}

.lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 1320px);
  max-height: min(92vh, 900px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(244, 241, 232, 0.18);
  background: #07090d;
  box-shadow: 0 30px 110px rgba(0, 0, 0, 0.56);
}

.lightbox-topbar {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(244, 241, 232, 0.12);
}

.lightbox-kicker {
  margin: 0 0 4px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lightbox-topbar h2 {
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.45rem);
  line-height: 1.25;
}

.lightbox-close {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid rgba(244, 241, 232, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-stage {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 16px 64px;
  touch-action: pan-y;
  background:
    linear-gradient(135deg, rgba(79, 195, 180, 0.08), transparent 32%),
    linear-gradient(315deg, rgba(227, 166, 75, 0.07), transparent 38%),
    #05070b;
}

.lightbox-stage img {
  max-width: 100%;
  max-height: min(62vh, 620px);
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 1;
  transition: opacity 140ms ease;
}

.lightbox-stage img.is-loading {
  opacity: 0.28;
}

.lightbox-stage::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 3px solid rgba(244, 241, 232, 0.18);
  border-top-color: var(--teal);
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  animation: spin 800ms linear infinite;
}

.lightbox-stage:has(img.is-loading)::after {
  opacity: 1;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 46px;
  height: 64px;
  transform: translateY(-50%);
  border: 1px solid rgba(244, 241, 232, 0.18);
  background: rgba(13, 15, 18, 0.74);
  color: var(--text);
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-nav.prev {
  left: 14px;
}

.lightbox-nav.next {
  right: 14px;
}

.lightbox-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 14px;
  border-top: 1px solid rgba(244, 241, 232, 0.12);
  background: rgba(13, 15, 18, 0.96);
}

.lightbox-thumbs button {
  width: 118px;
  height: 70px;
  flex: 0 0 auto;
  padding: 0;
  overflow: hidden;
  border: 2px solid rgba(244, 241, 232, 0.16);
  background: #05070b;
  cursor: pointer;
}

.lightbox-thumbs button.is-active {
  border-color: var(--teal);
}

.lightbox-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.case-link {
  display: inline-flex;
  margin: 6px 0 22px;
  color: var(--teal);
  font-weight: 800;
}

.case-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 6px 0 22px;
}

.case-links .case-link {
  margin: 0;
  min-height: 40px;
  align-items: center;
  border: 1px solid rgba(79, 195, 180, 0.36);
  padding: 0 12px;
  background: rgba(79, 195, 180, 0.08);
  color: var(--teal);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.resource-viewer[hidden] {
  display: none;
}

.resource-viewer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 34px);
}

.resource-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.84);
  backdrop-filter: blur(14px);
}

.resource-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 1320px);
  height: min(92vh, 900px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(244, 241, 232, 0.18);
  background: #f7f8fa;
  box-shadow: 0 30px 110px rgba(0, 0, 0, 0.56);
}

.resource-topbar {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(244, 241, 232, 0.12);
  background: #07090d;
}

.resource-kicker {
  margin: 0 0 4px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.resource-topbar h2 {
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.45rem);
  line-height: 1.25;
}

.resource-close {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid rgba(244, 241, 232, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.resource-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #f7f8fa;
}

.preview-viewer[hidden] {
  display: none;
}

.preview-viewer {
  position: fixed;
  inset: 0;
  z-index: 65;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 32px);
}

.preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(14px);
}

.preview-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 1380px);
  height: min(88vh, 820px);
  overflow: hidden;
  border: 1px solid rgba(244, 241, 232, 0.2);
  background: #02050a;
  box-shadow: 0 30px 110px rgba(0, 0, 0, 0.62);
}

.preview-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(244, 241, 232, 0.24);
  background: rgba(5, 7, 11, 0.72);
  color: var(--text);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.preview-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.preview-stage iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@keyframes slideInNext {
  from {
    opacity: 0.68;
    transform: translateX(42px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutNext {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0.25;
    transform: translateX(-42px);
  }
}

@keyframes slideInPrev {
  from {
    opacity: 0.68;
    transform: translateX(-42px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutPrev {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0.25;
    transform: translateX(42px);
  }
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.detail {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  padding: 16px;
}

.detail h4 {
  margin: 0 0 8px;
  color: var(--amber);
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.detail p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.case-bullets {
  display: grid;
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.case-bullets li {
  position: relative;
  padding-left: 22px;
  color: var(--muted);
}

.case-bullets li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 7px;
  height: 7px;
  background: var(--teal);
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 34px;
}

.skill-group {
  border-top: 2px solid var(--red);
  background: rgba(255, 255, 255, 0.035);
  padding: 20px;
}

.skill-group:nth-child(2) {
  border-color: var(--teal);
}

.skill-group:nth-child(3) {
  border-color: var(--amber);
}

.skill-group h3 {
  margin-bottom: 12px;
}

.skill-group p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.contact {
  width: min(100%, var(--max));
  align-items: center;
}

.contact-panel {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 18px;
}

.contact-panel a {
  display: flex;
  align-items: center;
  min-height: 48px;
  border: 1px solid rgba(244, 241, 232, 0.14);
  padding: 0 14px;
  color: var(--muted);
  font-weight: 700;
}

.contact-panel a:hover,
.contact-panel a:focus-visible {
  border-color: rgba(79, 195, 180, 0.46);
  color: var(--text);
}

.site-footer {
  width: min(100%, var(--max));
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto;
  padding: 34px clamp(20px, 5vw, 40px) 44px;
  border-top: 1px solid var(--line);
  color: var(--soft);
}

.site-footer a {
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 1080px) {
  .project-grid,
  .skill-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .site-header {
    padding: 14px 20px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    top: 67px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 20px 22px;
    border-bottom: 1px solid var(--line);
    background: rgba(13, 15, 18, 0.97);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    min-height: 46px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(244, 241, 232, 0.08);
    padding: 0;
  }

  .hero {
    min-height: 88svh;
  }

  .hero-overlay {
    background:
      linear-gradient(90deg, rgba(13, 15, 18, 0.96), rgba(13, 15, 18, 0.66)),
      linear-gradient(0deg, var(--bg) 0%, rgba(13, 15, 18, 0.18) 42%);
  }

  .intro-grid,
  .section-heading,
  .case-study,
  .case-study.has-media,
  .contact {
    grid-template-columns: 1fr;
  }

  .case-visual {
    position: static;
  }

  .case-study.has-media .case-visual {
    position: static;
    display: contents;
  }

  .case-study.has-media .case-visual-header {
    order: 1;
  }

  .case-study.has-media .case-content {
    order: 2;
  }

  .case-study.has-media .media-frame {
    order: 3;
    margin-top: 8px;
  }

  .section {
    padding-top: 68px;
    padding-bottom: 68px;
  }

  .lightbox-stage {
    padding: 12px 48px;
  }

  .lightbox-stage img {
    max-height: 58vh;
  }
}

@media (max-width: 620px) {
  h1 {
    font-size: clamp(3.2rem, 18vw, 4.6rem);
  }

  .project-grid,
  .skill-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    min-height: 0;
  }

  .media-frame {
    min-height: 300px;
  }

  .screenshot-link {
    height: clamp(280px, 72vw, 390px);
  }

  .media-carousel--phone .screenshot-link {
    height: clamp(500px, 78svh, 680px);
  }

  .media-slide figcaption {
    display: block;
  }

  .media-slide figcaption span {
    display: block;
    margin-top: 6px;
  }

  .lightbox {
    padding: 10px;
  }

  .lightbox-topbar {
    padding: 14px;
  }

  .lightbox-stage {
    padding: 10px 0 58px;
  }

  .lightbox-nav {
    top: auto;
    bottom: 8px;
    width: 44px;
    height: 42px;
    transform: none;
  }

  .lightbox-nav.prev {
    left: calc(50% - 52px);
  }

  .lightbox-nav.next {
    right: calc(50% - 52px);
  }

  .lightbox-thumbs button {
    width: 92px;
    height: 56px;
  }

  .site-footer {
    flex-direction: column;
  }
}
