/* =========================================================================
   TOKENS
   ========================================================================= */
:root {
  --bg: #0b0b0a;
  --bg-panel: #111110;
  --bg-elevated: #171614;
  --text: #f3f0e8;
  --text-dim: #8f8b82;
  --text-faint: #59564f;
  --accent: #c99a4b;
  --line: #2a2926;

  --font-display: 'Archivo', sans-serif;
  --font-body: 'Newsreader', serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --sidebar-w: 260px;
  --gap: 70px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

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

/* subtle film grain over the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* =========================================================================
   LAYOUT SHELL
   ========================================================================= */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ---- Sidebar (desktop) ---- */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-panel);
  border-right: 1px solid var(--line);
  padding: 32px 28px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.06em;
  line-height: 1.5;
  margin-bottom: 30px;
}

.brand .tagline {
  display: block;
  color: var(--text-dim);
  font-weight: 500;
}

.nav-group {
  margin-bottom: 26px;
}

.nav-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 10px;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list li { margin-bottom: 10px; }

.nav-link,
.filter-btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text-dim);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: color 0.15s ease;
}

.nav-link:hover,
.filter-btn:hover {
  color: var(--text);
}

.nav-link.active,
.filter-btn.active {
  color: var(--accent);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.social-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.social-icon:hover { color: var(--accent); }

.copyright {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
  line-height: 1.6;
}

/* ---- Mobile top bar ---- */
.topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-panel);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar .brand { margin: 0; }

.menu-toggle {
  background: none;
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 14px;
  cursor: pointer;
}

/* ---- Main content ---- */
.main {
  flex: 1;
  min-width: 0;
  padding-left: 80px; 
  padding-right: 80px;
}

/* =========================================================================
   HERO (homepage intro)
   ========================================================================= */
.hero {
  margin-bottom: 40px;
}

.hero-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.hero-text {
  max-width: 640px;
  padding: 28px 4px 0;
}

.hero-text h1 {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 24px;
  margin: 0 0 14px;
}

.hero-text p {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-dim);
  margin: 0;
}

/* =========================================================================
   HOMEPAGE GRID
   ========================================================================= */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  column-gap: var(--gap);
  row-gap: 20px;
}

.gallery-item {
  position: relative;
  background: var(--bg-elevated);
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.gallery-item img { width: 100%; height: 100%; object-fit: cover; }

.gallery-item a { display: block; width: 100%; height: 100%; }

.gallery-item .caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--text);
  background: linear-gradient(to top, rgba(0,0,0,0.65), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.gallery-item:hover .caption { opacity: 1; }

.empty-state {
  padding: 80px 40px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* =========================================================================
   COMPARE SLIDER (before / after)
   ========================================================================= */
.compare-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  user-select: none;
  touch-action: pan-y;
  cursor: ew-resize;
  background: var(--bg-elevated);
}

.compare-slider img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.compare-slider .compare-after {
  clip-path: inset(0 0 0 50%);
}

.compare-slider .compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 0;
  transform: translateX(-50%);
  pointer-events: none;
}

.compare-handle::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: -1px;
  width: 2px;
  background: var(--accent);
}

.compare-handle::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--bg);
  transform: translate(-50%, -50%);
}

.compare-tag {
  position: absolute;
  top: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  background: rgba(0,0,0,0.55);
  padding: 4px 8px;
  pointer-events: none;
  z-index: 2;
}
.compare-tag.before-tag { left: 10px; }
.compare-tag.after-tag { right: 10px; }

/* =========================================================================
   BLOG
   ========================================================================= */
.page-wrap {
  max-width: 760px;
  padding: 60px 40px 100px;
  margin: 0 auto;
}

.page-title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 22px;
  margin-bottom: 40px;
}

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-list li {
  border-top: 1px solid var(--line);
  padding: 26px 0;
}
.post-list li:last-child { border-bottom: 1px solid var(--line); }

.post-date {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.post-list h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px;
}

.post-list h2 a:hover { color: var(--accent); }

.post-excerpt {
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
}

/* single post */
.post-header { margin-bottom: 28px; }

.post-header h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
  margin: 10px 0 0;
}

.post-cover {
  margin: 30px 0;
}

.post-body {
  font-size: 18px;
  line-height: 1.75;
  color: var(--text);
}
.post-body p { margin: 0 0 22px; }

.back-link {
  display: inline-block;
  margin-bottom: 30px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.back-link:hover { color: var(--accent); }

/* about page */
.about-text {
  font-size: 18px;
  line-height: 1.75;
  color: var(--text);
  white-space: pre-line;
  margin-bottom: 30px;
}

.contact-row {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
}
.contact-row a:hover { color: var(--accent); }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 960px) {
  .gallery-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .sidebar { display: none; }
  .topbar { display: flex; }

  .sidebar.mobile-open {
    display: flex;
    position: fixed;
    inset: 0;
    height: 100vh;
    width: 100%;
    z-index: 200;
    padding: 24px 24px 32px;
  }

  .sidebar.mobile-open .brand { display: none; }

  .page-wrap { padding: 40px 22px 80px; }
  .post-header h1 { font-size: 24px; }
  .post-body { font-size: 17px; }
}
