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

:root {
  --deep-red: #c1121f;
  --black: #000000;
  --white: #ffffff;
  --gray: #f5f5f5;
  --light-gray: #e0e0e0;
  --shadow-subtle: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.08);
  --font-display: 'Red Hat Display', sans-serif;
  --font-body: 'Red Hat Text', sans-serif;
}

@import url('https://fonts.googleapis.com/css2?family=Red+Hat+Display:wght@300;400;500;600;700&family=Red+Hat+Text:wght@300;400;500&display=swap');

html, body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--black);
  background: var(--white);
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.2;
  letter-spacing: 0.4px;
}

body.home-page {
  overflow: hidden;
  height: 100vh;
}

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

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

/* Navigation */
.nav-container {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  padding: 24px;
  background: transparent;
}

.burger-icon {
  width: 32px;
  height: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  position: relative;
  z-index: 1001;
}

.burger-icon span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--black);
  transition: all 0.3s ease;
  position: absolute;
  left: 0;
  right: 0;
}

.burger-icon span:nth-child(1) {
  top: 0;
}

.burger-icon span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

.burger-icon span:nth-child(3) {
  bottom: 0;
}

.nav-container.expanded .burger-icon span:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.nav-container.expanded .burger-icon span:nth-child(2) {
  opacity: 0;
}

.nav-container.expanded .burger-icon span:nth-child(3) {
  top: 50%;
  transform: translateY(-50%) rotate(-45deg);
}

.nav-items {
  display: flex;
  flex-direction: column;
  gap: 56px;
  margin-top: 32px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.nav-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-icon svg {
  width: 32px;
  height: 32px;
  fill: var(--black);
  transition: fill 0.3s ease;
}

.nav-text {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
  white-space: nowrap;
  line-height: 28px;
}

.nav-container.expanded .nav-text {
  opacity: 1;
  transform: translateX(0);
}

/* Home page - only show icons when expanded */
.home-page .nav-items {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.home-page .nav-container.expanded .nav-items {
  opacity: 1;
  pointer-events: auto;
}

.home-page .nav-container.expanded .nav-text {
  opacity: 1;
  transform: translateX(0);
}

/* Other pages - icons always visible, text on expand */
body:not(.home-page) .nav-items {
  opacity: 1;
}

body:not(.home-page) .nav-text {
  opacity: 0;
}

body:not(.home-page) .nav-container.expanded .nav-text {
  opacity: 1;
  transform: translateX(0);
}

.nav-item:hover .nav-icon svg {
  fill: var(--deep-red);
}

.nav-item.active .nav-icon svg {
  fill: var(--deep-red);
}

/* Footer */
.footer {
  padding: 30px 40px;
  text-align: center;
  font-size: 11px;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #666;
  border-top: 1px solid var(--light-gray);
  margin-top: auto;
}

.footer a {
  color: var(--deep-red);
}

.home-page .footer {
  display: none;
}

/* Main Content */
.main-content {
  min-height: calc(100vh - 80px);
}

body:not(.home-page) .main-content {
  padding-top: 40px;
  padding-left: 120px;
  padding-right: 120px;
  margin-left: 60px;
  margin-right: 60px;
}

/* Home Page Slideshow */
.home-container {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slideshow-wrapper {
  position: relative;
  width: 60vw;
  max-width: 800px;
}

.slideshow-link {
  display: block;
  cursor: pointer;
}

.slideshow-title-top {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--deep-red);
  letter-spacing: 0.4px;
  text-align: left;
  margin-bottom: 12px;
  line-height: 1.2;
}

.slideshow-container {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #c8c8c8;
  border: 1px solid var(--light-gray);
}

.slideshow-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.slideshow-slide.active {
  opacity: 1;
}

.slideshow-slide img,
.slideshow-slide svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
}

.slideshow-title-bottom {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.8rem);
  font-weight: 200;
  text-transform: uppercase;
  color: var(--black);
  letter-spacing: 2px;
  text-align: right;
  margin-top: 12px;
  line-height: 1.2;
}

/* Page Titles */
.page-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 40px;
  line-height: 1.2;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  padding-bottom: 60px;
}

.project-card {
  display: block;
}

.project-image-wrapper {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
  background: #c8c8c8;
  border: 1px solid var(--light-gray);
}

.project-image-wrapper img,
.project-image-wrapper svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter 0.5s ease;
}

.project-card:hover .project-image-wrapper img,
.project-card:hover .project-image-wrapper svg {
  filter: grayscale(0%);
}

.project-card-title {
  font-size: 12px;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 12px;
  text-align: left;
}

/* Single Project */
.project-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 30px;
  color: var(--black);
  transition: all 0.3s ease;
  border: 1px solid var(--light-gray);
  padding: 10px 16px;
}

.project-nav:hover {
  color: var(--deep-red);
  border-color: var(--deep-red);
}

.project-nav svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
}

.project-nav.next {
  flex-direction: row-reverse;
}

.project-nav.next svg {
  transform: rotate(180deg);
}

.project-hero {
  width: 100%;
  margin-bottom: 40px;
  background: #c8c8c8;
  border: 1px solid var(--light-gray);
}

