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

:root {
    --sidebar-width: 250px;
    --gap: 8px;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #fff;
    color: #333;
}

.container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* SIDEBAR/HEADER */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 16px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
/* Sidebar font settings (customize values below) */
:root {
  --sidebar-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sidebar-title-size: 4rem; /* ~24px */
  --sidebar-link-size: 3rem; /* ~15px */
  --sidebar-link-weight: 400;
  --sidebar-title-weight: 400;
}

/* Apply to sidebar elements */
.sidebar,
.sidebar * {
  font-family: var(--sidebar-font-family);
}

.name {
  font-size: var(--sidebar-title-size);
  font-weight: var(--sidebar-title-weight);
  line-height: 1.1;
  margin: 0;
}

/* nav links under the title */
.menu a {
  font-size: var(--sidebar-link-size);
  font-weight: var(--sidebar-link-weight);
  color: #666; /* adjust for contrast */
  text-decoration: none;
  display: inline-block;
  padding: 6px 0; /* vertical spacing */
}

/* Hover / active state (optional) */
.menu a:hover,
.menu a.active {
  color: #000;
}

/* Stack title, toggle and nav vertically */
.header-content {
  display: flex;
  flex-direction: column;
  gap: 12px;            /* space between title, toggle and nav */
  align-items: flex-start;
  width: 100%;
}

/* Desktop: ensure nav is visible under the title */
@media (min-width: 769px) {
  .menu {
    position: static;
    display: block;
    background: none;
    border: none;
    box-shadow: none;
    margin: 0;
    padding: 0;
  }

  .menu ul {
    display: flex;
    flex-direction: column;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .menu a {
    padding: 6px 0;
    font-size: 14px;
    color: #666;
    text-decoration: none;
  }

  .menu-toggle { display: none; } /* hide burger on desktop */
}

/* Mobile: keep the dropdown/toggle behavior */
@media (max-width: 768px) {
  .menu {
    display: none;            /* hidden by default on mobile */
    position: absolute;
    top: 60px;
    left: 16px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    min-width: 150px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 8px;
  }
  .menu.active { display: block; }

  .menu ul {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0;
    margin: 0;
  }

  .menu a {
    padding: 8px 12px;
  }

  .menu-toggle { display: inline-flex; } /* make sure burger is visible */
}

.name {
    font-size: 20px;
    font-weight: 300;
    letter-spacing: 1px;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu {
    display: none;
    position: absolute;
    top: 60px;
    left: 16px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    min-width: 150px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.menu.active {
    display: block;
}

.menu ul {
    list-style: none;
}

.menu li {
    border-bottom: 1px solid #eee;
}

.menu li:last-child {
    border-bottom: none;
}

.menu a {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    color: #333;
    transition: background 0.2s;
}

.menu a:hover,
.menu a.active {
    background: #f5f5f5;
}

/* CONTENT AREA */
.content {
    width: 100%;
    margin-top: 70px;
    overflow-y: auto;
    padding: 16px;
}

.gallery {
    display: grid;
    grid-auto-flow: dense;
    gap: var(--gap);
    width: 100%;
}

.gallery-item {
    width: 100%;
    overflow: hidden;
    background: #f5f5f5;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Portrait images: 2 side by side */
.gallery-item.portrait {
    grid-column: 1;
}

/* Landscape images: full width */
.gallery-item.landscape {
    grid-column: 1;
}

/* MOBILE LAYOUT (default) */
@media (max-width: 768px) {
    :root {
        --gap: 8px;
    }

    .gallery {
        grid-template-columns: 1fr 1fr;
    }

    .gallery-item.landscape {
        grid-column: 1 / -1;
    }

    .gallery-item.portrait {
        grid-column: 1;
    }
}

/* DESKTOP LAYOUT */
@media (min-width: 769px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    flex-direction: column;
    border-bottom: none;
    border-right: 1px solid #eee;
    padding: 40px 24px;
    overflow-y: auto;
    z-index: 1000;
    background: #fff;
    justify-content: flex-start; /* ensure children are pinned to top */
  }

  .header-content {
    flex-direction: column;
    width: 100%;
    align-items: flex-start;
  }

  .name {
    font-size: 24px;
    margin-bottom: 32px;
  }

  .menu-toggle {
    display: none;
  }

  .menu {
    position: static;
    display: block;
    background: none;
    border: none;
    box-shadow: none;
    margin-top: 0;
  }

  .menu ul {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .menu li {
    border-bottom: none;
    margin-bottom: 8px;
  }

  .menu a {
    padding: 0;
    font-size: 14px;
    color: #666;
  }

  .menu a:hover,
  .menu a.active {
    background: none;
    color: #000;
  }

  /* Make sure main content clears the fixed sidebar */
  .content {
    margin-left: calc(var(--sidebar-width) + 24px) !important;
    margin-top: 0;
    padding: 40px;
  }

  /* TWO-COLUMN GALLERY: allow images to keep native aspect ratios */
  .gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    align-items: start;
    grid-auto-rows: auto; /* allow varying row heights so images keep native aspect */
    width: auto;
    /* Use viewport-based calc so gallery fills the remaining viewport width beside the sidebar */
    max-width: calc(100vw - var(--sidebar-width) - 8px);
  }

  .gallery-item {
    width: auto;           /* let grid column control the width */
    min-width: 0;          /* allow item to shrink to column width */
    height: auto;          /* allow item height to follow image */
    overflow: hidden;
    box-sizing: border-box;
    display: block;
  }

  .gallery-item.landscape,
  .gallery-item.portrait {
    grid-column: auto;
  }

  .gallery-item.portrait:nth-child(2n) {
    grid-column: auto;
  }

  .gallery-item img {
    width: 100%;
    height: auto;           /* preserve natural aspect ratio */
    object-fit: unset;      /* not needed when height:auto */
    display: block;
  }
}

/* Additional styles for contact and purchase pages */
.page-content {
    max-width: 800px;
}

.page-content h2 {
    font-size: 32px;
    margin-bottom: 16px;
    font-weight: 300;
    letter-spacing: 1px;
}

.page-content p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 16px;
    color: #666;
}

/* Purchase form styles */
.purchase-form {
  max-width: 980px;
  margin: 0 auto;
  color: #222;
  font-size: 15px;
}

/* generic fieldset spacing */
.form-section {
  margin: 28px 0;
  border: none;
  padding: 0;
}

/* two-column layout for name row */
.form-section.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}
.form-section.two-col .col label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
}
.form-section .col input[type="text"],
.form-section input[type="email"],
.form-section input[type="text"],
.form-section textarea {
  width: 100%;
  border: 1px solid #e6e6e6;
  background: #fff;
  padding: 12px;
  font-size: 14px;
  border-radius: 2px;
  transition: border-color .12s;
}
.form-section textarea {
  min-height: 120px;
  resize: vertical;
}

