/* ================================================
   GLOBAL STYLES — Unified for Main, Projects & Contact
   ================================================ */

/* --- GOOGLE FONT --- */
@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&display=swap');

/* --- ROOT VARIABLES --- */
:root {
  --font-sans: "Atkinson Hyperlegible", -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, "Helvetica Neue", Arial, sans-serif;
  --bg-color: #fafafa;
  --text-color: #111;
  --accent: #222;
  --border-color: #e0e0e0;
  --gap: 1.5rem;
  --side-padding: 3vw;
}

/* --- BASE LAYOUT --- */
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

h1, h2, h3 {
  font-weight: 700;
  color: var(--text-color);
}

p {
  margin-top: 0;
}

/* ================================================
   NAVIGATION BAR (Shared)
   ================================================ */
nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 1rem var(--side-padding);
}

nav a {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-color);
  text-decoration: none;
  margin-left: 1.5rem;
  transition: opacity 0.2s ease;
}

nav a:hover {
  opacity: 0.6;
}

/* ================================================
   PAGE HEADERS (Shared)
   ================================================ */
header {
  text-align: center;
  padding: 2rem var(--side-padding) 1rem;
}

header h1 {
  margin-bottom: 0.5rem;
}

header .subtitle {
  color: #555;
  font-size: 1.1rem;
}

/* ================================
   ABOUT SECTION (Index Page)
   ================================ */
.about-section {
  margin: 4rem auto 4rem;        /* top + bottom margin for breathing room */
  padding-top: 2rem;
  border-top: 2px solid var(--border-color);
  max-width: 900px;
  text-align: left;
  font-size: 1rem;
  color: #333;
}

.about-section h2 {
  font-weight: 700;
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

/* --- Responsive adjustment for smaller screens --- */
@media (max-width: 800px) {
  .about-section {
    font-size: 0.95rem;
    padding-top: 1.5rem;
    margin: 3rem auto;           /* slightly tighter on tablets */
  }
}

/* --- Optional: center-align text on very small screens --- */
@media (max-width: 600px) {
  .about-section {
    text-align: center;
    margin: 2.5rem auto;         /* compact yet balanced for mobile */
  }

  .about-section h2 {
    font-size: 1.2rem;
  }
}
.about-section {
  margin: 5rem auto 4rem;
}

/* ================================================
   MAIN CONTENT AREA
   ================================================ */
main {
  padding: 2rem var(--side-padding) 3rem;
  max-width: 1600px;
  margin: 0 auto;
}

/* ================================================
   IMAGE GALLERY (Main / Index Page)
   ================================================ */
  /* === GALLERY === */
    .gallery {
      display: grid;
      gap: var(--gap);
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
      padding: var(--gap);
      max-width: 1200px;
      margin: 2rem auto;
    }

    figure {
      position: relative;
      margin: 0;
      overflow: hidden;
      background: #000;
      transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    figure:hover {
      transform: scale(1);
      box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
    }

    figure a {
      display: block;
      color: inherit;
      text-decoration: none;
      position: relative;
    }

    figure img {
      width: 100%;
      height: auto;
      display: block;
      transition: opacity 0.3s ease;
    }

    /* === FULL OVERLAY CAPTION === */
    figcaption {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      background: rgba(255, 255, 255, 0.8);
      color: var(--accent);
      font-weight: 400; /* changed to regular weight */
      font-size: 1rem;
      opacity: 0;
      transition: opacity 0.1s ease;
      padding: 1rem;
      backdrop-filter: blur(4px);
    }

    figure:hover figcaption {
      opacity: 0.8;
    }


/* ================================================
   PROJECTS PAGE
   ================================================ */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}

.project {
  overflow: hidden;
  border-radius: 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

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


.reference {
 position: relative;
  display: inline-block;
  box-shadow: inset 0 0 0 0.5% #000; /* thin black border that scales with image */
  background-color: #fafafa;             /* white frame */
  padding: 3%;                        /* thickness of white frame area */
  box-sizing: border-box;
  overflow: hidden;
}

.reference img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border: 4px solid #000; /* thin black line */
  padding: 0px;           /* small space between image and frame */
  background-color: #fff;  /* optional: adds white background under the frame */
  box-sizing: border-box;  /* ensures consistent sizing */
}


/* Caption inside frame */
.reference .caption {
  position: absolute;
  bottom: 06%;
  right: 4%;
  background: #fff;
  color: #000;
  font-size: 0.7rem;
  font-weight: 400;
  padding: 0.2em 0.4em;
  box-sizing: border-box;
  text-align: right;
  line-height: 1.2;
}





/* --- Optional captioned version of project images --- */
.project .caption {
  opacity: 0;
}

.project:hover .caption {
  opacity: 0; /* disabled hover for static display */
}

.text-section {
  margin-top: 1rem;
  padding-top: 0.1rem;
  border-top: 0px solid var(--border-color);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
  font-size: 1rem;
  color: #333;
}

.project-text {
  margin-top: 1rem;
  padding-top: 0.1rem;
  border-top: 0px solid var(--border-color);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
  font-size: 1rem;
  color: #333;
}

/* ================================================
   CONTACT PAGE
   ================================================ */
.contact-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 3rem var(--side-padding);
  text-align: center;
}

.contact-container h2 {
  font-weight: 700;
  margin-bottom: 1rem;
}

.contact-container p {
  font-size: 1rem;
  color: #333;
  margin-bottom: 0.75rem;
}

.email-link {
  font-weight: 400;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
}

.email-link:hover {
  opacity: 0.7;
}

/* Instagram section */
.instagram {
  margin-top: 1.5rem;
  font-size: 0.95rem;
}

.instagram a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
}

.instagram a:hover {
  opacity: 0.7;
}

/* ================================================
   FOOTER (Shared)
   ================================================ */
footer {
  text-align: center;
  padding: 2rem 1rem;
  color: #777;
  border-top: 2px solid var(--border-color);
  font-size: 0.9rem;
}

/* ================================================
   RESPONSIVE BEHAVIOR
   ================================================ */
@media (max-width: 800px) {
  nav {
    justify-content: center;
  }

  nav a {
    margin: 0 0.75rem;
  }

  .caption {
    font-size: 1.1rem;
  }

  .text-section {
    font-size: 0.95rem;
    padding-top: 1.5rem;
  }
}

@media (max-width: 600px) {
  main {
    padding: 1rem var(--side-padding) 2rem;
  }

  header {
    padding: 1.5rem var(--side-padding);
  }
}
/* === Hover Animation Class === */
.hover-underline {
  position: relative;
  color: #222;
  text-decoration: none;
  font-weight: 400;
  transition: color 0.3s ease;
}

/* underline pseudo-element */
.hover-underline::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2px;
  background-color: #222;
  transition: width 0.3s ease;
}

/* animate underline and color on hover */
.hover-underline:hover {
  color: #000;
}

.hover-underline:hover::after {
  width: 100%;
}
