/* ============================================================
   CSS Custom Properties
   ============================================================ */
:root {
  --bg: #ffffff;
  --fg: #111111;
  --fg-muted: #8a8a8a;
  --nav-bg: #000000;
  --nav-fg: #ffffff;
  --gallery-bg: #131313;
  --gallery-text: #ffffff;
  --card-radius: 8px;
  --border: #e0e0e0;
  --footer-bg: #0d0d0d;
  --footer-fg: #888888;
  --sidebar-w: 50px;
  --nav-h: 60px;
  --transition: 0.25s ease;
}

[data-theme="dark"] {
  --bg: #111111;
  --fg: #ffffff;
  --fg-muted: #888888;
  --border: #2a2a2a;
  --footer-fg: #666666;
}

/* ============================================================
   Reset & Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--fg);
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
  padding-left: var(--sidebar-w);
  padding-right: var(--sidebar-w);
  padding-top: var(--nav-h);
}

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

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  height: var(--nav-h);
}

.nav__logo-box {
  flex: 0 0 var(--sidebar-w);
  background: var(--nav-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav__logo {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 0.62rem;
  color: var(--nav-fg);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.2;
}

.nav__center {
  flex: 1;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.8rem;
  transition: background var(--transition), border-color var(--transition);
}

.nav__link {
  font-family: 'Oswald', sans-serif;
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg);
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: border-color var(--transition);
}
.nav__link:hover { border-bottom-color: var(--fg); }
/* Amber underline on active — matches reference */
.nav__link.active { border-bottom-color: #c09a52; }

.nav__right-box {
  flex: 0 0 var(--sidebar-w);
  background: var(--nav-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Grid icon — decorative, matches reference's right box icon */
.nav__icon-grid {
  color: var(--nav-fg);
  opacity: 0.6;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile theme toggle — only visible on mobile */
.nav__theme-mobile {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--nav-fg);
}

.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav__hamburger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--nav-fg);
  transition: transform 0.3s, opacity 0.3s;
}
.nav__hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ============================================================
   Left sidebar — theme toggle (desktop only)
   ============================================================ */
.sidebar-theme {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  background: var(--nav-bg);
  display: flex;
  flex-direction: column;
}

.sidebar-theme__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--nav-fg);
  opacity: 0.38;
  transition: opacity var(--transition);
  width: var(--sidebar-w);
}
.sidebar-theme__btn.active { opacity: 1; }

.sidebar-theme__label {
  font-family: 'Oswald', sans-serif;
  font-size: 0.48rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

/* ============================================================
   Right sidebar — social links (desktop only)
   ============================================================ */
.sidebar-social {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  background: var(--nav-bg);
  display: flex;
  flex-direction: column;
}

.sidebar-social__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 0;
  color: var(--nav-fg);
  opacity: 0.5;
  transition: opacity var(--transition);
  width: var(--sidebar-w);
}
.sidebar-social__link:hover { opacity: 1; }

.sidebar-social__label {
  font-family: 'Oswald', sans-serif;
  font-size: 0.48rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

/* ============================================================
   Hero Section
   ============================================================ */
.hero {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 3rem 5rem;
  text-align: center;
  background: var(--bg);
  transition: background var(--transition);
  position: relative;
  overflow: hidden;
}

/* Subtle vertical grid lines — same as reference 4-column grid overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg,
      transparent calc(25% - 0.5px),
      rgba(0,0,0,0.055) calc(25% - 0.5px),
      rgba(0,0,0,0.055) calc(25% + 0.5px),
      transparent calc(25% + 0.5px)
    ),
    linear-gradient(90deg,
      transparent calc(50% - 0.5px),
      rgba(0,0,0,0.055) calc(50% - 0.5px),
      rgba(0,0,0,0.055) calc(50% + 0.5px),
      transparent calc(50% + 0.5px)
    ),
    linear-gradient(90deg,
      transparent calc(75% - 0.5px),
      rgba(0,0,0,0.055) calc(75% - 0.5px),
      rgba(0,0,0,0.055) calc(75% + 0.5px),
      transparent calc(75% + 0.5px)
    );
  pointer-events: none;
  z-index: 0;
}

[data-theme="dark"] .hero::before {
  background:
    linear-gradient(90deg, transparent calc(25% - 0.5px), rgba(255,255,255,0.045) calc(25% - 0.5px), rgba(255,255,255,0.045) calc(25% + 0.5px), transparent calc(25% + 0.5px)),
    linear-gradient(90deg, transparent calc(50% - 0.5px), rgba(255,255,255,0.045) calc(50% - 0.5px), rgba(255,255,255,0.045) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(90deg, transparent calc(75% - 0.5px), rgba(255,255,255,0.045) calc(75% - 0.5px), rgba(255,255,255,0.045) calc(75% + 0.5px), transparent calc(75% + 0.5px));
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  width: 100%;
}

.hero__name {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 6.2vw, 6.5rem);
  line-height: 1.04;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: var(--fg);
}

.hero__name .muted {
  color: var(--fg-muted);
  font-weight: 600;
}

.hero__actions {
  margin-top: 2rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  font-family: 'Oswald', sans-serif;
  font-weight: 400;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.82rem 2rem;
  border: 1.5px solid var(--fg);
  color: var(--fg);
  background: transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.btn:hover { background: var(--fg); color: var(--bg); }
.btn--filled { background: var(--fg); color: var(--bg); }
.btn--filled:hover { background: transparent; color: var(--fg); }

/* ============================================================
   Section title
   ============================================================ */
.section-title {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ============================================================
   Gallery Section
   ============================================================ */
.gallery-section {
  background: var(--gallery-bg);
  color: var(--gallery-text);
  padding-bottom: 6px;
  transition: background var(--transition);
}

.gallery-header {
  text-align: center;
  padding: 2.2rem 2rem 1.6rem;
}

.gallery-section .section-title { color: var(--gallery-text); }

/* Masonry with CSS columns */
.gallery-grid {
  column-count: 3;
  column-gap: 6px;
  padding: 0 3px;
}

.gallery-item {
  display: block;
  break-inside: avoid;
  margin-bottom: 6px;
  position: relative;
  overflow: hidden;
  border-radius: var(--card-radius);
  cursor: pointer;
  background: #1a1a1a;
}

.gallery-item__img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--card-radius);
  transition: transform 0.45s ease;
}
.gallery-item:hover .gallery-item__img-wrap img { transform: scale(1.05); }

