@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;700&display=swap');

:root {
  --color-white: #ffffff;
  --color-black: #000000;
  --color-text: #222222;
  --color-link: #333333;
  --color-link-hover: #555555;
  --nav-background: rgba(0, 0, 0, 0.3);
  --font-family: 'Barlow', sans-serif;
  --cursor-dark: url('assets/logo/cursor_b.cur') 16 14,
    url('assets/logo/cursor_b.png') 16 14,
    auto;
  --cursor-light: url('assets/logo/cursor_w.cur') 16 14,
    url('assets/logo/cursor_w.png') 16 14,
    pointer;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-family);
  color: var(--color-text);
  background: var(--color-white);
  cursor: var(--cursor-dark);
}

body {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

a,
.navbar a,
img:hover {
  cursor: var(--cursor-light);
}

a {
  color: inherit;
}

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

section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
}

.container {
  max-width: 90%;
  margin: 0 auto;
}

.top-align {
  min-height: 100vh;
  justify-content: flex-start;
  padding-top: 80px;
}

.top-align h1 {
  align-self: center;
  margin: 0 0 30px;
}

.footer {
  font-size: 0.7rem;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  width: 100%;
  height: 50px;
  background: var(--nav-background);
}

.navbar ul {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0;
  padding: 0 20px 0 10px;
  list-style: none;
}

.navbar li:first-child {
  margin-right: auto;
}

.navbar a {
  color: var(--color-white);
  font-family: var(--font-family);
  font-size: clamp(0.95rem, 1.2vw, 1.25rem);
  text-decoration: none;
}

.logo {
  height: 30px;
}

.homepage {
  animation: slideshow 80s infinite;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  transition: opacity 0.3s ease;
}

#home {
  position: relative;
  min-height: 100vh;
  padding: 0;
}

#home .footer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  color: var(--color-white);
  text-align: center;
  opacity: 0;
  animation: fadeIn 1s ease 4.5s forwards;
}

.hero-logo {
  width: min(750px, 70%);
  height: auto;
  fill: var(--color-white);
}

.hero-logo path,
.hero-logo g * {
  opacity: 0;
  animation: fadeIn 0.5s ease forwards;
}

.hero-logo path {
  transform: translateY(20px);
}

.hero-logo g * {
  transform: translateY(100px);
}

.hero-logo g *:nth-child(1) { animation-delay: 1s; }
.hero-logo g *:nth-child(2) { animation-delay: 3s; }
.hero-logo g *:nth-child(3) { animation-delay: 1.5s; }
.hero-logo g *:nth-child(4) { animation-delay: 2.5s; }
.hero-logo g *:nth-child(5) { animation-delay: 3.5s; }
.hero-logo g *:nth-child(6) { animation-delay: 0.5s; }
.hero-logo g *:nth-child(7) { animation-delay: 2s; }

#about h1,
#contact h1 {
  font-size: clamp(3rem, 6vw, 5rem);
}

#about h1 {
  margin: 5px 0;
}

#about p {
  max-width: 90ch;
  margin-inline: auto;
  font-size: clamp(1rem, 1.2vw, 1.25rem);
  text-align: center;
}

#projects h1,
#previous-projects h1 {
  margin: 0 0 30px;
  font-size: clamp(2rem, 3vw, 3.5rem);
  text-align: center;
}

#previous-projects {
  min-height: auto;
  padding-bottom: 25vh;
}

.projects-grid {
  display: grid;
  gap: 20px;
}

#projects .projects-grid {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 35vw;
}

#previous-projects .projects-grid {
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 35vw;
}

.project-item {
  display: flex;
  overflow: hidden;
  opacity: 0.7;
  transition: opacity 0.5s ease;
}

.project-item:hover {
  opacity: 1;
}

.project-item img {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  object-fit: cover;
}

#projects .project-item {
  justify-self: center;
  align-self: center;
  width: 90%;
  height: 80%;
}

#previous-projects .project-item:nth-child(2),
#previous-projects .project-item:nth-child(3),
#previous-projects .project-item:nth-child(6) {
  width: 50%;
  height: 50%;
}

#previous-projects .project-item:nth-child(2) {
  justify-self: flex-start;
  align-self: flex-end;
}

#previous-projects .project-item:nth-child(3) {
  justify-self: flex-end;
  align-self: flex-start;
}

#previous-projects .project-item:nth-child(6) {
  justify-self: flex-start;
  align-self: flex-start;
}

#contact {
  position: relative;
  min-height: 95vh;
}

#contact p {
  font-size: clamp(1rem, 1.5vw, 1.5rem);
}

.contact-info a {
  color: var(--color-link);
  text-decoration: none;
}

.contact-info a:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
}

#contact .footer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  margin-bottom: 10px;
  padding: 10px;
  color: var(--color-black);
  text-align: left;
}

.handover-page {
  min-height: 100vh;
}

.handover-shell {
  min-height: 100vh;
  padding: 72px 5vw 32px;
}

.handover-workspace {
  width: min(100%, 1400px);
  min-height: calc(100vh - 130px);
  margin: 0 auto;
}

