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

:root {
  --primary: #00f2ea;
  --primary-dark: #00c4bd;
  --accent-pink: #ff64c8;
  --accent-purple: #a855f7;
  --background: #101015;
  --foreground: #ffffff;
  --muted: #6b7280;
  --card: #1a1a24;
  --border: #2a2a3a;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Animated Background Canvas */
#backgroundCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.5;
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow: hidden;
}

/* Floating Orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  animation: float 6s ease-in-out infinite;
}

.orb-1 {
  width: 384px;
  height: 384px;
  background: rgba(0, 242, 234, 0.2);
  left: 25%;
  top: 25%;
}

.orb-2 {
  width: 320px;
  height: 320px;
  background: rgba(255, 100, 200, 0.2);
  right: 25%;
  top: 33%;
  animation: float 8s ease-in-out infinite reverse;
}

.orb-3 {
  width: 288px;
  height: 288px;
  background: rgba(168, 85, 247, 0.15);
  bottom: 25%;
  left: 33%;
  animation: float 10s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Hero Content */
.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  opacity: 0;
  transform: translateY(40px);
  animation: fadeInUp 1s ease-out forwards;
  margin-bottom: 3rem; /* Add space between content and scroll indicator */
}

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

/* Profile Frame */
.profile-frame-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 3rem;
}

.profile-border-ring {
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  background: linear-gradient(to right, var(--primary), var(--accent-pink), var(--primary));
  opacity: 0.75;
  filter: blur(16px);
  animation: spin 8s linear infinite;
}

.profile-border-pulse {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: linear-gradient(to right, rgba(0, 242, 234, 0.5), rgba(255, 100, 200, 0.5));
  filter: blur(12px);
  animation: pulse 2s ease-in-out infinite;
}

.profile-frame {
  position: relative;
  width: 256px;
  height: 256px;
  border-radius: 50%;
  border: 4px solid rgba(0, 242, 234, 0.3);
  background: linear-gradient(to bottom right, rgba(0, 242, 234, 0.1), rgba(255, 100, 200, 0.1));
  padding: 4px;
  box-shadow: 0 25px 50px -12px rgba(0, 242, 234, 0.5);
  transition: all 0.5s ease;
}

.profile-frame:hover {
  transform: scale(1.05);
  border-color: rgba(0, 242, 234, 0.6);
  box-shadow: 0 25px 50px -12px rgba(0, 242, 234, 0.7);
}

.profile-inner-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(to bottom right, rgba(0, 242, 234, 0.2), transparent, rgba(255, 100, 200, 0.2));
}

.profile-image-container {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(0, 242, 234, 0.2);
  overflow: hidden;
}

.profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.7s ease;
}

.profile-frame:hover .profile-image {
  transform: scale(1.1);
}

.profile-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 242, 234, 0.3), transparent);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.profile-frame:hover .profile-overlay {
  opacity: 1;
}

/* Corner Accents */
.corner-accent {
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: var(--primary);
  opacity: 0.6;
}

.corner-tl {
  top: 8px;
  left: 8px;
  border-left: 2px solid;
  border-top: 2px solid;
}
.corner-tr {
  top: 8px;
  right: 8px;
  border-right: 2px solid;
  border-top: 2px solid;
}
.corner-bl {
  bottom: 8px;
  left: 8px;
  border-left: 2px solid;
  border-bottom: 2px solid;
}
.corner-br {
  bottom: 8px;
  right: 8px;
  border-right: 2px solid;
  border-bottom: 2px solid;
}

