/* Global Styles */
:root {
    --primary-color: #4169e1;  /* Royal Blue - main theme */
    --secondary-color: #443f61; /* Medium Purple - for contrasts */
    --accent-color: #4fc3f7;    /* Light Blue - for highlights */
    --dark-bg: #323232;         /* Dark Gray - for dark sections */
    --light-bg: #f5f5f5;        /* Almost White - for light sections */
    --text-dark: #333333;       /* Dark Gray - for main text */
    --text-light: #ffffff;      /* White - for text on dark backgrounds */
    --card-bg: #ffffff;         /* White - for card backgrounds */
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Standard shadow */
    
    /* Dark mode transition */
    --transition-speed: 0.3s;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --primary-color: #738eec;  /* Lighter Royal Blue */
    --secondary-color: #8778d9; /* Lighter Purple */
    --accent-color: #64c9f8;    /* Lighter Blue */
    --dark-bg: #1a1a1a;         /* Darker Gray */
    --light-bg: #2d2d2d;        /* Dark Gray for light sections */
    --text-dark: #e0e0e0;       /* Light Gray for main text */
    --text-light: #ffffff;      /* White - unchanged */
    --card-bg: #3a3a3a;         /* Dark card backgrounds */
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Stronger shadow */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--light-bg);
    transition: background-color var(--transition-speed), 
                color var(--transition-speed);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-speed);
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-weight: 600;
    transition: all var(--transition-speed);
}

ul {
    list-style: none;
}

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

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background-color: var(--card-bg);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all var(--transition-speed);
}

.logo {
    display: flex;
    align-items: center;
}

.logo-icon {
    background-color: var(--dark-bg);
    color: var(--text-light);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    font-weight: bold;
    margin-right: 10px;
    transition: all var(--transition-speed);
}

.logo-text {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 18px;
}

nav ul {
    display: flex;
    gap: 20px;
}

nav ul li a {
    padding: 8px 15px;
    border-radius: 4px;
    transition: background-color 0.3s;
    font-weight: 500;
}

nav ul li a:hover, nav ul li a.active {
    background-color: rgba(65, 105, 225, 0.1);
    color: var(--primary-color);
}

.profile-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.settings-icon {
    font-size: 20px;
    cursor: pointer;
}

.profile-name {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: 500;
    transition: all var(--transition-speed);
}

/* Hero Section */
.hero {
    background-color: var(--dark-bg);
    color: var(--text-light);
    padding: 80px 40px;
    text-align: center;
    position: relative;
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://via.placeholder.com/1920x1080');
    background-size: cover;
    background-position: center;
    transition: all var(--transition-speed);
}

.hero-content {
    max-width: 1000px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.download-btn {
    background-color: var(--secondary-color);
    color: var(--text-light);
    padding: 10px 20px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.3s;
}

.download-btn:hover {
    background-color: #5947bd;
}

.hire-us {
    position: absolute;
    top: 40px;
    right: 40px;
    background-color: var(--accent-color);
    color: var(--text-dark);
    padding: 15px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Section Title */
.section-title {
    text-align: center;
    padding: 60px 20px 30px;
}

.section-title h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
}

.divider-line {
    flex: 1;
    height: 2px;
    background-color: rgba(0, 0, 0, 0.1);
}

.divider-icon {
    margin: 0 15px;
    font-size: 24px;
}

/* Developer Info Section */
.developer-info {
    display: flex;
    flex-wrap: wrap;
    padding: 20px 40px 60px;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--secondary-color);
    color: var(--text-light);
    border-radius: 10px;
    transition: all var(--transition-speed);
}

.profile-picture {
    flex: 0 0 200px;
}

.profile-picture img {
    width: 100%;
    border-radius: 50%;
    border: 3px solid var(--text-light);
}

.info-container {
    flex: 1;
    min-width: 300px;
}

.info-container h2 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.location {
    margin-bottom: 15px;
    font-weight: 300;
}

.description {
    margin-bottom: 20px;
}

.hire-now-btn {
    background-color: var(--accent-color);
    color: var(--text-dark);
    padding: 10px 25px;
    border-radius: 5px;
    transition: background-color 0.3s;
    font-weight: bold;
}

.hire-now-btn:hover {
    background-color: #2aa5d9;
}

