/* ===========================
   CSS Custom Properties
   =========================== */
:root {
  --color-bg: #FAF9F6;
  --color-text: #1F1F1F;
  --color-text-muted: #6E6C6A;
  --color-border: #1F1F1F;
  --color-card-bg: #1a1a1a;
  --color-card-text: #fff;
  --color-ui-border: #ECEAE3;

  --font-serif: 'linotype-sabon', 'Georgia', serif;
  --font-sans: 'forma-djr-deck', 'Helvetica Neue', sans-serif;

  /* Type scale */
  --fs-label: 11px;    /* UI labels, metadata, captions */
  --fs-detail: 13px;   /* descriptions, button text */
  --fs-body-base: 15px;
  --fs-body-boost: 0px;
  --fs-body: calc(var(--fs-body-base) + var(--fs-body-boost)); /* body copy */

  --topnav-height: 40px;
  --sidebar-width: 0px;
  --sidebar-padding: 30px;
}

/* ===========================
   Accessibility Utilities
   =========================== */
.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;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--sidebar-padding, 30px);
  z-index: 9999;
  padding: 8px 16px;
  background: var(--color-text);
  color: var(--color-bg);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
}

.skip-link:focus {
  top: 0;
}

/* Visible focus indicators */
:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 3px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===========================
   Reset & Base
   =========================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

.amp {
  font-family: var(--font-serif);
  font-style: italic;
}

@keyframes page-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

body {
  animation: page-fade-in 0.35s ease both;
  font-family: var(--font-serif);
  background-color: var(--color-bg);
  background-image: radial-gradient(circle, rgba(0,0,0,0.12) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--color-text);
  line-height: 1.6;
  letter-spacing: -0.03em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

p {
  color: #2F2F2F;
}

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

button {
  cursor: url('../assets/images/icons/grab-open.svg') 9 9, pointer;
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
}

/* ===========================
   Top Navigation
   =========================== */
.topnav {
  position: fixed;
  top: var(--sidebar-padding);
  left: var(--sidebar-padding);
  right: var(--sidebar-padding);
  height: var(--topnav-height);
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  padding: 0;
  z-index: 100;
  background: var(--color-bg);
  overflow: visible;
  border: 1px solid var(--color-ui-border);
  border-radius: 4px;
}

.topnav.menu-open {
  border-bottom-color: transparent;
}

.topnav.menu-open::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: -1px;
  right: var(--topnav-height);
  height: 1px;
  background: var(--color-ui-border);
  z-index: 2;
}

.topnav-left {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 15px;
}

.topnav-name {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #6B6865;
  white-space: nowrap;
}

.topnav-right {
  display: flex;
  align-items: stretch;
  border-left: 1px solid var(--color-ui-border);
}

.topnav-icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--topnav-height);
  border-right: 1px solid var(--color-ui-border);
  cursor: url('../assets/images/icons/grab-open.svg') 9 9, pointer;
}

.topnav-icon-link img {
  width: 18px;
  height: 18px;
}

.topnav .topnav-icon-link img,
.topnav .theme-toggle img,
.topnav .menu-toggle img {
  width: 18px;
  height: 18px;
}

.topnav-icon-link.active {
  background: var(--color-bg-secondary, rgba(128, 128, 128, 0.08));
  box-shadow: inset 0 0 0 1px var(--color-ui-border);
}

.topnav .theme-toggle {
  width: var(--topnav-height);
  height: auto;
  border-right: 1px solid var(--color-ui-border);
  border-radius: 0;
  background: none;
}

/* Hide hero line breaks when font size is boosted */
html.fs-boosted .hero-bio br {
  display: none;
}

html.fs-boosted .hero-bio p {
  text-wrap: balance;
}

@media (min-width: 769px) {
  html.fs-boosted .hero-bio {
    max-width: calc((100vw - (2 * var(--sidebar-padding)) - 40px) / 3);
  }
}

/* Font size control */
.font-size-control {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border-right: 1px solid var(--color-ui-border);
  height: var(--topnav-height);
}

.font-size-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: opacity 0.15s ease;
}

.font-size-btn:hover { opacity: 1; }

.font-size-btn:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

.font-size-btn img,
.font-size-eye {
  width: 18px;
  height: 18px;
  display: block;
}

@media (max-width: 768px) {
  .font-size-control {
    position: fixed;
    bottom: var(--sidebar-padding);
    left: 50%;
    transform: translateX(-50%);
    z-index: 90;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--color-ui-border);
    border-radius: 4px;
    background: var(--color-bg);
    gap: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 6px 20px rgba(0, 0, 0, 0.1);
  }

  [data-theme="dark"] .font-size-control {
    background: #1a1a1a;
    border-color: #333;
  }
}

.topnav .menu-toggle {
  width: var(--topnav-height);
  height: auto;
}

.topnav-nav {
  position: absolute;
  top: 100%;
  left: -1px;
  right: -1px;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  z-index: 1;
}

.topnav-nav.open {
  max-height: 600px;
  padding: 40px 20px 48px;
  border: 1px solid var(--color-ui-border);
  border-top: none;
  border-radius: 0 0 4px 4px;
}

.nav-link {
  font-family: var(--font-serif);
  font-size: 44px;
  font-weight: 400;
  font-style: normal;
  letter-spacing: -0.01em;
  color: #1f1f1f;
  transition: color 0.2s ease;
  display: inline-block;
  line-height: 1.6;
}


.nav-link:hover {
  color: #6B6865;
}

.nav-link.active {
  color: #6B6865;
  font-style: italic;
}

.menu-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: none;
  cursor: url('../assets/images/icons/grab-open.svg') 9 9, pointer;
}

.menu-toggle img {
  width: 18px;
  height: 18px;
}

/* Stacked so GSAP can crossfade them */
.menu-toggle .menu-icon-open,
.menu-toggle .menu-icon-close {
  position: absolute;
  top: 50%;
  left: 50%;
}

/* CSS-only fallback (no JS) */
.menu-toggle .menu-icon-close {
  display: none;
}

.menu-toggle.open .menu-icon-open {
  display: none;
}

.menu-toggle.open .menu-icon-close {
  display: block;
}

/* ===========================
   Main Content
   =========================== */
.main {
  margin-left: 0;
  padding-top: calc(var(--sidebar-padding) + var(--topnav-height));
  min-height: 100vh;
}

/* ===========================
   Hero Section
   =========================== */
.hero {
  padding: 24px var(--sidebar-padding) 20px;
  max-width: 700px;
}

.page-home .hero {
  max-width: none;
  display: grid;
  grid-template-columns: 1fr 2fr;
  column-gap: 40px;
  align-items: start;
  padding-bottom: 40px;
}

.page-home .hero .hero-col {
  display: contents;
}

.page-home .hero .hero-col:first-child > :nth-child(1) { grid-column: 1; grid-row: 1; }
.page-home .hero .hero-col:first-child > :nth-child(2) { grid-column: 1; grid-row: 2; }
.page-home .hero .hero-col:first-child > :nth-child(3) { grid-column: 1; grid-row: 3; }
.page-home .hero .hero-col:first-child > :nth-child(4) { grid-column: 1; grid-row: 4; margin-top: 6px; }

.page-home .hero .hero-col:last-child  > :nth-child(1) { grid-column: 2; grid-row: 1; }
.page-home .hero .hero-col:last-child  > :nth-child(2) { grid-column: 2; grid-row: 2; }
.page-home .hero .hero-col:last-child  > :nth-child(3) { grid-column: 2; grid-row: 3; }
.page-home .hero .hero-col:last-child  > :nth-child(4) { grid-column: 2; grid-row: 4; }

.hero-col > .hero-label:first-child,
.hero > .hero-label:first-child {
  margin-top: 0;
}

.hero-col .hero-bio {
  margin-bottom: 0;
  line-height: 1.75;
  width: 100%;
}

.work-hero {
  max-width: none;
}

.work-filters-sticky {
  position: relative;
}

.work-filters-sticky::before,
.work-filters-sticky::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.2s ease;
}

.work-filters-sticky::before {
  left: 0;
  background: linear-gradient(to left, transparent, var(--color-bg));
  opacity: 0;
}

.work-filters-sticky::after {
  right: 0;
  background: linear-gradient(to right, transparent, var(--color-bg));
  opacity: 1;
}

.work-filters-sticky.filters-scrolled::before {
  opacity: 1;
}

.work-filters-sticky.filters-at-end::after {
  opacity: 0;
}

.work-hero-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hero-heading {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.2vw, 36px);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 40px;
}

.hero-heading .br-mobile {
  display: none;
}

.hero-heading .br-desktop {
  display: inline;
}

.hero-heading-muted {
  color: #6B6865;
}

.hero-bio {
  font-family: var(--font-serif);
  font-size: var(--fs-body);
  line-height: 1.85;
  margin-bottom: 40px;
  max-width: 800px;
}

.hero-bio p {
  margin-bottom: 16px;
}

.hero-bio p:last-child {
  margin-bottom: 0;
}

.obsession-btn {
  font-family: var(--font-serif);
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline;
}

.obsession-word {
  text-decoration: underline dotted var(--color-text-muted);
  text-underline-offset: 2px;
}

.obsession-marker {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  vertical-align: super;
  line-height: 0;
  margin-left: 0;
  transition: color 0.2s ease;
}

.obsession-btn[aria-expanded="true"] .obsession-marker {
  color: var(--color-text);
}

.obsession-panel {
  font-family: var(--font-serif);
  font-size: var(--fs-body);
  font-style: italic;
  color: var(--color-text-muted);
  border-left: 2px solid var(--color-text-muted);
  padding-left: 12px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.3s ease, margin-bottom 0.3s ease;
  margin-top: 0;
  margin-bottom: 0;
  width: 100%;
  box-sizing: border-box;
}

