@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

:root {
  /* Centralized Variables */
  /* Colors - Light Theme */
  --bg-color: #ffffff;
  --text-primary: #1a1a1a;
  --text-secondary: #777777;
  --text-disabled: #b0b0b0;
  --bg-header: rgba(255, 255, 255, 0.95);
  --border-color: #eaeaea;

  /* Typography */
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.85rem;
  --font-size-base: 13px;
  /* Smaller base for elegant aesthetic matching the image */
  --font-size-md: 1.125rem;
  --font-size-lg: 1.2rem;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2.5rem;
  --space-xl: 20px;
  /* Fixed padding for consistency */

  /* Layout */
  --max-width: 1600px;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-medium: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg-color: #121212;
  --text-primary: #f2f2f2;
  --text-secondary: #aaaaaa;
  --text-disabled: #555555;
  --bg-header: rgba(18, 18, 18, 0.95);
  --border-color: #333333;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.5;
  transition: opacity 0.5s ease-in-out, background-color var(--transition-medium), color var(--transition-medium);
  min-height: 100vh;
  opacity: 0;
  /* JS adds .page-loaded to fade in on first visit */
  -webkit-font-smoothing: antialiased;
}

body.page-loaded {
  opacity: 1;
}

body.page-transitioning {
  opacity: 0 !important;
}

/* Header Navigation */
header.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: var(--space-xl) var(--space-xl) 0 var(--space-xl);
  /* Nav spacing synced with main container grid */
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
  z-index: 1000;
  background: linear-gradient(to bottom, var(--bg-color) 0%, rgba(255, 255, 255, 0) 100%);
  padding-bottom: 51px;
  pointer-events: none;
  font-size: var(--font-size-base);
  transition: background var(--transition-medium);
}

[data-theme="dark"] header.top-nav {
  background: linear-gradient(to bottom, var(--bg-color) 0%, rgba(18, 18, 18, 0) 100%);
}

.nav-left,
.nav-center,
.nav-right {
  pointer-events: auto;
  grid-row: 1;
}

.nav-left {
  /* Aligns +/- toggler with the start of column 2 (matching portfolio content) */
  grid-column: 2;
  justify-self: start;
}

.nav-center {
  position: fixed;
  top: var(--space-xl);
  left: 50vw;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  z-index: 1001;
  /* Ensure it's above other header elements */
}

.nav-right {
  grid-column: 4;
  justify-self: end;
}


.nav-left span {
  color: var(--text-secondary);
}

.nav-left a,
.nav-center a {
  text-decoration: none;
  color: var(--text-primary);
  transition: color var(--transition-fast);
  display: inline-block;
}

.nav-left a.active {
  text-decoration: underline;
}

/* +/- grid control disabled state — mirrors Josselin's opacity-20 */
.nav-left a.grid-control--disabled {
  opacity: 0.2;
  pointer-events: none;
  cursor: default;
}

.nav-center {
  display: flex;
  align-items: center;
}

.nav-center a.current-page {
  color: var(--text-disabled);
}

.nav-center a:hover {
  color: var(--text-secondary);
}

/* Theme Toggle Switch */
.theme-toggle {
  width: 31.734px;
  height: 14.76px;
  border-radius: 999px;
  border: 1pt solid #000;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: border-color var(--transition-medium);
  padding: 0;
  display: block;
  box-sizing: border-box;
}

[data-theme="dark"] .theme-toggle {
  border-color: #fff;
  background: transparent;
}

.theme-toggle-circle {
  position: absolute;
  top: 2.9284px;
  left: 2.9284px;
  height: calc(100% - 5.8568px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: #000;
  transition: transform var(--transition-medium), background-color var(--transition-medium);
  transform: translateX(0);
}

[data-theme="dark"] .theme-toggle-circle {
  background: #fff;
  transform: translateX(16.974px);
}

/* =========================================
   Main Container — true 4-column grid

   Track map:
     col 1       →  WRIGHT (visually sparse — only the brand name lives here)
     cols 2–4   →  main content (portfolio / contact)

   repeat(4, 1fr) gives equal column widths and identical
   left/right outside margins from the padding.
   ========================================= */
.container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
  padding: calc(var(--space-xl) * 2) var(--space-xl) var(--space-xl);
  max-width: none;
  margin: 0 auto;
}

/* ─── Sidebar — column 1 (far left, close to left margin) ─── */
.sidebar {
  grid-column: 1;
}

