/* ===================================================
   Noire — Responsive Stylesheet
   =================================================== */

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

:root {
  /* Noire — Palette */
  --black: hsl(0 0% 4%);
  --dark: hsl(0 0% 8%);
  --gray-dark: hsl(0 0% 16%);
  --gray: hsl(0 0% 40%);
  --gray-light: hsl(0 0% 65%);
  --off-white: hsl(45 12% 90%);
  --white: hsl(45 10% 96%);

  /* Semantic Colors */
  --background: var(--black);
  --surface: var(--dark);

  --text-primary: var(--white);
  --text-secondary: var(--gray-light);
  --text-muted: var(--gray);

  --border: var(--gray-dark);

  --accent: var(--off-white);
}

body {
  background-color: var(--background);
  color: var(--off-white);
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  margin: 0;
  overflow-x: hidden; /* guards against scaled header edges */
}

/* ===================
   Header
   =================== */

header {
  width: 100%;
  scale: 50%;
  transition: scale 800ms ease;
}

.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: clamp(0.5rem, 1.5vw, 1rem);
  margin: 0;
  border-radius: 10px;
  background-color: var(--black);
}

.logo {
  width: clamp(32px, 4.5vw, 50px);
  height: auto;
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: clamp(0.4rem, 1.2vw, 1rem);
  padding: clamp(0.75rem, 2vw, 1.25rem) clamp(0.75rem, 2vw, 1.25rem);
  font-size: clamp(1.1rem, 3vw, 2.5rem);
  line-height: 1.1;
  min-width: 0; /* lets the text shrink instead of pushing nav off-screen */
}

.header-left span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-bar {
  display: flex;
  align-items: center;
  gap: clamp(0.25rem, 0.8vw, 0.75rem);
  margin: 0 clamp(0.5rem, 2vw, 2.5rem) 0 0;
  font-size: clamp(0.85rem, 1.4vw, 1.6rem);
}

.nav-bar a {
  display: flex;
  align-items: center;
  color: var(--gray-light);
  text-decoration: none;
  height: clamp(48px, 8vh, 100px);
  padding: 0 clamp(0.5rem, 1.2vw, 0.75rem);
  border-radius: 8px;
  white-space: nowrap;
  transition: background-color 200ms ease;
}

/* ===================
   Main
   =================== */

main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  background-color: var(--dark);
  padding: clamp(2.5rem, 7vw, 6.25rem) 0 0 0;
}

/* ===================
   Hero
   =================== */

.hero-scene {
  height: 300vh;
  position: relative;
}

.hero {
  height: 100vh;
  width: 100%;
  position: sticky;
  top: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;

  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  width: min(90%, 700px);
  padding: 0 clamp(0.5rem, 3vw, 2rem);

  opacity: 0;
  filter: blur(10px);
}

.hero-content h1 {
  font-size: clamp(1.4rem, 5vw, 3.25rem);
  line-height: 1.1;
  margin: 0.5rem 0;
}

.hero-content p {
  font-size: clamp(0.8rem, 1.6vw, 1.05rem);
  color: var(--gray-light);
  margin: 0;
}

.hero .logo {
  width: clamp(100px, 22vw, 250px);
  height: auto;
  aspect-ratio: 1 / 1;
}

.hero .hero-image {
  width: min(95%, 1400px);
  height: auto;
  object-fit: cover;
  border-radius: 10px;
  scale: 1;
  opacity: 1;
  filter: blur(0);
}

/* ===================
   Descriptor
   =================== */

.descriptor {
  display: flex;
  justify-content: center;
  align-items: center;

  width: min(92%, 1200px);
  margin: clamp(1.5rem, 4vw, 3rem) auto 0;
  border-radius: 10px;

  padding: clamp(1rem, 3vw, 1.5rem);
  background-color: var(--black);
}

.descriptor h2 {
  font-size: clamp(1.1rem, 3vw, 2rem);
  margin: 0;
}

/* ===================
   Selected Work
   =================== */

.selected-work {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 clamp(0.5rem, 2.5vw, 2rem);
}

.image-container {
  width: min(100%, 1400px);
  border-radius: 20px;
  padding: clamp(0.5rem, 2vw, 1.5rem);
  margin: 0 0 clamp(3rem, 8vw, 6.25rem) 0;
}

.photo-group {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.75rem, 2.5vw, 5rem);
  padding: clamp(0.5rem, 1.5vw, 1rem);
  margin-bottom: clamp(0.75rem, 2.5vw, 3rem);
}

.photo-group img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  scale: 50%;
  opacity: 0;
  transition:
    scale 800ms ease,
    opacity 800ms ease;
}

.photo-group img:nth-child(3) {
  grid-column: 1 / -1;
  transform: translateY(0);
}

/* ===================
   Footer
   =================== */

.footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: clamp(0.5rem, 2vw, 1.5rem);
  flex-wrap: wrap;

  background-color: var(--black);
  border-radius: 10px;
  min-height: clamp(60px, 10vh, 100px);
  padding: clamp(0.5rem, 2vw, 1rem) clamp(1rem, 4vw, 3rem);
}

.contact-info {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.contact-info a {
  display: flex;
  align-items: center;
  color: var(--off-white);
  text-decoration: none;

  padding: 0 clamp(0.5rem, 1.5vw, 0.75rem);
  height: clamp(48px, 10vh, 100px);

  font-size: clamp(0.8rem, 1.4vw, 1rem);

  transition: background-color 200ms ease;
}

.copyright {
  font-size: clamp(0.75rem, 1.2vw, 0.95rem);
  color: var(--gray-light);
}

/* ===================
   Animation
   =================== */

.observe.show {
  scale: 100%;
  opacity: 1;
}

a:hover {
  background-color: var(--gray-dark);
}

/* ===================================================
   Responsive — Mobile tuning (≤ 640px)
   =================================================== */

@media (max-width: 640px) {
  /* shorter scroll journey = tighter hero animation feel */
  .hero-scene {
    height: 250vh;
  }

  /* keep the "1 + 2" layout but stack image 1 on top */
  .photo-group img:nth-child(3) {
    grid-column: 1 / -1;
  }

  .footer-bar {
    justify-content: center;
    text-align: center;
  }

  .contact-info {
    justify-content: center;
    width: 100%;
  }

  .copyright {
    width: 100%;
    text-align: center;
    padding: 0 0 0.75rem;
  }
}

/* ===================================================
   Very small phones (≤ 380px) — tighter header
   =================================================== */

@media (max-width: 380px) {
  .header-left {
    font-size: 1rem;
    padding: 0.6rem 0.6rem;
  }

  .nav-bar {
    margin-right: 0.4rem;
    gap: 0.15rem;
  }

  .nav-bar a {
    padding: 0 0.35rem;
    font-size: 0.78rem;
  }

  .logo {
    width: 28px;
  }
}

/* ===================================================
   Reduced motion
   =================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}