.obsession-panel.open {
  max-height: 300px;
  opacity: 1;
  margin-top: 16px;
  margin-bottom: 16px;
}

.obsession-wrap {
  max-width: 380px;
}

.obsession-wrap p {
  margin-bottom: 0;
}

.hero-bio em,
.hero-bio strong em {
  font-family: var(--font-serif);
  font-style: italic;
}

.hero-label {
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 1.2px;
  color: #6B6865;
  margin-top: 32px;
  margin-bottom: 12px !important;
}

.hero-bio > p.hero-label:first-child {
  margin-top: 0;
}

/* ===========================
   Buttons
   =========================== */
.hero-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-outline {
  padding: 5px 10px;
  border: 1.5px solid var(--color-border);
  border-radius: 4px;
  background: transparent;
}

.btn-outline:hover {
  background: var(--color-text);
  color: var(--color-bg);
}

.btn.copied {
  background: var(--color-text);
  color: var(--color-bg);
}

.btn-email {
  height: 46px;
  padding: 0 20px;
  border: 1px solid #ECEAE3;
  border-radius: 4px;
  background: #F2F0EA;
  gap: 6px;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 16px;
}

.btn-email:hover {
  background: #ECEAE3;
}

.btn-email.copied {
  background: #ECEAE3;
  color: #2f2f2f;
}

.btn-email-sm {
  height: 40px;
  padding: 0 16px;
  font-size: var(--fs-detail);
  gap: 5px;
}

.btn-email-sm .btn-email-icon img {
  width: 14px;
  height: 14px;
}

#form {
  background: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-text);
}

#form:hover {
  background: #444;
  border-color: #444;
}

.btn-email-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-email-icon img {
  width: 18px;
  height: 18px;
  display: block;
}

.btn-email-icon .icon-hover {
  display: none;
}

.btn-email:hover .btn-email-icon .icon-default {
  display: none;
}

.btn-email:hover .btn-email-icon .icon-hover {
  display: block;
}

#form .btn-email-icon img {
  filter: brightness(0) invert(1);
}

[data-theme="dark"] #form .btn-email-icon img {
  filter: brightness(0);
}

/* ===========================
   Portfolio Section
   =========================== */
.portfolio {
  padding: 40px var(--sidebar-padding) 0;
}

.portfolio-filter {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.2px;
  color: #C1C1C1;
}

.filter-btn {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.2px;
  color: #CDCAC2;
  padding: 4px 0;
  border-bottom: 1.5px solid transparent;
  border-radius: 4px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.filter-btn:hover {
  color: var(--color-text);
}

.filter-btn.active {
  color: var(--color-text);
  font-weight: 600;
  border-bottom-color: var(--color-text);
}

/* ===========================
   Contact Page Overrides
   =========================== */
.page-contact .hero-heading {
  margin-bottom: 20px;
}

.page-contact .hero-bio {
  margin-bottom: 24px;
}

.page-contact .footer {
  padding-top: 30px;
  padding-bottom: 60px;
}

/* ===========================
   Work Listing Overrides
   =========================== */
#work-listing .hero {
  padding-bottom: 0;
}

#work-listing .hero-heading {
  margin-bottom: 15px;
}

#work-listing .portfolio {
  padding-top: 20px;
}

#work-listing .discovery-filters {
  margin-top: 20px;
  margin-bottom: 20px;
}

/* ===========================
   Portfolio Toolbar
   =========================== */
.portfolio-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 24px;
}

/* ===========================
   View Toggle
   =========================== */
.portfolio-view {
  display: flex;
  gap: 4px;
}

.view-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  opacity: 0.35;
  transition: opacity 0.2s ease;
}

.view-btn:hover {
  opacity: 0.7;
}

.view-btn.active {
  opacity: 1;
}

.view-icon {
  width: 16px;
  height: 16px;
}

/* ===========================
   Portfolio Grid
   =========================== */
.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}

.portfolio-card {
  display: flex;
  flex-direction: column;
  will-change: transform;
  overflow: hidden;
}

.portfolio-card.hidden {
  display: none;
}

/* ===========================
   List View
   =========================== */
.card-list-info {
  display: none;
}

.portfolio-grid.view-list {
  grid-template-columns: 1fr;
  gap: 0;
  margin-left: 0;
  margin-right: 0;
}

.portfolio-grid.view-list .card-inner,
.portfolio-grid.view-list .card-info {
  display: none;
}

.portfolio-grid.view-list .card-list-info {
  display: flex;
  align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid #E5E5E5;
}

.portfolio-grid.view-list .portfolio-card:first-child .card-list-info {
  border-top: 1px solid #E5E5E5;
}

.card-list-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 400;
  flex: 1;
}

.card-list-subtitle {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #6B6865;
  flex-shrink: 0;
}

.card-list-year {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 1.2px;
  color: #6B6865;
  flex-shrink: 0;
  margin-left: 40px;
}

.portfolio-grid.view-list .portfolio-card:hover .card-list-title {
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

/* Inline metrics row in list view */
.portfolio-grid.view-list .portfolio-card {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid #E5E5E5;
}

.portfolio-grid.view-list .portfolio-card:first-child {
  border-top: 1px solid #E5E5E5;
}

.portfolio-grid.view-list .card-list-info {
  order: 0;
  border-top: none;
  border-bottom: none;
}

.portfolio-grid.view-list .portfolio-card:first-child .card-list-info {
  border-top: none;
}

.portfolio-grid.view-list .card-metrics {
  order: 1;
  border: none;
  border-radius: 0;
  padding: 0;
  margin-top: 0;
}

.portfolio-grid.view-list.show-metrics .card-metrics {
  max-height: 28px;
  opacity: 1;
  padding-bottom: 14px;
  margin-top: -4px;
}

.portfolio-grid.view-list .card-metric {
  flex: 0 auto;
  flex-direction: row;
  align-items: center;
  gap: 5px;
  min-height: auto;
  padding: 0;
  background: transparent;
}

.portfolio-grid.view-list .card-metric + .card-metric {
  border-left: none;
  margin-left: 20px;
}

.portfolio-grid.view-list .card-metric-value {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.portfolio-grid.view-list .card-metric-label {
  font-size: 10px;
  letter-spacing: 0.04em;
}

/* ===========================
   Hover Preview
   =========================== */
.work-preview {
  position: fixed;
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  width: 280px;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 4px;
  transition: opacity 0.25s ease;
}

.work-preview.visible {
  opacity: 1;
}

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

.card-inner {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: var(--color-card-bg);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  border-radius: 4px;
}

.card-thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.card-hover-media {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}

.card-hover-media.active {
  opacity: 1;
}

.card-info {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0 0 10px;
  color: var(--color-text);
  order: -1;
}

.card-title {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.title-dim {
  color: #6B6865;
}

.card-subtitle {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  opacity: 0.7;
}

.card-year {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  opacity: 0.7;
}

.work-metrics {
  display: flex;
  flex-direction: row;
  gap: 0;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--color-ui-border);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 16px;
}

.work-metric {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--color-bg);
  padding: 12px;
  min-height: 80px;
}

.work-metric + .work-metric {
  border-left: 1px solid var(--color-ui-border);
}

.card-metrics {
  display: flex;
  flex-direction: row;
  gap: 0;
  width: 100%;
  box-sizing: border-box;
  margin-top: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  border: 1px solid var(--color-ui-border);
  border-radius: 4px;
  transition: max-height 0.35s ease, opacity 0.35s ease, margin-top 0.35s ease;
}

.show-metrics .card-metrics {
  max-height: 140px;
  opacity: 1;
  margin-top: 6px;
}

.card-metric {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--color-bg);
  padding: 12px;
  min-height: 80px;
}

.card-metric + .card-metric {
  border-left: 1px solid var(--color-ui-border);
}

.card-metric-value {
  font-family: var(--font-serif);
  font-size: var(--fs-body);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--color-text);
  line-height: 1;
}

.card-metric-label {
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* ===========================
   Selected Work (Homepage)
   =========================== */
.selected-work-section {
  padding: 20px var(--sidebar-padding) 60px;
}

.selected-work-header {
  margin-bottom: 20px;
  position: relative;
}

.selected-work-header::before,
.selected-work-header::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.2s ease;
}

.selected-work-header::before {
  left: 0;
  background: linear-gradient(to left, transparent, var(--color-bg));
  opacity: 0;
}

.selected-work-header::after {
  right: 0;
  background: linear-gradient(to right, transparent, var(--color-bg));
  opacity: 1;
}

.selected-work-header.filters-scrolled::before {
  opacity: 1;
}

.selected-work-header.filters-at-end::after {
  opacity: 0;
}

.selected-work-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.2px;
  color: #6B6865;
  margin-bottom: 20px;
}

.discovery-filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: relative;
  padding: 3px 0;
  margin: -3px 0;
}