.sidebar-inner {
  /* Fixed at viewport vertical center so WRIGHT anchors to 50vh regardless of scroll */
  position: fixed;
  top: 50vh;
  left: var(--space-xl);
  transform: translateY(-50%);
  display: flex;
  align-items: center;
}

/* Show sidebar on contact page — WRIGHT is visible on both pages */


.brand-name {
  font-size: var(--font-size-md);
  font-weight: 500;
  color: var(--text-primary);
}

/* ← portfolio back link — JS sets left dynamically to the midpoint between
   the right edge of WRIGHT and the left edge of the content column. */
.project-back-link {
  position: fixed;
  top: 50vh;
  transform: translate(-50%, -50%);
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--transition-fast);
  z-index: 1100;
}

.project-back-link:hover {
  color: var(--text-primary);
}

/* Hide when the sidebar collapses to top-left at mobile */
@media (max-width: 900px) {
  .project-back-link {
    display: none;
  }
}

/* ── SLC abbreviation: swap "Salt Lake City" → "SLC" just before overlap ── */
.city-abbr { display: none; }
@media (max-width: 530px) {
  .city-full { display: none; }
  .city-abbr { display: inline; }
}

/* ── Mobile Overlap Fix (600px) ── */
@media (max-width: 600px) {
  .contact-body .nav-left {
    display: none !important;
    /* Prevent overlap with centered menu at small sizes */
  }
}

/* ─── Portfolio — columns 2–4 ─── */
.portfolio {
  grid-column: 2 / 5;
  width: 100%;
  /* Push first project title to align with WRIGHT at 50vh.
     Subtracts the container's own top padding so the baseline lands exactly. */
  margin-top: calc(50vh - calc(var(--font-size-md) * 0.75) - calc(var(--space-xl) * 2));
}

/* =========================================
   Contact Page Specifics
   ========================================= */

.contact-body {
  /* Prevent scrolling if content fits perfectly inside the screen height */
  overflow-x: hidden;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-disabled: rgba(255, 255, 255, 0.4);
  color: var(--text-primary);
  background-color: #f26624;
  /* Solid orange background */
}

.contact-body header.top-nav {
  background: linear-gradient(to bottom, #f26624 0%, rgba(242, 102, 36, 0) 100%);
}

.contact-body .nav-right {
  display: none;
  /* Keep theme toggle hidden on contact page as originally intended */
}

/* Contact page: clock starts in nav-left; on collapse it moves to center */
.contact-body .nav-left {
  transition: all var(--transition-fast);
}


/* Create the purple/blue tint seen in the mockup */
.contact-bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(85, 90, 135, 0.7);
  /* Hardcoded blueish tint from image */
  mix-blend-mode: multiply;
}

[data-theme="dark"] .contact-bg-overlay {
  background: rgba(30, 32, 50, 0.85);
  /* Darker tint for dark mode */
}

.contact-content {
  /* Sit in columns 2–4, matching the portfolio column span */
  grid-column: 2 / 5;
  width: 100%;
  display: grid;
  grid-template-columns: 2fr 1.5fr;
  gap: calc(var(--space-xl) * 1.5);
  margin-top: calc(50vh - calc(var(--font-size-md) * 0.75) - calc(var(--space-xl)*2));
  min-height: calc(50vh + calc(var(--font-size-md) * 0.75));
  padding-bottom: var(--space-xl);
  box-sizing: border-box;
}

.contact-bio {
  grid-column: 1;
  font-size: var(--font-size-base);
  line-height: 1.5;
  margin-bottom: var(--space-xl);
}

.contact-bio p {
  margin-bottom: var(--space-xl);
}

/* ── Character reveal animation (contact page) ──────────────────── */
/* Each character is wrapped in a .char-reveal span by JS on load.   */
/* Opacity starts at 0; JS sets it to 1 with staggered transition-   */
/* delay per character, creating a left-to-right "progress bar" fill. */
.char-reveal {
  display: inline-block;
  opacity: 0;
  transition: opacity 0.08s ease;
}

/* Word wrappers prevent characters from breaking across lines */
.word-wrap {
  display: inline-block;
  white-space: nowrap;
}

.contact-bio br {
  display: none;
  /* Replaced br with margin-bottom for better paragraph control */
}