.handover-gate {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.handover-panel {
  width: min(100%, 520px);
}

.handover-panel h1 {
  margin: 0;
  color: var(--color-black);
  font-size: clamp(4rem, 11vw, 8rem);
  line-height: 0.9;
}

.is-locked .handover-workspace {
  display: none;
}

.handover-page:not(.is-locked) .handover-gate {
  display: none;
}

.handover-workspace section {
  margin-top: 20px;
  min-height: 0;
  display: block;
  padding: 3vw;
}

.section-label {
  margin: 0 0 10px;
  color: var(--color-link-hover);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workspace-header h1 {
  margin: 0;
  color: var(--color-black);
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  line-height: 0.95;
}

.workspace-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 6px;
}

.handover-intro {
  max-width: 34rem;
  margin: 18px 0 28px;
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  line-height: 1.5;
}

.pin-form label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pin-row {
  display: flex;
  gap: 12px;
}

.pin-row input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--color-black);
  border-radius: 0;
  padding: 0 14px;
  font: inherit;
  font-size: 1.25rem;
  letter-spacing: 0.18em;
}

.pin-row button {
  min-height: 48px;
  border: 1px solid var(--color-black);
  border-radius: 0;
  padding: 0 20px;
  color: var(--color-white);
  background: var(--color-black);
  font: inherit;
  font-weight: 700;
}

.pin-row button:hover {
  color: var(--color-black);
  background: var(--color-white);
}

.pin-message {
  min-height: 1.4em;
  margin: 12px 0 0;
  color: #8f1d1d;
}

.handover-steps {
  margin-top: 0;
}

.document-library {
  margin-top: 20px;
}

.handover-steps h2,
.document-library h2 {
  margin: 0;
  color: var(--color-black);
  font-size: clamp(1.75rem, 3vw, 3rem);
  line-height: 1;
}

.library-groups {
  margin-top: 12px;
  border-top: 1px solid #d8d8d8;
}

.library-groups details {
  border-bottom: 1px solid #d8d8d8;
}

.library-groups summary,
.library-subgroups summary {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  color: var(--color-black);
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  font-weight: 700;
  list-style: none;
  cursor: var(--cursor-dark);
}

.library-groups summary::-webkit-details-marker,
.library-subgroups summary::-webkit-details-marker {
  display: none;
}

.library-groups summary::before,
.library-subgroups summary::before {
  content: "▸";
  display: inline-block;
  width: 1em;
  flex: 0 0 1em;
  transform-origin: center;
  transition: transform 0.2s ease;
}

.library-groups details[open] > summary::before,
.library-subgroups details[open] > summary::before {
  transform: rotate(90deg);
}

.library-subgroups {
  padding-left: 20px;
}

.library-subgroups details {
  border-top: 1px solid #e8e8e8;
  border-bottom: 0;
}

.library-subgroups summary {
  min-height: 46px;
  padding: 10px 0;
  font-size: 1rem;
}

.library-files {
  display: grid;
  gap: 10px;
  padding: 0 0 18px 20px;
}

.library-files p {
  max-width: 60ch;
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
}

.library-files a {
  width: fit-content;
  color: var(--color-link);
  cursor: var(--cursor-dark);
  text-decoration: none;
}

.library-files a:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
}

.is-hidden {
  display: none;
}

@keyframes slideshow {
  0%, 12.5% { background-image: url('assets/images/projects/camira-ren1.webp'); }
  12.51%, 25% { background-image: url('assets/images/projects/camira-ren2.webp'); }
  25.01%, 37.5% { background-image: url('assets/images/projects/aspen-ren1.webp'); }
  37.51%, 50% { background-image: url('assets/images/projects/apartment1.webp'); }
  50.01%, 62.5% { background-image: url('assets/images/projects/camira-ren3.webp'); }
  62.51%, 75% { background-image: url('assets/images/projects/aspen-ren4.webp'); }
  75.01%, 87.5% { background-image: url('assets/images/projects/aspen-ren5.webp'); }
  87.51%, 100% { background-image: url('assets/images/projects/aspen-ren6.webp'); }
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1400px) {
  body,
  .homepage {
    background-attachment: scroll;
  }
}

@media (max-width: 1200px) {
  section {
    padding: 10px 0;
  }

  .hero-logo {
    width: 90%;
  }

  #about h1 {
    padding-top: 100px;
  }

  #about p {
    padding: 0 100px;
  }

  #contact {
    padding-bottom: 100px;
  }

  .workspace-header {
    align-items: flex-start;
    flex-direction: column;
  }

  #projects .projects-grid,
  #previous-projects .projects-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-auto-rows: auto;
  }

  .project-item,
  #projects .project-item,
  #previous-projects .project-item:nth-child(2),
  #previous-projects .project-item:nth-child(3),
  #previous-projects .project-item:nth-child(6) {
    justify-self: center;
    align-self: center;
    width: 90%;
    height: auto;
    opacity: 1;
  }

  .project-item img {
    height: auto;
  }
}

@media (max-width: 480px) {
  .navbar {
    height: auto;
    padding: 0.5rem;
  }

  .navbar ul {
    gap: 12px;
    padding: 0;
  }

  .navbar a {
    font-size: clamp(0.9rem, 4vw, 1rem);
  }

  #about h1,
  #contact h1 {
    font-size: clamp(2rem, 8vw, 4rem);
  }

  #about p,
  #contact p {
    font-size: clamp(0.5rem, 6vw, 1rem);
  }

  #about p {
    padding: 0 25px;
  }

  .handover-shell {
    padding-inline: 20px;
  }

  .pin-row {
    flex-direction: column;
  }

  .pin-row button {
    width: 100%;
  }

}
