:root {
  --bg: #121212;
  /* Dark background */
  --fg: #e0e0e0;
  /* Light text */
  --accent: #909090;
  /* Keep gold or go slightly brighter */
  --muted: #a0a0a0;
  /* Light grey for subtext */
  --card: #1e1e1e;
  /* Slightly lighter than bg for cards */
  --overlay: rgba(0, 0, 0, 0.6);
  --maxw: 1200px;
  --radius: 12px;
  --transition: 0.35s ease;
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "Poppins", sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
  scroll-behavior: smooth;
}
img {
  display: block;
  max-width: 100%;
}
a {
  text-decoration: none;
  color: inherit;
}
button {
  cursor: pointer;
  font-family: "Poppins", sans-serif;
}
/* ===== HEADER ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: padding 0.3s ease, background 0.3s ease;
}
header.scrolled {
  padding: 8px 20px;
}
header .container {
  max-width: var(--maxw);
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
}
.brand img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--fg);
  transition: transform 0.3s ease;
}
nav ul {
  display: flex;
  gap: 16px;
  list-style: none;
  font-weight: 600;
}
nav ul li a {
  padding: 6px 10px;
  border-radius: var(--radius);
  transition: background var(--transition);
}
nav ul li a:hover,
.active {
  background: var(--card);
}
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}
.hamburger div {
  width: 28px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
}
/* Mobile menu */
@media (max-width: 880px) {
  /* 2. Force the list to be hidden and positioned correctly */
  #navList {
    display: none;        /* This is the functionality: hide it! */
    position: absolute;
    top: 100%;           /* Places it right under the header */
    right: 0;
    width: 250px;
    background: var(--card);
    backdrop-filter: blur(15px);
    flex-direction: column;
    padding: 20px;
    border-radius: 0 0 0 12px;
    border: 1px solid rgba(255,255,255,0.1);
    z-index: 9999;       /* Ensure it's above all other content */
  }

  /* 3. This is the functionality: show it only when active */
  #navList.open {
    display: flex !important; 
    background-color: #000;
  }

  /* 4. Fix the hamburger visibility */
  .hamburger {
    display: flex !important;
    flex-direction: column;
    gap: 5px;
    z-index: 10000;
  }
}
/* ===== HERO ===== */
.hero {
  height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;

  background: linear-gradient(
      rgba(0, 0, 0, 0.6),
      rgba(0, 0, 0, 0.6)
    ),
    url("../imgs/project3.jpg");

  background-size: cover;
  background-position: center;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 64px);
  margin-bottom: 12px;
}
.hero p {
  font-size: 20px;
}

/* ===== PROJECTS GRID ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

.project-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transition: transform var(--transition), box-shadow var(--transition);
}
.project-card:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
}

.project-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-card.playing::after {
  content: "";
}
.project-card.paused::after {
  content: "⏸"; /* Or use '▶' for play */
  position: absolute;
  font-size: 48px;
  color: var(--accent);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.8;
}

.project-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    to top,
    rgba(255, 255, 255, 0.95),
    rgba(255, 255, 255, 0)
  );
  padding: 16px;
  color: var(--fg);
  transition: all 0.3s ease;
}
.project-overlay h2 {
  font-size: 1.5rem;
  margin-bottom: 4px;
  color: var(--accent);
}
.project-overlay p {
  font-size: 1rem;
  color: var(--fg);
}

/* Play icon overlay */
.project-card::after {
  content: "▶";
  position: absolute;
  font-size: 48px;
  color: var(--accent);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.project-card:hover::after {
  opacity: 0.8;
}

.sound-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.8);
  color: #111;
  padding: 6px 10px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  transition: transform 0.2s ease;
}
.sound-toggle:hover {
  transform: scale(1.2);
}

header {
  background-color: #000; /* black background */
  color: white;
  padding: 15px 0;
  transition: background-color 0.5s ease; /* smooth change */
}

header:hover {
  background-color: #222; /* lighter black on hover */
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: auto;
  padding: 0 20px;
}

.brand h1 {
  font-family: "Poppins", sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: white;
  letter-spacing: 1px;
  margin: 0;
}

nav ul {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 20px;
  margin: 0;
  padding: 0;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

nav a:hover {
  color: #f5c518; /* golden hover color */
}

#themeToggle {
  background: transparent;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform 0.2s;
}

#themeToggle:hover {
  transform: scale(1.2);
}

/* ===== FOOTER ===== */
footer {
  padding: 40px 20px;
  text-align: center;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  color: var(--muted);
}
