/* ========================================
   MODERN PORTFOLIO STYLES
   ======================================== */

/* CSS Custom Properties for Design System */
:root {
  /* Typography Scale */
  --text-xs: 0.75rem;
  --text-sm: 0.79rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  
  /* Spacing Scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  /* Colors - Enhanced Palette */
  --color-primary: #46939b;
  --color-primary-light: #5aa5ac;
  --color-primary-dark: #3a7a80;
  
  --color-secondary: #f28963;
  --color-secondary-light: #f49a76;
  --color-secondary-dark: #e07850;
  
  --color-accent: #f25e5e;
  --color-accent-light: #f47171;
  --color-accent-dark: #e04b4b;
  
  /* Neutrals */
  --color-white: #ffffff;
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2937;
  --color-gray-900: #111827;
  
  /* Background Gradient */
  --bg-gradient: #2A7B9B;
  --bg-gradient: linear-gradient(10deg, rgba(42, 123, 155, 1) 0%, rgba(255, 217, 217, 1) 100%);
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  /* Transitions */
  --transition-quick: 0.15s ease-out;
  --transition-base: 0.3s ease-out;
  --transition-slow: 0.5s ease-out;
  
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
}

/* ========================================
   MODERN TYPOGRAPHY
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@400;500;600;700&display=swap');

/* Reset and Base Styles */
* {
  box-sizing: border-box;
}

/* Canvas Mouse Effect - Fullscreen Background */
#canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-gray-800);
  background: #e7f5fb !important;
  margin: 0;
  padding: 0;
  cursor: crosshair;
  overflow-x: hidden;
  /* Hide scrollbar for Webkit browsers */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

body::-webkit-scrollbar {
  display: none; /* Webkit browsers */
}

/* Hide scrollbars globally */
* {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

*::-webkit-scrollbar {
  display: none; /* Webkit browsers */
}

strong {
  font-weight: 400!important;
}

/* Typography - Simplified with Inter 400 */
.heading-display {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-gray-900);
}

.heading-1 {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  line-height: 1.3;
  letter-spacing: 0.05em;
  color: var(--color-gray-900);
  text-transform: uppercase;
}

.heading-2 {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: clamp(1.25rem, 3vw, 1.875rem);
  line-height: 1.4;
  letter-spacing: 0.05em;
  color: var(--color-gray-800);
  text-transform: uppercase;
}

.heading-3 {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: clamp(0.875rem, 2.5vw, 1rem);
  line-height: 1.5;
  color: var(--color-gray-700);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.body-large {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: var(--text-lg);
  line-height: 1.7;
  color: var(--color-gray-600);
}

.body-base {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-gray-600);
}

.body-small {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--color-gray-500);
}

.text-accent {
  color: var(--color-accent);
}

/* ========================================
   MODERN LOGO & NAVIGATION
   ======================================== */

.logo {
  position: fixed;
  top: var(--space-lg);
  left: 5%;
  transition: all var(--transition-slow);
  z-index: 7777;
}

.logo h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 2rem;;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--color-gray-700);
  margin: 0;
}

.logo-sub {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: var(--text-sm);
  letter-spacing: 0.1em;
  line-height: 1.4;
  color: var(--color-gray-700);
  text-transform: uppercase;
  margin-top: var(--space-xs);
}

.logo-hidden {
  left: -40%;
  opacity: 0;
  transition: all var(--transition-slow);
}

/* Mobile logo scaling */
@media (max-width: 767px) {
  .logo {
    transform: scale(0.8);
    transform-origin: top left;
  }
}

/* Navigation */
nav {
  position: fixed;
  top: var(--space-lg);
  right: 5%;
  transition: all var(--transition-slow);
  z-index: 7777;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--space-xl);
}

nav li {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: var(--text-lg);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-gray-700);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
}

nav li::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: all var(--transition-base);
  transform: translateX(-50%);
}

