/* ============================================
   CSS CUSTOM PROPERTIES — THEMES
   ============================================ */

:root {
  --transition-theme: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

[data-theme="dark"] {
  --bg: #0d0d0d;
  --bg-card: #111111;
  --surface: #1a1a1a;
  --border-subtle: #1c1c1c;
  --text-primary: #f0ede8;
  --text-secondary: #888880;
  --text-muted: #555550;
  --tag-bg: #1e1e1e;
  --tag-text: #888880;
  --input-bg: #161616;
  --input-border: #2a2a2a;
  --input-focus: #444440;
  --overlay-bg: rgba(0,0,0,0.55);
  --thumb-bg: #161616;
}

[data-theme="light"] {
  --bg: #f5f3ef;
  --bg-card: #ffffff;
  --surface: #f0ede8;
  --border-subtle: #e8e5e0;
  --text-primary: #1a1a18;
  --text-secondary: #666660;
  --text-muted: #aaaaaa;
  --tag-bg: #eae8e3;
  --tag-text: #666660;
  --input-bg: #ffffff;
  --input-border: #dddbd6;
  --input-focus: #aaaaaa;
  --overlay-bg: rgba(0,0,0,0.25);
  --thumb-bg: #e5e3df;
}

/* ============================================
   RESET & BASE
   ============================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  transition: var(--transition-theme);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* ============================================
   HEADER
   ============================================ */

.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.75rem clamp(1.5rem, 5vw, 4rem);
  position: sticky; top: 0; z-index: 100;
  background-color: var(--bg);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition-theme);
}

.logo {
  font-family: 'Bebas Neue', sans-serif; font-size: 1.4rem;
  letter-spacing: 0.12em; color: var(--text-primary); transition: color 0.2s;
}
.logo:hover { color: var(--text-secondary); }

.nav { display: flex; align-items: center; gap: 2rem; }

.nav-link {
  font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-secondary); transition: color 0.2s;
  position: relative; padding-bottom: 2px;
}
.nav-link::after {
  content: ''; position: absolute; bottom: -3px; left: 0;
  width: 0; height: 1px; background: var(--text-primary);
  transition: width 0.25s ease;
}
.nav-link:hover, .nav-link.active { color: var(--text-primary); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.theme-toggle {
  background: none; border: 1px solid var(--input-border);
  color: var(--text-secondary); width: 2rem; height: 2rem;
  border-radius: 50%; cursor: pointer; display: flex;
  align-items: center; justify-content: center; font-size: 0.9rem;
  transition: all 0.25s;
}
.theme-toggle:hover { border-color: var(--text-secondary); color: var(--text-primary); }

/* ============================================
   LAYOUT
   ============================================ */

main {
  flex: 1;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* ============================================
   HOME — HERO
   ============================================ */

.hero { padding: clamp(3.5rem, 7vw, 7rem) 0 clamp(2.5rem, 4vw, 4rem); }

.hero-label {
  font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 1rem;
}

.hero-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(4rem, 10vw, 9rem);
  line-height: 0.92; letter-spacing: 0.01em; color: var(--text-primary);
}
.hero-title em { font-style: italic; color: var(--text-secondary); }

/* ============================================
   HOME — PROJECT GRID
   ============================================ */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1px solid var(--border-subtle);
  margin-bottom: 5rem;
}

@media (max-width: 900px) { .projects-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .projects-grid { grid-template-columns: 1fr; } }