.contact-info {
    flex: 0 0 250px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-icon {
    font-size: 20px;
}

/* Skills Grid - Enhanced */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px 40px 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.skill-card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

/* Fix the text color on hover for skill cards */
.skill-card:hover {
    transform: translateY(-7px);
    color: var(--text-dark); /* Change from var(--text-light) to var(--text-dark) */
}

/* For dark mode, ensure text remains white/readable */
[data-theme="dark"] .skill-card:hover {
    color: var(--text-light);
}

/* Make the gradient effect completely inactive */
.skill-card::before {
    content: none; /* Completely disable the gradient pseudo-element */
}

/* Or if you want to keep the structure but disable the effect: */
.skill-card::before {
    opacity: 0;
}

.skill-card:hover::before {
    opacity: 0; /* Ensure it stays invisible on hover */
}

.skill-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: all 0.3s ease;
    overflow: hidden;
    background-color: transparent; /* Remove background color */
    border-width: 2px;            /* Add border width */
    border-style: solid;          /* Add border style */
    position: relative;
}

.skill-icon img {
    max-width: 60%;
    max-height: 60%;
    object-fit: contain;
    filter: none; /* Ensure no filter is applied */
}

/* Remove the ::before pseudo-elements that were adding backgrounds */
.skill-icon.html-icon::before,
.skill-icon.css-icon::before,
.skill-icon.responsive-icon::before,
.skill-icon.psd-icon::before,
.skill-icon.bootstrap-icon::before,
.skill-icon.js-icon::before,
.skill-icon.jquery-icon::before,
.skill-icon.react-icon::before {
    content: none; /* Remove these background elements */
}

/* Set individual border colors */
.skill-icon.html-icon {
    border-color: #e44d26; /* HTML orange */
}

.skill-icon.css-icon {
    border-color: #264de4; /* CSS blue */
}

.skill-icon.responsive-icon {
    border-color: #f7df1e; /* JavaScript yellow */
}

.skill-icon.psd-icon {
    border-color: #33c45a; /* Node green */
}

.skill-icon.bootstrap-icon {
    border-color: #563d7c; /* Bootstrap purple */
}

.skill-icon.js-icon {
    border-color: #61dafb; /* React blue */
}

.skill-icon.jquery-icon {
    border-color: #0769ad; /* jQuery blue */
}

.skill-icon.react-icon {
    border-color: #ff2d20; /* Laravel red */
}

/* Add a subtle background on hover */
.skill-card:hover .skill-icon {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-width: 3px; /* Make border slightly thicker on hover */
}

/* Optional: Add a very subtle background matching the border color */
.skill-icon.html-icon {
    background-color: rgba(228, 77, 38, 0.05);
}

.skill-icon.css-icon {
    background-color: rgba(38, 77, 228, 0.05);
}

.skill-icon.responsive-icon {
    background-color: rgba(247, 223, 30, 0.05);
}

.skill-icon.psd-icon {
    background-color: rgba(51, 196, 90, 0.05);
}

.skill-icon.bootstrap-icon {
    background-color: rgba(86, 61, 124, 0.05);
}

.skill-icon.js-icon {
    background-color: rgba(97, 218, 251, 0.05);
}

.skill-icon.jquery-icon {
    background-color: rgba(7, 105, 173, 0.05);
}

.skill-icon.react-icon {
    background-color: rgba(255, 45, 32, 0.05);
}

