/* Bidnam Lee - Strategic Terrain Website */

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

:root {
  --bg-primary: #F8F6F1;
  --accent: #4A5D4A;
  --accent-warm: #B8956B;
  --text-primary: #1A1A1A;
  --text-secondary: #4A4A4A;
  --text-muted: #7A7A7A;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

body {
  font-family: 'SF Pro Text', system-ui, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow: hidden;
  cursor: grab;
  opacity: 0;
  animation: fadeIn 0.3s ease-in forwards;
  animation-delay: 0.1s;
}

body.dragging {
  cursor: grabbing;
}

.container {
  position: relative;
  width: 100%;
  height: 100vh;
}

/* Paper texture overlay */
.container::before {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.035;
  pointer-events: none;
  z-index: 100;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Word reveal animation */
@keyframes wordReveal {
  from {
    opacity: 0;
    transform: translateY(100%) rotate(4deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }
}

/* Left-aligned header */
.header {
  position: absolute;
  top: 10%;
  left: 5%;
  z-index: 10;
  pointer-events: none;
  max-width: 320px;
}

.name {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.headline {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.35;
  color: var(--text-primary);
  overflow: hidden;
}

/* Splitting.js word animation */
.name .word,
.headline .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(100%) rotate(4deg);
  transform-origin: left bottom;
  animation: wordReveal 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.name .word {
  animation-delay: calc(0.3s + (var(--word-index) * 0.06s));
}

.headline .word {
  animation-delay: calc(0.45s + (var(--word-index) * 0.015s));
}

.headline em {
  font-style: italic;
  color: var(--accent);
}

#canvas-container {
  position: absolute;
  inset: 0;
  z-index: 1;
}

canvas {
  display: block;
}

#lines-overlay {
  position: absolute;
  inset: 0;
  z-index: 15;
  pointer-events: none;
}

.peak-line {
  stroke: var(--text-muted);
  stroke-width: 1;
  stroke-dasharray: 2, 3;
  fill: none;
  opacity: 0;
  transition: opacity 0.5s ease, stroke 0.3s ease;
}

.peak-line.visible {
  opacity: 0.5;
}

.peak-line.active {
  stroke: var(--accent-warm);
  opacity: 1;
  stroke-width: 1.5;
}

.nav-labels {
  position: absolute;
  bottom: 4%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2rem;
  z-index: 10;
}

.nav-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.4rem 0.75rem;
  border-radius: 3px;
  transition: all 0.3s ease;
  background: transparent;
  border: none;
  font-family: inherit;
}

.nav-label:hover,
.nav-label.active {
  color: var(--accent);
  background: rgba(44, 62, 80, 0.06);
}

.peak-label {
  position: absolute;
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text-primary);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.5s ease;
  z-index: 20;
  white-space: nowrap;
  transform: translateX(-50%);
  text-shadow:
    0 1px 3px rgba(248, 246, 241, 0.9),
    0 0 8px rgba(248, 246, 241, 0.8),
    0 0 16px rgba(248, 246, 241, 0.6);
  opacity: 0;
}

.peak-label.visible {
  opacity: 1;
}

.peak-label.active {
  color: var(--bg-primary);
  font-size: 1.3rem;
  background: rgba(184, 149, 107, 0.85);
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
  text-shadow: none;
  margin: 0;
}

.hint {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  z-index: 10;
  opacity: 0.6;
}

/* Show appropriate hint based on device */
.hint-mobile { display: none; }

@media (hover: none) {
  .hint-desktop { display: none; }
  .hint-mobile {
    display: block;
    white-space: nowrap;
  }
}

/* Hints on mobile */
@media (max-width: 480px) {
  .hint-desktop {
    display: none;
  }

  .hint-mobile {
    display: block;
    position: fixed;
    bottom: 3.5rem;
    z-index: 40;
  }
}

/* Mobile peak navigation arrows */
.peak-nav-container {
  display: none;
}

@media (hover: none) and (max-width: 768px) {
  .peak-nav-container {
    display: flex;
    position: fixed;
    bottom: 5rem;
    left: 50%;
    transform: translateX(-50%);
    gap: 0.5rem;
    z-index: 25;
  }

  .peak-nav {
    display: flex;
    width: 48px;
    height: 48px;
    background: rgba(248, 246, 241, 0.85);
    border: 1px solid rgba(122, 122, 122, 0.2);
    border-radius: 50%;
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--text-muted);
    align-items: center;
    touch-action: manipulation;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  }

  .peak-nav:active {
    background: rgba(248, 246, 241, 1);
    color: var(--accent);
    transform: scale(0.95);
  }
}

/* Make labels tappable on touch devices */
@media (hover: none) {
  .peak-label {
    pointer-events: auto;
    cursor: pointer;
  }

  /* Use pseudo-element for larger tap target without affecting centering */
  .peak-label::before {
    content: '';
    position: absolute;
    top: -0.75rem;
    left: -1rem;
    right: -1rem;
    bottom: -0.75rem;
  }
}

