/* Google Font Import */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

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

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
}

h1, h2, h3 {
    margin-bottom: 20px;
}

h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
}

a {
    text-decoration: none;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.btn {
    display: inline-block;
    background: #2c3e50;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background: #1a252f;
    transform: translateY(-3px);
}

/* Header and Navigation */
header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.nav-links {
    display: flex;
}

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

.nav-links a {
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: #3498db;
}

.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px;
    transition: all 0.3s ease;
}

/* Home Section */
#home {
    height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)), url('../images/bg.jpg');
    background-size: cover;
    background-position: center;
}

#home h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

#home span {
    color: #3498db;
}

#home p {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

/* About Section */
.about-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.about-text {
    flex: 1;
    min-width: 300px;
    padding-right: 30px;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-card h3, .project-card p {
    padding: 0 20px;
}

.project-links {
    display: flex;
    justify-content: space-between;
    padding: 20px;
}

.project-links .btn {
    padding: 8px 15px;
    font-size: 0.9rem;
}

/* Contact Section */
#contact {
    background: #f9f9f9;
}

#contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

input, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
}

textarea {
    resize: vertical;
}

body.dark-mode input, body.dark-mode textarea {
    background: #333;
    border: 1px solid #444;
    color: #f0f0f0;
}

/* Footer */
footer {
    background: #2c3e50;
    color: #fff;
    padding: 30px 0;
    text-align: center;
}

.social-icons {
    margin-top: 20px;
}

.social-icons a {
    color: #fff;
    margin: 0 10px;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: #3498db;
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: #3498db;
    width: 0%;
    z-index: 1000;
    transition: width 0.1s ease;
}

/* Animated section transitions */
.fade-out {
    opacity: 0;
    transform: translateY(30px);
    transition: none;
}
  
.fade-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Dark Mode Toggle */
.theme-toggle {
    cursor: pointer;
    margin-left: 20px;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}
  
.theme-toggle:hover {
    transform: rotate(30deg);
}
  
/* Dark Mode Styles */
body.dark-mode {
    background: #1a1a1a;
    color: #f0f0f0;
}
  
body.dark-mode header {
    background: #232323;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
  
body.dark-mode .nav-links a {
    color: #f0f0f0;
}
  
body.dark-mode .project-card {
    background: #232323;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

body.dark-mode #contact {
    background: #1a1a1a;
}
  
body.dark-mode .burger div {
    background-color: #f0f0f0;
}

body.dark-mode #home {
    background: linear-gradient(rgba(26, 26, 26, 0.9), rgba(26, 26, 26, 0.9)), url('../images/bg.jpg');
    background-size: cover;
    background-position: center;
}

/* Filter Buttons for Projects and Certificates */
.filter-buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    background-color: transparent;
    border: 1px solid #3498db;
    color: #333;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

body.dark-mode .filter-btn {
    color: #f0f0f0;
}

.filter-btn.active, .filter-btn:hover {
    background-color: #3498db;
    color: #fff;
}

/* Certificate Cards */
.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.certificate-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.dark-mode .certificate-card {
    background-color: #232323;
}

.certificate-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.certificate-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.certificate-card h3 {
    padding: 1rem 1rem 0.5rem;
    margin: 0;
}

.certificate-card p {
    padding: 0 1rem 1rem;
    margin: 0;
    color: #666;
}

body.dark-mode .certificate-card p {
    color: #ccc;
}

/* Skills Section */
#skills {
    background-color: #f9f9f9;
    padding: 80px 0;
}

body.dark-mode #skills {
    background-color: #232323;
}

#skills-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.skill-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 120px;
    height: 150px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease-out;
    cursor: pointer;
}

/* Animation when skills are loaded */
.skill-item.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Hover animation */
.skill-item.hover .skill-icon-container {
    transform: translateY(-8px);
}

.skill-item.hover .skill-name {
    transform: translateY(-4px);
    color: #ffffff;
}

