/* ============================================================
   SINDS STUDIO — main.css
   ============================================================ */

/* --- Reset & Base ------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

::selection {
  background: #000;
  color: #fff;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'aktiv-grotesk', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: #000;
  background: #fff;
  text-transform: uppercase;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.layout {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* --- Left Panel -------------------------------------------- */
.panel-left {
  flex-shrink: 0;
  width: 58vw;
  height: 100vh;
  display: grid;
  grid-template-columns: 175px 1fr;
  grid-template-rows: auto 1fr auto;
  padding: 28px;
  overflow: hidden;
}

/* --- Header ------------------------------------------------- */
.site-header {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  align-items: center;
  margin-bottom: 64px;
}

.logo {
  display: block;
  flex-shrink: 0;
  width: 175px;
  line-height: 1;
}

/* ── Logo height in em — locked to exactly 2 lines of tagline text.
   Tagline: font-size 12px × line-height 1.4 × 2 lines = 2.8em.
   em is relative to body font-size, so both scale identically
   at any browser zoom level or screen size. ── */
.logo img {
  display: block;
  height: 2.2em;   /* visually matches 2-line tagline after accounting for font bounding box */
  width: auto;
}

.tagline {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.23;
}

/* --- Navigation --------------------------------------------- */
.site-nav {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.site-nav a {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.23;
  cursor: pointer;
}

.site-nav a::after {
  content: attr(data-text);
  display: block;
  font-weight: 700;
  height: 0;
  overflow: hidden;
  visibility: hidden;
  letter-spacing: 0.03em;
}

.site-nav a:hover,
.site-nav a.active {
  font-weight: 700;
}

/* --- Footer ------------------------------------------------- */
.site-footer {
  grid-column: 1;
  grid-row: 3;
  align-self: end;
}

.site-footer small {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  font-style: normal;
}

/* ============================================================
   FADE SLOTS
   ============================================================ */
#slot-content {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
}

#slot-right {
  flex: 1;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

/* Experience: full viewport height, scrollable — 2.5 rows visible
   naturally on most screen widths because images are wide enough */
#slot-right.panel-right--experience {
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
}

#slot-content,
#slot-right {
  opacity: 0;
  animation: slotFadeIn 0.35s ease forwards;
}

@keyframes slotFadeIn {
  to { opacity: 1; }
}

#slot-content.is-leaving,
#slot-right.is-leaving {
  animation: none;
  transition: opacity 0.2s ease;
  opacity: 0;
}

/* ============================================================
   HOME
   ============================================================ */
.panel-right--hero {
  padding-right: 28px;
}

.hero-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  user-select: none;
  pointer-events: none;
}

/* ============================================================
   INFORMATION
   ============================================================ */
.information-text {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.5;
  max-width: 370px;
  text-wrap: pretty;
}

.information-text p + p {
  margin-top: 1.2em;
}

/* ============================================================
   EXPERIENCE
   ============================================================ */
.panel-right--experience {
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-left: 28px;
  padding-right: 28px;
}

.panel-right--experience::-webkit-scrollbar {
  display: none;
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.project-cell {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4 / 5;
  background: #e8e8e8;
  transition: opacity 0.3s ease;
}

.project-cell img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  user-select: none;
  pointer-events: none;
}

.project-info {
  display: none;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.23;
  pointer-events: none;
}

.project-info.visible {
  display: block;
  opacity: 1;
}
.project-info .project-label { display: block; margin-bottom: 2px; }
.project-info .project-title { display: block; font-weight: 700; margin-bottom: 2px; }
.project-info .project-type  { display: block; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-text {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.5;
  max-width: 340px;
}

.contact-text p { margin-bottom: 1.2em; }

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact-links a {
  display: inline-block;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: opacity 0.15s;
}

.contact-links a:hover { opacity: 0.5; }

/* ============================================================
   TABLET (≤1024px)
   ============================================================ */
@media (max-width: 1024px) {
  .panel-left {
    width: 54vw;
    grid-template-columns: 155px 1fr;
    padding: 24px;
  }

  .site-header { margin-bottom: 48px; }
  .logo { width: 155px; }
}

/* ============================================================
   MOBILE (≤768px)
   ============================================================ */
@media (max-width: 768px) {

  html, body {
    height: auto;
    overflow: auto;
  }

  .layout {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }

  /* Sticky header — body scrolls, panel-left stays pinned to top */
  .panel-left {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
    flex-shrink: 0;
    width: 100vw;
    height: auto;
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow: visible;
  }

  .site-header {
    margin-bottom: 0;
    align-items: center;
    width: 100%;
  }

  .logo {
    width: auto;
    flex-shrink: 0;
    margin-right: 0;
  }

  .logo img {
    height: 1.9em;
    width: auto;
  }

  .tagline {
    margin-left: auto;
    text-align: right;
  }

  .site-nav {
    align-self: flex-start;
    margin-top: 60px;
  }

  /* Content always 20px below nav, full width */
  #slot-content {
    margin-top: 20px;
    width: 100%;
  }

  .information-text,
  .contact-text {
    max-width: 100%;
  }

  /* ── Experience: compact 2-column header layout ──────────────
     Left:  logo → nav (stacked)
     Right: tagline → project info (stacked)
     row-gap controls spacing between header and nav/content    */
  .page-experience .panel-left {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 20px;
    row-gap: 60px;
    align-items: start;
  }

  /* Header spans both columns — logo left, tagline right */
  .page-experience .site-header {
    grid-column: 1 / -1;
    grid-row: 1;
    margin-bottom: 0;
  }

  /* Nav: left column, row 2 — no margin-top, row-gap handles it */
  .page-experience .site-nav {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    margin-top: 0;
  }

  /* Project info: right column, same row — position absolute so
     appearing text never shifts the photos grid below */
  .page-experience #slot-content {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    margin-top: 0;
    padding-left: 0;
    width: auto;
    text-align: right;
    position: relative;
  }

  .page-experience #slot-content .project-info {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
  }

  /* Footer: thin fixed bar at bottom */
  .site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: #fff;
    padding: 10px 20px;
  }

  /* Hero: flex fills remaining space — no calc, works at any zoom */
  #slot-right {
    width: 100vw;
    flex: none;
    aspect-ratio: 4/5;
    max-height: calc(100dvh - 180px);
    min-height: 0;
    overflow: hidden;
    padding-right: 0;
    margin-bottom: 0;
  }

  /* Experience grid */
  #slot-right.panel-right--experience {
    height: auto;
    aspect-ratio: unset;
    overflow: visible;
    padding-bottom: 0;
    margin-bottom: 0;
  }

  .projects-grid {
    padding-bottom: 42px;
  }

  .panel-right--experience {
    padding-left: 0;
    padding-right: 0;
  }

  .projects-grid {
    gap: 8px;
  }
}

/* ============================================================
   SMALL PHONE (≤390px)
   ============================================================ */
@media (max-width: 390px) {
  .panel-left {
    padding: 16px;
  }
}
