/* ============================================
   Marijana Janjic Portfolio — Global Styles
   ============================================ */

:root {
  --bg:         #212121;
  --bg-card:    #1a1a1a;
  --text:       #ffffff;
  --text-muted: #aaaaaa;
  --border:     #2a2a2a;
  --nav-height: 60px;
  --font:       'Helvetica Neue', Arial, sans-serif;
  --transition: 0.25s 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);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img, gif { display: block; max-width: 100%; }

/* ============================================
   NAV
   ============================================ */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #191919;
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav-inner {
  width: 100%;
  max-width: 1100px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 24px;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 17px;
  letter-spacing: normal;
  text-transform: none;
  color: var(--text-muted);
  transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a.active { color: var(--text); }

.nav-title {
  text-align: center;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: normal;
  white-space: nowrap;
}

/* ============================================
   PAGE WRAPPER
   ============================================ */
.page {
  padding-top: var(--nav-height);
  min-height: 100vh;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   HERO (home page) — fixed behind content
   ============================================ */
.hero {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--nav-height) 24px 0;
  z-index: 0;
  pointer-events: none;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.hero p {
  color: var(--text-muted);
  font-size: 15px;
}

.hero-chevron {
  position: absolute;
  bottom: 40px;
  left: 50%;
  width: 14px;
  height: 14px;
  border-right: 1.5px solid var(--text-muted);
  border-bottom: 1.5px solid var(--text-muted);
  transform: translateX(-50%) rotate(45deg);
}

/* Content layer: scrolls over the fixed hero */
.home-content {
  position: relative;
  z-index: 1;
  background: var(--bg);
  margin-top: 80vh;
}

/* ============================================
   CATEGORY GRID (home page)
   ============================================ */
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  max-width: 1100px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); }
}

.category-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--bg-card);
  cursor: pointer;
  display: block;
}

.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, opacity var(--transition);
  opacity: 0.85;
}

.category-card:hover img {
  transform: scale(1.04);
  opacity: 1;
}

.card-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 40px 20px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  pointer-events: none;
}

