/* ============================================
   Ashtyn Faye — V4
   Simplified: background image with overlaid text/buttons
   ============================================

   Color Palette:
   Cream Background:  #F7F0E4
   Button Brown:      #B5744E (terracotta/brown)
   Button Hover:      #9E6340
   Title Text:        #1A1A1A
   White:             #FFFFFF

   Font:
   Title: "Mr De Haviland" (Google Fonts)
   Body/Buttons: "Lora" (elegant serif)
============================================ */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Lora", serif;
  background-color: #f7f0e4;
  color: #2e3b23;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: scroll;
}

/* --- Fixed Background (separate layer so it never shifts) --- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: url("../images/Background Test 2.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-color: #f7f0e4;
}

/* --- Page Wrapper with Background Image --- */
.page-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* --- Content Container (title + buttons) --- */
.content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 360px;
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  justify-content: center;
  padding-bottom: 2rem;
}

/* --- Title / Logo Area --- */
.site-title {
  font-family: "Mr De Haviland", cursive;
  font-size: 4.5rem;
  font-weight: 400;
  color: #1a1a1a;
  text-align: center;
  margin-top: 6vh;
  margin-bottom: 0;
  letter-spacing: 0.01em;
  line-height: 1.1;
  position: relative;
  white-space: nowrap;
}

/* --- Page Heading (About, Connect, Read) --- */
.page-heading {
  font-family: "Mr De Haviland", cursive;
  font-size: 4.5rem;
  font-weight: 400;
  color: #1a1a1a;
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
}

/* --- Button Group --- */
.button-group {
  width: 100%;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  margin-top: auto;
  margin-bottom: auto;
  padding-top: 6vh;
}

/* --- Buttons — Brown/terracotta bars --- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 1.1rem 1.8rem;
  font-family: "Lora", serif;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #ffffff;
  background-color: #b5744e;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  position: relative;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(181, 116, 78, 0.2);
}

.btn:hover,
.btn:focus {
  background-color: #9e6340;
  box-shadow: 0 4px 16px rgba(181, 116, 78, 0.35);
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(181, 116, 78, 0.2);
}

/* --- Button Icon (Connect page) --- */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.btn-icon svg {
  display: block;
}

/* --- Back Button --- */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Lora", serif;
  font-size: 0.95rem;
  color: #1a1a1a;
  text-decoration: none;
  margin-top: 2.5rem;
  margin-bottom: 3rem;
  padding: 0.6rem 1.2rem;
  border: 1.5px solid rgba(26, 26, 26, 0.3);
  border-radius: 8px;
  background: rgba(247, 240, 228, 0.7);
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.03em;
}

.back-btn:hover {
  color: #1a1a1a;
  background: rgba(247, 240, 228, 0.95);
  border-color: rgba(26, 26, 26, 0.5);
  transform: translateX(-4px);
}

.back-btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.back-btn:hover svg {
  transform: translateX(-4px);
}

/* --- Polaroid Photo --- */
.polaroid {
  background: #fff;
  padding: 12px 12px 40px 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transform: rotate(-1.5deg);
  margin-bottom: 2rem;
  position: relative;
  transition: transform 0.4s ease;
  max-width: 280px;
  width: 100%;
}

.polaroid:hover {
  transform: rotate(0deg) scale(1.02);
}

.polaroid-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, #b5744e 0%, #d4a87c 50%, #f5e6b8 100%);
}

.polaroid-caption {
  font-family: "Mr De Haviland", cursive;
  font-size: 1.3rem;
  color: #8b7355;
  text-align: center;
  margin-top: 8px;
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
}

/* --- Circular Profile Photo --- */
.profile-photo {
  margin-bottom: 2rem;
  display: flex;
  justify-content: center;
}

.profile-image {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.4s ease,
    box-shadow 0.4s ease;
}

.profile-image:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.15);
}

/* --- About Text --- */
.about-text {
  font-family: "Lora", serif;
  font-size: 1.05rem;
  line-height: 1.9;
  color: #1a1a1a;
  text-align: left;
  padding: 1.2rem 1.5rem;
  max-width: 380px;
  background: rgba(247, 240, 228, 0.8);
  border-radius: 10px;
}

.about-text p {
  margin-bottom: 1.2rem;
}

