html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #ffffff;
  color: #111;
  font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 11px;
  line-height: 1.45;
  overflow-x: hidden;
}

/* Sticky Header */
header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  width: 100%;
  min-height: 64px;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  box-sizing: border-box;
  z-index: 100;
}

h1 {
  margin: 0;
  font-family: 'Satoshi', -apple-system, sans-serif;
  font-size: 11px;
  font-weight: normal;
  line-height: 1;
  flex: 1;
}

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

/* Centered Active Project Title & Info in Header (Desktop) */
.header-project-title {
  font-family: 'Satoshi', -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  flex: 2;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 12px;
  transition: opacity 0.3s ease;
}

nav {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  font-family: 'Satoshi', -apple-system, sans-serif;
}

nav a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  padding-bottom: 2px;
}

/* Smooth Underline Transition */
nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: #111;
  transition: width 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}

nav a:hover::after,
nav a.active::after {
  width: 100%;
  opacity: 1;
}

/* -------------------------------------------------------------
   WORKS DROPDOWN / ACCORDION SUB-MENU
------------------------------------------------------------- */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  left: auto;
  background-color: #ffffff;
  min-width: 260px;
  padding: 8px 0;
  z-index: 200;
  border: 1px solid #111111;
  box-shadow: none;
  text-align: left;
  border-radius: 3px;
  font-family: 'Satoshi', -apple-system, sans-serif;
}

.dropdown-menu a {
  color: #111;
  padding: 6px 16px;
  text-decoration: none;
  display: block;
  font-size: 11px;
  line-height: 1.4;
  white-space: nowrap;
  transition: background 0.2s ease;
}

.dropdown-menu a::after {
  display: none;
}

.dropdown-menu a:hover {
  background-color: #f7f7f7;
}

/* Desktop Hover Behavior */
@media (min-width: 901px) {
  .nav-dropdown:hover .dropdown-menu {
    display: block;
  }
}

/* -------------------------------------------------------------
   Tab Section Containers
------------------------------------------------------------- */
.view-section {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  display: none;
}

.view-section.active {
  display: block;
  opacity: 1;
  visibility: visible;
}

/* -------------------------------------------------------------
   WORKS VIEW: Homepage Feed
------------------------------------------------------------- */
#works-carousel {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 8px 16px 40px;
  box-sizing: border-box;
}

.feed-container {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
  width: 100%;
}

.feed-card {
  position: relative;
  width: 100%;
  height: 58vh;
  min-height: 360px;
  cursor: pointer;
  overflow: hidden;
  background-color: #f0f0f0;
  border-radius: 3px;
}

/* Item 1: Hermès (Full Width) */
.feed-card:nth-child(1) {
  grid-column: span 12;
  height: 80vh;
  max-height: 80vh;
}

/* Items 2 & 3: Selfridges MTM & Tiffany (Row of 2) */
.feed-card:nth-child(2),
.feed-card:nth-child(3) {
  grid-column: span 6;
  height: 65vh;
}

/* Item 4: Tommy Hilfiger (Full Width) */
.feed-card:nth-child(4) {
  grid-column: span 12;
  height: 78vh;
  max-height: 82vh;
}

/* Items 5, 6 & 7: Disney, Art Block, Data Visualisation (Row of 3) */
.feed-card:nth-child(5),
.feed-card:nth-child(6),
.feed-card:nth-child(7) {
  grid-column: span 4;
  height: 72vh;
  min-height: 680px;
}

/* Items 8 & 9: Moncler & Jo Malone (Row of 2) */
.feed-card:nth-child(8),
.feed-card:nth-child(9) {
  grid-column: span 6;
  height: 65vh;
}

.feed-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 3px;
}

.feed-card-caption {
  position: absolute;
  bottom: 12px;
  left: 16px;
  right: 16px;
  color: #ffffff;
  font-family: 'Satoshi', -apple-system, sans-serif;
  pointer-events: none;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  min-height: 48px;
  margin-bottom: -2px;
}

.feed-card-caption .project-name {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0em;
}

.feed-card-caption .project-meta {
  font-size: 11px;
  font-weight: 400;
  color: #ffffff;
  opacity: 0.9;
  line-height: 1.1;
}

@media (min-width: 901px) {
  .feed-card-caption .project-name {
    font-size: 19px;
  }
  .feed-card-caption .project-meta {
    font-size: 13px;
  }
}

/* -------------------------------------------------------------
   PERSONAL VIEW: Desktop 2-Column Grid
------------------------------------------------------------- */
#personal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 60px 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 40px 60px;
}

