/*
 * Updated CSS for KG Moloisane's Portfolio
 * Enhancements include:
 * - Proper use of CSS variables for consistency.
 * - Improved selector naming (BEM-like) for clarity.
 * - Better-structured and more efficient media queries.
 * - Professional design and color palette.
 */

:root {
    --primary-color: #7c4dff;
    --secondary-color: #007BFF;
    --background-dark: #1e1e1e;
    --background-light: #2e2e2e;
    --text-light: #fff;
    --text-muted: #6C757D;
    --font-family: "Roboto", sans-serif;
}

/* Reset and Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family);
}

html 
{
    scroll-behavior: smooth;
}

body 
{
    background-color: var(--background-light);
    color: var(--text-light);
}

h1, h2, h3, h4 


a
 {
    text-decoration: none;
    color: var(--text-light);
    transition: color 0.3s ease;
}

a:hover 
{
    color: var(--text-light);
}

.btn 
{
    background-color: var(--primary-color);
    color: var(--text-light);
    border: none;
    padding: 0.85rem 4.5rem;
    margin-top: 1rem;
    cursor: pointer;
    font-size: 20px;
    font-weight: 300;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-block;
    text-align: center;
}

.btn:hover 
{
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    color:white;
}

/****************************************Header & Navigation *************************************************/
.navbar 
{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 4rem;
    background-color: var(--background-dark);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.navbar .logo img 
{
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.navbar nav a 
{
    font-size: 1.1rem;
    font-weight: 300;
    margin-left: 2rem;
}
.navbar nav a:hover 
{
    color: var(--secondary-color);
    cursor: pointer;
}
#menu-toggle {
    display: none;
    font-size: 1.5rem;
    background: none;
    color: var(--text-light);
    border: none;
    cursor: pointer;
}

/*****************************************Hero Section**************************************************/
.hero {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    padding: 6rem 4rem;
    height: 80vh;
    background: var(--background-dark);
    text-align: left;
}

.hero-img img {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.hero-text {
    max-width: 600px;
}

.hero-header {
    font-size: 5rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.hero-title {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-muted);
}
.hero-btn
{
    background-color: var(--primary-color);
    color: var(--text-light);
    border: none;
    padding: 0.85rem 4.5rem;
    margin-top: 1rem;
    cursor: pointer;
    font-size: 20px;
    font-weight: 300;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-block;
    text-align: center;
}
.hero-btn:hover
{
  background-color: var(--secondary-color);
   transform: translateY(-2px);
}



.contact-section 
{
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 20px;
  padding: 30px;
   background-color: var(  --background-light);
  text-align: center;
}
.contact-column 
{
  flex: 1;
  max-width: 250px;
}
.contact-column i 
{
  font-size: 80px;
  color: #20C997;
  padding: 2rem;
}
.contact-column p 
{
  font-size: 25px;
  color: var(  --text-muted);
  margin: 0;
  font-weight: 200;
  text-align: center;
}
/****************************************** Skills Section *********************************************/
.skills-section {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 6rem;
    padding: 8rem 4rem;
}

.skills-introduction {
    max-width: 500px;
    color: var(--text-light);
}

.skills-tittle {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.skills-paragraph {
    font-size: 1.1rem;
    font-weight: 300;
    line-height: 1.6em;
    color: var(--text-muted);
}

.carousel {
    width: 100%;
    max-width: 500px;
    position: relative;
    overflow: hidden;
    padding: 2rem;
    background-color: #242424;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.carousel-item {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
}

.carousel-item.active {
    display: flex;
}

.carousel-item img
 {
    width: 80px;
    height: fit-content;
    margin-bottom: 1rem;
    background: transparent;
   
}

.carousel-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.carousel-paragraph {
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.5;
    color: var(--text-muted);

}

.dots {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
    text-align: center
}

.dot {
    height: 30px;
    width: 30px;
    margin: 0 5px;
    background-color: var(--text-muted);
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-align: center;
}

.dot.active {
    background-color: #20C997;
     text-align: center;

}

.carousel-controls 
{
    position: absolute;
    top: 50%;
    width: 100%;
    height: 80%px;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    z-index: 90;
    pointer-events: none; /* Prevents arrows from blocking content */
    /*border: 2px solid red;*/padding: 15px 15px;
    border-radius: 50%;
}

.arrow 
{
    font-size: 3rem;
    color: var(--text-light);
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    padding: 15px 15px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    pointer-events: auto; /* Re-enables pointer events for arrows */ 
 
}

.arrow:hover {
    background-color: var(--primary-color);
}

/*****************************************About Section - New Design********************************/
.about-section {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two equal columns */
    align-items: center;
   
    gap: 4rem;
}

.about-text {
    grid-column: 1 / 2; /* Text occupies the first column */
    max-width: 100%; 
    padding: 8rem 4rem;
}

.about-header 
{
    font-size: 5rem;
    margin-bottom: 1rem;
    font-weight: 300;
}


.about-paragraph {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
        font-weight: 300;
}

.about-image {
    grid-column: 2 / 3; /* Image occupies the second column */
    width: 100%;
    height: auto;
}

.about-image img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}



/***************************************Coming Soon (Projects) Section*********************************/
.comingSoon-Section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4rem 4rem;
    text-align: center;
}

/* Layout */
.projectList {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5rem;
  padding: 2rem;
}

/* Card Container */
.project-card {
  width: 320px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border-radius: var(--card-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

/* Image Section */
.project-media {
  height: 180px;
  overflow: hidden;
  position: relative;
  background: white;
  
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, filter 0.4s ease;
  filter: brightness(0.9);

}

.project-card:hover .project-media img {
  transform: scale(1.05);
  filter: brightness(1);
}

.project-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0,0,0,0.6);
  color: var(--text-light);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  border: 1px solid rgba(255,255,255,0.1);
}

/* Card Body */
.project-body {
  padding: 1rem 1.2rem 1.4rem;
}

.project-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
}