.skill-card:hover .skill-icon {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.skill-card h3 {
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

/* Additional hover effects for skill icons */
.skill-card:hover .skill-icon.html-icon {
    box-shadow: 0 5px 15px rgba(228, 77, 38, 0.3);
}

.skill-card:hover .skill-icon.css-icon {
    box-shadow: 0 5px 15px rgba(38, 77, 228, 0.3);
}

.skill-card:hover .skill-icon.responsive-icon {
    box-shadow: 0 5px 15px rgba(247, 223, 30, 0.3);
}

.skill-card:hover .skill-icon.psd-icon {
    box-shadow: 0 5px 15px rgba(51, 196, 90, 0.3);
}

.skill-card:hover .skill-icon.bootstrap-icon {
    box-shadow: 0 5px 15px rgba(86, 61, 124, 0.3);
}

.skill-card:hover .skill-icon.js-icon {
    box-shadow: 0 5px 15px rgba(97, 218, 251, 0.3);
}

.skill-card:hover .skill-icon.jquery-icon {
    box-shadow: 0 5px 15px rgba(7, 105, 173, 0.3);
}

.skill-card:hover .skill-icon.react-icon {
    box-shadow: 0 5px 15px rgba(255, 45, 32, 0.3);
}

/* Experience Description - Enhanced */
.experience-description {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 40px 60px;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
    position: relative;
}

.experience-description::after {
    content: '';
    display: block;
    width: 100px;
    height: 3px;
    background: var(--primary-color);
    margin: 30px auto 0;
    border-radius: 2px;
}

/* Projects Grid - Enhanced */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    padding: 20px 40px 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.project-image {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.project-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-image::after {
    opacity: 1;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.08);
}

.project-info {
    padding: 25px 20px;
    text-align: center;
    position: relative;
}

.project-info h3 {
    margin-bottom: 12px;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

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

.project-info p {
    margin-bottom: 22px;
    color: #666;
    line-height: 1.6;
}

.contact-btn {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 10px 22px;
    border-radius: 5px;
    transition: all 0.3s ease;
    display: inline-block;
    font-weight: 500;
}

.contact-btn:hover {
    background-color: #3258c7;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(65, 105, 225, 0.3);
}

/* Footer CTA */
.footer-cta {
    background-color: var(--primary-color);
    color: var(--text-light);
    text-align: center;
    padding: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    transition: all var(--transition-speed);
}

.footer-cta h2 {
    font-size: 1.8rem;
    flex: 1;
    min-width: 300px;
    text-align: left;
}

.contact-me-btn {
    background-color: white;
    color: var(--primary-color);
    padding: 10px 25px;
    border-radius: 5px;
    transition: background-color 0.3s;
    font-weight: bold;
}

.contact-me-btn:hover {
    background-color: #f0f0f0;
}

/* Footer */
footer {
    background-color: var(--dark-bg);
    color: var(--text-light);
    padding: 40px;
    text-align: center;
    transition: all var(--transition-speed);
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.footer-text {
    max-width: 600px;
    margin: 0 auto;
}

/* Add theme toggle button */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    margin-right: 15px;
    font-size: 20px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .theme-toggle {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

/* Show/hide sun and moon icons based on theme */
.theme-toggle .sun-icon {
    display: none;
}

.theme-toggle .moon-icon {
    display: block;
}

[data-theme="dark"] .theme-toggle .sun-icon {
    display: block;
}

[data-theme="dark"] .theme-toggle .moon-icon {
    display: none;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .hire-us {
        width: 80px;
        height: 80px;
        top: 30px;
        right: 30px;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 15px;
        padding: 12px 20px;
    }
    
    nav ul {
        gap: 5px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero {
        padding: 60px 20px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .developer-info {
        justify-content: center;
        text-align: center;
        padding: 20px;
    }
    
    .info-container {
        text-align: center;
    }
    
    .contact-info {
        align-items: center;
    }
    
    .footer-cta {
        justify-content: center;
        text-align: center;
        padding: 30px 20px;
    }
    
    .footer-cta h2 {
        text-align: center;
        font-size: 1.5rem;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 20px;
    }
    
    .skill-card {
        padding: 20px;
    }
    
    .skill-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    section {
        padding: 40px 15px;
    }
    
    .section-title {
        padding: 40px 15px 20px;
    }
    
    .projects-grid {
        gap: 25px;
        padding: 20px 25px 50px;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 20px 25px 50px;
    }
    
    .skill-card {
        padding: 25px 15px;
    }
    
    .skill-icon {
        width: 70px;
        height: 70px;
        font-size: 26px;
        margin-bottom: 15px;
    }
    
    .experience-description {
        padding: 0 25px 50px;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .skills-grid, .projects-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .profile-picture {
        flex: 0 0 150px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .project-image {
        height: 230px;
    }
}

@media (max-width: 480px) {
    .logo-text {
        display: none;
    }
    
    nav ul {
        width: 100%;
        justify-content: space-between;
    }
    
    nav ul li a {
        padding: 8px 10px;
        font-size: 0.9rem;
    }
    
    .profile-name {
        display: none;
    }
    
    .profile-container {
        width: 100%;
        justify-content: flex-end;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .section-title h2 {
        font-size: 1.6rem;
    }
    
    .hire-us {
        width: 70px;
        height: 70px;
        top: 20px;
        right: 20px;
        font-size: 0.8rem;
    }
    
    .project-image {
        height: 200px;
    }
    
    .project-info {
        padding: 20px 15px;
    }
    
    .project-info h3 {
        font-size: 1.3rem;
    }
    
    .footer-text {
        font-size: 0.9rem;
    }
    
    .contact-btn, .hire-now-btn, .download-btn, .contact-me-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .project-image {
        height: 200px;
    }
    
    .project-info {
        padding: 20px 15px;
    }
    
    .project-info h3 {
        font-size: 1.3rem;
    }
    
    .experience-description::after {
        width: 80px;
        margin-top: 20px;
    }
}

/* For very small screens */
@media (max-width: 360px) {
    nav ul li a {
        padding: 6px 8px;
        font-size: 0.8rem;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .hero p {
        font-size: 0.9rem;
    }
    
    .project-image {
        height: 150px;
    }
    
    .skill-icon {
        width: 60px;
        height: 60px;
        font-size: 22px;
    }
}