/* Pollioni sports portfolio — design tokens carried over from the Winder app */
:root {
  --bg: #000000;
  --panel: #1c1c1e;
  --tile: #252528;
  --line: rgba(255, 255, 255, 0.09);
  --hi: #f4f4f6;
  --tx: #c9c9ce;
  --mid: #8a8a90;
  --dim: #5e5e64;
  --brand: #f26a1f;
  --header-h: 72px;
}

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

html, body {
  background: var(--bg);
  color: var(--tx);
  font-family: 'Hanken Grotesk', -apple-system, 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { display: block; }

/* ---------- header ---------- */

#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 28px;
  height: var(--header-h);
}

/* dissolve band: solid black only to the bottom of the nav text, then a
   smooth fade — its only job is to keep the nav readable.
   --band-solid = where solid black ends (nav text sits ~centered in the header,
   so this lands just under the letters). */
:root { --band-solid: calc(var(--header-h) - 26px); }

#header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: calc(var(--band-solid) + 115px);
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(to bottom,
    #000 0,
    #000 var(--band-solid),
    rgba(0, 0, 0, 0.78) calc(var(--band-solid) + 22px),
    rgba(0, 0, 0, 0.55) calc(var(--band-solid) + 45px),
    rgba(0, 0, 0, 0.32) calc(var(--band-solid) + 68px),
    rgba(0, 0, 0, 0.14) calc(var(--band-solid) + 90px),
    rgba(0, 0, 0, 0) calc(var(--band-solid) + 110px));
}

.logo img { height: 24px; width: auto; }

#nav {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

#nav a {
  color: var(--hi);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-shadow: 0 1px 6px rgba(0,0,0,0.6);
  transition: color 0.2s;
}

#nav a:hover { color: var(--brand); }
#nav a.active { color: var(--brand); }

@media (max-width: 600px) {
  /* stacked logo + nav sit lower, so solid black must reach further down */
  :root { --header-h: 92px; --band-solid: calc(var(--header-h) - 10px); }
  #header {
    flex-direction: column;
    justify-content: center;
    padding: 12px 16px 0;
    gap: 12px;
  }
  .logo img { height: 20px; }
  #nav { gap: 18px; justify-content: center; }
  #nav a { font-size: 11px; letter-spacing: 0.18em; }
}

/* ---------- home / hero ---------- */

/* hero starts at the bottom of the solid black band so no part of the
   photo hides behind it; the band's fade tail overlaps the photo's top
   edge like a dissolve */
.hero {
  position: fixed;
  top: var(--band-solid);
  left: 0; right: 0; bottom: 0;
  overflow: hidden;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* fill the screen; each photo's focal point (from home/focal.txt) stays
     centered — smart default is center, one-third down */
  object-fit: cover;
  object-position: 50% 30%;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero img.show { opacity: 1; }

/* the vignette fade Parnell liked */
.hero .vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,0) 55%, rgba(0,0,0,0.5) 100%),
    linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0) 34%);
  pointer-events: none;
}

.hero .byline {
  position: absolute;
  left: 32px;
  bottom: 34px;
}

.hero .byline h1 {
  color: var(--hi);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero .byline p {
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  margin-top: 6px;
}

@media (max-width: 600px) {
  .hero .byline { left: 20px; bottom: 26px; }
  .hero .byline h1 { font-size: 19px; }
  .hero .byline p { font-size: 10px; }
}

/* ---------- gallery ---------- */

/* grid starts just below the dissolve band so photos aren't darkened at rest */
.page {
  padding: calc(var(--header-h) + 70px) 28px 60px;
  max-width: 1500px;
  margin: 0 auto;
}

.grid {
  columns: 3;
  column-gap: 14px;
}

@media (max-width: 1000px) { .grid { columns: 2; } }
@media (max-width: 600px)  { .grid { columns: 1; } .page { padding-left: 14px; padding-right: 14px; } }

.grid figure {
  break-inside: avoid;
  margin: 0 0 14px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  background: var(--panel);
}

.grid img {
  width: 100%;
  height: auto;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.grid figure:hover img { transform: scale(1.02); filter: brightness(1.08); }

/* ---------- about ---------- */

.about {
  max-width: 640px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 60px) 24px 80px;
  text-align: center;
}

.about h1 {
  color: var(--hi);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.about .role {
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-top: 8px;
}

.about .bio {
  margin-top: 36px;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.75;
  color: var(--tx);
  text-align: left;
}

.about .bio p + p { margin-top: 18px; }

.about .sect {
  margin-top: 44px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-align: left;
}

.about .gear {
  margin-top: 14px;
  list-style: none;
  text-align: left;
  font-size: 15px;
  font-weight: 300;
  line-height: 2;
  color: var(--tx);
}

.about .gear-note {
  margin-top: 14px;
  text-align: left;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--mid);
}

.about .refs {
  margin-top: 14px;
  text-align: left;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.9;
  color: var(--tx);
}

.about .refs-note {
  margin-top: 6px;
  font-size: 13px;
  color: var(--mid);
}

.about .contact {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  letter-spacing: 0.06em;
}

.about .contact a { color: var(--hi); text-decoration: none; }
.about .contact a:hover { color: var(--brand); }

.about .foot {
  margin-top: 56px;
  color: var(--dim);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* ---------- light theme (About page) ---------- */

body.light { background: #ffffff; }

body.light #header {
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.light #header::before { display: none; }

body.light #nav a {
  color: #1a1a1a;
  text-shadow: none;
}

body.light #nav a:hover,
body.light #nav a.active { color: var(--brand); }

/* deeper, punchier orange for use on white */
body.light { --brand-deep: #d9520a; }

body.light .about h1 { color: #0c0c0e; }
body.light .about .role { color: var(--brand-deep); font-weight: 700; }
body.light .about .bio,
body.light .about .gear,
body.light .about .refs {
  color: #17171a;
  font-weight: 400;
}
body.light .about .sect {
  color: var(--brand-deep);
  font-weight: 700;
  font-size: 13px;
}
body.light .about .gear-note,
body.light .about .refs-note { color: #45454b; }
body.light .about .contact { border-top: 1px solid rgba(0, 0, 0, 0.12); }
body.light .about .contact a { color: #0c0c0e; font-weight: 500; }
body.light .about .contact a:hover { color: var(--brand-deep); }
body.light .about .foot { color: #85858c; }

/* ---------- lightbox ---------- */

#lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.97);
  touch-action: pan-y;
}

.lb-img {
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lb-img.show { opacity: 1; }

.lb-btn {
  position: absolute;
  z-index: 102;
  background: none;
  border: none;
  color: var(--mid);
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  transition: color 0.2s;
  padding: 14px;
}

.lb-btn:hover { color: var(--brand); }

.lb-close { top: 10px; right: 12px; font-size: 34px; font-weight: 300; }
.lb-prev, .lb-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 52px;
  font-weight: 300;
}
.lb-prev { left: 8px; }
.lb-next { right: 8px; }

@media (max-width: 600px) {
  /* on phones you swipe — hide the big arrows */
  .lb-prev, .lb-next { display: none; }
}

.lb-counter {
  position: absolute;
  bottom: 14px;
  left: 0; right: 0;
  text-align: center;
  color: var(--dim);
  font-size: 12px;
  letter-spacing: 0.24em;
}
