/* 
   YK Portfolio Style System
   Custom CSS matching the approved design layout, colors, and typography.
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@100;200;300;400;500;600;700&display=swap');

@font-face {
  font-family: 'Noto Sans Mono';
  src: url('./assets/fonts/NotoSansMono-VariableFont_wdth,wght.ttf') format('truetype');
  font-weight: 100 900;
  font-stretch: 50% 200%;
  font-style: normal;
}

:root {
  --color-pastel-blue: #abdffe;
  --color-dark-blue: #003851;
  --color-white: #ffffff;
  --font-mono: 'Noto Sans Mono', monospace;
  --font-sans: 'Outfit', sans-serif;
  --max-width: 1100px;
  --transition-speed: 0.3s;
}

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

body {
  background-color: var(--color-white);
  background-image: linear-gradient(180deg, var(--color-pastel-blue) 0%, transparent 50vh);
  background-repeat: no-repeat;
  color: var(--color-dark-blue);
  font-family: var(--font-mono);
  font-weight: 500;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color 0.4s ease, background 0.4s ease;
}

/* Base Link Styles */
a {
  color: inherit;
  text-decoration: none;
  transition: opacity var(--transition-speed);
}

a:hover {
  opacity: 0.7;
}

/* Layout Container */
#app-root {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* Page Transition Wrapper */
.page-wrapper {
  animation: fadeIn 0.4s ease-out forwards;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

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

/* SITE LOADER */
.site-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--color-white);
  background-image: linear-gradient(180deg, var(--color-pastel-blue) 0%, transparent 50vh);
  background-repeat: no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.5s;
  overflow: hidden;
}

.site-loader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  width: 100%;
  max-width: 280px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.loader-content video {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Mobile: reduce loader animation to 80% */
@media (max-width: 768px) {
  .loader-content {
    max-width: 224px; /* 280px × 80% */
    width: 80%;
  }
}

/* HEADER & NAVIGATION */
#site-header-container {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--color-pastel-blue);
  width: 100%;
}

.site-header {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
}

.logo-text {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--color-dark-blue);
  letter-spacing: -0.05em;
  line-height: 1;
}

.logo-img {
  height: 40px;
  width: auto;
  filter: brightness(0) saturate(100%) invert(15%) sepia(91%) saturate(1476%) hue-rotate(167deg) brightness(94%) contrast(109%);
}

.nav-menu {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--color-dark-blue);
  font-weight: 500;
}

.nav-link.active {
  font-weight: 700;
}

/* Mobile Navigation Hamburger Base Styles */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1002;
  gap: 5px;
}

.hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--color-dark-blue);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 56, 81, 0.3);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* HERO SECTION */
.hero-section {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 20px 60px 20px;
  position: relative;
}

.hero-image-container {
  width: 100%;
  max-width: 960px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-img {
  width: 100%;
  max-width: 900px;
  height: auto;
  object-fit: contain;
  display: block;
}

/* CORE EXPERTISE SECTION (MARQUEE) */
.expertise-section {
  width: 100%;
  max-width: 1080px;
  text-align: center;
  margin: 0 auto 70px auto;
  padding: 0 40px;
}

.expertise-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-dark-blue);
  margin-bottom: 12px;
  font-weight: 500;
}

.marquee-container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  background-color: #e6f5ff;
  border-radius: 8px;
  padding: 10px 0;
  white-space: nowrap;
}

.marquee-track {
  display: flex;
  width: max-content;
  flex-shrink: 0;
  animation: marquee-scroll 25s linear infinite;
}

.marquee-content {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-right: 16px;
  flex-shrink: 0;
}

.marquee-item {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-dark-blue);
  padding: 0;
}

.marquee-separator {
  color: var(--color-dark-blue);
  opacity: 0.6;
  font-weight: 400;
}

@keyframes marquee-scroll {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

/* WORK EXPERIENCE SECTION */
.experience-section {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto 50px auto;
  padding: 0 40px;
}

.section-title {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 40px;
  color: var(--color-dark-blue);
}

.experience-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
}

