/* ============================ */
/* IMPORTS & ROOT VARIABLES     */
/* ============================ */
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond&display=swap');

:root {
  --contact-x-offset: 40px;
  --contact-y-offset: 40px;
  --contact-closer-offset: 20px;
}

/* ============================ */
/* BASE ELEMENTS (BODY, HEADINGS, TYPOGRAPHY) */
/* ============================ */
body {
  margin: 0;
  font-family: 'EB Garamond', Garamond, serif;
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  background-attachment: scroll;
  color: black;
}

h1, h2 {
  text-align: center;
  margin-bottom: 0.2em;
}

h1 {
  font-size: 2.2em;
  margin-top: 0.2em;
  margin-bottom: 0.3em;
}

h2 {
  font-size: 1.3em;
  font-weight: normal;
  margin-top: 0.5;
  margin-bottom: 0.8em;
}

.name {
  font-size: 1.4em;
  font-weight: bold;
  margin-bottom: 0.5em;
}

.bio {
  font-size: 1em;
  line-height: 1.6;
}

/* ============================ */
/* BIO / PROFILE IMAGE          */
/* ============================ */
#bio-image {
  height: 20em;
  width: auto;
  max-width: 100%;
  display: block;
  margin: 0 auto 1.4em;
  border: 1px solid #aaa;
  object-fit: contain;
}

/* ============================ */
/* LAYOUT CONTAINERS & STRIPES  */
/* ============================ */
.stripe {
  position: fixed;
  top: 0;
  left: 20%;
  width: 60%;
  height: 100%;
  background-color: white;
  z-index: 0;
}

.container {
  display: flex;
  flex-direction: row;
  max-width: 1300px;
  margin: auto;
  padding: 1em 0;
  position: relative;
  z-index: 1;
}

.sidebar {
  width: 25%;
}

.main {
  width: 50%;
  position: relative;
}

/* ============================ */
/* PROFILE (Sidebar/Main)       */
/* ============================ */
.profile img {
  width: auto;
  height: auto;
  object-fit: unset;
}

/* ============================ */
/* ALTERNATE LAYOUT SECTIONS    */
/* ============================ */
.alt-layout {
  display: flex;
  gap: 2em;
  align-items: center;
}

.alt-layout .text {
  flex: 1;
}

.alt-layout img {
  aspect-ratio: 5 / 4;
  height: 15em;
  width: auto;
  max-width: 100%;
  object-fit: cover;
  border: 1px solid #aaa;
  display: block;
  margin: 0 auto;
}

/* ============================ */
/* GALLERY SECTION              */
/* ============================ */
.gallery {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2em auto;
  max-width: 110%;           /* Wide as you like, but scalable */
  background: rgba(255,255,255,0.9);
  padding: 2em;
}

.gallery-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  position: relative;
}

.gallery-image-container {
  width: 100%;       /* or any %/em value */
  height: 30em;     /* vertical space control */
  overflow: hidden; /* ensures horizontal overflow is clipped */
  display: flex;
  justify-content: center;
  align-items: center;
}

.gallery-image-container img {
  height: 100%;     /* Always stretches to fill height */
  width: auto;      /* Keeps original aspect ratio */
  object-fit: cover; /* Not strictly necessary here, but doesn't hurt */
  display: block;
  max-width: none;  /* Prevents width from being artificially limited */
  max-height: 100%;
}



/* Gallery navigation buttons: only em/% */
.gallery-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.3);
  color: white;
  border: none;
  padding: 1em;
  font-size: 1.5em;
  border-radius: 2em;             /* Still round, uses em */
  cursor: pointer;
  transition: background-color 0.3s ease;
  z-index: 2;
  width: 2em;
  height: 4em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-button.left {
  left: 0;
  margin-left:-3em;
}
.gallery-button.right {
  right: 0;
  margin-right: -3em;
}

.gallery-button:hover {
  background-color: rgba(0, 0, 0, 0.9);
}

/* Stable caption area, no px */
#gallery-caption {
  margin-top: 0.5em;
  font-style: italic;
  text-align: center;
  min-height: 2em;
  display: flex;
  align-items: center;
  justify-content: center;
}


/* ============================ */
/* FOOTER                       */
/* ============================ */
footer {
  background: black;
  color: white;
  text-align: center;
  padding: 2em 1em;
  margin: 3em auto 0;
  width: 60%;
  position: relative;
  z-index: 1;
}