/* Responsive: Tablet */
@media (max-width: 768px) {
  .header {
    top: 5%;
    left: 4%;
    max-width: 280px;
  }

  .name {
    font-size: 0.8rem;
  }

  .headline {
    font-size: 1.25rem;
  }

  .nav-labels {
    gap: 1rem;
  }

  .nav-label {
    font-size: 0.7rem;
    padding: 0.35rem 0.6rem;
  }

  .peak-label {
    font-size: 0.95rem;
  }

  .peak-label.active {
    font-size: 1.1rem;
  }

  .hint {
    font-size: 0.6rem;
  }
}

/* Responsive: Mobile */
@media (max-width: 480px) {
  .header {
    top: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 2rem);
    text-align: center;
  }

  .name {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
  }

  .headline {
    font-size: 1.2rem;
    line-height: 1.4;
  }

  /* Hide footer on homepage mobile */
  body.home .site-footer {
    display: none;
  }

  .nav-labels {
    gap: 0.75rem;
  }

  .nav-label {
    font-size: 0.65rem;
    padding: 0.3rem 0.5rem;
  }

  .peak-label {
    font-size: 0.95rem;
  }

  .peak-label.active {
    font-size: 1.1rem;
  }
}

/* Info Panel - "Why a terrain?" slide-out */
.info-panel {
  position: fixed;
  top: 50%;
  right: 0;
  right: env(safe-area-inset-right, 0);
  transform: translateY(-50%);
  z-index: 50;
  transition: right 0.3s ease;
}

.info-panel.open {
  right: 320px;  /* Slide left by content width so tab pulls out */
}

.info-panel-tab {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  padding: 1.25rem 0.4rem;
  background: var(--bg-primary);
  border: 1px solid var(--text-muted);
  border-radius: 4px 0 0 4px;
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 0.95rem;
  font-style: italic;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.info-panel.open .info-panel-tab {
  border-right: none;  /* Remove border when connected to panel */
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg-primary);
}

.info-panel-tab:hover {
  color: var(--accent);
  background: rgba(74, 93, 74, 0.05);
}

.info-panel-content {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 100%;              /* Position to right of tab (off-screen) */
  width: 320px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 2rem;
  background: var(--bg-primary);
  border: 1px solid var(--text-muted);
  border-right: none;
  border-radius: 4px 0 0 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.info-panel.open .info-panel-content {
  opacity: 1;
  pointer-events: auto;
}

.info-panel-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  transition: color 0.2s ease;
}

.info-panel-close:hover {
  color: var(--text-primary);
}

.info-panel-content p {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  margin: 0 0 1rem;
}

.info-panel-content p:last-child {
  margin-bottom: 0;
}

.info-panel-content a {
  color: var(--accent);
}

/* Info panel as bottom sheet on mobile */
@media (max-width: 480px) {
  .info-panel {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 50;
  }

  .info-panel.open {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }

  .info-panel-tab {
    order: 1;
    writing-mode: horizontal-tb;
    text-orientation: initial;
    padding: 0.4rem 0.75rem;
    border-radius: 4px 4px 0 0;
    border: 1px solid var(--text-muted);
    border-bottom: none;
    font-size: 0.85rem;
    background: var(--bg-primary);
    width: auto;
    transition: background 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .info-panel.open .info-panel-tab {
    border: 1px solid var(--accent);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    background: var(--accent);
    color: var(--bg-primary);
  }

  .info-panel-content {
    order: 2;
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    opacity: 1;
    width: 90vw;
    max-width: 320px;
    max-height: 0;
    overflow: hidden;
    padding: 0 1.5rem;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0);
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .info-panel.open .info-panel-content {
    max-height: 50vh;
    overflow-y: auto;
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    border-color: var(--text-muted);
    border-bottom: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  }

  .info-panel-content p {
    font-size: 1rem;
  }
}

/* Page Transition - Simple Fade */
.page-transition-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  opacity: 0;
  pointer-events: none;
  z-index: 1000;
  transition: opacity 0.4s ease;
}

.page-transition-overlay.active {
  opacity: 1;
}

/* Inner Page Styles */
body.page {
  background: var(--bg-primary);
  min-height: 100vh;
  padding: 105px 4rem 4rem;  /* Top padding for fixed header */
  cursor: default;
  overflow: auto;
}

.page-nav {
  max-width: 640px;
  margin: 0 auto 4rem;
}

.back-link {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.page-content {
  max-width: 640px;
  margin: 0 auto;
}

.page-header {
  margin-bottom: 2rem;
}

.contour-mark {
  width: 32px;
  height: 20px;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.contour-mark svg {
  width: 100%;
  height: 100%;
}

.page-content h1 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 2rem;
  font-weight: 400;
  color: var(--text-primary);
  margin: 0;
}

.lede {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.2rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--accent);
  margin: 0 0 2.5rem;
}