.discovery-pill {
  position: absolute;
  background-color: var(--color-text);
  border-radius: 4px;
  pointer-events: none;
  z-index: 0;
  transition: left 0.28s cubic-bezier(0.4, 0, 0.2, 1), width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.discovery-filters::-webkit-scrollbar {
  display: none;
}

.discovery-btn {
  flex-shrink: 0;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #CDCAC2;
  padding: 2px 5px;
  border: none;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.discovery-btn:hover {
  color: var(--color-text);
  background-color: #F2F0EA;
}

.discovery-btn.active {
  color: var(--color-bg);
  background-color: transparent;
  font-weight: 600;
}

.discovery-insight {
  font-family: var(--font-serif);
  font-size: var(--fs-body);
  font-style: italic;
  color: var(--color-text-muted);
  margin-bottom: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.35s ease, margin-bottom 0.35s ease;
}

.discovery-insight.visible {
  max-height: 200px;
  opacity: 1;
  margin-bottom: 20px;
  padding-left: 12px;
  border-left: 2px solid var(--color-text-muted);
}

.selected-work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

/* ===========================
   Coverflow Carousel (Homepage)
   =========================== */
.carousel-section {
  margin-left: calc(-1 * var(--sidebar-width));
  width: 100vw;
  padding: 40px 0 20px;
  overflow: hidden;
  position: relative;
  z-index: 0;
}

.carousel-track {
  position: relative;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-card {
  position: absolute;
  width: 420px;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  display: block;
  will-change: transform, opacity;
}

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

.carousel-card-placeholder {
  width: 100%;
  height: 100%;
  background: var(--color-card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-card-placeholder span {
  font-family: var(--font-serif);
  font-size: 24px;
  color: var(--color-card-text);
}

.carousel-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.carousel-overlay-title {
  font-family: var(--font-serif);
  font-size: 20px;
  color: #fff;
  margin-bottom: 4px;
}

.carousel-overlay-subtitle {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}


/* ===========================
   Sprint Page — Full Layout
   =========================== */

/* Sprint page uses its own header — reset global topnav padding */
.page-sprint .main {
  padding-top: 0;
}

/* Top navigation bar */
.sprint-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  background: var(--color-bg);
}

.sprint-header-logo {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  white-space: nowrap;
  color: var(--color-text);
}

.sprint-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sprint-header-nav {
  display: flex;
  align-items: center;
  gap: 36px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.sprint-nav-link {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  transition: color 0.2s ease;
}

.sprint-nav-link:hover {
  color: var(--color-text);
}

@keyframes sprint-cta-shake {
  0%,100% { transform: rotate(0deg); }
  20%      { transform: rotate(-6deg); }
  40%      { transform: rotate(6deg); }
  60%      { transform: rotate(-4deg); }
  80%      { transform: rotate(4deg); }
}

.sprint-header-cta.shaking {
  animation: sprint-cta-shake 0.5s ease;
}

.sprint-header-cta {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  height: 34px;
  padding: 0 16px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sprint-header-cta:hover {
  background: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-text);
}

/* Centered hero */
.sprint-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: calc(100vh - 280px);
  padding: 80px 60px 60px;
}

.sprint-hero-heading {
  font-family: var(--font-serif);
  font-size: clamp(40px, 5.5vw, 68px);
  font-weight: 400;
  line-height: 1.1;
  max-width: 1000px;
  margin-bottom: 40px;
}

.sprint-headline-cycle-wrap {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  line-height: 1.2;
}

.sprint-headline-cycle {
  display: inline-block;
  animation: headline-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes headline-in {
  from { opacity: 0; transform: translateY(60%); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes headline-out {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-60%); }
}

.sprint-hero-sub {
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.6;
  color: #2F2F2F;
  margin-bottom: 40px;
}

.sprint-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  border: 1px solid #ECEAE3;
  border-radius: 4px;
  background: #F2F0EA;
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 0.02em;
  transition: background 0.2s ease;
  cursor: url('../assets/images/icons/grab-open.svg') 9 9, pointer;
}

.sprint-cta-btn:hover {
  background: #ECEAE3;
}

/* Fix full-bleed carousel for no-sidebar layout */
.page-sprint .sprint-carousel-section {
  margin-left: 0;
  width: 100%;
}

/* Fix footer offset for no-sidebar layout */
.page-sprint .footer {
  margin-left: 0;
}


/* Sections padding for full-width layout */
.page-sprint .work-impact.sprint-features {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  padding: 60px 80px 80px;
}

@media (max-width: 768px) {
  .sprint-header {
    padding: 16px 24px;
  }
  .sprint-header-nav {
    display: none;
  }
  .sprint-hero {
    padding: 100px 24px 60px;
  }
  .page-sprint .work-impact.sprint-features {
    padding: 40px 24px 60px;
  }
}

/* ===========================
   Sprint Page — Problem Cards
   =========================== */
.sprint-problems {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px 80px 80px;
}

.sprint-card-deck {
  position: relative;
  width: min(860px, 80vw);
  height: min(460px, 55vw);
}

.sprint-problem-card {
  position: absolute;
  inset: 0;
  border: 1px solid #ECEAE3;
  background: var(--color-bg);
  border-radius: 4px;
  padding: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  will-change: transform;
}

.sprint-problem-card p {
  font-family: var(--font-serif);
  font-size: clamp(40px, 5.5vw, 68px);
  line-height: 1.1;
  color: #2F2F2F;
  transition: font-size 0.4s ease;
}

@media (max-width: 768px) {
  .sprint-card-deck {
    width: 90vw;
    height: 80vw;
  }
  .sprint-problem-card {
    padding: 40px 32px;
  }
  .sprint-problem-card p {
    font-size: clamp(26px, 6vw, 40px);
  }
  .sprint-card-arrow--prev {
    left: -40px;
  }
  .sprint-card-arrow--next {
    right: -40px;
  }
}

@media (max-width: 480px) {
  .sprint-card-deck {
    height: 90vw;
  }
  .sprint-problem-card {
    padding: 32px 24px;
  }
  .sprint-problem-card p {
    font-size: clamp(24px, 7vw, 36px);
  }
}

.sprint-card-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.sprint-card-arrow img {
  width: 20px;
  height: 20px;
}

.sprint-card-arrow--prev {
  left: -56px;
}

.sprint-card-arrow--next {
  right: -56px;
  transform: translateY(-50%) rotate(180deg);
}

.sprint-card-deck:hover .sprint-card-arrow {
  opacity: 1;
  pointer-events: auto;
}

/* ===========================
   Sprint Page — Work Carousel
   =========================== */
.sprint-carousel-section {
  margin-left: calc(-1 * var(--sidebar-width));
  width: 100vw;
  overflow: hidden;
  padding: 40px 0 60px;
}

.sprint-carousel-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: sprint-marquee 50s linear infinite;
}


@keyframes sprint-marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.sprint-carousel-card {
  width: calc(100vw / 3 - 12px);
  aspect-ratio: 16 / 9;
  background: var(--color-card-bg);
  flex-shrink: 0;
  overflow: hidden;
}

.sprint-carousel-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 1024px) {
  .sprint-carousel-card {
    width: calc(100vw / 2 - 12px);
  }
}

@media (max-width: 600px) {
  .sprint-carousel-card {
    width: calc(100vw - 48px);
  }
}

/* ===========================
   Sprint Page — Value Props
   =========================== */
.work-hero .hero-heading {
  margin-bottom: 15px;
}

.work-impact.sprint-features {
  padding: 60px 60px 80px;
}

/* ===========================
   Sprint Page — Pricing Grid
   =========================== */
.sprint-pricing {
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 80px 80px;
}

@media (max-width: 768px) {
  .sprint-pricing {
    padding: 32px 24px 80px;
  }
}

@media (max-width: 480px) {
  .sprint-pricing {
    padding: 32px 20px 80px;
  }
}

.sprint-pricing-box {
  border: 1px solid #ECEAE3;
}

.sprint-pricing-header {
  padding: 32px 28px;
  border-bottom: 1px solid #ECEAE3;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sprint-pricing-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6B6865;
}

.sprint-pricing-amount {
  font-family: var(--font-serif);
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 400;
  line-height: 1;
  color: var(--color-text);
}

.sprint-pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.sprint-pricing-item {
  padding: 20px 28px;
  font-family: var(--font-serif);
  font-size: 15px;
  color: #2F2F2F;
  border-bottom: 1px solid #ECEAE3;
}

.sprint-pricing-item:nth-child(odd) {
  border-right: 1px solid #ECEAE3;
}

.sprint-pricing-item:nth-last-child(-n+2) {
  border-bottom: none;
}

/* ===========================
   About Page Hero
   =========================== */
.page-about .hero {
  max-width: none;
  display: grid;
  grid-template-columns: 1fr 2fr;
  column-gap: 40px;
  align-items: stretch;
  padding-bottom: 40px;
}

.page-about .hero .hero-col {
  display: flex;
  flex-direction: column;
}

.page-about .hero .hero-col .hero-cta {
  margin-top: auto;
  padding-top: 32px;
}

/* ===========================
   About Story Section
   =========================== */
.about-story {
  display: grid;
  grid-template-columns: 1fr 2fr;
  column-gap: 40px;
  padding: 40px var(--sidebar-padding);
}

.about-story-right .hero-label {
  margin-top: 0;
}

/* ===========================
   Memories Trigger + Modal
   =========================== */
.memories-trigger {
  background: none;
  border: none;
  font-family: var(--font-serif);
  font-size: inherit;
  color: var(--color-text);
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  text-decoration-color: var(--color-text-muted);
}

.memories-trigger:hover {
  text-decoration-color: var(--color-text);
}

.memories-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
}

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

.memories-modal-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: all;
  background: var(--color-bg);
  border-radius: 4px;
  overflow: hidden;
  width: 260px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-ui-border);
  user-select: none;
}

.memories-modal-header {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  border-bottom: 1px solid var(--color-ui-border);
  cursor: url('../assets/images/icons/hand.svg') 8 0, grab;
  height: 36px;
}

.memories-modal-header:active {
  cursor: url('../assets/images/icons/hand.svg') 8 0, grabbing;
}

.memories-modal-drag-row {
  display: flex;
  align-items: center;
  padding: 0 12px;
  flex: 1;
  min-width: 0;
}

.memories-modal-label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.2px;
  color: var(--color-text-muted);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.memories-modal-close {
  background: none;
  border: none;
  border-left: 1px solid var(--color-ui-border);
  cursor: pointer;
  width: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.memories-modal-close:hover {
  opacity: 1;
  background: var(--color-bg-secondary, rgba(128,128,128,0.06));
}

.memories-modal-close img {
  width: 18px;
  height: 18px;
}

.memories-modal-slide {
  overflow: hidden;
}

.memories-slide-img {
  width: 100%;
  height: auto;
  display: block;
}

.about-col-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  margin-top: 32px;
  border-radius: 4px;
}

