/* ==========================================================================
   GIULIA BARTOCCELLI — BESPOKE TEXTILE & BLUE-THREAD PORTFOLIO CSS
   Palette: Crisp Cotton Paper White & Deep Ultramarine / Cobalt Blue
   ========================================================================== */

:root {
  --paper: #F9FAFC;
  --paper-pure: #FFFFFF;
  --linen: #F1F5FC;
  --wash: #E4ECFA;
  --cobalt: #1436A8;
  --cobalt-mid: #1F47CA;
  --cerulean: #2B59FF;
  --indigo: #0B1B54;
  --ink: #131D3A;
  --ink-muted: #4E5B7D;
  --stitch-line: rgba(20, 54, 168, 0.22);
  --stitch-soft: rgba(20, 54, 168, 0.10);

  --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;

  --radius-sm: 4px;
  --radius-md: 10px;
  --ease-silk: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 78px;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--paper);
  color: var(--ink);
  font-size: 16px;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
}

/* Subtle Cotton / Linen Woven Background Texture */
.linen-texture {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(20, 54, 168, 0.018) 0px,
      rgba(20, 54, 168, 0.018) 1px,
      transparent 1px,
      transparent 9px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(20, 54, 168, 0.018) 0px,
      rgba(20, 54, 168, 0.018) 1px,
      transparent 1px,
      transparent 9px
    ),
    radial-gradient(circle at 12% 18%, rgba(43, 89, 255, 0.05), transparent 42%),
    radial-gradient(circle at 86% 68%, rgba(20, 54, 168, 0.045), transparent 45%);
}

/* Interactive Silk Cursor Thread Canvas */
#cursor-thread-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 60;
  pointer-events: none;
}

/* Full-Page Scroll-Woven Thread Spine */
.page-thread-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

#page-thread-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Top Reading Stitch Bar */
.stitch-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 90;
  background: rgba(20, 54, 168, 0.06);
}

.stitch-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cobalt), var(--cerulean));
  box-shadow: 0 0 10px rgba(43, 89, 255, 0.45);
  transition: width 80ms linear;
}

/* Container & Layout */
.container {
  width: min(1180px, calc(100% - 2.8rem));
  margin-inline: auto;
  position: relative;
  z-index: 5;
}

.section {
  padding-block: clamp(4.5rem, 8.5vw, 7.5rem);
  position: relative;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cobalt);
}

.mono-xs {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mono-sm {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.site-header {
  position: fixed;
  top: 3px;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 80;
  transition: background-color 0.35s var(--ease-silk), box-shadow 0.35s var(--ease-silk), backdrop-filter 0.35s;
}

.site-header.is-scrolled {
  background: rgba(249, 250, 252, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--stitch-line);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--indigo);
}

.brand-knot {
  display: inline-flex;
  color: var(--cobalt);
  transition: transform 0.6s var(--ease-silk);
}

.brand:hover .brand-knot {
  transform: rotate(12deg) scale(1.08);
}

.brand-text {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2.2rem;
}

.nav-link {
  position: relative;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink);
  padding-block: 0.35rem;
  transition: color 0.25s ease;
}

/* Stitched animated underline on hover */
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--cobalt) 0px,
    var(--cobalt) 6px,
    transparent 6px,
    transparent 10px
  );
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.42s var(--ease-silk);
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--cobalt);
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Bilingual Toggle */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.28rem 0.55rem;
  border: 1px dashed var(--stitch-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.lang-btn {
  border: none;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  padding: 0.22rem 0.45rem;
  border-radius: 999px;
  color: var(--ink-muted);
  transition: background-color 0.25s, color 0.25s;
}

.lang-btn.is-active {
  background-color: var(--cobalt);
  color: var(--paper-pure);
}

.lang-divider {
  color: var(--stitch-line);
  font-size: 0.72rem;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px dashed var(--stitch-line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 0;
}

.mobile-menu-btn span {
  display: block;
  width: 18px;
  height: 1.6px;
  background: var(--cobalt);
  transition: transform 0.3s var(--ease-silk);
}

.mobile-menu-btn.is-open span:first-child {
  transform: translateY(3.3px) rotate(45deg);
}

.mobile-menu-btn.is-open span:last-child {
  transform: translateY(-3.3px) rotate(-45deg);
}

.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 75;
  background: rgba(249, 250, 252, 0.97);
  backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-silk);
}

.mobile-drawer.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  padding: 2rem;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
}