.about-text p {
  font-family: 'SF Pro Text', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0 0 1.25rem;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-text a {
  color: var(--text-secondary);
  text-decoration: underline dotted;
  text-decoration-color: var(--accent);
  text-underline-offset: 2px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.about-text a:hover {
  color: var(--accent-warm);
  text-decoration-color: var(--accent-warm);
}

/* Text hover trigger */
.hover-trigger {
  cursor: pointer;
  border-bottom: 1px dotted var(--text-muted);
  transition: border-color 0.2s ease;
}

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

/* Text hover preview */
.text-hover-preview {
  position: fixed;
  pointer-events: none;
  z-index: 101;
  opacity: 0;
  transform: scale(0.85);
  transform-origin: bottom left;
  transition: opacity 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.text-hover-preview.visible {
  opacity: 1;
  transform: scale(1);
}

.text-hover-preview img {
  width: 360px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  display: block;
}

/* Editorial Layout */
.page-content.editorial {
  max-width: 900px;
}

.editorial-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  align-items: start;
}

.editorial-photo {
  position: sticky;
  top: 105px;
  margin: 0;
}

.editorial-photo img {
  width: 100%;
  max-width: 280px;
  border-radius: 4px;
  filter: grayscale(15%);
}

.editorial-text {
  max-width: 480px;
}

@media (max-width: 768px) {
  .editorial-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .editorial-photo {
    position: static;
    text-align: center;
  }

  .editorial-photo img {
    max-width: 200px;
  }
}

@media (max-width: 480px) {
  body.page {
    padding: 95px 1.5rem 4rem;
  }

  .page-nav {
    margin-bottom: 3rem;
  }

  .page-content h1 {
    font-size: 1.75rem;
  }

  .lede {
    font-size: 1.1rem;
  }
}

/* Inner Page Header */
.inner-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 85px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  background: var(--bg-primary);
  z-index: 100;
  transition: height 0.4s cubic-bezier(0.19, 1, 0.22, 1),
              padding 0.4s ease,
              align-items 0.4s ease,
              background 0.4s ease 0.15s;  /* Delay background on close */
}

.inner-name {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.4s ease 0.15s, font-size 0.4s ease;  /* Delay color on close */
}

.inner-name:hover {
  color: var(--accent);
}

/* Mini terrain canvas */
.mini-terrain-link {
  width: 100px;
  height: 65px;
  display: block;
  transition: opacity 0.4s ease 0.13s;  /* Delay on close */
}

#mini-terrain {
  width: 100%;
  height: 100%;
  cursor: pointer;
}

/* Hamburger button */
.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s ease;
}

.menu-toggle:hover span {
  background: var(--accent);
}

/* Menu Wrapper for positioning */
.menu-wrapper {
  position: relative;
}

/* Navigation Panel - Hidden by default, shown via menu-open */
.nav-panel {
  display: none;
}

.nav-panel-link {
  display: block;
  position: relative;
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.1rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.6rem 0 0.6rem 0.75rem;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nav-panel-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 2px;
  height: 60%;
  background: var(--accent-warm);
  transition: transform 0.2s ease;
}

.nav-panel-link:hover {
  color: var(--accent-warm);
}

.nav-panel-link:hover::before {
  transform: translateY(-50%) scaleY(1);
}

.nav-panel-link.active {
  color: var(--accent);
}

.nav-panel-link.active::before {
  transform: translateY(-50%) scaleY(1);
  background: var(--accent);
}

/* Menu Overlay Panel - fullscreen */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #1A4D2E;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  z-index: 99;
  display: flex;
  justify-content: center;
  align-items: center;
}

.menu-ready .menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Nav links in overlay */
.menu-overlay .overlay-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
}

.menu-overlay .overlay-link {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(2.5rem, 8vw, 5rem);
  color: var(--bg-primary);
  text-decoration: none;
  padding: 0.2rem 0;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.3s ease-in-out, transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

/* Staggered entrance */
.menu-overlay.active .overlay-link {
  opacity: 1;
  transform: translateY(0);
}
.menu-overlay.active .overlay-link:nth-child(1) { transition-delay: 0.1s; }
.menu-overlay.active .overlay-link:nth-child(2) { transition-delay: 0.16s; }
.menu-overlay.active .overlay-link:nth-child(3) { transition-delay: 0.22s; }
.menu-overlay.active .overlay-link:nth-child(4) { transition-delay: 0.28s; }
.menu-overlay.active .overlay-link:nth-child(5) { transition-delay: 0.34s; }

/* Reset transition-delay when interacting */
.menu-overlay .overlay-nav:hover .overlay-link {
  transition-delay: 0s;
}

/* Dim all links when hovering nav */
.menu-overlay .overlay-nav:hover .overlay-link {
  opacity: 0.5;
}

/* Highlight the specific hovered link */
.menu-overlay .overlay-nav .overlay-link:hover {
  opacity: 1;
}

/* Overlay footer */
.menu-overlay .overlay-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease 0.3s, transform 0.4s ease 0.3s;
}

.menu-overlay.active .overlay-footer {
  opacity: 1;
  transform: translateY(0);
}

.menu-overlay .overlay-footer-copyright {
  font-size: 0.85rem;
  color: rgba(248, 246, 241, 0.6);
}

.menu-overlay .overlay-footer-links {
  display: flex;
  gap: 1rem;
}

.menu-overlay .overlay-footer-links a {
  color: rgba(248, 246, 241, 0.6);
  transition: color 0.2s ease;
}

