:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #6b6b6b;
  --border: #e2e2e2;
  --accent: #111111;
  --image-bg: #f4f4f4;
}

html[data-theme="dark"] {
  --bg: #0a0a0a;
  --fg: #f2f2f2;
  --muted: #9a9a9a;
  --border: #262626;
  --accent: #f2f2f2;
  --image-bg: #141414;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  transition: background-color 0.25s ease, color 0.25s ease;
}

h1, h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  margin: 0;
}

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

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 6vw;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.site-nav a {
  color: var(--fg);
  text-decoration: none;
  font-size: 0.9rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.site-nav a:hover {
  border-bottom-color: var(--fg);
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--fg);
  font-family: inherit;
  font-size: 0.85rem;
  padding: 0.25rem;
}

.toggle-track {
  width: 40px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--image-bg);
  position: relative;
  transition: background-color 0.25s ease;
}

.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--fg);
  transition: transform 0.25s ease, background-color 0.25s ease;
}

html[data-theme="dark"] .toggle-thumb {
  transform: translateX(18px);
}

.toggle-label {
  width: 3ch;
  text-align: left;
  color: var(--muted);
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4vw;
  padding: 6vw 6vw 4vw;
}

.hero-text h1 {
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  line-height: 1.02;
}

.hero-text .role {
  margin-top: 1rem;
  font-size: 1.1rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-image {
  border: 1px solid var(--border);
}

.hero-image img {
  width: 100%;
  height: auto;
}

/* ---------- Works ---------- */

.works {
  padding: 2vw 6vw 4vw;
  display: flex;
  flex-direction: column;
  gap: 8vw;
}

.work {
  display: grid;
  grid-template-columns: 0.8fr 1.6fr;
  gap: 4vw;
  align-items: start;
  padding-top: 3vw;
  border-top: 1px solid var(--border);
}

.work.reverse .work-text { order: 2; }
.work.reverse .work-image,
.work.reverse .work-gallery { order: 1; }

.work-text h2 {
  font-size: 1.6rem;
  margin-bottom: 0.6rem;
}

.work-text p {
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.98rem;
  margin: 0;
}

.work-image,
.work-gallery img {
  background: var(--image-bg);
  transition: background-color 0.25s ease;
}

.work-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.work-gallery.two-up {
  grid-template-columns: repeat(2, 1fr);
}

/* ---------- Contact ---------- */

.contact {
  padding: 6vw;
  margin-top: 4vw;
  border-top: 1px solid var(--border);
}

.contact-text {
  max-width: 32rem;
}

.contact-text h2 {
  font-size: 1.3rem;
  margin-top: 2rem;
}

.contact-text h2:first-child {
  margin-top: 0;
}

.contact-text ul {
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  line-height: 1.7;
}

.contact-text .contact-list a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

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

.muted { color: var(--muted); }

/* ---------- Contact CTA ---------- */

.contact-cta {
  text-align: center;
  padding: 8vw 6vw 10vw;
  scroll-margin-top: 4.5rem;
}

.contact-cta h2 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin-bottom: 1.5rem;
}

.contact-cta a {
  display: inline-block;
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.25rem;
  transition: border-color 0.2s ease;
}

.contact-cta a:hover {
  border-bottom-color: var(--fg);
}

/* ---------- Responsive ---------- */

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .work,
  .work.reverse {
    grid-template-columns: 1fr;
  }

  .work-text,
  .work.reverse .work-text {
    order: 1;
  }

  .work-image,
  .work-gallery,
  .work.reverse .work-image,
  .work.reverse .work-gallery {
    order: 2;
  }

  .work-gallery,
  .work-gallery.two-up {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .work-gallery,
  .work-gallery.two-up {
    grid-template-columns: 1fr;
  }
}

/* ---------- Zoomable images / Lightbox ---------- */

.hero-image img,
.work-image img,
.work-gallery img,
.contact-image img {
  cursor: zoom-in;
  transition: opacity 0.2s ease;
}

.hero-image img:hover,
.work-image img:hover,
.work-gallery img:hover,
.contact-image img:hover {
  opacity: 0.88;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
  padding: 4vh 4vw;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: 100%;
  max-height: 92vh;
  width: auto;
  height: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  cursor: zoom-out;
}

.lightbox-close {
  position: fixed;
  top: 1.5rem;
  right: 2rem;
  background: none;
  border: none;
  color: #f2f2f2;
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}
