*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0f0f0f;
  --surface: #1a1a1a;
  --text: #e0e0e0;
  --text-muted: #888;
  --accent: #fff;
  --gap: 8px;
}

html {
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}

/* Header & Nav */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 40px;
  border-bottom: 1px solid #222;
}

.site-name {
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
}

nav {
  display: flex;
  gap: 32px;
}

nav a {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

nav a:hover,
nav a[aria-current="page"] {
  color: var(--accent);
}

/* Nav dropdown */
.nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg);
  border: 1px solid #222;
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  white-space: nowrap;
}

.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
}

/* Language switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.lang-btn {
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: color 0.2s;
}

.lang-btn:hover,
.lang-btn[aria-current="true"] {
  color: var(--accent);
}

/* Home about layout */
.about-page {
  display: flex;
  justify-content: center;
  padding: 80px 40px;
}

.about-layout {
  display: flex;
  gap: 60px;
  max-width: 960px;
  width: 100%;
  align-items: flex-start;
}

.about-image {
  flex: 0 0 320px;
}

.about-image .about-photo {
  width: 100%;
  border-radius: 4px;
  display: block;
  margin: 0;
}

.about-text {
  flex: 1;
}

.about-text h2 {
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.about-text p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 16px;
}

.about-text a {
  color: var(--accent);
}

@media (max-width: 700px) {
  .about-layout {
    flex-direction: column;
  }

  .about-image {
    flex: none;
    width: 100%;
    max-width: 320px;
  }
}

/* Text pages (About, Contact) */
.text-page {
  display: flex;
  justify-content: center;
  padding: 80px 40px;
}

.text-content {
  max-width: 720px;
  width: 100%;
}

.about-photo {
  width: 100%;
  max-width: 280px;
  border-radius: 4px;
  display: block;
  margin: 0 0 40px 0;
}

.text-content h2 {
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.text-content p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
}

.text-content a {
  color: var(--accent);
}

/* Form page */
.form-page {
  display: flex;
  justify-content: center;
  padding: 60px 40px 80px;
}

.form-content {
  max-width: 580px;
  width: 100%;
}

.form-content h2 {
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-content .form-intro {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 40px;
}

.form-section {
  margin-bottom: 36px;
}

.form-section legend,
.form-label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.form-input,
.form-textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid #2a2a2a;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s;
  border-radius: 0;
  appearance: none;
}

.form-input:focus,
.form-textarea:focus {
  border-color: #555;
}

.form-textarea {
  resize: vertical;
  min-height: 110px;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #444;
}

.checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text);
  user-select: none;
}

.checkbox-item input[type="checkbox"] {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  cursor: pointer;
}

.radio-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.radio-item {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text);
  user-select: none;
}

.radio-item input[type="radio"] {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  cursor: pointer;
}

.form-submit {
  margin-top: 40px;
  background: none;
  border: 1px solid #444;
  color: var(--text);
  font-family: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 14px 36px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.form-submit:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* FAQ */
.faq-section {
  display: flex;
  justify-content: center;
  padding: 60px 40px 80px;
  border-top: 1px solid #222;
}

.faq-content {
  max-width: 580px;
  width: 100%;
}

.faq-content h2 {
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 36px;
}

.faq-item {
  margin-bottom: 28px;
}

.faq-q {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 8px;
}

.faq-a {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-muted);
}

/* Sub-nav (Portfolio sections) */
.subnav {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 14px 40px;
  border-bottom: 1px solid #222;
}

.subnav a {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.subnav a:hover,
.subnav a[aria-current="page"] {
  color: var(--accent);
}

/* Home page */
.home-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 85px);
  gap: 40px;
  padding: 40px;
}

.home-tagline {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.home-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.home-links a {
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

.home-links a:hover {
  color: var(--accent);
}

/* Gallery grid */
.gallery {
  padding: 24px var(--gap) 0;
  columns: 4 260px;
  column-gap: var(--gap);
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: var(--gap);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: var(--surface);
}

.gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}

.gallery-item img.loaded {
  opacity: 1;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

.gallery-item .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: flex-end;
  padding: 12px;
}

.gallery-item:hover .overlay {
  opacity: 1;
}

.overlay-title {
  font-size: 0.8rem;
  color: #fff;
  line-height: 1.3;
}

/* Status / error */
.status {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.status.error {
  color: #e07070;
}

/* 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.open {
  display: flex;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  text-align: center;
  position: relative;
}

#lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.lightbox-title {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.2s;
  padding: 8px;
  z-index: 1001;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 1;
}

.lightbox-close {
  top: 20px;
  right: 28px;
  font-size: 2rem;
}

.lightbox-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

/* Mobile-only flat nav links (replace dropdown on touch devices) */
.nav-mobile-sub {
  display: none;
}

/* Responsive */
@media (max-width: 600px) {
  header {
    flex-direction: column;
    gap: 16px;
    padding: 24px 20px;
  }

  nav {
    gap: 20px;
  }

  .nav-dropdown-menu {
    display: none;
  }

  .nav-mobile-sub {
    display: contents;
  }

  .gallery {
    columns: 2 140px;
  }

  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}
