/* Global reset & layout */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Arial, sans-serif;
  background-color: #000;
  color: #fff;
  overflow: hidden; /* prevent scrollbars */
  display: flex;
  flex-direction: column;
}

/* Header */
.rs-header {
  flex: 0 0 5vh;
  background-color: #000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  z-index: 10;
}

.rs-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rs-brand {
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.rs-nav {
  display: flex;
  gap: 24px;
}

.rs-nav-link {
  font-size: 0.9rem;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding-bottom: 2px;
  position: relative;
}

.rs-nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: #fff;
  opacity: 0;
  transition: width 0.25s ease, opacity 0.25s ease;
}

.rs-nav-link:hover {
  color: rgba(255, 255, 255, 0.9);
}

.rs-nav-link.rs-nav-active {
  color: #fff;
}

.rs-nav-link.rs-nav-active::after {
  width: 100%;
  opacity: 1;
}

/* Main & sections */
.rs-main {
  flex: 1 0 90vh;
  min-height: 0; /* allow flexbox to size correctly */
}

.rs-section {
  height: 100%;
}

.rs-section-inner {
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* HOME – Slideshow */
.rs-home-inner {
  justify-content: center;
}

.rs-slideshow-container {
  width: 100%;
  max-width: 1800px; /* wider on large screens */
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9);
  position: relative;
  background: #111;
}

.rs-slideshow-wrapper {
  display: flex;
  height: 100%;
  transition: transform 0.8s cubic-bezier(0.33, 0, 0.67, 1);
}

.rs-slide {
  flex: 0 0 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: flex-end;
}

.rs-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* show full image, no cropping */
  object-position: center;
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #000; /* letterbox background */
}

.rs-slide-caption-box {
  position: relative;
  z-index: 2;
  max-width: 420px;
  padding: 16px 20px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-bottom: 10vh;
}

.rs-slide-align-left .rs-slide-caption-box {
  margin-left: 10vw;
  margin-right: auto;
}

.rs-slide-align-right .rs-slide-caption-box {
  margin-left: auto;
  margin-right: 10vw;
}

.rs-slide-heading {
  font-size: 1.6rem;
  margin-bottom: 0.4rem;
}

.rs-slide-text {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.78);
}

/* Slideshow dots */
.rs-slideshow-dots {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 3;
}

.rs-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease, opacity 0.25s ease;
}

.rs-dot.rs-dot-active {
  width: 28px;
  background: #fff;
}

.rs-dot:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* PORTFOLIO – Carousel */
.rs-portfolio-inner {
  flex-direction: column;
  gap: 16px;
}

.rs-portfolio-main {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.rs-portfolio-image-wrapper {
  position: relative;
  flex: 1 1 auto;
  height: 100%;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: radial-gradient(circle at top left, #222 0, #000 55%);
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y; /* allow horizontal swipe */
  cursor: grab;
}

.rs-portfolio-image-wrapper.rs-portfolio-dragging {
  cursor: grabbing;
}

.rs-portfolio-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: opacity 0.5s ease;
}

.rs-portfolio-caption-box {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 20px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.9),
    rgba(0, 0, 0, 0.4),
    transparent
  );
  transition: opacity 0.5s ease;
}

.rs-portfolio-fade-out {
  opacity: 0;
}

.rs-portfolio-title {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.rs-portfolio-caption {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.76);
}

.rs-portfolio-arrow {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
  color: #fff;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.rs-portfolio-arrow:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
}

.rs-portfolio-arrow:active {
  transform: translateY(1px) scale(0.98);
}

.rs-portfolio-arrow:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.rs-portfolio-lightbox-trigger {
  position: absolute;
  right: 16px;
  top: 16px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.rs-portfolio-lightbox-trigger:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Portfolio dots */
.rs-portfolio-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.rs-portfolio-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.rs-portfolio-dot.rs-portfolio-dot-active {
  width: 24px;
  background: #fff;
}

.rs-portfolio-dot:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Lightbox */
.rs-lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 30;
}

.rs-lightbox.rs-lightbox-open {
  display: flex;
}

.rs-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
}

/* Fill viewport and keep arrows + image inside */
.rs-lightbox-content {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  padding: 40px 60px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.rs-lightbox-image {
  width: auto;
  height: auto;
  max-width: calc(100vw - 200px);  /* padding + arrow width */
  max-height: calc(100vh - 120px); /* header + padding */
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  cursor: pointer; /* click to close */
}

.rs-lightbox-close {
  position: absolute;
  top: 10px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}

.rs-lightbox-arrow {
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.6rem;
  color: #fff;
  flex-shrink: 0;
}

.rs-lightbox-arrow:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ABOUT */
.rs-about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  width: 100%;
}

.rs-about-text-card {
  background: rgba(15, 15, 15, 0.9);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 24px 28px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.rs-about-title {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.rs-about-text-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 0.9rem;
}

.rs-about-text-card a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.rs-about-text-card a:hover {
  border-bottom-color: #fff;
}

.rs-about-contact {
  margin-top: 0.5rem;
  font-weight: 500;
}

.rs-about-portrait-wrapper {
  display: flex;
  justify-content: center;
}

.rs-about-portrait-ratio {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 4 / 5;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9);
}

.rs-about-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Footer */
.rs-footer {
  flex: 0 0 5vh;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
}

.rs-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

.rs-footer-links {
  display: flex;
  gap: 16px;
}

.rs-footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}

.rs-footer-links a:hover {
  color: #fff;
}

/* Responsive tweaks */
@media (max-width: 900px) {
  .rs-header-inner,
  .rs-footer-inner {
    padding: 0 16px;
  }

  .rs-section-inner {
    padding: 16px;
  }

  .rs-about-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .rs-about-portrait-wrapper {
    order: -1; /* portrait above text on mobile */
  }

  .rs-slideshow-container {
    max-width: 100%;
  }

  .rs-portfolio-arrow {
    display: none; /* rely on swipe / dots on small screens */
  }

  .rs-lightbox-content {
    padding: 24px;
    gap: 8px;
  }

  .rs-lightbox-image {
    max-width: calc(100vw - 80px);
    max-height: calc(100vh - 80px);
  }

  .rs-lightbox-arrow {
    width: 36px;
    height: 36px;
  }

  .rs-lightbox-close {
    top: 8px;
    right: 12px;
  }
}

@media (max-width: 600px) {
  .rs-brand {
    font-size: 0.8rem;
  }

  .rs-nav {
    gap: 16px;
  }

  .rs-nav-link {
    font-size: 0.75rem;
  }

  .rs-about-text-card {
    padding: 18px 20px;
  }

  .rs-footer-inner {
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
  }
}

/* ============================================================
   SLIDESHOW TEXTBOX SIZE OVERRIDES (RESPONSIVE SCALING)
   ============================================================ */

/* DESKTOP: 180% scale */
@media (min-width: 900px) {
  .rs-slide-caption-box {
    transform: scale(1.2);
    transform-origin: bottom left;
    padding: 30px 30px;
    border-radius: 20px;
  }

  .rs-slide-heading {
    font-size: 1.6rem;
    margin-bottom: 0.6rem;
  }

  .rs-slide-text {
    font-size: 1.1rem;
  }
}

/* MOBILE/TABLET: 60% scale */
@media (max-width: 900px) {
  .rs-slide-caption-box {
    transform: scale(0.6);
    transform-origin: bottom left;
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 4vh !important;
  }

  .rs-slide-heading {
    font-size: 0.9rem;
  }

  .rs-slide-text {
    font-size: 0.6rem;
  }
}