.project-hero img,
.project-hero svg {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(100%);
  transition: filter 0.5s ease;
}

.project-hero:hover img,
.project-hero:hover svg {
  filter: grayscale(0%);
}

.project-details {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  margin-bottom: 60px;
}

.project-meta h1 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 24px;
  line-height: 1.2;
}

.project-meta-item {
  font-size: 13px;
  font-weight: 300;
  margin-bottom: 6px;
  line-height: 1.4;
}

.project-meta-item strong {
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.project-summary {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.7;
}

.project-summary p {
  margin-bottom: 16px;
}

/* Bento Grid */
.bento-grid {
  column-count: 3;
  column-gap: 10px;
  margin-bottom: 60px;
}

.bento-item {
  display: inline-block;
  width: 100%;
  margin: 0 0 10px;
  overflow: hidden;
  position: relative;
  background: #c8c8c8;
  border: 1px solid var(--light-gray);
}

.bento-item img,
.bento-item svg {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  filter: grayscale(100%);
  transition: filter 0.5s ease;
}

.bento-item:hover img,
.bento-item:hover svg {
  filter: grayscale(0%);
}

.bento-item.wide {
  grid-column: span 2;
}

.bento-item.tall {
  grid-row: span 2;
}

.bento-item.large {
  grid-column: span 2;
  grid-row: span 2;
}

/* Project Navigation Bottom */
.project-nav-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40px 0;
}

.project-nav-bottom .project-nav {
  margin-bottom: 0;
}

/* About Page */
.about-container {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 40px;
  align-items: start;
  padding-bottom: 60px;
}

.about-portrait {
  position: relative;
}

.about-portrait img,
.about-portrait svg {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter 0.5s ease;
  background: #c8c8c8;
  border: 1px solid var(--light-gray);
}

.about-portrait:hover img,
.about-portrait:hover svg {
  filter: grayscale(0%);
}

.about-portrait-name {
  font-size: 11px;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 12px;
}

.about-content {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.7;
  padding-top: 20px;
}

.about-content p {
  margin-bottom: 16px;
}

/* Contact Page */
.contact-container {
  padding-bottom: 60px;
}

.contact-info {
  margin-bottom: 40px;
}

.contact-item {
  font-size: 14px;
  font-weight: 300;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1.4;
}

.contact-item svg {
  width: 18px;
  height: 18px;
  fill: var(--deep-red);
  flex-shrink: 0;
}

.contact-item a {
  transition: color 0.3s ease;
}

.contact-item a:hover {
  color: var(--deep-red);
}

.map-container {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  height: 450px;
  position: relative;
  overflow: hidden;
  background: #c8c8c8;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(100%);
  transition: filter 0.5s ease;
}

.map-container:hover iframe {
  filter: grayscale(0%);
}

/* Responsive */
@media (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .about-portrait {
    max-width: 300px;
  }

  .project-details {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .bento-grid {
    column-count: 2;
  }
}

@media (max-width: 768px) {
  body:not(.home-page) .main-content {
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 80px;
    margin-left: 0;
    margin-right: 0;
  }

  .nav-container {
    padding: 16px;
  }

  .nav-container::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--white);
    border-bottom: 1px solid var(--light-gray);
    z-index: -1;
  }

  .burger-icon {
    background: var(--white);
    width: 40px;
    height: 34px;
    padding: 7px 8px;
    box-sizing: border-box;
  }

  /* Mobile: hide icons, show only burger like home page */
  .nav-items {
    display: none;
    opacity: 0;
    pointer-events: none;
  }

  /* Mobile drawer */
  .nav-container.expanded {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    height: 100dvh;
    background: var(--white);
    border-right: 1px solid var(--light-gray);
    padding: 24px;
  }

  .nav-container.expanded .burger-icon {
    position: fixed;
    top: 16px;
    left: 16px;
  }

  .nav-container.expanded .nav-items {
    display: flex;
    opacity: 1;
    pointer-events: auto;
    margin-top: 48px;
    gap: 28px;
  }

  .nav-container.expanded .nav-text {
    opacity: 1;
    transform: translateX(0);
  }

  /* Mobile overlay */
  .nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.3);
    z-index: 999;
  }

  .nav-overlay.active {
    display: block;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .slideshow-wrapper {
    width: 85vw;
  }

  .slideshow-title-top {
    font-size: 1.5rem;
  }

  .slideshow-title-bottom {
    font-size: 1.2rem;
    letter-spacing: 1px;
  }

  .bento-grid {
    column-count: 1;
  }

  .bento-item.wide,
  .bento-item.tall,
  .bento-item.large {
    width: 100%;
  }

  .map-container {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    height: 350px;
  }

  /* Mobile: always black and white */
  .project-card:hover .project-image-wrapper img,
  .project-card:hover .project-image-wrapper svg,
  .project-hero:hover img,
  .project-hero:hover svg,
  .bento-item:hover img,
  .bento-item:hover svg,
  .about-portrait:hover img,
  .about-portrait:hover svg,
  .map-container:hover iframe {
    filter: grayscale(100%);
  }
}
