/* =========================================
   VARIABLES & BASE SETUP
   ========================================= */
:root {
  --primary-color: #b49a84; /* Soft earthy brown */
  --primary-hover-color: #c7b5a3;
  --secondary-cream: #d8b98b; /* NEW: Rich, warm beige/cream */
  --background-color: #2a312a; /* Deep forest green */
  --card-background: #3a423a;
  --text-color: #f5f2da; /* Pale neutral for standard text */
  --text-light: #a2a994;
  --header-text-color: #f5f2da;
  --header-background: rgba(42, 49, 42, 0.85);
  --font-family:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px; /* Perfectly clears the header */
}

body {
  font-family: var(--font-family);
  margin: 0;
  background-color: var(--background-color);
  color: var(--text-color);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  color: var(--header-text-color);
  font-weight: 700;
  line-height: 1.2;
}
h1 {
  font-size: 3.8rem;
  letter-spacing: -1px;
}
h2 {
  font-size: 2.8rem;
  text-align: center;
  margin-bottom: 4rem;
}
p {
  line-height: 1.7;
  font-size: 1.1rem;
  color: var(--text-light);
}
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}
a:hover {
  color: var(--primary-hover-color);
}

/* =========================================
   LAYOUT & SECTIONS
   ========================================= */
section {
  padding: 40px 2rem 4rem 2rem;
  max-width: 1000px;
  margin: 0 auto;
  min-height: 100vh; /* Keeps the "full page" feel */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* =========================================
   NAVIGATION BAR & DROPDOWN
   ========================================= */
header {
  background-color: var(--header-background);
  backdrop-filter: blur(10px);
  padding: 1.2rem 0; /* Restored larger padding */
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(162, 169, 148, 0.2);
  display: flex;
  align-items: center;
}

nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  padding: 0 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  grid-column: 1;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

nav ul {
  grid-column: 2;
  list-style: none;
  display: flex;
  gap: 2.5rem;
  padding: 0;
  margin: 0;
}

nav ul li a {
  color: var(--text-color);
  font-weight: 600;
  font-size: 1rem;
  position: relative;
  padding-bottom: 5px;
}

nav ul li a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition:
    width 0.3s ease,
    left 0.3s ease;
}

nav ul li a:hover::after,
nav ul li a.active::after {
  width: 100%;
  left: 0;
}
nav ul li a:hover,
nav ul li a.active {
  color: var(--primary-color);
}

.nav-button {
  grid-column: 3;
  justify-self: end;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  border: 1px solid var(--primary-color);
  border-radius: 6px;
}
.nav-button:hover {
  background-color: rgba(180, 154, 132, 0.1);
}

/* --- DROPDOWN FIXES --- */
.dropdown {
  position: relative;
  display: inline-block;
}
.dropdown::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 20px;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: calc(100% + 15px);
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--card-background);
  min-width: 180px;
  box-shadow: 0 10px 30px rgba(2, 12, 27, 0.7);
  border-radius: 8px;
  border: 1px solid rgba(162, 169, 148, 0.1);
  padding: 0.5rem 0;
  z-index: 10;
}
.dropdown-content a {
  padding: 0.8rem 1.5rem;
  display: block;
  font-size: 0.9rem;
  border-bottom: none;
}
.dropdown-content a i {
  margin-right: 8px;
  color: var(--primary-color);
}
.dropdown-content a:hover {
  background-color: rgba(180, 154, 132, 0.1);
}
.dropdown-content a::after {
  display: none;
}
.dropdown:hover .dropdown-content {
  display: block;
}

/* =========================================
   HERO & ABOUT
   ========================================= */
#hero {
  justify-content: center; /* Keep hero perfectly centered */
  text-align: center;
}
.hero-content p {
  font-size: 1.3rem;
  margin: 1.5rem auto 2.5rem;
  max-width: 600px;
}

.cta-button {
  display: inline-block;
  padding: 1rem 2.5rem;
  border-radius: 8px;
  border: 1px solid var(--primary-color);
  font-weight: 600;
  font-size: 1.1rem;
  transition: background-color 0.3s ease;
}
.cta-button:hover {
  background-color: rgba(180, 154, 132, 0.1);
}

.about-container {
  display: flex;
  align-items: center;
  gap: 4rem;
}
.profile-pic {
  border-radius: 50%;
  width: 180px;
  height: 180px;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--primary-color);
  box-shadow: 0 0 25px rgba(180, 154, 132, 0.15);
}
.about-text h2 {
  text-align: left;
  margin-bottom: 1.5rem;
}

/* =========================================
   EXPERIENCE LIST
   ========================================= */
