/*
Theme Name:        Sydeikis Portfolio
Theme URI:         https://sydeikis.com
Author:            Rokas Sydeikis
Description:       Cinematographer portfolio — Raleway, white windowed layout, sticky header, hover-overlay grid, Vimeo embed with credits and stills.
Version:           2.1.0
Requires at least: 6.0
Requires PHP:      7.4
Text Domain:       sydeikis
*/

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

:root {
  --bg:    #ffffff;
  --fg:    #0a0a0a;
  --dim:   #999;
  --line:  rgba(0,0,0,0.07);
  --pad:   28px;   /* header & page side padding */
}

html { scroll-behavior: smooth; }

/* ── outer body ── */
body {
  background: #ffffff;
  color: var(--fg);
  font-family: 'Raleway', sans-serif;
  font-weight: 400;
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  padding: 0;
}

a { color: inherit; text-decoration: none; }

/* ────────────────────────────────────────
   WINDOWED WRAP
   Smaller max-width so it reads as a
   deliberate column on wide screens.
──────────────────────────────────────── */
#site-wrap {
  max-width: 1160px;
  margin: 0 auto;
  background: var(--bg);
  min-height: 100vh;

}

/* ────────────────────────────────────────
   HEADER — name left, nav right
──────────────────────────────────────── */
#header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad);
  height: 52px;
}

.brand {
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg);
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
}

nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-link {
  font-family: 'Raleway', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  position: relative;
  transition: color 0.18s;
  white-space: nowrap;
  line-height: 1;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: -4px;
  height: 1px;
  background: var(--fg);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.nav-link:hover { color: var(--fg); }
.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }
.nav-link.active { color: var(--fg); }

/* ────────────────────────────────────────
   GRID
──────────────────────────────────────── */
#page-home {
  padding: 0 var(--pad) 60px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

/* Each item is just the thumbnail + overlay — no text below */
.grid-item {
  position: relative;
  cursor: pointer;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #ddd;
}

.grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.3s ease;
}

.grid-item:hover img {
  filter: brightness(0.5);
}

/* Overlay fades in on hover — client name + title centred on image */
.grid-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.grid-item:hover .grid-overlay { opacity: 1; }

.overlay-client {
  font-family: 'Raleway', sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}

.overlay-title {
  font-family: 'Raleway', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  text-align: center;
  padding: 0 20px;
  line-height: 1.4;
}

/* ────────────────────────────────────────
   PROJECT PAGE
──────────────────────────────────────── */
#page-project {
  display: none;
  padding: 28px var(--pad) 80px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'Raleway', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-bottom: 24px;
  transition: color 0.18s;
}
.back-btn:hover { color: var(--fg); }
.back-btn svg { width: 12px; height: 12px; }

.project-embed {
  width: 100%;
  aspect-ratio: 16/9;
  background: #111;
  margin-bottom: 18px;
}
.project-embed iframe,
.project-embed img {
  width: 100%; height: 100%;
  border: none; display: block;
  object-fit: cover;
}

.project-title-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.project-client {
  font-family: 'Raleway', sans-serif;
  font-size: 24px;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg);
}

.project-title-row .sep { color: var(--fg); font-weight: 700; }

.project-title {
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: var(--fg);
}

.credits {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0 20px;
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.credit-col .clabel {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 6px;
}

.credit-col .cvalue {
  font-size: 12px;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.5;
}

.credit-col .cvalue:empty::before {
  content: '—';
  color: #ddd;
}

.stills-heading {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 12px;
}

.stills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 3px;
  row-gap: 12px;
}

.still-wide { grid-column: 1 / -1; }

.still-item {
  overflow: hidden;
  aspect-ratio: 16/9;
  background: #e0e0e0;
}

.still-item img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 0.5s;
}
.still-item:hover img { transform: scale(1.02); }

.stills-empty {
  grid-column: 1/-1;
  font-size: 11px;
  font-weight: 300;
  color: var(--dim);
  font-style: normal;
  padding: 10px 0;
}

/* ────────────────────────────────────────
   CONTACT
──────────────────────────────────────── */
#page-contact {
  display: none;
  padding: 44px var(--pad) 80px;
  max-width: 480px;
}

#page-contact h2 {
  font-family: 'Raleway', sans-serif;
  font-weight: 300;
  font-size: 32px;
  color: var(--fg);
  margin-bottom: 40px;
}

.agency { margin-bottom: 36px; }

.agency-region {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 5px;
}

.agency-name {
  font-family: 'Raleway', sans-serif;
  font-weight: 300;
  font-size: 18px;
  color: var(--fg);
  margin-bottom: 10px;
}

.agency a {
  display: block;
  font-size: 11px;
  font-weight: 300;
  color: #555;
  margin-bottom: 4px;
  transition: color 0.18s;
}
.agency a:hover { color: var(--fg); }

.contact-note {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  margin-top: 40px;
}

/* ────────────────────────────────────────
   FOOTER
──────────────────────────────────────── */
footer {
  padding: 16px var(--pad);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}

.footer-ig {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--dim);
  transition: color 0.18s;
}
.footer-ig:hover { color: var(--fg); }
.footer-ig svg { width: 13px; height: 13px; }

/* ────────────────────────────────────────
   RESPONSIVE
──────────────────────────────────────── */
@media (max-width: 860px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .credits { grid-template-columns: repeat(3, 1fr); gap: 18px; }
}

@media (max-width: 520px) {
  :root { --pad: 14px; }
  #header { height: 46px; }
  .brand { font-size: 11px; }
  nav { gap: 14px; }
  .nav-link { font-size: 9px; }
  .grid { grid-template-columns: 1fr; row-gap: 16px; }
  .credits { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .project-title { font-size: 17px; }
  .stills-grid { grid-template-columns: 1fr; }
  .still-wide { grid-column: 1; }
}