.experience-card {
  background-color: #e6f5ff;
  border-radius: 8px;
  padding: 16px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color var(--transition-speed);
}

.experience-card:hover {
  background-color: #dceeff;
}

.exp-company-logo {
  max-height: 50px;
  max-width: 220px;
  object-fit: contain;
}

.exp-role-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.exp-role {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-dark-blue);
}

.exp-type {
  font-size: 0.8rem;
  color: var(--color-dark-blue);
  opacity: 0.7;
  margin-top: 2px;
}

.exp-duration {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-dark-blue);
  text-align: right;
  min-width: 120px;
}

/* Explore Works Button */
.explore-btn-container {
  display: flex;
  justify-content: center;
  margin-bottom: 70px;
}

.explore-btn {
  background-color: var(--color-dark-blue);
  color: var(--color-white);
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: transform var(--transition-speed), background-color var(--transition-speed);
}

.explore-btn:hover {
  transform: translateY(-2px);
  background-color: #002c40;
  opacity: 1;
}

.explore-btn:active {
  transform: translateY(0);
}

/* CLIENTS EXPERIENCE SLIDER SECTION */
.clients-section {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto 80px auto;
  padding: 0 40px;
  text-align: center;
}

.clients-subtitle {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-dark-blue);
  margin-top: -30px;
  margin-bottom: 40px;
  opacity: 0.8;
  letter-spacing: 0.05em;
}

/* Slider Outer Container */
.client-slider-container {
  position: relative;
  width: 100%;
  margin: 0 auto;
  padding: 0; /* Removed side padding since arrows moved to bottom */
  box-sizing: border-box;
}

/* Track Mask Wrapper */
.slider-track-wrapper {
  overflow: hidden;
  width: 100%;
  border-radius: 16px;
  padding: 10px 0;
  /* Animate height changes smoothly when switching between slides of different row counts */
  transition: height 0.4s cubic-bezier(0.25, 1, 0.2, 1);
  will-change: height;
}

/* Sliding Track */
.slider-track {
  display: flex;
  width: 100%;
  /* align-items flex-start is critical so shorter slides maintain their own natural height */
  align-items: flex-start;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.2, 1);
  will-change: transform;
}

/* Individual Slide */
.client-slide {
  flex: 0 0 100%;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0.3;
  transition: opacity 0.5s ease;
}

.client-slide.active {
  opacity: 1;
}

/* Optional Slide Title */
.client-slide .slide-title {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-dark-blue);
  margin-bottom: 28px;
  opacity: 0.75;
}

/* Rows Container */
.slide-rows-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

/* Single Row of Logos - Enforcing Grid to Align Columns Straight & Prevent Overflow Clipping */
.slider-row {
  display: grid;
  /* Use minmax(0, 1fr) so columns shrink to fit rather than clipping if user adds many logos */
  grid-template-columns: repeat(var(--grid-cols, 5), minmax(0, 1fr));
  justify-content: center;
  align-content: center;
  column-gap: 32px;
  row-gap: 20px;
  width: 100%;
  max-width: 1080px; /* Filled to the grid margin of the website */
  margin: 0 auto;
}

/* Individual Logo Items (No boxes, clean transparent layout) */
.slider-logo-item {
  width: 100%;
  /* Restrict card width so items don't stretch too wide in small row counts */
  max-width: 160px; /* Scaled up from 140px */
  height: 85px; /* Scaled up from 75px */
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  cursor: pointer;
  
  /* Initial state for active slide entry animation */
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.35s ease;
}

/* Logo Image */
.slider-logo {
  /* Set max-width to 100% so images automatically scale down within their grid cell if needed */
  max-width: 100%;
  max-height: 56px; /* Scaled up from 48px */
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.85;
  transition: filter 0.35s ease, opacity 0.35s ease;
}

/* Premium Entrance Animations when slide is Active */
.client-slide.active .slider-logo-item {
  animation: fadeInUpLogo 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--logo-delay, 0s);
}

