/* --- GLOBAL RESET --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
  height: 100%;
}

.page-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: #fafafa;
}

/* --- HEADER1 --- */
.header1 {
  background-color: #eaeaea;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.header1 p {
  color: #434341;
  font-size: clamp(10px, 1.5vw, 13px);
  font-family: 'Courier New', Courier, monospace;
  margin: 0;
}

.header1 div {
  padding: clamp(3px, 1vw, 7px) clamp(3px, 1vw, 5px);
}

/* --- MAIN HEADER --- */
.header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: clamp(15px, 3vw, 25px) clamp(20px, 5vw, 80px) clamp(30px, 5vw, 50px);
  gap: clamp(5px, 2vw, 15px);
  flex-wrap: wrap;
}

.header-left,
.header-center,
.header-right {
  display: flex;
  align-items: center;
}

.header-left,
.header-right {
  flex: 0 0 auto;
  gap: clamp(10px, 2vw, 15px);
}

/* Center Logo */
.header-center {
  flex: 1 1 auto;
  justify-content: center;
  min-width: 150px;
  padding: 0 clamp(5px, 2vw, 10px);
  box-sizing: border-box;
}

/* Logo */
.logo-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  overflow: hidden;
  padding: 0 clamp(5px, 2vw, 10px);
}

.logo {
  display: block;
  height: auto;
  width: clamp(200px, 35vw, 500px); /* scales smoothly */
  max-width: 100%;
}

/* --- Logo responsiveness fix --- */
@media (max-width: 850px) {
  .logo {
    width: 300px; /* or tweak this number — try 280–320px based on visual balance */
  }
}

/* --- ICONS --- */

/* Base icon (for right-side icons) */
.icon {
  width: clamp(20px, 4.5vw, 28px);
  transition: transform 0.2s ease;
  cursor: pointer;
}

.icon:hover {
  transform: scale(1.1);
}

/* Slightly larger social media icons */
.header-left .icon {
  width: clamp(24px, 5vw, 32px);
}

/* Hamburger icon can match the right-side size */
.hamburger-icon {
  width: clamp(22px, 5vw, 28px);
}

/* Hide left/right icons on small screens */
@media (max-width: 556px) {
  .header-left,
  .header-right {
    display: none;
  }
  .header-center {
    flex: 1 1 100%;
    justify-content: center;
    min-width: 150px;
  }
}

/* HAMBURGER MENU */
.hamburger-menu {
  position: relative;
}

.hamburger-icon {
  cursor: pointer;
  width: clamp(20px, 5vw, 24px);
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
  min-width: 140px;
  z-index: 1000;
  overflow: hidden;
  padding: 5px 0;
  flex-direction: column;
  font-family: 'Montserrat', sans-serif;
}

.menu-item {
  padding: 10px 16px;
  font-size: clamp(12px, 2vw, 14px);
  color: #222;
  text-align: center;
  cursor: pointer;
  font-weight: 400;
  text-decoration: none;
  display: block;
}

.menu-item:hover {
  background-color: #f5f5f5;
}

/* --- ARTICLES --- */
.articles {
  margin: clamp(20px, 5vw, 80px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(clamp(140px, 20vw, 320px), 1fr));
  gap: clamp(8px, 2vw, 20px);
  max-width: 1400px;
  justify-content: start;
}

.articlebox {
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background-color: #fff;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  padding: clamp(8px, 2vw, 20px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.articlebox:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.articlebox p {
  text-align: center;
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  color: #333;
}

/* ARTICLES MOBILE */
/* --- ARTICLES --- */
.articles {
  margin: clamp(20px, 5vw, 80px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(clamp(140px, 20vw, 320px), 1fr));
  gap: clamp(8px, 2vw, 20px);
  max-width: 1400px;
  justify-content: start;
}

/*** BREAKPOINT: 4 → 3 columns (~800px) ***/
@media (max-width: 800px) {
  .articles {
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(8px, 2vw, 16px);
    margin: 0 clamp(15px, 5vw, 30px);
  }
}

/*** BREAKPOINT: 3 → 2 columns (~650px) ***/
@media (max-width: 600px) {
  .articles {
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(6px, 2vw, 12px);
  }
}

/*** BREAKPOINT: 2 → 1 column (~500px) ***/
@media (max-width: 350px) {
  .articles {
    grid-template-columns: 1fr;
    gap: clamp(5px, 2vw, 10px);
    margin: 0 clamp(10px, 4vw, 20px);
  }

  .articlebox {
    padding: 8px;
  }
}

/* --- ABOUT --- */

.aboutme {
  background-color: #f0f0f0;
  margin: 50px 0 0 0;
  padding: clamp(30px, 5vw, 60px); /* padding scales between 30px and 60px */
  box-sizing: border-box;
}

