@import url('https://fonts.googleapis.com/css2?family=Archivo:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300&display=swap');

@font-face {
  font-family: 'paquito';
  src: url('fonts/Paquito-Bold.woff2') format('woff2'),
    url('fonts/Paquito-Bold.woff2') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'paquito';
  src: url('fonts/Paquito-Medium.woff2') format('woff2'),
    url('fonts/Paquito-Medium.woff2') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'paquito';
  src: url('fonts/Paquito-Regular.woff2') format('woff2'),
    url('fonts/Paquito-Regular.woff2') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}


:root {
  --col-bg: #F0EDE8;
  --col-fg: #111111;
  --col-accent: #111111;
  --col-accent-light: #333333;
  --col-muted: #777777;
  --col-border: #D0CBC4;
  --col-card: #E4DFD8;
  --col-panel: #111111;
  --col-panel-text: #F0EDE8;
  --col-panel-muted: #ffffff;
  --grid-gap: 5px;
  --cols: 4;
  --row-h: 10px;
}

img {
  pointer-events: none;
}

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

html {
  font-family: 'Archivo', sans-serif;
  background: var(--col-bg);
  color: var(--col-fg);
  cursor: default;
  -webkit-font-smoothing: antialiased;
}

body { min-height: 100vh; overflow-x: hidden; }

/* ── HEADER ── */
header {
  display: flex; align-items: baseline;
  padding: 20px 32px; border-bottom: 1px solid var(--col-border);
  position: sticky; top: 0; background: var(--col-bg); z-index: 100;
}
header nav {
  display: flex; gap: 28px;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--col-muted);
  font-family: 'Archivo', sans-serif;
}
header nav a { color: inherit; text-decoration: none; transition: color 0.2s; }
header nav a:hover, header nav a.active { color: var(--col-fg); }

/* ── FILTER BAR ── */
.filter-bar {
  padding: 16px 32px; display: flex; gap: 8px; flex-wrap: wrap;
  align-items: center; border-bottom: 1px solid var(--col-border);
  position: sticky; top: 45px; background: var(--col-bg); z-index: 99;
}
.filter-btn {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em;
  padding: 6px 16px; border: 1.5px solid var(--col-border); background: transparent;
  color: var(--col-muted); cursor: pointer;
  font-family: 'Archivo', sans-serif;
  font-weight: 600; transition: all 0.2s;
}
.filter-btn:hover { border-color: var(--col-fg); color: var(--col-fg); }
.filter-btn.active { background: var(--col-fg); color: var(--col-bg); border-color: var(--col-fg); }
.project-count { font-size: 11px; color: var(--col-muted); letter-spacing: 0.06em; margin-left: auto; font-family: 'Archivo', sans-serif; }

/* ── INTRO SECTION ── */
.intro {
  display: flex;
  align-items: center;
  gap: 48px;
  padding: 60px 32px;
  border-bottom: 1px solid var(--col-border);
}
.intro-text { flex: 1; }
.intro-title {
  font-family: 'paquito', serif;
  font-weight: 400;
  font-size: 100px;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 16px;
  color: var(--col-fg);
}
.intro-desc {
  font-size: 16px;
  line-height: 1.75;
  color: black;
  font-weight: 300;
  max-width: 480px;
  font-family: 'Archivo', sans-serif;
}
.intro-image {
  flex: 0 0 auto;
  width: 280px;
}
.intro-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

@media (max-width: 750px) {
  .intro {
    flex-direction: column;
    gap: 28px;
    padding: 36px 18px;
    text-align: center;
  }
  .intro-desc { max-width: 100%; }
  .intro-image { width: 220px; }
}

/* ── CURSOR LABEL ── */
.cursor-label {
  position: fixed; pointer-events: none; z-index: 200;
  font-family: 'paquito', serif; font-size: 16px;
  color: var(--col-bg); background: var(--col-fg);
  padding: 0.5rem 0.6rem; border: 1.5px solid var(--col-bg);
  white-space: nowrap; opacity: 0; transition: opacity 0.12s ease;
  transform: translate(18px, -50%);
}
.cursor-label.visible { opacity: 1; }

/* ── GRID ── */
.grid-wrapper { padding: 14px 32px 48px; }

.project-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  grid-auto-rows: var(--row-h);
  gap: var(--grid-gap);
}

/* ── CELL ── */
.project-cell {
  position: relative; overflow: hidden; cursor: pointer;
  background: var(--col-card);
  animation: fadeUp 0.4s ease both;
  transition: opacity 0.4s ease;
}
.project-cell.hidden { display: none; }