@keyframes fadeInUpLogo {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hover States: Only Grayscale-to-Color and Opacity Shift, No scale or translation */
.slider-logo-item:hover .slider-logo {
  filter: grayscale(0%);
  opacity: 1;
}

/* Slider Controls Group (Arrows & Dots) */
.slider-controls-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-top: 36px;
}

.slider-arrows {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

/* Slide Navigation Arrows */
.slider-arrow {
  position: relative; /* Removed absolute positioning */
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(230, 245, 255, 0.8);
  border: 1px solid rgba(0, 56, 81, 0.1);
  color: var(--color-dark-blue);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  transition: background-color 0.3s, border-color 0.3s, transform 0.3s, color 0.3s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.slider-arrow:hover {
  background-color: var(--color-dark-blue);
  color: var(--color-white);
  border-color: var(--color-dark-blue);
  transform: scale(1.1); /* Removed translateY(-50%) */
}

.slider-arrow:active {
  transform: scale(0.95); /* Removed translateY(-50%) */
}

.prev-arrow {
  /* Positions reset as relative positioning is used */
}

.next-arrow {
  /* Positions reset as relative positioning is used */
}

.arrow-icon {
  display: block;
  transition: transform 0.3s ease;
}

.prev-arrow:hover .arrow-icon {
  transform: translateX(-2px);
}

.next-arrow:hover .arrow-icon {
  transform: translateX(2px);
}

/* Navigation Indicator Dots */
.slider-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 0; /* Reset margin since gap is handled by parent controls container */
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(0, 56, 81, 0.2);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: width 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
              border-radius 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
              background-color 0.3s ease,
              transform 0.3s ease;
}

.slider-dot:hover {
  background-color: rgba(0, 56, 81, 0.4);
  transform: scale(1.1);
}

.slider-dot.active {
  width: 24px; /* Premium pill expansion indicator */
  border-radius: 5px;
  background-color: var(--color-dark-blue);
}

/* OUTRO SECTION */
.outro-section {
  width: 100%;
  text-align: center;
  padding: 60px 20px 80px 20px;
}

.outro-img {
  width: 100%;
  max-width: 750px;
  height: auto;
  display: inline-block;
}

/* GLOBAL FOOTER */
.site-footer {
  width: 100%;
  padding: 80px 20px 40px 20px;
  text-align: center;
  margin-top: auto;
  background: linear-gradient(to top, rgba(171, 223, 254, 0.5) 0%, transparent 100%);
}

.route-about .site-footer {
  background: none;
}

.copyright-text {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-dark-blue);
  opacity: 0.7;
}

/* ABOUT PAGE WRAPPER */
.about-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ABOUT PAGE */
.about-container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 40px 10px 40px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 50px;
  align-items: start;
}

.about-image-wrapper {
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
  background-color: var(--color-white);
  border: 1px solid rgba(0, 56, 81, 0.05);
}

.about-img {
  width: 100%;
  height: auto;
  display: block;
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: left;
}

.about-name {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-dark-blue);
  margin-bottom: 5px;
}

.about-bio-p {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--color-dark-blue);
  margin-bottom: 2px;
}

.about-contact-section {
  width: 100%;
  max-width: 900px;
  margin: 40px auto 40px auto;
  padding: 0 40px;
  text-align: center;
}

.about-contact-line {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--color-dark-blue);
  font-weight: 500;
  display: inline-block;
}

.about-contact-line a {
  font-weight: 600;
}

/* WORKS PAGE */
.works-container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 40px 60px 40px;
  text-align: center;
}

.works-title {
  font-family: var(--font-sans);
  font-size: 5rem;
  font-weight: 200;
  color: var(--color-dark-blue);
  letter-spacing: 0.08em;
  margin-bottom: 50px;
  text-transform: uppercase;
}

.works-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.work-card {
  position: relative;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 1.25 / 1;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out, box-shadow var(--transition-speed) ease;
  display: block;
  background-color: var(--color-pastel-blue);
  opacity: 0;
  transform: translateY(15px);
}

.work-card.loaded {
  opacity: 1;
  transform: translateY(0);
}

.work-card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  opacity: 1;
}

