/* ==========================================================================
   Nikita Versal – portfolio
   Plain CSS, no build step. Colors and spacing are defined once in :root.
   ========================================================================== */

:root {
  --bg: #0d0d10;
  --surface: #16161b;
  --surface-2: #1e1e25;
  --border: #2b2b34;
  --text: #ececf2;
  --muted: #a1a1af;
  --accent: #ff6b4a;
  --accent-hover: #ff8a70;
  --accent-ink: #1a0d09;
  --radius: 14px;
  --maxw: 1120px;
  --header-h: 64px;
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

main { flex: 1; }

img { max-width: 100%; display: block; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.container { width: min(100% - 2rem, var(--maxw)); margin-inline: auto; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: .6rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }

/* ---------- Header / navigation ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 13, 16, .85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .02em;
}
.brand:hover { color: var(--text); }
.brand img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }

.site-nav ul { list-style: none; display: flex; gap: .25rem; margin: 0; padding: 0; }
.site-nav a {
  display: block;
  padding: .45rem .85rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: .95rem;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--text); background: var(--surface-2); }
.site-nav a[aria-current="page"] {
  color: var(--text);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: .5rem 1rem 1rem;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { padding: .75rem 1rem; border-radius: 10px; }
}

/* ---------- Generic sections ---------- */

.section { padding-block: clamp(2rem, 6vw, 4rem); }
.section + .section { border-top: 1px solid var(--border); }
.page-title { padding-top: clamp(2rem, 6vw, 3.5rem); }
.page-title .eyebrow { margin-bottom: .4rem; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .78rem;
  color: var(--accent);
  font-weight: 700;
}
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.1rem, 3vw, 1.75rem);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }

.badge {
  display: inline-block;
  padding: .15rem .6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* ---------- Buttons & social ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.2rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 650;
  text-decoration: none;
  border: 1px solid var(--accent);
}
.btn:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn svg { width: 18px; height: 18px; }

.social { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; margin: 1.25rem 0 0; padding: 0; }
.social a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: background .15s, border-color .15s, color .15s;
}
.social a:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.social svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Home ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
  padding-block: clamp(2rem, 7vw, 5rem);
}
.hero-photo {
  aspect-ratio: 1;
  width: 100%;
  object-fit: cover;
  border-radius: 28px;
  border: 1px solid var(--border);
  background: var(--surface);
}
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-photo { max-width: 260px; margin-inline: auto; }
  .hero .social { justify-content: center; }
}

.strengths { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.strengths li {
  display: flex;
  gap: .8rem;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.strengths li::before {
  content: "";
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a0d09' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.cta { text-align: center; }
.cta p { margin-inline: auto; }

/* ---------- Videos ---------- */

.year-title {
  margin: 3rem 0 0;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--accent);
}

.project {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.1rem, 3vw, 1.6rem);
  margin-block: 1.5rem;
}
.project > h3 { font-size: 1.4rem; margin-bottom: 1rem; }
.project-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}
.project-grid.single { grid-template-columns: 1fr; }
@media (max-width: 860px) { .project-grid { grid-template-columns: 1fr; } }

.credits {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: .4rem 1rem;
  margin: 0;
  font-size: .95rem;
}
.credits dt { color: var(--muted); }
.credits dd { margin: 0; }

.project details { border-top: 1px solid var(--border); margin-top: 1.1rem; padding-top: .9rem; }
.project summary { cursor: pointer; font-weight: 600; }
.project summary:hover { color: var(--accent); }
.project details > :not(summary) { margin-top: .8rem; }
.gear { margin: 0; padding-left: 1.2rem; color: var(--muted); font-size: .92rem; }
.gear li + li { margin-top: .2rem; }
.planning p { font-size: .95rem; }
.planning ol { padding-left: 1.3rem; font-size: .95rem; }
.planning li + li { margin-top: .6rem; }
.note { color: var(--muted); font-style: italic; font-size: .92rem; }

.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.video-embed.vertical { aspect-ratio: 9 / 16; max-width: 340px; width: 100%; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.video-play {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: #000;
  cursor: pointer;
  color: #fff;
  text-decoration: none;
}
.video-play img { width: 100%; height: 100%; object-fit: cover; opacity: .88; transition: opacity .2s, transform .3s; }
.video-play:hover img { opacity: 1; transform: scale(1.02); }
.play-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 68px;
  height: 68px;
  margin: -34px 0 0 -34px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .5);
}
.play-icon::after {
  content: "";
  position: absolute;
  left: 27px;
  top: 19px;
  border-left: 22px solid #fff;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
}
.video-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.5rem 1rem .8rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, .75));
  font-size: .9rem;
  font-weight: 600;
}

.video-embed.placeholder {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1rem;
  color: var(--muted);
  background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 12px, var(--surface) 12px, var(--surface) 24px);
}
.video-embed.placeholder p { margin: 0; font-size: .95rem; }

/* ---------- Galleries & lightbox ---------- */

.gallery { columns: 3 240px; column-gap: 12px; margin-top: 1.25rem; }
.gallery a {
  display: block;
  margin: 0 0 12px;
  break-inside: avoid;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  cursor: zoom-in;
}
.gallery img { width: 100%; height: auto; transition: transform .3s, filter .2s; }
.gallery a:hover img { transform: scale(1.03); filter: brightness(1.08); }

.lightbox {
  border: 0;
  padding: 0;
  margin: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  background: transparent;
  color: #fff;
}
.lightbox::backdrop { background: rgba(0, 0, 0, .92); }
.lightbox-stage { position: absolute; inset: 0; display: grid; place-items: center; padding: 3.5rem 1rem; }
.lightbox-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.lb-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 50%;
  background: rgba(20, 20, 24, .7);
  color: #fff;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}
.lb-btn:hover { background: var(--accent); color: var(--accent-ink); }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; left: 50%; bottom: 1rem; transform: translateX(-50%); font-size: .9rem; color: #ccc; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--border); padding-block: 2rem; color: var(--muted); font-size: .92rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.site-footer .social { margin: 0; }
.site-footer .social a { width: 38px; height: 38px; }
.site-footer .social svg { width: 18px; height: 18px; }

/* ---------- 404 ---------- */

.not-found { text-align: center; padding-block: 6rem; }
.not-found h1 { font-size: clamp(4rem, 14vw, 8rem); color: var(--accent); margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
