/* ==========================================================================
   PORTFOLIO STYLES — PABLO SÁNCHEZ RECREATION
   Plain CSS with CSS Grid, Flexbox, Fluid Typography & Smooth Scroll Snap
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Reset & Custom Properties
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-serif: 'Newsreader', 'Farnham Display', Georgia, Cambria, 'Times New Roman', serif;
  --font-badge: 'Archivo Black', 'Inter', sans-serif;

  /* Theme Backgrounds */
  --bg-black: #000000;
  --bg-purple: #6229ff;
  --bg-charcoal: #2b2b2b;
  --bg-khaki: #8e7c5b;
  --bg-white: #ffffff;
  --bg-bangers: #0084ff;
  --bg-red: #f23e1a;
  --bg-conductr: #2a2a2a;
  --bg-hp: #bdbdbd;

  /* Text Colors */
  --text-light: #ffffff;
  --text-dark: #111111;
  --text-muted: rgba(255, 255, 255, 0.7);
  --text-dark-muted: rgba(17, 17, 17, 0.65);

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-black);
  color: var(--text-light);
  height: 100%;
  overflow: hidden;
  line-height: 1.4;
  user-select: text;
}

::selection {
  background-color: #a2a2a2;
  color: #000000;
}

/* --------------------------------------------------------------------------
   2. Global Header
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px 32px;
  z-index: 1000;
  pointer-events: none;
  transition: color var(--transition-fast);
}

.site-header > * {
  pointer-events: auto;
}

.header-brand .brand-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: inherit;
}

.brand-role {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.02em;
  color: inherit;
  opacity: 0.95;
}

.header-nav .nav-talks-btn {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 500;
  text-decoration: none;
  color: inherit;
  letter-spacing: -0.01em;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  display: inline-block;
  cursor: pointer;
}

.header-nav .nav-talks-btn:hover {
  opacity: 0.65;
  transform: translateY(-1px);
}

/* Header Color Variations based on Active Section */
body.header-dark-mode .site-header {
  color: var(--text-dark);
}

body:not(.header-dark-mode) .site-header {
  color: var(--text-light);
}

/* --------------------------------------------------------------------------
   3. Side Section Indicator (Desktop)
   -------------------------------------------------------------------------- */
.section-indicator {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 999;
  pointer-events: auto;
}

.indicator-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.3);
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
  padding: 0;
}

.indicator-dot:hover {
  background-color: rgba(255, 255, 255, 0.8);
  transform: scale(1.3);
}

