/* ============================================
   GLENN ROTHWELL — Portfolio
   Faithful recreation of Squarespace Montauk
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-bg: #ffffff;
  --color-text: #272727;
  --color-nav: #111;
  --color-nav-light: #fff;
  --color-link-hover: #111;
  --font-heading: 'Jost', 'Futura', 'Futura PT', 'Helvetica Neue', sans-serif;
  --font-body: 'Jost', 'Proxima Nova', 'Helvetica Neue', Arial, sans-serif;
  --nav-height: 100px;
  --transition: 0.3s ease;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.6em;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 50px 50px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  transition: background var(--transition);
}

.nav--scrolled {
  background: rgba(255, 255, 255, 0.97);
  padding-top: 20px;
}

.nav--dark .nav__logo,
.nav--dark .nav__links {
  background: #fff;
  color: #222;
  padding: 12px 20px;
}

.nav--transparent {
  color: #fff;
}

.nav--transparent.nav--scrolled {
  background: rgba(0, 0, 0, 0.35);
}

.nav--dark.nav--scrolled {
  background: rgba(255, 255, 255, 0.97);
}

.nav--dark.nav--scrolled .nav__logo,
.nav--dark.nav--scrolled .nav__links {
  background: transparent;
  padding: 0;
}

.nav__logo {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 8px;
}

.nav__link {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.5px;
  position: relative;
  padding: 4px 0;
  cursor: pointer;
}

.nav__dropdown-trigger::before {
  content: "+";
  margin-right: 6px;
}

.nav__link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.nav__link--active {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.nav__social {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: 20px;
}

.nav__social a {
  color: inherit;
  display: inline-flex;
  transition: opacity var(--transition);
}

.nav__social a:hover {
  opacity: 0.6;
}

.nav__social svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Dropdown */
.nav__dropdown {
  position: relative;
}

.nav__dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 0;
}

.nav__dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  min-width: 180px;
  padding: 10px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}

.nav__dropdown:hover .nav__dropdown-menu {
  opacity: 1;
  visibility: visible;
}

.nav__dropdown-menu a {
  display: block;
  padding: 6px 20px;
  font-family: var(--font-heading);
  font-size: 13px;
  letter-spacing: 0.5px;
  color: var(--color-nav);
  transition: opacity var(--transition);
  text-decoration: none !important;
}

.nav__dropdown-menu a:hover {
  opacity: 0.6;
}

/* Mobile nav */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px 0;
  background: none;
  border: none;
  color: inherit;
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: currentColor;
  transition: transform var(--transition), opacity var(--transition);
}

.nav__hamburger--active span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav__hamburger--active span:nth-child(2) {
  opacity: 0;
}

.nav__hamburger--active span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.nav__mobile {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  z-index: 999;
  padding: 100px 50px 50px;
  overflow-y: auto;
}

.nav__mobile--open {
  display: flex;
  flex-direction: column;
}

.nav__mobile a,
.nav__mobile-folder-trigger {
  display: block;
  font-family: var(--font-heading);
  font-size: 18px;
  letter-spacing: 0.5px;
  color: var(--color-text);
  padding: 10px 0;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-weight: 400;
}

.nav__mobile-folder-items {
  display: none;
  padding-left: 20px;
}

.nav__mobile-folder-items--open {
  display: block;
}

.nav__mobile-folder-items a {
  font-size: 13px;
  opacity: 0.7;
}

/* --- Hero / Fullscreen Slideshow --- */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #111;
}

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero__slide--active {
  opacity: 1;
}

.hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__slide a {
  display: block;
  width: 100%;
  height: 100%;
}

.hero__overlay {
  position: absolute;
  left: 50px;
  bottom: 50px;
  background: #fff;
  color: #222;
  padding: 14px 28px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 5;
}

.hero__slide--active .hero__overlay {
  opacity: 1;
}

.hero__category {
  font-family: var(--font-heading);
  font-size: 13px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #8a8a8a;
  font-weight: 400;
}

.hero__category::after {
  content: ' /';
  margin-left: 4px;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #222;
  margin: 0;
}

.hero__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  background: #fff;
  color: #222;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 10;
}

.hero:hover .hero__nav {
  opacity: 1;
}

.hero__nav--prev { left: 0; }
.hero__nav--next { right: 0; }

.hero__indicators {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.hero__indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background var(--transition);
  border: none;
  padding: 0;
}

.hero__indicator--active {
  background: #fff;
}

