@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:ital,wght@0,400..700;1,400..700&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

/* ---------------------------------------
   Reset
--------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ---------------------------------------
   Base
--------------------------------------- */
:root {
  --bg: #1a1a1a;
  --fg: #e1e1e1;
  --dim: #888888;
  --border: #5a5a5a;
  --gap: clamp(1.5rem, 4vw, 3rem);
  --header-height: 0px;
  --axis: 30vw;
}

/* Project pages sit "open" — the axis lives further left, giving the
   left-aligned title/gallery/paragraph more room. script.js animates the
   line from one resting value to the other when navigating between the
   menu and a project page. */
body.project-page {
  --axis: 18vw;
}

html {
  scroll-behavior: smooth;
}

.axis {
  position: fixed;
  top: 0;
  bottom: 0;
  left: var(--axis);
  width: 1px;
  background: var(--border);
  z-index: 5;
  pointer-events: none;
}

@media (max-width: 600px) {
  .axis {
    display: none;
  }
}

/* ---------------------------------------
   Page transition — line slides, page fades
--------------------------------------- */
.page {
  position: relative;
  z-index: 6;
  opacity: 1;
  transition: opacity 0.45s ease;
}

.axis,
.hero,
.project-hero,
.project-about {
  transition: transform 0.5s ease;
}

body.pt-hidden .page {
  opacity: 0;
}

body.pt-hidden .hero,
body.pt-hidden .project-hero,
body.pt-hidden .project-about {
  transform: translateX(-48px);
}

/* .axis gets its transform set inline by script.js on click — the exact
   shift depends on the destination page's own --axis value, so it can't
   be a fixed rule here. */

@media (prefers-reduced-motion: reduce) {
  .page,
  .axis,
  .hero,
  .project-hero,
  .project-about {
    transition: none;
  }
}

section[id] {
  scroll-margin-top: var(--header-height);
}

body {
  padding: 0 1.5rem 0.5rem;
  background: var(--bg);
  color: var(--fg);
  font-family: "Instrument Sans", Arial, sans-serif;
  font-weight: 400;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

section {
  padding: var(--gap) clamp(1.5rem, 6vw, 4rem);
}

/* ---------------------------------------
   Header
--------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem clamp(1.5rem, 6vw, 4rem);
  background: var(--bg);
}

.logo {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2.5rem);
  font-size: 0.9rem;
}

.nav a {
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.nav a:hover {
  opacity: 1;
}

/* ---------------------------------------
   Hero
--------------------------------------- */
.hero {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: calc(var(--axis) + var(--gap) - 1.5rem);
}

.hero h1 {
  font-size: clamp(3rem, 10vw, 7rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 0.95;
}

.hero-sub {
  margin-top: 1.5rem;
  max-width: 32rem;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  color: var(--dim);
}

/* ---------------------------------------
   Section labels
--------------------------------------- */
.section-label {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}

a.section-label {
  display: inline-block;
  transition: color 0.2s ease;
}

a.section-label:hover {
  color: var(--fg);
}

/* ---------------------------------------
   Divider — label · dot on the axis · note
--------------------------------------- */
.divider {
  display: grid;
  grid-template-columns: calc(var(--axis) - 1.5rem - clamp(1.5rem, 6vw, 4rem) - 4px) 8px 1fr;
  align-items: center;
  margin-bottom: var(--gap);
}

.divider-label {
  text-align: right;
  padding-right: 1rem;
}

.divider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  justify-self: center;
}

.divider-note {
  padding-left: 1rem;
  color: var(--dim);
  font-size: 0.85rem;
}

@media (max-width: 600px) {
  .divider {
    grid-template-columns: 1fr;
    row-gap: 0.5rem;
  }

  .divider-label,
  .divider-note {
    text-align: left;
    padding: 0;
  }

  .divider-dot {
    display: none;
  }
}

/* ---------------------------------------
   Work
--------------------------------------- */
.project {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  text-align: center;
}

.project-visual {
  position: absolute;
  inset: -30% 0;
  z-index: 6;
  will-change: transform;
}

.project-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) brightness(0.45);
  transition: filter 0.5s ease;
}

.project:hover .project-visual img {
  filter: grayscale(0%) brightness(0.55);
}

.project-content {
  position: relative;
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.project-name {
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
}

.project-year {
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  color: var(--dim);
}

@media (prefers-reduced-motion: reduce) {
  .project-visual {
    transform: none !important;
  }
}

/* ---------------------------------------
   About
--------------------------------------- */
.about p {
  max-width: 40rem;
  margin-left: calc(var(--axis) + var(--gap) - 1.5rem - clamp(1.5rem, 6vw, 4rem));
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 300;
  color: #dddddd;
}

/* ---------------------------------------
   Contact
--------------------------------------- */
.big-link {
  display: inline-block;
  margin-left: calc(var(--axis) + var(--gap) - 1.5rem - clamp(1.5rem, 6vw, 4rem));
  font-size: clamp(1.75rem, 6vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  border-bottom: 1px solid var(--fg);
  padding-bottom: 0.25rem;
}

.socials {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  margin-left: calc(var(--axis) + var(--gap) - 1.5rem - clamp(1.5rem, 6vw, 4rem));
  font-size: 0.95rem;
  color: var(--dim);
}

.socials a:hover {
  color: var(--fg);
}

/* ---------------------------------------
   Project detail pages
--------------------------------------- */
.back-link {
  display: inline-block;
  padding: 1.5rem clamp(1.5rem, 6vw, 4rem) 0;
  font-size: 0.85rem;
  color: var(--dim);
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--fg);
}

.project-hero {
  padding: clamp(2rem, 6vw, 4rem) clamp(1.5rem, 6vw, 4rem) var(--gap)
    calc(var(--axis) + var(--gap) - 1.5rem);
}

.project-hero .project-year {
  display: block;
  margin-bottom: 0.75rem;
}

.project-hero h1 {
  font-size: clamp(2.5rem, 8vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 0.95;
}

.project-gallery {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  padding: 0 clamp(1.5rem, 6vw, 4rem) 0 calc(var(--axis) + var(--gap) - 1.5rem);
}

.project-shot {
  position: relative;
  z-index: 6;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #111111;
}

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

.project-about {
  padding: calc(var(--gap) * 2) clamp(1.5rem, 6vw, 4rem) calc(var(--gap) * 2)
    calc(var(--axis) + var(--gap) - 1.5rem);
}

.project-about p {
  max-width: 42rem;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 300;
  color: #dddddd;
}

@media (max-width: 600px) {
  .project-hero,
  .project-gallery,
  .project-about {
    padding-left: clamp(1.5rem, 6vw, 4rem);
  }
}

/* ---------------------------------------
   Footer
--------------------------------------- */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem clamp(1.5rem, 6vw, 4rem) 2.5rem;
  font-size: 0.85rem;
  color: var(--dim);
}

/* ---------------------------------------
   Responsive
--------------------------------------- */
@media (max-width: 600px) {
  .hero {
    padding-left: clamp(1.5rem, 6vw, 4rem);
  }

  .about p,
  .big-link,
  .socials {
    margin-left: 0;
  }

  .nav {
    gap: 1rem;
  }

  .site-footer {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
}
