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

/* ===== Fonts & Body ===== */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #fff;
  color: #111;
  line-height: 1.6;
  font-size: 16px;
  scroll-behavior: smooth;
}

/* ===== Skip Link ===== */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #111;
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 1000;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid #555;
  outline-offset: 4px;
}

/* ===== Navigation ===== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 2rem;
  z-index: 1000;
}

.logo {
  display: flex;
  align-items: center;
  color: #111;
  text-decoration: none;
  cursor: pointer;
}

.logo svg {
  width: 32px;
  height: 32px;
  transition: transform 0.2s ease, fill 0.2s ease;
}

.logo:hover svg {
  transform: scale(1.1);
  fill: #555;
}

nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

nav a {
  text-decoration: none;
  color: #111;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

nav a:hover,
nav a:focus-visible {
  color: #0071e3; /* Apple blue */
  outline: none;
}

/* ===== Header ===== */
header {
  text-align: center;
  padding: 8rem 1rem 1rem 1rem; /* extra top padding for fixed nav */
}

header h1 {
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: -0.5px;
}

header p {
  color: #555;
  margin-top: 0.5rem;
  font-size: 1.1rem;
}

/* ===== Sections ===== */
main section {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 1rem;
  border-top: 1px solid #e5e5e5;
}

section h2 {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

section ul {
  list-style: none;
}

section li {
  margin-bottom: 0.75rem;
  padding-left: 1rem;
  position: relative;
}

section li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: #aaa;
}

/* ===== About Me Section ===== */
.about-wrapper {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-top: 1.5rem;
}

.profile-pic {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #e5e5e5;
}

/* ===== Hero Image ===== */
.hero {
  display: block;
  width: 100%;
  max-width: 1100px;
  margin-top: 2rem;
  margin-bottom: 0%;
  margin-left: auto;
  margin-right: auto;
  border-radius: 16px;
  border: 1px solid #e5e5e5;
  overflow: hidden;
}

.hero img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-section {
  position: relative;
  overflow: hidden;
}

/* Clouds overlay floats near top */
.cloud-overlay {
  position: absolute;
  top: 0;        /* adjust this value to move clouds lower/higher */
  left: 0;
  width: 100%;
  height: auto;
  pointer-events: none;
  z-index: 3; /* above image, below any header text if needed */
}

.grass-overlay {
  position: absolute;
  bottom: 0;  
  left: 0;
  width: 100%; /*stretch to full width*/
  height: auto;
  pointer-events: none;
  z-index: 2; /* above clouds but below text */
}

.hero-wrapper {
  max-width: 1100px;   /* keeps hero nice and centered */
  margin: 2rem auto 0;
  border-radius: 16px;
  border: 0px solid #e5e5e5;
  overflow: hidden;
  position: relative;
  z-index: 1;     /* so flowers layer above */
}

/* ===== Link-Image Grid ===== */
.img-link {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.img-link:hover,
.img-link:focus-visible {
  transform: translateY(-2px);
  border-color: #d5d5d5;
}

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

.img-link .caption {
  display: block;
  padding: 0.75rem 1rem;
  color: #555;
  font-size: 0.95rem;
}

/* ===== Colors Section Background & Fade ===== */
#colors.with-bg {
  position: relative;
  background: url("assets/images/") center/cover no-repeat;
  color: #111;
  overflow: hidden;

  /* Full width */
  max-width: none;
  margin: 0;
  width: 100%;
  padding: 6rem 0;
}

#colors.with-bg .content {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
  text-align: left;
}

#colors.with-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.7) 25%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  z-index: 0;
}

#colors.with-bg h2,
#colors.with-bg ul {
  position: relative;
  z-index: 1;
  color: #111;
}

/* ===== Scroll margin for anchors ===== */
#mdn-thumb {
  scroll-margin-top: 80px;
}

/* ===== Gallery Masonry ===== */
.gallery-grid {
  column-count: 3;
  column-gap: 1rem;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  display: block;
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  border-radius: 12px;
  display: block;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  object-fit: cover;
}

.gallery-item video {
  max-height: 400px;
  margin-top: 1rem;
}

/* ===== Footer ===== */
footer {
  text-align: center;
  border-top: 1px solid #e5e5e5;
  padding: 2rem 1rem;
  color: #888;
  font-size: 0.9rem;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .gallery-grid {
    column-count: 2;
  }
}

@media (max-width: 800px) {
  #links .link-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  header h1 {
    font-size: 2rem;
  }
  section h2 {
    font-size: 1.25rem;
  }
  .about-wrapper {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .gallery-grid {
    column-count: 1;
  }
}

/* ===== Gallery Masonry ===== */
.gallery-grid {
  max-width: 1100px; /* keeps it centered */
  margin: 0 auto;
  column-count: 3;
  column-gap: 1rem;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  display: block;
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  border-radius: 12px;
  display: block;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  object-fit: cover;
}

.gallery-item video {
  max-height: 400px;
  margin-top: 1rem;
}

/* Add spacing to all items inside the gallery */
.gallery-grid .img-link,
.gallery-grid .gallery-item {
  margin-bottom: 1rem; /* adjust as needed */
}

.gallery-item:hover,
.gallery-item:focus-visible {
  transform: translateY(-2px);
  border-color: #d5d5d5;
}

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

.gallery-item .caption {
  display: block;
  padding: 0.75rem 1rem;
  color: #555;
  font-size: 0.95rem;
  text-align: center;        /* optional, centers text under image */
  background-color: #fff;    /* optional, adds a little box */
  border-top: 1px solid #e5e5e5; /* optional, separates caption from image */
}
.gallery-item .caption {
  border-radius: 0 0 12px 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}