.project-cell .thumb-wrap { width: 100%; height: 100%; overflow: hidden; }
.project-cell .thumb-wrap img,
.project-cell .thumb-wrap video {
  width: 100%; height: 100%; object-fit: cover;
  display: block; transition: transform 0.45s ease;
}
.project-cell:not(.expanded):hover .thumb-wrap img,
.project-cell:not(.expanded):hover .thumb-wrap video { transform: scale(1.04); }

.project-cell .video-badge {
  position: absolute; top: 8px; right: 8px; font-size: 9px;
  text-transform: uppercase; letter-spacing: 0.1em;
  background: rgba(0,0,0,0.55); color: #fff; padding: 4px 8px;
  font-weight: 600; z-index: 3; backdrop-filter: blur(4px);
  font-family: 'Archivo', sans-serif;
}
.project-cell .cell-index {
  position: absolute; bottom: 6px; left: 8px; font-size: 10px;
  font-weight: 600; color: rgba(255,255,255,0.7);
  mix-blend-mode: difference; z-index: 2;
  font-family: 'Archivo', sans-serif;
}

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

/* ── EXPANDED ── */
.project-cell.expanded {
  cursor: default; z-index: 10; background: var(--col-panel); overflow: hidden;
  transition: grid-row-end 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.project-cell.expanded .thumb-wrap,
.project-cell.expanded .cell-index,
.project-cell.expanded .video-badge { display: none; }

.expanded-inner { display: none; flex-direction: column; width: 100%; }
.project-cell.expanded .expanded-inner { display: flex; }

.exp-header {
  padding: 24px 28px 18px; display: flex;
  justify-content: space-between; align-items: flex-start;
  gap: 12px; flex-shrink: 0;
}
.exp-meta {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em;
  color: rgba(240,237,232,0.5); font-weight: 600; margin-bottom: 6px;
  font-family: 'Archivo', sans-serif;
}
.exp-title {
  font-family: 'Paquito', serif; font-weight: 400;
  font-size: 32px; letter-spacing: -0.025em; line-height: 1.1;
  color: var(--col-panel-text);
}

/* ── EXP IMAGE CONTAINER + CAROUSEL ── */
.exp-image-container {
  flex-shrink: 0;
  position: relative;
}

/* ── CAROUSEL ── */
.carousel {
  width: 100%;
  position: relative;
}

.carousel-track {
  width: 100%;
  display: grid;
  grid-template-rows: var(--track-h, auto);
}

.carousel-slide {
  grid-row: 1;
  grid-column: 1;
  display: flex;
  align-items: center;
  visibility: hidden;
  pointer-events: none;
}
.carousel-slide.active {
  visibility: visible;
  pointer-events: auto;
}

.carousel-slide img,
.carousel-slide video {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 75vh;
  display: block;
  object-fit: contain;
  object-position: left top;
  cursor: zoom-in;
  transform: scale(1.04);
  transition: transform 0.4s ease-in-out;
}
.project-cell.expanded .carousel-slide img,
.project-cell.expanded .carousel-slide video {
  transform: scale(1);
}

/* Controls row */
.carousel-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 28px 0;
}

.carousel-prev,
.carousel-next {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: var(--col-panel-text); color: var(--col-panel);
  border: none; cursor: pointer;
  font-size: 14px; line-height: 1;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
  pointer-events: all;
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
}
.carousel-prev:hover,
.carousel-next:hover { background: rgba(240,237,232,0.7); }

.carousel-counter {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--col-panel-muted); font-weight: 600;
  font-family: 'Archivo', sans-serif;
}

/* ── ACTION BUTTONS ── */
.exp-header-actions {
  position: absolute;
  top: 0; right: 0;
  display: flex; gap: 6px;
  padding: 6px;
  z-index: 5;
}