.about-col-img--turtle {
  width: 50%;
}

/* ===========================
   About Image + 10 Things
   =========================== */
.about-image {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  padding: 40px var(--sidebar-padding);
  align-items: start;
}

.about-image img {
  grid-column: 1;
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  border-radius: 4px;
}

.about-things {
  grid-column: 3;
  align-self: start;
}

.about-things .hero-label {
  margin-top: 0 !important;
}

.about-things-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: things-counter;
}

.about-things-list li {
  counter-increment: things-counter;
  font-family: var(--font-serif);
  font-size: var(--fs-body);
  color: var(--color-text);
  padding: 0;
  display: flex;
  gap: 12px;
  align-items: baseline;
}

.about-things-list li::before {
  content: counter(things-counter, decimal-leading-zero);
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  color: var(--color-text-muted);
  min-width: 20px;
  flex-shrink: 0;
}


/* ===========================
   Work Detail Page
   =========================== */
#work-detail {
  padding: 0;
}

.work-detail-header {
  padding: var(--sidebar-padding) var(--sidebar-padding) 0;
}

.work-overlay .work-detail-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: var(--color-bg);
  padding: 16px var(--sidebar-padding);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.work-overlay-prev,
.work-overlay-next {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  padding: 6px 8px;
  cursor: pointer;
  opacity: 0.45;
  transition: opacity 0.2s ease;
}

.work-overlay-prev:hover,
.work-overlay-next:hover {
  opacity: 1;
}

.work-overlay-prev:focus:not(:focus-visible),
.work-overlay-next:focus:not(:focus-visible) {
  outline: none;
}

.work-overlay-prev {
  justify-self: start;
  padding-left: 0;
}

.work-overlay-next {
  justify-self: end;
  padding-right: 0;
}

.work-overlay-arrow-icon {
  width: 16px;
  height: 16px;
  display: block;
}

.work-overlay-arrow-flip {
  transform: scaleX(-1);
}

[data-theme="dark"] .work-overlay-arrow-icon {
  filter: invert(1);
}

.work-overlay-handle-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.work-overlay-handle {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--color-border);
  padding: 0;
  display: block;
  opacity: 0.4;
  transition: opacity 0.2s ease;
  cursor: pointer;
}

.work-overlay-handle:hover {
  opacity: 0.8;
}

.work-overlay-progress-bar {
  position: sticky;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--color-text);
  opacity: 0.15;
  z-index: 20;
  transition: width 0.1s linear;
  pointer-events: none;
}

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

/* Two-column case study layout */
.work-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  align-items: start;
}

.work-info-col {
  position: sticky;
  top: calc(var(--sidebar-padding) + var(--topnav-height));
  padding: 40px var(--sidebar-padding);
  align-self: start;
}

.work-gallery-col {
  padding-top: 40px;
  padding-right: var(--sidebar-padding);
}

.work-gallery-col .img-protect,
.work-gallery-col .video-wrap,
.work-gallery-col .youtube-embed {
  margin-bottom: 20px;
}

.youtube-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.youtube-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.work-gallery-col .img-protect:last-child,
.work-gallery-col .video-wrap:last-child {
  margin-bottom: 0;
}

.work-gallery-col > .img-protect,
.work-gallery-col > .video-wrap {
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 4px;
}

.work-gallery-col > .youtube-embed,
.work-gallery-col > .img-compare {
  border-radius: 4px;
  overflow: hidden;
}

.work-gallery-col img,
.work-gallery-col video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.work-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  margin-bottom: 24px;
  transition: opacity 0.2s ease;
}

.work-back-icon {
  width: 16px;
  height: 16px;
}

.work-back:hover {
  opacity: 0.6;
}

.work-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.2vw, 36px);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 40px;
}

.work-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 48px;
}

.work-meta-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.work-meta-label {
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #6B6865;
  margin-bottom: 4px;
}

.work-meta-value {
  font-family: var(--font-serif);
  font-size: var(--fs-body);
  line-height: 1.6;
}

.work-meta-value a {
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s ease;
}

.work-meta-value a:hover {
  opacity: 0.6;
}

.work-description {
  font-family: var(--font-serif);
  font-size: var(--fs-body);
  line-height: 1.75;
  max-width: 600px;
  margin-bottom: 40px;
}

.work-description p {
  margin-bottom: 16px;
}

/* Accordion */
.work-accordion {
  margin-top: 32px;
  border-top: 1px solid var(--color-ui-border);
}

.work-accordion-item {
  border-bottom: 1px solid var(--color-ui-border);
}

.work-accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

.work-accordion-title {
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #6B6865;
}

.work-accordion-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.work-accordion-icon img {
  width: 20px;
  height: 20px;
}

.accordion-icon-open {
  display: block;
}

.accordion-icon-close {
  display: none;
}

.work-accordion-item.open .accordion-icon-open {
  display: none;
}

.work-accordion-item.open .accordion-icon-close {
  display: block;
}

.work-accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.work-accordion-item.open .work-accordion-body {
  max-height: 1000px;
}

.work-accordion-body-inner {
  font-family: var(--font-serif);
  font-size: var(--fs-body);
  line-height: 1.75;
  padding-bottom: 20px;
}

.work-accordion-body-inner p {
  margin-bottom: 12px;
}

.work-accordion-body-inner p:last-child {
  margin-bottom: 0;
}

.work-description p:last-child {
  margin-bottom: 0;
}

.work-team {
  padding: 60px var(--sidebar-padding);
}

.work-team-label {
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #6B6865;
  margin-bottom: 16px;
}

.work-team-member {
  display: flex;
  gap: 24px;
  padding: 6px 0;
}

.work-team-role {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  color: #6B6865;
  min-width: 160px;
  flex-shrink: 0;
}

.work-team-name {
  font-family: var(--font-serif);
  font-size: var(--fs-body);
}

.work-process {
  margin-top: 40px;
}


/* ===========================
   Detail — Portrait Spinning Carousel
   =========================== */
.detail-portrait-section {
  margin-top: 60px;
}

.detail-portrait-track {
  height: 420px;
}

.detail-portrait-card {
  width: 220px;
  aspect-ratio: unset;
}

.detail-portrait-card img,
.detail-portrait-card video {
  width: 100%;
  height: auto;
  display: block;
}

/* Image protection — transparent overlay blocks download extensions */
.img-protect {
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
}

.img-protect img {
  margin-bottom: 0;
  pointer-events: none;
}

.img-protect::after,
.video-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

.video-wrap {
  position: relative;
  margin-bottom: 24px;
}

.video-wrap video {
  margin-bottom: 0;
}

.video-mute-btn {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
  z-index: 2;
}

.video-wrap:hover .video-mute-btn {
  opacity: 1;
}

.video-mute-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}

.video-mute-btn .icon-muted,
.video-mute-btn .icon-unmuted {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
  display: block;
  margin: auto;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.video-mute-btn .icon-unmuted {
  visibility: hidden;
}

.video-mute-btn.unmuted .icon-muted {
  visibility: hidden;
}

.video-mute-btn.unmuted .icon-unmuted {
  visibility: visible;
}

.work-empty {
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--color-text-muted);
}

.work-impact {
  padding: 60px var(--sidebar-padding);
}

.work-impact-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #6B6865;
  margin-bottom: 40px;
}

.work-impact-item {
  margin-bottom: 40px;
}

.work-impact-item:last-child {
  margin-bottom: 0;
}

.work-impact-title {
  font-family: var(--font-serif);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.work-impact-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.work-impact-title:has(.work-impact-icon) + .work-impact-desc {
  padding-left: 46px;
}

.about-animate .work-impact-icon,
.about-animate .work-impact-title-text,
.about-animate .work-impact-desc {
  opacity: 0;
}

@keyframes impact-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes impact-pop {
  0%   { opacity: 0; transform: scale(0.6); }
  70%  { transform: scale(1.15); }
  100% { opacity: 1; transform: scale(1); }
}

.about-animate.animated .work-impact-icon {
  animation: impact-pop 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.about-animate.animated .work-impact-title-text {
  animation: impact-fade-up 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.35s forwards;
}

.about-animate.animated .work-impact-desc {
  animation: impact-fade-up 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.6s forwards;
}

.work-impact-desc {
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.6;
  color: #6B6865;
}

/* ===========================
   Other Works (Work Detail)
   =========================== */
.page-work {
  overflow-x: hidden;
}

.other-works {
  padding: 60px var(--sidebar-padding);
}

.other-works-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #6B6865;
  margin-bottom: 24px;
}

.other-works-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.other-works-track::-webkit-scrollbar {
  display: none;
}

.other-works-track.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.other-works-card {
  width: 140px;
  aspect-ratio: 16 / 9;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  background-color: #A9A9A0;
  border-radius: 4px;
  display: block;
  position: relative;
  overflow: hidden;
}

.other-works-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.other-works-card:hover .other-works-overlay {
  opacity: 1;
}

.other-works-title {
  font-family: var(--font-serif);
  font-size: 13px;
  color: #fff;
  margin-bottom: 2px;
}

.other-works-subtitle {
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

/* ===========================
   Work Overlay (slide-up sheet)
   =========================== */
.work-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  pointer-events: none;
  background: transparent;
  transition: background-color 0.4s ease;
}

.work-overlay.is-open {
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.3);
  cursor: default;
}

.work-overlay-panel {
  position: absolute;
  left: var(--sidebar-padding, 30px);
  right: var(--sidebar-padding, 30px);
  bottom: 0;
  top: var(--sidebar-padding, 30px);
  border-radius: 4px 4px 0 0;
  background-color: var(--color-bg);
  transform: translateY(100%);
  overflow-y: auto;
  overflow-x: hidden;
  will-change: transform;
  cursor: auto;
}