.work-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-speed) ease, filter var(--transition-speed) ease, opacity var(--transition-speed) ease;
}

.work-card:hover .work-card-img {
  transform: scale(1.06);
  filter: blur(3px);
  opacity: 0.6;
}

/* Gradient overlay for readability */
.work-card-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100%;
  background: linear-gradient(180deg, rgba(171, 223, 254, 0) 0%, rgba(171, 223, 254, 0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 24px;
  color: var(--color-dark-blue);
  text-align: center;
}

.work-card-client {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 6px 0;
}

.work-card-desc {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  opacity: 0.9;
  text-align: center;
  line-height: 1.4;
  white-space: pre-line;
}

/* CLIENT DETAIL PAGES */
.client-page-container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 40px 80px 40px;
}

.client-back-link {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--color-dark-blue);
  font-weight: 400;
  margin-bottom: 24px;
  transition: opacity var(--transition-speed);
}

.client-back-link:hover {
  opacity: 0.7;
}

.client-page-header {
  margin-bottom: 32px;
  text-align: left;
}

.client-page-title {
  font-family: var(--font-mono);
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--color-dark-blue);
  margin-bottom: 16px;
  line-height: 1.15;
}

.client-page-description {
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 400;
  color: var(--color-dark-blue);
  opacity: 0.95;
}

/* My Role Box & Description Card Styling */
.client-role-box,
.client-description-box {
  background-color: #e6f5ff;
  border-radius: 20px;
  padding: 28px 36px;
  margin-bottom: 40px;
  width: 100%;
  text-align: left;
}

.client-role-title,
.client-description-title {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-dark-blue);
  margin-bottom: 12px;
  text-transform: capitalize;
}

.client-role-text,
.client-description-text {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 1.6;
  font-weight: 400;
  color: var(--color-dark-blue);
}

/* Flexible Spacing Between Sections */
.client-page-content {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* Media Grid Layouts */
.client-media-group-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

.client-media-grid {
  display: flex;
  flex-direction: row;
  gap: 24px;
  width: 100%;
  align-items: stretch;
  justify-content: center;
}

/* Constrain vertical ratio items in 1-col and 2-col grids to avoid excessive height */
.client-media-grid.cols-1 .media-item.ratio-9-16,
.client-media-grid.cols-1 .media-item.ratio-4-5 {
  max-width: 340px;
  margin: 0 auto;
}

.client-media-grid.cols-2 .media-item.ratio-9-16,
.client-media-grid.cols-2 .media-item.ratio-4-5 {
  max-width: 340px;
}

/* Media Item Aspect Ratio Containers */
.media-item {
  position: relative;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  background-color: #e6f5ff;
}

.media-item.ratio-9-16 {
  aspect-ratio: 9 / 16;
}

.media-item.ratio-4-5 {
  aspect-ratio: 4 / 5;
}

.media-item.ratio-1-1 {
  aspect-ratio: 1 / 1;
}

.media-item.ratio-16-9 {
  aspect-ratio: 16 / 9;
}

/* Inner Images / Videos / iFrames */
.media-item img,
.media-item video,
.media-item iframe,
.media-item .media-placeholder-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
  display: block;
  transition: transform var(--transition-speed) ease, opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  opacity: 0;
}

.media-item.loaded img,
.media-item.loaded video,
.media-item.loaded iframe,
.media-item.loaded .media-placeholder-bg {
  opacity: 1;
}


.youtube-placeholder {
  position: relative;
  cursor: pointer;
}

.youtube-play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.15);
  transition: background-color var(--transition-speed) ease, opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: 2;
  opacity: 0;
}

.media-item.loaded .youtube-play-overlay {
  opacity: 1;
}

.play-icon {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), filter 0.25s ease;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

.play-icon.icon-youtube {
  width: 68px;
  height: 48px;
}

/* Make square platform icons render correctly */
.play-icon:not(.icon-youtube) {
  width: 56px;
  height: 56px;
}

/* Hover effects for premium feeling */
.youtube-placeholder:hover img {
  transform: scale(1.04);
}

.youtube-placeholder:hover .media-placeholder-bg {
  transform: scale(1.04);
}

