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

:root {
  --white:      #ffffff;
  --black:      #000000;
  --ink:        #111111;
  --dust:       #888888;
  --border-c:   rgba(0,0,0,0.12);
  --serif:      'EB Garamond', Georgia, serif;
  --sans:       'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --ease:       cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out:   cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* ─── Dark Mode Variables ────────────────────────────────────── */
[data-theme="dark"] {
  --white:      #0c0c0c;
  --black:      #f0f0f0;
  --ink:        #e8e8e8;
  --dust:       #777777;
  --border-c:   rgba(255,255,255,0.10);
}

/* Invert logo image in dark mode */
[data-theme="dark"] .sidebar-logo,
[data-theme="dark"] .brand-logo {
  filter: brightness(0) invert(1);
}

/* Dark mode sidebar and overlay backgrounds */
[data-theme="dark"] .sidebar-left {
  background: #0c0c0c !important;
  border-color: rgba(255,255,255,0.06) !important;
}

[data-theme="dark"] .top-nav-bar {
  background: rgba(12,12,12,0.92) !important;
}

[data-theme="dark"] .main-content {
  background: #0c0c0c;
}

[data-theme="dark"] .lightbox {
  background: rgba(12,12,12,0.98) !important;
}

[data-theme="dark"] .apple-loader {
  background: #0c0c0c;
}

[data-theme="dark"] .apple-spinner {
  border-color: rgba(255,255,255,0.12);
  border-top-color: #f0f0f0;
}

[data-theme="dark"] .inline-input {
  color: var(--black);
  border-bottom-color: rgba(255,255,255,0.2);
}

[data-theme="dark"] .inline-input::placeholder {
  color: rgba(255,255,255,0.25);
}

[data-theme="dark"] .submit-narrative-btn {
  background: var(--black);
  color: var(--white);
}

[data-theme="dark"] .project-detail-view {
  background: #0c0c0c;
}

/* Smooth theme transition on all elements */
html {
  transition: background-color 0.3s ease, color 0.3s ease;
}
body, .sidebar-left, .main-content, .top-nav-bar, .project-detail-view {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

html {
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 10px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  background: var(--white);
  overflow: hidden;
}

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

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

/* ─── Custom Cursor ────────────────────────────────────────── */
.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 5px; height: 5px;
  background: #FF6B00;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  will-change: transform;
  transition: opacity 0.2s;
  display: none;
}

.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 34px; height: 34px;
  border: 1px solid rgba(0,0,0,0.22);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  will-change: transform;
  transition: width 0.5s var(--ease), height 0.5s var(--ease), border-color 0.3s;
  display: none;
}

.cursor-ring.hover {
  width: 52px; height: 52px;
  border-color: rgba(0,0,0,0.13);
}

/* Custom cursor active — set by JS on mousemove */
body.has-custom-cursor *:not(.admin-panel-overlay):not(.admin-panel-overlay *):not(.admin-output-modal):not(.admin-output-modal *):not(.lightbox):not(.lightbox *) {
  cursor: none !important;
}
body.has-custom-cursor .cursor-dot,
body.has-custom-cursor .cursor-ring {
  display: block;
}

/* ─── twossocial Layout ───────────────────────────────────────── */
.twossocial-layout {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* ─── Sidebar Left (Fixed) ─────────────────────────────────── */
.sidebar-left {
  width: 25vw;
  min-width: 280px;
  height: 100vh;
  padding: 4.8rem 4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid rgba(0,0,0,0.06);
  flex-shrink: 0;
  background: var(--white);
  z-index: 10;
}

.sidebar-logo {
  height: 20px;
  width: auto;
  display: block;
  object-fit: contain;
}

.sidebar-controls {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 6rem;
}

.view-toggle {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--dust);
  display: flex;
  align-items: center;
  gap: 1.2rem;
  user-select: none;
}

.sidebar-about {
  margin-top: 2rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 300;
  line-height: 1.5;
  color: var(--dust);
  max-width: 200px;
}