.work-overlay .work-info-col {
  padding-top: 16px;
  top: 0;
}

.work-overlay .work-gallery-col {
  padding-top: 16px;
}

@media (max-width: 768px) {
  .work-overlay-panel {
    left: 0;
    right: 0;
    top: 0;
    border-radius: 0;
  }

  .work-overlay .work-detail-header {
    padding: var(--sidebar-padding) var(--sidebar-padding) 0;
  }

  .work-overlay-arrow-label {
    display: none;
  }

  .work-overlay .work-layout {
    grid-template-columns: 1fr;
  }

  .work-overlay .work-info-col {
    position: static;
    padding: 16px var(--sidebar-padding) 0;
    border-bottom: none;
  }

  .work-overlay .work-gallery-col {
    padding: 16px var(--sidebar-padding) var(--sidebar-padding);
  }
}

/* ===========================
   Before / After Comparison Slider
   =========================== */
.img-compare {
  position: relative;
  overflow: hidden;
  cursor: col-resize;
  user-select: none;
  margin-bottom: 24px;
}

.img-compare-after,
.img-compare-before {
  display: block;
}

.img-compare-after img,
.img-compare-before img {
  display: block;
  width: 100%;
  pointer-events: none;
}

.img-compare-before {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
}

.img-compare-before img {
  width: auto;
  min-width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
}

.img-compare-after img {
  height: auto;
}

.img-compare-handle {
  position: absolute;
  top: 0;
  left: 50%;
  height: 100%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.img-compare-line {
  width: 2px;
  flex: 1;
  background: #fff;
}

.img-compare-grip {
  width: 36px;
  height: 36px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1F1F1F;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.img-compare-label {
  position: absolute;
  bottom: 14px;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0,0,0,0.4);
  padding: 3px 8px;
  pointer-events: none;
}

.img-compare-label-before {
  left: 12px;
}

.img-compare-label-after {
  right: 12px;
}

/* ===========================
   404 Page
   =========================== */
.quote-block {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  line-height: 1.75;
  color: var(--color-text-muted);
  margin-bottom: 40px;
  max-width: 480px;
}

.quote-author {
  display: block;
  font-style: normal;
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.05em;
  margin-top: 8px;
}

/* ===========================
   Image Protection
   =========================== */
img,
video {
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  image-rendering: auto;
}

.work-gallery img,
.work-gallery video,
.card-inner {
  filter: blur(0.4px);
  transform: scale(1.005);
}

/* ===========================
   Drawing Canvas (About page)
   =========================== */
#draw-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 50;
  pointer-events: none;
}

body.draw-page {
  cursor: url('../assets/images/icons/pencil.svg') 2 22, crosshair;
}

/* --- Infinite canvas (404 page) --- */
body.page-infinite {
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

body.page-infinite.hand-mode {
  cursor: url('../assets/images/icons/handcursor.svg') 9 9, grab !important;
}

body.page-infinite.hand-mode.panning {
  cursor: url('../assets/images/icons/grab-close.svg') 9 9, grabbing !important;
}

body.page-infinite .main {
  will-change: transform;
}

.draw-toolbox-toggles {
  display: flex;
  align-items: center;
  gap: 4px;
}

#hand-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ECEAE3;
  border: none;
  padding: 0;
  transition: background 0.2s ease;
}

#hand-btn:hover {
  background: #E0DED7;
}

#hand-btn.active {
  background: var(--color-text);
}

#hand-btn.active .toolbox-icon {
  filter: brightness(0) invert(1);
}

body.page-infinite #hand-btn {
  display: flex;
}

body.draw-page a,
body.draw-page button:not(.draw-toolbox-toggle):not(#hand-btn) {
  cursor: url('../assets/images/icons/grab-open.svg') 9 9, pointer;
}

body.draw-page .topnav a,
body.draw-page .topnav button {
  cursor: pointer;
}

/* ===========================
   Draw Toolbox
   =========================== */
.draw-toolbox {
  position: fixed;
  right: var(--sidebar-padding);
  top: calc(var(--sidebar-padding) + var(--topnav-height) + 8px);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.draw-toolbox.visible {
  opacity: 1;
  pointer-events: auto;
}

.draw-toolbox.dragging,
.draw-toolbox.dragging .draw-toolbox-toggle {
  cursor: url('../assets/images/icons/grab-close.svg') 9 9, grabbing;
}

/* Toggle button (toolbox icon) — always visible when toolbox is shown */
.draw-toolbox-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ECEAE3;
  border: none;
  cursor: url('../assets/images/icons/grab-open.svg') 9 9, grab;
  padding: 0;
  transition: background 0.2s ease;
}

.draw-toolbox-toggle .toolbox-icon {
  cursor: inherit
}

.draw-toolbox-toggle:hover {
  background: #E0DED7;
}

/* Pencil selector — center-expanding picker */
.pencil-selector-wrap {
  position: relative;
}

.topnav .pencil-selector-wrap {
  display: flex;
  align-items: stretch;
}

.pencil-selector-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) scale(0);
  transform-origin: center top;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 44px;
  padding: 10px;
  border-radius: 4px;
  background: #ECEAE3;
  box-sizing: border-box;
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.pencil-selector-panel.open {
  transform: translateX(-50%) scale(1);
  opacity: 1;
}

/* Topnav pencil selector — bordered dropdown column */
.topnav .pencil-selector-panel {
  left: -1px;
  right: -1px;
  width: auto;
  top: 100%;
  padding: 0;
  gap: 0;
  border-radius: 0 0 4px 4px;
  overflow: hidden;
  background: var(--color-bg);
  border: 1px solid var(--color-ui-border);
  border-top: none;
  transform: scaleY(0);
  transform-origin: top center;
  opacity: 1;
  z-index: 99;
}

.topnav .pencil-selector-panel.open {
  transform: scaleY(1);
}

.topnav .pencil-selector-panel .draw-toolbox-btn {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: 0;
  border-bottom: 1px solid var(--color-ui-border);
}

.topnav .pencil-selector-panel .draw-toolbox-btn:last-child {
  border-bottom: none;
}

.topnav .pencil-selector-panel .toolbox-icon {
  width: 20px;
  height: 20px;
}

/* Toolbox wrap — navbar dropdown */
.toolbox-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
}

.toolbox-wrap .draw-toolbox {
  position: absolute;
  top: 100%;
  right: -1px;
  left: -1px;
  opacity: 1;
  pointer-events: auto;
  flex-direction: column;
  align-items: stretch;
  z-index: 99;
}

.toolbox-wrap .draw-toolbox-panel {
  margin-top: 0;
  padding: 0;
  gap: 0;
  width: 100%;
  border-radius: 0 0 4px 4px;
  background: var(--color-bg);
  border: 1px solid var(--color-ui-border);
  border-top: none;
  align-self: stretch;
}

.toolbox-wrap .draw-toolbox-panel.open {
  max-height: 800px;
}

.toolbox-wrap .draw-toolbox-panel > .draw-toolbox-btn {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: 0;
  border-bottom: 1px solid var(--color-ui-border);
}

.toolbox-wrap .draw-toolbox-panel > .draw-toolbox-btn:last-child {
  border-bottom: none;
  border-radius: 0 0 4px 4px;
}

.toolbox-wrap .draw-weight-picker {
  width: 100%;
}

.toolbox-wrap .draw-weight-picker .draw-toolbox-btn {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: 4px;
  border-bottom: 1px solid var(--color-ui-border);
}

.toolbox-wrap .draw-color-picker {
  width: 100%;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 2px;
  align-items: center;
  justify-content: center;
}

.toolbox-wrap .draw-color-picker.open {
  max-height: 200px;
  padding: 4px 2px 10px;
  margin-bottom: 10px;
}

.toolbox-wrap .draw-weight-picker.open {
  max-height: 200px;
}

.toolbox-wrap .draw-toolbox-divider {
  display: none;
}

.toolbox-wrap .draw-toolbox-panel > #palette-btn {
  border-bottom: none;
}

.toolbox-wrap .draw-toolbox-panel > #wand-btn {
  border-top: 1px solid var(--color-ui-border);
}

.toolbox-wrap .draw-toolbox-panel .toolbox-icon {
  width: 20px;
  height: 20px;
}

/* Expandable panel */
.draw-toolbox-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: flex-end;
  gap: 2px;
  width: 44px;
  padding: 10px;
  border-radius: 4px;
  background: #ECEAE3;
  box-sizing: border-box;
  margin-top: 6px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.25s ease;
}

.draw-toolbox-panel.open {
  max-height: 600px;
  opacity: 1;
}

.draw-toolbox-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: transparent;
  border: none;
  cursor: url('../assets/images/icons/grab-open.svg') 9 9, pointer;
  padding: 0;
  transition: background 0.2s ease;
}

.draw-toolbox-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  border-radius: 4px;
}

.draw-toolbox-btn.active {
  background: var(--color-text);
}

.draw-toolbox-btn.active .toolbox-icon {
  filter: brightness(0) invert(1);
}

.toolbox-icon {
  width: 20px;
  height: 20px;
  display: block;
}

.draw-weight-picker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.draw-weight-picker.open {
  max-height: 80px;
}

.draw-color-picker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  height: 0;
  min-height: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.draw-color-picker.open {
  height: auto;
  max-height: 200px;
}

.draw-color-swatch {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid transparent;
  cursor: url('../assets/images/icons/grab-open.svg') 9 9, pointer;
  padding: 0;
  transition: border-color 0.2s ease, transform 0.15s ease;
}

.draw-color-swatch span {
  display: block;
  width: 13px;
  height: 13px;
  border-radius: 50%;
}

.draw-color-swatch:hover {
  transform: scale(1.2);
}

