:root {
  --bg: #111;
  --text: #f5f5f5;
  --muted: #bbbbbb;
  --accent: #e63946;
  --black: #000;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, 'Noto Sans', 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

.container { width: min(1200px, 92%); margin: 0 auto; }

/* Header */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: background-color .3s ease, box-shadow .3s ease, transform .3s ease;
  background: transparent;
}
.site-header.solid { background: #000; box-shadow: 0 4px 16px rgba(0,0,0,.35); }

.nav-wrap { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.logo { font-weight: 700; letter-spacing: .5px; }
.logo span { color: var(--accent); }

.site-nav { display: flex; gap: 24px; align-items: center; }
.site-nav a { color: var(--text); opacity: .8; transition: opacity .2s ease, color .2s ease; }
.site-nav a:hover, .site-nav a.active { opacity: 1; color: var(--accent); }

.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; color: var(--text); }
.nav-toggle .bar { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px auto; transition: transform .2s;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: var(--text);
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--black) url('../img/hero-photo.webp') center/cover no-repeat fixed;
  filter: grayscale(100%);
  transform: scale(1.05);
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,.6) 50%, rgba(0,0,0,.8) 100%);
}
.hero-inner { position: relative; z-index: 1; padding: 140px 0 80px; }
.hero h1 { font-size: clamp(28px, 4vw, 56px); margin: 0 0 10px; }
.hero p.sub { font-size: clamp(16px, 2.2vw, 22px); color: var(--muted); margin: 0 0 24px; }

.btn { display: inline-block; padding: 12px 22px; border-radius: 999px; border: 1px solid currentColor; transition: transform .15s ease, background .2s ease, color .2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-accent { background: var(--accent); color: white; border-color: var(--accent); }
.btn-accent:hover { filter: brightness(1.05); }

/* Sections */
.section { padding: 80px 0; }
.section .section-title { font-size: clamp(22px, 3vw, 32px); margin: 0 0 24px; }
.muted { color: var(--muted); }

/* Portfolio grid */
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.portfolio-grid .item { grid-column: span 4; position: relative; overflow: hidden; border-radius: 8px; background: #0b0b0b; }
.portfolio-grid .item img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; transition: transform .5s ease; }
.portfolio-grid .item:hover img { transform: scale(1.06); }
.portfolio-grid .caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 14px; background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.65) 80%);
  color: #fff; font-size: 14px; letter-spacing: .3px; opacity: .95; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: none; place-items: center; z-index: 2000; padding: 24px; }
.lightbox.open { display: grid; animation: fadeIn .2s ease; }
.lightbox-figure { max-width: min(1200px, 92vw); }
.lightbox img { width: 100%; height: auto; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.6); }
.lightbox .lightbox-caption { text-align: center; color: #ddd; margin-top: 12px; font-size: 14px; }
.lightbox .close { position: absolute; top: 16px; right: 16px; background: none; border: 0; color: #fff; font-size: 28px; cursor: pointer; }
/* Lightbox navigation */
.lightbox .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 999px; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.15); color: #fff; display: grid; place-items: center; font-size: 22px; cursor: pointer; user-select: none; }
.lightbox .nav:hover { background: rgba(0,0,0,.55); }
.lightbox .nav.prev { left: 16px; }
.lightbox .nav.next { right: 16px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* About */
.about-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; align-items: center; }
.about-grid .media { grid-column: span 5; }
.about-grid .content { grid-column: span 7; }
.about-grid .media img { border-radius: 10px; filter: grayscale(100%); }
.about-grid ul { margin: 16px 0 0; padding: 0 0 0 18px; color: var(--muted); }
.about-grid li { margin: 8px 0; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.contact-grid .form { grid-column: span 7; }
.contact-grid .info { grid-column: span 5; }
.field { margin: 0 0 14px; }
label { display: block; margin: 0 0 6px; color: var(--muted); font-size: 14px; }
input, textarea { width: 100%; padding: 12px 14px; border-radius: 8px; border: 1px solid #222; background: #0b0b0b; color: var(--text); }
input:focus, textarea:focus { outline: 2px solid #222; border-color: #333; }

.socials { display: flex; gap: 14px; margin-top: 8px; }
.icon { width: 22px; height: 22px; display: inline-block; }
.icon svg { display: block; width: 100%; height: 100%; fill: currentColor; }

/* Footer */
.site-footer { border-top: 1px solid #1a1a1a; padding: 28px 0; color: var(--muted); }
.footer-grid { display: flex; align-items: center; justify-content: space-between; gap: 18px; }

/* Responsive */
@media (max-width: 1024px) {
  .portfolio-grid .item { grid-column: span 6; }
  .about-grid .media { grid-column: span 12; }
  .about-grid .content { grid-column: span 12; }
  .contact-grid .form { grid-column: span 12; }
  .contact-grid .info { grid-column: span 12; }
}
@media (max-width: 720px) {
  .site-nav { position: fixed; inset: 64px 0 auto 0; background: #000; padding: 12px 24px; display: none; flex-direction: column; gap: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.45); }
  .site-nav.open { display: flex; }
  .nav-toggle { display: inline-block; }
  .grid { gap: 12px; }
  .portfolio-grid .item { grid-column: span 12; }
}