.close-btn, .zoom-btn {
  width: 30px; height: 30px; display: flex; align-items: center;
  justify-content: center; background: var(--col-panel-text); color: var(--col-panel);
  border: none; cursor: pointer; font-size: 16px; line-height: 1;
  transition: background 0.2s;
  font-family: 'Archivo', sans-serif; font-weight: 700;
}
.close-btn:hover, .zoom-btn:hover { background: rgba(240,237,232,0.75); }
.zoom-btn svg { width: 14px; height: 14px; fill: none; stroke: var(--col-panel); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

/* ── EXP BODY ── */
.exp-body {
  padding: 18px 28px 28px; display: flex; flex-direction: column;
  gap: 16px; min-height: 0;
}
.exp-divider { width: 36px; height: 2px; background: rgba(240,237,232,0.25); flex-shrink: 0;
display: none; }

.exp-desc {
  font-size: 14px; line-height: 1.7; color: var(--col-panel-muted);
  font-weight: 300; overflow-wrap: break-word; hyphens: auto;
  font-family: 'Archivo', sans-serif;
}
.exp-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.exp-tag {
  font-size: 9px; text-transform: uppercase; letter-spacing: 0.1em;
  padding: 5px 12px; border: 1.5px solid rgba(255,255,255,0.15);
  color: var(--col-panel-muted); font-weight: 600; white-space: nowrap;
  font-family: 'Archivo', sans-serif;
}
.exp-section-title {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--col-panel-text); font-weight: 700; margin-top: 8px;
  font-family: 'Archivo', sans-serif;
}
.exp-process-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.exp-process-grid img { width: 100%; height: auto; display: block; }
.exp-caption { font-size: 11px; color: rgba(255,255,255,0.3); font-style: italic; margin-top: 2px; font-family: 'Archivo', sans-serif; }

/* ── DIMMED ── */
.project-grid.has-expanded .project-cell:not(.expanded) { opacity: 0.2; }
.project-grid.has-expanded .project-cell:not(.expanded):hover { opacity: 0.4; }

/* ── ZOOM OVERLAY ── */
.zoom-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(10,10,10,0.96); display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 52px 20px 20px;
  gap: 0;
  box-sizing: border-box;
}
.zoom-overlay.active { display: flex; }

#zoomContent {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
#zoomContent img,
#zoomContent video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  cursor: default;
}

#zoomDesc {
  flex: 0 0 auto;
  width: 100%;
  max-width: 44em;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 0 0;
  text-align: center;
}

.zoom-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.zoom-meta {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(240,237,232,0.45);
  font-weight: 600;
  font-family: 'Archivo', sans-serif;
}

.zoom-title {
  font-family: 'Paquito', serif;
  font-weight: 400;
  font-size: 24px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #F0EDE8;
}

.zoom-desc-text {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(240,237,232,0.45);
  font-weight: 300;
  font-family: 'Archivo', sans-serif;
}

.zoom-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  justify-content: center;
}

.zoom-prev,
.zoom-next {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: #F0EDE8; color: #111;
  border: none; cursor: pointer;
  font-size: 14px; line-height: 1;
  transition: background 0.2s;
  flex-shrink: 0;
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
}
.zoom-prev:hover,
.zoom-next:hover { background: rgba(240,237,232,0.75); }

.zoom-counter {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.3);
  font-weight: 600;
  font-family: 'Archivo', sans-serif;
}

.zoom-close {
  position: fixed; top: 20px; right: 20px; width: 38px; height: 38px;
  background: #F0EDE8; color: #111; border: none; cursor: pointer;
  font-size: 20px; display: flex; align-items: center; justify-content: center;
  z-index: 1001; line-height: 1;
  font-family: 'Archivo', sans-serif; font-weight: 700;
}

/* ── FOOTER ── */
footer {
  padding: 22px 32px; border-top: 1px solid var(--col-border);
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--col-muted);
  font-family: 'Archivo', sans-serif;
}
footer a { color: var(--col-fg); text-decoration: none; }

/* ── RESPONSIVE ── */
@media (max-width: 1100px) { :root { --cols: 3; } }
@media (max-width: 750px) {
  :root { --cols: 2; }
  header { padding: 18px 18px; }
  .grid-wrapper { padding: 10px 18px 32px; }
  .filter-bar { padding: 12px 18px;
  top: 45px; }
  .intro-title { font-size: 38px; }
  .exp-title { font-size: 26px; }
  .exp-header { padding: 18px 20px 14px; }
  .exp-body { padding: 14px 20px 22px; }
  .carousel-controls { padding: 8px 20px 0; }
}
@media (max-width: 500px) {
  :root { --cols: 2; }
  .cursor-label { display: none; }
  .intro-title { font-size: 30px; }
  .exp-title { font-size: 22px; }
  .exp-header { padding: 14px 16px 12px; }
  .exp-body { padding: 12px 16px 18px; }
  .carousel-slide img, .carousel-slide video { max-height: 45vh; }
  .carousel-controls { padding: 8px 16px 0; }
}
@media (min-width: 1500px) { :root { --cols: 5; } }