/* ─── VARIABLES ─────────────────────────────────────────── */
:root {
  --bg:            #ffffff;
  --text:          #0e0e0e;
  --text-nav:      #999999;
  --text-muted:    #aaaaaa;
  --text-projects: #686868;
  --thumb-bg:      #e8e6e1;
  --sidebar-width: 200px;
  --font:          'Jost', sans-serif;
  --font-name:     'Jost', sans-serif;
  --font-size:     16px;
  --header-height: 190px;
}

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

/* ─── SELECTION ──────────────────────────────────────────── */
::selection {
  background: #ff6b35;
  color: #ffffff;
}
 
::-moz-selection {
  background: #ff6b35;
  color: #ffffff;
}

/* ─── SCROLLBAR ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #b6b6b6; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #a3a3a3; }
* { scrollbar-width: thin; scrollbar-color: #bdbdbd transparent; }

html { height: 100%; }

body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--font-size);
  font-weight: 400;
  overflow-y: scroll;
}

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

/* ─── HEADER ─────────────────────────────────────────────── */
.site-header {
  max-width: 1900px;
  width: 100%;
  margin: 0 auto;
  padding: 0 4rem;
  height: var(--header-height);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.site-name {
  display: flex;
  flex-direction: column;
  line-height: 1;
  text-decoration: none;
  color: inherit;
}

.name-line {
  font-family: var(--font-name);
  font-size: 30px;
  font-weight: 500;
  color: var(--text);
  line-height: 0.95;
  letter-spacing: 0.02em;
}

.name-discipline {
  font-family: var(--font-name);
  font-size: 30px;
  font-weight: 500;
  color: var(--text);
  line-height: 0.95;
  letter-spacing: 0.02em;
}

/* ─── BODY LAYOUT ────────────────────────────────────────── */
.wrapper {
  max-width: 1900px;
  width: 100%;
  margin: 0 auto;
  padding: 0 4rem;
  display: flex;
  flex: 1;
}

/* ─── SIDEBAR ────────────────────────────────────────────── */
.sidebar {
  position: sticky;
  top: 0;
  align-self: flex-start;
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  max-height: 100vh;
  overflow-y: auto;
  padding: 2rem 2rem 2rem 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 2rem;
  flex-shrink: 0;
}

/* ─── NAV ────────────────────────────────────────────────── */
.main-nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.nav-section {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.25rem;
}

.nav-category {
  font-size: var(--font-size);
  font-weight: 400;
  color: var(--text-nav);
  padding: 0.5rem 0;
  letter-spacing: 0.04em;
  background: none;
  border: none;
  font-family: var(--font);
  cursor: pointer;
  text-align: left;
  transition: color 0.15s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-category:hover,
.nav-category.active {
  color: var(--text);
}

.filter-icon {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s;
  position: relative;
  top: -1px;
}

.nav-category:hover .filter-icon,
.nav-category.active .filter-icon {
  opacity: 1;
}


/* Sub-category filter buttons (Playspaces, Apps etc.) */
.nav-subcategory {
  font-size: var(--font-size);
  font-weight: 400;
  color: var(--text-projects);
  padding: 0.35rem 0 0.35rem 0.75rem;
  letter-spacing: 0.02em;
  background: none;
  border: none;
  font-family: var(--font);
  cursor: pointer;
  text-align: left;
  transition: color 0.15s;
  display: block;
  width: 100%;
}

.nav-subcategory:hover,
.nav-subcategory.active {
  color: var(--text);
}

.nav-list { list-style: none; }

.nav-list li a {
  display: block;
  padding: 0.35rem 0 0.35rem 0.75rem;
  color: var(--text-projects);
  font-size: var(--font-size);
  transition: color 0.15s;
}

.nav-list li a:hover { color: var(--text); }

.nav-about {
  display: block;
  font-size: var(--font-size);
  font-weight: 400;
  color: var(--text-nav);
  letter-spacing: 0.04em;
  padding: 0.5rem 0;
  margin-top: 1.5rem;
  transition: color 0.15s;
}

.nav-about:hover { color: var(--text); }

/* ─── MAIN ───────────────────────────────────────────────── */
.main {
  flex: 1;
  padding: 2rem 0 4rem 3rem;
  min-width: 0;
}

/* ─── FOOTER ─────────────────────────────────────────────── */
.site-footer {
  max-width: 1900px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 4rem;
  color: var(--text-muted);
  font-size: var(--font-size);
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.footer-logo {
  height: 28px;
  width: auto;
  display: block;
  opacity: 0.4;
}

/* ─── PROJECT GRID ───────────────────────────────────────── */
.project-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6rem 2.5rem;
}

.project-item {
  display: flex;
  flex-direction: column;
  gap: 14px;
  cursor: pointer;
  padding: 0 13%;
  pointer-events: none;
  position: relative;
}

.project-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 13%;
  right: 13%;
  bottom: 0;
  pointer-events: auto;
  z-index: 1;
}

.project-item.hidden { display: none; }

.project-thumb {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--thumb-bg);
  transition: opacity 0.2s;
  overflow: hidden;
  pointer-events: auto;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-item:hover .project-thumb { opacity: 0.75; }

.project-label {
  font-size: var(--font-size);
  color: var(--text-projects);
  letter-spacing: 0.02em;
  transition: color 0.2s;
  pointer-events: auto;
}

.project-item:hover .project-label { color: var(--text); }

.project-tag {
  display: none;
}

@media (max-width: 2000px) {
  .project-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ─── PROJECT PAGE ───────────────────────────────────────── */
.project-page { width: 100%; }

.project-hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--thumb-bg);
  display: block;
  margin-bottom: 3rem;
  overflow: hidden;
}

