/* =========================
   THEME VARIABLES
========================= */

:root {
    --background: #f5f4f0;
    --foreground: #222222;
    --secondary: #777777;
    --border: #d8d6d0;
}

[data-theme="dark"] {
    --background: #171717;
    --foreground: #eeeeee;
    --secondary: #aaaaaa;
    --border: #383838;
}

/* =========================
   GLOBAL STYLES
========================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--foreground);
    font-family: "Instrument Sans", Arial, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background 0.3s, color 0.3s;
}

a {
    color: inherit;
    text-decoration: none;
}

/* =========================
   HEADER
========================= */

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 4%;
    border-bottom: 1px solid var(--border);
    background: var(--background);
    position: relative;
    z-index: 10;
}
.site-logo {
    font-size: 17px;
    font-weight: 500;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.logo-separator {
    color: var(--border);
    font-weight: 300;
    margin: 0 8px;
}

.site-logo span {
    color: var(--secondary);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 30px;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.site-nav a:hover {
    opacity: 0.5;
}

#theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--foreground);
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 19px;
}

/* =========================
   MAIN CONTENT
========================= */

main {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 4%;
}

.introduction {
    padding: 75px 0 65px;
    max-width: 750px;
}

.eyebrow {
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--secondary);
}

h1 {
    font-size: clamp(38px, 5vw, 72px);
    font-weight: 400;
    line-height: 1.12;
    letter-spacing: -0.045em;
    margin: 20px 0 24px;
}


/* =========================
   GALLERY
========================= */

.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 110px;
  grid-auto-flow: dense;
  gap: 14px;
}

.gallery-item {
  grid-column: span 1;
  grid-row: span 3;
  margin: 0;
  overflow: hidden;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.gallery-item img:hover {
    opacity: 0.94;
}

/* Occasional wider photographs */
.gallery-item:nth-child(9n + 1) {
  grid-column: span 2;
  grid-row: span 4;
}

/* Smaller photographs */
.gallery-item:nth-child(9n + 4),
.gallery-item:nth-child(9n + 7) {
  grid-row: span 2;
}

/* Another wider photograph */
.gallery-item:nth-child(9n + 6) {
  grid-column: span 2;
  grid-row: span 3;
}

/* Adjust BMW photograph */
.gallery-item:nth-child(28) {
  grid-column: span 2;
  grid-row: span 3;
}
.gallery-item:nth-child(28) img {
    object-position: center 65%;
}

@media (max-width: 900px) {
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 100px;
  }
}

@media (max-width: 480px) {
  .gallery {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: auto;
    gap: 14px;
  }

  .gallery-item,
  .gallery-item:nth-child(9n + 1),
  .gallery-item:nth-child(9n + 4),
  .gallery-item:nth-child(9n + 7),
  .gallery-item:nth-child(9n + 6),
  .gallery-item:nth-child(28) {
    grid-column: auto;
    grid-row: auto;
  }

  .gallery-item img {
    width: 100%;
    height: auto;
  }
}
.about {
    width: 100%;
    max-width: 700px;
    margin: 0;
    padding: 100px 0;
}

.about h2 {
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 24px;
}

.about p {
    width: 100%;
    max-width: 600px;
    color: var(--secondary);
    line-height: 1.8;
}

/* =========================
   FOOTER
========================= */

.site-footer {
    display: flex;
    justify-content: space-between;
    padding: 30px 4%;
    border-top: 1px solid var(--border);
    color: var(--secondary);
    font-size: 12px;
}

/* =========================
   RESPONSIVE DESIGN
========================= */