nav li:hover {
  color: var(--color-gray-700);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

nav li:hover::after {
  width: 80%;
}

.nav-hidden {
  right: -40%;
  opacity: 0;
  transition: all var(--transition-slow);
}

/* ========================================
   PROJECT BUTTONS (Smooth & Flexible)
   ======================================== */

.project-wrap {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh; /* iOS Safari fix - accounts for browser UI */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5555;
  opacity: 0;
  padding: 2rem;
  box-sizing: border-box;
}

.project-wrap-show {
  opacity: 1;
  transition: opacity 2s ease;
  transition-delay: 0.4s;
}

/* Desktop Layout - Horizontal Flow */
@media (min-width: 768px) {
  .project-wrap {
    flex-direction: row;
    flex-wrap: wrap;
    gap: clamp(1rem, 3vw, 3rem);
  }

  .project-wrap-show {
    height: auto;
    min-height: 100vh;
    align-content: center;
  }
}

/* Mobile Layout - Vertical Stack */
@media (max-width: 767px) {
  .project-wrap {
    flex-direction: column;
    gap: 1.5rem;
    justify-content: flex-start;
    align-items: center;
    padding-top: 140px;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-bottom: 150px;
    overflow-y: auto;
  }
}

.spin-warp {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 140px;
  flex-shrink: 0;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  
  /* Initial state - slide from bottom */
  transform: translateY(100px);
  opacity: 0;
  transition-property: transform, opacity;
}

.spin-warp.entered {
  /* Final state - slide to normal position */
  transform: translateY(0);
  opacity: 1;
}

.float-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: float 6s ease-in-out infinite;
}

/* Smooth floating animation with random delays */
.spin-warp:nth-child(1) .float-container { animation-delay: 0s; animation-duration: 5.5s; }
.spin-warp:nth-child(2) .float-container { animation-delay: -1s; animation-duration: 6s; }
.spin-warp:nth-child(3) .float-container { animation-delay: -2s; animation-duration: 6.5s; }
.spin-warp:nth-child(4) .float-container { animation-delay: -3s; animation-duration: 5.8s; }
.spin-warp:nth-child(5) .float-container { animation-delay: -4s; animation-duration: 6.2s; }
.spin-warp:nth-child(6) .float-container { animation-delay: -5s; animation-duration: 5.9s; }
.spin-warp:nth-child(7) .float-container { animation-delay: -6s; animation-duration: 6.3s; }

@keyframes float {
  0%, 100% { 
    transform: translateY(0px) translateX(0px); 
  }
  25% { 
    transform: translateY(-15px) translateX(8px); 
  }
  50% { 
    transform: translateY(-8px) translateX(-10px); 
  }
  75% { 
    transform: translateY(-20px) translateX(5px); 
  }
}


.spin-warp:hover .float-container {
  animation-play-state: paused;
}

.project-button {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: none;
  outline: none;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.project-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: inherit;
  border-radius: inherit;
  opacity: 0.9;
  transition: all 0.4s ease;
}

.project-button:hover::before {
  opacity: 1;
  transform: scale(1.6);
}

.project-button h3 {
  position: relative;
  z-index: 2;
  font-family: 'Inter', sans-serif;
  font-weight: 200;
  font-size: var(--text-sm);
  color: white;
  text-align: center;
  margin: 0;

  text-transform: uppercase;
  line-height: 1.2;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-button:hover h3 {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.2s;
}

/* Mobile adjustments */
@media (max-width: 767px) {
  .spin-warp {
    width: 100px;
    height: 100px;
  }

  .project-button {
    width: 90px;
    height: 90px;
  }

  .project-button h3 {
    font-size: 0.5rem;
    opacity: 1;
    transform: translateY(0);
  }
  
  /* Reduce floating animation on mobile for performance */
  @keyframes float {
    0%, 100% { 
      transform: translateY(0px) translateX(0px) rotate(0deg); 
    }
    50% { 
      transform: translateY(-8px) translateX(0px) rotate(1deg); 
    }
  }
  
  .float-container {
    width: 100px;
    height: 100px;
  }

  /* Disable hover scale on mobile */
  .project-button:hover.color1,
  .project-button:hover.color2,
  .project-button:hover.color3,
  .project-button:hover.color4,
  .project-button:hover.color5,
  .project-button:hover.color6,
  .project-button:hover.color7 {
    transform: none;
  }

  .project-button:hover::before {
    transform: none;
  }
}

/* Flexbox layout removes need for absolute positioning */

/* ========================================
   MODERN MODALS & OVERLAYS
   ======================================== */

.bio-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: transparent;
  backdrop-filter: blur(15px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  z-index: 8888;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-slow);
}