.menu-overlay .overlay-footer-links a:hover {
  color: var(--bg-primary);
}

.menu-overlay .overlay-footer-links svg {
  width: 20px;
  height: 20px;
}

/* Header state when menu is open */
.inner-header.menu-open {
  background: transparent;
  transition: background 0s;  /* Instant when opening */
}

.inner-header.menu-open .inner-name {
  color: var(--bg-primary);
  transition: color 0s;  /* Instant when opening */
}

.inner-header.menu-open .mini-terrain-link {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0s;  /* Hide instantly when menu opens */
}

/* Hamburger to X transformation */
.menu-toggle.open span {
  background: var(--bg-primary);
}

.menu-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}


/* Site Footer */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem 1.5rem;
  background: var(--bg-primary);
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copyright {
  font-size: 0.7rem;
  color: var(--text-muted);
  opacity: 0.6;
}

.footer-links {
  display: flex;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.footer-links a:hover {
  opacity: 1;
}

.footer-links svg {
  width: 16px;
  height: 16px;
}

/* Work Page - Editorial Accordion */
.work-page {
  padding: 105px 0 4rem;
}

.work-content {
  min-height: calc(100vh - 105px - 4rem);
}

.work-header {
  max-width: 700px;
  margin: 0 auto 3rem;
  padding: 0 2rem;
}

.work-header h1 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 2rem;
  font-weight: 400;
  color: var(--text-primary);
  margin: 0;
}

.work-header .lede {
  margin-top: 0.75rem;
}

/* Work List */
.work-list {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 2rem;
}

.work-row {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.work-row:first-child {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 0;
  padding-left: 1rem;
  position: relative;
  transition: background 0.2s ease;
}

.row-client-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.row-logo {
  height: 20px;
  width: auto;
  max-width: 60px;
  filter: grayscale(100%);
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.work-row:hover .row-logo {
  opacity: 0.8;
}

.row-categories {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.category-pill {
  font-size: 0.65rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.04);
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.work-row:hover .row-header {
  background: rgba(74, 93, 74, 0.06);
}

.work-row.open .row-header {
  background: rgba(184, 149, 107, 0.08);
}

.row-header::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--accent);
  transition: height 0.2s ease;
}

.work-row:hover .row-header::before {
  height: 40%;
}

.work-row.open .row-header::before {
  height: 60%;
  background: var(--accent-warm);
}

.row-client {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--text-primary);
  margin: 0;
}


/* Row Details (expanded) */
.row-details {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding-left: 1rem;
  transition: all 0.4s ease;
}

.work-row.open .row-details {
  max-height: 400px;
  opacity: 1;
  padding-top: 0.75rem;
  padding-bottom: 1.5rem;
}

.row-description {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 1.25rem;
  max-width: 520px;
}

.row-skills {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.row-skills li {
  font-size: 0.7rem;
  color: var(--text-secondary);
  background: rgba(74, 93, 74, 0.06);
  padding: 0.3rem 0.65rem;
  border-radius: 20px;
}

/* Work page responsive */
@media (max-width: 768px) {
  .work-header {
    padding: 0 1.5rem;
  }

  .work-list {
    padding: 0 1.5rem;
  }

  .work-header h1 {
    font-size: 1.75rem;
  }

  .row-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding-left: 0.75rem;
  }

  .row-client {
    font-size: 1.2rem;
  }

  .row-categories {
    flex-wrap: wrap;
  }

  .category-pill {
    font-size: 0.6rem;
    padding: 0.15rem 0.4rem;
  }

  .row-logo {
    height: 16px;
  }
}

@media (max-width: 480px) {
  .row-header {
    padding: 1rem 0 1rem 0.5rem;
    gap: 0.4rem;
  }

  .row-client-group {
    gap: 0.5rem;
  }

  .row-client {
    font-size: 1.1rem;
  }

  .row-logo {
    height: 14px;
  }

  .row-categories {
    gap: 0.3rem;
  }

  .category-pill {
    font-size: 0.55rem;
  }

  .row-description {
    font-size: 0.95rem;
  }
}

/* Writing Page */
.writing-list {
  margin-top: 2.5rem;
}

.writing-item {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.writing-item:first-child {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.writing-link {
  display: block;
  padding: 1.25rem 0 1.25rem 1rem;
  text-decoration: none;
  position: relative;
  transition: background 0.2s ease;
}

.writing-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--accent);
  transition: height 0.2s ease;
}

.writing-link:hover {
  background: rgba(74, 93, 74, 0.06);
}

.writing-link:hover::before {
  height: 40%;
}

.writing-date {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.writing-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--text-primary);
  margin: 0.3rem 0 0.5rem;
}

.writing-excerpt {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1rem;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
  max-width: 520px;
}

/* Contact Page */
.contact-intro {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0 0 2rem;
}

.contact-links {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0 0 2rem;
}

