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

/* Prevent accidental sideways scroll from oversized content */
html, body { 
  overflow-x: hidden; 
  height: 100%;            /* ensure the fixed layer paints properly */
}

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

/* --- Background moved to a fixed pseudo-layer (no blur/mush with many images) --- */
body {
  font-family: "Edu NSW ACT Hand Pre", cursive;
  color: white;
  background: none; /* was: url(...) + fixed */
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1; /* behind everything */
  background: url(images/old-wooden-floor-textured-background.jpg) center / cover no-repeat;
  will-change: transform; /* keeps it crisp on scroll/compositing */
}

/* (old attachment toggle no longer needed)
@media (max-width: 400px) {
  body { background-attachment: scroll; }
}
*/

.homepage-image {
  width: 650px;
  height: auto;
  margin: 2rem auto 1rem;
  display: block;
}

.home-paragraph {
  background: rgba(39, 31, 21, 0.75); /* warm cream overlay */
  padding: 40px;
  border-radius: 10px;
  font-size: 1.4rem;
  font-family: 'Georgia', serif;
  line-height: 1.6;
  text-align: center;
  text-shadow: 0px 1px 2px rgba(0,0,0,0.6);
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  z-index: 1000;
}

.logo {
  font-size: 1.8rem;
}

.nav-links a {
  margin-left: 1.5rem;
  text-decoration: none;
  color: white;
  font-weight: bold;
}

.menu-toggle {
  position: relative;
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

.mobile-menu {
  position: fixed;
  top: 60px; /* Adjust this to match your header height */
  right: 2rem;
  background-color: rgba(0, 0, 0, 0.95);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  display: none;
  flex-direction: column;
  z-index: 9999;
  min-width: 180px;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  padding: 1rem;
  color: white;
  text-decoration: none;
  border-bottom: 1px solid #444;
  text-align: right;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
}

.menu-toggle {
  display: block;
}

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

.contact-section {
  text-align: center;
  padding: 3rem 1rem;
}

.contact-title {
  text-align: center;
  color: white;
  text-shadow: 5px 2px 1px rgba(0,0,0,0.6); 
  font-size: 3rem;
  margin-bottom: 1 rem;
}

.contact-paragraph {
  text-align: center;
  color: white;
  background: rgba(39, 31, 21, 0.75);
  padding: 40px;
  border-radius: 10px;
  font-size: 1.4rem;
  font-family: 'Georgia', serif;
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.5rem;
  margin-top: 3rem;
}

.contact-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2rem;
  gap: 1.5rem;
}

.contact-btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  font-size: 1.1rem;
  color: white;
  background-color: #333;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.3s ease;
}

.contact-btn:hover {
  background-color: #555;
}

.social-icon {
  color: white;
  text-decoration: none;
  transition: color 0.3s ease;
}

.social-img {
  width: 160px;
  height: auto;
}

.social-icon:hover {
  color: #aaa;
}

/* ---------------- About me Page ---------------- */

.about-me-title {
  text-align: center;
  color: white;
  text-shadow: 5px 2px 1px rgba(0,0,0,0.6);
  font-size: 3rem;
  margin-bottom: 1 rem;
}

.about-me-paragraph {
  text-align: center;
  color: white;
  background: rgba(39, 31, 21, 0.75);
  padding: 40px;
  border-radius: 10px;
  font-size: 1.4rem;
  font-family: 'Georgia', serif;
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.5rem;
  margin-top: 3rem;
}

.emma-img {
  width: 200px;
  height: auto;
  border-radius: 50%;
  margin: 1.5rem 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* ---------------- Services page ---------------- */

.services-image {
  /* responsive width so it centers and fits on phones */
  width: clamp(220px, 80vw, 400px);
  height: auto;
  display: block;
  object-fit: cover;
  margin-left: auto;
  margin-right: auto;
}

.services-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  color: black;
  padding: 0;
  list-style: none;
  max-width: 700px;
  margin: 0 auto;
}

.services-list li {
  background: rgba(39, 31, 21, 0.75);
  font-family: 'Georgia', serif;
  padding: 1rem;
  text-align: center;
  border-radius: 10px;
  line-height: 1.6;
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.contact-btn {
  display: block;
  width: max-content;
  margin: 2rem auto 0;
  padding: 0.8rem 1.5rem;
  background: rgba(39, 31, 21, 0.75);
  color: white;
  border-radius: 8px;
  font-family: 'Georgia', serif; /* fixed casing */
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease;
}

.contact-btn:hover {
  background-color: #555;
}

/* ---------------- Portfolio page ---------------- */

/* General Page Styling */

.heavy-bg {
  /* no effect now, but harmless to keep */
  background-attachment: scroll !important;
}

.heavy-bg .site-header {
  backdrop-filter: none !important;
  background: rgba(0,0,0,0.75) !important;
}

.heavy-bg .masonry-item:hover { transform: none !important; }

main {
  padding: 2rem;
  color: white;
}

/* Section Headings (kept for other pages if used) */
main h2,
main h3 {
  font-family: "Edu NSW ACT Hand Pre", cursive;
  color: black;
  font-size: 3rem;
  text-align: center;
  margin-bottom: 1rem;
}

/* (Legacy) Gallery Grid – keep for other pages that may still use .gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.gallery img {
  width: 100%;
  border-radius: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.gallery img:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

/* ---- New: Masonry (Pinterest-style) ---- */

.portfolio {
  padding: 2rem 1rem;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.filter-bar .filter {
  background: rgba(39,31,21,.85);
  color: #fff;
  border: 0;
  padding: .5rem .9rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: 'Georgia', serif;
  transition: transform .05s ease, opacity .2s ease;
}

.filter-bar .filter:active { transform: scale(0.98); }
.filter-bar .filter.is-active { outline: 2px solid #ffffff33; }

.masonry {
  columns: 1; /* mobile default */
  column-gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 520px) { .masonry { columns: 2; } }
@media (min-width: 820px) { .masonry { columns: 3; } }
@media (min-width: 1100px) { .masonry { columns: 4; } }

.masonry-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
  background: #0000; /* ensure transparent background */
}

.masonry-item img {
  display: block;
  width: 100%;
  height: auto;
}

/* Optional hover lift */
.masonry-item:hover { transform: translateY(-2px); }

/* Optional captions */
.masonry-item figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: .5rem .75rem;
  background: linear-gradient(transparent, rgba(0,0,0,.55));
  color: #fff;
  font-size: .9rem;
}

/* ---------------- Modal Styling (viewer) ---------------- */

.modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 2000;
  padding-top: 4rem;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
  display: block;
  margin: 0 auto;
  max-width: 90%;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  color: #fff;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  z-index: 2100;
}

@media (max-width: 600px) {
  .modal-content {
    max-width: 95%;
    max-height: 70vh;
  }
}