.bio-visible {
  opacity: 1;
  visibility: visible;
}

/* Close Button with X Icon */
.close-button {
  position: fixed;
  top: var(--space-xl);
  right: var(--space-xl);
  width: 48px;
  height: 48px;
  background: transparent;
  border: 2px solid var(--color-gray-700);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-base);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.8);
}

/* Project Navigation Arrows */
.project-nav-arrow {
  position: fixed;
  bottom: var(--space-xl);
  width: 48px;
  height: 48px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-base);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.8);
  outline: none;
}

.project-nav-arrow.nav-visible {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.project-nav-arrow.nav-left {
  left: var(--space-xl);
}

.project-nav-arrow.nav-right {
  right: var(--space-xl);
}

.project-nav-arrow:hover {
  transform: scale(1.1);
}

.project-nav-arrow::after {
  content: '';
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--color-gray-700);
  border-bottom: 2px solid var(--color-gray-700);
  transition: all var(--transition-base);
}

.project-nav-arrow.nav-left::after {
  transform: rotate(135deg);
}

.project-nav-arrow.nav-right::after {
  transform: rotate(-45deg);
}

.close-button-visible {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.close-button.close-button-visible:hover {
  background: var(--color-gray-700);
  transform: scale(1.3);
}

.close-button:hover::before,
.close-button:hover::after {
  background: #e7f5fb;
}

.close-button::before,
.close-button::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 2px;
  background: var(--color-gray-700);
  border-radius: 1px;
  transition: all var(--transition-base);
}

.close-button::before {
  transform: rotate(45deg);
}

.close-button::after {
  transform: rotate(-45deg);
}

/* ========================================
   ENHANCED CONTENT STYLES
   ======================================== */

.info-wrapper {
  max-width: 80%;
  padding: 0 var(--space-3xl) var(--space-3xl);
  color: var(--color-gray-700);
  text-align: left;
}

/* Bio List Styling */
.bio-list {
  list-style: none;
  padding: 0;
  margin: var(--space-xl) 0;
}

.bio-list li {
  padding: var(--space-lg) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: var(--text-base);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}

.bio-list li:last-child {
  border-bottom: none;
}

.bio-list p strong {
  font-weight: 400!important;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: white;
  display: block;
  margin-bottom: var(--space-xs);
}

.info-wrapper h2 {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 2.2rem;
  margin-bottom: var(--space-lg);
  color: var(--color-gray-700);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0;
}

.info-wrapper p {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: var(--text-base);
  line-height: 1.7;
  margin-bottom: var(--space-md);
  color: var(--color-gray-700);
}

 p a {
  color: #f25e5e;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: all var(--transition-base);
}

.info-wrapper a:hover {
  text-decoration-color: var(--color-accent);
}

.profil-img {
  width: 400px;
  height: 400px;
  border-radius: var(--radius-full);
  object-fit: cover;
  margin-bottom: var(--space-lg);
  transform: scale(0);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), 
              opacity 0.4s ease-out;
}

.bio-visible .profil-img {
  transform: scale(1);
  opacity: 1;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), 
              opacity 0.6s ease-in;
}

.contact-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
 
  min-height: 100vh;
}

.contact-heading {
  padding: var(--space-lg) 0;
  margin-bottom: var(--space-md);
}

.contact-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
  position: relative;
}

