/* ── Custom Properties ── */
:root {
  --color-bg: #fafafa;
  --color-text: #1a1a1a;
  --color-text-light: #666;
  --color-border: #e0e0e0;
  --color-white: #fff;
}
[data-theme="dark"] {
  --color-bg: #111;
  --color-text: #e8e8e8;
  --color-text-light: #999;
  --color-border: #2a2a2a;
  --color-white: #1a1a1a;
  --header-bg: rgba(17, 17, 17, 0.85);
}
:root {
  --font-main: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --header-h: 64px;
  --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-main); font-weight: 300; color: var(--color-text);
  background: var(--color-bg); line-height: 1.6; overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { background: none; border: none; cursor: pointer; color: inherit; }

/* ── Hero Landing ── */
.hero {
  position: relative; width: 100%;
  overflow: hidden;
  height: 100vh; height: 100dvh;
}
.hero-bg {
  position: absolute; inset: 0;
}
.hero-bg img {
  width: 100%; height: 100%; display: block; object-fit: cover; object-position: center 40%;
}
.hero-overlay {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.15) 60%, rgba(0,0,0,0.5) 100%);
}
.hero-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; justify-content: flex-end; padding: 20px 24px;
}
.hero-header .theme-toggle { color: rgba(255,255,255,0.7); }
.hero-header .theme-toggle:hover { color: #fff; }
.hero-content {
  position: absolute; left: 0; right: 0;
  z-index: 5; padding: 0 32px;
}

/* Desktop: at bottom of hero */
@media (min-width: 768px) {
  .hero-content { bottom: 40px; }
}
.hero-name {
  font-size: clamp(1.6rem, 4vw, 2.8rem); font-weight: 200;
  letter-spacing: 0.06em; color: #fff; line-height: 1.1; margin-bottom: 8px;
  text-transform: lowercase;
}
.hero-title {
  font-size: clamp(0.85rem, 1.5vw, 1.1rem); font-weight: 300;
  letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,255,255,0.7);
}
.hero-scroll {
  display: none; /* not needed when image scrolls naturally */
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 5; text-align: center; cursor: pointer;
  color: rgba(255,255,255,0.5); transition: color 0.3s;
}
.hero-scroll:hover { color: rgba(255,255,255,0.9); }
.hero-scroll span { font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; display: block; margin-bottom: 4px; }
.scroll-arrow { font-size: 1.2rem; animation: scrollBounce 2s infinite; }
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* Desktop hero adjustments */
@media (min-width: 768px) {
  .hero-bg img { object-position: center center; }
}

.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h); padding: 0 var(--space-md);
  background: var(--header-bg, rgba(250, 250, 250, 0.85));
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: background var(--transition), box-shadow var(--transition), transform 0.4s ease, opacity 0.4s ease;
  transform: translateY(-100%); opacity: 0; pointer-events: none;
}
.site-header.visible { transform: translateY(0); opacity: 1; pointer-events: all; }
.site-header.scrolled { box-shadow: 0 1px 0 var(--color-border); }
.logo { font-weight: 400; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: lowercase; }
.nav-desktop a {
  font-size: 0.85rem; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase;
  margin-left: var(--space-md); position: relative; transition: opacity var(--transition);
}
.nav-desktop a:hover { opacity: 0.5; }

.hamburger {
  display: none; flex-direction: column; justify-content: center;
  gap: 6px; width: 28px; height: 28px; z-index: 200;
}
.hamburger span {
  display: block; width: 100%; height: 1.5px; background: var(--color-text);
  transition: transform var(--transition), opacity var(--transition);
}
.hamburger.active span:first-child { transform: translateY(3.75px) rotate(45deg); }
.hamburger.active span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

.mobile-menu {
  position: fixed; top: 0; left: 0; width: 280px; height: 100%;
  background: var(--color-white); z-index: 150;
  transform: translateX(-100%); transition: transform var(--transition);
  padding: calc(var(--header-h) + var(--space-lg)) var(--space-md);
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu nav { display: flex; flex-direction: column; gap: var(--space-md); }
.mobile-menu a { font-size: 1.25rem; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; }
.mobile-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.3); z-index: 140;
  opacity: 0; pointer-events: none; transition: opacity var(--transition);
}
.mobile-overlay.open { opacity: 1; pointer-events: all; }