/* Tech Tags */
.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}

.tech {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  color: var(--text-light);
}

/* Buttons */
.view-btn {
  padding: 10px 22px;
  border: none;
  background: linear-gradient(90deg, #007BFF, #20C997);
  color: white;
  font-weight: 600;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.view-btn:hover {
  background: linear-gradient(90deg, #6d4acf, #2e68a7);
  transform: translateY(-2px);
}
.comingSoon-section-title {
    font-size: 6rem;
    font-weight: 300;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.comingSoon-section-callToAction {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 2rem;
}
/***********************************************Contact Section*****************************************/
.container-form {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--background-light);
    max-width: 1200px;
    margin: 0 auto;
    padding: 8rem 4rem;
    gap: 4rem;
}

.left-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: 2rem;
}

.left-section-header {
    font-size: 5rem;
    font-weight: 300;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.left-section-callToAction {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-muted);
    line-height: 1.6;
}

.right-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background-color: #242424;
    padding: 2.5rem;
    border-radius: 0px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    width: 100%;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1em;
    color: var(--text-light);text-align: left;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    background-color: #3a3a3a;
    border: 1px solid #555;
    color: var(--text-light);
    font-size: 1em;
    border-radius: 5px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(124, 77, 255, 0.3);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
 
}

.submit-button {
    width: 100%;
    padding: 1rem;
}
 /* ===== Modal Styling ===== */
    #successModal {
      display: none;                  /* Hidden by default */
      position: fixed;                /* Always stay on screen */
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0,0,0,0.6);    /* Dark overlay */
      justify-content: center;        /* Center modal horizontally */
      align-items: center;            /* Center modal vertically */
    }
    #successModal .modal-content {
      background-color: var(--background-light);
      padding: 20px;
      border-radius: 0px;
      text-align: center;
      width: 600px;
      box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }
  
    
    

/*******************************************Resume Section**********************************************/
.myHeroSection {
    position: relative;
    height: 55vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    overflow: hidden;
}

