/* =======================================
   Theme Variables (Default Dark Mode)
   ======================================= */
.theme-container {
    --bg-color: #0b1f1b;
    --section-bg: #12332c;
    --accent: #a4f9c8;
    --text-primary: #dff6ee;
    --text-muted: #73bc91;
    --card-bg: #12332c;

    --toggle-ball-color: #0b1f1b;   
    --toggle-background: var(--accent);

    background-color: var(--bg-color);
    color: var(--text-primary);
    transition: background 0.5s, color 0.5s;
}

/* =======================================
   Light Mode Override via Checkbox
   ======================================= */
#theme-toggle:checked ~ .theme-container {
    --bg-color: #9ec8b0;
    --section-bg: #b2e1c6;
    --accent: #12332c;
    --text-primary: #12332c;
    --text-muted: #4a6b64;
    --card-bg: #4d9d7b;


    --toggle-ball-color: #ffffff;  
    --toggle-background: var(--accent);
}

/* =======================================
   Global Styles
   ======================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
}

section, .skill-card, .project-card, .navbar, footer, .btn-primary {
    transition: background 0.5s, color 0.5s, transform 0.3s;
}

/* =======================================
   NAVBAR
   ======================================= */
.navbar {
    background: var(--section-bg);
    padding: 15px 0;
}

.nav-container {
    width: 85%;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li {
    margin-left: 20px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
}

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

/* =======================================
   THEME TOGGLE SWITCH
   ======================================= */
.theme-switch {
    position: relative;
    display: inline-block;
}

#theme-toggle {
  display: none;
}

.toggle-label {
  display: inline-block;
  width: 60px;
  height: 30px;
  background: var(--toggle-background);
  border-radius: 50px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s;
}


.toggle-ball {
  position: absolute;
  width: 26px;
  height: 26px;
  background: var(--toggle-ball-color);
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: left 0.3s, background 0.3s;
}

#theme-toggle:checked ~ .theme-container .toggle-ball {
  left: 32px;
}

.toggle-label .icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    pointer-events: none; 
}

.toggle-label .moon {
    left: 10px; 
    color: white;  
}

.toggle-label .sun {
    right: 8px;
    color: black;   
}



/* =======================================
   HERO SECTION
   ======================================= */
.hero {
    height: 90vh;
    background: linear-gradient(to right, var(--section-bg), var(--bg-color));
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.2rem;
}

/* =======================================
   SECTIONS
   ======================================= */
section { /*about*/
    padding: 70px 10%;
    text-align: center;
    background-color: var(--bg-color);
    color: var(--text-primary);
    margin-bottom: 20px;
    border-radius: 10px;
}

.contact {
    background-color: var(--bg-color);
}


/* =======================================
   PROJECT CARDS
   ======================================= */

.projects-page {
    padding: 80px 10%;
}

.projects-page h1 {
    text-align: center;
    margin-bottom: 50px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.project-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}


.project-card:hover {
    transform: translateY(-5px);
    background: var(--accent);
    color: var(--bg-color);
}

.project-card a {
    color: inherit;          
    text-decoration: none;   
    display: block;         
}


html {
    scroll-behavior: smooth;
}

.project-description {
    text-align: justify;
    max-width: 900px;   
    margin: 0 auto;      
    line-height: 1.6;      
    font-size: 16px;
    margin-top: 20px;
}

.project-description p {
    margin-bottom: 20px;   
}

.project-detail {
    padding: 100px 15%;
    transition: background 0.5s ease;
}

.project-detail:nth-of-type(odd) {
    background: var(--bg-color);
}

.project-detail:nth-of-type(even) {
    background: var(--section-bg);
}


.project-media {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-bottom: 40px;
}

.media-row {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.media-row video,
.media-row img {
    width: 45%;
    border-radius: 12px;
    object-fit: cover;
}

.media-row video {
    max-height: 350px;
}

/* =======================================
   BUTTONS
   ======================================= */
.btn-primary {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 25px;
    background: var(--accent);
    color: var(--bg-color);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
}

.btn-primary:hover {
    background: var(--text-muted);
    color: var(--bg-color);
}

/* =======================================
   FOOTER
   ======================================= */
footer {
    background: var(--section-bg);
    color: var(--text-muted);
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
    border-top: 1px solid rgba(164, 249, 200, 0.2);
}

/* =======================================
   EXPERIENCE SECTION
   ======================================= */
#experience {
  padding: 70px 10%;
  background-color: var(--section-bg);
  color: var(--text-primary);
}

.experience-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.experience-card {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  transition: transform 0.3s, background 0.3s;
}

.experience-card:hover {
  transform: translateY(-5px);
  background: var(--accent);
  color: var(--bg-color);
}

.experience-card .company {
  font-weight: 500;
  color: var(--text-muted);
}

.experience-card .date {
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.timeline {
  position: relative;
  margin: 40px 0;
  padding-left: 30px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 0;
  width: 12px;
  height: 12px;
  background: var(--bg-color);
  border: 3px solid var(--accent);
  border-radius: 50%;
}

.timeline-content {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  transition: transform 0.3s, background 0.3s, color 0.3s;
}

.timeline-content:hover {
  transform: translateY(-5px);
  background: var(--accent);
  color: var(--bg-color);
}

.timeline-content .company {
  font-weight: 500;
  color: var(--text-muted);
}

.timeline-content .date {
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}


/* =======================================
   SKILLS SECTION
   ======================================= */

#skills {
  padding: 70px 10%;
  background-color: var(--bg-color);
  color: var(--text-primary);
}