.contact-info {
  grid-column: 2;
  font-size: var(--font-size-base);
  line-height: 1.5;
  justify-self: center;
  text-align: left;
}

.contact-footer-left {
  grid-column: 1;
  grid-row: 2;
  align-self: end;
}

.contact-footer-right {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

/* Project List Sections */
.project-series {
  margin-bottom: calc(var(--space-xl) * 2);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-xs);
}

.project-header h2 {
  font-size: var(--font-size-base);
  font-weight: 500;
}

.project-header a.project-link {
  text-decoration: none;
  color: var(--text-primary);
  transition: color var(--transition-short, 0.2s ease);
  display: inline-block;
}

.project-header a.project-link:hover {
  color: var(--text-secondary);
}

.portfolio-count {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
}

.project-subtitle {
  font-size: var(--font-size-xs);
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  line-height: 1.4;
  max-width: 60ch;
}

/* Grid Layouts for Projects */
.project-grid {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start; /* tops aligned, bottoms at natural aspect ratio */
  gap: var(--space-sm);
  overflow: hidden;
}

.project-item {
  flex: 1; /* overridden per-image by JS — flex-basis = ratio × height, flex-shrink = 0 */
  min-width: 0;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Add slight delay for waterfall effect based on child index */
.project-item:nth-child(2) {
  animation-delay: 0.1s;
}

.project-item:nth-child(3) {
  animation-delay: 0.2s;
}

.project-item:nth-child(4) {
  animation-delay: 0.3s;
}

.project-item:nth-child(5) {
  animation-delay: 0.4s;
}

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

.project-item img,
.project-item video {
  width: 100%;
  height: auto; /* natural aspect ratio — no cropping */
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter var(--transition-fast);
  will-change: transform;
}

.project-item a.project-image-link {
  display: block;
  width: 100%;
  height: auto;
  overflow: hidden;
  border-radius: 4px;
}

.project-item:hover img,
.project-item:hover video {
  transform: scale(1.02);
  filter: brightness(0.9);
}

/* =========================================
   Responsive Breakpoints

   1. ≤1024px  Tablet — cap project grids
   2. ≤900px   Collapse — Single column layout & Unified Header
   3. ≤1100px  Contact Page — prevent header collision early
   ========================================= */

/* ── Tablet ── */
/* tablet: JS recalculates item widths based on containerW at all sizes */

/* ── Header Breakpoint (1100px) ── */
/* Prevents collision between clock/brand and nav items early */
@media (max-width: 1100px) {
  header.top-nav {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
    align-items: center;
    padding: var(--space-xl) var(--space-xl) 0 !important;
  }

  /* Portfolio specific header: ensure +/- toggler aligns with col 2 (matching portfolio content) */
  .nav-left {
    grid-column: 2;
    justify-self: start;
    display: flex !important;
    /* Keep visible until 900px */
  }

  /* Contact page: move clock to the right side (col 4) early to prevent menu overlap */
  .contact-body .nav-left {
    grid-column: 4;
    justify-self: end;
    position: static !important;
    transform: none !important;
    margin-left: 0 !important;
    order: 3;
    display: flex !important;
    z-index: 1001;
  }

  .nav-center {
    position: fixed !important;
    left: 50vw !important;
    transform: translateX(-50%) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    order: 2;
    z-index: 1001;
  }

  .nav-right {
    grid-column: 4;
    justify-self: end;
    display: flex !important;
    /* Ensure theme toggle is visible on portfolio */
    z-index: 1001;
  }

  .contact-body .nav-right {
    display: none !important;
    /* Keep hidden on contact */
  }
}

/* ── Content Collapse Breakpoint (900px) ── */
@media (max-width: 900px) {

  /* Layout: Switch to single column content */
  .container {
    grid-template-columns: 1fr;
  }

  header.top-nav {
    display: flex !important;
    align-items: center;
    padding: var(--space-xl) var(--space-xl) 0 !important;
  }

  /* Centered menu in mobile */
  .nav-center {
    position: fixed !important;
    top: var(--space-xl) !important;
    left: 50vw !important;
    transform: translateX(-50%) !important;
    margin: 0 !important;
    z-index: 1001;
  }

  /* Toggle/Clock on the right in mobile */
  .nav-right,
  .contact-body .nav-left {
    position: static !important;
    transform: none !important;
    margin-left: auto !important;
    display: flex !important;
    order: 3;
    z-index: 1001;
  }

  /* Sidebar holds zero height in collapsed state */
  .sidebar {
    grid-column: 1;
    height: 0;
    overflow: visible;
  }

  /* Mobile: show only the first image per project, full width */
  .project-grid {
    flex-wrap: wrap;
  }

  .project-item {
    flex: 0 0 100%;
  }

  .project-item:not(:first-child) {
    display: none;
  }

  .project-item img,
  .project-item video,
  .project-item a.project-image-link {
    height: auto;
  }

  /* Content: Full width images/type */
  .portfolio {
    grid-column: 1 / -1;
  }

  .portfolio[data-grid-size] .project-grid {
    grid-template-columns: 1fr;
  }

  .contact-body .contact-content {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    margin-top: calc(50vh - calc(var(--font-size-md) * 0.75) - calc(var(--space-xl)*2));
    min-height: auto;
    max-width: 70ch;
  }

  .contact-body .contact-info {
    grid-column: 1;
    margin-top: var(--space-xl);
  }

  .contact-body .contact-footer-right {
    display: none;
  }

  /* Ensure WRIGHT is visible on both pages in collapsed state */
  .sidebar {
    display: block !important;
  }

  /* WRIGHT: Position top-left ONLY once images span full width */
  .sidebar-inner,
  .contact-body .sidebar-inner {
    position: fixed !important;
    top: var(--space-xl) !important;
    left: var(--space-xl) !important;
    transform: none !important;
    z-index: 1100;
  }

  /* Force hide grid controls ONLY once images span full width */
  body:not(.contact-body) .nav-left {
    display: none !important;
  }
}

/* =========================================
   Contact Page Load Animation
   ========================================= */

/* Initial State (hidden and shifted down) */
.contact-body .contact-content p,
.contact-body .contact-info p,
.contact-body .contact-footer-right p {
  opacity: 0;
  transform: translateY(24px);
  will-change: opacity, transform;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Loaded State (fade in and slide up) */
.contact-body.page-loaded .contact-content p,
.contact-body.page-loaded .contact-info p,
.contact-body.page-loaded .contact-footer-right p {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered Delays for Contact Bio, Info, and Footer */
.contact-body .contact-content p:nth-child(1) {
  transition-delay: 0.1s;
}

.contact-body .contact-content br:nth-child(2)~p:nth-child(3) {
  transition-delay: 0.2s;
}

.contact-body .contact-content br:nth-child(4)~p:nth-child(5) {
  transition-delay: 0.3s;
}

.contact-body .contact-info p:nth-child(1) {
  transition-delay: 0.4s;
}

.contact-body .contact-info p:nth-child(2) {
  transition-delay: 0.45s;
}

.contact-body .contact-footer-right p {
  transition-delay: 0.5s;
}

/* =========================================
   Project Detail Pages
   ========================================= */

/* Project title block — name, tags, year at top of content */
.project-title-block {
  margin-bottom: var(--space-lg);
}

.project-name {
  font-size: var(--font-size-md);
  font-weight: 500;
  font-family: var(--font-family);
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: var(--space-xs);
}

.project-tag {
  font-size: var(--font-size-xs);
  font-family: var(--font-family);
  padding: 2px 8px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.project-year {
  font-size: var(--font-size-xs);
  font-family: var(--font-family);
  color: var(--text-secondary);
}

.project-external-link {
  font-size: var(--font-size-xs);
  font-family: var(--font-family);
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.project-external-link:hover {
  color: var(--text-primary);
}

/* Main content — starts at 50vh, matches portfolio/archive rule */
.project-content {
  grid-column: 2 / 5;
  width: 100%;
  margin-top: calc(50vh - calc(var(--font-size-md) * 0.75) - calc(var(--space-xl) * 2));
  padding-bottom: calc(var(--space-xl) * 3);
}

/* Opening description */
.project-description {
  font-size: clamp(1.1rem, 2.2vw, 1.75rem);
  line-height: 1.45;
  color: var(--text-primary);
  font-family: var(--font-family);
  margin-bottom: calc(var(--space-xl) * 2);
  max-width: 80ch;
}

/* Full-width image block */
.project-full-image {
  width: 100%;
  margin-bottom: var(--space-sm);
}

.project-full-image img,
.project-full-image video {
  width: 100%;
  height: auto;
  display: block;
  transition: filter var(--transition-fast);
}

/* Two images side-by-side */
.project-image-row {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
  margin-bottom: var(--space-sm);
}

.project-image-row .project-full-image {
  flex: 1;
  margin-bottom: 0;
}

/* Prev / next navigation */
.project-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: calc(var(--space-xl) * 3);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border-color);
}

.project-nav a {
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.project-nav a:hover,
.project-nav a.project-nav-next {
  color: var(--text-primary);
}

/* =========================================
   Lightbox
   ========================================= */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.lightbox.open {
  display: flex;
}

.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 88vw;
  max-height: 90vh;
}

.lightbox-content img {
  max-width: 88vw;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 2px;
}

.lightbox-caption {
  margin-top: var(--space-sm);
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  letter-spacing: 0.04em;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  line-height: 1;
  transition: color var(--transition-fast);
  z-index: 2001;
  padding: var(--space-md);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  color: #fff;
}

.lightbox-close {
  top: var(--space-xl);
  right: var(--space-xl);
  font-size: 1.5rem;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
}

.lightbox-prev { left: var(--space-xl); }
.lightbox-next { right: var(--space-xl); }

/* =========================================
   6. Archive Page Styles
   ========================================= */

.archive-body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* WRIGHT scrolls with the page on archive, then locks at top-left.
   JS drives the top value — starts at 50vh centre, clamps at --space-xl. */
.archive-body .sidebar-inner {
  position: fixed;
  left: var(--space-xl);
  transform: none;
  z-index: 1100;
}

/* Intro zone styling */
.archive-intro {
  grid-column: 2 / 5;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  text-align: left;
  margin-top: calc(50vh - calc(var(--font-size-md) * 0.75) - calc(var(--space-xl) * 2));
  min-height: calc(30vh);
  width: 100%;
  max-width: 60ch;
  z-index: 10;
}

.archive-title {
  font-size: var(--font-size-base);
  font-weight: 500;
  margin-bottom: var(--space-sm);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.archive-description {
  max-width: 60ch;
  font-size: var(--font-size-base);
  line-height: 1.5;
  color: var(--text-primary);
  margin-bottom: 0;
}

/* Grid Wrapper — full bleed across all columns */
.archive-grid-wrapper {
  grid-column: 1 / -1;
  position: relative;
  z-index: 1;
}

/* Archive Masonry Grid — 4 equal columns, JS-driven positioning */
.archive-grid {
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.archive-item {
  /* width + position set by JS masonry */
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  background-color: transparent;
  /* Start hidden — IntersectionObserver adds .is-visible when scrolled into view */
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.archive-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter var(--transition-fast);
  will-change: transform;
}

.archive-item {
  cursor: pointer;
}

.archive-item:hover img {
  transform: scale(1.02);
  filter: brightness(0.9);
}

/* Archive Item Typography */
.archive-item-info {
  padding: 12px 0 0;
  background-color: transparent;
  display: inline-block;
}

.archive-item-info span.project-name {
  font-size: var(--font-size-xs);
  color: var(--text-primary);
  display: inline;
}

.archive-item-info span.project-category {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  display: inline;
  margin-left: 8px; /* Small gap inline */
}

/* Responsive Archive Layout */
@media (max-width: 900px) {
  .archive-intro {
    grid-column: 1 / -1;
    min-height: auto;
    padding: 0 0 var(--space-xl) 0;
    margin-top: calc(var(--space-xl) * 4);
  }

  .archive-grid-wrapper {
    grid-column: 1 / -1;
    padding: 0;
  }

  .portfolio {
    padding: 0;
    margin-top: calc(var(--space-xl) * 4);
  }

  .project-header,
  .project-subtitle {
    padding: 0;
  }

  .project-item:first-child {
    flex: 0 0 auto !important;
    width: calc(100% + var(--space-xl)) !important;
  }

  /* Project pages — full width content at mobile */
  .project-content {
    grid-column: 1 / -1;
    margin-top: calc(var(--space-xl) * 4);
  }

  .project-full-image img,
  .project-image-row {
    width: 100%;
  }

  .project-image-row {
    flex-direction: column;
  }

  .project-nav {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .archive-intro {
    margin-top: calc(var(--space-xl) * 3);
    min-height: 0;
    padding-bottom: var(--space-xl);
  }

  .archive-grid-wrapper {
    padding: 0;
  }

  .portfolio {
    margin-top: calc(var(--space-xl) * 3);
  }
}