/* =============================================================
   AYRTON (A.J.) LAUCKS — style.css  v4
   ============================================================= */

@font-face {
  font-family: 'Basier Square';
  src: url('fonts/BasierSquare-Regular.woff2') format('woff2'),
       url('fonts/BasierSquare-Regular.woff')  format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Basier Square';
  src: url('fonts/BasierSquare-SemiBold.woff2') format('woff2'),
       url('fonts/BasierSquare-SemiBold.woff')  format('woff');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --black:       #000000;
  --gray:        rgba(0,0,0,0.60);
  --white:       #ffffff;
  --bg:          #ffffff;
  --rule:        #e8e8e8;

  --font:        'Basier Square', 'Helvetica Neue', Arial, sans-serif;
  --size-body:   18px;
  --size-meta:   16px;
  --size-nav:    17px;
  --weight-reg:  400;
  --weight-semi: 600;

  --col-w:       650px;   /* ← updated from 512px */
  --gap:         20px;
}

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

html {
  font-size: var(--size-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scrollbar-width: none; /* Firefox */
}

html::-webkit-scrollbar { display: none; } /* Chrome, Safari, Edge */

body {
  font-family: var(--font);
  font-weight: var(--weight-reg);
  font-size: var(--size-body);
  color: var(--black);
  background: var(--bg);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font-family: var(--font); cursor: pointer; }

/* ── TOP NAV ──────────────────────────────────────────────── */
.topnav {
  width: 100%;
  background: var(--bg);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 50;
  text-align: center;
}

/* Inner wrapper matches content column width exactly */
.topnav__inner {
  width: var(--col-w);
  max-width: 100%;
  margin: 0 auto;
  padding: 18px 24px 0;
  box-sizing: border-box;
}

.topnav__name {
  display: block;
  font-size: var(--size-nav);
  font-weight: var(--weight-reg);
  line-height: 1;
  margin-bottom: 10px;
}

.topnav__name.is-active {
  font-weight: var(--weight-semi);
}

.topnav__links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  list-style: none;
  padding-bottom: 12px;
  white-space: nowrap;
  width: 100%;
}

/* Each link item — no padding, JS controls spacing via the pipes */
.topnav__links li {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.topnav__links li { display: flex; align-items: center; }

.topnav__links li + li::before {
  content: none; /* pipes are now real <span> elements that can flex-grow */
}

/* Pipe separators — flex-grow so they expand to fill remaining space evenly */
.topnav__pipe {
  flex: 1;
  text-align: center;
  font-size: var(--size-nav);
  font-weight: var(--weight-reg);
  color: var(--black);
  user-select: none;
}

.topnav__links a {
  font-size: var(--size-nav);
  font-weight: var(--weight-reg);
  color: var(--black);
  line-height: 1;
  transition: opacity 0.15s;
}

.topnav__links a:hover { opacity: 0.55; }
.topnav__links a.is-active { font-weight: var(--weight-semi); }

.mob-burger { display: none; }

/* ── MOBILE NAV OVERLAY ───────────────────────────────────── */
.mob-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 200;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.mob-nav.is-open { display: flex; }

.mob-nav__close {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: none;
  border: none;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
}

.mob-nav__close span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--black);
}

.mob-nav__links { list-style: none; text-align: center; }

/* Hide the pipe separators in the mobile overlay — vertical list only */
.mob-nav__links .topnav__pipe { display: none; }

.mob-nav__links li a {
  display: block;
  font-size: var(--size-body);
  font-weight: var(--weight-reg);
  color: var(--black);
  line-height: 1;
  padding: 16px 0;
}

.mob-nav__links li a.is-active { font-weight: var(--weight-semi); }

.mob-nav__name {
  display: block;
  font-size: var(--size-body);
  font-weight: var(--weight-reg);
  text-align: center;
  padding: 16px 0;
  margin-bottom: 8px;
}

.mob-nav__name.is-active {
  font-weight: var(--weight-semi);
}

/* ── HOME HERO ────────────────────────────────────────────── */

/* The home page itself uses flexbox so the hero stretches to
   fill exactly whatever vertical space remains after the nav,
   regardless of screen aspect ratio or nav height. */
body.home {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden; /* prevents any scroll on the home page */
}

body.home .topnav {
  flex-shrink: 0; /* nav takes only what it needs */
}

.home-hero {
  flex: 1;           /* fills ALL remaining height after the nav */
  width: 100%;
  overflow: hidden;
  background: var(--rule);
  min-height: 0;     /* required for flex children to shrink correctly */
}

.home-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.home-hero--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--size-meta);
  color: var(--gray);
}

/* ── CONTENT COLUMN ───────────────────────────────────────── */
.col {
  width: var(--col-w);
  max-width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

.page { padding-top: 40px; padding-bottom: 80px; }

/* ── PROJECT LIST (category pages) ───────────────────────── */
.project-list { display: flex; flex-direction: column; gap: var(--gap); }

.project-card { display: block; text-decoration: none; color: var(--black); }

.project-card__thumb { width: 100%; overflow: hidden; background: var(--rule); }

.project-card__thumb img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.25s ease;
}

.project-card:hover .project-card__thumb img { opacity: 0.85; }

.project-card__thumb--empty {
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--size-meta);
  color: var(--gray);
  background: var(--rule);
}

.project-card__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
  margin-bottom: 16px;
}

