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

  :root {
    --black: #0e0e0e;
    --white: #ffffff;
    --gray-light: #f5f4f2;
    --gray-mid: #d0cfc9;
    --gray-text: #6b6b66;
    --avenir: 'Avenir LT Std', 'Avenir', Arial, sans-serif;
    --clother: 'Clother', Georgia, serif;
  }

  body {
    font-family: var(--clother);
    background: var(--white);
    color: var(--black);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  /* NAV */
  nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white);
    border-bottom: 1px solid var(--gray-mid);
    height: 90px;
    display: flex;
    align-items: center;
    padding: 0;
  }
  .nav-inner {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
  }

  .nav-logo {
    font-family: var(--avenir);
    font-size: 29px;
    font-weight: 500;
    color: var(--black);
    cursor: pointer;
  }

  .nav-links { display: flex; gap: 40px; list-style: none; }

  .nav-links a {
    font-family: var(--clother);
    font-weight: 300;
    font-size: 22px;
    color: var(--black);
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
    cursor: pointer;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
  }

  .nav-links a.active::after,
  .nav-links a:hover::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0;
    width: 100%; height: 1px;
    background: var(--black);
  }

  /* VIEWS */
  .view { display: none; flex: 1; flex-direction: column; }
  .view.active { display: flex; }

  /* WORKS */
  .works-inner {
    padding: 72px 24px 96px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
  }

  .works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 32px;
  }

  .project-card { cursor: pointer; display: block; }
  .project-card:hover .project-thumb img { transform: scale(1.03); opacity: 0.7;}

  .project-thumb {
    width: 100%;
    aspect-ratio: 5/4;
    overflow: hidden;
    background: var(--gray-light);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .project-thumb img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    transition: transform 0.4s ease;
  }

  .no-img {
    font-family: var(--avenir);
    font-size: 11px;
    color: var(--gray-mid);
    letter-spacing: 0.05em;
  }

  .project-title {
    font-family: var(--avenir);
    font-size: 13px;
    color: var(--black);
    margin-top: 8px;
  }


  /* WORKS FILTERS + LIVE TAG */
  .works-filters {
    display: flex; flex-wrap: wrap; gap: 28px;
    list-style: none; margin: 0 0 36px; padding: 0;
  }
  .works-filters button {
    background: none; border: none; padding: 0 0 3px; cursor: pointer;
    font-family: var(--avenir); font-size: 13px; color: var(--gray-text);
    border-bottom: 1px solid transparent; transition: color 0.2s;
  }
  .works-filters button:hover { color: var(--black); }
  .works-filters button[aria-pressed="true"] { color: var(--black); border-bottom-color: var(--black); }

  .project-tag {
    display: inline-block; margin-left: 10px; vertical-align: 1px;
    font-family: var(--avenir); font-size: 10px; letter-spacing: 0.06em;
    color: var(--gray-text); border: 1px solid var(--gray-mid);
    border-radius: 99px; padding: 1px 8px; text-transform: lowercase;
  }

  /* PROJECT DETAIL */
  .project-hero {
    width: 100%;
    overflow: hidden;
    background: var(--gray-light);
  }

  .project-hero img {
    width: 100%; display: block;
    object-fit: cover;
    max-height: 720px;
    object-position: center;
    cursor: grab;
    user-select: none;
  }
  .project-hero { position: relative; }

  .project-detail-body {
    max-width: 1080px; width: 100%;
    margin: 0 auto;
    padding: 34px 48px 0;
  }

  .proj-img-row:last-child {
    margin-bottom: 0;
  }

  /* unified 12-col grid for text + images */
  .project-detail-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: auto;
    column-gap: 20px;
    row-gap: 0;
  }

  .proj-text-block {
    grid-column: 1 / span 5;
    grid-row: 1;
    padding-right: 8px;
  }

  .proj-meta-block {
    grid-column: 7 / span 6;
    grid-row: 1;
    border-top: 1px solid var(--gray-mid);
    padding-top: 20px;
    margin-top: 32px;
  }

  .back-btn {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--avenir);
    font-size: 13px; color: var(--gray-text);
    cursor: pointer; margin-bottom: 32px;
    background: none; border: none; padding: 0;
    transition: color 0.2s;
  }
  .back-btn:hover { color: var(--black); }

  .proj-text-block h1 {
    font-family: var(--avenir);
    font-size: 30px; font-weight: 400;
    line-height: 1.25; margin-bottom: 24px;
  }

  .proj-text-block p {
    font-family: var(--clother);
    font-weight: 300;
    font-size: 15px; line-height: 1.85;
    color: var(--gray-text);
    margin-bottom: 16px;
  }

  .project-meta {
    display: flex; flex-direction: column;
    gap: 14px;
  }

  .project-meta-row { display: flex; gap: 16px; }

  .project-link {
    display: inline-flex; align-items: center; gap: 10px;
    margin-top: 28px;
    font-family: var(--avenir);
    font-size: 13px; color: var(--black); text-decoration: none;
    transition: color 0.2s;
  }
  .project-link svg { transition: transform 0.2s; }
  .project-link:hover { color: var(--gray-text); }
  .project-link:hover svg { transform: translateX(4px); }

  .project-meta-label {
    font-family: var(--avenir);
    color: var(--gray-text);
    text-transform: uppercase; font-size: 11px;
    letter-spacing: 0.08em;
    min-width: 140px; flex-shrink: 0; padding-top: 2px;
  }

  .project-meta-value {
    font-family: var(--avenir);
    font-size: 13px; color: var(--black);
    line-height: 1.6;
  }

  /* image section — lives inside project-detail-grid */
  .project-images {
    display: contents;
  }

  .proj-img-row {
    grid-column: 1 / span 12;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    column-gap: 20px;
    position: relative;
  }

  .proj-img-cell {
    overflow: hidden;
    background: var(--gray-light);
  }

  .proj-img-cell img {
    width: 100%; display: block;
    object-fit: cover;
  }

  .col-3  { grid-column: span 3; }
  .col-4  { grid-column: span 4; }
  .col-5  { grid-column: span 5; }
  .col-6  { grid-column: span 6; }
  .col-7  { grid-column: span 7; }
  .col-8  { grid-column: span 8; }
  .col-9  { grid-column: span 9; }
  .col-12 { grid-column: span 12; }

  .col-start-1  { grid-column-start: 1; }
  .col-start-2  { grid-column-start: 2; }
  .col-start-3  { grid-column-start: 3; }
  .col-start-4  { grid-column-start: 4; }
  .col-start-5  { grid-column-start: 5; }
  .col-start-6  { grid-column-start: 6; }
  .col-start-7  { grid-column-start: 7; }
  .col-start-8  { grid-column-start: 8; }
  .col-start-9  { grid-column-start: 9; }
  .col-start-10 { grid-column-start: 10; }
  .col-start-11 { grid-column-start: 11; }
  .col-start-12 { grid-column-start: 12; }

  .ratio-4-3  { aspect-ratio: 4/3; }
  .ratio-3-4  { aspect-ratio: 3/4; }
  .ratio-16-9 { aspect-ratio: 16/9; }
  .ratio-16-7 { aspect-ratio: 16/7; }
  .ratio-1-1  { aspect-ratio: 1/1; }

  @media (max-width: 600px) {
    .project-images .img-block { grid-column: span 12 !important; grid-column-start: auto !important; }
  }

  /* ABOUT / CONTACT */
  .text-view {
    max-width: 600px; margin: 0 auto;
    padding: 72px 48px 96px; width: 100%;
  }

  .text-view h1 {
    font-family: var(--avenir);
    font-size: 38px; font-weight: 400;
    line-height: 1.1; margin-bottom: 32px;
  }

  /* body copy uses Clother */
  .text-view p {
    font-family: var(--clother);
    font-size: 16px; line-height: 1.75;
    color: var(--gray-text); margin-bottom: 20px;
  }

  .contact-list {
    list-style: none; margin-top: 40px;
    display: flex; flex-direction: column; gap: 16px;
  }

  .contact-list li { display: flex; align-items: baseline; gap: 20px; }

  .contact-list .label {
    font-family: var(--avenir);
    font-size: 11px; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--gray-text);
    min-width: 80px;
  }

  .contact-list a, .contact-list span {
    font-family: var(--avenir);
    font-size: 15px; color: var(--black);
    text-decoration: none;
    border-bottom: 1px solid var(--gray-mid);
    padding-bottom: 1px;
  }
  .contact-list span { border-bottom: none; }
  .contact-list a:hover { border-color: var(--black); }

  /* FOOTER */
  footer {
    background: var(--black); color: var(--white);
    padding: 40px 0;
    display: flex; align-items: center;
    justify-content: center;
  }
  .footer-inner {
    max-width: 1400px;
    width: 100%;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
  }

  .footer-logo {
    font-family: var(--avenir);
    font-size: 20px; font-weight: 400;
    color: var(--white); cursor: pointer;
  }

  .footer-links { display: flex; gap: 36px; list-style: none; }

  .footer-links a {
    font-family: var(--avenir);
    font-size: 13px; color: var(--white);
    text-decoration: none; position: relative;
    padding-bottom: 2px; cursor: pointer;
  }

  .footer-links a.active::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0;
    width: 100%; height: 1px;
    background: var(--white);
  }

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

  /* YouTube lightbox */
  .yt-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 500;
    align-items: center;
    justify-content: center;
  }
  .yt-lightbox.open { display: flex; }
  .yt-lightbox-inner {
    position: relative;
    width: 90%;
    max-width: 900px;
    aspect-ratio: 16/9;
  }
  .yt-lightbox-inner iframe { width: 100%; height: 100%; border: none; }
  .yt-lightbox-close {
    position: absolute;
    top: -40px; right: 0;
    background: none; border: none;
    color: #fff; font-size: 28px;
    cursor: pointer; line-height: 1;
  }
  .yt-clickable { cursor: pointer; position: relative; }
  .yt-clickable::after {
    content: ''; position: absolute; inset: 0;
    background: rgba(0,0,0,0); transition: background 0.2s;
  }
  .yt-clickable:hover::after { background: rgba(0,0,0,0.15); }
  .proj-caption {
    font-family: var(--clother);
    font-size: 13px; color: var(--gray-text);
    margin-top: 6px; font-style: italic;
    width: 100%;
    display: block;
  }
  .proj-caption a {
    color: var(--gray-text);
    text-decoration: underline;
    text-decoration-color: var(--gray-mid);
    transition: color 0.2s, text-decoration-color 0.2s;
  }
  .proj-caption a:hover {
    color: var(--black);
    text-decoration-color: var(--black);
  }
  #proj-desc a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: var(--gray-mid);
    transition: text-decoration-color 0.2s;
  }
  #proj-desc a:hover {
    text-decoration-color: var(--black);
  }

  @media (max-width: 768px) {
    .nav-inner { padding: 0 20px; }
    .footer-inner { padding: 0 20px; flex-direction: column; gap: 20px; align-items: flex-start; }
    footer { padding: 32px 0; }
    .works-inner { padding: 40px 20px 72px; }
    .works-grid { grid-template-columns: repeat(2, 1fr); gap: 24px 16px; }
    .project-detail-body { padding: 32px 20px 0; }
    .project-hero { max-height: 260px !important; }
    .project-hero img { max-height: 260px !important; }
    .text-view { padding: 40px 20px 72px; }
    .proj-nav-arrows { padding: 24px 20px 48px; }
    .back-btn { font-size: 13px; }
    h1 { font-size: 24px; }

    /* Stack text and images vertically */
    .project-detail-grid {
      display: flex !important;
      flex-direction: column !important;
    }
    .proj-text-block { order: 1; }
    .proj-meta-block { order: 2; margin-top: 24px; border-top: 1px solid var(--gray-mid); padding-top: 20px; }
    .project-images {
      display: flex !important;
      flex-direction: column !important;
      order: 3;
      margin-top: 32px;
    }

    /* Reflow absolute image rows */
    .proj-img-row {
      position: relative !important;
      display: flex !important;
      flex-direction: column !important;
      height: auto !important;
      min-height: auto !important;
      gap: 16px !important;
      margin-top: 24px !important;
    }
    .proj-img-row > div[style*="position:absolute"],
    .proj-img-row > div[style*="position: absolute"] {
      position: relative !important;
      top: auto !important;
      left: auto !important;
      right: auto !important;
      bottom: auto !important;
      width: 100% !important;
      margin-top: 0 !important;
    }
    .proj-img-row > div[style*="position:absolute"] img,
    .proj-img-row > div[style*="position: absolute"] img {
      width: 100% !important;
      height: auto !important;
      aspect-ratio: 4/3 !important;
      object-fit: cover !important;
    }
    .proj-img-row > div[style*="position:absolute"] video,
    .proj-img-row > div[style*="position: absolute"] video {
      width: 100% !important;
      height: auto !important;
      aspect-ratio: 16/9 !important;
    }
    /* Hide background rectangle on mobile */
    .proj-img-row > div[style*="inset:0"] {
      display: none !important;
    }
    /* Remove gray background from image containers on mobile */
    .proj-img-row > div {
      background: transparent !important;
    }
    /* Images on mobile — natural ratio, max height */
    .proj-img-row > div[style*="position:absolute"] {
      aspect-ratio: unset !important;
      max-height: 400px !important;
      overflow: hidden !important;
    }
    .proj-img-row > div[style*="position:absolute"] img {
      width: 100% !important;
      height: auto !important;
      max-height: 400px !important;
      object-fit: contain !important;
      aspect-ratio: unset !important;
    }
    .proj-img-row > div[style*="position:absolute"] video {
      width: 100% !important;
      height: auto !important;
      max-height: 400px !important;
      aspect-ratio: unset !important;
    }
  }

  @media (max-width: 500px) {
    .works-grid { grid-template-columns: 1fr; }
    .nav-links { gap: 20px; }
    .nav-logo { font-size: 20px; }
    .nav-links a { font-size: 14px; }
  }

  .play-btn-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: opacity 0.2s;
  }
  .video-playing .play-btn-overlay { opacity: 0; }

  .proj-nav-arrows {
    max-width: 1080px;
    width: 100%;
    margin: 0 auto;
    padding: 32px 48px 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e0e0e0;
  }
  .proj-nav-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--clother);
    font-size: 13px;
    color: var(--gray-text);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    transition: color 0.2s;
  }
  .proj-nav-btn:hover { color: #000; }
  .proj-nav-btn .arrow { font-size: 18px; }

  /* ABOUT layout with photo */
  .about-view {
    max-width: 1080px;
    margin: 0 auto;
    padding: 72px 48px 96px;
    width: 100%;
    display: flex;
    gap: 72px;
    align-items: flex-start;
  }

  .about-photo-col {
    flex: 0 0 220px;
  }

  .about-photo {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    object-position: center top;
    display: block;
  }

  .about-text-col {
    flex: 1;
    padding-top: 8px;
  }

  .about-text-col h1 {
    font-family: var(--avenir);
    font-size: 38px; font-weight: 400;
    line-height: 1.1; margin-bottom: 32px;
  }

  .about-text-col p {
    font-family: var(--clother);
    font-size: 16px; line-height: 1.75;
    color: var(--gray-text); margin-bottom: 20px;
  }

  @media (max-width: 768px) {
    .about-view {
      flex-direction: column;
      padding: 40px 20px 72px;
      gap: 36px;
    }
    .about-photo-col {
      flex: none;
      width: 100%;
      max-width: 320px;
    }
  }