.mosaic-hero { padding: calc(var(--header-h) + 8px) 8px 8px; }
.mosaic-grid { columns: 2; column-gap: 8px; max-width: 1600px; margin: 0 auto; }
.mosaic-item {
  break-inside: avoid; margin-bottom: 8px; overflow: hidden;
  border-radius: 2px; background: var(--color-border); cursor: zoom-in;
}
.mosaic-item img {
  width: 100%; height: auto; display: block;
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.mosaic-item:hover img { transform: scale(1.02); }

@media (min-width: 768px) {
  .mosaic-grid { columns: 3; column-gap: 10px; }
  .mosaic-item { margin-bottom: 10px; }
  .mosaic-hero { padding: calc(var(--header-h) + 10px) 10px 10px; }
}
@media (min-width: 1200px) {
  .mosaic-grid { columns: 4; column-gap: 12px; }
  .mosaic-item { margin-bottom: 12px; }
  .mosaic-hero { padding: calc(var(--header-h) + 12px) 12px 12px; }
}

.about-section { padding: var(--space-xl) var(--space-md); border-top: 1px solid var(--color-border); }
.about-inner { max-width: 800px; margin: 0 auto; }
.section-label {
  font-weight: 400; font-size: 0.8rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--color-text-light); margin-bottom: var(--space-lg);
}
.about-text p { font-size: 1.1rem; line-height: 1.9; margin-bottom: var(--space-md); color: var(--color-text); }

.contact-section { padding: var(--space-xl) var(--space-md); border-top: 1px solid var(--color-border); }
.contact-inner { max-width: 800px; margin: 0 auto; }
.contact-location { font-size: 1.4rem; font-weight: 300; margin-bottom: var(--space-sm); }
.contact-email {
  display: inline-block; font-size: 1.1rem; border-bottom: 1px solid var(--color-text);
  padding-bottom: 2px; margin-bottom: var(--space-sm); transition: opacity var(--transition);
}
.contact-email:hover { opacity: 0.5; }
.contact-link {
  display: block; font-size: 0.9rem; color: var(--color-text-light);
  margin-top: var(--space-xs); transition: opacity var(--transition);
}
.contact-link:hover { opacity: 0.5; }

.site-footer {
  padding: var(--space-lg) var(--space-md); text-align: center;
  font-size: 0.75rem; letter-spacing: 0.1em; text-transform: lowercase;
  color: var(--color-text-light); border-top: 1px solid var(--color-border);
}

.lightbox {
  position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,0.94);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.lightbox.open { opacity: 1; pointer-events: all; }
.lightbox-zone { position: absolute; top: 0; width: 50%; height: 100%; z-index: 305; cursor: pointer; }
.lightbox-zone.left { left: 0; cursor: w-resize; }
.lightbox-zone.right { right: 0; cursor: e-resize; }
.lightbox-inner {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; height: 100%; padding: 50px 20px 80px;
}
.lightbox-inner img {
  max-width: 100%; max-height: calc(100vh - 160px); object-fit: contain;
  border-radius: 2px; transition: opacity 0.25s ease;
}
.lightbox-caption {
  color: rgba(255,255,255,0.5); font-size: 0.85rem; margin-top: 10px;
  text-align: center; min-height: 1.2em;
}
.lightbox-controls { display: flex; align-items: center; gap: 24px; margin-top: 8px; }
.lightbox-close {
  position: absolute; top: 16px; right: 20px; color: rgba(255,255,255,0.7);
  font-size: 2rem; font-weight: 300; cursor: pointer; z-index: 310;
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  transition: color 0.2s;
}
.lightbox-close:hover { color: #fff; }
.lightbox-arrow {
  color: rgba(255,255,255,0.5); font-size: 1.4rem; cursor: pointer;
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  transition: color 0.2s; user-select: none; -webkit-user-select: none;
}
.lightbox-arrow:hover { color: #fff; }
.lightbox-counter { color: rgba(255,255,255,0.4); font-size: 0.75rem; letter-spacing: 0.15em; }

.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Theme toggle */
.theme-toggle {
  width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 18px; transition: opacity var(--transition); cursor: pointer; margin-left: var(--space-sm);
}
.theme-toggle:hover { opacity: 0.6; }

@media (max-width: 767px) {
  .nav-desktop { display: none; }
  .hamburger { display: flex; }
  .lightbox-inner { padding: 50px 12px 80px; }
  .theme-toggle:not(.mobile-only) { display: none; }
  .theme-toggle.mobile-only { display: flex; }
}
@media (min-width: 768px) {
  .theme-toggle.mobile-only { display: none; }
}