.project-hero img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  display: block;
}

.project-layout {
  display: flex;
  gap: 4rem;
  align-items: flex-start;
}

.project-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4rem;
  padding-bottom: 5rem;
}

.project-info {
  width: 240px;
  min-width: 240px;
  flex-shrink: 0;
  position: sticky;
  top: 2rem;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
}

.project-meta {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 1.25rem;
  color: var(--text-projects);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.project-title {
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.project-intro {
  font-size: var(--font-size);
  line-height: 1.85;
  margin-bottom: 2rem;
}

.project-nav {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-top: 1.5rem;
  border-top: 0.5px solid #e0e0e0;
}

.project-nav-link {
  color: var(--text-projects);
  font-size: var(--font-size);
  letter-spacing: 0.02em;
  transition: color 0.15s;
}

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

.project-nav-sep {
  color: var(--text-muted);
}

/* ─── CONTENT BLOCKS ─────────────────────────────────────── */
.block-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--thumb-bg);
  display: block;
  overflow: hidden;
}

.block-image-quad {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 1rem;
}

.block-image-quad img,
.block-image-quad .img-placeholder {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--thumb-bg);
  display: block;
}

.block-image-quad {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.block-image-quad img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  display: block;
}

/* Mobile */
@media (max-width: 768px) {
  .block-image-quad {
    grid-template-columns: repeat(2, 1fr);
  }
}

.block-image-tripple-square {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

.block-image-tripple-square img,
.block-image-tripple-square .img-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--thumb-bg);
  display: block;
}

.block-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.block-image.portrait {
  aspect-ratio: 3 / 4;
  max-width: 520px;
}

.block-image.square {
  aspect-ratio: 1;
  max-width: 520px;
}

.block-image-pair-portrait {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12rem;
  max-width: 1000px;  /* Makes the whole pair smaller */
  margin: 0 auto;    /* Centers it */
  padding: 1rem;     /* Adds space all around */
}

.block-image-pair-portrait img,
.block-image-pair-portrait .img-placeholder {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--thumb-bg);
  display: block;
}

.block-image-triple-portrait {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.block-image-triple-portrait img {
  width: 95%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
}

.block-image-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.block-image-pair img,
.block-image-pair .img-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--thumb-bg);
  display: block;
}

.block-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #ffffff;
  position: relative;
  overflow: hidden;
}

.block-video > iframe,
.block-video > video {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
  display: block;
}

.block-video-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: start;
}