.project-card__title {
  font-size: var(--size-meta);
  font-weight: var(--weight-reg);
  line-height: 1.3;
  color: var(--gray);
}

.project-card__date {
  font-size: var(--size-meta);
  font-weight: var(--weight-reg);
  color: var(--gray);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── PROJECT DETAIL ───────────────────────────────────────── */
.proj-title {
  font-size: var(--size-body);
  font-weight: var(--weight-semi);
  line-height: 1.3;
  margin-bottom: 6px;
}

.proj-meta { margin-bottom: 24px; }

.proj-meta__row {
  display: flex;
  gap: 4px;
  line-height: 1.6;
}

.proj-meta__key {
  font-size: var(--size-meta);
  font-weight: var(--weight-reg);
  color: var(--gray);
}

.proj-meta__val {
  font-size: var(--size-meta);
  font-weight: var(--weight-reg);
  color: var(--black);
}

.proj-desc {
  font-size: var(--size-meta);
  font-weight: var(--weight-reg);
  line-height: 1.6;
  color: var(--gray);
  margin-bottom: 32px;
}

.proj-desc p + p { margin-top: 1em; }

/* blockquote style for quoted text */
.proj-desc blockquote {
  border-left: 2px solid var(--rule);
  margin: 1em 0;
  padding-left: 1em;
  color: var(--gray);
}

.proj-images { display: flex; flex-direction: column; gap: var(--gap); }

.proj-images__label {
  font-size: var(--size-meta);
  font-weight: var(--weight-reg);
  color: var(--gray);
  display: block;
  margin-top: 12px;
  margin-bottom: -8px;
}

.proj-images__label:first-child { margin-top: 0; }

.proj-img { width: 100%; height: auto; display: block; }

.proj-img-row { display: flex; gap: var(--gap); }

.proj-img-row .proj-img { flex: 1; width: 0; }

.back-link {
  display: inline-block;
  margin-top: 48px;
  font-size: var(--size-meta);
  font-weight: var(--weight-reg);
  color: var(--gray);
  transition: color 0.15s;
}

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

/* ── ABOUT PAGE ───────────────────────────────────────────── */
.about-photo {
  width: 100%;
  height: auto;
  display: block;
  background: var(--rule);
  margin-bottom: 20px;
}

.about-photo--placeholder {
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--size-meta);
  color: var(--gray);
}

.about-bio {
  font-size: var(--size-meta);   /* 16pt — matches metadata */
  font-weight: var(--weight-reg);
  line-height: 1.6;
  color: var(--gray);            /* 60% black — matches metadata */
  margin-bottom: 32px;
  text-align: justify;           /* hard edge on both left and right */
  hyphens: auto;                 /* allows clean line breaks at word boundaries */
}
.about-bio p + p { margin-top: 1em; }

.about-buttons { display: flex; gap: 12px; }

.about-btn {
  flex: 1;
  display: block;
  text-align: center;
  font-family: var(--font);
  font-size: var(--size-meta);
  font-weight: var(--weight-reg);
  color: var(--black);
  background: var(--bg);
  border: 1px solid var(--rule);
  padding: 10px 8px;
  transition: background 0.15s, border-color 0.15s;
}

.about-btn:hover { background: #f4f4f4; border-color: #ccc; }

/* ── MOBILE CAROUSEL ──────────────────────────────────────── */
.proj-carousel { display: none; }

.proj-carousel__track {
  display: flex;
  overflow-x: scroll;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 12px;
  margin-left: -24px;
  margin-right: -24px;
  padding-left: 24px;
  padding-right: 24px;
}

.proj-carousel__track::-webkit-scrollbar { display: none; }

.proj-carousel__slide { flex: 0 0 calc(100vw - 48px); scroll-snap-align: start; }
.proj-carousel__slide img { width: 100%; height: auto; display: block; }

.proj-carousel__dots { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.proj-carousel__dot { width: 5px; height: 5px; border-radius: 50%; background: var(--rule); transition: background 0.2s; }
.proj-carousel__dot.is-active { background: var(--black); }

/* ── RESPONSIVE TABLET ────────────────────────────────────── */
@media (max-width: 860px) {
  :root { --col-w: 580px; }
  .topnav__links li + li::before { padding: 0 7px; }
}

/* ── RESPONSIVE MOBILE ────────────────────────────────────── */
@media (max-width: 600px) {
  .topnav { display: none; }

  .mob-burger {
    display: flex;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 60px;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    z-index: 300;  /* above the overlay */
    border: none;
    width: 100%;
    flex-direction: column;
    gap: 5px;
    transform: translateZ(0);  /* own compositing layer — prevents reflow shift */
    will-change: transform;
  }

  .mob-burger__line { display: block; width: 22px; height: 1.5px; background: var(--black); }

  .page { padding-top: 80px; }

  /* On mobile the burger is fixed; push the hero below it.
     flex: 1 on .home-hero still fills all remaining height. */
  body.home { height: 100dvh; }
  .home-hero { margin-top: 60px; }

  .col { padding: 0 16px; }

  .project-list { gap: 32px; }

  .proj-images { display: none; }
  .proj-carousel { display: block; }
  .proj-img-row { display: none; }

  .about-buttons { gap: 8px; }
  .about-btn { padding: 10px 4px; font-size: 14px; }

  .proj-meta__row { flex-wrap: wrap; }
}