/* Floating Particles */
.floating-particle {
  position: absolute;
  border-radius: 50%;
  animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.particle-1 {
  width: 8px;
  height: 8px;
  background: var(--primary);
  left: -32px;
  top: 25%;
}

.particle-2 {
  width: 6px;
  height: 6px;
  background: var(--accent-pink);
  right: -24px;
  top: 33%;
  animation-duration: 2s;
}

.particle-3 {
  width: 4px;
  height: 4px;
  background: var(--primary);
  bottom: -16px;
  left: 25%;
  animation-duration: 3s;
}

@keyframes ping {
  75%,
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Hero Title */
.hero-title {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  animation-delay: 0.2s;
}

.glitch-text {
  position: relative;
  display: inline-block;
}

.glitch-text:hover::before,
.glitch-text:hover::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch-text:hover::before {
  color: var(--primary);
  transform: translate(-2px, -2px);
  mix-blend-mode: screen;
  animation: glitch 0.3s infinite;
}

.glitch-text:hover::after {
  color: var(--accent-pink);
  transform: translate(2px, 2px);
  mix-blend-mode: screen;
  animation: glitch 0.3s infinite reverse;
}

@keyframes glitch {
  0% {
    transform: translate(-2px, -2px);
  }
  25% {
    transform: translate(2px, 2px);
  }
  50% {
    transform: translate(-2px, 2px);
  }
  75% {
    transform: translate(2px, -2px);
  }
  100% {
    transform: translate(-2px, -2px);
  }
}

/* Hero Subtitle */
.hero-subtitle {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 500;
  background: linear-gradient(to right, var(--primary), var(--accent-pink), var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.5rem;
  animation-delay: 0.4s;
}

/* Hero Description */
.hero-description {
  max-width: 42rem;
  margin: 0 auto 2.5rem;
  font-size: clamp(1.125rem, 2vw, 1.25rem);
  color: var(--muted);
  line-height: 1.6;
  animation-delay: 0.6s;
}

/* CTA Buttons Container */
.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  animation-delay: 0.8s;
}

/* CTA Button */
.cta-button {
  position: relative;
  display: inline-block;
  padding: 1.5rem 2rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--foreground);
  background: rgba(26, 26, 36, 0.5);
  backdrop-filter: blur(8px);
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  z-index: 1;
  overflow: hidden; /* To keep the blurry background contained */
}

/* Pseudo-element for the gradient border */
.cta-button::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  padding: 2px; /* Border thickness */
  background: linear-gradient(to bottom, var(--accent-pink), var(--primary));
  -webkit-mask:
     linear-gradient(#fff 0 0) content-box,
     linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  z-index: -1;
  transition: all 0.3s ease;
}

.cta-button:hover {
  transform: scale(1.05);
}

.cta-button:hover::before {
    filter: brightness(1.2);
}

/* Secondary CTA Button Style */
.cta-button.secondary::before {
  background: linear-gradient(to bottom, var(--primary), var(--accent-pink));
}

/* Hide the old shine effect */
.button-shine {
    display: none;
}

.button-text {
  position: relative;
  z-index: 1;
}


/* Scroll Indicator */
.scroll-indicator {
  /* Removed absolute positioning to make it part of the flex flow */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  animation: bounce 2s infinite;
}

.scroll-mouse {
  width: 24px;
  height: 48px;
  border: 2px solid rgba(0, 242, 234, 0.5);
  border-radius: 12px;
  position: relative;
}

.scroll-wheel {
  width: 4px;
  height: 8px;
  background: var(--primary);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: pulse 2s infinite;
}

.scroll-text {
  font-size: 0.75rem;
  color: var(--muted);
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Portfolio Section */
.portfolio-section {
  position: relative;
  padding: 6rem 1.5rem;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  position: relative;
  display: inline-block;
  font-size: clamp(3rem, 6vw, 4rem);
  font-weight: 700;
  margin-bottom: 1rem;

  /* --- NEW ANIMATED GRADIENT EFFECT --- */
  /* 1. Create the gradient background */
  background: linear-gradient(
    to right, 
    var(--primary), 
    var(--accent-pink), 
    var(--primary)
  );
  
  /* 2. Make the background bigger than the element */
  background-size: 200% auto;

  /* 3. Clip the background to the text */
  -webkit-background-clip: text;
  background-clip: text;

  /* 4. Make the text transparent to show the gradient */
  color: transparent;
  -webkit-text-fill-color: transparent;

  /* 5. Apply the animation */
  animation: textGradientShift 4s ease-in-out infinite;
}

.title-underline {
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  height: 4px;
  overflow: hidden;
}

.title-underline::after {
  content: "";
  position: absolute;
  width: 33.333%;
  height: 100%;
  background: linear-gradient(to right, var(--primary), var(--accent-pink), var(--primary));
  animation: slideRight 2s ease-in-out infinite;
}

/* NEW Keyframes for the text gradient animation */
@keyframes textGradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes slideRight {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(300%);
  }
}

/* Portfolio Grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.portfolio-card {
  position: relative;
  background: rgba(26, 26, 36, 0.3);
  border: 1px solid rgba(42, 42, 58, 0.5);
  border-radius: 0.5rem;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.5s ease;
  opacity: 0;
  transform: translateY(80px);
  backdrop-filter: blur(8px);
}

.portfolio-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.portfolio-card:hover {
  transform: scale(1.05);
  border-color: rgba(0, 242, 234, 0.5);
  box-shadow: 0 25px 50px -12px rgba(0, 242, 234, 0.2);
}

/* Card Corner Accents */
.card-corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: var(--primary);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 10;
  pointer-events: none;
}