.contact-links a {
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

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

.contact-content {
  margin-top: 2.5rem;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.contact-method {
  display: flex;
  flex-direction: column;
  padding: 1rem 1rem 1rem 1.25rem;
  text-decoration: none;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  position: relative;
  transition: all 0.2s ease;
}

.contact-method::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
  transition: height 0.2s ease;
}

.contact-method:hover {
  background: rgba(74, 93, 74, 0.06);
  border-color: rgba(74, 93, 74, 0.2);
}

.contact-method:hover::before {
  height: 50%;
}

.contact-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.contact-value {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.15rem;
  color: var(--text-primary);
}

.contact-note {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1rem;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.6;
}

@media (max-width: 480px) {
  .writing-title {
    font-size: 1.15rem;
  }

  .writing-excerpt {
    font-size: 0.95rem;
  }

  .contact-value {
    font-size: 1rem;
  }
}

/* Explorations Page - Carousel + Log Table Layout */
.explorations-page {
  padding: 105px 0 4rem;
}

.explorations-content {
  min-height: calc(100vh - 105px - 4rem);
}

.explorations-header {
  max-width: 960px;
  margin: 0 auto 2.5rem;
  padding: 0 2rem;
}

.explorations-header h1 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 2rem;
  font-weight: 400;
  color: var(--text-primary);
  margin: 0;
}

.explorations-header .lede {
  margin-top: 0.75rem;
  margin-bottom: 0;
}