.draw-color-swatch.active {
  border-color: var(--color-text);
}

.draw-color-random {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: conic-gradient(red, yellow, lime, aqua, blue, magenta, red);
  font-size: 0;
  line-height: 0;
  color: transparent;
}

.draw-toolbox-divider {
  width: 20px;
  height: 1px;
  background: #D6D4CD;
  margin: 2px 0;
}

body.draw-eraser {
  cursor: url('../assets/images/icons/eraser.svg') 12 12, crosshair;
}

body.draw-wand {
  cursor: url('../assets/images/icons/wand.svg') 2 2, crosshair;
}
body.draw-wand a,
body.draw-wand button {
  cursor: url('../assets/images/icons/grab-open.svg') 9 9, pointer;
}

[data-theme="dark"] body.draw-page {
  cursor: url('../assets/images/icons/pencil-light.svg') 2 22, crosshair;
}

[data-theme="dark"] body.draw-eraser {
  cursor: url('../assets/images/icons/eraser-light.svg') 12 12, crosshair;
}

[data-theme="dark"] body.draw-wand {
  cursor: url('../assets/images/icons/wand-light.svg') 2 2, crosshair;
}

[data-theme="dark"] body.page-infinite.hand-mode {
  cursor: url('../assets/images/icons/handcursor.svg') 9 9, grab !important;
}

[data-theme="dark"] body.page-infinite.hand-mode.panning {
  cursor: url('../assets/images/icons/grab-close.svg') 9 9, grabbing !important;
}

/* ===========================
   Blog
   =========================== */

.blog-content {
  padding: 0 var(--sidebar-padding) 60px;
}

.blog-empty {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: 500;
  color: #6B6865;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 32px;
}

.blog-card {
  display: block;
  text-decoration: none;
  color: var(--color-text);
  border-radius: 4px;
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.blog-card:hover {
  opacity: 0.75;
}

.blog-card-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 4px;
  background: #A9A9A0;
}

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

.blog-card-body {
  padding: 16px 0;
}

.blog-card-date {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #CDCAC2;
  margin-bottom: 6px;
}

.blog-card-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 8px;
}

.blog-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.blog-card-tag {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: #6B6865;
  background: rgba(0, 0, 0, 0.04);
  padding: 2px 8px;
  border-radius: 4px;
}

.blog-back {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: 500;
  color: #6B6865;
  text-decoration: none;
  margin-bottom: 32px;
  transition: color 0.2s ease;
}

.blog-back:hover {
  color: var(--color-text);
}

.blog-article {
  max-width: 720px;
}

.blog-article-date {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #CDCAC2;
  margin-bottom: 12px;
}

.blog-article-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 16px;
}

.blog-article-hero {
  width: 100%;
  border-radius: 4px;
  margin: 32px 0;
  display: block;
}

.blog-article-body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: 500;
  line-height: 1.7;
  color: var(--color-text);
}

.blog-article-body h2 {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: 400;
  margin: 40px 0 16px;
}

.blog-article-body h3 {
  font-family: var(--font-serif);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 400;
  margin: 32px 0 12px;
}

.blog-article-body p {
  margin-bottom: 20px;
}

.blog-article-body img {
  max-width: 100%;
  border-radius: 4px;
  margin: 24px 0;
}

.blog-article-body blockquote {
  border-left: 2px solid #CDCAC2;
  padding-left: 20px;
  margin: 24px 0;
  color: #6B6865;
  font-style: italic;
}

.blog-article-body a {
  color: var(--color-text);
  text-decoration: underline;
}

.blog-article-body ul,
.blog-article-body ol {
  padding-left: 24px;
  margin-bottom: 20px;
}

.blog-article-body li {
  margin-bottom: 6px;
}

/* ===========================
   Footer — Grid Layout
   =========================== */
.footer {
  margin-left: calc(-1 * var(--sidebar-width));
  padding: 60px var(--sidebar-padding) var(--sidebar-padding);
}

.footer-grid {
  display: grid;
  background-color: var(--color-bg);
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--color-ui-border);
  border-radius: 4px;
  overflow: hidden;
}

/* Top Row — CTA */
.footer-cta {
  grid-column: span 2;
  padding: 30px 30px;
  border-bottom: 1px solid var(--color-ui-border);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.footer-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

.footer-label-icon {
  width: 20px;
  height: 20px;
  filter: brightness(0) saturate(100%) invert(55%) sepia(5%) saturate(574%) hue-rotate(22deg) brightness(95%) contrast(87%);
}

.footer-label span {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #6B6865;
}

.footer-heading {
  font-family: var(--font-serif);
  font-size: clamp(36px, 4.5vw, 60px);
  font-weight: 400;
  line-height: 1.05;
  color: var(--color-text);
}

/* Top Row — Services */
.footer-services {
  border-left: 1px solid var(--color-ui-border);
  border-bottom: 1px solid var(--color-ui-border);
  display: flex;
  flex-direction: column;
}

.footer-service {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: row;
  align-items: center;
  text-align: left;
  gap: 16px;
  transition: background 0.2s ease;
}

.footer-service:hover {
  background: rgba(0, 0, 0, 0.02);
}

.footer-service + .footer-service {
  border-top: 1px solid var(--color-ui-border);
}

.footer-service-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  object-fit: contain;
  transition: transform 0.3s ease;
}

img.footer-form-hover { display: none; }
.footer-service:hover .footer-form-default,
#form:hover .footer-form-default { display: none; }
.footer-service:hover .footer-form-hover,
#form:hover .footer-form-hover { display: block; }

.footer-service-icon.sprint-spinning,
.btn-email-icon img.sprint-spinning {
  animation: sprint-spin 1s linear infinite;
}

@keyframes sprint-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.footer-service-title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 400;
  color: #1F1F1F;
  line-height: 1.4;
}

.footer-service-desc {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  color: #6B6865;
  /* margin-top: 2px; */
  line-height: 1.4;
}

/* Top Row — Illustration */
.footer-illustration {
  border-left: 1px solid var(--color-ui-border);
  border-bottom: 1px solid var(--color-ui-border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 16px;
  overflow: hidden;
}

.footer-illust-item {
  height: 100%;
  max-height: 200px;
  width: auto;
  opacity: 0.7;
}

/* Bottom Row — Socials */
.footer-socials-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
}

.footer-social {
  height: 44px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #6B6865;
  transition: background 0.2s ease;
}

.footer-social:hover {
  background: rgba(0, 0, 0, 0.02);
}

.footer-social + .footer-social {
  border-left: 1px solid var(--color-ui-border);
}

.footer-social-icon {
  width: 18px;
  height: 18px;
  filter: brightness(0) saturate(100%) invert(55%) sepia(5%) saturate(574%) hue-rotate(22deg) brightness(95%) contrast(87%);
}

/* Illustration — clickable cursors */
.footer-illust-item {
  cursor: url('../assets/images/icons/grab-open.svg') 9 9, grab;
  transition: opacity 0.2s ease, filter 0.2s ease, transform 0.2s ease;
}

.footer-illust-item:hover {
  opacity: 1;
  animation: pencil-bounce 0.5s ease;
}

.footer-illust-item.active {
  opacity: 1;
  filter: brightness(0) invert(1) brightness(0.122);
}

@keyframes pencil-bounce {
  0%   { transform: translateY(0); }
  30%  { transform: translateY(-8px); }
  50%  { transform: translateY(-3px); }
  70%  { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}

/* Copyright */
.footer-copyright {
  grid-column: 1 / -1;
  height: 44px;
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0;
  color: #6B6865;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid var(--color-ui-border);
}

.footer-colophon-link {
  margin-left: 4px;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.footer-colophon-link:hover {
  color: var(--color-text);
}

/* ===========================
   Theme Toggle
   =========================== */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: none;
  cursor: url('../assets/images/icons/grab-open.svg') 9 9, pointer;
  transition: background 0.2s ease;
}

.theme-toggle:hover {
  opacity: 0.7;
}

.theme-toggle .theme-icon {
  width: 18px;
  height: 18px;
}

.theme-toggle .theme-icon-light {
  display: none;
}

[data-theme="dark"] .theme-toggle .theme-icon-dark {
  display: none;
}

[data-theme="dark"] .theme-toggle .theme-icon-light {
  display: block;
}

/* ===========================
   Scroll to Top
   =========================== */
.scroll-top {
  position: fixed;
  bottom: var(--sidebar-padding);
  right: var(--sidebar-padding);
  width: 44px;
  height: 44px;
  border-radius: 4px;
  background: var(--color-bg);
  border: 1px solid var(--color-ui-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 6px 20px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, background 0.2s ease;
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-top:hover {
  background: var(--color-ui-border);
}

.scroll-top-icon {
  width: 20px;
  height: 20px;
  transform: rotate(90deg);
}

[data-theme="dark"] .scroll-top {
  background: #1a1a1a;
  border-color: #333;
}

[data-theme="dark"] .scroll-top:hover {
  background: #2a2a2a;
}

[data-theme="dark"] .scroll-top-icon {
  filter: brightness(0) invert(1);
}

/* ===========================
   Dark Mode
   =========================== */
[data-theme="dark"] {
  --color-bg: #1A1A1A;
  --color-text: #F0F0F0;
  --color-text-muted: #999999;
  --color-border: #F0F0F0;
  --color-card-bg: #111;
  --color-card-text: #fff;
}

[data-theme="dark"] body {
  background-image: radial-gradient(circle, rgba(255,255,255,0.08) 1px, transparent 1px);
}

[data-theme="dark"] .topnav-name {
  color: #FFFFFF;
}

[data-theme="dark"] #form {
  background: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-text);
}

[data-theme="dark"] #form:hover {
  background: #ccc;
  border-color: #ccc;
}

[data-theme="dark"] .btn-email {
  border-color: #333;
  background: #2A2A2A;
}