.contact-links::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--color-gray-700);
  border-bottom: 2px solid var(--color-gray-700);
}

.contact-link {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: var(--text-base);
  color: var(--color-gray-700);
  text-decoration: none!important;
  padding: var(--space-sm) var(--space-lg);
  border: 1px solid var(--color-gray-700);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  background: transparent;
}

.contact-link a,
.info-wrapper .contact-link a {
  color: var(--color-gray-700) !important;
  text-decoration: none !important;
}

.contact-link:hover {
  background: var(--color-gray-700);
  color: #e7f5fb;
  transform: translateY(-2px);
}

/* Bio Section Styling */
.bio-section {
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
}

.bio-section h2 {
  padding: var(--space-lg) 0;
  margin-bottom: var(--space-md);
}

/* Bio Entries Styling */
.bio-entries {
  margin: var(--space-lg) 0;
}

.bio-entry {
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--color-gray-700);
  margin-bottom: var(--space-md);
}

.bio-entry:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.bio-timespan {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: var(--text-sm);
  color: var(--color-gray-700);
  margin-bottom: var(--space-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.bio-position {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: var(--text-base);
  color: var(--color-gray-700);
  margin-bottom: var(--space-xs);
}

.bio-info {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-gray-700);
  margin: 0;
}

/* Awards Section Styling */
.awards-section {
  margin-top: var(--space-2xl);
  padding-bottom: 200px;
}

.awards-section h2 {
  padding: var(--space-lg) 0;
  margin-bottom: var(--space-md);
}

/* Awards Entries Styling */
.awards-entries {
  margin: var(--space-lg) 0;
}

.award-entry {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-gray-700);

  display: flex;
  align-items: baseline;
  gap: var(--space-lg);
}

.award-entry:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.award-year {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: var(--text-sm);
  color: var(--color-gray-700);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.award-title {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: var(--text-base);
  color: var(--color-gray-700);
  flex-shrink: 0;
}

.award-details {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-gray-700);
  font-style: italic;
  margin: 0;
}

/* Mobile Info Section */
@media (max-width: 767px) {
  .profil-img {
    width: 35vw;
    height: 35vw;
  }

  .bio-section {
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
  }

  .bio-section h2 {
    padding: var(--space-md) 0;
    margin-bottom: var(--space-sm);
  }

  .bio-entry {
    padding: var(--space-md) 0;
  }

  .awards-section {
    margin-top: var(--space-lg);
  }

  .awards-section h2 {
    padding: var(--space-md) 0;
    margin-bottom: var(--space-sm);
  }

  .award-entry {
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-md) 0;
  }
}

/* ========================================
   MODERN LINE ELEMENT
   ======================================== */

.line {
  display: none;
  position: fixed;
  bottom: 8%;
  left: 5%;
  right: 5%;
  height: 1px;
  background: var(--color-gray-700);
  transition: all var(--transition-slow);
  border-radius: 1px;
}

.line-hidden {
  bottom: -10px;
  opacity: 0;
  transition: all var(--transition-slow);
  transition-delay: 0.2s;
}

/* ========================================
   ENHANCED PROJECT MODALS
   ======================================== */

