:root {
  --bg-color: #e3ded6;
  --text-color: white;
  --accent-color: #E69DBE;
  --secondary-bg: #d9d4cc;
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Montserrat', sans-serif;
  --transition-smooth: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: 0.02em;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-smooth);
}

ul {
  list-style: none;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  background: rgba(227, 222, 214, 0.85);
  backdrop-filter: blur(10px);
  transition: var(--transition-smooth);
}

.nav-logo img {
  height: 40px;
  width: auto;
}

nav ul {
  display: flex;
  gap: 2.5rem;
}

nav ul li a {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-color);
  opacity: 0.8;
  padding: 0.5rem 0;
}

nav ul li a:hover {
  opacity: 1;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--accent-color);
  transition: var(--transition-smooth);
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 1rem;
}

.hero h1 {
  font-size: clamp(3rem, 10vw, 6rem);
  line-height: 1;
  margin-bottom: 1rem;
}

.hero h1 span {
  font-style: italic;
}

.hero p {
  font-size: 1.1rem;
  letter-spacing: 0.2rem;
  text-transform: uppercase;
  font-weight: 400;
  color: white;
}

.hero-btns {
  display: flex;
  gap: 1.5rem;
  margin-top: 4rem;
}

.btn {
  padding: 1rem 2.5rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  border-radius: 100px;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  cursor: pointer;
}

.btn-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.btn-primary {
  background: var(--accent-color);
  color: #fff;
  border: 1px solid var(--accent-color);
}

.btn-primary:hover {
  background: transparent;
  color: var(--accent-color);
  transform: translateY(-5px);
}

.btn-secondary {
  background: transparent;
  color: var(--accent-color);
  border: 1px solid var(--accent-color);
}

.btn-secondary:hover {
  background: var(--accent-color);
  color: #fff;
  transform: translateY(-5px);
}

@media (max-width: 768px) {
  .hero {
    padding-top: 8rem;
    justify-content: center;
  }

  .hero h1 {
    font-size: clamp(2.5rem, 12vw, 4rem);
    margin: 1rem 0;
  }

  .hero p {
    font-size: 0.9rem;
  }

  .hero-btns {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    align-items: center;
  }

  .btn {
    width: 80%;
    text-align: center;
  }
}

section {
  padding: 8rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: 3rem;
  margin-bottom: 4rem;
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-image-container {
  display: flex;
  justify-content: center;
}

.about-image {
  width: 100%;
  max-width: 400px;
  height: 600px;
  background-size: cover;
  background-position: center;
  border-radius: 200px 200px 0 0;
  /* Arched top */
  box-shadow: 20px 20px 0 var(--secondary-bg);
}

.about-text h2 {
  font-size: 3.5rem;
  margin-bottom: 2rem;
}

.sparkle {
  display: block;
  width: 30px;
  height: 30px;
  margin: 3rem auto 2rem auto;
  fill: var(--accent-color);
}

/* Portfolio Section */
.portfolio-tabs {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 3rem;
}

.portfolio-tab {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0.5;
}

.portfolio-tab.active {
  opacity: 1;
  text-decoration: underline;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.portfolio-item {
  animation: fadeIn 0.5s ease forwards;
}

.video-card {
  width: 100%;
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  transition: var(--transition-smooth);
  cursor: pointer;
  position: relative;
  background: #000;
}

.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 5;
  transition: var(--transition-smooth);
  pointer-events: none;
}

.play-overlay::after {
  content: '';
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 15px solid white;
  margin-left: 5px;
}

/* Hide play button when video is playing */
.video-card.playing .play-overlay {
  opacity: 0;
  transform: translate(-50%, -50%) scale(1.2);
}

/* Phone Frame */
.phone-frame {
  position: relative;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  aspect-ratio: 9/19;
  background: #000;
  border: 12px solid #1a1a1a;
  border-radius: 45px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  padding: 8px;
  /* Inner bezel */
}

/* Notch / Dynamic Island */
.phone-frame::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 22px;
  background: #000;
  border-radius: 20px;
  z-index: 10;
}

/* Side Buttons */
.phone-frame::after {
  content: '';
  position: absolute;
  left: -14px;
  top: 100px;
  width: 3px;
  height: 40px;
  background: #1a1a1a;
  border-radius: 2px 0 0 2px;
  box-shadow: 0 50px 0 #1a1a1a, 0 100px 0 #1a1a1a;
  /* Volume and power simulations */
}

.portfolio-item:hover .phone-frame {
  transform: translateY(-10px) scale(1.02);
  transition: var(--transition-smooth);
}

/* Clients Section */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.client-box {
  background: var(--secondary-bg);
  padding: 2rem;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  transition: var(--transition-smooth);
}

.client-box:hover {
  background: #ccc7be;
}

.client-logo {
  max-width: 100%;
  max-height: 60px;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(20%) sepia(11%) font-family(var(--accent-color));
  /* Force accent color if possible, or just use original if colored */
}

/* For white logos on dark background if needed */
.client-logo.white {
  filter: brightness(0) invert(1);
}

/* Contact Footer */
footer {
  padding: 8rem 2rem;
  text-align: center;
  background: var(--bg-color);
}

.contact-title {
  font-size: 6rem;
  margin-bottom: 3rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-link {
  font-size: 1.5rem;
  font-family: var(--font-serif);
  border-bottom: 1px solid transparent;
  width: fit-content;
  margin: 0 auto;
}

.contact-link:hover {
  border-bottom: 1px solid var(--text-color);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

.reveal {
  animation: fadeIn 1s forwards;
}

@media (max-width: 768px) {
  nav {
    padding: 1.2rem 1.5rem;
  }

  .menu-toggle {
    display: flex;
  }

  nav ul {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--bg-color);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    transition: var(--transition-smooth);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
  }

  nav ul.active {
    right: 0;
  }

  nav ul li a {
    font-size: 1.2rem;
  }

  /* Hamburger Animation */
  .menu-toggle.active span:nth-child(1) {
    transform: translateY(9.5px) rotate(45deg);
  }

  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.active span:nth-child(3) {
    transform: translateY(-9.5px) rotate(-45deg);
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-image {
    height: 400px;
    border-radius: 150px 150px 0 0;
  }

  .section-title {
    font-size: 2.5rem;
  }

  .about-text h2 {
    font-size: 2.5rem;
  }

  .contact-title {
    font-size: 3.5rem;
  }

  /* Portfolio adjustments for tablets and mobiles */
  .portfolio-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
  }

  .phone-frame {
    max-width: 280px;
  }
}

/* Additional mobile adjustments for small screens */
@media (max-width: 480px) {
  .portfolio-grid {
    grid-template-columns: 1fr; /* Single column on very small screens */
    gap: 2rem; /* Increased spacing between phone dummies */
  }

  .phone-frame {
    max-width: 100%;
    height: 80vh; /* Increased height for phone dummies */
    aspect-ratio: unset; /* Remove aspect ratio for fixed height */
  }

  .section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
  }

  .portfolio-tabs {
    gap: 1rem;
    margin-bottom: 2rem;
  }

  .portfolio-tab {
    font-size: 1.2rem;
  }
}