/* --- Page Content --- */
.page-content {
  padding: 50px;
  padding-top: 150px;
  max-width: 960px;
  margin: 0 auto;
}

.page-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: lowercase;
  margin-bottom: 30px;
}

/* --- About Page --- */
.about {
  display: flex;
  gap: 50px;
  align-items: flex-start;
  padding: 150px 50px 80px;
  max-width: 1100px;
  margin: 0 auto;
}

.about__image {
  flex: 1;
}

.about__image img {
  width: 100%;
}

.about__content {
  flex: 1;
  padding-top: 0;
}

.about__greeting {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 24px;
  text-transform: uppercase;
}

.about__text {
  font-size: 14px;
  line-height: 1.7em;
  color: var(--color-text);
  margin-bottom: 1.4em;
}

.about__text:last-child {
  margin-bottom: 0;
}

/* --- Project Detail Page --- */
.project-page {
  padding-top: var(--nav-height);
}

.project-title-block {
  text-align: center;
  padding: 60px 50px 30px;
}

.project-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: lowercase;
}

/* Gallery Slideshow */
.gallery-slideshow {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 50px;
}

.gallery-slideshow__main {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #f5f5f5;
}

.gallery-slideshow__slide {
  display: none;
  width: 100%;
}

.gallery-slideshow__slide--active {
  display: block;
}

.gallery-slideshow__slide img {
  width: 100%;
  height: auto;
  cursor: pointer;
}

.gallery-slideshow__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  border: none;
  padding: 15px 10px;
  cursor: pointer;
  font-size: 18px;
  z-index: 5;
  transition: background var(--transition);
}

.gallery-slideshow__nav:hover {
  background: rgba(0, 0, 0, 0.6);
}

.gallery-slideshow__nav--prev {
  left: 0;
}

.gallery-slideshow__nav--next {
  right: 0;
}

.gallery-slideshow__thumbs {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.gallery-slideshow__thumb {
  flex-shrink: 0;
  width: 80px;
  height: 55px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity var(--transition);
  border: none;
  padding: 0;
  background: none;
}

.gallery-slideshow__thumb--active {
  opacity: 1;
}

.gallery-slideshow__thumb:hover {
  opacity: 0.8;
}

.gallery-slideshow__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Project Description */
.project-description {
  max-width: 960px;
  margin: 0 auto;
  padding: 30px 50px 50px;
  font-size: 13px;
  line-height: 1.6em;
}

.project-description p {
  margin-bottom: 1em;
}

/* Project Video */
.project-video {
  max-width: 960px;
  margin: 0 auto 30px;
  padding: 0 50px;
}

.project-video__wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.project-video__wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.project-video__wrapper--portrait {
  padding-bottom: 177.78%;
}

/* --- Photography Gallery --- */
.photo-carousel {
  position: relative;
  height: 100vh;
  overflow: hidden;
  background: #fff;
}

.photo-carousel__track {
  display: flex;
  gap: 20px;
  height: 100%;
  padding: 140px 40px 80px;
  box-sizing: border-box;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.photo-carousel__track::-webkit-scrollbar { display: none; }
.photo-carousel__track.dragging { cursor: grabbing; scroll-behavior: auto; }

.photo-carousel__item {
  height: 100%;
  flex-shrink: 0;
}

.photo-carousel__item img {
  height: 100%;
  width: auto;
  display: block;
  object-fit: contain;
  pointer-events: none;
  -webkit-user-drag: none;
}

.photo-carousel__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  background: #111;
  color: #fff;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 10;
}

.photo-carousel:hover .photo-carousel__nav { opacity: 1; }

.photo-carousel__nav--prev { left: 0; }
.photo-carousel__nav--next { right: 0; }

/* --- Awards --- */
.awards {
  display: flex;
  gap: 50px;
  align-items: flex-start;
  padding: 150px 50px 80px;
  max-width: 1100px;
  margin: 0 auto;
}

.awards__image {
  flex: 1;
}

.awards__image img {
  width: 100%;
  display: block;
}

.awards__content {
  flex: 1;
}

.awards__title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 400;
  margin-bottom: 20px;
}

.awards-list__item {
  font-size: 14px;
  line-height: 1.7em;
  font-style: italic;
  margin-bottom: 0.3em;
  color: var(--color-text);
}

/* --- Contact Splash --- */
.contact-page {
  margin: 0;
  overflow: hidden;
}

.contact-splash {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #f5f5f5;
}

.contact-splash__map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #f5f5f5;
}