.card-label h2 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.card-label span {
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================
   GALLERY PAGE
   ============================================ */
.gallery-header {
  text-align: center;
  padding: 60px 24px 40px;
}

.gallery-header h1 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.gallery-header p {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 6px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  max-width: 1100px;
  margin: 0 auto 80px;
  padding: 0 24px;
  align-items: start;
}

/* Section gap: used when multiple gallery-grids appear on one page (Overpaint) */
.gallery-grid--section {
  margin-bottom: 24px;
}

/* Featured layout: first item spans full width (Game Assets, Textures) */
.gallery-grid--featured .gallery-item:first-child {
  grid-column: 1 / -1;
}

/* Stacked layout: every item spans full width (UI) */
.gallery-grid--stacked .gallery-item {
  grid-column: 1 / -1;
}

/* ============================================
   JUSTIFIED GALLERY (VFX)
   Each row's images share the same height;
   widths are proportional to aspect ratio.
   ============================================ */
.gallery-justified {
  max-width: 1100px;
  margin: 0 auto 80px;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gallery-row {
  display: flex;
  gap: 4px;
  align-items: flex-start;
}

.gallery-row--solo {
  justify-content: center;
}

.gallery-row--solo .gallery-item {
  width: 50%;
}

/* Center lone last item when total count is odd (non-featured grids) */
.gallery-grid:not(.gallery-grid--featured) .gallery-item:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  max-width: 50%;
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease, opacity var(--transition);
  opacity: 0.9;
}

.gallery-item:hover img {
  transform: scale(1.03);
  opacity: 1;
}

/* ============================================
   ABOUT PAGE
   ============================================ */
.about-layout {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 60px;
  padding: 60px 0 80px;
  align-items: start;
}

.about-images {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.about-images img {
  width: 100%;
  object-fit: cover;
}

.about-content h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.about-content p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 40px;
}

.about-section {
  margin-bottom: 40px;
}

.about-section h3 {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  list-style: none;
}

.skills-list li {
  font-size: 13px;
  padding: 6px 16px;
  border: 1.5px solid #606060;
  border-radius: 3px;
  color: var(--text);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.about-images img:first-child {
  max-width: 200px;
  display: block;
  margin: 0 auto;
}

.about-photo-caption {
  padding: 10px 0 20px;
  text-align: center;
}

.about-job-title {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.about-location {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
}

.experience-item {
  margin-bottom: 28px;
}

.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 8px;
}

.experience-item .role {
  font-size: 14px;
  font-weight: 600;
}

.experience-item .company-date {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.duties-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.duties-list li {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.9;
  padding-left: 20px;
  position: relative;
}

.duties-list li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

/* ============================================
   CONTACT PAGE
   ============================================ */
.contact-page {
  display: flex;
  justify-content: center;
  padding: 60px 24px 100px;
  min-height: calc(100vh - var(--nav-height));
}

.contact-wrap {
  width: 100%;
  max-width: 480px;
}

.contact-heading {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.form-field input,
.form-field textarea {
  background: var(--bg-card);
  border: 1px solid #3a3a3a;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  padding: 10px 14px;
  outline: none;
  resize: vertical;
  transition: border-color var(--transition);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: #555;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: #666;
}

.contact-submit {
  align-self: flex-start;
  background: #f0f0f0;
  color: #444;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  padding: 9px 28px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.contact-thanks {
  margin-top: 24px;
  font-size: 15px;
  color: var(--text-muted);
}

.contact-submit:hover {
  background: #ffffff;
  color: #222;
  border-color: #bbb;
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.lightbox.active { display: flex; }

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  box-shadow: 0 0 60px rgba(0,0,0,0.8);
}

.lightbox-close {
  position: absolute;
  top: 20px; right: 28px;
  font-size: 32px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  transition: color var(--transition);
  background: none;
  border: none;
}

.lightbox-close:hover { color: var(--text); }

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 28px;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  padding: 16px;
  transition: color var(--transition);
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-prev:hover,
.lightbox-next:hover { color: var(--text); }

/* ============================================
   YOU MAY ALSO LIKE
   ============================================ */
.also-like {
  max-width: 1100px;
  margin: 0 auto 80px;
  padding: 0 24px;
}

.also-like h3 {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-bottom: 16px;
}

.also-like-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}

.also-like-card {
  display: block;
  background: var(--bg-card);
  overflow: hidden;
  text-decoration: none;
}

.also-like-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  opacity: 0.85;
  transition: opacity var(--transition), transform 0.4s ease;
}

.also-like-card:hover img {
  opacity: 1;
  transform: scale(1.04);
}

.also-like-label {
  padding: 10px 12px 12px;
  text-align: center;
}

.also-like-label strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

.also-like-label span {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  position: relative;
  z-index: 1;
  background: var(--bg);
  text-align: center;
  padding: 32px 24px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid #383838;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .about-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .nav-title { font-size: 13px; }
  .nav-links a { font-size: 14px; }

  .gallery-grid {
    padding: 0 12px;
    gap: 3px;
  }

  /* You may also like: 3 columns at tablet */
  .also-like-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .category-grid { grid-template-columns: 1fr; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 13px; }
  .nav-title { display: none; }

  .gallery-grid {
    grid-template-columns: 1fr;
    padding: 0 12px;
  }

  /* On single-column mobile, centering rules don't apply */
  .gallery-grid:not(.gallery-grid--featured) .gallery-item:last-child:nth-child(odd) {
    grid-column: auto;
    max-width: 100%;
    margin: 0;
  }

  /* Featured first item stays full-width (same as the only column) */
  .gallery-grid--featured .gallery-item:first-child {
    grid-column: auto;
  }

  /* VFX justified rows stack vertically on mobile */
  .gallery-row {
    flex-direction: column;
  }

  .gallery-row .gallery-item {
    flex: none !important;
    width: 100%;
  }

  .gallery-row--solo .gallery-item {
    width: 100%;
  }

  /* You may also like: 2 columns on mobile */
  .also-like-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Hero height on small screens */
  .hero { height: 70vh; }
  .home-content { margin-top: 70vh; }
}