.mobile-nav-link {
  font-family: var(--font-serif);
  font-size: 2.3rem;
  color: var(--indigo);
  transition: color 0.25s;
}

.mobile-nav-link:hover {
  color: var(--cobalt);
}

.mobile-drawer-meta {
  text-align: center;
  color: var(--ink-muted);
  border-top: 1px dashed var(--stitch-line);
  padding-top: 1.5rem;
}

/* ==========================================================================
   HERO SECTION & HANGING SWAYING BLUE THREADS
   ========================================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-h) + 3rem);
  padding-bottom: 5.5rem;
  overflow: hidden;
}

/* Organic suspended blue threads hanging from top viewport */
.hanging-threads {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 360px;
  pointer-events: none;
  z-index: 2;
}

.h-thread {
  position: absolute;
  top: 0;
  width: 1.5px;
  background: linear-gradient(180deg, var(--cobalt) 0%, rgba(20, 54, 168, 0.45) 75%, transparent 100%);
  transform-origin: top center;
  animation: threadSway var(--dur, 7s) ease-in-out infinite alternate;
}

.h-thread::after {
  content: "";
  position: absolute;
  bottom: 18%;
  left: -3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1.5px solid var(--cobalt);
  background: var(--paper);
}

.h-thread-1 { left: 7%;  height: 210px; --dur: 6.4s; --angle: 2.2deg; opacity: 0.45; }
.h-thread-2 { left: 23%; height: 145px; --dur: 8.1s; --angle: -1.8deg; opacity: 0.30; }
.h-thread-3 { left: 52%; height: 185px; --dur: 7.2s; --angle: 1.6deg; opacity: 0.38; }
.h-thread-4 { left: 82%; height: 260px; --dur: 9.0s; --angle: -2.4deg; opacity: 0.48; }
.h-thread-5 { left: 93%; height: 165px; --dur: 6.8s; --angle: 1.9deg; opacity: 0.32; }

@keyframes threadSway {
  0%   { transform: rotate(calc(var(--angle, 2deg) * -1)); }
  100% { transform: rotate(var(--angle, 2deg)); }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  align-items: center;
  gap: clamp(2.5rem, 6vw, 5.5rem);
}

.eyebrow-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.6rem;
}

.stitch-dot {
  width: 26px;
  height: 1.5px;
  background: repeating-linear-gradient(90deg, var(--cobalt) 0 5px, transparent 5px 8px);
}

.hero-title {
  margin: 0 0 1.1rem;
  font-family: var(--font-serif);
  font-size: clamp(3.3rem, 6.8vw, 5.9rem);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: -0.015em;
  color: var(--indigo);
}

.title-line {
  display: block;
}

.title-italic {
  font-style: italic;
  color: var(--cobalt);
  padding-left: clamp(0.6rem, 2.5vw, 2.4rem);
}

.hero-role {
  margin: 0 0 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.hero-statement {
  margin: 0 0 2.5rem;
  max-width: 34rem;
  font-family: var(--font-serif);
  font-size: clamp(1.38rem, 2.1vw, 1.72rem);
  font-style: italic;
  line-height: 1.45;
  color: var(--ink);
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.3rem 1.8rem;
}

/* ==========================================================================
   ELABORATE BUTTONS WITH STITCHED HOVER EFFECTS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: 2px;
  transition: transform 0.35s var(--ease-silk), background-color 0.35s, color 0.35s, box-shadow 0.35s;
}

.btn-primary {
  position: relative;
  padding: 0.95rem 1.85rem;
  background-color: var(--cobalt);
  color: var(--paper-pure);
  border: 1px solid var(--cobalt);
  box-shadow: 0 12px 28px -12px rgba(20, 54, 168, 0.55);
}

/* Inner white basting stitch inside primary button */
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px dashed rgba(255, 255, 255, 0.42);
  pointer-events: none;
  transition: inset 0.35s var(--ease-silk), border-color 0.35s;
}

.btn-primary:hover {
  background-color: var(--indigo);
  border-color: var(--indigo);
  transform: translateY(-2px);
  box-shadow: 0 18px 34px -12px rgba(11, 27, 84, 0.55);
}

.btn-primary:hover::before {
  inset: 2px;
  border-color: rgba(255, 255, 255, 0.72);
}

.btn-primary:hover .btn-arrow,
.btn-light:hover .btn-arrow {
  transform: translateX(4px);
}

.btn-arrow {
  transition: transform 0.35s var(--ease-silk);
}