.indicator-dot.active {
  background-color: #ffffff;
  transform: scale(1.5);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

body.header-dark-mode .indicator-dot {
  background-color: rgba(0, 0, 0, 0.25);
}

body.header-dark-mode .indicator-dot.active {
  background-color: #000000;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

/* --------------------------------------------------------------------------
   4. Slides Scroll Container & Section Base
   -------------------------------------------------------------------------- */
.slides-container {
  height: 100vh;
  width: 100vw;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.slides-container::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.slide-section {
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  position: relative;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding: 80px 48px 60px;
  transition: background-color var(--transition-smooth);
}

/* --------------------------------------------------------------------------
   5. Section Themes & Colors
   -------------------------------------------------------------------------- */
.theme-black {
  background-color: var(--bg-black);
  color: var(--text-light);
}

.theme-purple {
  background-color: var(--bg-purple);
  color: var(--text-light);
}

.theme-charcoal {
  background-color: var(--bg-charcoal);
  color: var(--text-light);
}

.theme-khaki {
  background-color: var(--bg-khaki);
  color: var(--text-light);
}

.theme-beyondui {
  background-color: var(--bg-black);
  color: var(--text-light);
}

.theme-white {
  background-color: var(--bg-white);
  color: var(--text-dark);
}

.theme-bangers {
  background-color: var(--bg-bangers);
  color: var(--text-light);
}

.theme-red {
  background-color: var(--bg-red);
  color: var(--text-light);
}

.theme-conductr {
  background-color: var(--bg-conductr);
  color: var(--text-light);
}

.theme-hp {
  background-color: var(--bg-hp);
  color: var(--text-dark);
}

/* --------------------------------------------------------------------------
   6. Hero Section Styling
   -------------------------------------------------------------------------- */
.hero-content {
  width: 100%;
  max-width: 1280px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: 40px;
  padding-bottom: 20px;
  position: relative;
}

.hero-statement {
  margin: auto 0;
  max-width: 900px;
}

.hero-statement h1 {
  font-family: var(--font-sans);
  font-size: clamp(32px, 4.2vw, 54px);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: #ffffff;
}

.hero-statement .text-link {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1.5px;
  transition: opacity var(--transition-fast);
}

.hero-statement .text-link:hover {
  opacity: 0.7;
}

.hero-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
}

/* Contact Info Badge List */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge-icon {
  font-family: var(--font-badge);
  font-size: 15px;
  font-weight: 900;
  width: 18px;
  text-align: center;
  color: inherit;
  display: inline-block;
  line-height: 1;
}

.serif-link {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 400;
  color: inherit;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  display: inline-block;
}

.serif-link:hover {
  opacity: 0.65;
  transform: translateX(2px);
}

/* Hero Avatar Card */
.hero-avatar {
  position: relative;
}

.avatar-frame {
  width: 180px;
  height: 180px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
  cursor: pointer;
}

.avatar-frame:hover {
  transform: scale(1.03) translateY(-2px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.8);
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: contrast(1.1) brightness(0.95);
  transition: filter var(--transition-smooth);
}

.avatar-frame:hover .avatar-img {
  filter: contrast(1.2) brightness(1.05);
}

/* --------------------------------------------------------------------------
   7. Standard Project Grid Layout
   -------------------------------------------------------------------------- */
.project-grid {
  width: 100%;
  max-width: 1280px;
  height: 100%;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 48px;
  align-items: center;
  position: relative;
}

.project-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  z-index: 10;
}

.project-category {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: inherit;
  opacity: 0.9;
  margin-bottom: 8px;
}

.project-title {
  font-family: var(--font-sans);
  font-size: clamp(24px, 2.5vw, 34px);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.025em;
  color: inherit;
  margin-bottom: 20px;
}

.project-cta {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1.5px;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  display: inline-block;
  cursor: pointer;
}

.project-cta:hover {
  opacity: 0.7;
  transform: translateX(3px);
}

.project-subcredit {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 400;
  opacity: 0.85;
  margin-top: 36px;
}

.project-subcredit .text-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.recognition-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.badge-link {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
  opacity: 0.9;
  transition: opacity var(--transition-fast);
}

.badge-link:hover {
  opacity: 0.65;
}

/* --------------------------------------------------------------------------
   8. Project Media Containers & Mockups
   -------------------------------------------------------------------------- */
.project-media {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  max-height: 72vh;
  position: relative;
}

.media-container {
  width: 100%;
  max-width: 880px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform var(--transition-smooth);
}

.responsive-svg-mockup {
  width: 100%;
  max-height: 64vh;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 16px 36px rgba(0, 0, 0, 0.35));
}

.phones-showcase .responsive-svg-mockup {
  max-height: 68vh;
}

.bangers-mockup-img {
  max-height: 66vh;
}

.alert-dialog-svg {
  max-width: 480px;
  max-height: 50vh;
}

.poster-img {
  max-height: 65vh;
}

.video-frame-card {
  cursor: pointer;
  border-radius: 12px;
  overflow: hidden;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.video-frame-card:hover {
  transform: scale(1.02);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5);
}

/* Amyc 2x3 Animated Logos Grid */
.amyc-logos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
  max-width: 640px;
}

.amyc-logo-card {
  background-color: #f7f7f9;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
  transition: transform var(--transition-bounce), box-shadow var(--transition-smooth);
  cursor: pointer;
}

.amyc-logo-card:hover {
  transform: translateY(-6px) scale(1.05);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.12);
}

.amyc-logo-card img {
  width: 100%;
  height: auto;
  display: block;
}

/* --------------------------------------------------------------------------
   9. Editorial Layout (Interface Politics)
   -------------------------------------------------------------------------- */
.editorial-layout {
  width: 100%;
  max-width: 1100px;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 60px;
  align-items: center;
}

.editorial-body {
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  padding-left: 48px;
}

.editorial-text {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.45;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: -0.01em;
}

/* --------------------------------------------------------------------------
   10. Talks Section
   -------------------------------------------------------------------------- */
.talks-section {
  padding-top: 100px;
  padding-bottom: 40px;
  overflow-y: auto;
}

.talks-content {
  width: 100%;
  max-width: 980px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin: auto 0;
}

.talks-hero-video {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background-color: #0d0d0d;
}

.video-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
}

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

.talks-details-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
}

.talks-featured-desc {
  max-width: 540px;
}