.gallery-item__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.58) 0%, transparent 55%);
  display: flex;
  align-items: flex-end;
  padding: 0.8rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: var(--card-radius);
}
.gallery-item:hover .gallery-item__overlay { opacity: 1; }

.gallery-item__title {
  font-family: 'Oswald', sans-serif;
  font-weight: 300;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
}

/* ============================================================
   About Section
   ============================================================ */
.about-section {
  padding: 5rem 3rem;
  background: var(--bg);
  transition: background var(--transition);
}

.about-section__inner {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 5rem;
  align-items: start;
}

.about-section__photo img {
  width: 100%;
  object-fit: cover;
  border-radius: var(--card-radius);
}

.about-section__text { padding-top: 0.5rem; }
.about-section__text .section-title { margin-bottom: 1.4rem; text-align: left; }

/* Markdown output */
.about-section__text p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--fg-muted);
  margin-bottom: 0.85rem;
}
/* Override browser default link colors from markdown */
.about-section__text a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.about-section__text strong { color: var(--fg); }
.about-section__text .btn { margin-top: 1.4rem; }

/* ============================================================
   Footer / Contact
   ============================================================ */
.footer {
  background: var(--footer-bg);
  color: var(--footer-fg);
  padding: 2.5rem 3rem;
}

.footer__inner {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
}

.footer__info { display: flex; flex-direction: column; gap: 0.3rem; }

.footer__name {
  font-family: 'Oswald', sans-serif;
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #cccccc;
}

.footer__location { font-size: 0.78rem; }

.footer__email {
  font-size: 0.78rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition);
}
.footer__email:hover { color: #fff; }

.footer__social { display: flex; gap: 1rem; justify-content: center; }

.footer__social-link {
  color: var(--footer-fg);
  opacity: 0.7;
  transition: opacity var(--transition), color var(--transition);
}
.footer__social-link:hover { opacity: 1; color: #fff; }

.footer__copy { font-size: 0.72rem; opacity: 0.5; text-align: right; }

/* ============================================================
   Mobile nav overlay
   ============================================================ */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.96);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  padding-top: var(--nav-h);
}
.nav-overlay.open { display: flex; }
.nav-overlay .nav__link {
  font-size: 1.8rem;
  color: #fff;
  letter-spacing: 0.2em;
  border: none;
}
.nav-overlay .nav__link:hover { opacity: 0.7; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
  .about-section__inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .about-section__photo { max-width: 420px; }
  .footer__inner { grid-template-columns: 1fr; text-align: center; gap: 1.5rem; }
  .footer__copy { text-align: center; }
  .footer__info { align-items: center; }
}

@media (max-width: 760px) {
  :root { --sidebar-w: 0px; }

  .sidebar-theme,
  .sidebar-social { display: none; }

  .nav__center { display: none; }
  .nav__logo-box { flex: 1; justify-content: center; }
  .nav__right-box { flex: 0 0 auto; padding: 0 0.4rem; gap: 0; }
  .nav__icon-grid { display: none; }

  .nav__theme-mobile { display: flex; }
  .nav__hamburger { display: flex; }

  .hero { padding: 2.5rem 1.5rem 3.5rem; }
  .hero::before { display: none; }

  .gallery-grid { column-count: 2; column-gap: 4px; padding: 0 4px; }
  .gallery-item { margin-bottom: 4px; }

  .about-section { padding: 3.5rem 1.5rem; }
  .footer { padding: 2rem 1.5rem; }
}