/* Hand-embroidered underline button */
.btn-thread {
  position: relative;
  padding: 0.6rem 0.2rem;
  color: var(--cobalt);
  background: transparent;
  border: none;
}

.btn-underline-svg {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 10px;
  color: var(--cobalt);
}

.btn-underline-svg path {
  stroke-dasharray: 200;
  stroke-dashoffset: 65;
  transition: stroke-dashoffset 0.65s var(--ease-silk);
}

.btn-thread:hover .btn-underline-svg path {
  stroke-dashoffset: 0;
}

.btn-light {
  position: relative;
  padding: 0.95rem 1.85rem;
  background: var(--paper-pure);
  color: var(--cobalt);
  border: 1px solid var(--paper-pure);
}

.btn-light::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px dashed rgba(20, 54, 168, 0.35);
  pointer-events: none;
  transition: inset 0.35s var(--ease-silk);
}

.btn-light:hover {
  background: var(--linen);
  transform: translateY(-2px);
}

.btn-light:hover::before {
  inset: 2px;
}

/* ==========================================================================
   HERO TEXTILE VISUAL & CORNER BASTING STITCHES
   ========================================================================== */
.textile-frame,
.studio-photo-frame {
  position: relative;
  background: var(--paper-pure);
  padding: 1.15rem;
  border: 1px solid rgba(20, 54, 168, 0.14);
  box-shadow:
    0 24px 55px -30px rgba(11, 27, 84, 0.28),
    0 2px 6px rgba(11, 27, 84, 0.04);
  transition: transform 0.6s var(--ease-silk), box-shadow 0.6s var(--ease-silk);
}

/* Hand-sewn cobalt corner basting stitches (punti d'imbastitura) */
.baste {
  position: absolute;
  width: 22px;
  height: 22px;
  pointer-events: none;
  z-index: 3;
}

.baste::before,
.baste::after {
  content: "";
  position: absolute;
  background: var(--cobalt);
  border-radius: 2px;
  transition: transform 0.45s var(--ease-silk);
}

.baste::before {
  width: 20px;
  height: 1.8px;
  top: 10px;
  left: 1px;
  transform: rotate(-45deg);
}

.baste::after {
  width: 11px;
  height: 1.5px;
  top: 10px;
  left: 5px;
  background: var(--cerulean);
  transform: rotate(45deg);
}

.baste-tl { top: -8px; left: -8px; }
.baste-tr { top: -8px; right: -8px; transform: scaleX(-1); }
.baste-bl { bottom: -8px; left: -8px; transform: scaleY(-1); }
.baste-br { bottom: -8px; right: -8px; transform: scale(-1); }

.textile-frame:hover .baste::before,
.work-card:hover .baste::before,
.pillar-card:hover .baste::before {
  transform: rotate(-45deg) scaleX(1.18);
}

/* SVG Hero Embroidery Motion */
.hero-embroidery-svg {
  width: 100%;
  height: auto;
  background: var(--paper);
  border: 1px dashed rgba(20, 54, 168, 0.15);
}

.hero-thread-anim {
  stroke-dasharray: 650;
  stroke-dashoffset: 650;
  animation: stitchDraw 2.6s var(--ease-silk) forwards;
}

.hero-thread-anim.t2 { animation-delay: 0.35s; }
.hero-thread-anim.t3 { animation-delay: 0.65s; }
.hero-thread-anim.t4 { animation-delay: 0.95s; }

.hero-knot-anim {
  stroke-dasharray: 520;
  stroke-dashoffset: 520;
  animation: stitchDraw 2.2s var(--ease-silk) 0.8s forwards;
}

.hero-dangle {
  transform-origin: 255px 324px;
  animation: gentleWave 6.5s ease-in-out infinite alternate;
}

.hero-dangle.d2 {
  animation-duration: 7.8s;
  animation-direction: alternate-reverse;
}

.svg-spin-slow {
  transform-origin: 250px 290px;
  animation: slowDrift 38s linear infinite;
}

@keyframes stitchDraw {
  to { stroke-dashoffset: 0; }
}

@keyframes gentleWave {
  0%   { transform: rotate(-1.5deg); }
  100% { transform: rotate(2.1deg); }
}

@keyframes slowDrift {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.frame-caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 0.85rem;
  color: var(--cobalt);
}

.frame-caption-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.08rem;
  color: var(--indigo);
}

/* Scroll Hint */
.scroll-thread-hint {
  position: absolute;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--cobalt);
  z-index: 6;
}