.featured-talk-title {
  font-family: var(--font-sans);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.featured-talk-meta {
  font-family: var(--font-serif);
  font-size: 19px;
  font-style: italic;
  opacity: 0.85;
}

.talks-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin: 8px 0;
}

.talks-archive-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.archive-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.archive-title {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.archive-meta {
  font-family: var(--font-serif);
  font-size: 17px;
  font-style: italic;
  opacity: 0.8;
}

.talks-bottom-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 20px;
}

.back-to-top-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 20px;
  background-color: rgba(255, 255, 255, 0.1);
  transition: all var(--transition-fast);
}

.back-to-top-btn:hover {
  background-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   11. Scroll Down Chevron Button
   -------------------------------------------------------------------------- */
.scroll-down-btn {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 10px;
  z-index: 20;
  opacity: 0.8;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  animation: chevronBounce 2.4s infinite ease-in-out;
}

.scroll-down-btn:hover {
  opacity: 1;
  transform: translateX(-50%) scale(1.15);
}

.chevron-icon {
  width: 24px;
  height: 24px;
  display: block;
}

.rotate-up {
  transform: rotate(0deg);
}

@keyframes chevronBounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(8px);
  }
  60% {
    transform: translateX(-50%) translateY(4px);
  }
}

/* --------------------------------------------------------------------------
   12. Responsive Behavior (Mobile & Tablet)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .site-header {
    padding: 20px 24px;
  }

  .slide-section {
    padding: 80px 32px 50px;
  }

  .project-grid {
    grid-template-columns: 300px 1fr;
    gap: 32px;
  }

  .section-indicator {
    display: none;
  }
}

@media (max-width: 768px) {
  /* On Mobile, permit fluid vertical scroll flow rather than strict viewport locks */
  .slides-container {
    scroll-snap-type: none;
    height: 100vh;
  }

  .slide-section {
    min-height: 100vh;
    height: auto;
    scroll-snap-align: none;
    padding: 90px 20px 60px;
    justify-content: flex-start;
  }

  .site-header {
    padding: 16px 20px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), transparent);
    backdrop-filter: blur(4px);
  }

  .brand-name {
    font-size: 19px;
  }

  .brand-role {
    font-size: 20px;
  }

  .header-nav .nav-talks-btn {
    font-size: 18px;
  }

  /* Responsive Mobile Background Overrides matching pavlosanchez.com */
  .theme-khaki {
    background-color: #fcfcfc;
    color: var(--text-dark);
  }

  .theme-beyondui {
    background-color: #731aef;
    color: var(--text-light);
  }

  .theme-bangers {
    background-color: #ef9175;
    color: var(--text-light);
  }

  .theme-conductr {
    background-color: #86d6af;
    color: var(--text-dark);
  }

  .theme-hp {
    background-color: #6d6d6d;
    color: var(--text-light);
  }

  /* Hero Section Mobile */
  .hero-content {
    gap: 40px;
    padding-top: 20px;
  }

  .hero-statement h1 {
    font-size: 30px;
    line-height: 1.22;
  }

  .hero-footer {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 32px;
  }

  .hero-avatar .avatar-frame {
    width: 140px;
    height: 140px;
  }

  .serif-link {
    font-size: 18px;
  }

  /* Project Grid Mobile Stack */
  .project-grid {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 28px;
  }

  .project-info {
    width: 100%;
  }

  .project-title {
    font-size: 24px;
    line-height: 1.25;
    margin-bottom: 16px;
  }

  .project-media {
    width: 100%;
    max-height: none;
    margin: 10px 0 30px;
  }

  .responsive-svg-mockup {
    max-height: 50vh;
  }

  .amyc-logos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  /* Editorial Mobile */
  .editorial-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .editorial-body {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-left: 0;
    padding-top: 24px;
  }

  .editorial-text {
    font-size: 20px;
  }

  /* Talks Mobile */
  .talks-details-row {
    flex-direction: column;
    gap: 20px;
  }

  .scroll-down-btn {
    bottom: 12px;
  }
}

/* --------------------------------------------------------------------------
   13. Video Modal Overlay
   -------------------------------------------------------------------------- */
.video-modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-smooth);
}

.video-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.video-modal-card {
  width: 100%;
  max-width: 900px;
  background-color: #111111;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform: scale(0.95);
  transition: transform var(--transition-bounce);
}

.video-modal-backdrop.active .video-modal-card {
  transform: scale(1);
}

.video-modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 26px;
  line-height: 1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}

.video-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.video-modal-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
}

.video-modal-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
