/* ===================================
   ARCHITECTURE PHOTOGRAPHER PORTFOLIO
   Design System & Shared Styles
   =================================== */

/* CSS Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  width: 100%;
}

body {
  font-family: 'Corbel', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  color: #000;
  background-color: #fff;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ===================================
   CSS Custom Properties
   =================================== */
:root {
  /* Colors */
  --color-black: #000000;
  --color-white: #ffffff;
  --color-pink: #fbceff;
  --color-gray: #888888;
  --color-gray-light: #cccccc;
  --color-gray-dark: #444444;

  /* Typography */
  --font-family: 'Corbel', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-bold: 700;

  /* Spacing */
  --header-height: 60px;
  --drawer-width: 250px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-medium: 0.4s ease;
  --transition-slow: 0.8s ease;

  /* Breakpoints (for reference, used in media queries) */
  /* Desktop: > 1024px */
  /* Tablet: 768px - 1024px */
  /* Mobile: < 768px */
}

/* ===================================
   Typography Classes
   =================================== */
.font-light {
  font-weight: var(--font-weight-light);
}

.font-regular {
  font-weight: var(--font-weight-regular);
}

.font-bold {
  font-weight: var(--font-weight-bold);
}

/* ===================================
   Shared Header Styles
   =================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 92px;
  background-color: var(--color-white);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  z-index: 100;
}

.header-name {
  font-size: 1.7rem;
  letter-spacing: 0.05em;
}

.header-name .first-name {
  font-weight: var(--font-weight-regular);
}

.header-name .last-name {
  font-weight: var(--font-weight-bold);
}

/* Desktop Navigation */
.header-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.header-nav a {
  color: var(--color-black);
  text-decoration: none;
  font-weight: var(--font-weight-regular);
  font-size: 1.5rem;
  transition: color var(--transition-fast);
}

.header-nav a:hover {
  color: var(--color-gray-dark);
}

.header-nav a.active {
  font-weight: var(--font-weight-bold);
}

.header-nav .nav-icon {
  display: flex;
  align-items: center;
}

.header-nav .nav-icon img {
  width: 20px;
  height: 20px;
}

/* Mobile Menu Button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}

.menu-toggle img {
  width: 24px;
  height: 24px;
}

/* ===================================
   Menu Drawer (Mobile)
   =================================== */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-medium), visibility var(--transition-medium);
  z-index: 200;
}

.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: var(--drawer-width);
  height: 100%;
  background-color: var(--color-black);
  transform: translateX(100%);
  transition: transform var(--transition-medium);
  z-index: 201;
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.drawer.active {
  transform: translateX(0);
}

.drawer-close {
  align-self: flex-end;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}

.drawer-close img {
  width: 24px;
  height: 24px;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 30px;
  margin-top: 60px;
  flex: 1;
}

.drawer-nav a {
  color: var(--color-white);
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: var(--font-weight-regular);
  transition: color var(--transition-fast);
}

.drawer-nav a:hover {
  color: var(--color-gray-light);
}

.drawer-nav a.active {
  font-weight: var(--font-weight-bold);
}

.drawer-nav .nav-icon img {
  width: 24px;
  height: 24px;
}

.drawer-logo {
  position: absolute;
  bottom: 0;
  right: 0;
  margin: 0;
  padding: 0;
  line-height: 0;
  /* Remove potential inline-block gap */
}

.drawer-logo img {
  width: 120px;
  display: block;
}

/* ===================================
   Background Logo
   =================================== */
.bg-logo {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 120px;
  height: auto;
  z-index: -1;
  pointer-events: none;
}

/* ===================================
   Intro Page Styles
   =================================== */
.intro-container {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: flex;
  overflow: hidden;
  cursor: pointer;
}