.scroll-line {
  width: 1.5px;
  height: 40px;
  background: linear-gradient(180deg, var(--cobalt), transparent);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: "";
  position: absolute;
  top: -16px;
  left: 0;
  width: 100%;
  height: 16px;
  background: var(--cerulean);
  animation: threadDrop 2.1s infinite ease-in-out;
}

@keyframes threadDrop {
  0%   { top: -16px; opacity: 0; }
  30%  { opacity: 1; }
  100% { top: 44px; opacity: 0; }
}

/* ==========================================================================
   STITCHED DIVIDER
   ========================================================================== */
.stitched-divider {
  height: 1px;
  width: 100%;
  background-image: repeating-linear-gradient(
    90deg,
    var(--cobalt) 0px,
    var(--cobalt) 9px,
    transparent 9px,
    transparent 17px
  );
  opacity: 0.28;
}

.stitched-divider-sm {
  margin-block: 1.25rem;
}

/* ==========================================================================
   SECTION HEADERS & FILTERS
   ========================================================================== */
.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 2.5rem;
  margin-bottom: clamp(2.5rem, 4.5vw, 3.8rem);
}

.section-index {
  display: inline-block;
  margin-bottom: 0.65rem;
}

.section-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(2.3rem, 4.3vw, 3.6rem);
  font-weight: 400;
  line-height: 1.06;
  color: var(--indigo);
}

.section-lead {
  margin: 0;
  max-width: 30rem;
  font-size: 1.02rem;
  color: var(--ink-muted);
}

.filter-bar {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.32rem;
  border: 1px dashed var(--stitch-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
}

.filter-btn {
  border: none;
  background: transparent;
  padding: 0.48rem 1rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-muted);
  transition: background-color 0.28s, color 0.28s;
}

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

.filter-btn.is-active {
  background: var(--cobalt);
  color: var(--paper-pure);
}

/* ==========================================================================
   WORKS GALLERY (FEATURED "VINCOLO DI RICORDI" + SCALABLE GRID)
   ========================================================================== */
.works-container {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2.2rem;
}

.work-card {
  position: relative;
  background: var(--paper-pure);
  border: 1px solid rgba(20, 54, 168, 0.14);
  transition: transform 0.55s var(--ease-silk), box-shadow 0.55s var(--ease-silk), border-color 0.4s;
  cursor: pointer;
}

.work-card:hover {
  transform: translateY(-5px);
  border-color: rgba(20, 54, 168, 0.34);
  box-shadow: 0 28px 58px -32px rgba(11, 27, 84, 0.32);
}

/* Featured artwork layout (12 cols editorial split) */
.work-card.is-featured {
  grid-column: span 12;
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  align-items: stretch;
}

/* Standard future artworks (6 cols each) */
.work-card:not(.is-featured) {
  grid-column: span 6;
  display: flex;
  flex-direction: column;
}

.work-media {
  position: relative;
  overflow: hidden;
  background: var(--linen);
  aspect-ratio: 4 / 3;
}

.work-card.is-featured .work-media {
  height: 100%;
  min-height: 410px;
}

.work-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease-silk), filter 0.6s ease;
}

.work-card:hover .work-media img {
  transform: scale(1.035);
}

/* Subtle cobalt cyanotype sheen on hover */
.work-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(20, 54, 168, 0.14), transparent 55%);
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}

.work-card:hover .work-media::after {
  opacity: 1;
}

.work-badge {
  position: absolute;
  top: 1.1rem;
  left: 1.1rem;
  z-index: 2;
  padding: 0.32rem 0.72rem;
  background: rgba(249, 250, 252, 0.92);
  border: 1px dashed var(--stitch-line);
  color: var(--cobalt);
  backdrop-filter: blur(8px);
}

.work-body {
  padding: clamp(1.6rem, 3.2vw, 2.8rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.4rem;
}

.work-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--cobalt);
  margin-bottom: 0.8rem;
}

.work-title {
  margin: 0 0 0.45rem;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3vw, 2.75rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.1;
  color: var(--indigo);
}

.work-card:not(.is-featured) .work-title {
  font-size: 1.95rem;
}

.work-subtitle {
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
  color: var(--cobalt);
  font-weight: 500;
}

.work-description {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.96rem;
}

.work-footer {
  padding-top: 1.25rem;
  border-top: 1px dashed var(--stitch-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.work-medium {
  color: var(--ink-muted);
  font-size: 0.8rem;
}

.work-open-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cobalt);
  white-space: nowrap;
}