.block-video-pair video {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.block-text { max-width: 600px; }

.block-text h2 {
  font-size: 17px;
  font-weight: 400;
  margin-bottom: 0.75rem;
}

.block-text p {
  font-size: var(--font-size);
  line-height: 1.85;
}

.block-caption {
  font-size: 12px;
  color: var(--text-projects);
  margin-top: -3rem;
  letter-spacing: 0.02em;
}

.block-persona-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

.persona-card {
  padding: 1.5rem;
  background: #ebebebeb;
}

.persona-role {
  color: rgb(107, 107, 119);
  font-size: 0.85rem;
  margin-top: -0.5rem;
  margin-bottom: 1rem;
}

.persona-label {
  font-weight: 500;
  margin-top: 1rem;
  margin-bottom: 0.25rem;
}

/* ─── ABOUT PAGE ─────────────────────────────────────────── */
.about-page {
  position: relative;
  max-width: none;
}

.about-photo {
  position: absolute;
  top: 0;
  right: 340px;
  width: 340px;
  max-width: 40%;
  height: auto;
  margin: 0;
  object-fit: cover;
}

@media (max-width: 768px) {
  .about-photo {
    position: static;
    display: block;
    width: min(280px, 100%);
    max-width: 100%;
    margin: 0 0 1.25rem;
  }
}

.about-page h1 {
  font-size: 17px;
  font-weight: 400;
  margin-bottom: 2rem;
}

.about-page p {
  font-size: var(--font-size);
  line-height: 1.9;
  margin-bottom: 1.25rem;
  max-width: 480px;
}

.about-contact {
  margin-top: 2.5rem;
  font-size: var(--font-size);
  color: var(--text-projects);
  clear: both;
}

.about-contact a {
  color: var(--text);
  border-bottom: 1px solid currentColor;
}

/* Lightbox Styles */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.lightbox-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 95%;
  height: 90%;
  max-width: 1400px;
}

.lightbox-media-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 80px;
}

.lightbox-media-container img,
.lightbox-media-container video {
  max-width: 100%;
  max-height: 90vh;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Hide all video controls completely */
.lightbox-media-container video::-webkit-media-controls {
  display: none !important;
}

.lightbox-media-container video::-webkit-media-controls-panel {
  display: none !important;
}

.lightbox-media-container video::-webkit-media-controls-play-button {
  display: none !important;
}

.lightbox-media-container video::-webkit-media-controls-timeline {
  display: none !important;
}

.lightbox-media-container video::-webkit-media-controls-current-time-display {
  display: none !important;
}

.lightbox-media-container video::-webkit-media-controls-time-remaining-display {
  display: none !important;
}

.lightbox-media-container video::-webkit-media-controls-volume-control {
  display: none !important;
}

.lightbox-media-container video::-webkit-media-controls-mute-button {
  display: none !important;
}

.lightbox-media-container video::-webkit-media-controls-fullscreen-button {
  display: none !important;
}

.lightbox-media-container video::-webkit-media-controls-toggle-closed-captions-button {
  display: none !important;
}

.lightbox-media-container video::-webkit-media-controls-download-button {
  display: none !important;
}

.lightbox-media-container video::-webkit-media-controls-picture-in-picture-button {
  display: none !important;
}

.lightbox-media-container video::-webkit-media-controls-overflow-button {
  display: none !important;
}

/* Custom video play/pause button */
.video-play-pause {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10;
  color: #333;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  pointer-events: none;
}

.lightbox-media-container video:hover ~ .video-play-pause {
  opacity: 0.5;
  pointer-events: auto;
}

.video-play-pause:hover {
  background: rgba(255, 255, 255, 1);
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  opacity: 1 !important;
}

.video-play-pause svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

/* Make video container clickable for play/pause */
.lightbox-media-container {
  position: relative;
}

.lightbox-media-container video {
  cursor: pointer;
}

.lightbox-media-container img:not([src*="portrait"]):not([src*="portrait"]),
.lightbox-media-container video:not([src*="portrait"]) {
  max-width: 95%;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
  color: #333;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.lightbox-prev {
  left: 10px;
}

.lightbox-next {
  right: 10px;
}

.lightbox-nav svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Make images clickable for lightbox */
.project-body img,
.project-hero img,
.block-image img,
.block-image-quad img,
.block-image-pair img,
.block-image-pair-portrait img,
.block-image-triple-portrait img,
.block-image-tripple-square img {
  cursor: pointer;
}

/* Make self-hosted videos clickable for lightbox */
.block-video video {
  cursor: pointer;
}

/* Exclude thumbnail images from lightbox */
.project-thumb img {
  cursor: default !important;
}

.project-thumb img:hover {
  transform: none !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .lightbox-content {
    width: 95%;
    height: 95%;
  }
  
  .lightbox-nav {
    width: 40px;
    height: 40px;
  }
  
  .lightbox-prev {
    left: 10px;
  }
  
  .lightbox-next {
    right: 10px;
  }
  
  .lightbox-nav svg {
    width: 20px;
    height: 20px;
  }
}
