:root {
  --pink: #3ee1f0;
  --dark: #333333;
  --mid: #888888;
  --light: #f5f5f5;
  --white: #ffffff;
  --gutter: 17%;
}

/* ── RESET & BASE ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Lato', sans-serif;
  color: var(--dark);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ── PAGE SWITCHING ── */
.page { display: none; }
.page.active { display: block; }


/* ══════════════════════════════
   HOME PAGE
══════════════════════════════ */

.hero {
  min-height: 85vh;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
}

.hero-text { flex: 1; max-width: 35vw;}

.hero-text h1 {
  font-family: 'Crimson Text', serif;
  font-size: 3.5rem;
  font-weight: 600;
  line-height: 1.08;
  margin-bottom: 12px;
}

.hero-text .subtitle,
.hero-text h2 {
  font-family: 'Crimson Text', serif;
  color: var(--pink);
  font-size: 2.0rem;
  line-height: 1.1;
}

.hero-text .subtitle {
  font-weight: 400;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
}

.hero-text p {
  color: var(--dark);
  max-width: 450px;
  margin-bottom: 36px;
  line-height: 1.5;
}

/* ── SOCIAL LINKS (shared) ── */
.social-links {
  display: flex;
  gap: 24px;
}

.social-links a {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--dark);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}

.social-links a:hover,
.social-links a.active-link { color: var(--pink); border-color: var(--pink); }

/* ── HERO IMAGE ── */
.hero-img-wrap {
  flex-shrink: 0;
  width: 350px;
}

.hero-img {
  width: 100%;
  aspect-ratio: 3/4;
  /* border-radius: 2px;
  box-shadow: 10px 14px 40px rgba(0,0,0,0.18); */
  overflow: hidden;
  transform: rotate(-5deg);
}

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

/* ── PROJECTS SECTION ── */
.projects-section {
  padding: 80px var(--gutter);
}