.portfolio-card:hover .card-corner {
  opacity: 1;
}

.card-corner-tl {
  top: 8px;
  left: 8px;
  border-left: 2px solid;
  border-top: 2px solid;
}
.card-corner-tr {
  top: 8px;
  right: 8px;
  border-right: 2px solid;
  border-top: 2px solid;
}
.card-corner-bl {
  bottom: 8px;
  left: 8px;
  border-left: 2px solid;
  border-bottom: 2px solid;
}
.card-corner-br {
  bottom: 8px;
  right: 8px;
  border-right: 2px solid;
  border-bottom: 2px solid;
}

/* Card Border Animation */
.card-border-animation {
  position: absolute;
  inset: -1px;
  background: linear-gradient(to right, var(--primary), var(--accent-pink), var(--primary));
  border-radius: 0.5rem;
  opacity: 0;
  filter: blur(4px);
  animation: spin 8s linear infinite;
  z-index: -1;
  transition: opacity 0.5s ease;
}

.portfolio-card:hover .card-border-animation {
  opacity: 1;
}

/* Card Image */
.card-image-wrapper {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
}

.card-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(16, 16, 21, 0.8), transparent);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 10;
}

.portfolio-card:hover .card-gradient-overlay {
  opacity: 1;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.7s ease;
}

.portfolio-card:hover .card-image {
  transform: scale(1.1);
  filter: brightness(1.1);
}

/* Play Button */
.play-button {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 20;
}

.portfolio-card:hover .play-button {
  opacity: 1;
}

.play-button-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: rgba(0, 242, 234, 0.2);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.portfolio-card:hover .play-button-circle {
  transform: scale(1.1);
}

.play-icon {
  width: 32px;
  height: 32px;
  color: var(--primary);
  margin-left: 4px;
}

/* Card Info */
.card-info {
  position: relative;
  padding: 1rem;
}

.card-info-line {
  position: absolute;
  top: 0;
  left: 1rem;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, var(--primary), var(--accent-pink));
  transition: width 0.5s ease;
}

.portfolio-card:hover .card-info-line {
  width: 48px;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  transition: color 0.3s ease;
}

.portfolio-card:hover .card-title {
  color: var(--primary);
}

.card-client {
  font-size: 0.75rem;
  color: var(--muted);
}

/* View More Button */
.view-more-container {
  display: flex;
  justify-content: center;
  margin-top: 4rem;
}

.view-more-btn {
  position: relative;
  /* FIX: Restoring intended style for the button */
  padding: 1rem 2rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(26, 26, 36, 0.5); /* FIX: Dark, semi-transparent background */
  border: 2px solid var(--primary);
  border-radius: 0.5rem;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px); /* FIX: Blur effect */
}

.view-more-btn:hover {
  background: var(--primary);
  color: var(--background);
  box-shadow: 0 10px 25px -5px rgba(0, 242, 234, 0.5);
}

.btn-text {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-arrow {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.view-more-btn:hover .btn-arrow {
  transform: translateY(4px);
}

.btn-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--primary), var(--accent-pink), var(--primary));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.view-more-btn:hover .btn-gradient {
  opacity: 0.2;
}

/* Contact Section */
.contact-section {
  position: relative;
  padding: 6rem 1.5rem;
  text-align: center;
}

.contact-description {
  font-size: 1.25rem;
  color: var(--muted);
  margin-bottom: 3rem;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

.contact-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--foreground);
  transition: all 0.3s ease;
}

.contact-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid rgba(0, 242, 234, 0.3);
  background: rgba(26, 26, 36, 0.5);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.contact-link:hover .contact-icon {
  transform: scale(1.1);
  border-color: var(--primary);
  background: rgba(0, 242, 234, 0.1);
}

.icon {
  width: 32px;
  height: 32px;
}

.contact-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.3s ease;
}

.contact-link:hover .contact-label {
  color: var(--foreground);
}

/* Contact Link Colors */
.gmail-link:hover {
  color: #ea4335;
}
.whatsapp-link:hover {
  color: #25d366;
}
.discord-link:hover {
  color: #5865f2;
}
.linkedin-link:hover {
  color: #0a66c2;
}

/* Video Modal */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(16, 16, 21, 0.95);
  backdrop-filter: blur(12px);
}

