/* ===== Shared Styles (Applies to All Pages) ===== */
body {
  background: linear-gradient(138deg, #be9980 0%, #ddfcfc 30%, #ddfcfc 50%, #9c7f6b 100%);
  background-color: #f8ffff;
  color: hsla(0, 0%, 6%, 0.9);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: 'milliard';
  font-size: 10pt;
  font-weight: 300;
}

/* Default container (applies to all pages unless overridden) */
.container {
  display: grid;
  grid-template-columns: 300px 1fr; /* Sidebar + content */
  gap: 1rem;
  margin: 0; /* Aligns container to the left */
  max-width: 1200px;
  width: 100%;
  padding: 5px;
}

.sidebar {
  text-align: center;
  padding: 1rem;
  width: 100%;
}

.sidebar img {
  max-width: 250px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
margin-bottom: 1rem;
}

/* ===== Index Page Layout ===== */
body.index .container {
  /* No need to redefine grid-template-columns unless you want to override */
  margin: 0; /* Ensure container is left-aligned */
}

body.index .content {
  padding: 1rem; /* Add 1rem padding to match writing.html */
padding-top: 60px;
}

/* ===== Split-Content Layout (e.g., writing.html) ===== */
body.split-content .content {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Two equal columns */
  gap: 3rem;
  padding: 1rem;
padding-top: 60px;
}

/* ===== Grid Layout (e.g., design.html) ===== */
body.grid-layout .content {
  padding: 1rem;
padding-top: 60px;
}

body.grid-layout .grid-container {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Two equal columns */
  gap: 1rem;
}

body.grid-layout .grid-item img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  max-width: 100%;
}

/* Desktop: Set image height to 50% of viewport height */
@media (min-width: 768px) {
  body.grid-layout .grid-item img {
    height: 50vh;
    width: auto;
  }
}

/* ===== Mobile Styles (Applies to All Pages) ===== */
@media (max-width: 767px) {
  /* Force the container to use a block layout for vertical stacking */
  .container {
    display: block !important;
    margin: 0 !important;
    max-width: 100% !important;
    padding: 0 !important;
  }

  /* Sidebar: Full width and centered */
  .sidebar {
    display: block !important;
    width: 100% !important;
    padding: 1rem !important;
    text-align: center !important;
    margin-bottom: 1rem !important;
    box-sizing: border-box !important;
  }

  /* Content: Full width and positioned below the sidebar */
  .content {
    display: block !important;
    width: 100% !important;
    padding: 10px !important;
    box-sizing: border-box !important;
    margin-top: 0 !important;
  }

  /* Split-content layout: Stack vertically */
  body.split-content .content {
    display: block !important;
gap: 3rem;
  }

  /* Grid layout: Stack grid items vertically */
  body.grid-layout .grid-container {
    display: block !important;
  }

  /* Grid items: Full width */
  body.grid-layout .grid-item {
    width: 100% !important;
    display: block !important;
    margin-bottom: 1rem !important;
  }

  /* Grid images: Scale appropriately */
  body.grid-layout .grid-item img {
    height: auto !important;
    width: 100% !important;
    display: block !important;
    margin: 0 auto !important;
  }

}

/* ===== Font Faces ===== */
@font-face {
  font-family: 'milliard';
  src: url('MilliardLight.otf') format('opentype');
}

@font-face {
  font-family: 'milliardbold';
  src: url('MilliardBold.otf') format('opentype');
}

@font-face {
  font-family: 'milliarditalic';
  src: url('MilliardItalic.otf') format('opentype');
}

/* ===== Other Shared Styles ===== */
a {
  font-family: Arial;
  color: #7b543a;
  text-decoration: none;
}

a:hover {
  color: #8f6549;
  text-decoration: none;
  font-style: italic;
}

.link-sidebar {
  color: #7b543a;
  text-decoration: none;
  font-weight: bold;
  text-decoration: underline;
  font-size: 22pt;
  display: block;
  margin-bottom: 0.5rem;
}

.link-sidebar:hover {
  color: #8f6549;
  text-decoration: none;
  font-weight: italic;
  font-size: 22pt;
  display: block;
  margin-bottom: 0.5rem;
}

.rotate-element {
  transition: transform 0.4s ease-in-out;
  transform: rotate(0deg);
}

.rotate-element:hover {
  transform: rotate(-25deg);
}

h2 {
  font-family: 'milliardbold';
  font-size: 13pt;
  text-align: left;
  line-height: 1.2;
  margin-bottom: 0em;
}

h3 {
  font-family: 'milliardbold';
  font-size: 13pt;
  text-align: center;
  line-height: 1.2;
  margin-bottom: 0em;
}

i {
  font-family: 'milliarditalic';
  display: inline;
}

p {
  margin-bottom: 1em;
}