.control-sep {
  opacity: 0.4;
}

.active-project-meta {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  animation: fadeIn 0.8s var(--ease) forwards;
}

.active-proj-title {
  font-family: var(--sans);
  font-size: 1.2rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--black);
}

.active-proj-desc {
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1.5;
  color: var(--dust);
  max-width: 220px;
}

/* ─── Top Bar Navigation ────────────────────────────────────── */
.top-nav-bar {
  position: fixed;
  top: 0;
  right: 0;
  left: 25vw;
  height: 90px;
  padding: 0 6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  pointer-events: none;
  z-index: 5;
}

.top-links {
  pointer-events: all;
  display: flex;
  align-items: center;
}

.nav-item {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--dust);
  transition: color 0.3s;
}

.nav-item:hover,
.nav-item.active {
  color: var(--black);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.nav-sep {
  font-size: 1.1rem;
  color: var(--dust);
  margin-right: 0.6rem;
  margin-left: 0.1rem;
}

/* ── Language Toggle Button ── */
.lang-toggle {
  pointer-events: all;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--dust);
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 2px;
  padding: 0.22rem 0.55rem;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
  line-height: 1;
}
.lang-toggle:hover {
  color: var(--black);
  border-color: var(--black);
}
.lang-toggle.active-lang {
  color: var(--black);
  border-color: var(--black);
  background: transparent;
}

/* ── Dark Mode Toggle Button ── */
.theme-toggle {
  display: none !important; /* Hidden per user request */
  pointer-events: all;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border-c);
  border-radius: 50%;
  cursor: pointer;
  color: var(--dust);
  font-size: 1.2rem;
  transition: color 0.3s, border-color 0.3s, transform 0.5s var(--ease-out);
  flex-shrink: 0;
}
.theme-toggle:hover {
  color: var(--black);
  border-color: var(--black);
  transform: rotate(20deg);
}
.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  line-height: 1;
  display: block;
  transition: opacity 0.3s, transform 0.4s var(--ease-out);
}
[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun  { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }
/* Default (no attr): show moon (= switch to dark) */
html:not([data-theme]) .theme-toggle .icon-sun  { display: none; }
html:not([data-theme]) .theme-toggle .icon-moon { display: block; }

/* ── Top Nav Controls Group (lang + theme toggles) ── */
.top-nav-controls {
  pointer-events: all;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

/* ─── Main Content ──────────────────────────────────────────── */
.main-content {
  flex-grow: 1;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 130px 6rem 8rem;
  scroll-behavior: smooth;
}

/* Hide scrollbar for clean layout */
.main-content::-webkit-scrollbar {
  display: none;
}

.horizontal-rows-container {
  display: flex;
  flex-direction: column;
  gap: 12vh;
}

/* ─── Project Row ───────────────────────────────────────────── */
.project-row {
  display: flex;
  flex-direction: column;
}

.row-images {
  display: flex;
  gap: 2.4vw;
  flex-wrap: nowrap;
  align-items: flex-end;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.row-images::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.row-img-wrapper {
  overflow: hidden;
  height: calc(46vh * var(--zoom-factor, 1.0));
  width: auto; /* Dynamic width to respect natural aspect ratio */
  flex-shrink: 0;
  transition: height 0.4s var(--ease);
}

.row-img-wrapper img,
.row-img-wrapper video {
  height: 100%;
  width: auto; /* Follow natural aspect ratio */
  object-fit: contain; /* Prevent cropping of vertical/portrait shapes */
  display: block;
  transform: scale(1.0);
  transition: transform 2s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.row-img-wrapper:hover img,
.row-img-wrapper:hover video {
  transform: scale(1.035);
}

.row-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 1.8rem;
  padding-right: 0.5rem;
}

.info-left {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.proj-title-sans {
  font-family: var(--sans);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--black);
}

.proj-meta-sans {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 200;
  letter-spacing: 0.06em;
  color: var(--dust);
  max-width: 480px;
  line-height: 1.4;
}


/* ─── Contact Page Styling (Centered & Symmetric) ────────────── */
.contact-centered-layout {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 7vh;
  width: 100%;
}

.contact-hero-title {
  font-family: var(--serif);
  font-size: clamp(3.0rem, 4.5vw, 5.0rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--black);
}

.contact-hero-title em {
  font-style: italic;
  font-weight: 400;
}

.contact-form-block {
  width: 100%;
}

.contact-footer-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding-top: 5vh;
  margin-top: 3vh;
  width: 100%;
}

.info-column {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.info-value {
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--black);
  line-height: 1.4;
}

.info-value-link {
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--black);
  line-height: 1.4;
  display: inline-block;
  transition: opacity 0.3s;
  text-decoration: none;
}

.info-value-link:hover {
  opacity: 0.6;
}



.narrative-form-container {
  margin-top: 2rem;
}

.narrative-sentence {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.1vw, 2.2rem);
  font-weight: 400;
  line-height: 2.1;
  color: var(--dust);
}

