@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@300;400&family=DM+Sans:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,700;1,400;1,700&display=swap");

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

:root {
  --serif: "Playfair Display", Georgia, serif;
  --mono: "DM Mono", monospace;
  --sans: "DM Sans", "Avenir Next", sans-serif;
}

html {
  scroll-behavior: smooth;
  min-height: 100%;
}

body {
  min-height: 100%;
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.6;
  background: var(--paper);
}

body.theme-light {
  --paper: #FFFFFF;
}

body.theme-dark {
  --paper: #37000A;
}

p {
  font-family: var(--sans);
}

@media (hover: hover) and (pointer: fine) {
  body,
  button,
  a,
  [data-hover] {
    cursor: none;
  }
}

button,
a,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: inherit;
}

.app-shell {
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  transition: background 0.35s, color 0.35s;
}

.app-shell.theme-light {
  --ink: #000000;
  --paper: #FFFFFF;
  --muted: rgba(0, 0, 0, 0.6);
  --accent: #13007C;
  --accent-soft: rgba(19, 0, 124, 0.6);
  --rule: rgba(0, 0, 0, 0.08);
  --nav-bg: rgba(255, 254, 251, 0.97);
  --card-rule: rgba(19, 0, 124, 0.1);
  --surface: #FFFFFF;
  --surface-soft: rgba(19, 0, 124, 0.04);
  --surface-strong: rgba(19, 0, 124, 0.08);
  --stroke: #37000A;
  --radius-block: 10px;
}

.app-shell.theme-dark {
  --ink: #FFFEFB;
  --paper: #37000A;
  --muted: rgba(255, 254, 251, 0.6);
  --accent: #04A777;
  --accent-soft: rgba(4, 167, 119, 0.6);
  --rule: rgba(255, 254, 251, 0.18);
  --nav-bg: rgba(55, 0, 10, 0.9);
  --card-rule: rgba(4, 167, 119, 0.12);
  --surface: #1A1A1A;
  --surface-soft: rgba(255, 254, 251, 0.06);
  --surface-strong: rgba(255, 254, 251, 0.1);
  --stroke: #37000A;
  --radius-block: 10px;
}

.nav-button,
.button-ghost,
.nav-dropdown-button,
.nav-social-link,
.theme-toggle,
.tag-pill,
.project-card-title,
.project-card-copy,
.detail-toc-link,
.detail-section-copy,
.case-study-section-body,
.case-study-section-kicker,
.case-study-meta-label,
.case-study-meta-value,
.site-footer-copy,
.site-footer-link,
.contact-link,
.about-copy,
.about-title,
.bio-intro-copy,
.hero-summary,
.hero-proof-item,
.hero-scroll-label,
.section-header-index,
.section-header-title,
.detail-meta-label,
.detail-meta-value,
.detail-overview,
.skills-canvas-note,
.skill-node-sub {
  transition: color 0.3s, background 0.3s, border-color 0.3s;
}

.dynaspot {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2000;
  width: 16px;
  height: 16px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.16s ease;
}

.dynaspot.is-visible {
  opacity: 1;
}

.dynaspot-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.dynaspot-ring {
  width: 16px;
  height: 16px;
  background: rgba(255, 254, 251, 0.36);
  border: 1px solid var(--rule);
  transition: transform 0.18s cubic-bezier(.16, 1, .3, 1), background 0.18s ease, border-color 0.18s ease;
}

.dynaspot-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  background: rgba(55, 0, 10, 0.78);
  transition: transform 0.18s cubic-bezier(.16, 1, .3, 1), background 0.18s ease;
}

.dynaspot.is-hovering .dynaspot-ring {
  transform: translate(-50%, -50%) scale(2.6);
  background: rgba(255, 254, 251, 0.42);
  border-color: var(--accent-soft);
}

.dynaspot.is-hovering .dynaspot-dot {
  background: rgba(55, 0, 10, 0.82);
}

.dynaspot.is-pressed .dynaspot-ring {
  transform: translate(-50%, -50%) scale(2.2);
}

.dynaspot.is-pressed .dynaspot-dot {
  transform: translate(-50%, -50%) scale(1.08);
}

.theme-dark .dynaspot-ring {
  background: rgba(255, 254, 251, 0.12);
  border-color: rgba(255, 254, 251, 0.12);
}

.theme-dark .dynaspot-dot {
  background: rgba(255, 254, 251, 0.92);
}

.theme-dark .dynaspot.is-hovering .dynaspot-ring {
  background: rgba(255, 254, 251, 0.16);
  border-color: var(--accent-soft);
}

.theme-dark .dynaspot.is-hovering .dynaspot-dot {
  background: rgba(4, 167, 119, 0.96);
}

.type-reveal-word {
  display: inline-block;
  margin-right: 0.28em;
  overflow: hidden;
  vertical-align: baseline;
  padding-bottom: 0.28em;
}

.type-reveal-char {
  display: inline-block;
}

.eyebrow,
.label-inline,
.section-header-index,
.section-header-title,
.hero-stat-label,
.skills-canvas-note,
.contact-link-label,
.site-footer-copy,
.detail-section-index {
  font-family: var(--mono);
  text-transform: uppercase;
}

.eyebrow,
.label-inline {
  color: var(--muted);
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
}

.label-inline {
  font-size: 10px;
  letter-spacing: 0.14em;
}

.site-nav {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 500;
  width: min(80vw, 1240px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 18px 28px;
  border: 1.5px solid var(--stroke);
  border-radius: 999px;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  transform: translateX(-50%);
}

.site-nav-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.nav-button.nav-button-brand {
  border: none;
  background: none;
  padding: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-transform: none;
  white-space: nowrap;
}

.nav-brand-img {
  height: 22px;
  width: auto;
  display: inline-block;
  vertical-align: middle;
}

.site-nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}

.nav-dropdown-wrap {
  position: relative;
}

