/* ===== Custom Properties ===== */
:root {
  --color-bg: #fafafa;
  --color-text: #222;
  --color-text-light: #666;
  --color-border: #e0e0e0;
  --color-white: #fff;
  --color-overlay: rgba(0, 0, 0, 0.9);
  --color-surface: #fff;

  --font-primary: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-size-base: 16px;
  --font-size-sm: 0.75rem;
  --font-size-body: 1rem;
  --font-size-lg: 1.125rem;

  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;

  --gallery-gap: 15px;
  --gallery-columns: 3;

  --max-width: 1200px;
  --nav-height: 60px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #1a1a1a;
    --color-text: #e8e8e8;
    --color-text-light: #999;
    --color-border: #333;
    --color-surface: #1a1a1a;
    --color-overlay: rgba(0, 0, 0, 0.95);
  }
}

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

html {
  font-size: var(--font-size-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scrollbar-gutter: stable;
}

body {
  font-family: var(--font-primary);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--color-text);
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
}

/* ===== Container ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.nav .container {
  max-width: none;
  padding-left: 0.5rem;
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-name {
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.nav-links a {
  font-size: var(--font-size-sm);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 400;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  border-bottom-color: var(--color-text);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
  width: 28px;
  height: 28px;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--color-text);
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ===== Main Content ===== */
.main {
  padding-top: calc(var(--nav-height) + var(--spacing-lg));
  padding-bottom: var(--spacing-lg);
  min-height: 100vh;
}

/* ===== Gallery Grid ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(var(--gallery-columns), 1fr);
  gap: var(--gallery-gap);
}

.gallery-item {
  cursor: pointer;
  overflow: hidden;
}

.gallery-item-image {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--color-bg);
}

.gallery-item-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

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

.gallery-item-title {
  font-size: var(--font-size-sm);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: var(--spacing-xs);
  color: var(--color-text);
}

.gallery-item-desc {
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
  margin-top: 2px;
}

/* Placeholder items (no image yet) */
.gallery-item-image--placeholder {
  background: var(--color-border);
}

/* ===== Lightbox ===== */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-overlay);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.3s;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
}

.lightbox-caption {
  color: var(--color-white);
  font-size: var(--font-size-sm);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: var(--spacing-sm);
  text-align: center;
  opacity: 0.8;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: var(--color-white);
  font-size: 1.5rem;
  background: none;
  border: none;
  opacity: 0.7;
  transition: opacity 0.2s;
  line-height: 1;
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-white);
  font-size: 2rem;
  background: none;
  border: none;
  padding: 20px;
  opacity: 0.7;
  transition: opacity 0.2s;
  line-height: 1;
}

.lightbox-nav:hover {
  opacity: 1;
}

.lightbox-prev {
  left: 10px;
}

.lightbox-next {
  right: 10px;
}

/* ===== Page Content (About, Contact) ===== */
.page-content {
  max-width: 800px;
  margin: 0 auto;
}

.page-title {
  font-size: var(--font-size-sm);
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: var(--spacing-lg);
}

/* ===== About ===== */
.about-content {
  display: flex;
  gap: var(--spacing-lg);
  align-items: flex-start;
}

.about-photo {
  width: 280px;
  flex-shrink: 0;
}

.about-photo img {
  width: 100%;
  height: auto;
}

.about-photo--placeholder {
  aspect-ratio: 3 / 4;
  background: var(--color-border);
}

.about-text p {
  margin-bottom: var(--spacing-sm);
  color: var(--color-text);
  line-height: 1.8;
}

/* ===== Contact ===== */
.contact-content {
  text-align: center;
}

.contact-content p {
  color: var(--color-text-light);
  margin-bottom: var(--spacing-md);
}

.contact-email {
  display: inline-block;
  font-size: var(--font-size-lg);
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--color-text);
  padding-bottom: 2px;
  margin-bottom: var(--spacing-md);
}

.contact-social {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.contact-social a {
  font-size: var(--font-size-sm);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.contact-social a:hover {
  border-bottom-color: var(--color-text);
}

/* ===== Footer ===== */
.footer {
  padding: var(--spacing-lg) 0 var(--spacing-md);
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
  letter-spacing: 0.05em;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  :root {
    --gallery-columns: 2;
  }
}

@media (max-width: 768px) {
  :root {
    --gallery-columns: 1;
  }

  .nav-toggle {
    display: flex;
    width: 44px;
    height: 44px;
    padding: 10px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: var(--spacing-sm) 0;
    gap: 0;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
    text-align: center;
  }

  .nav-links a {
    display: block;
    padding: 0.75rem var(--spacing-md);
    border-bottom: none;
    font-size: 0.875rem;
  }

  .nav-links a.active {
    border-bottom: none;
    font-weight: 600;
  }

  .about-content {
    flex-direction: column;
  }

  .about-photo {
    width: 100%;
    max-width: 320px;
  }

  .lightbox-close {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
  }

  .lightbox-nav {
    padding: 30px;
    font-size: 2.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--spacing-sm);
  }
}