.inline-input {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(0,0,0,0.15);
  font-family: var(--sans);
  font-size: clamp(1.5rem, 2.1vw, 2.2rem);
  font-weight: 300;
  color: var(--black);
  padding: 0 0.4rem;
  outline: none;
  text-align: left;
  transition: border-bottom-color 0.3s;
}

/* Precise widths to match placeholders exactly and prevent cropping */
#input-name {
  width: 170px;
}
#input-brand {
  width: 380px;
}
#input-email {
  width: 320px;
}
#input-type {
  width: 440px;
}
#input-timeline {
  width: 340px;
}

.inline-input:focus {
  border-bottom-color: var(--black);
}

.inline-input::placeholder {
  color: rgba(0,0,0,0.22);
}

.narrative-submit-block {
  margin-top: 4.8rem;
}

.submit-narrative-btn {
  background: var(--black);
  color: var(--white);
  border: none;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 1.2rem 3rem;
  cursor: none;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

.submit-narrative-btn:hover {
  background: transparent;
  color: var(--black);
  outline: 1.5px solid var(--black);
}




/* ─── Content Footer ────────────────────────────────────────── */
.content-footer {
  margin-top: 10vh;
  border-top: 1px solid rgba(0,0,0,0.06);
  padding-top: 3.2rem;
}

.copy-text {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 200;
  letter-spacing: 0.08em;
  color: rgba(0,0,0,0.22);
}



/* ─── Control Buttons Style ──────────────────────────────────── */
.control-btn,
.control-zoom {
  transition: color 0.3s;
}

.control-btn:hover,
.control-zoom:hover {
  color: var(--black);
}

.control-btn.active {
  color: var(--black);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ─── Zoom Factor Factor ────────────────────────────────────── */
.row-images {
  transform: scale(var(--zoom-factor, 1.0));
  transform-origin: left bottom;
  transition: transform 0.4s var(--ease);
}

/* ─── View Toggle Display Logic ──────────────────────────────── */
.view-mode-grid #gridViewContainer {
  display: flex !important;
}
.view-mode-grid #listViewContainer {
  display: none !important;
}

.view-mode-list #gridViewContainer {
  display: none !important;
}
.view-mode-list #listViewContainer {
  display: block !important;
}

.view-mode-list .active-project-meta {
  display: none !important;
}

/* ─── List View Table Style ─────────────────────────────────── */
.list-view-container {
  display: none;
  width: 100%;
  animation: fadeIn 0.8s var(--ease) forwards;
}

.project-list-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.project-list-table th {
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--dust);
  padding: 1.8rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.project-list-table td {
  padding: 2.2rem 0;
  font-family: var(--sans);
  font-size: 1.15rem;
  font-weight: 200;
  color: var(--black);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: color 0.3s;
}

.project-list-table tr {
  transition: opacity 0.3s;
}

.project-list-table tbody tr:hover td {
  color: var(--black);
  opacity: 0.85;
}

.font-serif {
  font-family: var(--serif) !important;
  font-size: 1.6rem !important;
  font-style: italic;
  font-weight: 400 !important;
  text-transform: none;
}