.nav-dropdown-wrap::after {
  content: "";
  display: none;
  position: absolute;
  top: 100%;
  left: -12px;
  right: -12px;
  height: 18px;
}

.nav-dropdown-wrap:hover::after,
.nav-dropdown-wrap.is-open::after {
  display: block;
}

.nav-button,
.button-ghost {
  border: none;
  background: none;
  padding: 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.nav-button:hover,
.button-ghost:hover,
.contact-modal-close:hover {
  color: var(--ink);
}

.nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  min-width: 170px;
  transform: translateX(-50%);
  border: 1px solid var(--rule);
  border-radius: var(--radius-block);
  background: var(--surface);
  animation: fadeIn 0.15s ease;
}

.nav-dropdown-wrap:hover .nav-dropdown {
  display: block;
}

.nav-dropdown-wrap.is-open .nav-dropdown {
  display: block;
}

.nav-dropdown-button {
  display: block;
  width: 100%;
  border: none;
  background: none;
  padding: 14px 20px;
  color: var(--ink);
  text-align: left;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-dropdown-button:hover {
  background: var(--surface-soft);
  color: var(--accent);
}

.nav-dropdown-button-bordered {
  border-bottom: 1px solid var(--rule);
}

.nav-socials {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-social-link:hover {
  color: var(--accent);
  transform: translateY(-1px);
}

.nav-social-svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 0.6;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  padding: 0;
  color: var(--muted);
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-light .theme-toggle {
  border: none;
  background: #800017;
  color: var(--paper);
}

.theme-light .theme-toggle:hover {
  border: none;
  color: var(--paper);
}

.theme-light .nav-social-link,
.theme-light .nav-social-link:hover {
  color: #37000A;
}

.theme-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle-svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.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;
}

.hero-scene {
  height: 200vh;
}

.hero {
  position: sticky;
  top: 0;
  z-index: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  justify-content: space-between;
  padding: 120px min(200px, 14vw) 88px;
}

.hero-top {
  display: flex;
  justify-content: flex-end;
  position: relative;
  z-index: 2;
}

.hero::before {
  content: none;
}

.hero-side-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
  margin-top: 48px;
}

.hero-actions {
  margin-top: 56px;
  margin-left: -48px;
  position: relative;
  z-index: 2;
}

.hero-btn-drag-wrap {
  position: relative;
  cursor: grab;
  user-select: none;
  touch-action: none;
}


.hero-btn-drag-wrap:active {
  cursor: grabbing;
}

@keyframes hero-side-shake-1 {
  0%   { transform: rotate(4deg); }
  15%  { transform: rotate(-6deg); }
  30%  { transform: rotate(5deg); }
  45%  { transform: rotate(-4deg); }
  60%  { transform: rotate(3deg); }
  75%  { transform: rotate(-2deg); }
  90%  { transform: rotate(1deg); }
  100% { transform: rotate(4deg); }
}

@keyframes hero-side-shake-2 {
  0%   { transform: rotate(-3deg); }
  15%  { transform: rotate(6deg); }
  30%  { transform: rotate(-5deg); }
  45%  { transform: rotate(4deg); }
  60%  { transform: rotate(-3deg); }
  75%  { transform: rotate(2deg); }
  90%  { transform: rotate(-1deg); }
  100% { transform: rotate(-3deg); }
}

.hero-side-btn {
  display: inline-block;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(.34,1.56,.64,1), opacity 0.2s ease;
}

.hero-side-btn:nth-child(1) {
  transform: rotate(4deg);
  animation: hero-side-shake-1 0.55s ease-in-out 2.6s 2;
}

.hero-side-btn:nth-child(2) {
  transform: rotate(-3deg);
  animation: hero-side-shake-2 0.55s ease-in-out 3.2s 2;
}

.hero-side-btn:nth-child(1):hover {
  transform: rotate(-4deg) translateY(-3px);
  animation: none;
}

.hero-side-btn:nth-child(2):hover {
  transform: rotate(4deg) translateY(-3px);
  animation: none;
}

.hero-side-img {
  display: block;
  height: 70px;
  width: auto;
}

.hero-main {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 24px;
  margin-top: -80px;
}

.hero-main,
.hero-scroll {
  position: relative;
  z-index: 1;
}

.hero-copy {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
}

.hero-label {
  margin-bottom: 14px;
  letter-spacing: 0.18em;
  animation: fadeUp 0.8s 0.1s both;
}

.hero-greeting {
  margin-bottom: 14px;
  color: var(--accent);
  font-family: var(--sans);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 600;
  animation: fadeUp 0.8s 0.25s both;
}

.hero-greeting-img {
  height: clamp(27px, 2.5vw, 34px);
  width: auto;
  display: inline-block;
  vertical-align: middle;
}

.hero-summary {
  max-width: 100%;
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(16px, 1.5vw, 20px);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.01em;
  animation: fadeUp 0.9s 0.55s both;
}

.bio-intro {
  margin-top: 12px;
  max-width: 100%;
}