.video-modal.active {
  display: flex;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-overlay {
  position: absolute;
  inset: 0;
  cursor: pointer;
}

.modal-content {
  position: relative;
  width: 90%;
  /* FIX 1: Change max-width for portrait */
  max-width: 450px;
  /* FIX 1: Add max-height to prevent overflow on smaller screens */
  max-height: 90vh;
  margin: 1rem;
  animation: scaleIn 0.3s ease-out;
  /* FIX 1: Add flex properties to manage portrait layout */
  display: flex;
  flex-direction: column;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.close-button {
  position: absolute;
  top: -16px;
  right: -16px;
  z-index: 10;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: rgba(16, 16, 21, 0.8);
  backdrop-filter: blur(8px);
  color: var(--primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.close-button:hover {
  transform: scale(1.1);
  background: var(--primary);
  color: var(--background);
  box-shadow: 0 10px 25px -5px rgba(0, 242, 234, 0.5);
}

.close-icon {
  width: 24px;
  height: 24px;
}

.modal-video-container {
  position: relative;
  background: rgba(26, 26, 36, 0.3);
  border: 2px solid rgba(0, 242, 234, 0.5);
  border-radius: 0.5rem;
  padding: 0.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 242, 234, 0.2);
  backdrop-filter: blur(8px);
  /* FIX 1: Add flex properties to manage portrait layout */
  display: flex;
  flex-direction: column;
  height: 100%;
}

.modal-border-animation {
  position: absolute;
  inset: -2px;
  background: linear-gradient(to right, var(--primary), var(--accent-pink), var(--primary));
  border-radius: 0.5rem;
  opacity: 0.5;
  filter: blur(4px);
  animation: spin 8s linear infinite;
  z-index: -1;
}

.modal-corner {
  position: absolute;
  width: 32px;
  height: 32px;
  border-color: var(--primary);
  z-index: 10;
}

.modal-corner-tl {
  top: 16px;
  left: 16px;
  border-left: 2px solid;
  border-top: 2px solid;
}
.modal-corner-tr {
  top: 16px;
  right: 16px;
  border-right: 2px solid;
  border-top: 2px solid;
}
.modal-corner-bl {
  bottom: 16px;
  left: 16px;
  border-left: 2px solid;
  border-bottom: 2px solid;
}
.modal-corner-br {
  bottom: 16px;
  right: 16px;
  border-right: 2px solid;
  border-bottom: 2px solid;
}

.video-wrapper {
  position: relative;
  /* FIX 1: Change aspect ratio to 9/16 per user request */
  aspect-ratio: 9 / 16;
  background: var(--background);
  border-radius: 0.375rem;
  overflow: hidden;
  /* FIX 1: Ensure it scales correctly */
  width: 100%;
}

#videoIframe {
  width: 100%;
  height: 100%;
  border: none;
}

.video-info {
  margin-top: 1rem;
  padding: 0 0.5rem 0.5rem;
}

.info-line {
  width: 64px;
  height: 2px;
  background: linear-gradient(to right, var(--primary), var(--accent-pink));
  margin-bottom: 0.75rem;
}

.video-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.video-client {
  font-size: 0.875rem;
  color: var(--muted);
}

/* Floating WhatsApp Icon */
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 25px;
  right: 25px;
  background-color: #25d366;
  color: #FFF;
  border-radius: 50%;
  text-align: center;
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.whatsapp-float:hover {
  transform: scale(1.1) translateY(-5px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.4);
}

.whatsapp-icon {
  width: 32px;
  height: 32px;
}


/* Responsive Design */
@media (max-width: 768px) {
  .profile-frame {
    width: 192px;
    height: 192px;
  }

  .portfolio-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
  }

  .contact-links {
    gap: 1.5rem;
  }

  .contact-icon {
    width: 64px;
    height: 64px;
  }

  .icon {
    width: 24px;
    height: 24px;
  }

  /* FIX 3: Mobile Modal Adjustments */
  .modal-content {
    /* FIX 1: Adjusted width and max-width for new portrait layout */
    width: 90%; 
    max-width: 450px;
    margin: 0.5rem;
  }

  /* FIX 3: Move the close button inside the modal content boundary */
  .close-button {
    top: 0px; /* Adjust vertical position */
    right: 0px; /* Adjust horizontal position */
    transform: translate(50%, -50%); /* Use translate to position it at the top-right edge */
    width: 40px; /* Slightly smaller button */
    height: 40px;
    z-index: 60;
  }

  .close-button .close-icon {
      width: 20px;
      height: 20px;
  }

  .video-title {
      font-size: 1.125rem;
  }
}

@media (max-width: 480px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}