.project-show {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh; /* iOS Safari fix - accounts for browser UI */
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-slow);
  backdrop-filter: blur(15px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-visible {
  opacity: 1;
  visibility: visible;
}

.project-inner {
  width: 90%;
  max-width: 70vw;
  height: 90vh;
  max-height: none;
  display: flex;
  flex-direction: column;


  overflow: hidden;
}

.project-center {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
}

.main-carousel {
  width: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

.carousel-cell {
  width: 100%;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  padding: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.carousel-cell:last-child {
  border-bottom: none;
}

.project-scale {
  max-width: 100%;
  max-height: 100%;
}

.project-text {
  width: 100%;
  padding: 0;
  text-align: left;
  color: var(--color-gray-700);
  min-height: auto;
  display: block;
}

.project-text h1 {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 2.2rem;
  margin-bottom: var(--space-md);
  color: var(--color-gray-700);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.project-text p {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-gray-700);
  margin: 0;
  max-width: 800px;
}

/* Text slides styling */
.text-cell {
  min-height: auto;
  padding: 0;
}

.project-slide-text {
  text-align: left;
  color: var(--color-gray-700);
  width: 100%;
  margin: 0;
}

.project-slide-text h2 {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: var(--text-lg);
  margin-bottom: var(--space-md);
  color: var(--color-gray-700);
}

.project-slide-text p {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-gray-700);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
  .info-wrapper {
    padding: 0;
  }

  .close-button {
    top: var(--space-lg);
    right: var(--space-lg);
  }

  .project-inner {
    width: 95%;
    max-width: 93vw;
    height: 95vh;
  }
  
  .project-text {
    padding: 0;
  }
  
  .carousel-cell {
    padding: var(--space-lg);
    min-height: 50vh;
  }

  .main-carousel {
    padding-bottom: 100px;
  }

  /* Mobile project modal - smooth scrolling layout */
  .project-show {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-content: flex-start;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 0px 20px 40px;
  }

  .project-inner {
    flex: 0 0 100%;
    width: 100%;
    height: auto;
    max-height: none;
    overflow: visible;
    order: 1;
    margin-top: 20px;
  }

  .project-text h1 {
    font-size: 1.8rem;
  }

  .project-center {
    overflow: visible;
    height: auto;
  }

  /* Close button sticky at top right - works inside scroll container */
  .close-button {
    position: sticky;
    top: var(--space-lg);
    order: 0;
    margin-left: auto;
    margin-right: 0;
    margin-bottom: -48px;
    z-index: 100;
    right: 0px !important;
  }

  /* Nav buttons - side by side at bottom, justified to edges */
  .project-nav-arrow {
    position: static;
    order: 2;
    margin-top: 20px;
    margin-bottom: 20px;
  }

  .project-nav-arrow.nav-left,
  .project-nav-arrow.nav-right {
    left: auto;
    right: auto;
  }
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for keyboard navigation */
button:focus,
.close-button:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Remove focus outline from project buttons and nav */
.project-button:focus,
.project-nav-arrow:focus,
nav li:focus {
  outline: none;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --color-gray-600: #000000;
    --color-gray-700: #000000;
    --color-gray-800: #000000;
    --color-gray-900: #000000;
  }
}

/* Vertical project layout - no Flickity needed */

/* Project Modal - Transparent like Info modal */
.project-show[class*="project-color"] {
  background: transparent;
}

/* Video embed styling */
.carousel-cell iframe {
  border-radius: var(--radius-md);
}

.project-scale iframe {
  border-radius: var(--radius-md);
}

/* Ensure video containers maintain aspect ratio */
.carousel-cell .project-scale {
  width: 100%;
  margin: 0 auto;

} 

.carousel-cell img {
border-radius: 20px;
}

/* ============================================
   Content Blocks in Carousel
   ============================================ */

/* Block container styling */
.carousel-cell .block {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* Text block styling in carousel */
.carousel-cell .block-type-text {
  max-width: 800px;
  padding: 2rem;
  margin: 0 auto;
}

.carousel-cell .block-type-text h2 {
  font-family: var(--font-body);
  font-size: var(--text-2xl);
  margin-bottom: 1rem;
  color: inherit;
}

.carousel-cell .block-type-text p {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: inherit;
}

/* Image block styling in carousel */
.carousel-cell .block-type-image {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-cell .block-type-image img {
  max-height: 80vh;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: 20px;
}

/* Video block styling in carousel */
.carousel-cell .block-type-video {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.carousel-cell .block-type-video .video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.carousel-cell .block-type-video .video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-md);
}

/* Gallery block in carousel */
.carousel-cell .block-type-gallery {
  width: 100%;
  padding: 1rem;
}

/* Override block spacing inside carousel */
.carousel-cell .block-type-text,
.carousel-cell .block-type-image,
.carousel-cell .block-type-video {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}