.artwork {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.artwork img,
.artwork video {
  display: block;
  width: 100%;
  max-width: 580px;
  max-height: 70vh;
  height: auto;
  object-fit: contain;
  border-radius: 3px;
}

/* -------------------------------------------------------------
   PROJECT DETAIL PAGE
------------------------------------------------------------- */
.project-container {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 8px 16px 60px;
  box-sizing: border-box;
}

.project-media-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
  margin-bottom: 24px;
  width: 100%;
}

.project-grid-item {
  position: relative;
  width: 100%;
  height: 58vh;
  min-height: 360px;
  overflow: hidden;
  background-color: #f0f0f0;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 3px;
}

.project-grid-item.featured {
  grid-column: span 12;
  height: 78vh;
  max-height: 82vh;
}

.project-grid-item.featured video,
.project-grid-item.featured img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: 3px;
}

.project-grid-item:not(.featured) {
  grid-column: span 6;
  height: 65vh;
}

.project-grid-item video,
.project-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 3px;
}

.project-grid-text {
  grid-column: span 12;
  max-width: 1080px;
  margin: 50px auto;
  padding: 10px 24px;
  font-family: 'Satoshi', -apple-system, sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.05;
  color: #111;
  text-align: center;
  background-color: transparent;
  box-sizing: border-box;
}

.project-credits-section {
  max-width: 520px;
  margin: 40px auto 0 auto;
  padding: 0 24px;
  font-family: 'Satoshi', -apple-system, sans-serif;
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
  color: #111;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.project-role-line {
  font-weight: 500;
}

.project-collab-line {
  color: #555;
}

/* -------------------------------------------------------------
   GLOBAL ABOUT SECTION (FOOTER)
------------------------------------------------------------- */
#about {
  max-width: 520px;
  margin: 40px auto 60px auto;
  padding: 20px 24px 0 24px;
  font-family: 'Satoshi', -apple-system, sans-serif;
  font-size: 11px;
  text-align: center;
  line-height: 1.45;
}

#about p {
  margin: 0 0 8px 0;
}

#about a {
  color: #111;
  text-decoration: none;
}

#about a:hover {
  text-decoration: underline;
}

/* -------------------------------------------------------------
   MOBILE RESPONSIVE (max-width: 900px)
------------------------------------------------------------- */
@media (max-width: 900px) {
  header {
    height: auto;
    padding: 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .header-project-title {
    display: none;
  }

  nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  nav::-webkit-scrollbar {
    display: none;
  }

  .nav-dropdown {
    position: static;
    display: inline-block;
  }

  .dropdown-menu {
    position: fixed;
    top: 60px;
    left: 16px;
    right: 16px;
    width: auto;
    min-width: auto;
    border: 1px solid #111;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  }

  .dropdown-menu.mobile-open {
    display: block;
  }

  #works-carousel,
  .project-container {
    padding: 6px 12px;
  }

  .feed-container,
  .project-media-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .feed-card,
  .feed-card:nth-child(n) {
    grid-column: span 1 !important;
    height: calc(50vh - 36px) !important;
    min-height: 240px !important;
  }

  .project-grid-item,
  .project-grid-item.featured,
  .project-grid-item:not(.featured) {
    grid-column: span 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: auto !important;
    background: transparent !important;
  }

  .project-grid-item video,
  .project-grid-item img,
  .project-grid-item.featured video,
  .project-grid-item.featured img {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
  }

  .project-grid-text {
    grid-column: span 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 30px 0 !important;
    padding: 0 16px !important;
    font-size: 13px !important;
    text-align: center !important;
  }

  .project-credits-section {
    padding: 0 18px;
  }

  #personal-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 10px 18px;
    margin-bottom: 20px;
  }

  .artwork {
    width: 100%;
    display: block;
  }

  .artwork img,
  .artwork video {
    width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    height: auto !important;
  }

  #about {
    margin: 20px auto 30px auto;
    padding: 10px 18px 0 18px;
  }
}

/* -------------------------------------------------------------
   PROJECT PAGES (homepage cards are now real links)
------------------------------------------------------------- */
a.feed-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

/* Phones: reserve space for each image/video until it has loaded, so only what's
   near the screen is downloaded (and the page doesn't jump as things arrive).
   'auto' switches to the file's real proportions as soon as they're known. */
@media (max-width: 900px) {
  .project-grid-item img,
  .project-grid-item video {
    aspect-ratio: auto 4 / 3;
  }
}