.project-card {
  background: var(--bg-card);
  opacity: 0; transform: translateY(16px);
  animation: fadeUp 0.5s ease forwards;
}
.project-card:nth-child(1)  { animation-delay: 0.03s; }
.project-card:nth-child(2)  { animation-delay: 0.06s; }
.project-card:nth-child(3)  { animation-delay: 0.09s; }
.project-card:nth-child(4)  { animation-delay: 0.12s; }
.project-card:nth-child(5)  { animation-delay: 0.15s; }
.project-card:nth-child(6)  { animation-delay: 0.18s; }
.project-card:nth-child(7)  { animation-delay: 0.21s; }
.project-card:nth-child(8)  { animation-delay: 0.24s; }
.project-card:nth-child(9)  { animation-delay: 0.27s; }
.project-card:nth-child(10) { animation-delay: 0.30s; }
.project-card:nth-child(11) { animation-delay: 0.33s; }
.project-card:nth-child(12) { animation-delay: 0.36s; }
.project-card:nth-child(13) { animation-delay: 0.39s; }
.project-card:nth-child(14) { animation-delay: 0.42s; }
.project-card:nth-child(15) { animation-delay: 0.45s; }
.project-card:nth-child(16) { animation-delay: 0.48s; }

@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

.card-link { display: block; }

.card-thumb {
  position: relative; aspect-ratio: 16/9;
  overflow: hidden; background: var(--thumb-bg);
}

.card-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s ease;
}

.card-thumb-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted);
}

.card-overlay {
  position: absolute; inset: 0; background: var(--overlay-bg);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s ease;
}
.card-play { font-size: 1.4rem; color: white; opacity: 0.9; }

.project-card:hover .card-overlay { opacity: 1; }
.project-card:hover .card-thumb img { transform: scale(1.03); }

.card-info {
  padding: 1.2rem 1.4rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
}
.card-title {
  font-size: 0.95rem; font-weight: 400;
  color: var(--text-primary); margin-bottom: 0.25rem;
}
.card-meta { font-size: 0.72rem; color: var(--text-muted); letter-spacing: 0.04em; }

/* ============================================
   PROJECT PAGE
   ============================================ */

.project-main {
  padding-top: 2.5rem;
  padding-bottom: 6rem;
}

.back-link {
  display: inline-block; font-size: 0.72rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 2.5rem;
  transition: color 0.2s;
}
.back-link:hover { color: var(--text-primary); }

.project-header { margin-bottom: 2.5rem; }

.project-meta-row { display: flex; gap: 0.6rem; margin-bottom: 1.2rem; flex-wrap: wrap; }

.project-tag {
  font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--tag-text); background: var(--tag-bg);
  padding: 0.28rem 0.75rem; border-radius: 2px;
}

.project-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3.5rem, 8vw, 7.5rem);
  line-height: 0.92; color: var(--text-primary); letter-spacing: 0.01em;
}
.project-title em { font-style: italic; color: var(--text-secondary); }

.project-subtitle {
  font-size: 1rem; color: var(--text-secondary);
  font-weight: 300; margin-top: 1rem; max-width: 560px;
}

/* VIDEO */
.video-feature { margin-bottom: 4rem; }

.video-wrap {
  position: relative; width: 100%; aspect-ratio: 16/9;
  background: #000; border-radius: 2px; overflow: hidden;
}
.video-wrap iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: none;
}

.video-placeholder {
  width: 100%; height: 100%; background: var(--surface);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 0.75rem;
  aspect-ratio: 16/9;
}
.video-placeholder-icon { font-size: 2rem; opacity: 0.15; }
.video-placeholder-text {
  font-size: 0.72rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-muted);
}

/* PROJECT BODY */
.project-body {
  display: grid; grid-template-columns: 1fr 220px; gap: 4rem;
  padding-bottom: 4rem; border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 4rem;
}
@media (max-width: 700px) { .project-body { grid-template-columns: 1fr; gap: 2rem; } }

.project-description p {
  font-size: 0.97rem; line-height: 1.78;
  color: var(--text-secondary); margin-bottom: 1.1rem;
}
.project-description p:last-child { margin-bottom: 0; }

.details-list {
  display: grid; grid-template-columns: auto 1fr;
  gap: 0.5rem 1.25rem; font-size: 0.82rem;
}
.details-list dt {
  color: var(--text-muted); letter-spacing: 0.08em;
  text-transform: uppercase; font-size: 0.68rem; padding-top: 0.1rem;
}
.details-list dd { color: var(--text-secondary); }

