:root {
  --black: #050505;
  --matte-black: #1a1a1a;
  --gold: #bd891c;
  --gold-bright: #eba717;
  --slate: #2c2c2c;
  --text-gray: #a0a0a0;
  --white: #ffffff;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--black);
  color: var(--white);
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--black);
}
::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 10px;
}

/* --- Navigation --- */
nav {
  position: fixed;
  width: 100%;
  height: 80px;
  padding: 0 10%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

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

.nav-logo {
  height: 50px;
  width: auto;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-gray);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: 0.3s;
}

.nav-links a:hover {
  color: var(--gold);
}

/* --- Hamburger Menu --- */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
}

.bar {
  width: 25px;
  height: 2px;
  background-color: var(--gold);
  transition: 0.3s;
}

/* --- Hero Section --- */
#home {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 10%;
  background: radial-gradient(circle at center, #1a1a1a 0%, #050505 100%);
}

.hero-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(3rem, 8vw, 5rem);
  color: var(--gold-bright);
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--gold);
  display: inline-block;
  padding-bottom: 10px;
}

.hero-sub {
  color: var(--text-gray);
  max-width: 600px;
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  border: 1px solid var(--gold);
  color: var(--gold);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
  transition: all 0.3s ease;
  background: transparent;
  cursor: pointer;
}

.btn:hover {
  background: var(--gold);
  color: var(--black);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

/* --- Sections General --- */
section {
  padding: 100px 10%;
  scroll-margin-top: 80px;
}

h2 {
  font-family: "Playfair Display", serif;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--gold);
}

/* --- Portfolio Grid & Dropdowns --- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  align-items: start;
}

.project-card {
  background: var(--matte-black);
  border: 1px solid var(--slate);
  padding: 2rem;
  cursor: pointer;
  overflow: visible;
  /* Optimized transitions to prevent clunkiness */
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  border-color: var(--gold);
  transform: translateY(-5px);
}

/* Keep card raised while active */
.project-card.active {
  transform: translateY(-5px);
  border-color: var(--gold);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.expand-icon {
  color: var(--gold);
  font-size: 1.5rem;
  transition: transform 0.4s ease;
}

.tag {
  font-size: 0.7rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --- THE DROPDOWN FIX --- */
.project-details {
  max-height: 0;
  overflow: hidden;
  /* This cubic-bezier creates a much smoother entrance/exit */
  transition: max-height 0.4s cubic-bezier(0, 1, 0, 1);
}

.project-card.active .project-details {
  /* Set closer to real content height to avoid 'dead timing' */
  max-height: 2500px;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--slate);
  /* Use a standard ease for the expansion */
  transition: max-height 0.8s ease-in-out;
}

.project-card.active .expand-icon {
  transform: rotate(45deg);
}

.project-details ul {
  list-style: none;
  margin-bottom: 1.5rem;
}

.project-details li {
  color: var(--text-gray);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  padding-left: 1.2rem;
  position: relative;
}

.project-details li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--gold);
}

/* --- Dropdown Media Support --- */
.project-media {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dropdown-img {
  width: 100%;
  height: auto;
  /* Pre-define aspect ratio to prevent layout shifting/clunk */
  /* aspect-ratio: 16 / 9; */
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--slate);
  background-color: var(--black);
  margin-bottom: 1rem;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  border-radius: 4px;
  background-color: var(--black);
}

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

/* --- Carousel Layout --- */
.carousel-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  margin-top: 1rem;
}

.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory; /* Makes the snap effect work */
  scroll-behavior: smooth;
  gap: 10px;
  padding-bottom: 10px; /* Space for the scrollbar */
  scrollbar-width: thin; /* For Firefox */
  scrollbar-color: var(--gold) transparent;
}

/* Hide scrollbar for Chrome/Safari for a cleaner look */
.carousel-track::-webkit-scrollbar {
  height: 4px;
}
.carousel-track::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 10px;
}

.carousel-slide {
  flex: 0 0 100%; /* Each slide takes up 100% of the card width */
  scroll-snap-align: center;
}

.carousel-hint {
  text-align: right;
  font-size: 0.7rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 5px;
  opacity: 0.7;
}

/* --- About Section --- */
.about-container {
  display: flex;
  align-items: center;
  gap: 4rem;
  max-width: 1100px;
  margin: 0 auto;
}

.about-content {
  flex: 1;
}

/* ADD THIS PART BELOW TO FIX THE SPACING */
.about-content p {
  color: var(--text-gray);
  margin-bottom: 1.5rem; /* This creates the gap between paragraphs */
  display: block;
}

.about-content p:last-of-type {
  margin-bottom: 2rem; /* Adds extra breathing room before the stats start */
}
/* END OF FIX */

.about-image {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}



.about-image {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.about-image img {
  width: 100%;
  max-width: 400px;
  height: auto;
  filter: drop-shadow(-10px 0 30px rgba(189, 137, 28, 0.15));
}

.about-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}

.stat-item {
  border-left: 2px solid var(--gold);
  padding-left: 1rem;
}

.stat-item strong {
  display: block;
  color: var(--gold);
}

/* --- Contact Form --- */
.contact-container {
  max-width: 700px;
  margin: 0 auto;
  background: var(--matte-black);
  padding: 3rem;
  border-top: 4px solid var(--gold);
}

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-gray);
}

input,
textarea {
  width: 100%;
  padding: 1rem;
  background: var(--black);
  border: 1px solid var(--slate);
  color: white;
  font-family: inherit;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.submit-btn {
  width: 100%;
  background: transparent;
}

/* --- Footer --- */
footer {
  text-align: center;
  padding: 4rem 10%;
  color: var(--text-gray);
  font-size: 0.8rem;
  border-top: 1px solid var(--slate);
}

/* --- Mobile Adjustments --- */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
    z-index: 1001;
  }

  .nav-links {
    position: fixed;
    right: -100%;
    top: 0;
    width: 75%;
    height: 100vh;
    background: var(--matte-black);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: 0.4s ease-in-out;
    border-left: 1px solid var(--gold);
  }

  .nav-links.active {
    right: 0;
  }

  /* Hamburger to X */
  .menu-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  section {
    padding: 60px 5%;
  }

  .about-container {
    flex-direction: column-reverse;
    text-align: center;
  }

  .about-image {
    justify-content: center;
  }

  .about-stats {
    justify-content: center;
  }
}