.skills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin-top: 30px;
}

.skill-card {
  background: var(--card-bg);
  padding: 12px 25px;
  border-radius: 25px;
  font-weight: 500;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  transition: transform 0.3s, background 0.3s, color 0.3s;
}

.skill-card:hover {
  transform: translateY(-5px);
  background: var(--accent);
  color: var(--bg-color);
}


/* =======================================
   CERTIFICATES SECTION
   ======================================= */
   
#certificates {
  padding: 70px 10%;
  background-color: var(--section-bg);
  color: var(--text-primary);
}
.certificates-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 30px;
}


.certificate-card {
  perspective: 1000px;
  height: 300px;
}

.certificate-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.certificate-card:hover .certificate-card-inner {
  transform: rotateY(180deg);
}

.certificate-front, .certificate-back {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 15px;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  transition: background 0.3s, color 0.3s;
}

.certificate-front img {
  width: 180px;  
  height: auto;   
  object-fit: contain;
  margin-bottom: 10px;
  border-radius: 10px;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.8));

}

.certificate-back {
  transform: rotateY(180deg);
  background: var(--accent);
  color: var(--bg-color);
  padding: 20px;
  box-sizing: border-box;
  text-align: center;
}

.certificate-card:hover .certificate-back,
.certificate-card:hover .certificate-front {
  cursor: pointer;
}

/* =======================================
   LIFE EXPERIENCE TAB
   ======================================= */

#life-experience {
  padding: 70px 10%;
  background-color: var(--bg-color);
  color: var(--text-primary);
}

#life-experience h2 {
  text-align: center;
  margin-bottom: 50px;
  font-size: 2.5rem;
  color: var(--accent);
}

/* Revolving images: */
#life-imgs {
  padding: 70px 5%;
  text-align: center;
}

.carousel {
  overflow: hidden;
  position: relative;
  margin-top: 40px;
  width: 100%;
}


.carousel:hover .carousel-track {
  animation-play-state: paused;
}

.carousel-track {
  display: flex;
  /* gap: 30px; */
  animation: scroll 25s linear infinite;
  width: max-content;
}


@keyframes scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}


/* life imgs back */

.flip-card {
  width: 250px;
  height: 300px;
  perspective: 1000px;
  flex-shrink: 0;
  margin-right: 30px;
}

.flip-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.flip-card:hover .flip-inner {
  transform: rotateY(180deg);
}

.flip-front, .flip-back {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 15px;
  backface-visibility: hidden;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.flip-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.flip-back {
  background: var(--accent);
  color: var(--bg-color);
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
}


.filter-buttons {
  text-align: center;
  margin: 50px 0 30px;
}

.filter-buttons button {
  padding: 10px 20px;
  margin: 5px;
  border: none;
  border-radius: 25px;
  background: var(--card-bg);
  color: var(--text-primary);
  cursor: pointer;
  transition: 0.3s;
}

.filter-buttons button:hover {
  background: var(--accent);
  color: var(--bg-color);
}
.filter-buttons button.active {
  background: var(--accent);
  color: var(--bg-color);
}

#life-gallery {
  padding: 80px 10%;
}

.filter-buttons {
  text-align: center;
  margin-bottom: 40px;
}

.filter-buttons button {
  padding: 10px 20px;
  margin: 5px;
  border: none;
  border-radius: 25px;
  background: var(--card-bg);
  color: var(--text-primary);
  cursor: pointer;
  transition: 0.3s;
}

.filter-buttons button:hover,
.filter-buttons button.active {
  background: var(--accent);
  color: var(--bg-color);
}

.gallery-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 25px;
}

.gallery-item {
  aspect-ratio: 4 / 4; 
  overflow: hidden;
  border-radius: 15px;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item:hover img {
  transform: scale(1.07);
}

.gallery-item:hover {
  transform: translateY(-5px);
}


/* Links */

.github-btn {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: 0.3s ease;
}

.github-btn:hover {
    border-bottom: 1px solid var(--accent);
}

.github-btn:visited {
    color: var(--accent);
}

.contact-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  justify-items: center; 
  gap: 20px;     
  width: 100%;
}

/* SCROLL TO THE TOP BUTTON */
#scrollToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    background: var(--accent);
    color: var(--bg-color);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    display: none; 
    transition: background 0.3s, transform 0.3s;
}

#scrollToTop:hover {
    background: var(--text-muted);
    transform: translateY(-3px);
}


/* FOR PHONE */
@media (max-width: 500px) {

  .nav-links {
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
  }

  .hero h1 {
    font-size: 2rem;
  }

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

  section {
    padding: 50px 5%;
  }

  .flip-card {
    width: 180px;
    height: 220px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .media-row video,
  .media-row img {
    width: 100%;
  }
}




.btn-dbw {
    display: block;
    padding: 10px 25px;
    background: var(--accent);
    color: var(--bg-color);
    text-decoration: none;
    font-weight: 500;
    width: fit-content;
    margin: 20px auto 0 auto;
}

.btn-dbw:hover {
    background: var(--text-muted);
    color: var(--bg-color);
}

.media-dbw {
    display: flex;
    /* gap: 20px; */
    justify-content: center;
}

.media-dbw img {
    width: 100%;
    max-width: 700px; 
    height: auto;
}