/* ─── Fullscreen List Background Hover Preview ───────────────── */
.list-bg-preview {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
  pointer-events: none;
  z-index: 1; /* Sits behind text content but in front of layout background */
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}

.list-bg-preview.visible {
  opacity: 0.14; /* Extremely subtle and elegant fullscreen preview */
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 960px) {
  .twossocial-layout {
    flex-direction: column;
    overflow-y: auto;
    height: auto;
  }
  .sidebar-left {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    padding: 0 1.8rem;
    border-right: none;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
  }

  .sidebar-controls {
    display: none !important;
  }
  body.show-detail .sidebar-controls {
    display: flex !important;
    align-items: center;
  }

  #viewToggleGroup,
  #sidebarActiveProjectMeta,
  #sidebarProjectSpecs,
  #sidebarAbout,
  .sidebar-about,
  .sidebar-meta {
    display: none !important; /* Hide controls, zoom, specs, about block, and sidebar meta on mobile */
  }

  .back-btn-container {
    display: none !important;
  }
  body.show-detail .back-btn-container {
    display: block !important;
  }

  #inlineBackBtn {
    font-size: 1rem;
    padding: 0.5rem 0;
  }

  .top-nav-bar {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: 44px;
    padding: 0 1.8rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 99;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.03);
    overflow-x: auto;
    scrollbar-width: none;
  }
  
  .top-nav-bar::-webkit-scrollbar {
    display: none;
  }

  .top-links {
    display: flex;
    gap: 1.6rem;
    font-size: 0.9rem;
    white-space: nowrap;
  }

  .main-content {
    height: auto;
    padding: 135px 1.8rem 5rem !important; /* Clears both fixed headers with clean margins */
    overflow-y: visible;
  }

  /* When project details are active, hide category nav bar and adjust main padding */
  body.show-detail .top-nav-bar {
    display: none !important;
  }
  
  body.show-detail .main-content {
    padding: 95px 1.8rem 5rem !important;
  }

  .row-images {
    flex-direction: column;
    align-items: stretch;
    gap: 3vh;
    transform: none !important;
  }

  .row-img-wrapper {
    width: 100% !important;
    height: auto !important; /* Keep original aspect ratios on mobile scroll */
  }

  .row-info {
    flex-direction: column;
    gap: 1.2rem;
  }

  .proj-meta-sans {
    max-width: 100%;
  }

  /* Contact page mobile styles */
  .contact-centered-layout {
    gap: 4vh !important;
  }

  .contact-footer-info {
    grid-template-columns: 1fr !important;
    gap: 2.2rem !important;
    margin-top: 2rem !important;
    padding-top: 4vh !important;
  }

  .narrative-sentence {
    font-size: 1.35rem;
    line-height: 1.65;
    letter-spacing: 0.02em;
  }

  .inline-input {
    font-size: 1.4rem;
    width: 100% !important;
    text-align: left;
    display: block;
    margin: 0.5rem 0 1.2rem 0;
    padding: 0.3rem 0;
  }

  #input-name,
  #input-brand,
  #input-email,
  #input-type,
  #input-timeline {
    width: 100% !important;
  }

  .contact-direct-channels {
    flex-direction: column;
    gap: 2.2rem;
    margin-top: 3.5rem;
  }

  /* Gallery track stacking behavior on mobile */
  .project-gallery-track {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 3vh !important;
    overflow-x: visible !important;
  }

  .project-gallery-track .row-img-wrapper {
    width: 100% !important;
    height: auto !important;
  }

  .view-mode-list #gridViewContainer {
    display: flex !important;
  }
  .view-mode-list #listViewContainer {
    display: none !important;
  }
}

/* ─── Seamless SPA View Transitions ───────────────────────────── */
/* SPA View Visibility Control */
body.show-detail #gridViewContainer {
  display: none !important;
}
body.show-detail #listViewContainer {
  display: none !important;
}
body.show-detail #projectDetailView {
  display: block !important;
}
body:not(.show-detail) #projectDetailView {
  display: none !important;
}