.projects-section h2,
.gallery-section h2 {
  font-family: 'Crimson Text', serif;
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 30px;
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.project-card {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 50px;
  align-items: start;
  cursor: pointer;
}

/* .project-card:hover .project-thumb {
  box-shadow: 6px 10px 30px rgba(86,62,240,0.2);
} */

.project-thumb {
  width: 250px;
  height: 200px;
  border-radius: 2px;
  box-shadow: 6px 8px 24px rgba(0,0,0,0.15);
  overflow: hidden;
  transition: box-shadow 0.25s;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-info h3 {
  font-family: 'Crimson Text', serif;
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.project-info p {
  font-size: 0.85rem;
  color: var(--mid);
  line-height: 1.65;
  margin-bottom: 12px;
}

.tag-links { display: flex; gap: 14px; }

.tag-links a {
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--dark);
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
}

.tag-links a:hover { color: var(--pink); border-color: var(--pink); }

/* ── GALLERY SECTION ── */
.gallery-section { padding: 0 var(--gutter) 100px; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.gallery-item {
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.image-wrapper {
  aspect-ratio: 4/3;
  border-radius: 2px;
  overflow: hidden;
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.35s;
}

.gallery-item:hover img { transform: scale(1.01); }

.caption {
  font-size: 0.85rem;
  color: var(--mid);
  line-height: 1.65;
  margin-top: 12px;
  align-self: center;
}

.gallery-item:hover .caption {
  color: var(--pink);
}

/* ── FOOTER ── */
footer {
  padding: 30px;
  text-align: center;
}

footer h3 {
  font-family: 'Crimson Text', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--pink);
  margin-bottom: 16px;
}

footer .social-links { justify-content: center; }


/* ══════════════════════════════
   PROJECT PAGE
══════════════════════════════ */

.project-page-body {
  margin: 0 auto;
  padding: 0 var(--gutter) 80px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 50px;
  font-family: 'Lato', sans-serif;
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  color: var(--mid);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
}

.back-btn:hover { color: var(--pink); }

/* ── PROJECT HERO IMAGES ── */
.proj-hero-img {
  display: flex;
  gap: 12px;
  margin: 50px 0 32px;
}

.proj-hero-img img {
  flex: 1;
  min-width: 0;
  max-height: 60vh;
  /* height: 400px; */
  object-fit: cover;
  border-radius: 2px;
}

/* ── PROJECT META ── */
.project-page-body h1 {
  font-family: 'Crimson Text', serif;
  font-size: 1.5rem;
  font-weight: 1000;
  line-height: 1.1;
  margin-bottom: 8px;
}


.proj-subtitle {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--mid);
  margin-bottom: 12px;
}

.proj-links {
  display: flex;
  gap: 18px;
  margin-bottom: 40px;
}

.proj-links a {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1.5px solid var(--dark);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}

.proj-links a:hover { color: var(--pink); border-color: var(--pink); }

/* ── PROJECT DESCRIPTION ── */
.proj-description {
  margin: 30px 0 56px;
}

.proj-description p {
  font-size: 0.95rem;
  color: var(--mid);
  line-height: 1.75;
  margin-bottom: 20px;
}

/* ── PROJECT SUBSECTIONS ── */
.proj-subsections {
  display: flex;
  flex-direction: column;
  gap: 44px;
  margin-bottom: 56px;
}

.proj-subsection h3 {
  font-family: 'Crimson Text', serif;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.proj-subsection p {
  font-size: 0.88rem;
  color: var(--mid);
  line-height: 1.75;
}

.subsection-imgs {
  display: flex;
  gap: 50px;
  margin-top: 16px;
}

.subsection-imgs img {
  flex: 1;
  min-width: 200px;
  max-height: 400px;
  
  /* height: 340px; */
  object-fit: cover;
  border-radius: 2px;
}

.subsection-img {
  display: block;
  width: 250px;
  margin: 50px auto;
  overflow: hidden;
}

/* ── PROJECT EXTRA IMAGES ── */
.proj-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.proj-img-box {
  aspect-ratio: 3/4;
  background: #bbb;
  border-radius: 2px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

/* ── NEXT PROJECT ── */
.next-project {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
  padding-top: 24px;
  border-top: 1px solid #eee;
}

.next-project a {
  font-size: 0.88rem;
  color: var(--mid);
  cursor: pointer;
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}

.next-project a:hover { color: var(--pink); border-color: var(--pink); }

/* ══════════════════════════════
   MOBILE RESPONSIVE
══════════════════════════════ */
@media (max-width: 768px) {
  :root {
    --gutter: 20%;
  }

  /* ── HOME: Hero stacks vertically ── */
  .hero {
    flex-direction: column;
    align-items: flex-start;
    min-height: unset;
    padding: 60px var(--gutter) 40px;
    gap: 32px;
  }

  .hero-text {
    max-width: 100%;
    order: 1;
  }

  .hero-text h1 {
    font-size: 2.6rem;
  }

  .hero-text .subtitle,
  .hero-text h2 {
    font-size: 1.5rem;
  }

  .hero-text p {
    max-width: 100%;
    margin-bottom: 24px;
  }

  .hero-img-wrap {
    order: 2;
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .hero-img {
    width: 220px;
    transform: rotate(-3deg);
  }

  /* Center social links on home */
  .hero .social-links {
    justify-content: center;
  }

  /* ── HOME: Projects list stacks ── */
  .projects-section {
    padding: 60px var(--gutter);
  }

  .project-card {
    grid-template-columns: 1fr;
    gap: 16px;
  }


  /* ── HOME: Gallery stays in row but shrinks ── */
  .gallery-section {
    padding: 0 var(--gutter) 60px;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .caption {
    font-size: 0.72rem;
  }

  /* ── PROJECT PAGE ── */
  .project-page-body {
    padding: 0 var(--gutter) 60px;
  }

  /* Back button centered */
  .back-btn {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 36px;
    text-align: center;
  }

  /* Hero images: stay in row but cap height smaller */
  .proj-hero-img {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    margin: 32px 0 24px;
  }

  .proj-hero-img img {
    max-height: 40vh;
    min-width: 120px;
  }

  /* When only one hero image, let it go full width */
  .proj-hero-img img:only-child {
    width: 100%;
    flex: unset;
  }

  .project-page-body h1 {
    font-size: 1.5rem;
  }

  /* Subsection images: stay in row, scroll if needed */
  .subsection-imgs {
    flex-wrap: wrap;
    gap: 12px;
  }

  .subsection-imgs img {
    flex: 1 1 140px;
    min-width: 140px;
    max-height: 260px;
  }

  /* When only one subsection image, full width */
  .subsection-imgs img:only-child {
    width: 100%;
    flex: unset;
    max-height: 320px;
  }

  /* Next project centered */
  .next-project {
    justify-content: center;
    text-align: center;
  }

  /* Footer */
  footer {
    padding: 24px var(--gutter);
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .hero-text h1 {
    font-size: 2.1rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .caption {
    font-size: 0.65rem;
    margin-top: 6px;
  }

  .proj-hero-img {
    flex-direction: column;
  }

  .proj-hero-img img {
    width: 100%;
    max-height: 50vw;
    flex: unset;
  }
}