.work-card:hover .work-open-cta span:last-child {
  transform: translateX(4px);
}

.work-open-cta span:last-child {
  transition: transform 0.3s var(--ease-silk);
}

/* Archival upcoming note */
.archive-note {
  margin-top: 2.8rem;
  padding: 1.55rem 2rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed var(--stitch-line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem 2rem;
  position: relative;
}

.archive-note-stitch {
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  background: var(--cobalt);
}

.archive-status {
  display: inline-block;
  color: var(--cobalt);
  margin-bottom: 0.35rem;
}

.archive-note-body p {
  margin: 0;
  max-width: 44rem;
  font-size: 0.94rem;
  color: var(--ink-muted);
}

.archive-note-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--cobalt);
  white-space: nowrap;
}

.archive-note-link:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-style: dashed;
}

/* ==========================================================================
   PRACTICE PILLARS
   ========================================================================== */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
}

.pillar-card {
  position: relative;
  padding: 2.3rem 2rem;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(20, 54, 168, 0.13);
  transition: transform 0.45s var(--ease-silk), box-shadow 0.45s var(--ease-silk);
}

.pillar-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 45px -30px rgba(20, 54, 168, 0.34);
}

.pillar-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px dashed var(--cobalt);
  margin-bottom: 1.35rem;
}

.pillar-title {
  margin: 0 0 0.8rem;
  font-family: var(--font-serif);
  font-size: 1.9rem;
  font-weight: 400;
  font-style: italic;
  color: var(--indigo);
}

.pillar-text {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.pillar-stitch-line {
  margin-top: 1.8rem;
  height: 2px;
  width: 48px;
  background: repeating-linear-gradient(90deg, var(--cobalt) 0 6px, transparent 6px 10px);
  transition: width 0.55s var(--ease-silk);
}

.pillar-card:hover .pillar-stitch-line {
  width: 100%;
}

/* ==========================================================================
   ABOUT / BIOGRAFIA
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  align-items: center;
  gap: clamp(2.5rem, 6vw, 5rem);
}

.studio-photo-frame img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px dashed rgba(20, 54, 168, 0.15);
}

.studio-coords {
  display: flex;
  justify-content: space-between;
  margin-top: 0.85rem;
  color: var(--cobalt);
  opacity: 0.82;
}

.about-subtitle {
  margin: 0.45rem 0 1.8rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cobalt);
}

.about-paragraphs p {
  margin: 0 0 1.2rem;
  font-size: 1.03rem;
  color: var(--ink);
}

.about-facts {
  margin: 2.2rem 0 0;
  padding-top: 1.6rem;
  border-top: 1px dashed var(--stitch-line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.fact-item dt {
  color: var(--cobalt);
  margin-bottom: 0.4rem;
}

.fact-item dd {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-muted);
}

/* ==========================================================================
   CONTACT PANEL (INVERTED DEEP COBALT BLUE)
   ========================================================================== */
.contact-panel {
  position: relative;
  background: linear-gradient(140deg, var(--cobalt) 0%, var(--indigo) 100%);
  color: var(--paper-pure);
  padding: clamp(2.5rem, 5.5vw, 4.8rem);
  overflow: hidden;
  box-shadow: 0 32px 70px -30px rgba(11, 27, 84, 0.55);
}

/* Subtle linen weave over cobalt background */
.contact-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.035) 0 1px, transparent 1px 10px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.035) 0 1px, transparent 1px 10px);
  pointer-events: none;
}

.contact-stitch-border {
  position: absolute;
  inset: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.28);
  pointer-events: none;
}

.contact-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: start;
}

.contact-kicker {
  color: rgba(255, 255, 255, 0.72);
  display: inline-block;
  margin-bottom: 0.8rem;
}

.contact-title {
  margin: 0 0 1rem;
  font-family: var(--font-serif);
  font-size: clamp(2.3rem, 4.2vw, 3.5rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.05;
  color: var(--paper-pure);
}

.contact-lead {
  margin: 0 0 2.2rem;
  color: rgba(255, 255, 255, 0.82);
  max-width: 28rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-label {
  display: block;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0.35rem;
}

.email-copy-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
}

.contact-email-link {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  color: var(--paper-pure);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.45);
  transition: border-color 0.25s;
}

.contact-email-link:hover {
  border-color: var(--paper-pure);
}