/* ============================ */
/* FLOATING CONTACT BUTTON      */
/* ============================ */
.floating-contact {
  position: fixed;
  bottom: var(--contact-y-offset);
  right: calc(var(--contact-x-offset) + 5% + var(--contact-closer-offset));
  background-color: black;
  color: white;
  padding: 0.8em 1.6em;
  border-radius: 999px;
  transition: transform 0.3s ease, background-color 0.3s ease;
  cursor: pointer;
  z-index: 1000;
  text-align: center;
  transform-origin: center;
}

.floating-contact:hover {
  background-color: goldenrod;
  transform: scale(1.05);
}

/* ============================ */
/* CONTACT OVERLAY & FORM       */
/* ============================ */
.overlay {
  display: flex;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  justify-content: center;
  align-items: center;
}

.overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.contact-form-wrapper {
  padding: 0.3em;
  border-radius: 33px;
  background:
    repeating-linear-gradient(
      45deg,
      #f6f0e6 0px,
      #f6f0e6 4px,
      #a23e3e 4px,
      #a23e3e 18px,
      #f6f0e6 18px,
      #f6f0e6 28px,
      #3e597a 28px,
      #3e597a 42px,
      #f6f0e6 42px,
      #f6f0e6 48px
    );
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 32.25em;
  margin: 0 auto;
}

.contact-form {
  background: #f6f0e6;
  border-radius: 27px;
  padding: 1.5em;
  width: 100%;
  max-width: 500px;
  max-height: 75vh;
  margin-top: 0.2em;
  margin-bottom: 0.2em;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  transform: scale(0.8);
  opacity: 0;
  animation: popupFadeIn 0.3s ease forwards;
  box-sizing: border-box;
}

#subject {
  margin-bottom: 0.8em;
}

/* Contact form animations */
@keyframes popupFadeIn {
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ============================ */
/* CONFIRMATION & FEEDBACK      */
/* ============================ */
.confirmation-box {
  background-color: #63a868;
  color: white;
  padding: 2em;
  font-size: 1.5em;
  text-align: center;
  border-radius: 20px;
  max-width: 400px;
  margin: 0 auto;
  animation: fadeOut 0.5s ease 2.5s forwards;
  opacity: 1;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* ============================ */
/* FORM ELEMENTS                */
/* ============================ */
.contact-form-title {
  font-size: 1.4em;
  font-weight: bold;
  margin-bottom: 1em;
  text-align: center;
}

.form-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.form-row input {
  flex: 1;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75em;
  border: none;
  border-radius: 0;
  font-family: 'EB Garamond', Garamond, serif;
  font-size: 1em;
  box-sizing: border-box;
}

.contact-form textarea {
  resize: vertical;
  max-height: 150px;
  overflow: auto;
  margin-bottom: 10px;
}

.send-button {
  background-color: black;
  color: white;
  padding: 0.7em 2em;
  border-radius: 999px;
  transition: all 0.3s ease;
  cursor: pointer;
  margin: 1em auto 0;
  width: 160px;
  text-align: center;
}

.send-button:hover {
  background-color: #911717;
  transform: scale(1.05);
}

.contact-form label {
  font-weight: bold;
}

.close-x {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.2em;
  cursor: pointer;
  color: #444;
}

.error-text {
  color: red;
  font-size: 0.9em;
  text-align: center;
  display: none;
  margin-top: 0.5em;
}

/* ============================ */
/* SECTION DIVIDER & VIDEO      */
/* ============================ */
.section-divider {
  border: none;
  border-top: 1px solid lightgray;
  width: 50%;
  margin: 2em auto;
}

.video-section {
  max-width: 40em;
  margin: 1.5em auto 2.7em auto;
  padding-top: 1em;
  text-align: center;
}

.video-section iframe {
  width: 100%;
  height: 22em;
  max-width: 100%;
}

/* ============================ */
/* MISCELLANEOUS TWEAKS         */
/* ============================ */
#site-subtitle {
  margin-top: -0.3em;
  margin-bottom: 1.2em;
}

.send-button.disabled {
  pointer-events: none;
  opacity: 0.7;
}

@keyframes dots {
  0% { content: ""; }
  33% { content: "."; }
  66% { content: ".."; }
  100% { content: "..."; }
}

.send-button.sending::after {
  content: "";
  animation: dots 1s steps(3, end) infinite;
  display: inline-block;
  margin-left: 4px;
}