@media (max-width: 700px) {
    .site-header {
        padding: 20px 5%;
    }

    .site-logo {
        font-size: 12px;
        letter-spacing: 1px;
    }

    .site-nav {
        gap: 15px;
    }

    main {
        padding: 0 5%;
    }

    .introduction {
        padding: 70px 0;
    }

    .gallery {
        grid-template-columns: 1fr;
        gap: 35px;
        padding: 20px 0 60px;
    }

  .site-footer {
    flex-direction: column;
    gap: 5px;
    padding: 25px 5%;
}
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    body {
        transition: none;
    }
}
@media (max-width: 1000px) {
    .gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .gallery {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* =========================
   FULL-SCREEN PHOTO VIEWER
========================= */

.lightbox {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.96);
    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: center;
}

/* Keep the viewer hidden until activated */
.lightbox[hidden] {
    display: none;
}

/* Photograph */
.lightbox-image {
    display: block;
    max-width: 85vw;
    max-height: 85vh;
    max-height: 85dvh;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Navigation buttons */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 28px;
    padding: 15px;
    z-index: 1001;
    transition: opacity 0.3s ease;
}

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

/* Close button */
.lightbox-close {
    top: 25px;
    right: 30px;
}

/* Previous photograph */
.lightbox-prev {
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
}

/* Next photograph */
.lightbox-next {
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
}

/* Mobile adjustments */
@media (max-width: 700px) {
    .lightbox-image {
        max-width: 92vw;
        max-height: 80vh;
        max-height: 80dvh;
    }

    .lightbox-prev {
        left: 5px;
    }

    .lightbox-next {
        right: 5px;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
    }
}

/* Minimal audio control */

.sound-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 8px 0;
    background: transparent;
    border: none;
    border-radius: 0;

    color: var(--text-color, inherit);
    font: inherit;
    font-size: 12px;
    letter-spacing: 0.02em;

    cursor: pointer;
    transition: opacity 0.25s ease;
}

.sound-toggle:hover {
    opacity: 0.55;
}

.sound-toggle:focus-visible {
    outline: 1px solid currentColor;
    outline-offset: 5px;
}

.sound-icon {
    font-size: 15px;
    line-height: 1;
}

.sound-label {
    white-space: nowrap;
}

/* Audio button — final styling override */

.site-nav button#sound-toggle {
    appearance: none;
    -webkit-appearance: none;

    background: transparent;
    border: 0;
    box-shadow: none;

    color: inherit;
    font: inherit;
    font-size: 12px;
    font-weight: 400;

    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 8px 0;
    cursor: pointer;
}

.site-nav button#sound-toggle:hover {
    opacity: 0.6;
}

/* Contact navigation button */
.site-nav button#contact-trigger {
    appearance: none;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;

    color: inherit;
    font: inherit;
    cursor: pointer;
}

.site-nav button#contact-trigger:hover {
    opacity: 0.6;
}

/* Contact overlay */
.contact-overlay:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.contact-overlay[hidden] {
    display: none;
}

/* Contact panel */
.contact-panel {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: min(90dvh, 760px);
    overflow-y: auto;
    padding: 36px 40px;

    /* Translucent surface */
    background: rgba(245, 244, 240, 0.94);
    color: var(--foreground);

    /* Soft edges */
    border: 1px solid var(--border);
    border-radius: 14px;

    /* Depth */
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}
[data-theme="dark"] .contact-panel {
    background: rgba(23, 23, 23, 0.94);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}
/* Close button */
.contact-close {
    position: absolute;
    top: 18px;
    right: 22px;
    background: transparent;
    border: none;
    color: inherit;
    font-size: 28px;
    cursor: pointer;
}

/* Heading and introduction */
.contact-panel h2 {
    font-size: 30px;
    font-weight: 500;
    margin: 12px 0;
}

.contact-intro {
    font-size: 14px;
    line-height: 1.7;
    color: var(--secondary);
    margin-bottom: 24px;
}

/* Form fields */
.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.form-field label {
    font-size: 12px;
    letter-spacing: 0.04em;
}

.form-field input,
.form-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid currentColor;
    border-radius: 0;
    color: inherit;
    font: inherit;
    font-size: 14px;
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-bottom-width: 2px;
}

/* Submit button */
.contact-submit {
    padding: 12px 24px;
    background: var(--foreground);
    color: var(--background);
    border: 1px solid var(--foreground);
    border-radius: 6px;

    font: inherit;
    font-size: 12px;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.contact-submit:hover {
    opacity: 0.75;
}

/* Mobile layout */
@media (max-width: 600px) {
    .contact-panel {
        padding: 32px 24px;
    }
}
.site-header {
    gap: 20px;
}

.site-logo {
    flex-shrink: 0;
}
/* Spam prevention: honeypot field */
.honeypot {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}