.intro-sidebar {
  width: 20%;
  min-width: 200px;
  height: 100%;
  background-color: var(--color-white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

.intro-logo {
  width: 120px;
  height: auto;
}

.intro-name {
  position: absolute;
  bottom: 40px;
  text-align: center;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
}

.intro-name .first-name {
  font-weight: var(--font-weight-regular);
}

.intro-name .last-name {
  font-weight: var(--font-weight-bold);
}

.intro-background {
  flex: 1;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.intro-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity var(--transition-slow);
}

.intro-slide.active {
  opacity: 1;
}

/* Logo Animation Layers */
.logo-container {
  position: relative;
  width: 120px;
  height: 62px;
}

.logo-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.logo-layer.black {
  animation: fadeInLogo 0.5s ease forwards;
  animation-delay: 0s;
}

.logo-layer.white {
  animation: fadeInLogo 0.5s ease forwards;
  animation-delay: 0.5s;
}

.logo-layer.pink {
  animation: fadeInLogo 0.5s ease forwards;
  animation-delay: 1s;
}

@keyframes fadeInLogo {
  to {
    opacity: 1;
  }
}

/* Negative logo animation on click */
.intro-container.clicked .logo-layer.black,
.intro-container.clicked .logo-layer.white {
  animation: invertColors 0.3s ease forwards;
}

@keyframes invertColors {
  to {
    filter: invert(1);
  }
}

/* ===================================
   Gallery Thumbnails Styles
   =================================== */
.gallery-container {
  padding-top: calc(80px + 40px);
  padding-bottom: 60px;
  padding-left: 40px;
  padding-right: 40px;
  min-height: 100vh;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.gallery-item {
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {

  .gallery-item:hover~.gallery-item,
  .gallery-grid:has(.gallery-item:hover) .gallery-item:not(:hover) {
    filter: blur(5px);
    transition: filter var(--transition-fast);
  }
}

.gallery-thumbnail {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
}

.gallery-info {
  margin-top: 10px;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.gallery-info .architect {
  font-weight: var(--font-weight-regular);
}

.gallery-info .separator {
  margin: 0 5px;
}

.gallery-info .separator .sep-regular {
  font-weight: var(--font-weight-regular);
}

.gallery-info .separator .sep-light {
  font-weight: var(--font-weight-light);
}

.gallery-info .project {
  font-weight: var(--font-weight-light);
}

.header-name a {
  color: inherit;
  text-decoration: none;
}

/* ===================================
   Fullscreen Gallery Styles
   =================================== */
.fullscreen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--color-white);
  z-index: 300;
  display: none;
  flex-direction: column;
}

.fullscreen-overlay.active {
  display: flex;
}

.fullscreen-photo-container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.fullscreen-photo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  opacity: 1;
  transition: opacity var(--transition-medium);
  pointer-events: none;
}

.fullscreen-photo.fade-out {
  opacity: 0;
}

/* Click zones for navigation */
.fullscreen-click-zone {
  position: absolute;
  top: 0;
  bottom: 80px;
  width: 50%;
  z-index: 10;
}

.fullscreen-click-zone.left {
  left: 0;
  cursor: url('icons/left_black.svg') 16 16, w-resize;
}

.fullscreen-click-zone.right {
  right: 0;
  cursor: url('icons/right_black.svg') 16 16, e-resize;
}

.fullscreen-controls {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: flex-end;
  pointer-events: none;
}

.fullscreen-info {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  pointer-events: none;
}

.fullscreen-info .architect {
  font-weight: var(--font-weight-regular);
}

.fullscreen-info .separator {
  margin: 0 3px;
}

.fullscreen-info .project {
  font-weight: var(--font-weight-light);
}

.fullscreen-nav {
  display: flex;
  gap: 15px;
}

.fullscreen-nav button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  transition: opacity var(--transition-fast);
  pointer-events: auto;
}

.fullscreen-nav button:hover {
  opacity: 0.5;
}

.fullscreen-nav button:disabled {
  cursor: default;
}

.fullscreen-nav button img {
  width: 24px;
  height: 24px;
}

/* ===================================
   Contact Page Styles
   =================================== */
.contact-container {
  min-height: 100vh;
  padding-top: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: calc(80px + 40px) 40px 150px;
}

.contact-content {
  display: flex;
  gap: 10%;
  width: 30%;
  min-width: 600px;
}

.contact-left {
  flex: 6;
}

.contact-right {
  flex: 3;
}

.contact-photo {
  width: 100%;
  display: block;
}

.contact-bio {
  margin-top: 20px;
  font-weight: var(--font-weight-light);
  text-align: justify;
  font-size: 0.9rem;
  line-height: 1.7;
}

.contact-logo {
  width: 80px;
  margin-bottom: 30px;
}

.contact-title {
  margin-bottom: 20px;
}

.contact-title .name {
  font-size: 1.3rem;
}

.contact-title .first-name {
  font-weight: var(--font-weight-regular);
}

.contact-title .last-name {
  font-weight: var(--font-weight-bold);
}

.contact-title .subtitle {
  font-weight: var(--font-weight-light);
  font-size: 0.9rem;
  color: var(--color-gray-dark);
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: var(--font-weight-light);
  font-size: 0.9rem;
}

.contact-item img {
  width: 18px;
  height: 18px;
}

.contact-item a {
  color: var(--color-black);
  text-decoration: none;
}

.contact-item a:hover {
  color: var(--color-gray-dark);
}

/* ===================================
   Responsive Breakpoints
   =================================== */

/* Widescreen (> 1400px) */
@media (min-width: 1400px) {

  .gallery-container,
  .header {
    padding-left: 100px;
    padding-right: 100px;
  }
}

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-content {
    width: 60%;
    min-width: 500px;
  }
}

/* Small Tablet (600px - 768px) */
@media (max-width: 768px) {
  .header {
    padding: 0 20px;
  }

  .header-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .gallery-container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .contact-content {
    width: 80%;
    min-width: auto;
    flex-direction: column;
    gap: 30px;
  }

  .contact-right {
    order: -1;
  }

  .fullscreen-info {
    writing-mode: horizontal-tb;
    transform: none;
  }
}

/* Mobile (< 600px) */
@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .contact-content {
    width: 90%;
  }

  /* Intro vertical mode */
  .intro-container {
    flex-direction: column-reverse;
  }

  .intro-sidebar {
    width: 100%;
    min-width: auto;
    height: 120px;
    min-height: auto;
    flex: 0 0 auto;
  }

  .intro-background {
    width: 100%;
    height: auto;
    flex: 1;
  }

  .intro-name {
    display: none;
  }
}

/* Horizontal/Vertical mode detection for intro */
@media (orientation: landscape) and (min-width: 768px) {
  .intro-container {
    flex-direction: row;
  }
}

@media (orientation: portrait),
(max-width: 767px) {
  .intro-container {
    flex-direction: column-reverse;
  }

  .intro-sidebar {
    width: 100%;
    min-width: auto;
    height: 120px;
    min-height: auto;
    flex: 0 0 auto;
  }

  .intro-background {
    width: 100%;
    height: auto;
    flex: 1;
  }

  .intro-name {
    display: none;
  }
}