/* PROJECT NAV */
.project-nav {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px; border: 1px solid var(--border-subtle);
}
.project-nav-link {
  padding: 1.75rem; display: flex; flex-direction: column; gap: 0.35rem;
  background: var(--bg-card); transition: background 0.2s;
}
.project-nav-link:hover { background: var(--surface); }
.project-nav-link.next { text-align: right; border-left: 1px solid var(--border-subtle); }
.nav-dir {
  font-size: 0.68rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-muted);
}
.nav-title { font-size: 0.9rem; color: var(--text-primary); }

@media (max-width: 560px) {
  .project-nav { grid-template-columns: 1fr; }
  .project-nav-link.next { text-align: left; border-left: none; border-top: 1px solid var(--border-subtle); }
}

/* ============================================
   CONTACT PAGE
   ============================================ */

.contact-hero { padding: clamp(3rem, 6vw, 6rem) 0 clamp(2.5rem, 4vw, 4rem); }

.contact-body {
  display: grid; grid-template-columns: 1fr 260px; gap: 5rem; align-items: start;
  padding-bottom: 6rem;
}
@media (max-width: 800px) { .contact-body { grid-template-columns: 1fr; gap: 2.5rem; } }

.contact-form { display: flex; flex-direction: column; gap: 1.6rem; }
.field-group { display: flex; flex-direction: column; gap: 0.45rem; }
.field-label {
  font-size: 0.68rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--text-muted);
}
.field-input {
  background: var(--input-bg); border: 1px solid var(--input-border);
  color: var(--text-primary); font-family: 'DM Sans', sans-serif;
  font-size: 0.93rem; font-weight: 300; padding: 0.8rem 1rem;
  border-radius: 2px; transition: border-color 0.2s, background 0.4s;
  outline: none; width: 100%;
}
.field-input::placeholder { color: var(--text-muted); }
.field-input:focus { border-color: var(--input-focus); }
.field-textarea { resize: vertical; min-height: 130px; }
.field-select {
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem;
}

.submit-btn {
  display: inline-flex; align-items: center; gap: 0.7rem;
  background: var(--text-primary); color: var(--bg); border: none;
  font-family: 'DM Sans', sans-serif; font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; padding: 0.95rem 1.8rem;
  cursor: pointer; transition: opacity 0.2s, transform 0.2s;
  border-radius: 2px; align-self: flex-start;
}
.submit-btn:hover { opacity: 0.82; transform: translateX(3px); }
.form-success {
  color: var(--text-secondary); font-size: 0.9rem;
  padding: 1rem; border: 1px solid var(--border-subtle); border-radius: 2px;
}

.contact-info { display: flex; flex-direction: column; gap: 2.75rem; }
.contact-info-label {
  font-size: 0.68rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.9rem;
}
.contact-email {
  font-size: 0.95rem; color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle); padding-bottom: 0.2rem;
  display: inline-block; transition: border-color 0.2s;
}
.contact-email:hover { border-color: var(--text-primary); }

.social-list { display: flex; flex-direction: column; }
.social-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.8rem 0; border-bottom: 1px solid var(--border-subtle);
  font-size: 0.88rem; color: var(--text-secondary);
  transition: color 0.2s, padding-left 0.2s;
}
.social-link:hover { color: var(--text-primary); padding-left: 0.4rem; }
.social-arrow { font-size: 0.75rem; opacity: 0.45; }

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.4rem clamp(1.5rem, 5vw, 4rem);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.72rem; color: var(--text-muted);
  transition: var(--transition-theme);
}
.site-footer a { color: var(--text-muted); transition: color 0.2s; }
.site-footer a:hover { color: var(--text-primary); }

/* FADE IN */
.fade-in { opacity: 0; transform: translateY(16px); animation: fadeUp 0.5s ease forwards; }
.fade-in:nth-child(2) { animation-delay: 0.08s; }
.fade-in:nth-child(3) { animation-delay: 0.16s; }
.fade-in:nth-child(4) { animation-delay: 0.24s; }