[data-theme="dark"] .btn-email:hover {
  background: #333;
}

[data-theme="dark"] .btn-email.copied {
  background: #333;
  color: #F0F0F0;
}

[data-theme="dark"] .filter-label,
[data-theme="dark"] .filter-btn,
[data-theme="dark"] .discovery-btn {
  color: #666;
}

[data-theme="dark"] .discovery-pill {
  background-color: #E0DDD6;
}

[data-theme="dark"] .discovery-btn.active {
  color: var(--color-card-bg);
  background-color: transparent;
}

[data-theme="dark"] .portfolio-grid.view-list .card-list-info {
  border-bottom-color: #333;
}

[data-theme="dark"] .portfolio-grid.view-list .portfolio-card:first-child .card-list-info {
  border-top-color: #333;
}

[data-theme="dark"] .card-list-subtitle,
[data-theme="dark"] .card-list-year,
[data-theme="dark"] .work-meta-label,
[data-theme="dark"] .work-team-label,
[data-theme="dark"] .work-impact-label,
[data-theme="dark"] .work-impact-desc {
  color: #999;
}

[data-theme="dark"] .other-works-label {
  color: #999;
}

[data-theme="dark"] .other-works-card {
  background-color: #3A3A3A;
}

[data-theme="dark"] .topnav-icon-link img,
[data-theme="dark"] .work-back-icon,
[data-theme="dark"] .btn-email-icon img,
[data-theme="dark"] .view-icon,
[data-theme="dark"] .work-accordion-icon img,
[data-theme="dark"] .font-size-btn img,
[data-theme="dark"] .font-size-eye,
[data-theme="dark"] .memories-modal-close img {
  filter: brightness(0) invert(1);
}

[data-theme="dark"] .theme-toggle .theme-icon {
  filter: brightness(0) invert(1);
}

[data-theme="dark"] .menu-toggle img {
  filter: brightness(0) invert(1);
}

[data-theme="dark"] .nav-link {
  color: var(--color-text);
}

[data-theme="dark"] .nav-link:hover {
  color: #9A9896;
}

[data-theme="dark"] .nav-link.active {
  color: #9A9896;
}

[data-theme="dark"] .draw-toolbox-toggle,
[data-theme="dark"] .draw-toolbox-panel,
[data-theme="dark"] .pencil-selector-panel,
[data-theme="dark"] #hand-btn {
  background: #2A2A2A;
}

[data-theme="dark"] .topnav .pencil-selector-panel {
  background: var(--color-bg);
}

[data-theme="dark"] .toolbox-wrap .draw-toolbox-panel {
  background: var(--color-bg);
}

[data-theme="dark"] .draw-toolbox-toggle:hover,
[data-theme="dark"] #hand-btn:hover {
  background: #333;
}

[data-theme="dark"] #hand-btn.active {
  background: var(--color-text);
}

[data-theme="dark"] #hand-btn.active .toolbox-icon {
  filter: brightness(0);
}

[data-theme="dark"] .toolbox-icon {
  filter: brightness(0) invert(1);
}

[data-theme="dark"] .draw-toolbox-btn.active .toolbox-icon {
  filter: brightness(0);
}

[data-theme="dark"] .draw-toolbox-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

[data-theme="dark"] .draw-toolbox-divider {
  background: #444;
}

[data-theme="dark"] .draw-color-swatch.active {
  border-color: #F0F0F0;
}

[data-theme="dark"] {
  --color-ui-border: #333;
}

[data-theme="dark"] .footer-label span {
  color: #999;
}

[data-theme="dark"] .footer-service-title {
  color: #F0F0F0;
}

[data-theme="dark"] .footer-service-desc {
  color: #999;
}

[data-theme="dark"] .footer-social {
  color: #999;
}

[data-theme="dark"] .footer-copyright {
  color: #999;
}

[data-theme="dark"] .footer-label-icon,
[data-theme="dark"] .footer-service-icon,
[data-theme="dark"] .footer-social-icon,
[data-theme="dark"] .footer-illust-item {
  filter: brightness(0) invert(1);
}

[data-theme="dark"] .footer-illust-item.active {
  filter: brightness(0) invert(1) brightness(0.122);
}

[data-theme="dark"] .footer-service:hover,
[data-theme="dark"] .footer-social:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Dark mode — grab cursors */
[data-theme="dark"] a,
[data-theme="dark"] button {
  cursor: url('../assets/images/icons/grab-open.svg') 9 9, pointer;
}

[data-theme="dark"] .footer-illust-item {
  cursor: url('../assets/images/icons/grab-open.svg') 9 9, grab;
}


[data-theme="dark"] .draw-toolbox-toggle {
  cursor: url('../assets/images/icons/grab-open.svg') 9 9, grab;
}

/* ===========================
   Dark Mode — Sprint Page
   =========================== */

/* Check icons */
[data-theme="dark"] .work-impact-icon {
  filter: brightness(0) invert(1);
}

/* Global p override for dark mode */
[data-theme="dark"] p {
  color: #C0C0C0;
}

/* Hero subheadline */
[data-theme="dark"] .page-sprint .theme-toggle {
  background: #2A2A2A;
}

[data-theme="dark"] .page-sprint .theme-toggle:hover {
  background: #333;
}

[data-theme="dark"] .sprint-hero-sub {
  color: #999;
}

/* CTA button */
[data-theme="dark"] .sprint-cta-btn {
  border-color: #333;
  background: #2A2A2A;
  color: #F0F0F0;
}

[data-theme="dark"] .sprint-cta-btn:hover {
  background: #333;
}

/* Problem cards */
[data-theme="dark"] .sprint-problem-card {
  border-color: #333;
}

[data-theme="dark"] .sprint-problem-card p {
  color: #F0F0F0;
}

[data-theme="dark"] .sprint-card-arrow img {
  filter: brightness(0) invert(1);
}

/* Pricing */
[data-theme="dark"] .sprint-pricing-box {
  border-color: #333;
}

[data-theme="dark"] .sprint-pricing-header {
  border-bottom-color: #333;
}

[data-theme="dark"] .sprint-pricing-label {
  color: #666;
}

[data-theme="dark"] .sprint-pricing-item {
  color: #C0C0C0;
  border-bottom-color: #333;
}

[data-theme="dark"] .sprint-pricing-item:nth-child(odd) {
  border-right-color: #333;
}

.page-sprint .theme-toggle {
  border-radius: 50%;
  background: #ECEAE3;
  border: none;
}

.page-sprint .theme-toggle:hover {
  background: #E0DED7;
}

.page-sprint .theme-toggle .theme-icon {
  width: 20px;
  height: 20px;
}

/* ===========================
   Responsive — Mid Viewport
   =========================== */
@media (min-width: 1221px) {
  .page-home .hero {
    grid-template-columns: calc((100% - 40px) / 3) 1fr;
    column-gap: 20px;
  }
}

@media (max-width: 1220px) {
  .page-home .hero {
    grid-template-columns: minmax(380px, 1fr) 2fr;
  }
}

/* ===========================
   Responsive — Tablet
   =========================== */
@media (max-width: 1024px) {
  .hero {
    padding: 24px var(--sidebar-padding) 40px;
  }

  .portfolio {
    padding: 40px var(--sidebar-padding) 0;
  }

  .portfolio-grid.view-list {
    margin-left: 0;
    margin-right: 0;
  }

  .work-layout {
    grid-template-columns: 1fr;
  }

  .work-info-col {
    position: static;
    max-height: none;
    overflow-y: visible;
    border-right: none;
    border-bottom: 1px solid var(--color-ui-border);
    padding: 40px var(--sidebar-padding);
  }

  .work-gallery-col {
    padding: 0 var(--sidebar-padding);
  }

  .footer {
    padding: 80px var(--sidebar-padding) 40px;
  }

  .footer-cta {
    padding: 36px 32px;
  }

  .footer-service {
    padding: 20px;
  }

  .carousel-card {
    width: 360px;
  }

  .carousel-track {
    height: 280px;
  }
}

/* ===========================
   Responsive — Narrow Tablet
   =========================== */
