/* ============================================================
   kylerosenmeyer.com — Structural Dark Design System
   ============================================================ */

/* ── Google Fonts ──
   Loaded via <link> in each HTML <head> for parallel discovery.
   The @import was removed because it serialises behind the stylesheet download,
   adding 200-500 ms to First Contentful Paint.
   ────────────────────────────────────────────────────────────────────── */

/* ── Design Tokens ── */
:root {
  /* Colors */
  --bg:               #0E0E0E;  /* page base */
  --surface:          #1A1A1A;  /* cards, panels */
  --surface-elevated: #222222;  /* hover states */
  --border:           #2E2E2E;  /* hairline rules */
  --text:             #F2F2F2;  /* primary text */
  --text-muted:       #7A7A7A;  /* captions, labels */
  --accent:           #E8A020;  /* amber — bridge steel */
  --accent-blue:      #4A8FD4;  /* electric blue — links */

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'DM Mono', monospace;

  /* Spacing */
  --max-width: 1200px;
  --padding-x: clamp(1.5rem, 5vw, 4rem);
  --section-gap: 8rem;

  /* Transitions */
  --t-fast:   150ms ease;
  --t-base:   200ms ease;
  --t-slow:   300ms ease;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
}

h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
h3 { font-size: 1.25rem; font-weight: 500; }

p { color: var(--text-muted); max-width: 65ch; }

.mono {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

/* ── Layout Utilities ── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--padding-x);
}

.rule {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Navigation — Liquid Glass ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.5rem var(--padding-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Near-zero tint — blur + distortion carry the visual weight, not opacity.
     rgba(0,0,0,0.42) was burying all backdrop effects. Glass is transparent. */
  background: rgba(10, 10, 10, 0.08);
  /* SVG displacement distorts first (chromatic aberration + lens warp),
     then blur softens the shifted pixels into frosted glass.
     saturate() keeps backdrop colors vivid through the glass surface.        */
  backdrop-filter: url(#nav-glass) blur(15px) saturate(90%);
  -webkit-backdrop-filter: blur(15px) saturate(90%);
  /* Specular highlights — bright top rim + faint bottom edge */
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.40),
    inset 0 -1px 0 rgba(255, 255, 255, 0.10),
    0 1px 0 rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  transition: background var(--t-slow), box-shadow var(--t-slow),
              transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              opacity   0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav.nav-hidden {
  transform: translateY(-110%);
  opacity: 0;
  pointer-events: none;
}

/* Bottom bevel catchlight — bright arc at the glass edge where it meets content.
   This is the strongest visual cue that it's a real glass surface.           */
.nav::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 22px;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 55%,
    rgba(255, 255, 255, 0.18) 78%,
    rgba(255, 255, 255, 0.42) 92%,
    rgba(255, 255, 255, 0.60) 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%, rgba(0,0,0,0.6) 6%, black 16%, black 84%, rgba(0,0,0,0.6) 94%, transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%, rgba(0,0,0,0.6) 6%, black 16%, black 84%, rgba(0,0,0,0.6) 94%, transparent 100%
  );
}

.nav.scrolled {
  background: rgba(10, 10, 10, 0.12);
  backdrop-filter: url(#nav-glass) blur(15px) saturate(90%);
  -webkit-backdrop-filter: blur(15px) saturate(90%);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.24),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-brand {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 0.95;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}


.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  position: relative;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text);
  transition: color var(--t-base);
}

/* amber underline slides in from left on hover */
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width var(--t-base);
}

.nav-links a:hover       { color: var(--text); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active      { color: var(--text); }
.nav-links a.active::after { width: 100%; background: var(--accent); }

/* ── Hero ── */
.hero {
  height: 100vh;
  min-height: 600px;
  position: relative;
  overflow: hidden;              /* clips oversized parallax slides */
  background-color: var(--bg);   /* fallback while JS loads photo */
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  padding: 0 var(--padding-x) clamp(3rem, 8vh, 6rem);
}

.hero-content { max-width: 720px; }

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  line-height: 1.05;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 50ch;
}

.hero-subtitle .dot {
  color: var(--accent);
  margin: 0 0.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: 2px;
  transition: background var(--t-base), color var(--t-base), border-color var(--t-base), transform var(--t-fast);
  cursor: pointer;
  border: 1px solid transparent;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.btn-primary:hover { background: #f0ab2a; border-color: #f0ab2a; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--text-muted); }

/* ── Sections ── */
.section {
  padding: var(--section-gap) 0;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.section-title {
  margin-bottom: 1rem;
}

.section-desc {
  font-size: 1.05rem;
  margin-bottom: 3rem;
}

/* ── Work Cards ── */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
}

.work-card {
  background: var(--surface);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  transition: background var(--t-base);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.work-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform var(--t-slow);
}

.work-card:hover              { background: var(--surface-elevated); }
.work-card:hover::before      { transform: scaleY(1); }

.work-card-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.work-card h3 { color: var(--text); font-size: 1.2rem; }

.work-card p { font-size: 0.9rem; flex: 1; }

.work-card-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-blue);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: gap var(--t-base);
  width: fit-content;
}
.work-card-link:hover { gap: 0.6rem; }

/* ── Photography Grid ── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
}

.photo-grid a {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: block;
  background: var(--surface);
}

.photo-grid img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--t-base), filter var(--t-base);
}

.photo-grid a:hover img {
  transform: scale(1.04);
  filter: brightness(1.08);
}

/* ── GLightbox overrides ── */
.glightbox-clean .gclose,
.glightbox-clean .gnext,
.glightbox-clean .gprev {
  background: var(--surface);
  border: 1px solid var(--border);
}
.goverlay { background: rgba(14, 14, 14, 0.96) !important; }

/* ── Featured Photos (index.html) ── */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  margin-top: 0;
}

.featured-grid a {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  display: block;
  position: relative;
}

.featured-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 2rem 1rem 0.9rem;
  background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, transparent 100%);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.featured-grid a:hover .featured-caption {
  opacity: 1;
  transform: translateY(0);
}

.featured-title {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 500;
  color: #f2f2f2;
  line-height: 1.3;
}

.featured-loc {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.featured-grid img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--t-base), filter var(--t-base);
}

.featured-grid a:hover img {
  transform: scale(1.04);
  filter: brightness(1.08);
}

/* ── Contact Page ── */
.contact-wrap {
  max-width: 560px;
}

.contact-email {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 500;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.25rem;
  transition: border-color var(--t-base), color var(--t-base);
  margin-bottom: 2rem;
}
.contact-email:hover { color: var(--text); border-color: var(--accent); }

.contact-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.contact-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color var(--t-base);
}
.contact-link:hover { color: var(--text); }

/* ── Footer ── */
.footer {
  padding: 3rem var(--padding-x);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-name {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav { gap: 1.25rem; }
  .nav-links { gap: 1.5rem; }

  .photo-grid,
  .featured-grid { grid-template-columns: repeat(2, 1fr); }

  .work-grid { grid-template-columns: 1fr; }

  .footer { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .nav-brand { max-width: 7.5rem; }
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: 0.8rem; }
}