.transition-element {
  opacity: 1;
  transform: translateY(0) scale(1.0);
  transition: opacity 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
              transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Exit state: subtle scaling down and gentle sink */
.transition-element.view-transition-exit {
  opacity: 0 !important;
  transform: translateY(12px) scale(0.985) !important;
}

/* Project Detail View default hidden state */
.project-detail-view {
  opacity: 0;
  transform: translateY(12px) scale(0.985);
  transition: opacity 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
              transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Active entry state */
.project-detail-view.view-transition-active {
  opacity: 1 !important;
  transform: translateY(0) scale(1.0) !important;
}

/* ─── Project Detail Page Layout ─────────────────────────────── */

.back-btn {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--black);
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem 0;
  transition: transform 0.3s var(--ease);
}

.back-btn:hover {
  transform: translateX(-4px);
}

.project-specs {
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
  border-top: 1px solid rgba(0,0,0,0.06);
  padding-top: 2.8rem;
}

.spec-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.spec-label {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 200;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dust);
}

.spec-value {
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--black);
}

.project-detail-container {
  display: flex;
  flex-direction: column;
  gap: 6vh;
  margin-top: 2vh;
}

.project-detail-header {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  max-width: 680px;
}

.project-detail-title {
  font-size: clamp(3.2rem, 5vw, 5.6rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--black);
}

.project-detail-desc {
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 200;
  letter-spacing: 0.05em;
  line-height: 1.6;
  color: var(--dust);
}

/* Gallery track for project page */
.project-gallery-track {
  display: flex;
  gap: 2.8vw;
  flex-wrap: nowrap;
  align-items: flex-end;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  width: 100%;
}

.project-gallery-track::-webkit-scrollbar {
  display: none;
}

.project-gallery-track .row-img-wrapper {
  height: 56vh; /* Larger horizontal focus on detailed pages */
}

/* Mobile-only Specs layout block */
.mobile-project-specs {
  display: none;
}

@media (max-width: 960px) {
  .mobile-project-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin: 0.8rem 0 1.2rem 0;
    border-top: 1px solid rgba(0,0,0,0.05);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 1.4rem 0;
    width: 100%;
  }

  .mob-spec {
    display: flex;
    gap: 0.6rem;
    font-family: var(--sans);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    color: var(--black);
  }

  .mob-spec-label {
    text-transform: uppercase;
    font-weight: 300;
    letter-spacing: 0.12em;
    color: var(--dust);
  }
}

/* ─── Editorial Blog Page Styling ───────────────────────────── */
.blog-article-container {
  max-width: 740px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  width: 100%;
}

.article-header {
  border-bottom: 1px solid rgba(0,0,0,0.05);
  padding-bottom: 2.8rem;
}

.article-meta-label {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dust);
  display: block;
  margin-bottom: 1.2rem;
}

.article-title {
  font-size: clamp(2.2rem, 3.8vw, 3.8rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--black);
  letter-spacing: -0.01em;
}

.article-lead {
  font-family: var(--sans);
  font-size: 1.2rem;
  font-weight: 200;
  line-height: 1.6;
  color: var(--dust);
  margin-top: 1.4rem;
}

.article-body-content {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 200;
  line-height: 1.85;
  color: #333333;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.article-body-content h2 {
  font-size: 1.8rem;
  color: var(--black);
  margin-top: 2.5rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.article-body-content blockquote {
  border-left: 2px solid var(--black);
  padding-left: 2rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--black);
  margin: 2.2rem 0;
  line-height: 1.5;
}

.article-suggested-posts {
  border-top: 1px solid rgba(0,0,0,0.06);
  padding-top: 2.8rem;
  margin-top: 3.5rem;
  width: 100%;
}

.suggested-heading {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--dust);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}

.suggested-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0;
}

.suggested-post-link {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--black);
  transition: opacity 0.3s;
  display: inline-block;
}