.experience-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.exp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-radius: 12px;
  background: linear-gradient(
    145deg,
    var(--card-background),
    rgba(42, 49, 42, 0.4)
  );
  border: 1px solid rgba(162, 169, 148, 0.1);
  transition:
    transform 0.3s ease,
    background 0.3s ease;
}
.exp-row:hover {
  transform: translateX(10px);
  background: rgba(180, 154, 132, 0.05);
}
.exp-brand {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.company-logo {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  object-fit: cover;
  background: #fff;
  padding: 2px;
}
.exp-titles h3 {
  margin: 0 0 0.2rem 0;
  font-size: 1.2rem;
}
.exp-titles .company {
  margin: 0;
  font-size: 0.95rem;
}
.exp-meta .date {
  font-size: 0.9rem;
  color: var(--primary-color);
  font-weight: 600;
}

.mini-tags {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.8rem;
  flex-wrap: wrap;
}
.mini-tags span {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  background: rgba(180, 154, 132, 0.1);
  color: var(--primary-color);
  font-weight: 600;
}

/* =========================================
   PROJECTS GRID (AURA & LINK REVEAL)
   ========================================= */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.compact-card {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-radius: 12px;
  background: linear-gradient(
    145deg,
    var(--card-background),
    rgba(42, 49, 42, 0.4)
  );
  border: 1px solid rgba(162, 169, 148, 0.1);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

/* Ensure text stays above the aura */
.project-info,
.card-arrow {
  position: relative;
  z-index: 3;
}

.compact-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.card-arrow {
  font-size: 1.5rem;
  color: var(--text-light);
  transition:
    transform 0.3s ease,
    color 0.3s ease;
}

/* --- THE DYNAMIC AURA --- */
.project-aura {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}

/* Different subtle glow colors for each project */
.deng-aura {
  background: radial-gradient(
    circle at top right,
    rgba(34, 197, 94, 0.15),
    transparent 70%
  );
} /* Green */
.muse-aura {
  background: radial-gradient(
    circle at top right,
    rgba(168, 85, 247, 0.15),
    transparent 70%
  );
} /* Purple */
.study-aura {
  background: radial-gradient(
    circle at top right,
    rgba(56, 189, 248, 0.15),
    transparent 70%
  );
} /* Blue */
.bsr-aura {
  background: radial-gradient(
    circle at top right,
    rgba(239, 68, 68, 0.15),
    transparent 70%
  );
} /* Red */

/* --- THE LINK REVEAL --- */
.hover-link {
  display: block;
  font-size: 0.85rem;
  color: var(--primary-color);
  margin-top: 12px;
  font-family: monospace; /* Gives it a technical URL feel */
  opacity: 0;
  transform: translateY(10px); /* Starts slightly lower */
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

/* --- HOVER STATES --- */
.compact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(2, 12, 27, 0.7);
}

.compact-card:hover .project-aura {
  opacity: 1;
}

.compact-card:hover .hover-link {
  opacity: 1;
  transform: translateY(0); /* Slides up into place */
}

.compact-card:hover .card-arrow {
  transform: translate(5px, -5px);
  color: var(--primary-color);
}

.compact-card:hover h3 {
  color: var(--primary-color);
}

/* =========================================
   PHOTOS BENTO BOX & MUSIC MOSAIC
   ========================================= */
.photo-bento {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-auto-rows: 200px;
  gap: 1rem;
}
.bento-item {
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(162, 169, 148, 0.2);
}
.bento-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    transform 0.4s ease,
    filter 0.4s ease;
  filter: grayscale(20%);
}
.bento-item:hover img {
  transform: scale(1.05);
  filter: grayscale(0%);
}

.spotify-mosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 800px;
  margin: 0 auto;
}
.mosaic-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  display: block;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(162, 169, 148, 0.2);
}
.mosaic-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    transform 0.4s ease,
    filter 0.4s ease;
  filter: grayscale(30%);
}
.mosaic-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(42, 49, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 2.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.mosaic-item:hover img {
  transform: scale(1.1);
  filter: grayscale(0%);
}
.mosaic-item:hover .mosaic-overlay {
  opacity: 1;
}

/* =========================================
   CONTACT & FOOTER
   ========================================= */
#contact {
  padding: 0; /* Remove padding so it can perfectly measure the screen */
  min-height: calc(100vh - 110px); /* Accounts for the header height */
}

.contact-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-grow: 1; /* Forces the wrapper to fill the whole section */
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

.contact-content {
  flex-grow: 1; /* Pushes the footer down to the absolute bottom */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 2rem; /* Restore horizontal padding here */
}

.icon-tray {
  display: flex;
  justify-content: center;
  gap: 3.5rem;
  flex-wrap: wrap;
}
.icon-btn {
  font-size: 2.5rem;
  color: var(--text-light);
  transition:
    transform 0.3s ease,
    color 0.3s ease,
    text-shadow 0.3s ease;
}
.icon-btn:hover {
  transform: translateY(-8px);
  color: var(--primary-color);
  text-shadow: 0 10px 25px rgba(180, 154, 132, 0.4);
}

footer {
  width: 100%;
  padding: 2rem 2rem;
  border-top: 1px solid rgba(162, 169, 148, 0.2);
  color: var(--text-light);
  font-size: 0.9rem;
  text-align: center;
  margin-top: auto; /* Locks to the bottom edge */
}

/* =========================================
   MOBILE RESPONSIVE
   ========================================= */
