/* ============================================================
   SHARED — base styles used across all pages
   ============================================================ */


/* ============================================================
   FILM STOCK THEMES
   ============================================================ */

:root,
[data-theme="hp5"] {
  /* Ilford HP5 400 — classic B&W */
  --bg:          #111111;
  --bg-surface:  #1a1a1a;
  --text:        #dedede;
  --text-muted:  #666666;
  --accent:      #ffffff;
  --border:      #2c2c2c;
  --sprocket-bg: #1c1c1c;
}


/* ============================================================
   RESET & BASE
   ============================================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Space Mono', 'Courier New', Courier, monospace;
  font-size: 14px;
  line-height: 1.7;
  transition: background-color 0.3s, color 0.3s;
}

/* Film grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.78' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}


/* ============================================================
   SPROCKET STRIPS
   ============================================================ */

.sprocket {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 36px;
  background-color: var(--sprocket-bg);
  z-index: 500;
  transition: background-color 0.3s;
}

.sprocket-left  { left: 0;  border-right: 1px solid var(--border); }
.sprocket-right { right: 0; border-left:  1px solid var(--border); }

.sprocket::after {
  content: '';
  position: absolute;
  inset: 0;
  left: 7px;
  right: 7px;
  background: repeating-linear-gradient(
    180deg,
    transparent  0px,
    transparent  9px,
    var(--bg)    9px,
    var(--bg)    23px,
    transparent  23px,
    transparent  36px
  );
}


/* ============================================================
   HEADER
   ============================================================ */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  padding: 36px 0 24px;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.3s;
}

.site-branding {
  display: flex;
  flex-direction: column;
}

.back-link {
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--text-muted);
  text-decoration: none;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: inline-block;
  transition: color 0.2s;
}
.back-link:hover { color: var(--accent); }

.site-name {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--accent);
  text-transform: uppercase;
  transition: color 0.3s;
}

.site-subtitle {
  margin-top: 4px;
  font-size: 13px;
  letter-spacing: 0.45em;
  color: var(--text-muted);
  text-transform: uppercase;
  transition: color 0.3s;
}



/* ============================================================
   FOOTER UTILITIES  (shared link style used on every page)
   ============================================================ */

.footer-sep { opacity: 0.4; }

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-link:hover { color: var(--accent); }


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 560px) {
  .sprocket { width: 22px; }

  .sprocket::after {
    left: 4px;
    right: 4px;
    background: repeating-linear-gradient(
      180deg,
      transparent  0px,
      transparent  7px,
      var(--bg)    7px,
      var(--bg)    17px,
      transparent  17px,
      transparent  28px
    );
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
    padding-top: 24px;
  }

  .site-name { font-size: 22px; }
}