/* --- Publication Card (Read page) --- */
.publication-list {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.publication-card {
  background: #ffffff;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  text-decoration: none;
  color: #2e3b23;
  transition: all 0.3s ease;
  display: block;
  position: relative;
}

.publication-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.publication-card .pub-tag {
  display: inline-block;
  font-family: "Lora", serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #b5744e;
  margin-bottom: 0.5rem;
}

.publication-card .pub-title {
  font-family: "Lora", serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 0.4rem;
  line-height: 1.4;
}

.publication-card .pub-description {
  font-family: "Lora", serif;
  font-size: 0.85rem;
  color: #8b7355;
  line-height: 1.6;
}

.publication-card .pub-arrow {
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: #b5744e;
  opacity: 0;
  transition: all 0.3s ease;
}

.publication-card:hover .pub-arrow {
  opacity: 1;
  transform: translateY(-50%) translateX(4px);
}

/* --- Section Divider --- */
.divider {
  width: 40px;
  height: 2px;
  background-color: #b5744e;
  opacity: 0.4;
  margin: 0.5rem auto 2rem auto;
  border: none;
}

/* --- Page Transition --- */
/* Content fades out on exit; entrance handled by fade-in-up animations */

/* ============================================
   Responsive
   ============================================ */

/* Small phones */
@media (max-width: 479px) {
  .site-title {
    font-size: 3.5rem;
    margin-top: 10vh;
  }

  .page-heading {
    font-size: 3.5rem;
  }

  .button-group {
    max-width: 75vw;
    gap: 1.8rem;
    padding-top: 4vh;
  }

  .btn {
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
  }

  .content {
    max-width: 90vw;
    padding: 2rem 1.25rem;
  }

  .publication-card {
    padding: 1rem 1.25rem;
  }

  .about-text {
    max-width: 100%;
  }

  .back-btn {
    margin-top: 2rem;
    margin-bottom: 2.5rem;
  }

  .profile-image {
    width: 180px;
    height: 180px;
  }
}

/* Large phones / small tablets */
@media (min-width: 480px) {
  .site-title {
    font-size: 5.5rem;
    margin-top: 5vh;
  }

  .page-heading {
    font-size: 5.5rem;
  }

  .button-group {
    max-width: 300px;
    gap: 2.5rem;
  }

  .btn {
    padding: 1.15rem 2rem;
    font-size: 0.95rem;
  }

  .polaroid {
    max-width: 320px;
  }

  .polaroid-image {
    height: 260px;
  }

  .profile-image {
    width: 250px;
    height: 250px;
  }

  .content {
    max-width: 85vw;
  }

  .publication-list {
    max-width: 520px;
  }
}

/* Tablet and desktop */
@media (min-width: 768px) {
  .site-title {
    font-size: 7vw;
    margin-top: 5vh;
  }

  .page-heading {
    font-size: 7vw;
  }

  .button-group {
    max-width: 22vw;
    min-width: 220px;
    gap: 3vw;
    padding-top: 6vh;
  }

  .btn {
    font-size: 1rem;
    padding: 2vh 2rem;
    border-radius: 10px;
  }

  .polaroid {
    max-width: 380px;
    padding: 15px 15px 50px 15px;
  }

  .polaroid-image {
    height: 320px;
  }

  .profile-image {
    width: 280px;
    height: 280px;
  }

  .about-text {
    font-size: 1.1rem;
    max-width: 460px;
  }

  .content {
    max-width: 26vw;
    min-width: 400px;
    padding: 4rem 0;
  }

  .publication-list {
    max-width: 580px;
  }

  .publication-card .pub-title {
    font-size: 1.2rem;
  }
}

/* Desktop wide */
@media (min-width: 1024px) {
  .site-title {
    font-size: 6.5vw;
    margin-top: 3vh;
  }

  .page-heading {
    font-size: 6.5vw;
  }

  .button-group {
    max-width: 20vw;
    min-width: 200px;
    gap: 5vh;
    padding-top: 4vh;
  }

  .btn {
    font-size: 1.1rem;
    padding: 4vh 2rem;
  }

  .content {
    max-width: 24vw;
    min-width: 420px;
  }
}

/* Large desktop */
@media (min-width: 1400px) {
  .site-title {
    font-size: 5.5vw;
  }

  .page-heading {
    font-size: 5.5vw;
  }

  .button-group {
    max-width: 16vw;
    gap: 4vh;
  }

  .btn {
    padding: 3.5vh 2rem;
  }
}
