/* ==========================================================
   site.css — Cleaned, deduped, and production-ready
   - root variables for easy theme tweaks
   - consistent layout/container rules
   - accessible focus outlines
   - hero full-bleed helper
   - responsive project grid with overlay hover
   ========================================================== */

/* ---------- Root variables & box-sizing ---------- */
:root{
  --max-content-width: 1180px;
  --text-color: #222;
  --muted: #666;
  --card-bg: #fff;
  --accent: #007bff;
  --surface-shadow: 0 8px 24px rgba(0,0,0,0.08);
  --site-header-height: 64px; /* adjust if header size changes */
}

/* predictable sizing model across all elements */
*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

/* ---------- Base ---------- */
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  background: linear-gradient(180deg,#fafafa 0%, #f5f5f7 100%);
  color: var(--text-color);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* anchor defaults */
a { color: inherit; text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

/* ---------- Layout container ---------- */
/* central content width used across the site */
.container {
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* ensure content clears sticky header (keeps content visible) */
main.container {
  padding-top: calc(var(--site-header-height) + 12px);
}

/* small helper for block sections */
section { margin-bottom: 80px; }

/* ---------- Header / Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  min-height: var(--site-header-height);
}

/* brand column: logo + optional subtitle */
.site-header .site-brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.site-header .logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: #111;
  text-decoration: none;
}
.site-header .site-subtitle {
  font-size: 0.9rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* nav */
.site-header .nav { display: flex; gap: 18px; align-items: center; }
.site-header .nav a {
  font-size: 0.95rem;
  color: #222;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background .18s ease, color .18s ease;
}
.site-header .nav a:hover { background: rgba(0,0,0,0.06); }
.site-header .nav a.active {
  background: rgba(0,0,0,0.1);
  font-weight: 600;
}

/* accessible focus styles */
.site-header .nav a:focus {
  outline: 3px solid rgba(0,123,255,0.18);
  outline-offset: 4px;
}

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
  padding: 24px;
  border-top: 1px solid #eee;
  margin-top: 60px;
}

/* ---------- Embedded media (video/iframe) ---------- */
.embed {
  position: relative;
  width: 100%;
  max-width: 920px;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  margin: 24px auto;
  box-shadow: var(--surface-shadow);
}
.embed iframe,
.embed video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

/* ---------- Homepage tagline & bio ---------- */
.tagline {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 0 16px;
  text-align: center;
}

/* Keep homepage-bio in DOM for SEO/ARIA.
   To hide visually but keep accessible, add class "hidden-visually". */
.homepage-bio {
  max-width: 720px;
  margin: 0 auto 40px;
  text-align: center;
  font-size: 1.1rem;
  line-height: 1.8;
  color: #555;
}

/* visually-hidden utility — keeps content available to assistive tech */
.hidden-visually {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px,1px,1px,1px);
  white-space: nowrap;
}

/* ---------- Centered hero card ---------- */
.hero {
  background: var(--card-bg);
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  margin: 40px 0;
  text-align: center;
}
.hero-title {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 1rem;
  font-style: italic;
}

/* ---------- Hero split (text left / video right) ---------- */
.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
  max-width: 1200px;
  margin: 40px auto 80px;
  padding: 0 24px;
  box-sizing: border-box;
}
.hero-text { max-width: 600px; }
.hero-split .tagline { font-size: 1.8rem; font-weight: 700; margin-bottom: 16px; }
.hero-split .homepage-bio { font-size: 1rem; color: #444; line-height: 1.6; }

/* hero video box */
.hero-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.hero-video iframe,
.hero-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Full-bleed hero helper ----------
   Add the `full-bleed` class to .hero to make a player truly edge-to-edge.
   Example: <section class="hero full-bleed"> ... </section>
   The negative top margin pulls the hero up under the sticky header — remove if you prefer spacing.
---------------------------------------------- */
.hero.full-bleed {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  padding: 24px 0;
  box-sizing: border-box;
  background: transparent;
  margin-top: calc(-1 * (var(--site-header-height) + 12px));
}
.hero.full-bleed .embed {
  max-width: none;
  width: 100%;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}
.hero.full-bleed .embed iframe,
.hero.full-bleed .embed video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ---------- Projects grid (improved layout for cinematic thumbs) ---------- */
.proj-grid,
.projects-grid .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 28px;
  align-items: start; /* keep cards aligned to top */
}

/* card wrapper */
.proj-card {
  position: relative;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  background: var(--card-bg);
  box-shadow: 0 6px 18px rgba(15,15,15,0.03);
  transition: transform .18s ease, box-shadow .18s ease;
  color: inherit;
  text-decoration: none;
}

/* thumbnail image — use aspect-ratio to produce a consistent 16:9 crop,
   object-fit ensures center cropping for odd aspect ratios */
.proj-card .thumb {
  display:block;
  width:100%;
  aspect-ratio: 16/9;    /* default visual aspect (change if you want 2.4:1) */
  height: auto;
  object-fit: cover;
  object-position: center;
  transition: transform .35s ease, filter .25s ease;
  background: #efefef;   /* shows while image is loading */
}

/* card body below thumb */
.proj-card .card-body {
  padding: 14px 16px;
}

/* featured tile: spans two columns on wide screens, uses a wider ratio */
.proj-card.featured {
  grid-column: span 2;
  min-height: 420px;
}
@media (max-width: 980px) {
  .proj-card.featured { grid-column: span 1; }
}
.proj-card.featured .thumb {
  aspect-ratio: 21/9;    /* cinematic wide for featured */
  min-height: 360px;
}

/* overlay + hover effect */
.proj-card .overlay { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; opacity:0; transition:opacity .22s ease, background .22s ease; pointer-events:none;}
.proj-card:hover .overlay, .proj-card:focus .overlay { opacity:1; pointer-events:auto; background: rgba(255,255,255,0.35); }
.proj-card:hover { transform: translateY(-4px); box-shadow:0 12px 28px rgba(15,15,15,0.08); }
.proj-card:hover .thumb { transform: scale(1.03); filter: grayscale(.12) brightness(.92); }

/* small screens */
@media (max-width: 720px) {
  .proj-card .thumb { aspect-ratio: 16/9; min-height: 180px; }
  .proj-card.featured { grid-column: span 1; min-height: 320px; }
}

/* ---------- Project detail, gallery, pages, contact ---------- */
.project h1 { margin: 6px 0 8px; font-size: 2rem; }
.project .meta { color: var(--muted); margin-bottom: 12px; }
.project .body { margin: 16px 0; max-width: 920px; line-height: 1.7; }
.hero-img { width: 100%; display: block; border-radius: 12px; margin: 20px 0; }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.gallery img { width: 100%; height: auto; border-radius: 10px; display: block; }

/* pages */
.page { max-width: 800px; margin: 0 auto; padding: 20px; }
.page h1 { font-size: 2rem; margin-bottom: 20px; }
.page-hero { max-width: 640px; margin: 20px auto; display: block; border-radius: 12px; }
.page-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin: 20px 0; }
.page-gallery img { width: 100%; height: auto; border-radius: 8px; }

/* contact */
.contact-form { margin-top: 20px; display: grid; gap: 12px; }
.contact-form label { font-weight: 500; color: #444; }
.contact-form input, .contact-form textarea {
  width: 100%;
  max-width: 640px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font: inherit;
}
.contact-form button {
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  border: 0;
  cursor: pointer;
  transition: background .18s ease;
}
.contact-form button:hover { background: #0056b3; }

/* utility: visually hidden (alternative) */
.sr-only { position: absolute !important; height: 1px; width: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }

/* end of file */