@media (min-width: 768px) {
  .bento-item.tall {
    grid-row: span 2;
  }
  .bento-item.wide {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }
  h2 {
    font-size: 2rem;
  }
  section {
    padding: 4rem 1.5rem;
  }
  nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
  }
  nav ul {
    flex-wrap: wrap;
    justify-content: center;
    order: 2;
    gap: 1.5rem;
  }
  .nav-button {
    order: 1;
  }
  .about-container {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }
  .about-text h2 {
    text-align: center;
  }
  .exp-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .spotify-mosaic {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =========================================
   PROJECT PREVIEW MODAL
   ========================================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.85); /* Dark background */
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none; /* Hidden by default */
  transition: opacity 0.3s ease;
  padding: 2rem;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: var(--card-background);
  border: 1px solid rgba(162, 169, 148, 0.2);
  border-radius: 16px;
  max-width: 900px;
  width: 100%;
  overflow: hidden;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

#modal-img {
  width: 100%;
  max-height: 60vh;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid rgba(162, 169, 148, 0.1);
}

.modal-text {
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-text h3 {
  margin: 0;
  font-size: 1.5rem;
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.5);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.3s ease;
}

.close-btn:hover {
  background: var(--primary-color);
}

@media (max-width: 768px) {
  .modal-text {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
}

/* =========================================
   MUSIC BUBBLE CLOUD (PHYSICS ENGINE)
   ========================================= */
#music-cloud-container {
  width: 100%;
  height: 60vh;
  min-height: 500px;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(
    145deg,
    var(--card-background),
    rgba(42, 49, 42, 0.2)
  );
  border: 1px solid rgba(162, 169, 148, 0.1);
  box-shadow: inset 0 0 50px rgba(2, 12, 27, 0.5);
}

.music-bubble {
  position: absolute;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: var(--background-color); /* Fallback if no image */
  cursor: grab;
  box-shadow: 0 10px 30px rgba(2, 12, 27, 0.5);
  border: 2px solid rgba(180, 154, 132, 0.2);
  transform: translate(-50%, -50%);
  transition: border-color 0.3s ease;
}

.music-bubble:active {
  cursor: grabbing;
}

.bubble-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(42, 49, 42, 0.85);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: var(--text-color);
  text-align: center;
  padding: 10%;
}

.music-bubble:hover {
  border-color: var(--primary-color);
  z-index: 100 !important;
}

.music-bubble:hover .bubble-overlay {
  opacity: 1;
}

.bubble-overlay i {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 5px;
}

.bubble-title {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
}

/* --- ABOUT EXTRAS (BENTO & SPOTIFY) --- */
.about-extras {
  display: flex;
  justify-content: center; /* Centers the single item */
  margin-top: 4rem;
  width: 100%;
}

.extra-card {
  background: linear-gradient(
    145deg,
    var(--card-background),
    rgba(42, 49, 42, 0.4)
  );
  border: 1px solid rgba(162, 169, 148, 0.1);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

/* Widen the Spotify card when it's by itself */
.spotify-only {
  width: 100%;
  max-width: 800px;
}

/* Keep the bento code here for when you uncomment it later */
.mini-bento {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 244px 244px;
  gap: 0.75rem;
  height: 100%;
}

.bento-img {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(162, 169, 148, 0.2);
}

.bento-large {
  grid-row: span 2;
}

.bento-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    transform 0.4s ease,
    filter 0.4s ease;
  filter: grayscale(20%);
}

.bento-img:hover img {
  transform: scale(1.05);
  filter: grayscale(0%);
}

@media (max-width: 768px) {
  .about-extras {
    grid-template-columns: 1fr;
  }
  /* Made the mobile photos a bit taller */
  .mini-bento {
    grid-template-rows: 200px 200px;
  }
}

/* =========================================
   NEW COLORWAY OVERRIDES (CREAM/BEIGE)
   ========================================= */

/* 1. Make company names prominently cream */
.exp-titles .company {
  color: var(--secondary-cream) !important;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* 2. Change Nav hover underlines to cream */
nav ul li a::after {
  background-color: var(--secondary-cream) !important;
}
nav ul li a:hover,
nav ul li a.active {
  color: var(--secondary-cream) !important;
}

/* 3. Make the text inside skill tags cream */
.mini-tags span {
  color: var(--secondary-cream) !important;
  border: 1px solid rgba(234, 221, 197, 0.15); /* subtle cream border */
}

/* 4. New Golden/Beige aura for the DB Engine */
.db-aura {
  background: radial-gradient(
    circle at top right,
    rgba(234, 221, 197, 0.2),
    /* Soft beige/gold glow */ transparent 70%
  );
}

/* =========================================
   PROMINENT BEIGE STRUCTURAL ACCENTS
   ========================================= */

/* 1. Make all major section headers golden-beige */
h2 {
  color: var(--secondary-cream) !important;
}

/* 2. Add an architectural left-border to all cards */
.exp-row,
.compact-card,
.extra-card {
  border-left: 4px solid var(--secondary-cream) !important;
  /* Optional: slightly rounds the left corners so the border blends smoothly */
  border-top-left-radius: 8px !important;
  border-bottom-left-radius: 8px !important;
}

/* 3. Make the interactive project arrows golden-beige */
.card-arrow {
  color: var(--secondary-cream) !important;
}