@media (max-width: 900px) {
  .page-home .hero {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .page-home .hero .hero-col {
    display: contents;
  }

  /* Reset explicit desktop grid positions */
  .page-home .hero .hero-col:first-child > :nth-child(1),
  .page-home .hero .hero-col:first-child > :nth-child(2),
  .page-home .hero .hero-col:first-child > :nth-child(3),
  .page-home .hero .hero-col:first-child > :nth-child(4),
  .page-home .hero .hero-col:last-child  > :nth-child(1),
  .page-home .hero .hero-col:last-child  > :nth-child(2),
  .page-home .hero .hero-col:last-child  > :nth-child(3),
  .page-home .hero .hero-col:last-child  > :nth-child(4) {
    grid-column: auto;
    grid-row: auto;
  }

  /* Remove top gap only from the first item (ABOUT ME label) */
  .page-home .hero .hero-col:first-child > :nth-child(1) {
    margin-top: 0;
  }

  /* MY PHILOSOPHY is the first child of its col so inherits margin-top: 0 — restore spacing */
  .page-home .hero .hero-col:last-child > :nth-child(1) {
    margin-top: 32px;
  }

  /* Mobile reading order: ABOUT ME → MY PHILOSOPHY → GET IN TOUCH */
  .page-home .hero .hero-col:first-child > :nth-child(1) { order: 1; }
  .page-home .hero .hero-col:first-child > :nth-child(2) { order: 2; }
  .page-home .hero .hero-col:last-child  > :nth-child(1) { order: 3; }
  .page-home .hero .hero-col:last-child  > :nth-child(2) { order: 4; }
  .page-home .hero .hero-col:first-child > :nth-child(3) { order: 5; }
  .page-home .hero .hero-col:first-child > :nth-child(4) { order: 6; }
}

/* ===========================
   Responsive — Mobile
   =========================== */
@media (max-width: 768px) {
  :root {
    --sidebar-padding: 24px;
    --topnav-height: 52px;
    --fs-label: 13px;
    --fs-detail: 15px;
    --fs-body-base: 17px;
  }

  .main {
    padding-top: calc(var(--sidebar-padding) + var(--topnav-height));
  }

  .topnav-icon-link,
  .topnav .menu-toggle {
    width: 52px;
  }

  .topnav .theme-toggle {
    position: fixed;
    bottom: var(--sidebar-padding);
    left: var(--sidebar-padding);
    top: auto;
    width: 44px;
    height: 44px;
    border: 1px solid var(--color-ui-border);
    border-radius: 4px;
    background: var(--color-bg);
    z-index: 90;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 6px 20px rgba(0, 0, 0, 0.1);
  }

  [data-theme="dark"] .topnav .theme-toggle {
    background: #1a1a1a;
    border-color: #333;
  }

  [data-theme="dark"] .topnav .theme-toggle:hover {
    background: #2a2a2a;
  }

  .about-image {
    grid-template-columns: 1fr 1fr;
  }

  .about-things {
    grid-column: 2;
  }

  .hero {
    padding: 28px 24px 32px var(--sidebar-padding);
    max-width: 100%;
  }

  .hero-heading {
    margin-bottom: 28px;
  }

  .hero-heading .br-desktop {
    display: none;
  }

  .hero-bio br {
    display: none;
  }

  .hero-bio .exp-date {
    display: block;
  }

  .hero-heading .br-mobile {
    display: inline;
  }

  .hero-bio {
    font-size: var(--fs-body);
    margin-bottom: 28px;
  }

  .work-impact.sprint-features {
    padding: 40px 24px 60px;
  }

  .portfolio {
    padding: 32px 24px 0;
  }

  .portfolio-toolbar {
    flex-wrap: wrap;
    gap: 16px;
  }

  .portfolio-filter {
    gap: 16px;
    margin-bottom: 0;
  }

  .page-home .hero {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .page-home .hero .hero-col:last-child {
    grid-column: auto;
  }

  .page-about .hero,
  .about-story {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .about-image {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .about-image img,
  .about-things {
    grid-column: 1;
  }

  .about-col-img--turtle {
    width: 100%;
  }

  .hero-col + .hero-col > .hero-label:first-child {
    margin-top: 32px;
  }

  .hero-col .hero-bio {
    font-size: var(--fs-body);
    line-height: 1.85;
  }

  .discovery-btn {
    font-size: 16px;
    padding: 6px 10px;
  }

  .card-metric-label {
    font-size: 11px;
  }

  .work-filters-sticky {
    position: sticky;
    top: calc(var(--sidebar-padding) + var(--topnav-height) + 8px);
    background: var(--color-bg);
    z-index: 50;
    padding: 8px 0;
    margin-bottom: 8px;
  }

  .portfolio-grid,
  .selected-work-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .card-inner {
    border-radius: 0;
  }

  .card-info {
    padding-bottom: 4px;
  }

  .portfolio-grid.view-list {
    margin-left: 0;
    margin-right: 0;
  }

  .portfolio-grid.view-list .card-list-info {
    padding: 16px 0;
  }

  .card-list-title {
    font-size: 16px;
  }

  .card-list-year {
    margin-left: 24px;
  }

  .footer {
    margin-left: 0;
    padding: 32px 24px 80px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-cta {
    grid-column: 1 / -1;
    border-right: none;
    padding: 32px 24px;
  }

  .footer-heading {
    font-size: 56px;
  }

  .footer-services {
    border-left: none;
  }

  .footer-service-title {
    font-size: 14px;
  }

  .footer-service-desc {
    font-size: 12px;
  }

  .footer-label span {
    font-size: 13px;
  }

  .footer-illustration {
    border-left: 1px solid var(--color-ui-border);
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    justify-content: center;
    padding: 20px 16px;
    -webkit-overflow-scrolling: touch;
  }

  .footer-illust-item {
    width: 32.875px;
    height: 200px;
    max-height: none;
    flex-shrink: 0;
  }

  .about-image-carousel {
    margin-left: 0;
    width: 100%;
    padding: 20px;
  }

  .about-carousel-card {
    width: 80%;
  }

  .footer-socials-row {
    grid-column: 1 / -1;
  }

  .footer-social:nth-child(2n) {
    border-left: 1px solid var(--color-ui-border);
  }

  .footer-social:nth-child(2n+1) {
    border-left: none;
  }

  .footer-social:nth-child(n+3) {
    border-top: 1px solid var(--color-ui-border);
  }

  #work-detail {
    padding: 0;
  }

  .work-back {
    margin-bottom: 32px;
  }

  .work-title {
    margin-bottom: 28px;
  }

  .work-meta {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 32px;
  }

  .work-gallery {
    width: 100vw;
    margin-left: -24px;
    padding: 0 var(--sidebar-padding);
  }

  .work-gallery .img-protect,
  .work-gallery .video-wrap {
    margin-bottom: 16px;
  }

  .video-mute-btn {
    opacity: 1;
  }

  .work-impact {
    padding: 40px 0;
  }

  .other-works {
    padding: 40px var(--sidebar-padding);
  }

  .other-works-track {
    flex-wrap: nowrap;
  }

  .other-works-card {
    width: 120px;
  }

  .draw-toolbox {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    top: auto;
    bottom: 24px;
    flex-direction: column-reverse;
  }

  .draw-toolbox-panel {
    margin-top: 0;
    margin-bottom: 6px;
  }

  .draw-toolbox-toggle {
    width: 38px;
    height: 38px;
  }

  .pencil-selector-panel {
    top: auto;
    bottom: calc(100% + 6px);
    transform-origin: center bottom;
  }

  .pencil-selector-panel.open {
    transform: translateX(-50%) scale(1);
  }

  /* Keep topnav dropdowns pointing downward on mobile */
  .topnav .pencil-selector-panel {
    top: 100%;
    bottom: auto;
    transform: scaleY(0);
    transform-origin: top center;
  }

  .topnav .pencil-selector-panel.open {
    transform: scaleY(1);
  }

  .toolbox-wrap .draw-toolbox {
    top: 100%;
    bottom: auto;
    left: -1px;
    right: -1px;
    transform: none;
  }

  .draw-toolbox-btn {
    width: 20px;
    height: 20px;
  }

  .draw-toolbox-panel,
  .pencil-selector-panel {
    width: 38px;
    padding: 9px;
  }

  /* Keep navbar dropdown buttons square on mobile */
  .topnav .pencil-selector-panel .draw-toolbox-btn,
  .toolbox-wrap .draw-toolbox-panel .draw-toolbox-btn,
  .toolbox-wrap .draw-weight-picker .draw-toolbox-btn {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    min-height: unset;
    box-sizing: border-box;
  }

  .topnav .pencil-selector-panel,
  .toolbox-wrap .draw-toolbox-panel {
    width: 100%;
    padding: 0;
  }

  .topnav .pencil-selector-panel .toolbox-icon,
  .toolbox-wrap .draw-toolbox-panel .toolbox-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }

  .toolbox-icon {
    width: 16px;
    height: 16px;
  }

  .theme-toggle .theme-icon {
    width: 18px;
    height: 18px;
  }

  .carousel-section {
    margin-left: 0;
    padding: 20px 0 10px;
  }

  .carousel-card {
    width: 400px;
  }

  .carousel-track {
    height: 300px;
  }
}

/* ===========================
   Responsive — Small Mobile
   =========================== */
@media (max-width: 480px) {
  .hero {
    padding: 20px var(--sidebar-padding) 24px;
  }

  .hero-heading {
    margin-bottom: 24px;
  }

  .hero-bio {
    font-size: var(--fs-body);
    line-height: 1.7;
    margin-bottom: 24px;
  }

  .page-home .hero-cta {
    flex-wrap: nowrap;
  }

  .page-home .hero-cta .btn-email-sm {
    padding: 0 12px;
  }

  .portfolio {
    padding: 24px var(--sidebar-padding) 0;
  }

  .portfolio-toolbar {
    gap: 12px;
  }

  .portfolio-filter {
    gap: 12px;
  }

  .filter-label,
  .filter-btn,
  .discovery-btn {
    font-size: 10px;
  }

  .portfolio-grid {
    gap: 12px;
  }

  .portfolio-grid.view-list {
    margin-left: 0;
    margin-right: 0;
  }

  .card-list-subtitle {
    display: none;
  }

  .card-list-year {
    margin-left: 16px;
  }

  .footer {
    padding: 32px var(--sidebar-padding) 80px;
  }

  .footer-cta {
    padding: 24px var(--sidebar-padding);
  }

  .footer-heading {
    font-size: 40px;
  }

  .footer-copyright,
  .footer-social {
    font-size: 12px;
  }

  .footer-illust-item {
    width: 32.875px;
    height: 200px;
    max-height: none;
    flex-shrink: 0;
  }

  .work-title {
    margin-bottom: 24px;
  }

  .work-gallery {
    width: 100vw;
    margin-left: calc(-1 * var(--sidebar-padding));
    padding: 0 var(--sidebar-padding);
  }

  .work-gallery .img-protect,
  .work-gallery .video-wrap {
    margin-bottom: 12px;
  }

  .other-works {
    padding: 32px var(--sidebar-padding);
  }

  .other-works-card {
    width: 100px;
  }

  .carousel-section {
    padding: 16px 0 8px;
  }

  .carousel-card {
    width: 340px;
  }

  .carousel-track {
    height: 260px;
  }
}

/* ===========================
   Reduced Motion
   =========================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .work-overlay-panel {
    transform: none !important;
  }
}