@media (max-width: 480px) {
  .gallery-grid { column-count: 1; column-gap: 0; padding: 0; }
  .gallery-item { margin-bottom: 4px; border-radius: 0; }
  .gallery-item__img-wrap img { border-radius: 0; }
}

/* ============================================================
   Prints page
   ============================================================ */
.prints-header {
  text-align: center;
  padding: 6rem 2rem 4rem;
  background: var(--bg);
}

.prints-header__title {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg);
  margin-bottom: 0.75rem;
}

.prints-header__sub {
  font-size: 0.95rem;
  color: var(--fg-muted);
  max-width: 460px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.prints-grid-section {
  background: #131313;
  padding: 2rem 6px 4rem;
}

.prints-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.print-card {
  background: #1a1a1a;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.print-card__img-wrap {
  overflow: hidden;
  flex-shrink: 0;
}

.print-card__img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.45s ease;
}

.print-card:hover .print-card__img-wrap img {
  transform: scale(1.04);
}

.print-card__info {
  padding: 0.9rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.print-card__title {
  font-family: 'Oswald', sans-serif;
  font-weight: 400;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #e0e0e0;
}

.print-card__price {
  font-size: 0.77rem;
  color: #888;
}

.print-card__price-hint {
  font-size: 0.77rem;
  color: #888;
}

.btn--sm {
  font-size: 0.7rem;
  padding: 0.42rem 1rem;
  letter-spacing: 0.12em;
  margin-top: 0.3rem;
  width: fit-content;
}

@media (max-width: 760px) {
  .prints-header { padding: 4rem 1.5rem 3rem; }
  .prints-grid { grid-template-columns: repeat(2, 1fr); gap: 4px; }
  .prints-grid-section { padding: 1.5rem 4px 3rem; }
}

@media (max-width: 480px) {
  .prints-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Print configurator modal
   ============================================================ */
.print-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.print-modal.open { display: flex; }

.print-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.78);
  backdrop-filter: blur(4px);
}

.print-modal__panel {
  position: relative;
  z-index: 1;
  background: #fff;
  color: #111;
  border-radius: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 860px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}

.print-modal__close {
  position: absolute;
  top: 0.85rem;
  right: 1rem;
  z-index: 2;
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: #aaa;
  cursor: pointer;
  padding: 0.15rem 0.4rem;
  transition: color 0.15s;
}
.print-modal__close:hover { color: #111; }

.print-modal__preview {
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 340px;
}
.print-modal__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.print-modal__config {
  padding: 2.2rem 2rem 1.8rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.print-modal__title {
  font-family: 'Oswald', sans-serif;
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #111;
  padding-right: 2rem;
}

.print-modal__section { display: flex; flex-direction: column; gap: 0.55rem; }

.print-modal__label {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #aaa;
  font-weight: 500;
}

.print-modal__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.print-modal__opt {
  background: #f5f5f5;
  border: 1.5px solid transparent;
  border-radius: 6px;
  padding: 0.5rem 0.25rem;
  font-size: 0.71rem;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.04em;
  color: #555;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  text-align: center;
  line-height: 1.3;
}
.print-modal__opt:hover { border-color: #bbb; background: #ebebeb; }
.print-modal__opt.active {
  border-color: #111;
  background: #111;
  color: #fff;
}

.print-modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid #eee;
}

.print-modal__price-wrap { display: flex; flex-direction: column; gap: 0.1rem; }

.print-modal__price-label {
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #bbb;
}

.print-modal__price {
  font-family: 'Oswald', sans-serif;
  font-size: 1.55rem;
  font-weight: 500;
  color: #111;
  min-width: 5rem;
}

.print-modal__buy {
  flex-shrink: 0;
  background: #111;
  color: #fff;
  border-color: #111;
  font-size: 0.75rem;
  padding: 0.65rem 1.4rem;
}
.print-modal__buy:hover:not(:disabled) { background: #333; border-color: #333; }
.print-modal__buy:disabled { opacity: 0.38; cursor: not-allowed; }

.print-modal__note {
  font-size: 0.67rem;
  color: #ccc;
  letter-spacing: 0.04em;
  text-align: center;
  margin-top: auto;
}

.prints-success-banner {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: #1a1a1a;
  color: #c8eec8;
  font-size: 0.84rem;
  padding: 0.75rem 1.2rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}
.prints-success-banner svg { flex-shrink: 0; color: #6fcf6f; }
.prints-success-banner__close {
  margin-left: auto;
  background: none;
  border: none;
  color: #777;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

@media (max-width: 680px) {
  .print-modal__panel { grid-template-columns: 1fr; max-height: 95vh; overflow-y: auto; }
  .print-modal__preview { min-height: 190px; max-height: 220px; }
  .print-modal__config { padding: 1.4rem 1.1rem 1.4rem; }
  .print-modal__grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   GLightbox overrides
   ============================================================ */
.glightbox-container .gslide-description { background: rgba(0,0,0,0.75); }
.glightbox-container .gdesc-inner .gslide-title {
  font-family: 'Oswald', sans-serif;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.82rem;
  color: #fff;
}