.overLay {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(to right, #2e2e2e, #1abc9c);
    opacity: 0.8;
    z-index: 1;
}

.resume-section-myText {
    position: relative;
    max-width: 800px;
    z-index: 2;
}

.resume-section-title {
    font-size: 6rem;
    font-weight: 300;
    margin-bottom: 1rem;
}

.resume-section-callToAction {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.resume-section-button {
    padding: 1rem 4rem;
}

/**********************************************************Footer***********************************/
.main-footer {
    background-color: var(--background-dark);
    padding: 4rem 4rem;
    width: 100%;
}

.footer-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    text-align: left;
}

.footer-column {
    flex-basis: 30%;
    max-width: 300px;
    margin-bottom: 2rem;
}

.footer-column-header {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 0.8rem;
}

.footer-column a {
    display: flex;
    align-items: center;
    font-size: 1em;
}
.footer-column a:hover 
{
 color: var(--secondary-color);
 cursor: pointer;
  color:#fff;
}
.icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    background-color: #14b8a6; /* A placeholder color */
    border-radius: 4px;
}


.copyright
 {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #3a3a3a;
    margin-top: 2rem;
    color: var(--text-muted);
}

/*********************************************Responsive Design****************************************/
@media (max-width: 1024px) {
    .navbar {
        padding: 1.5rem 2rem;
    }
    .hero {
        gap: 2rem;
        padding: 4rem 2rem;
    }
    .hero-header {
        font-size: 4rem;
    }
    .hero-img img {
        width: 250px;
        height: 250px;
    }
    .skills-section {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
        padding: 4rem 2rem;
    }
    .skills-introduction {
        max-width: 100%;
    }
    .carousel {
        max-width: 100%;
    }
    .about-section {
        flex-direction: column;
        gap: 2rem;
        padding: 4rem 2rem;
    }
    .about-text {
        text-align: center;
        max-width: 100%;
    }
    .about-image img {
        width: 300px;
    }
    .container-form {
        flex-direction: column;
        padding: 4rem 2rem;
        gap: 2rem;
    }
    .left-section, .right-section {
        padding: 0;
        text-align: center;
    }
    .left-section-header {
        font-size: 3rem;
    }
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    .footer-column {
        max-width: 100%;
    }
    .footer-column ul {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .about-section {
        flex-direction: column;
        gap: 2rem;
        padding: 4rem 2rem;
        grid-template-columns: 1fr; /* Stack columns on smaller screens */
    }
    .about-text {
        text-align: center;
        max-width: 100%;
        grid-column: 1 / 2;
        grid-row: 2; /* Text appears below the image on smaller screens */
    }
    .about-image {
        grid-column: 1 / 2;
        grid-row: 1; /* Image appears above the text */
    }
    .about-image img {
        width: 300px;
        margin: 0 auto; /* Center the image */
    }
}

@media (max-width: 768px) {
    .projectList
{flex-direction: column;
}
        .contact-section 
{
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
 
}
    .contact-column p 
{
  font-size: 20px;

}
    
    .navbar nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 80px;
        right: 0;
        width: 100%;
        background: var(--background-dark);
        border-top: 1px solid #3a3a3a;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    }
    .navbar nav.show {
        display: flex;
    }
    .navbar nav a {
        margin: 0;
        padding: 1rem;
        border-bottom: 1px solid #3a3a3a;
    }
    #menu-toggle {
        display: block;
    }
    .hero {
        flex-direction: column-reverse;
        height: auto;
    }
    .hero-text {
        text-align: center;
    }
    .hero-header {
        font-size: 3rem;
    }
    .hero-img img {
        width: 200px;
        height: 200px;
    }
    .skills-tittle, .about-header, .comingSoon-section-title, .left-section-header, .resume-section-title {
        font-size: 2.8rem;
    }
    .comingSoon-section-callToAction {
        font-size: 1.2rem;
    }
    .footer-container 
    {
    display: flex;
    justify-content: space-around;
    
    }
   .about-text 
   {
    grid-column: 1 / 2; /* Text occupies the first column */
    max-width: 100%; 
    padding: 1rem 1rem;
   }
   .about-image 
   {
        grid-column: 1 / 2;
        grid-row: 1; /* Image appears above the text */
    
   }
   .about-image img
   {
    width:100%;
    margin: 0 auto; /* Center the image */
   }
 
}