.suggested-post-link:hover {
  opacity: 0.6;
}

/* ─── Apple-Like Loader ────────────────────────────────────────── */
#loader {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--white);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s var(--ease-out), visibility 0.8s;
}
#loader.loaded {
  opacity: 0;
  visibility: hidden;
}
.apple-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border-c);
  border-top-color: var(--black);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── Lightbox ─────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255, 255, 255, 0.98);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s;
}
.lightbox.active {
  opacity: 1;
  visibility: visible;
}
.lightbox-close {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 40px;
  color: var(--black);
  cursor: pointer;
  z-index: 100001;
  font-weight: 200;
  line-height: 1;
  user-select: none;
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 32px;
  color: var(--black);
  opacity: 0.35;
  cursor: pointer;
  z-index: 100001;
  padding: 20px;
  user-select: none;
  transition: opacity 0.25s, transform 0.25s;
}
.lightbox-nav:hover {
  opacity: 1;
}
.lightbox-prev {
  left: 20px;
}
.lightbox-prev:hover {
  transform: translateY(-50%) translateX(-4px);
}
.lightbox-next {
  right: 20px;
}
.lightbox-next:hover {
  transform: translateY(-50%) translateX(4px);
}
.lightbox-content {
  max-width: 80vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-content img, .lightbox-content video {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

@media (max-width: 768px) {
  .lightbox-nav {
    font-size: 24px;
    padding: 10px;
  }
  .lightbox-prev { left: 5px; }
  .lightbox-next { right: 5px; }
  .lightbox-content { max-width: 90vw; }
}

/* ─── Admin Drag & Drop Panel Styling ──────────────────────────────── */
.admin-trigger-btn {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--black);
  color: var(--white);
  border: none;
  padding: 10px 16px;
  border-radius: 20px;
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: transform 0.3s var(--ease), opacity 0.3s;
}
.admin-trigger-btn:hover {
  transform: scale(1.05);
}
.admin-panel-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 100000;
  display: flex;
  flex-direction: column;
  padding: 40px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s;
}
.admin-panel-overlay.active {
  opacity: 1;
  visibility: visible;
}
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  padding-bottom: 15px;
}
.admin-title {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--black);
}
.admin-close-btn {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--black);
}
.admin-actions {
  display: flex;
  gap: 12px;
}
.admin-btn {
  background: var(--black);
  color: var(--white);
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 0.8rem;
  cursor: pointer;
}
.admin-btn.secondary {
  background: none;
  border: 1px solid var(--black);
  color: var(--black);
}
.admin-drag-container {
  flex: 1;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  padding: 10px 0;
}

/* ── Media Error Fallback ── */
.media-fallback-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: auto;
  aspect-ratio: 4 / 5;
  min-height: 250px; /* Fallback for contexts without fixed height */
  background: rgba(0,0,0,0.02);
  border: 1px solid rgba(0,0,0,0.04);
  color: var(--dust);
  text-align: center;
  padding: 2rem;
  border-radius: 2px;
  animation: fadeIn 0.5s ease-out;
}
.media-fallback-box .fallback-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  opacity: 0.5;
}
.media-fallback-box .fallback-text {
  font-family: var(--sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.7;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.admin-drag-item {
  background: #f7f6f4;
  border: 1px solid rgba(0,0,0,0.06);
  padding: 15px;
  border-radius: 8px;
  cursor: grab;
  user-select: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.admin-drag-item:active {
  cursor: grabbing;
}
.admin-drag-item.dragging {
  opacity: 0.5;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  transform: scale(0.98);
}
.admin-drag-thumb {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 4px;
  background: #ddd;
}
.admin-drag-title {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--black);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-drag-meta {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--dust);
}
.admin-output-modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: var(--white);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
  z-index: 100001;
  max-width: 600px;
  width: 90%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
}
.admin-output-modal.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  visibility: visible;
}
.admin-output-textarea {
  width: 100%;
  height: 200px;
  font-family: monospace;
  font-size: 0.8rem;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin: 15px 0;
}