.contact-splash__copy {
  position: absolute;
  top: 60px;
  left: 60px;
  max-width: 520px;
  z-index: 2;
}

.contact-splash__title {
  font-family: var(--font-heading);
  font-size: 72px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  line-height: 1;
  margin: 0 0 32px;
  color: #111;
}

.contact-splash__subtitle {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0 0 20px;
  color: #111;
}

.contact-splash__text {
  font-size: 14px;
  line-height: 1.6em;
  color: #222;
  max-width: 420px;
  margin: 0;
}

.contact-splash__actions {
  position: absolute;
  top: 60px;
  right: 60px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 2;
}

.contact-splash__socials {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 6px;
}

.contact-splash__socials a {
  color: #111;
  display: inline-flex;
  transition: opacity var(--transition);
}

.contact-splash__socials a:hover { opacity: 0.6; }

.contact-splash__socials svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.contact-splash__btn {
  display: inline-block;
  padding: 14px 26px;
  background: #111;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
  transition: opacity var(--transition);
}

.contact-splash__btn:hover { opacity: 0.85; }

button.contact-splash__btn {
  border: 0;
  cursor: pointer;
}

/* --- Contact Modal --- */
.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}

.contact-modal--open {
  display: flex;
}

.contact-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.contact-modal__card {
  position: relative;
  background: #fff;
  padding: 40px 42px 32px;
  width: min(92vw, 480px);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.contact-modal__close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: transparent;
  border: 0;
  font-size: 28px;
  line-height: 1;
  color: #666;
  cursor: pointer;
  padding: 4px 8px;
}

.contact-modal__close:hover { color: #111; }

.contact-modal__title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin: 0 0 24px;
  color: #111;
}

.contact-modal__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-modal__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-modal__field span {
  font-family: var(--font-heading);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #666;
}

.contact-modal__field input,
.contact-modal__field textarea {
  font-family: var(--font-body);
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  background: #fafafa;
  color: #111;
  resize: vertical;
}

.contact-modal__field input:focus,
.contact-modal__field textarea:focus {
  outline: none;
  border-color: #111;
  background: #fff;
}

.contact-modal__honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.contact-modal__submit {
  align-self: flex-start;
  padding: 12px 28px;
  background: #111;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border: 0;
  cursor: pointer;
  transition: opacity var(--transition);
  margin-top: 8px;
}

.contact-modal__submit:hover { opacity: 0.85; }
.contact-modal__submit:disabled { opacity: 0.5; cursor: not-allowed; }

.contact-modal__status {
  margin-top: 16px;
  font-size: 13px;
  color: #666;
  min-height: 1em;
}

.contact-modal__status--success { color: #0a7c42; }
.contact-modal__status--error { color: #c0392b; }

@media (max-width: 700px) {
  .contact-splash__copy {
    top: 40px;
    left: 30px;
    right: 30px;
    max-width: none;
  }
  .contact-splash__title {
    font-size: 44px;
    margin-bottom: 20px;
  }
  .contact-splash__actions {
    position: static;
    padding: 20px 30px;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

/* --- Lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox--open {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox__close {
  position: absolute;
  top: 20px;
  right: 24px;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  background: none;
  border: none;
  font-weight: 300;
  line-height: 1;
  padding: 8px;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 20px;
  font-weight: 300;
  transition: opacity var(--transition);
}

.lightbox__nav:hover {
  opacity: 0.7;
}

.lightbox__nav--prev {
  left: 10px;
}

.lightbox__nav--next {
  right: 10px;
}

/* --- Footer --- */
.footer {
  padding: 50px;
  text-align: center;
  font-size: 11px;
  color: #999;
  letter-spacing: 0.5px;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .nav__links {
    display: none;
  }

  .nav__hamburger {
    display: flex;
  }

  .about {
    flex-direction: column;
    gap: 30px;
    padding-top: 120px;
  }

  .hero__title {
    font-size: 1.6rem;
  }
}

@media (max-width: 640px) {
  .nav {
    padding: 30px 30px 0;
  }

  .nav__logo {
    font-size: 1.5rem;
  }

  .about,
  .page-content,
  .project-description,
  .gallery-slideshow,
  .project-video,
  .awards {
    flex-direction: column;
    gap: 30px;
    padding: 120px 30px 60px;
  }

  .project-title-block {
    padding-left: 30px;
    padding-right: 30px;
  }

  .hero__title {
    font-size: 1.3rem;
  }

  .gallery-slideshow__thumb {
    width: 60px;
    height: 40px;
  }
}
