/* =========================================
   COLOR SYSTEM
========================================= */
:root {
  --bg-color: #0f0f0f;
  --text-color: #f5f5f5;
  --accent-color: #b5b5b5;
}

/* =========================================
   BASE
========================================= */
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  background-color: var(--bg-color);
  color: var(--text-color);
  -webkit-touch-callout: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* =========================================
   LINK RESET
========================================= */
a,
a:visited,
a:hover,
a:active {
  text-decoration: none !important;
  color: var(--text-color) !important;
}

/* =========================================
   TOP NAVIGATION
========================================= */
.top-nav {
  position: relative;
  width: 100%;
  padding: 80px 60px;
  display: flex;
  align-items: center;
}

.site-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Playfair Display', serif;
  font-size: 58px;
  font-weight: 400;
  letter-spacing: 1px;
  color: var(--text-color);
}

.desktop-nav {
  margin-left: auto;
  display: none;
  flex-direction: column;
  gap: 10px;
  text-align: right;
}

.desktop-nav a {
  font-size: 16px;
  letter-spacing: 2px;
  font-weight: 400;
  transition: color 0.3s ease;
}

.desktop-nav a:hover,
.dropdown-menu a:hover {
  color: var(--accent-color);
}

.menu-icon {
  margin-left: auto;
  font-size: 28px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.menu-icon.open {
  transform: rotate(180deg);
}

/* =========================================
   MOBILE DROPDOWN
========================================= */
.dropdown-menu {
  padding: 0 60px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-menu.open {
  max-height: 300px;
  margin-bottom: 40px;
}

/* =========================================
   PHOTO SYSTEM
========================================= */
.photo-feed {
  display: flex;
  flex-direction: column;
  gap: 140px;
  padding: 0 60px 140px;
  max-width: 1400px;
  margin: 0 auto;
}

.row {
  display: grid;
  gap: 40px;
}

/* THREE LAYOUT */
.three-layout {
  grid-template-columns: 2fr 1fr;
  grid-template-rows: auto auto;
}

.three-layout .portrait {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.three-layout .square:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
}

.three-layout .square:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
}

/* INVERTED */
.three-layout.inverted {
  grid-template-columns: 1fr 2fr;
  grid-template-rows: auto auto;
}

.three-layout.inverted .portrait {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.three-layout.inverted .top-square {
  grid-column: 1;
  grid-row: 1;
}

.three-layout.inverted .bottom-square {
  grid-column: 1;
  grid-row: 2;
}

/* RATIOS */
.portrait,
.square,
.wide {
  position: relative;
  overflow: hidden;
}

.portrait { aspect-ratio: 2 / 3; }
.square   { aspect-ratio: 1 / 1; }
.wide     { aspect-ratio: 16 / 9; }

/* IMAGES */
.photo-feed img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* SHUFFLE */
.shuffle {
  position: relative;
}

.shuffle img {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.01);
  transition:
    opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1),
    transform 6s ease-out;
}

.shuffle img.active {
  opacity: 1;
  transform: scale(1);
}

/* =========================================
   DESKTOP NAV VISIBILITY
========================================= */
@media (min-width: 900px) {
  .menu-icon { display: none; }
  .desktop-nav { display: flex; }
  .dropdown-menu { display: none; }
}

/* =========================================
   MID DESKTOP COLLAPSE
========================================= */
@media (max-width: 1100px) and (min-width: 901px) {

  .three-layout,
  .three-layout.inverted {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .three-layout *,
  .three-layout.inverted * {
    grid-column: auto !important;
    grid-row: auto !important;
  }
}

/* =========================================
   MOBILE STACKING
========================================= */
@media (max-width: 900px) {

  .three-layout,
  .three-layout.inverted {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .three-layout *,
  .three-layout.inverted * {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  .photo-feed {
    gap: 80px;
    padding: 0 30px 80px;
  }

  .site-title {
    font-size: 38px;
    line-height: 1.1;
  }
}

/* =========================================
   IMAGE PROTECTION
========================================= */
img {
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  pointer-events: auto;
}