.youtube-placeholder:hover .youtube-play-overlay {
  background-color: rgba(0, 0, 0, 0.25);
}

.youtube-placeholder:hover .play-icon {
  transform: scale(1.12);
  filter: drop-shadow(0 6px 15px rgba(0, 0, 0, 0.45)) brightness(1.15);
}

/* Fallback/Default styled background gradients if custom thumbnails are missing */
.media-placeholder-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
  transition: transform var(--transition-speed) ease;
}

.media-placeholder-bg.provider-instagram {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%,#d6249f 60%,#285aeb 90%);
}

.media-placeholder-bg.provider-mega {
  background: linear-gradient(135deg, #f05a5f 0%, #d9272e 100%);
}

.media-placeholder-bg.provider-direct,
.media-placeholder-bg.provider-other {
  background: linear-gradient(135deg, #abdffe 0%, #003851 100%);
}

/* Lazy media skeleton shimmer styling */
.media-skeleton {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #e6f5ff 25%, #dceeff 50%, #e6f5ff 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite linear;
  z-index: 1;
  border-radius: 20px;
  pointer-events: none;
  transition: opacity 0.4s ease-out;
  opacity: 1;
}

.media-item.loaded .media-skeleton {
  opacity: 0;
}

.works-sentinel {
  height: 20px;
  width: 100%;
  grid-column: 1 / -1;
  pointer-events: none;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* RESPONSIVE BREAKPOINTS */

/* Tablet Breakpoint (under 950px) */
@media (max-width: 950px) {
  .site-header {
    padding: 12px 30px;
  }
  
  .nav-menu {
    gap: 24px;
  }
  
  .logo-text {
    font-size: 1.8rem;
  }
  
  .expertise-section, .experience-section, .clients-section, .works-container, .about-container, .client-page-container {
    padding: 20px 30px;
  }
  
  .works-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  
  .about-container {
    grid-template-columns: 1fr;
    gap: 30px;
    justify-items: center;
  }
  
  .about-image-wrapper {
    max-width: 320px;
  }
  
  .about-content {
    text-align: center;
  }
  
  .client-slider-container {
    padding: 0;
  }
  
  .slider-arrow {
    width: 38px;
    height: 38px;
  }

  .slide-rows-container {
    gap: 18px;
  }
  
  .slider-row {
    grid-template-columns: repeat(var(--grid-cols, 5), 125px);
    column-gap: 24px;
    row-gap: 16px;
  }
  
  .slider-logo-item {
    height: 70px;
  }
  
  .slider-logo {
    max-width: 125px;
    max-height: 44px;
  }
  
}

/* Mobile Breakpoint (under 600px) */
@media (max-width: 600px) {
  .site-header {
    padding: 12px 16px;
  }
  
  .expertise-section, .experience-section, .clients-section, .works-container, .about-container, .client-page-container {
    padding: 10px 16px;
  }
  
  .experience-card {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px;
    text-align: center;
  }
  
  .exp-duration {
    text-align: center;
    min-width: unset;
  }
  
  .client-slider-container {
    padding: 0;
  }
  
  .slider-arrow {
    width: 32px;
    height: 32px;
  }

  .slide-rows-container {
    gap: 14px;
  }
  
  .slider-row {
    grid-template-columns: repeat(3, 1fr);
    column-gap: 12px;
    row-gap: 12px;
  }
  
  .slider-logo-item {
    height: 58px;
  }
  
  .slider-logo {
    max-width: 100%;
    max-height: 38px;
  }
  
  .works-title {
    font-size: 3.2rem;
    margin-bottom: 30px;
  }
  
  .works-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .work-card-overlay {
    padding: 16px;
  }
  
  .work-card-client {
    font-size: 1.15rem;
  }
  
  .work-card-desc {
    font-size: 0.7rem;
  }
  
  .about-contact-line {
    font-size: 0.75rem;
    line-height: 1.8;
  }
  
  .client-page-title {
    font-size: 2.2rem;
  }

  .client-role-box,
  .client-description-box {
    padding: 20px 24px;
    margin-bottom: 24px;
    border-radius: 16px;
  }

  .client-role-title,
  .client-description-title {
    font-size: 1.15rem;
    margin-bottom: 8px;
  }

  .client-role-text,
  .client-description-text {
    font-size: 0.88rem;
  }

  .client-media-group-wrapper {
    gap: 16px;
  }

  .client-media-grid {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .client-media-grid .media-item {
    flex: none !important;
    width: 100% !important;
  }

  .client-media-grid .media-item.ratio-9-16,
  .client-media-grid .media-item.ratio-4-5 {
    max-width: 340px;
  }

  .media-item {
    border-radius: 16px;
  }
}

/* Tablet / Mobile Hamburger Menu Drawer (under 768px) */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background-color: var(--color-pastel-blue);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.08);
    z-index: 1001;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    padding: 100px 40px;
  }

  .site-nav.nav-open {
    right: 0;
  }

  .nav-menu {
    flex-direction: column;
    gap: 32px;
    align-items: flex-start;
  }

  .nav-link {
    font-size: 1.25rem;
    font-weight: 600;
  }

  /* Hamburger to 'X' animation */
  .nav-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

/* ==========================================================================
   Maintenance Page Styles (Integrated)
   ========================================================================== */

body.maintenance-mode-active > *:not(#maintenance-screen) {
  display: none !important;
}

body.maintenance-mode-active {
  overflow: hidden !important;
  height: 100vh !important;
  min-height: 100vh !important;
}

.maintenance-screen {
  --bg-top: #ffffff;
  --bg-bottom: #d5ebfc;
  --text-color: #063951;
  --text-accent: #0d6896;
  --text-muted: rgba(6, 57, 81, 0.6);
  --font-mono: 'Noto Sans Mono', 'Courier New', Courier, monospace;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  min-height: 100dvh;
  padding: 2.5rem 1.5rem 2rem 1.5rem;
  background: linear-gradient(180deg, var(--bg-top) 30%, var(--bg-bottom) 100%);
  font-family: var(--font-mono);
  color: var(--text-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  z-index: 10000;
  box-sizing: border-box;
}

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

.maintenance-screen .maintenance-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
  text-align: center;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInMaintenancePage 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.maintenance-screen .logo-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: clamp(1.8rem, 4vw, 3rem);
}

.maintenance-screen .logo {
  width: clamp(75px, 10vw, 130px);
  height: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  animation: floatMaintenanceLogo 4.5s ease-in-out infinite;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.45s ease-in-out;
  filter: drop-shadow(0 4px 8px rgba(6, 57, 81, 0.08));
}

.maintenance-screen .logo:hover {
  transform: scale(1.16) rotate(3deg) translateY(-8px);
  filter: drop-shadow(0 20px 25px rgba(6, 57, 81, 0.22));
  cursor: pointer;
}

.maintenance-screen .status-text {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.05rem, 2.2vw, 1.8rem);
  font-weight: 350;
  letter-spacing: -0.01em;
  color: var(--text-color);
  line-height: 1.4;
  min-height: 2.5rem;
  padding: 0 1.25rem;
  max-width: 100%;
  box-sizing: border-box;
}

.maintenance-screen .typewriter {
  display: inline-block;
  white-space: normal;
  word-break: break-word;
}

.maintenance-screen .cursor {
  display: inline-block;
  width: 8px;
  margin-left: 2px;
  font-weight: 300;
  color: var(--text-color);
  opacity: 0;
  transition: opacity 0.15s ease, width 0.15s ease;
}

.maintenance-screen .cursor.blinking {
  opacity: 1;
  animation: blinkMaintenanceCursor 0.75s step-end infinite;
}

.maintenance-screen .dots {
  display: inline-flex;
  margin-left: 0.1em;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}

.maintenance-screen .dots.active {
  opacity: 1;
}

.maintenance-screen .dot {
  display: inline-block;
  font-size: 1.1em;
  animation: pulseMaintenanceDot 1.4s infinite ease-in-out both;
}

.maintenance-screen .dot:nth-child(1) { animation-delay: 0s; }
.maintenance-screen .dot:nth-child(2) { animation-delay: 0.2s; }
.maintenance-screen .dot:nth-child(3) { animation-delay: 0.4s; }
.maintenance-screen .dot:nth-child(4) { animation-delay: 0.6s; }

.maintenance-screen .maintenance-footer {
  width: 100%;
  text-align: center;
  opacity: 0;
  animation: fadeInMaintenancePage 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

.maintenance-screen .maintenance-footer p {
  font-size: clamp(0.65rem, 1.1vw, 0.8rem);
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  word-spacing: 0.05em;
  line-height: 1.6;
}

/* Animations */
@keyframes fadeInMaintenancePage {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes blinkMaintenanceCursor {
  from, to { color: transparent; }
  50% { color: var(--text-color); }
}

@keyframes floatMaintenanceLogo {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-14px) rotate(-1.5deg);
  }
}

@keyframes pulseMaintenanceDot {
  0%, 100% {
    opacity: 0.25;
    transform: translateY(0) scale(0.8);
    color: var(--text-color);
  }
  50% {
    opacity: 1;
    transform: translateY(-10px) scale(1.3);
    color: var(--text-accent);
    text-shadow: 0 0 8px rgba(13, 104, 150, 0.3);
  }
}

/* Media/Responsive & Prefers-reduced-motion queries */
@media (max-width: 480px) {
  .maintenance-screen {
    padding: 2rem 1rem 1.5rem 1rem;
  }
  .maintenance-screen .status-text {
    font-weight: 400;
  }
}

@media (prefers-reduced-motion: reduce) {
  .maintenance-screen .typewriter {
    width: auto;
  }
  .maintenance-screen .maintenance-container,
  .maintenance-screen .maintenance-footer,
  .maintenance-screen .dots {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .maintenance-screen .cursor {
    display: none;
  }
  .maintenance-screen .logo {
    animation: none;
  }
  .maintenance-screen .logo:hover {
    transform: none;
  }
  .maintenance-screen .dot {
    animation: none;
  }
}

/* ==========================================================================
   404 Error Page Styles
   ========================================================================== */

body.route-404 {
  background: linear-gradient(180deg, var(--color-pastel-blue) 0%, #ffffff 40vh, #d5ebfc 100%) !important;
  background-attachment: fixed;
}

/* 404 Page Wrapper */
.error-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(2.5rem, 6vh, 5rem) 1.5rem;
  min-height: calc(100vh - 180px); /* Account for header/footer heights */
  box-sizing: border-box;
}

.error-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInMaintenancePage 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 404 Video Container & Sizing */
.error-video-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: clamp(1.8rem, 4vw, 3rem);
  width: 100%;
}

.error-video {
  width: 100%;
  max-width: clamp(240px, 35vw, 400px); /* Dynamic sizes: 240px on mobile, scales up to 400px on desktop */
  height: auto;
  display: block;
  user-select: none;
  filter: drop-shadow(0 10px 25px rgba(6, 57, 81, 0.12));
}

/* Typewriter Text Styling for 404 page */
.error-page .status-text {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.05rem, 2.2vw, 1.8rem);
  font-weight: 350;
  letter-spacing: -0.01em;
  color: var(--color-dark-blue);
  line-height: 1.4;
  min-height: 2.5rem;
  padding: 0 1.25rem;
  max-width: 100%;
  box-sizing: border-box;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.error-page .typewriter {
  display: inline-block;
  white-space: normal;
  word-break: break-word;
}

.error-page .cursor {
  display: inline-block;
  width: 8px;
  margin-left: 2px;
  font-weight: 300;
  color: var(--color-dark-blue);
  opacity: 0;
  transition: opacity 0.15s ease, width 0.15s ease;
}

.error-page .cursor.blinking {
  opacity: 1;
  animation: blinkMaintenanceCursor 0.75s step-end infinite;
}

.error-page .dots {
  display: inline-flex;
  margin-left: 0.1em;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}

.error-page .dots.active {
  opacity: 1;
}

.error-page .dot {
  display: inline-block;
  font-size: 1.1em;
  animation: pulseMaintenanceDot 1.4s infinite ease-in-out both;
}

.error-page .dot:nth-child(1) { animation-delay: 0s; }
.error-page .dot:nth-child(2) { animation-delay: 0.2s; }
.error-page .dot:nth-child(3) { animation-delay: 0.4s; }
.error-page .dot:nth-child(4) { animation-delay: 0.6s; }

/* 404 Button alignment and spacing */
.error-btn-container {
  display: flex;
  justify-content: center;
  width: 100%;
}

.error-page .explore-btn {
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  padding: 14px 32px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 56, 81, 0.12);
}

