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

body {
  font-family: 'Coral Pixels', sans-serif;
  color: #1a1a1a;
  background: #fff;
  scroll-behavior: smooth;
  line-height: 1.6;
  min-height: 100vh;
  user-select: none;
}

.detail-text {
  font-family: 'Coral Pixels', sans-serif;
  font-size: 0.75rem;
  line-height: 1.5;
  letter-spacing: 0.02em;
  opacity: 0.9;
  text-align: justify;
  
}

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

@keyframes driftHearts {
  0% { transform: translateX(0); }
  100% { transform: translateX(-20px); }
}

.heart-line {
  animation: driftHearts 12s linear infinite alternate;
}

/* ===== LAYOUT ===== */
.site {
  max-width: 800px;
  margin: 4rem auto 0;
  display: flex;
  align-items: flex-start;
  width: 100%;
}

/* ===== SIDEBAR ===== */
.sidebar {
  flex: 1;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 35vh 0.4rem 0.4rem 0.4rem;
  background: #fff;
  scrollbar-width: none;
}

.sidebar-gif {
  width: 97px;
  height: 97px;
  object-fit: cover;
  display: block;
  margin-bottom: 1.5rem;
}

.name,
.menu a {
  font-family: 'Coral Pixels', sans-serif;
}

.name {
  font-size: 1rem;
  font-weight: 100;
  letter-spacing: 0.025em;
  color: #000;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  filter: blur(0.5px);
}

.menu {
  list-style-type: none;
}

.menu li {
  margin-bottom: 1.1rem;
  position: relative;
}

/* --- DESKTOP: fixed left/right dropdowns, no clipping --- */
@media (min-width: 768px) {
  .dropdown-menu {
    position: fixed;
    font-size: 0.75rem;
    color: #ffffff;
    line-height: 1.6;
    padding: 1rem 1.2rem;
    /* border-radius: 14px; */
    white-space: normal;
    display: none;
    z-index: 100;
    /* box-shadow: 0 8px 20px rgba(0,0,0,0.25);*/
    max-width: 130px;
    width: 8%;
    pointer-events: auto;
  }

  /* About dropdown: left side */
  #about-dropdown {
    left: 24px;
    top: 340px;   /* adjust as needed */
    transform: translateX(-20px);
    max-width: 320px;
    box-sizing: border-box;
  }

  /* Contact dropdown: right side */
  #contact-dropdown {
    left: 700px;
    top: 78px;   /* adjust as needed */
  }

  .dropdown-menu p {
    margin: 0;
    padding: 0;
  }
}

/* --- MOBILE: original dropdown style (below the word, constrained to viewport) --- */
@media (max-width: 767px) {
  .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 8px;
    right: 8px;
    width: auto;
    max-width: calc(100% - 16px);
    margin-top: 0.25rem;
    font-size: 0.8rem;

    color: #000000;
    line-height: 1.3;
    padding: 0.8rem 1rem;
    white-space: normal;
    display: none;
    z-index: 20;
    box-sizing: border-box;
    word-wrap: break-word;
  }

  /* Place about dropdown centered under its trigger on mobile */
  #about-dropdown {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 100%;
    right: auto;
    width: auto;
    min-width: 140px;
    max-width: calc(100% - 32px);
    box-sizing: border-box;
  }

  .dropdown-menu p {
    margin: 0;
    padding: 0;
  }

  .menu li {
    margin-bottom: 1.1rem;
    position: relative;
  }
}

.menu a {
  color: #125ca568;
  text-decoration: none;
  font-size: 1rem;
  display: block;
  transition: color 0.2s, transform 0.2s;
}

.menu a:hover {
  color: #1a1a1a;
  transform: translateX(4px);
}

.dropdown-toggle {
  cursor: pointer;
}

/* ===== CONTENT ===== */
.content {
  flex: 4;
  padding: 2rem 2rem 3rem 2rem;
}

.section-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgb(18, 14, 14);
  margin-bottom: 2.5rem;
  font-weight: 500;
  font-family: 'Coral Pixels', sans-serif;
  background: transparent;
  padding: 0.2rem 0;
}

.section-title--sticky {
  position: sticky;
  top: 0.75rem;
  z-index: 20;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  background: transparent;
  padding: 0.2rem 0;
  transition: background-color 0.2s ease, padding 0.2s ease;
}

.section-title--sticky.is-bottom {
  background: transparent;
  display: inline-block;
  padding: 0;
  border-radius: 0;
}

/* ===== PROJECTS ===== */
.project {
  background: transparent;
  overflow: visible;
  box-shadow: none;
  padding: 1rem 0;
  margin-bottom: 4rem;
  display: flex;
  flex-direction: column;
}