.bio-intro-line {
  font-family: var(--sans);
  color: var(--muted);
  font-size: clamp(14px, 1.2vw, 16px);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.bio-intro-copy {
  display: inline;
  color: var(--muted);
  font-size: inherit;
  line-height: inherit;
}

.bio-chip-group {
  display: inline;
}

.bio-chip {
  display: inline;
  vertical-align: baseline;
  border: 0;
  background: transparent;
  margin: 0;
  padding: 0;
  color: var(--ink);
  white-space: inherit;
  box-shadow: none;
  transition: color 0.25s ease;
}

.bio-chip:hover,
.bio-chip.is-active {
  color: var(--ink);
}

.bio-chip-label {
  display: inline;
  font-family: var(--sans);
  font-size: 1em;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-transform: none;
  border-radius: 3px;
  background: rgba(55, 0, 10, 0.06);
  color: var(--ink);
  border: none;
  box-shadow: none;
  padding: 0.08em 0.36em;
  transition: background 0.18s ease;
}

.theme-dark .bio-chip-label {
  background: rgba(255, 254, 251, 0.1);
  color: var(--ink);
}

.bio-chip:hover .bio-chip-label,
.bio-chip.is-active .bio-chip-label {
  background: rgba(19, 0, 124, 0.09);
  color: var(--accent);
  box-shadow: none;
}

.bio-chip-detail {
  display: inline;
  opacity: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1em;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-transform: none;
  white-space: inherit;
  transition: opacity 0.22s ease;
}

.bio-chip-detail.is-visible {
  opacity: 1;
}


@keyframes hero-work-shake {
  0%   { transform: rotate(-6deg); }
  15%  { transform: rotate(6deg); }
  30%  { transform: rotate(-5deg); }
  45%  { transform: rotate(5deg); }
  60%  { transform: rotate(-3deg); }
  75%  { transform: rotate(3deg); }
  90%  { transform: rotate(-1deg); }
  100% { transform: rotate(-6deg); }
}

.hero-work-img-btn {
  display: inline-block;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transform: rotate(-6deg);
  transform-origin: center center;
  animation: hero-work-shake 0.55s ease-in-out 1.4s 2;
  transition: transform 0.25s cubic-bezier(.34,1.56,.64,1);
}

.hero-work-img-btn:hover {
  transform: rotate(6deg) translateY(-4px);
  animation: none;
}

.hero-work-img {
  display: block;
  height: 80px;
  width: auto;
}

.hero-work-cluster {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.hero-work-branches {
  position: absolute;
  top: 50%;
  left: calc(100% + 8px);
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-work-branch {
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-8px);
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(.34,1.56,.64,1);
}

.hero-work-cluster:hover .hero-work-branch {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.hero-work-cluster:hover .hero-work-branch:nth-child(1),
.hero-work-cluster.is-touch-open .hero-work-branch:nth-child(1) {
  transition-delay: 0ms;
}

.hero-work-cluster:hover .hero-work-branch:nth-child(2),
.hero-work-cluster.is-touch-open .hero-work-branch:nth-child(2) {
  transition-delay: 100ms;
}

.hero-work-cluster.is-touch-open .hero-work-branch {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.hero-work-branch-arrow {
  display: block;
  height: auto;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.hero-work-branch:nth-child(1) .hero-work-branch-arrow { width: 82px; }
.hero-work-branch:nth-child(2) .hero-work-branch-arrow { width: 89px; }

.hero-work-branch-btn {
  display: inline-block;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(.34,1.56,.64,1), opacity 0.2s ease;
}

.hero-work-branch-img {
  display: block;
  height: auto;
}

.hero-work-branch:nth-child(1) .hero-work-branch-img { width: 140px; }
.hero-work-branch:nth-child(2) .hero-work-branch-img { width: 125px; }

.hero-work-branch:nth-child(1) .hero-work-branch-btn {
  transform: rotate(3deg);
  animation: hero-side-shake-2 0.55s ease-in-out 2.8s 2;
}

.hero-work-branch:nth-child(2) .hero-work-branch-btn {
  transform: rotate(-2deg);
  animation: hero-side-shake-1 0.55s ease-in-out 3.5s 2;
}

.hero-work-branch:nth-child(1) .hero-work-branch-btn:hover {
  transform: rotate(-3deg) translateY(-3px);
  animation: none;
}

.hero-work-branch:nth-child(2) .hero-work-branch-btn:hover {
  transform: rotate(3deg) translateY(-3px);
  animation: none;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  gap: 8px 18px;
  animation: fadeUp 0.8s 0.9s both;
}

.hero-proof-item {
  position: relative;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.hero-proof-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -13px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(19, 0, 124, 0.34);
  transform: translateY(-50%);
}

.theme-dark .hero-summary,
.theme-dark .bio-intro-line,
.theme-dark .hero-proof-item {
  color: rgba(255, 254, 251, 0.82);
}

.theme-dark .hero-proof-item:not(:last-child)::after {
  background: rgba(4, 167, 119, 0.4);
}


.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s 2s infinite;
}

.hero-scroll-label {
  color: var(--muted);
  opacity: 0.6;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.content-section,
.page-shell {
  padding: 80px 56px 100px;
}

.content-section {
  margin: 0 24px 24px;
  border: 1.5px solid var(--stroke);
  border-radius: var(--radius-block);
  background: var(--surface);
}

.theme-light .content-section {
  background: #FFFEFB;
}

.content-section-skills {
  padding-top: 48px;
  padding-bottom: 120px;
}

.stack-bg-fade {
  position: fixed;
  inset: 0;
  background: var(--paper);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  will-change: opacity;
}

.stack-sequence {
  position: relative;
  z-index: 1;
  margin-top: -100vh;
  --stack-top: 72px;
  --stack-panel-gap: 24px;
  padding-bottom: 12vh;
  pointer-events: none;
}

.stack-sticky {
  position: sticky;
  top: var(--stack-top);
  pointer-events: auto;
  height: calc(100vh - var(--stack-top) - 4px);
}

.stack-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}

.stack-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("assets/paper texture 1.jpg");
  background-size: cover;
  background-position: center;
  opacity: 0.2;
  pointer-events: none;
  border-radius: inherit;
  z-index: 0;
}

.stack-panel > * {
  position: relative;
  z-index: 1;
}

.project-card::before,
.contact-modal::before,
.site-footer::before,
.nav-dropdown::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("assets/paper texture 1.jpg");
  background-size: cover;
  background-position: center;
  opacity: 0.2;
  pointer-events: none;
  border-radius: inherit;
  z-index: 0;
}
  transform-origin: center top;
  will-change: transform, box-shadow;
}

.stack-panel.content-section {
  margin-bottom: 0;
  overflow: hidden;
}

.stack-panel-work {
  z-index: 1;
  padding: 32px 36px 80px;
}

.stack-panel-work .section-header {
  margin-bottom: 24px;
  padding-bottom: 10px;
}

.stack-panel-skills {
  z-index: 2;
  transform: translateY(calc(100% + var(--stack-panel-gap)));
}

.stack-panel-skills .stack-panel-body {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-soft) transparent;
}