.copy-btn {
  padding: 0.3rem 0.75rem;
  border: 1px dashed rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--paper-pure);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background-color 0.25s;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.contact-value {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1.05rem;
  border: 1px dashed rgba(255, 255, 255, 0.48);
  border-radius: 999px;
  font-size: 0.86rem;
  transition: background-color 0.25s, color 0.25s;
}

.social-pill:hover {
  background: var(--paper-pure);
  color: var(--cobalt);
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-field label {
  color: rgba(255, 255, 255, 0.72);
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: var(--paper-pure);
  font-family: var(--font-sans);
  font-size: 0.94rem;
  border-radius: 2px;
  transition: border-color 0.25s, background-color 0.25s;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: rgba(255, 255, 255, 0.44);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--paper-pure);
  background: rgba(255, 255, 255, 0.14);
}

.form-helper {
  margin: 0.2rem 0 0;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.5;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  padding-block: 2.2rem;
  border-top: 1px dashed var(--stitch-line);
  background: rgba(249, 250, 252, 0.82);
  position: relative;
  z-index: 5;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--ink-muted);
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--indigo);
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--cobalt);
}

.back-to-top:hover .top-thread-arrow {
  transform: translateY(-3px);
}

.top-thread-arrow {
  transition: transform 0.3s var(--ease-silk);
}

/* ==========================================================================
   LIGHTBOX MODAL
   ========================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-silk);
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 27, 84, 0.72);
  backdrop-filter: blur(10px);
}

.lightbox-dialog {
  position: relative;
  z-index: 2;
  width: min(1040px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--paper);
  border: 1px solid rgba(20, 54, 168, 0.25);
  box-shadow: 0 36px 80px -24px rgba(11, 27, 84, 0.65);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.4s var(--ease-silk);
}

.lightbox.is-open .lightbox-dialog {
  transform: translateY(0) scale(1);
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 4;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px dashed var(--stitch-line);
  background: rgba(249, 250, 252, 0.94);
  color: var(--cobalt);
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.25s, color 0.25s;
}

.lightbox-close:hover {
  background: var(--cobalt);
  color: var(--paper-pure);
}

.lightbox-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
}

.lightbox-image-wrap {
  background: var(--linen);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.lightbox-image-wrap img {
  max-height: 75vh;
  width: auto;
  object-fit: contain;
  box-shadow: 0 18px 40px -24px rgba(11, 27, 84, 0.35);
}

.lightbox-details {
  padding: 2.5rem 2.2rem;
  display: flex;
  flex-direction: column;
}

.lightbox-catalog {
  color: var(--cobalt);
  margin-bottom: 0.6rem;
}

.lightbox-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 400;
  font-style: italic;
  color: var(--indigo);
  line-height: 1.1;
}

.lightbox-subtitle {
  margin: 0;
  color: var(--cobalt);
  font-size: 0.92rem;
}

.lightbox-description {
  margin: 0 0 1.6rem;
  color: var(--ink-muted);
}

.lightbox-specs {
  margin: 0 0 2rem;
  display: grid;
  gap: 0.95rem;
}

.lightbox-specs dt {
  color: var(--cobalt);
  margin-bottom: 0.2rem;
}

.lightbox-specs dd {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink);
}

/* Toast */
.stitch-toast {
  position: fixed;
  bottom: 1.8rem;
  left: 50%;
  transform: translate(-50%, 16px);
  z-index: 120;
  padding: 0.72rem 1.4rem;
  background: var(--indigo);
  color: var(--paper-pure);
  border: 1px dashed rgba(255, 255, 255, 0.45);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s var(--ease-silk);
}

.stitch-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ==========================================================================
   SCROLL REVEAL ANIMATION
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.85s var(--ease-silk), transform 0.85s var(--ease-silk);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 980px) {
  .hero-grid,
  .about-grid,
  .contact-grid,
  .work-card.is-featured,
  .lightbox-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: calc(var(--header-h) + 2rem);
  }

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

  .work-card:not(.is-featured) {
    grid-column: span 12;
  }

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

@media (max-width: 760px) {
  .main-nav {
    display: none;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  .container {
    width: min(1180px, calc(100% - 1.8rem));
  }

  .hero-title {
    font-size: clamp(2.8rem, 13vw, 4rem);
  }

  .scroll-thread-hint {
    display: none;
  }
}

/* Respect Reduced Motion Accessibility Preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  #cursor-thread-canvas {
    display: none;
  }
}
