@import 'resources/fonts/fonts.css';
@import 'utility/footer.css';

:root {
  --color-text: #111111;
  --color-white: #ffffff;
  --color-bg: #e8e8e8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}


body {
  width: 100vw;
  font-family: 'Modernist', sans-serif;
  color: var(--color-text);
  line-height: 1.6;
  background: var(--color-bg);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}





/* ========== NAVIGATION ========== */
nav.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
nav.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  position: relative;
}
nav .logo {
  width: 150px;
  font-size: 16px;
  font-weight: 800;
  line-height: 17px;
  color: var(--color-text);
  text-decoration: none;
  display: flex;
  gap: 10px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font-family: 'Montserrat';
}
nav .logo img {
  width: 30px;
  height: auto;
}
nav .nav-links {
  width: 270px;
  list-style: none;
  display: flex;
  gap: 4px;
  padding: 4px;
  background-color: white;
  border-radius: 12px;
}
nav .nav-links a {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 32px;
  border-radius: 8px;
  width: 100%;
  flex-grow: 1;
} 
nav .nav-links a:hover, nav .nav-links a.active {
  background: #EEEEEE;
}
nav .nav-links a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 550;
  font-size: 14px;
}

nav .cta-button,
.main-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 10px 30px;
  background: var(--color-text);
  color: var(--color-white);
  border-radius: 12px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 550;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--color-text);
  cursor: pointer;
}




.hero {
  height: fit-content;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  color: black;
  font-family: 'Modernist';
  margin-top: 200px;
}

.hero h1 {
  font-size: 96px;
  font-weight: 800;
}
.hero-emoji-rotator {
  margin: 0 12px 0 8px;
}
.rotator {
  display: inline-flex;
  position: relative;
  overflow: hidden;
  align-items: flex-end;
  min-width: 0;
  vertical-align: bottom;
}
.rotator-word {
  display: block;
  white-space: nowrap;
  will-change: transform, opacity;
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.65s ease;
  transform: translateY(0);
  opacity: 1;
}
.rotator-word--current {
  position: relative;
}
.rotator-word--incoming {
  position: absolute;
  left: 0;
  bottom: 0;
  opacity: 0;
}
.rotator[data-direction="down"] .rotator-word--incoming {
  transform: translateY(-100%);
}
.rotator[data-direction="down"] .rotator-word--incoming.rotator-word--visible {
  transform: translateY(0);
  opacity: 1;
}
.rotator[data-direction="down"] .rotator-word--leaving {
  transform: translateY(100%);
  opacity: 0;
}
.rotator[data-direction="up"] .rotator-word--incoming {
  transform: translateY(100%);
}
.rotator[data-direction="up"] .rotator-word--incoming.rotator-word--visible {
  transform: translateY(0);
  opacity: 1;
}
.rotator[data-direction="up"] .rotator-word--leaving {
  transform: translateY(-100%);
  opacity: 0;
}
.rotator-word--measurement {
  position: absolute;
  left: 0;
  top: 0;
  visibility: hidden;
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  transition: none;
  transform: none;
}
.hero p {
  font-size: 32px;
  line-height: 34px;
  font-weight: 700;
  width: fit-content;
  margin-left: 60%;
}

.hero p.wide {
  margin-left: 50%;
}




.projects {
  width: 100vw;
  max-width: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 200px;
  padding: 0 5vw 200px;
}

.projects-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.projects-header span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
  font-size: 20px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.3);
}

.projects-header #btn-group {
    display: flex;
    gap: 4px;
    background: none;
    border-radius: 12px;
    padding: 4px;
}

.projects-header #btn-group button {
    padding: 0 15px;
    height: 30px;
    font-family: Modernist-mono;
    background: none;
    border: none;
    border-radius: 8px;
    color: rgba(0, 0, 0, 0.3);
    font-weight: 600;
    border: 1px solid transparent;
}
.projects-header #btn-group button:hover {
    background: rgba(0, 0, 0, 0.1);
}
.projects-header #btn-group button.active {
    border: 1.5px solid rgba(0, 0, 0, 0.3);
}




/* Basic styling for gallery items */
.work-projects {
  width: 100%;
  column-count: 2;
  column-gap: 32px;
}

/* Gallery item setup */
.gallery-item {
    position: relative;
    cursor: pointer;
  display: none; /* Hidden by default */
    flex-direction: column;
    gap: 14px;
  width: 100%;
  break-inside: avoid;
  margin-bottom: 32px;
}

.gallery-item.show {
  display: inline-flex; /* Shown when filtered */
}

/* Make entire card clickable */
.stretched-link {
  position: absolute;
  inset: 0;
  z-index: 5;
  text-indent: -9999px;
}

/* Media wrapper */
.project-media {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: #d9d9d9;
  aspect-ratio: 4 / 3;
}

/* Image layers */
.project-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.4s ease, transform 0.5s ease;
}

.project-image--primary {
  opacity: 1;
}

.project-image--hover {
  opacity: 0;
}

/* Hover image swap */
.gallery-item:hover .project-image--primary {
  opacity: 0;
  transform: scale(1.02);
}

.gallery-item:hover .project-image--hover {
  opacity: 1;
  transform: scale(1.02);
}

/* Hover logo */
.project-logo {
  position: absolute;
  top: 32px;
  left: 32px;
  /* width: 48px; */
  height: 48px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.2));
}

.gallery-item:hover .project-logo {
  opacity: 1;
  transform: translateY(0);
}

/* Metadata below image */
.project-meta {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.project-group {
  font-family: 'Montserrat';
  font-size: 26px;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.2);
}

.project-title {
  font-family: 'Montserrat';
  font-size: 26px;
  font-weight: 700;
  color: var(--color-text);
}

/* Size variants */
.gallery-item.size-square .project-media {
  aspect-ratio: 1 / 1;
}

.gallery-item.size-wide .project-media {
  aspect-ratio: 16 / 9;
}

.gallery-item.size-tall .project-media {
  aspect-ratio: 4 / 5;
}

/* Focus indication */
.gallery-item:focus-within .project-media {
  outline: 2px solid rgba(0,0,0,0.4);
  outline-offset: 4px;
}

/* Accessible focus indication */
:focus-visible {
  outline: 2px solid rgba(0,0,0,0.5);
  outline-offset: 2px;
}




.about {
  margin-top: 100px;
  font-size: 24px;
  padding-bottom: 200px;
}


/* Reduce motion for users with preferences */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Mobile styles */
@media (max-width: 768px) {
  nav .nav-links,
  nav .cta-button {
    display: none;
  }
  nav .nav-links.active,
  nav .cta-button.active {
    display: flex;
  }

  .menu-toggle { display: block; }

  nav.nav .container { position: relative; }
  nav .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: calc(100% - 2rem);
    margin: 0 auto;
    background: var(--color-white);
    border-radius: 12px;
    padding: 8px;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.08);
  }

  .hero {
    margin-top: 140px;
    align-items: flex-start;
    gap: 12px;
  }
  .hero h1 { font-size: 48px; }
  .hero p {
    font-size: 18px;
    line-height: 1.35;
    margin-left: 0;
  }

  .projects { margin-top: 80px; }
  .projects-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .projects-header #btn-group {
    display: flex;
    gap: 6px;
    padding: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .work-projects {
    column-count: 1;
    column-gap: 0;
  }

  .project-media { border-radius: 14px; }

  .project-title { font-size: 20px; }
}