.stack-panel-skills .stack-panel-body::-webkit-scrollbar {
  width: 3px;
}

.stack-panel-skills .stack-panel-body::-webkit-scrollbar-track {
  background: transparent;
}

.stack-panel-skills .stack-panel-body::-webkit-scrollbar-thumb {
  background: var(--accent-soft);
  border-radius: 999px;
}

.stack-panel-about {
  z-index: 3;
  padding: 32px 36px 36px;
  transform: translateY(calc(100% + var(--stack-panel-gap)));
  overflow: visible;
}

.stack-panel-about .stack-panel-body {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-soft) transparent;
  padding-right: 8px;
}

.stack-panel-about .stack-panel-body::-webkit-scrollbar {
  width: 3px;
}

.stack-panel-about .stack-panel-body::-webkit-scrollbar-track {
  background: transparent;
}

.stack-panel-about .stack-panel-body::-webkit-scrollbar-thumb {
  background: var(--accent-soft);
  border-radius: 999px;
}

.stack-panel-about .about-grid {
  min-height: 100%;
  grid-template-columns: minmax(180px, 0.72fr) minmax(0, 1.28fr);
  gap: 48px;
}

.stack-panel-about .about-photo {
  max-width: 400px;
  width: 100%;
  margin: 0 auto;
}

.stack-panel-about .about-title {
  line-height: 1.2;
  padding-top: 6px;
}

.stack-panel-body {
  flex: 1 1 auto;
  min-height: 0;
}

.stack-panel-body-scroll {
  overflow: clip;
}

.stack-panel-body-inner {
  will-change: transform;
}

.stack-scrollbar {
  position: absolute;
  right: 10px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--rule);
  border-radius: 999px;
  pointer-events: none;
}

.stack-scrollbar-thumb {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 40px;
  background: var(--accent-soft);
  border-radius: 999px;
  transition: opacity 0.2s ease;
}

.stack-panel-body-scroll .project-grid {
  align-content: start;
  gap: 4px;
  padding-bottom: 16px;
  grid-auto-rows: 1fr;
}

.project-stack-body {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.project-stack {
  display: grid;
  overflow: hidden;
  width: min(700px, 100%);
}

.project-stack-item {
  grid-area: 1 / 1;
  transform-origin: 50% 0%;
  will-change: transform;
}

.stack-panel-work .project-card {
  padding: 14px;
  background: var(--surface);
  border: 1px solid rgba(19, 0, 124, 0.32);
}

.stack-panel-work .project-card-preview {
  margin-bottom: 10px;
  aspect-ratio: 16 / 7;
  border-color: rgba(19, 0, 124, 0.38);
}

.stack-panel-work .project-card-title {
  margin-bottom: 6px;
}

.stack-panel-work .project-card-copy {
  font-size: 13px;
  line-height: 1.5;
}

.stack-panel-work .project-card-link {
  margin-top: 10px;
}

.page-shell {
  width: min(80vw, 1240px);
  min-height: calc(100vh - 48px);
  padding-top: 120px;
  padding-bottom: 80px;
  margin: 24px auto;
  border: 1px solid var(--rule);
  border-radius: var(--radius-block);
  background: var(--surface);
}

.page-shell-narrow {
  max-width: 920px;
  margin: 0 auto;
}

.section-header,
.detail-section-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.section-header {
  margin-bottom: 52px;
  padding-bottom: 16px;
  gap: 20px;
}

.section-header-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  color: #37000A;
  background: #F7CE5B;
  font-size: 11px;
  letter-spacing: 0.1em;
}

.stack-panel-skills .section-header-index {
  color: #FFFEFB;
  background: #04A777;
}

.stack-panel-about .section-header-index {
  color: #FFFEFB;
  background: #E34A6F;
}

.section-header-title {
  color: var(--ink);
  font-size: 13px;
  letter-spacing: 0.14em;
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}

.project-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: var(--radius-block);
  background: var(--surface-soft);
  padding: 40px;
  cursor: inherit;
  transition: transform 0.4s cubic-bezier(.16, 1, .3, 1), border-color 0.3s ease, background 0.35s;
}

.project-card:hover {
  transform: scale(0.965);
  border-color: var(--accent-soft);
  background: var(--surface);
}

.project-card-tags {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 6px;
}

.tag-pill {
  border: 1px solid var(--rule);
  border-radius: var(--radius-block);
  background: var(--surface);
  padding: 4px 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.project-card-preview,
.detail-cover,
.about-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rule);
  border-radius: var(--radius-block);
  background: var(--surface-soft);
}

.project-card-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 28px;
  overflow: hidden;
  background: var(--preview-stage-bg, #FFFEFB);
  border: 1px solid rgba(19, 0, 124, 0.08);
  border-radius: calc(var(--radius-block) - 2px);
}

.project-card-preview-image,
.detail-cover-image,
.detail-gallery-image {
  display: block;
  width: 100%;
  height: 100%;
}

.detail-cover-image {
  object-fit: cover;
}

.detail-cover-image,
.detail-gallery-image,
.case-study-media-image {
  cursor: zoom-in;
}

.project-card-preview-image {
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  height: 100%;
  object-fit: var(--preview-image-fit, contain);
  object-position: var(--preview-image-position, center);
  padding: var(--preview-image-padding, 14px);
  transform: scale(var(--preview-image-scale, 1));
  transition: transform 0.45s cubic-bezier(.16, 1, .3, 1);
}

.project-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(19, 0, 124, 0.75);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: inherit;
}

.project-card-overlay-text {
  color: #FFFEFB;
  font-family: var(--sans);
  font-size: clamp(11px, 1.4vw, 14px);
  font-weight: 400;
  line-height: 1.55;
  text-align: center;
}