/* hints / small helper text */
.hint {
  color: #8a8a8a;
  font-size: 13px;
  margin: 6px 0 12px;
}

/* file-drop area */
.file-drop {
  border: 2px dashed #d9d9d9;
  border-radius: 4px;
  padding: 36px 18px;
  text-align: center;
  cursor: pointer;
  background: #fafafa;
  position: relative;
}
.file-drop:focus {
  outline: 3px solid rgba(0,0,0,0.08);
}
.file-drop-inner { display:flex; flex-direction:column; align-items:center; gap:8px; justify-content:center; }
.file-drop .plus {
  width: 42px; height: 42px; line-height:42px; border-radius:50%;
  background:#fff; border:1px solid #eee; color:#666; font-size:22px;
  display:flex; align-items:center; justify-content:center;
  box-shadow: 0 1px 1px rgba(0,0,0,0.03);
}
.file-drop-text { font-weight:500; color:#666; }
.file-name { margin-top:8px; font-size:13px; color:#444; }

/* radio buttons (signed) */
.radio { display:block; margin:10px 0; color:#333; font-size:14px; }
.radio input { margin-right:10px; transform:translateY(1px); }

/* inputs full width on single-column sections */
.form-section input[type="text"],
.form-section input[type="email"] {
  display:block;
}

/* submit */
.form-actions { text-align:center; margin:36px 0; }
.submit-btn {
  background:#222; color:#fff; border:none; padding:14px 36px;
  font-weight:600; letter-spacing:1px; cursor:pointer; font-size:14px;
  border-radius:2px;
}
.submit-btn:active { transform:translateY(1px); }

/* small responsive tweaks */
@media (max-width: 768px) {
  .form-section.two-col { grid-template-columns: 1fr; }
  .file-drop { padding: 26px 12px; }
}

.contact-info,
.purchase-info {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid #eee;
}

.contact-info p,
.purchase-info p {
    margin-bottom: 12px;
}

.contact-info a,
.purchase-info a {
    color: #000;
    text-decoration: none;
    border-bottom: 1px solid #000;
    transition: opacity 0.2s;
}

.contact-info a:hover,
.purchase-info a:hover {
    opacity: 0.7;
}