.proj-img-vert {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.proj-img-vert img {
  width: 100%;
  max-width: 800px;
  height: auto;
  object-fit: contain;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.project-video {
  width: 100%;
  max-width: 800px;
  height: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1rem;
}

/* ===== TWO-COLUMN ROW ===== */
.proj-img-vert .two-row {
  display: flex;
  gap: 0.5rem;
  margin: 0.25rem 0;
}
.proj-img-vert .two-row img {
  flex: 1 1 0;
  width: calc((100% - 0.5rem) / 2);
  height: auto;
  object-fit: cover;
  display: block;
}

/* ===== THREE-COLUMN ROW ===== */
.proj-img-vert .three-row {
  display: flex;
  gap: 0.5rem;
  margin: 0.25rem 0;
}
.proj-img-vert .three-row img {
  flex: 1 1 0;
  width: calc((100% - 1rem) / 3);
  height: auto;
  object-fit: cover;
  display: block;
}

.center-row {
  display: flex;
  justify-content: center;
  gap: 0;
}

.center-row img.gallery-small-center {
  width: 100%;
  max-width: 800px;
  height: auto;
  object-fit: contain;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.proj-img {
  width: 100%;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  background: #f5f5f3;
  margin-bottom: 1.25rem;
  color: #d0d0ce;
}

.video-wrap {
  position: relative;
  padding-top: 56.25%;
  margin-bottom: 1rem;
}

.video-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.project h3 {
  font-size: 1.2rem;
  font-weight: 400;
  text-transform: uppercase;
  color: #1a1a1a;
  margin-top: 0.15rem;
  margin-bottom: 0.35rem;
  user-select: text;
}

.project h3 a {
  display: inline-block;
  position: relative;
  z-index: 2;
  pointer-events: auto;
  cursor: pointer;
}

.project h3 u {
  text-underline-offset: 0.12em;
}

.project p {
  color: #4a3939;
  font-size: 0.9rem;
  font-weight: 400;
}

/* ===== FOOTER ===== */
.footer {
  padding: 3rem 0 2rem;
  border-top: 1px solid #e5e5e5;
  margin-top: 1rem;
  text-align: center;
}

.footer p {
  color: #987bc719;
  font-size: 0.65rem;
  margin-bottom: 1rem;
}

.social {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.social a {
  color: #8c9795;
  font-size: 0.8rem;
  transition: color 0.2s;
}

.social a:hover {
  color: #1a1a1a;
}

/* ===== BACK TO TOP ===== */
#top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff4c;
  border: 1px solid #e5e5e5;
  border-radius: 50%;
  color: #999;
  font-size: 0.7rem;
  opacity: 0;
  transition: opacity 0.3s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  z-index: 100;
}

#top:hover {
  color: #1a1a1a;
  box-shadow: 0 2px 16px rgba(0,0,0,0.12);
}

/* ===== BANNER ===== */
@keyframes scrollBanner {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== IMAGE MODAL ===== */
.image-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  cursor: zoom-out;
}

.image-modal img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  display: block;
}

/* Modal nav buttons */
.modal-nav {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 20%;
  background: transparent;
  border: none;
  color: transparent;
  display: block;
  z-index: 1000;
  cursor: default;
  outline: none;
}

.modal-nav.left { left: 0; }
.modal-nav.right { right: 0; }

.modal-nav:focus { outline: none; }

.video-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  margin-bottom: 1rem;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ===== MOBILE / NARROW (unchanged) ===== */
@media (max-width: 767px) {
  .site {
    width: 100%;
    margin: 5rem 0 0;
    flex-direction: column;
  }

  .sidebar {
    position: relative;
    height: auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-right: none;
    border-bottom: 1px solid #e5e5e5;
    width: 100%;
    overflow: visible;
    z-index: 50;
  }

  .sidebar-gif {
    display: none;
  }

  .name {
    font-size: 1rem;
    margin-bottom: 0;
    white-space: nowrap;
  }

  .menu {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    align-items: center;
    position: relative;
  }

  .menu li {
    margin-bottom: 0;
    position: relative;
  }

  /* mobile: dropdown below the link (original) */
  .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    width: 220px;
    margin: 0;
    z-index: 100;
    padding: 0.8rem 1.5rem;
  }

  .content {
    width: 100%;
    padding: 2rem 1.5rem 3rem;
  }

  .project {
    margin-bottom: 2.5rem;
  }
}

/* ===== RESPONSIVE: STACK ROWS ON SMALL SCREENS ===== */
@media (max-width: 767px) {
  .proj-img-vert .two-row {
    flex-direction: column;
    gap: 0.5rem;
  }

  .proj-img-vert .two-row img {
    width: 100%;
    max-width: none;
    height: auto;
    display: block;
  }

  .proj-img-vert .three-row {
    flex-direction: row;
    gap: 0.5rem;
  }

  .proj-img-vert .three-row img {
    flex: 1 1 0;
    width: calc((100% - 1rem) / 3);
    max-width: none;
    min-width: 0;
    height: auto;
    display: block;
  }

  .gallery-small-center {
    width: min(80%, 300px);
    margin-left: auto;
    margin-right: auto;
    display: block;
  }
}