/* Reduced Motion overrides for 404 */
@media (prefers-reduced-motion: reduce) {
  .error-page .typewriter {
    width: auto;
  }
  .error-container,
  .error-page .dots {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .error-page .cursor {
    display: none;
  }
  .error-page .dot {
    animation: none;
  }
}

/* ==========================================================================
   LARGE RESOLUTIONS (2K, iMac 27" screens - min-width: 1921px)
   ========================================================================== */
@media (min-width: 1921px) {
  html {
    font-size: 18px; /* Globally scale up text sizes by 12.5% */
  }

  :root {
    --max-width: 1350px; /* Expand layout grid maximum boundary */
  }

  /* Hero Section scaling */
  .hero-image-container {
    max-width: 1200px;
  }
  .hero-img {
    max-width: 1100px;
  }

  /* Section Bounds & Margins */
  .expertise-section {
    max-width: 1350px;
    margin-bottom: 90px;
  }
  .experience-section {
    max-width: 1350px;
    margin-bottom: 70px;
  }
  .clients-section {
    max-width: 1350px;
    margin-bottom: 110px;
  }
  .slider-row {
    max-width: 1350px;
    column-gap: 36px;
  }
  .slider-logo-item {
    max-width: 180px;
    height: 96px;
  }
  .slider-logo {
    max-height: 63px;
  }
  .outro-img {
    max-width: 950px;
  }

  /* Sub-pages layout boundaries */
  .about-container,
  .about-contact-section,
  .works-container,
  .client-page-container {
    max-width: 1150px;
  }


  /* Work experience logo scaling & padding */
  .exp-company-logo {
    max-height: 60px;
    max-width: 260px;
  }
  .experience-card {
    padding: 20px 36px;
  }
  
  /* Work Grid item aspect ratio / card adjustments */
  .works-grid {
    gap: 40px;
  }
}

/* ==========================================================================
   EXTRA LARGE RESOLUTIONS (4K, large TV screens - min-width: 2560px)
   ========================================================================== */
@media (min-width: 2560px) {
  html {
    font-size: 20px; /* Globally scale up text sizes by 25% */
  }

  :root {
    --max-width: 1600px; /* Expand layout grid maximum boundary */
  }

  /* Hero Section scaling */
  .hero-image-container {
    max-width: 1450px;
  }
  .hero-img {
    max-width: 1350px;
  }

  /* Section Bounds & Margins */
  .expertise-section {
    max-width: 1600px;
    margin-bottom: 120px;
  }
  .experience-section {
    max-width: 1600px;
    margin-bottom: 90px;
  }
  .clients-section {
    max-width: 1600px;
    margin-bottom: 140px;
  }
  .slider-row {
    max-width: 1600px;
    column-gap: 40px;
  }
  .slider-logo-item {
    max-width: 200px;
    height: 106px;
  }
  .slider-logo {
    max-height: 70px;
  }
  .outro-img {
    max-width: 1150px;
  }

  /* Sub-pages layout boundaries */
  .about-container,
  .about-contact-section,
  .works-container,
  .client-page-container {
    max-width: 1350px;
  }


  /* Work experience logo scaling & padding */
  .exp-company-logo {
    max-height: 70px;
    max-width: 300px;
  }
  .experience-card {
    padding: 24px 44px;
  }
  
  /* Work Grid item aspect ratio / card adjustments */
  .works-grid {
    gap: 50px;
  }
}