/* Lab Log */
.lab-log {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

.log-entries {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.log-entry {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding: 1.25rem 0.75rem;
  margin: 0 -0.75rem;
  border-radius: 6px;
  transition: background-color 0.3s ease, opacity 0.3s ease;
}

.log-entry:hover .log-index {
  color: var(--accent-warm);
}

.log-entry-row {
  display: grid;
  grid-template-columns: 3rem 1fr 90px;
  gap: 1.5rem;
  align-items: start;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.log-entry:hover .log-entry-row {
  transform: translateY(-3px);
}

.log-index {
  font-family: 'SF Mono', 'Consolas', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  padding-top: 0.15rem;
}

.log-main {
  min-width: 0;
  max-width: 620px;
}

.log-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.15rem;
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.35rem;
}

.log-description {
  font-family: 'SF Pro Text', system-ui, sans-serif;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.log-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.tool-pill {
  font-family: 'SF Pro Text', system-ui, sans-serif;
  font-size: 0.65rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.04);
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  white-space: nowrap;
}

.log-status {
  font-family: 'SF Pro Text', system-ui, sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  min-width: 5rem;
  text-align: center;
  white-space: nowrap;
}

.log-status.status-shipped {
  background: rgba(74, 93, 74, 0.12);
  color: var(--accent);
}

.log-status.status-prototype {
  background: rgba(90, 130, 180, 0.12);
  color: #4a7099;
}

.log-status.status-in-progress {
  background: rgba(184, 149, 107, 0.15);
  color: #9a7b4f;
}

.log-status.status-exploring {
  background: rgba(122, 122, 122, 0.1);
  color: var(--text-muted);
}

/* Hover Preview */
.hover-preview {
  position: fixed;
  pointer-events: none;
  z-index: 101;
  opacity: 0;
  transform: scale(0.85);
  transform-origin: bottom left;
  transition: opacity 0.4s cubic-bezier(0.76, 0, 0.24, 1),
              transform 0.45s cubic-bezier(0.76, 0, 0.24, 1);
}

.hover-preview.visible {
  opacity: 1;
  transform: scale(1);
}

.hover-preview-media {
  width: 460px;
  height: auto;
  border-radius: 8px;
  border: 1px solid rgba(26, 26, 26, 0.1);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  display: block;
  transform-origin: bottom left;
  transition: transform 0.4s cubic-bezier(0.76, 0, 0.24, 1),
              opacity 0.35s cubic-bezier(0.76, 0, 0.24, 1),
              width 0.3s ease;
}

/* Smaller preview for tall aspect ratio entries */
.hover-preview.small .hover-preview-media {
  width: 400px;
}

/* Shrink down toward origin */
.hover-preview-media.scale-out {
  transform: scale(0.9);
  opacity: 0;
}

/* Ready to expand (no transition for instant position) */
.hover-preview-media.scale-in-ready {
  transform: scale(0.9);
  opacity: 0;
  transition: none;
}

/* Hide video by default */
.hover-preview-video {
  display: none;
}

/* Mobile Modal */
.exploration-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.exploration-modal.visible {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
}

.modal-content {
  position: relative;
  max-width: calc(100vw - 2rem);
  max-height: calc(100vh - 4rem);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem;
}

.modal-media {
  max-width: 100%;
  max-height: calc(100vh - 6rem);
  width: auto;
  height: auto;
  border-radius: 8px;
  display: block;
}

.modal-content.small .modal-media {
  max-width: 70vw;
}

/* Log Table */
.log-table-wrapper {
  padding-bottom: 4rem;
}

.log-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.log-table thead th {
  font-family: 'SF Pro Text', system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-align: left;
  padding: 0 0 0.75rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.log-table tbody tr {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: background-color 0.2s ease;
}

.log-table tbody tr:hover {
  background-color: rgba(74, 93, 74, 0.04);
}

.log-table td {
  padding: 1rem 0;
  vertical-align: top;
}

.log-table .col-project {
  width: 22%;
  font-family: 'SF Pro Text', system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  padding-right: 1rem;
}

.log-table .col-question {
  width: 50%;
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1rem;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.45;
  padding-right: 1rem;
}

.log-table .col-tools {
  width: 18%;
  font-family: 'SF Pro Text', system-ui, sans-serif;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-right: 1rem;
}

.log-table .col-status {
  width: 10%;
  text-align: right;
  padding-right: 0.5rem;
}

/* Category rows */
.log-table .category-row {
  border-bottom: none;
}

.log-table .category-row:hover {
  background-color: transparent;
}

.log-table .category-label {
  font-family: 'SF Pro Text', system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding-top: 2rem;
  padding-bottom: 0.75rem;
}

.log-table .category-row:first-child .category-label {
  padding-top: 0;
}

/* Status Dots */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-dot.status-live,
.status-dot.status-shipped {
  background: #3D6B3D;
}

.status-dot.status-complete,
.status-dot.status-inuse {
  background: #5A8A5A;
}

.status-dot.status-prototyping,
.status-dot.status-exploring {
  background: #B8956B;
}

.status-dot.status-concept,
.status-dot.status-developing,
.status-dot.status-evolving {
  background: var(--text-muted);
}

/* Explorations page responsive */
@media (max-width: 768px) {
  .explorations-header {
    padding: 0 1.5rem;
    margin-bottom: 2rem;
  }

  .explorations-header h1 {
    font-size: 1.75rem;
  }

  .lab-log {
    padding: 0 1.5rem 3rem;
  }

  .log-entry-row {
    grid-template-columns: 2.5rem 1fr auto;
    gap: 1rem;
  }

  .log-title {
    font-size: 1.05rem;
  }

  .log-description {
    font-size: 0.8rem;
  }
}

@media (max-width: 600px) {
  .lab-log {
    padding: 0 1.25rem 2rem;
  }

  .log-entry {
    padding: 1rem 0;
  }

  .log-entry-row {
    grid-template-columns: 2rem 1fr auto;
    gap: 0.75rem;
  }

  .log-index {
    font-size: 0.7rem;
  }

  .log-title {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
  }

  .log-description {
    font-size: 0.75rem;
    line-height: 1.4;
  }

  .log-status {
    font-size: 0.55rem;
    min-width: 4rem;
    padding: 0.2rem 0.35rem;
  }
}


/* =========================================
   WORK PAGE LAYOUT MOCKUPS
   Toggle by adding class to .work-list:
   - .layout-oversized (Option 1)
   - .layout-grid (Option 2)
   ========================================= */

/* OPTION 1: Oversized Client Names */
.work-list.layout-oversized {
  max-width: 900px;
}

.layout-oversized .work-row {
  border: none;
  padding: 2rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.layout-oversized .work-row:first-child {
  border-top: none;
}

.layout-oversized .row-header {
  flex-direction: column;
  align-items: flex-start;
  padding: 0;
  gap: 0.75rem;
}

.layout-oversized .row-header::before {
  display: none;
}

.layout-oversized .row-client {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.layout-oversized .work-row:hover .row-client {
  color: var(--accent);
}

.layout-oversized .row-categories {
  order: -1;
  gap: 0.5rem;
}

.layout-oversized .category-pill {
  font-size: 0.7rem;
  padding: 0.3rem 0.75rem;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.layout-oversized .row-details {
  padding-left: 0;
  max-height: none;
  opacity: 1;
  padding-top: 1rem;
}

.layout-oversized .row-description {
  font-size: 1.1rem;
  max-width: 600px;
}

.layout-oversized .row-skills {
  display: none;
}


/* OPTION 2: Grid/Tiles Layout */
.work-list.layout-grid {
  max-width: 1100px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  padding: 0 2rem;
}

.layout-grid .work-row {
  border: none;
  background: linear-gradient(135deg, rgba(143, 188, 143, 0.08) 0%, rgba(90, 158, 90, 0.12) 100%);
  border-radius: 8px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.layout-grid .work-row:first-child {
  border-top: none;
}

.layout-grid .work-row:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(26, 77, 46, 0.1);
}

.layout-grid .row-header {
  flex-direction: column;
  align-items: flex-start;
  padding: 0;
  gap: 0.75rem;
  flex: 1;
}

.layout-grid .row-header::before {
  display: none;
}

.layout-grid .work-row:hover .row-header {
  background: transparent;
}

.layout-grid .row-categories {
  order: -1;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.layout-grid .category-pill {
  font-size: 0.6rem;
  padding: 0.25rem 0.6rem;
  background: rgba(26, 77, 46, 0.15);
  color: #1A4D2E;
  border-radius: 3px;
}

.layout-grid .row-client {
  font-size: 1.5rem;
  line-height: 1.2;
  margin-top: auto;
}

.layout-grid .row-details {
  max-height: none;
  opacity: 1;
  padding: 0;
  margin-top: 1rem;
}

.layout-grid .row-description {
  font-size: 0.9rem;
  margin: 0;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.layout-grid .row-skills {
  display: none;
}

/* Grid responsive */
@media (max-width: 768px) {
  .work-list.layout-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0 1.5rem;
  }
  
  .layout-grid .work-row {
    min-height: 180px;
    padding: 1.5rem;
  }
}


/* Work Page Accordion Layout */
.work-page {
  padding: 105px 0 4rem;
}

.work-page .work-header {
  display: block;
  max-width: 800px;
  margin: 0 auto 3rem;
  padding: 0 2rem;
}

.work-page .work-header h1,
.work-page .work-header .lede {
  opacity: 0;
  transform: translateY(8px);
  animation: fadeSlideUpSubtle 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.work-page .work-header .lede {
  animation-delay: 0.06s;
}

@keyframes fadeSlideUpSubtle {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.work-page .work-content {
  min-height: auto;
}

.work-accordion {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem 6rem;
}

.accordion-item {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  border-left: 3px solid transparent;
  transition: background-color 0.3s ease, border-left-color 0.3s ease;
  margin: 0 -1.5rem;
  padding: 0 1.5rem;
  border-radius: 6px;
  scroll-margin-top: 200px;
  opacity: 0;
  transform: translateY(15px);
  animation: fadeSlideUp 0.5s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

/* Staggered entrance for accordion items */
.accordion-item:nth-child(1) { animation-delay: 0.25s; }
.accordion-item:nth-child(2) { animation-delay: 0.3s; }
.accordion-item:nth-child(3) { animation-delay: 0.35s; }
.accordion-item:nth-child(4) { animation-delay: 0.4s; }
.accordion-item:nth-child(5) { animation-delay: 0.45s; }
.accordion-item:nth-child(6) { animation-delay: 0.5s; }
.accordion-item:nth-child(7) { animation-delay: 0.55s; }
.accordion-item:nth-child(8) { animation-delay: 0.6s; }
.accordion-item:nth-child(9) { animation-delay: 0.65s; }
.accordion-item:nth-child(10) { animation-delay: 0.7s; }
.accordion-item:nth-child(11) { animation-delay: 0.75s; }

@keyframes fadeSlideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.accordion-item:first-child {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.accordion-header {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 400;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.75rem 0;
  margin: 0;
  line-height: 1.1;
  transition: opacity 0.3s ease, padding-left 0.3s ease;
}

/* Dim all items on hover, highlight the one being hovered (desktop only) */
@media (hover: hover) {
  .work-accordion:hover .accordion-header {
    opacity: 0.35;
  }

  .accordion-item:hover .accordion-header {
    opacity: 1;
  }
}

.accordion-item.open .accordion-header {
  opacity: 1;
}

.accordion-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.55s cubic-bezier(0.76, 0, 0.24, 1);
  padding-bottom: 0;
}

.accordion-inner {
  overflow: hidden;
}

.accordion-item.open .accordion-content {
  grid-template-rows: 1fr;
  padding-bottom: 1.5rem;
}

/* Staggered entrance for content elements */
.accordion-categories,
.accordion-description {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s cubic-bezier(0.76, 0, 0.24, 1), transform 0.4s cubic-bezier(0.76, 0, 0.24, 1);
}

.accordion-item.open .accordion-categories {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.1s;
}

.accordion-item.open .accordion-description {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.15s;
}

/* Skills animated individually via nth-child below */

/* Muted brand colors + left accent border for expanded state */
.accordion-item.open[data-brand="ibm"] { background: rgba(31, 112, 193, 0.12); border-left: 3px solid #1F70C1; }
.accordion-item.open[data-brand="uipath"] { background: rgba(250, 70, 22, 0.12); border-left: 3px solid #FA4616; }
.accordion-item.open[data-brand="verizon"] { background: rgba(205, 4, 11, 0.12); border-left: 3px solid #CD040B; }
.accordion-item.open[data-brand="andmore"] { background: rgba(180, 199, 231, 0.2); border-left: 3px solid #B4C7E7; }
.accordion-item.open[data-brand="sustana"] { background: rgba(92, 217, 176, 0.15); border-left: 3px solid #5CD9B0; }
.accordion-item.open[data-brand="7eleven"] { background: rgba(0, 128, 98, 0.12); border-left: 3px solid #008062; }
.accordion-item.open[data-brand="bartesian"] { background: rgba(26, 26, 26, 0.08); border-left: 3px solid #1A1A1A; }
.accordion-item.open[data-brand="zoa"] { background: rgba(125, 211, 232, 0.2); border-left: 3px solid #7DD3E8; }
.accordion-item.open[data-brand="xfl"] { background: rgba(200, 16, 46, 0.12); border-left: 3px solid #C8102E; }
.accordion-item.open[data-brand="alcon"] { background: rgba(0, 114, 206, 0.12); border-left: 3px solid #0072CE; }
.accordion-item.open[data-brand="fierce"] { background: rgba(139, 43, 226, 0.12); border-left: 3px solid #8B2BE2; }

/* Header indent when open */
.accordion-item.open .accordion-header {
  padding-left: 0.5rem;
}

.accordion-categories {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.accordion-categories .category-pill {
  font-size: 0.7rem;
  padding: 0.3rem 0.75rem;
  background: rgba(26, 26, 26, 0.08);
  color: var(--text-primary);
}

.accordion-description {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.accordion-skills {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.accordion-skills li {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: rgba(26, 26, 26, 0.06);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s cubic-bezier(0.76, 0, 0.24, 1), transform 0.35s cubic-bezier(0.76, 0, 0.24, 1);
}

/* Staggered skill pill animations */
.accordion-item.open .accordion-skills li:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0.2s; }
.accordion-item.open .accordion-skills li:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.25s; }
.accordion-item.open .accordion-skills li:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.3s; }
.accordion-item.open .accordion-skills li:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 0.35s; }
.accordion-item.open .accordion-skills li:nth-child(5) { opacity: 1; transform: translateY(0); transition-delay: 0.4s; }
.accordion-item.open .accordion-skills li:nth-child(6) { opacity: 1; transform: translateY(0); transition-delay: 0.45s; }

/* Accordion responsive */
@media (max-width: 768px) {
  .work-accordion {
    padding: 0 1.5rem;
  }

  .accordion-item {
    margin: 0 -1rem;
    padding: 0 1rem;
  }

  .accordion-header {
    font-size: 1.15rem;
  }

  .accordion-description {
    font-size: 0.95rem;
  }

  .accordion-categories .category-pill {
    font-size: 0.65rem;
  }

  .accordion-skills li {
    font-size: 0.7rem;
  }
}


/* =========================================
   PAGE ENTRANCE ANIMATIONS
   Cascading animations for internal pages
   Subtle, premium feel - small movements, soft easing
   ========================================= */

/* About Page Cascade */
.about-page .editorial-photo {
  opacity: 0;
  transform: translateY(8px);
  animation: fadeSlideUpSubtle 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
  animation-delay: 0s;
}

.about-page .page-header h1 {
  opacity: 0;
  transform: translateY(8px);
  animation: fadeSlideUpSubtle 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
  animation-delay: 0.05s;
}

.about-page .lede {
  font-size: 1.75rem;
  opacity: 0;
  transform: translateY(8px);
  animation: fadeSlideUpSubtle 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
  animation-delay: 0.1s;
}

.about-page .about-text p {
  opacity: 0;
  transform: translateY(6px);
  animation: fadeSlideUpSubtle 0.7s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.about-page .about-text p:nth-child(1) { animation-delay: 0.18s; }
.about-page .about-text p:nth-child(2) { animation-delay: 0.22s; }
.about-page .about-text p:nth-child(3) { animation-delay: 0.26s; }
.about-page .about-text p:nth-child(4) { animation-delay: 0.3s; }
.about-page .about-text p:nth-child(5) { animation-delay: 0.34s; }
.about-page .about-text p:nth-child(6) { animation-delay: 0.38s; }


/* Contact Page Cascade */
.contact-page .page-header h1 {
  opacity: 0;
  transform: translateY(8px);
  animation: fadeSlideUpSubtle 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
  animation-delay: 0s;
}

.contact-page .lede {
  opacity: 0;
  transform: translateY(8px);
  animation: fadeSlideUpSubtle 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
  animation-delay: 0.06s;
}

.contact-page .contact-content > * {
  opacity: 0;
  transform: translateY(6px);
  animation: fadeSlideUpSubtle 0.7s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.contact-page .contact-content > *:nth-child(1) { animation-delay: 0.14s; }
.contact-page .contact-content > *:nth-child(2) { animation-delay: 0.18s; }
.contact-page .contact-content > *:nth-child(3) { animation-delay: 0.22s; }


/* Explorations Page Cascade */
.explorations-page .explorations-header h1 {
  opacity: 0;
  transform: translateY(8px);
  animation: fadeSlideUpSubtle 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
  animation-delay: 0s;
}

.explorations-page .explorations-header .lede {
  opacity: 0;
  transform: translateY(8px);
  animation: fadeSlideUpSubtle 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
  animation-delay: 0.06s;
}

/* Lab log animation */
.explorations-page .log-entry {
  opacity: 0;
  transform: translateY(6px);
  animation: fadeSlideUpSubtle 0.5s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

/* Hover state for entries */
.explorations-page .log-entry:hover {
  background-color: rgba(74, 93, 74, 0.04);
}

.explorations-page .log-entry:nth-child(1) { animation-delay: 0.10s; }
.explorations-page .log-entry:nth-child(2) { animation-delay: 0.14s; }
.explorations-page .log-entry:nth-child(3) { animation-delay: 0.18s; }
.explorations-page .log-entry:nth-child(4) { animation-delay: 0.22s; }
.explorations-page .log-entry:nth-child(5) { animation-delay: 0.26s; }
.explorations-page .log-entry:nth-child(6) { animation-delay: 0.30s; }
.explorations-page .log-entry:nth-child(7) { animation-delay: 0.34s; }
.explorations-page .log-entry:nth-child(8) { animation-delay: 0.38s; }
.explorations-page .log-entry:nth-child(9) { animation-delay: 0.42s; }
.explorations-page .log-entry:nth-child(10) { animation-delay: 0.46s; }
.explorations-page .log-entry:nth-child(11) { animation-delay: 0.50s; }