.aboutme-content {
  display: flex;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
  gap: clamp(20px, 4vw, 40px); /* gap scales */
  flex-wrap: wrap;
}

.aboutme-photo {
  width: clamp(200px, 25vw, 300px); /* photo scales */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  object-fit: cover;
  border-radius: 4px;
}

.aboutme-text {
  flex: 1;
  min-width: 250px;
  margin-left: clamp(0px, 5vw, 60px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.aboutme-text h1 {
  font-family: 'Playfair Display', serif;
  margin: 0 0 clamp(20px, 4vw, 55px) 0;
  line-height: 1.1;
  font-weight: 700;
  font-size: clamp(1.8rem, 5vw, 3rem); /* font scales */
  color: #222;
  white-space: normal;
}

.heading-line,
.indented-line {
  display: inline-block;
  white-space: nowrap;
}

.indented-line {
  margin-left: clamp(0px, 10vw, 40%);
}

.aboutme-info {
  display: flex;
  gap: clamp(10px, 3vw, 30px);
  align-items: flex-start;
  flex-wrap: wrap;
}

.about-label {
  font-family: 'Montserrat', sans-serif;
  color: grey;
  font-weight: 700;
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  min-width: 90px;
  text-transform: uppercase;
  user-select: none;
  letter-spacing: 0.08em;
  margin-left: clamp(0px, 5vw, 100px);
  margin-top: 7px;
}

.about-description {
  max-width: clamp(250px, 50vw, 475px);
  font-size: clamp(1rem, 3vw, 1.5rem);
  color: #444;
  line-height: 1.5;
  margin-left: clamp(0px, 3vw, 35px);
}

/* --- RESPONSIVE SMALL --- */
@media (max-width: 999px) {
  .aboutme-content {
    flex-direction: column-reverse;
    align-items: center;
    gap: clamp(20px, 5vw, 40px);
  }

  .aboutme-text {
    margin-left: 0;
    align-items: center;
    text-align: center;
  }

  .indented-line {
    margin-left: 0;
  }

  .about-label,
  .about-description {
    margin-left: 0;
  }
}

/* --- EXTRA-SMALL FIX: 412px and below --- */
@media (max-width: 412px) {
  .aboutme-info {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .about-label,
  .about-description {
    margin-left: 0;
    text-align: center;
  }
}

/* --- GALLERY --- */

.gallery {
  background-color: #fafafa;
  padding: 50px 20px;
  box-sizing: border-box;
  position: relative;
}

.gallerybox {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 columns on desktop */
  gap: 12px;
  max-width: 1280px;
  margin: 0 auto;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.gallery-item img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  display: block;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item img:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* --- RESPONSIVE GRID ADJUSTMENTS --- */

/* Switch to 2 columns at ≤ 650px */
@media (max-width: 650px) {
  .gallerybox {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    max-width: 95%;
  }

  .gallery {
    padding: 40px 10px;
  }

  .gallery-item img {
    border-radius: 8px;
  }

  .gallery-credit {
    position: static;
    text-align: center;
    margin-top: 15px;
    display: block;
    background-color: transparent;
  }
}

/* --- CREDIT STYLING --- */
.gallery-credit {
  position: absolute;
  bottom: 10px;
  left: 20px;
  font-size: 0.9rem;
  color: #555;
  background-color: rgba(255, 255, 255, 0.8);
  padding: 4px 8px;
  border-radius: 4px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  user-select: none;
  pointer-events: none;
}

/* FOOTER */

.footer {
    background-color: #eaeaea;
    padding: 40px 30px 20px;
    font-family: 'Montserrat', sans-serif;
    color: #333;
    left: 0;
    bottom: 0;
    width: 100%;
    margin-top: auto;
  }
  
  .footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto 20px;
    gap: 40px;
  }


  .footer-left,
  .footer-center,
  .footer-right {
    flex: 1;
    min-width: 200px
  }
  
  .footer-logo {
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0 0 10px;
  }
  
  .footer-tagline {
    font-size: 0.95rem;
    color: #666;
    margin: 0;
    line-height: 1.4;
  }
  
  .footer-center p {
    margin: 8px 0;
  }
  
  .footer-center a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
  }
  
  .footer-center a:hover {
    color: #000;
  }
  
  .footer-right .icon {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    opacity: 0.8;
    transition: opacity 0.2s;
  }
  
  .footer-right .icon:hover {
    opacity: 1;
  }

  .footer-right a {
    text-decoration: none; /* to fix weird issue with underline on Twitter logo */
  }
  
  .footer-credit {
    text-align: center;
    font-size: 0.85rem;
    color: #999;
    border-top: 1px solid #ddd;
    padding-top: 15px;
    margin-top: 20px;
  }