.skill-icon-container {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.skill-icon {
    font-size: 36px;
    color: #ffffff;
    z-index: 2;
    transition: all 0.3s ease;
}

/* Progress circle styling */
.progress-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    transform: rotate(-90deg);
}

.progress-circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 8;
}

.progress-circle-path {
    fill: none;
    stroke: #4CAF50;
    stroke-width: 8;
    transition: stroke-dashoffset 1s ease-out;
    stroke-dashoffset: 339.292;
}

.skill-name {
    font-size: 14px;
    font-weight: 500;
    color: #ccc;
    text-align: center;
    transition: all 0.3s ease;
}

/* Tooltip styling */
.skill-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(25, 25, 35, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 200px;
    padding: 12px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
    pointer-events: none;
}

/* Show tooltip on hover */
.skill-item:hover .skill-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.tooltip-header {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 5px;
    color: #ffffff;
}

.tooltip-level {
    font-size: 14px;
    color: #4CAF50;
    margin-bottom: 8px;
}

.tooltip-description {
    font-size: 13px;
    color: #aaa;
    line-height: 1.4;
}

/* Add a little arrow at bottom of tooltip */
.skill-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: rgba(25, 25, 35, 0.95) transparent transparent transparent;
}

/* Custom colors for different skill types */
.devicon-cplusplus-plain ~ .progress-circle .progress-circle-path {
    stroke: #00599C;
}

.devicon-java-plain ~ .progress-circle .progress-circle-path {
    stroke: #f89820;
}

.devicon-javascript-plain ~ .progress-circle .progress-circle-path {
    stroke: #F7DF1E;
}

.devicon-html5-plain ~ .progress-circle .progress-circle-path {
    stroke: #E34F26;
}

.devicon-python-plain ~ .progress-circle .progress-circle-path {
    stroke: #3776AB;
}

.devicon-git-plain ~ .progress-circle .progress-circle-path {
    stroke: #F05032;
}

.devicon-linux-plain ~ .progress-circle .progress-circle-path {
    stroke: #FCC624;
}

.devicon-rust-plain ~ .progress-circle .progress-circle-path {
    stroke: #DEA584;
}

/* Modal Styles */
.contact-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
}

.show-modal {
    display: block !important;
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 30px;
    border-radius: 10px;
    width: 80%;
    max-width: 600px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    position: relative;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
}

body.dark-mode .modal-content {
    background-color: #232323;
    color: #f0f0f0;
}

.contact-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.3s ease;
}

.contact-btn:hover {
    background: #2980b9;
    transform: translateY(-3px);
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    body {
        overflow-x: hidden;
    }
    
    .theme-toggle {
        position: absolute;
        right: 80px;
        top: 20px;
    }
    
    .nav-links {
        position: absolute;
        right: 0;
        height: 92vh;
        top: 8vh;
        background: #fff;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 50%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
        box-shadow: -5px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    .nav-links li {
        opacity: 0;
        margin: 20px 0;
    }
    
    .burger {
        display: block;
    }
    
    .nav-active {
        transform: translateX(0%);
    }
    
    @keyframes navLinkFade {
        from {
            opacity: 0;
            transform: translateX(50px);
        }
        to {
            opacity: 1;
            transform: translateX(0px);
        }
    }
    
    .toggle .line1 {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .toggle .line2 {
        opacity: 0;
    }
    
    .toggle .line3 {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    #home h1 {
        font-size: 2.5rem;
    }
    
    #home p {
        font-size: 1.2rem;
    }
    
    .about-text {
        margin-bottom: 40px;
        padding-right: 0;
    }
    
    .skill-item {
        width: 100px;
        height: 140px;
    }
    
    .skill-icon-container {
        width: 70px;
        height: 70px;
    }
    
    .skill-icon {
        font-size: 32px;
    }
    
    .skill-name {
        font-size: 12px;
    }
    
    .contact-btn {
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 100;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    }
}