.project-card:hover .project-card-overlay {
  opacity: 1;
}

.project-card:hover .project-card-preview-image {
  transform: scale(calc(var(--preview-image-scale, 1) * 1.03));
}

.project-card-subtitle {
  margin-bottom: 8px;
}

.project-card-title {
  margin-bottom: 12px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.project-card-methods {
  margin-top: 6px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.01em;
}

.project-card-copy {
  display: none;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

@media (hover: none) {
  .project-card-overlay {
    display: none;
  }

  .project-card-copy {
    display: block;
    margin-top: 12px;
  }
}

.project-card-link {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  opacity: 0.75;
  transition: opacity 0.3s ease;
}

.project-card:hover .project-card-link {
  opacity: 1;
}

.theme-dark .project-card-preview {
  border-color: transparent;
}

.theme-dark .project-card-link {
  opacity: 1;
}

.project-card-link-text {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-card-link-arrow {
  color: var(--accent);
  font-size: 14px;
}

.skills-canvas {
  position: relative;
  width: 100%;
  height: 380px;
  user-select: none;
  overflow: visible;
}

.skills-canvas-note {
  background: none;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.12em;
  pointer-events: none;
  margin-left: 4px;
}

.skill-node {
  position: absolute;
  transform: translate(-50%, -50%);
  user-select: none;
}

.skill-node-sub {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 200;
  white-space: nowrap;
  border: 1px solid var(--rule);
  border-radius: var(--radius-block);
  background: var(--surface);
  padding: 5px 12px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: transform 0.4s cubic-bezier(.34, 1.4, .64, 1) var(--sub-delay, 0ms), opacity 0.22s ease var(--sub-opacity-delay, 0ms);
}

.skill-node-chip {
  position: relative;
  z-index: 2;
  border: 1px solid var(--skill-color, var(--rule));
  border-radius: var(--radius-block);
  background: var(--skill-color, var(--surface));
  padding: 10px 22px;
  color: #FFFEFB;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: grab;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s, filter 0.2s;
}

.skill-node-chip:active {
  cursor: grabbing;
}

.skill-node:hover .skill-node-chip,
.skill-node.is-expanded .skill-node-chip,
.skill-node-chip.is-hovered {
  border-color: var(--skill-color, var(--accent));
  background: var(--skill-color, var(--accent));
  filter: brightness(1.25);
  color: #FFFEFB;
  transform: scale(1.05);
}

.skill-node:hover .skill-node-sub,
.skill-node.is-expanded .skill-node-sub {
  opacity: 1;
  pointer-events: auto;
  transform: translate(calc(-50% + var(--tx, 0px)), calc(-50% + var(--ty, 0px)));
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 72px;
  align-items: start;
}

.about-photo {
  display: block;
  border: none;
  border-radius: 0;
  background: none;
  aspect-ratio: unset;
}

.about-photo-img {
  display: block;
  width: 100%;
  height: auto;
}

.about-title {
  display: block;
  margin-bottom: 28px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.about-copy {
  color: #37000A;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.75;
}

.about-copy:first-child {
  margin-top: 8px;
}

.about-copy-spaced {
  margin-bottom: 18px;
}

.about-art-link {
  margin-top: 20px;
}

.about-art-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s;
}

.about-art-btn:hover {
  color: var(--ink);
}

.about-table {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}

.about-table-group {
  margin-bottom: 28px;
}

.about-table-group:last-child {
  margin-bottom: 0;
}

.about-table-heading {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.about-table-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--rule);
}

.about-table-item {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink);
  line-height: 1.4;
}

.about-table-year {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.gallery-soon {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 60vh;
  padding: 80px 64px;
}

.gallery-soon-back {
  margin-bottom: 48px;
}

.gallery-soon-label {
  margin-bottom: 12px;
}

.gallery-soon-text {
  font-family: var(--sans);
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}

.page-header {
  margin-bottom: 52px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--card-rule);
}

.page-header-breadcrumb {
  margin-bottom: 10px;
}

.page-title,
.detail-title {
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 300;
  letter-spacing: -0.02em;
}

.project-detail {
  min-height: 100vh;
  max-width: 1480px;
  margin: 0 auto;
  padding: 140px 88px 96px;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.detail-layout {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

.detail-sidebar {
  position: sticky;
  top: 132px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.button-ghost {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 56px;
}

.detail-back {
  margin-bottom: 0;
}

.detail-toc {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-toc-link {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.detail-toc-link:hover {
  color: var(--accent);
}

.detail-main {
  min-width: 0;
  max-width: 980px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.detail-hero {
  margin-bottom: 56px;
}

.detail-title {
  margin-bottom: 28px;
  max-width: 980px;
  line-height: 1.1;
}

.detail-subtitle {
  margin-bottom: 16px;
  font-size: 12px;
  letter-spacing: 0.1em;
}

.detail-cover {
  aspect-ratio: 16 / 7;
  margin-bottom: 64px;
  background: var(--surface-soft);
  overflow: hidden;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
  margin-bottom: 56px;
  padding: 32px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-block);
  background: var(--surface-soft);
}

.detail-meta-label {
  margin-bottom: 8px;
}

.detail-meta-value {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.4;
}

.detail-overview {
  max-width: 680px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: clamp(15px, 1.2vw, 17px);
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: -0.01em;
}

.detail-main-structured {
  max-width: 1120px;
}

.case-study-meta-grid {
  gap: 36px 48px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.case-study-meta-item {
  max-width: 320px;
}

.case-study-meta-label {
  margin-bottom: 8px;
  color: var(--accent);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.case-study-meta-value {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
}

.case-study-flow {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.case-study-section {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  margin-top: 12px;
}

.case-study-section-kicker {
  color: var(--accent);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.case-study-section-body,
.case-study-text {
  max-width: 860px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.8;
}

.case-study-section-body p + p,
.case-study-text p + p {
  margin-top: 16px;
}

.case-study-section-body strong,
.case-study-text strong {
  color: var(--ink);
  font-weight: 700;
}

.case-study-section-body em,
.case-study-text em {
  color: var(--muted);
}

.case-study-text {
  margin-left: 202px;
}

.case-study-text-narrow {
  max-width: 760px;
}

.case-study-text p,
.case-study-section-body p,
.case-study-finding li {
  font-family: var(--sans);
}

.case-study-small-label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

.case-study-option-list {
  display: grid;
  gap: 22px;
  margin-top: 24px;
}

.case-study-option {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule);
}

.case-study-option-selected strong {
  color: var(--accent);
}

.case-study-issue,
.case-study-finding {
  border-top: 1px solid var(--rule);
  padding-top: 24px;
}

.case-study-issue-label {
  margin-top: 18px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.case-study-issue-label:first-child {
  margin-top: 0;
}

.case-study-finding ul {
  margin-top: 14px;
  padding-left: 18px;
}

.case-study-finding li + li {
  margin-top: 10px;
}

.case-study-media,
.case-study-embed {
  margin: 0;
}

.case-study-media {
  width: auto;
}

.case-study-media-full,
.case-study-media-medium,
.case-study-media-narrow {
  margin-left: auto;
  margin-right: auto;
}

.case-study-media-medium {
  max-width: 960px;
}

.case-study-media-narrow {
  max-width: 760px;
}

.case-study-media-compact .case-study-media-image {
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.case-study-media-image {
  display: block;
  width: 100%;
  height: auto;
}

.case-study-media-caption {
  margin-top: 12px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.6;
}

.case-study-text-full {
  max-width: none;
  margin-left: 0;
}

/* Stacked A/B comparison cards */
.sq-ab-stack {
  display: grid;
  padding-right: 48px;
  padding-bottom: 48px;
}

.sq-ab-card {
  grid-area: 1 / 1;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.12);
  transition: transform 0.36s cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 0.36s ease;
}

.sq-ab-card img {
  display: block;
  width: 100%;
  height: auto;
  cursor: zoom-in;
}

.sq-ab-card-b img {
  cursor: pointer;
}

.sq-ab-stack.sq-ab-flipped .sq-ab-card-a img {
  cursor: pointer;
}

.sq-ab-card-caption {
  padding: 16px 22px 22px;
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--muted);
  background: var(--surface, #FFFEFB);
}

.sq-ab-card-a {
  z-index: 2;
  transform: translate(0, 0);
}

.sq-ab-card-b {
  z-index: 1;
  transform: translate(48px, 48px);
  cursor: pointer;
}

/* Back card: hide caption so it doesn't bleed out from behind the front card */
.sq-ab-card-b .sq-ab-card-caption {
  display: none;
}

/* Flipped state: B on top, triggered by JS class toggle */
.sq-ab-stack.sq-ab-flipped .sq-ab-card-a {
  z-index: 1;
  transform: translate(48px, 48px);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.07);
  cursor: pointer;
}

.sq-ab-stack.sq-ab-flipped .sq-ab-card-a .sq-ab-card-caption {
  display: none;
}

.sq-ab-stack.sq-ab-flipped .sq-ab-card-b {
  z-index: 2;
  transform: translate(0, 0);
  cursor: default;
}

.sq-ab-stack.sq-ab-flipped .sq-ab-card-b .sq-ab-card-caption {
  display: block;
}

.sq-ab-stack.sq-ab-flipped .sq-ab-card-b img {
  cursor: zoom-in;
}

.sq-boxplot-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.sq-boxplot-figure {
  margin: 0;
}

.sq-boxplot-figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  cursor: zoom-in;
}

.sq-boxplot-figure figcaption {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.sq-ab-hint {
  margin-top: 14px;
  padding-right: 48px;
  text-align: right;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  user-select: none;
}

.sq-ab-hint-b {
  display: none;
}

.sq-ab-stack.sq-ab-flipped ~ .sq-ab-hint .sq-ab-hint-a {
  display: none;
}

.sq-ab-stack.sq-ab-flipped ~ .sq-ab-hint .sq-ab-hint-b {
  display: inline;
}

/* Responsive 3-column persona grid */
.sq-personas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.case-study-embed {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  max-width: var(--case-study-embed-max-width, 980px);
}

.case-study-embed-frame {
  position: relative;
  width: 100%;
  aspect-ratio: var(--case-study-embed-aspect, 16 / 9);
  overflow: hidden;
  border: 1px solid rgba(19, 0, 124, 0.08);
  border-radius: calc(var(--radius-block) + 2px);
  background: #FFFEFB;
}

.case-study-embed-content {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 64px;
}

.detail-gallery-figure {
  margin: 0;
}

.detail-gallery-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: var(--radius-block);
  background: var(--surface-soft);
}

.detail-gallery-image {
  object-fit: cover;
}

.detail-gallery-caption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.detail-section {
  margin-bottom: 56px;
  padding: 32px;
  border-radius: var(--radius-block);
  background: var(--surface-soft);
}

.detail-section-bordered {
  border: 1px solid var(--rule);
}

.detail-section-header {
  margin-bottom: 20px;
}

.detail-section-index {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.detail-section-title {
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 300;
  letter-spacing: -0.02em;
}

.detail-section-copy {
  max-width: 820px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.55;
}

.detail-section-editorial {
  margin-bottom: 72px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.detail-section-editorial .detail-section-title {
  margin-bottom: 28px;
}

.contact-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(55, 0, 10, 0.52);
  backdrop-filter: blur(14px);
  animation: fadeIn 0.2s ease;
}

.contact-modal {
  position: relative;
  width: 90%;
  max-width: 460px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-block);
  background: var(--surface);
  padding: 52px 52px 44px;
  animation: slideUp 0.3s cubic-bezier(.16, 1, .3, 1);
}

.contact-modal-close {
  position: absolute;
  top: 18px;
  right: 22px;
  border: none;
  background: none;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 20px;
  line-height: 1;
}

.contact-modal-label {
  margin-bottom: 16px;
  letter-spacing: 0.16em;
}

.contact-modal-title {
  margin-bottom: 36px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.contact-modal-title em {
  color: var(--accent);
  font-style: italic;
}

.image-lightbox-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(55, 0, 10, 0.78);
  backdrop-filter: blur(10px);
  animation: fadeIn 0.2s ease;
}

.image-lightbox {
  width: min(92vw, 1400px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.image-lightbox-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.image-lightbox-zoom-label {
  color: #FFFEFB;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.image-lightbox-hint {
  margin-left: 10px;
  color: rgba(255, 254, 251, 0.68);
  font-size: 10px;
}

.image-lightbox-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.image-lightbox-button {
  border: 1px solid rgba(255, 254, 251, 0.16);
  border-radius: 999px;
  background: rgba(55, 0, 10, 0.56);
  color: #FFFEFB;
  min-width: 44px;
  height: 44px;
  padding: 0 16px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.image-lightbox-button:hover {
  border-color: rgba(4, 167, 119, 0.38);
  color: #04A777;
}

.image-lightbox-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  border: 1px solid rgba(255, 254, 251, 0.08);
  border-radius: calc(var(--radius-block) + 4px);
  background: rgba(55, 0, 10, 0.62);
  padding: 28px;
  cursor: grab;
}

.image-lightbox-image {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  transform-origin: center center;
  transition: transform 0.18s ease;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.image-lightbox-stage:active {
  cursor: grabbing;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-block);
  background: var(--surface-soft);
  padding: 15px 16px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  overflow: hidden;
}

.contact-link-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}

.contact-link:hover {
  color: var(--accent);
}

.contact-link-label {
  color: var(--muted);
  font-size: 10px;
}

.contact-link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  color: var(--muted);
}

.contact-link:hover .contact-link-icon {
  color: var(--accent);
}

.site-footer {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin: 0 24px 24px;
  border: 1.5px solid var(--stroke);
  border-radius: var(--radius-block);
  background: var(--surface);
  padding: 28px 56px;
}

.site-footer-meta,
.site-footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.site-footer-copy {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.site-footer-link {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-footer-link:hover {
  color: var(--accent);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes bounce {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(5px);
  }
}

@media (max-width: 960px) {
  .project-detail {
    padding: 128px 40px 72px;
  }

  .detail-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .detail-sidebar {
    position: relative;
    top: auto;
    gap: 20px;
  }

  .detail-toc {
    gap: 10px;
  }

  .detail-hero {
    margin-bottom: 40px;
  }

  .stack-sequence {
    --stack-top: 112px;
    padding-bottom: 10vh;
  }

  .stack-sticky {
    height: calc(100vh - var(--stack-top) - 12px);
  }

  .stack-panel-work {
    padding: 20px 16px 16px;
  }

  .stack-panel-work .section-header {
    margin-bottom: 12px;
  }

  .project-stack-body {
    align-items: center;
  }

  .project-stack-body .project-stack {
    margin-bottom: 20px;
  }

  .stack-panel-work .project-card-overlay {
    padding: 14px;
  }

  .stack-panel-skills .stack-panel-body {
    padding-bottom: 28px;
  }

  .stack-panel-skills .skills-canvas {
    height: 520px;
  }

  .stack-panel-skills .skill-node-chip {
    padding: 8px 16px;
    font-size: 10px;
    letter-spacing: 0.12em;
  }

  .stack-panel-skills .skill-node-sub {
    padding: 4px 10px;
    font-size: 8px;
    letter-spacing: 0.12em;
  }

  .stack-panel-skills .skill-node-sub {
    --tx: calc(var(--tx) * 0.56);
    --ty: calc(var(--ty) * 0.56);
  }

  .hero-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
  }

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

  .case-study-section {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .case-study-text,
  .case-study-media-full,
  .case-study-media-medium,
  .case-study-media-narrow,
  .case-study-embed {
    margin-left: auto;
    margin-right: auto;
  }

  .stack-panel-about .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .stack-panel-about .about-photo {
    max-width: 280px;
  }

  .about-table {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .about-table-col:first-child {
    padding-bottom: 4px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--rule);
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .hero-stats {
    gap: 8px 16px;
  }

  .bio-intro {
    margin-top: 32px;
    max-width: 100%;
  }

  .bio-intro-line {
    font-size: clamp(16px, 2.4vw, 19px);
    line-height: 2.05;
  }

  .hero {
    padding-top: 132px;
  }
}

/* ── Gallery layout (graphic design projects) ──────────────────── */

.project-gallery {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 120px;
  padding-bottom: 80px;
}

.gallery-header {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: fit-content;
  margin: 0 auto;
  padding: 0 0 48px;
}

.gallery-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.gallery-subtitle {
  margin-bottom: 10px;
  font-size: 12px;
  letter-spacing: 0.1em;
}

.gallery-title {
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.gallery-overview {
  max-width: 100%;
  margin-top: 20px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: clamp(15px, 1.2vw, 17px);
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: -0.01em;
}

.gallery-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-self: center;
  gap: 28px 72px;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}

.gallery-meta-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gallery-meta-label {
  color: var(--accent);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.gallery-meta-value {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
}

.gallery-flow {
  display: flex;
  flex-direction: column;
}

.gallery-figure {
  margin: 0;
  line-height: 0;
}

.theme-dark .gallery-flow,
.theme-dark .gallery-figure,
.theme-dark .gallery-figure-half,
.theme-dark .gallery-row {
  background: #ffffff;
}

.gallery-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
}

.gallery-figure-half {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: center;
}

.gallery-row .gallery-image {
  width: auto;
  max-width: 100%;
  max-height: 520px;
  height: auto;
  margin: 0 auto;
}

.gallery-image {
  display: block;
  width: 100%;
  height: auto;
  cursor: zoom-in;
}

@media (max-width: 960px) {
  .gallery-header {
    padding: 0 64px 40px;
  }
}

@media (max-width: 760px) {
  .gallery-header {
    padding: 0 24px 32px;
  }

  .about-table {
    margin-top: 28px;
    padding-top: 20px;
    gap: 0;
  }

  .about-table-item {
    font-size: 12px;
  }

  .about-table-row {
    padding: 6px 0;
  }
}

/* ──────────────────────────────────────────────────────────────── */

@media (max-width: 760px) {
  .project-detail {
    padding: 164px 24px 56px;
  }

  .detail-title {
    margin-bottom: 20px;
  }

  .case-study-section-body,
  .case-study-text {
    font-size: 16px;
    line-height: 1.75;
  }

  .detail-section-editorial {
    margin-bottom: 48px;
  }

  .detail-section-copy {
    font-size: clamp(18px, 5.8vw, 22px);
    line-height: 1.6;
  }

  .image-lightbox {
    width: 94vw;
    max-height: 92vh;
    gap: 14px;
  }

  .image-lightbox-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .image-lightbox-actions {
    justify-content: space-between;
  }

  .image-lightbox-stage {
    padding: 18px;
  }

  .stack-sequence {
    --stack-top: 150px;
    --stack-panel-gap: 18px;
    padding-bottom: 8vh;
  }

  .stack-sticky {
    height: calc(100vh - var(--stack-top) - 8px);
  }

  .stack-panel-skills {
    padding-bottom: 40px;
  }

  .stack-panel-skills .skills-canvas {
    height: 620px;
  }

  .stack-panel-about .about-grid {
    gap: 24px;
  }

  .stack-panel-about .about-photo {
    max-width: 220px;
  }

  .stack-panel-about .about-title {
    line-height: 1.1;
    padding-top: 0;
  }

  .stack-panel-skills .skill-node-chip {
    padding: 7px 14px;
    font-size: 9px;
    letter-spacing: 0.1em;
  }

  .stack-panel-skills .skill-node-sub {
    padding: 4px 8px;
    font-size: 8px;
    letter-spacing: 0.1em;
  }

  .stack-panel-skills .skill-node-sub {
    --tx: calc(var(--tx) * 0.42);
    --ty: calc(var(--ty) * 0.42);
  }

  .site-nav,
  .hero,
  .content-section,
  .page-shell,
  .site-footer {
    padding-left: 24px;
    padding-right: 24px;
  }

  .page-shell {
    width: auto;
    margin-left: 24px;
    margin-right: 24px;
  }

  .site-nav {
    top: 12px;
    width: calc(100vw - 32px);
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .site-nav > .nav-button-brand,
  .site-nav-tools {
    flex: none;
  }

  .site-nav-links {
    flex: none;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin-left: 0;
  }

  .theme-toggle {
    width: 30px;
    height: 30px;
    margin-left: 2px;
  }

  .theme-toggle-svg {
    width: 12px;
    height: 12px;
  }

  .nav-dropdown {
    left: 0;
    right: auto;
    transform: none;
    min-width: min(170px, calc(100vw - 48px));
    max-width: calc(100vw - 48px);
  }

  .content-section,
  .page-shell,
  .site-footer {
    width: auto;
    margin-left: 16px;
    margin-right: 16px;
    margin-bottom: 16px;
  }

  .detail-meta-grid,
  .detail-section,
  .project-card,
  .contact-modal {
    padding: 24px;
  }

  .hero {
    height: 100svh;
    overflow-y: auto;
    justify-content: flex-start;
    padding-top: 110px;
    padding-bottom: 56px;
  }

  .hero-main {
    align-items: flex-start;
    gap: 24px;
    margin-top: 0;
  }

  .hero-copy {
    max-width: 100%;
  }


  .hero-greeting {
    font-size: clamp(18px, 5vw, 22px);
    line-height: 1.2;
    margin-bottom: 10px;
  }

  .hero-summary {
    max-width: 100%;
    font-size: clamp(16px, 4.5vw, 19px);
    line-height: 1.6;
  }

  .hero-stats {
    margin-top: 6px;
  }

  .hero-scroll {
    display: none;
  }

  .hero-work-img {
    height: 44px;
  }

  .hero-work-branches {
    gap: 14px;
  }

  .hero-work-branch:nth-child(1) .hero-work-branch-arrow { width: 44px; }
  .hero-work-branch:nth-child(2) .hero-work-branch-arrow { width: 48px; }
  .hero-work-branch:nth-child(1) .hero-work-branch-img { width: 76px; }
  .hero-work-branch:nth-child(2) .hero-work-branch-img { width: 68px; }

  .hero-side-nav {
    gap: 12px;
  }

  .hero-side-img {
    height: 38px;
  }


  .site-footer-meta,
  .site-footer-links {
    gap: 12px;
  }

  .bio-chip-label {
    border-radius: 10px;
    padding: 0.18em 0.44em;
  }

  .hero-label {
    margin-bottom: 12px;
  }

  .hero-actions {
    margin-left: 0;
  }

  .bio-intro {
    margin-top: 18px;
  }

  .bio-intro-line {
    font-size: clamp(13px, 3.6vw, 15px);
    line-height: 1.85;
  }


  .hero-proof-item {
    font-size: 14px;
  }

  .contact-modal {
    padding: 40px 24px 32px;
  }

  .sq-personas {
    grid-template-columns: 1fr;
  }

  .sq-ab-stack {
    padding-right: 20px;
    padding-bottom: 20px;
  }

  .sq-ab-card-b {
    transform: translate(20px, 20px);
  }

  .sq-ab-stack.sq-ab-flipped .sq-ab-card-a {
    transform: translate(20px, 20px);
  }

  .sq-ab-hint {
    padding-right: 20px;
  }

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