/* CSS Variables for Light/Dark Mode */
:root {
    /* Light Mode Colors */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --accent-primary: #3b82f6;
    --accent-secondary: #6366f1;
    --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --card-bg: #ffffff;
    --nav-bg: rgba(255, 255, 255, 0.9);
    --nav-blur: blur(10px);
}

/* Dark Mode Colors */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --accent-primary: #60a5fa;
    --accent-secondary: #818cf8;
    --accent-gradient: linear-gradient(135deg, #60a5fa 0%, #818cf8 100%);
    --border-color: #334155;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.4);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.4), 0 8px 10px -6px rgb(0 0 0 / 0.4);
    --card-bg: #1e293b;
    --nav-bg: rgba(15, 23, 42, 0.9);
    --nav-blur: blur(10px);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    backdrop-filter: var(--nav-blur);
    -webkit-backdrop-filter: var(--nav-blur);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 48px;
    /* ← change this to fit your design */
    width: auto;
    display: block;
}

/* Optional: make sure it looks good in dark mode too */
[data-theme="dark"] .logo-img {
    /* if your logo has light background and needs adjustment */
    filter: brightness(1.1) contrast(1.05);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-primary);
    background: var(--bg-tertiary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Theme Toggle */
.theme-toggle {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    width: 50px;
    height: 28px;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0 4px;
    transition: all 0.3s ease;
}

.theme-toggle i {
    font-size: 0.85rem;
    position: absolute;
    transition: all 0.3s ease;
}

.theme-toggle .fa-sun {
    left: 6px;
    color: #f59e0b;
    opacity: 1;
}

.theme-toggle .fa-moon {
    right: 6px;
    color: #818cf8;
    opacity: 0;
}

[data-theme="dark"] .theme-toggle .fa-sun {
    opacity: 0;
}

[data-theme="dark"] .theme-toggle .fa-moon {
    opacity: 1;
}

.theme-toggle::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--accent-primary);
    border-radius: 50%;
    left: 4px;
    transition: transform 0.3s ease;
}

[data-theme="dark"] .theme-toggle::before {
    transform: translateX(22px);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Home Section */
.home-section {
    padding: 120px 0 80px;
    min-height: 100vh;
}

.home-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* Profile Card */
.profile-card {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.profile-image {
    flex-shrink: 0;
}

.profile-placeholder {
    width: 150px;
    height: 150px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
}

.profile-info {
    flex: 1;
}

.name {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.location {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.location i {
    color: #ef4444;
}

.course {
    font-size: 1.2rem;
    color: var(--accent-primary);
    font-weight: 600;
}

.profile-img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--accent-gradient);
    box-shadow: var(--shadow-md);
}

/* Action Buttons (for resume, etc.) */
.action-buttons {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn.primary {
    background: var(--accent-gradient);
    color: white;
    border: none;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.2);
}

.btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px rgba(59, 130, 246, 0.3);
    background: linear-gradient(135deg, #2563eb, #4f46e5);
}

/* Section Title */
.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: 3px;
}

.section-title.centered {
    text-align: center;
}

.section-title.centered::after {
    left: 50%;
    transform: translateX(-50%);
}

/* About Section */
.about-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.about-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Education Section */
.education-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.education-timeline {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.education-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.education-item:hover {
    transform: translateX(5px);
}

.education-icon {
    width: 50px;
    height: 50px;
    background: var(--accent-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.education-content h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.education-content .school {
    color: var(--accent-primary);
    font-weight: 500;
}

.education-content .year {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Tech Stack Section */
.tech-stack-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.tech-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.tech-category h3 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tech-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tech-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border-radius: 25px;
    font-size: 0.9rem;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.tech-item:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-2px);
}

.tech-item i {
    font-size: 1rem;
}

.tech-item i.fa-html5 {
    color: #e34c26;
}

.tech-item i.fa-css3-alt {
    color: #264de4;
}

.tech-item i.fa-js {
    color: #f7df1e;
}

.tech-item i.fa-php {
    color: #777bb4;
}

.tech-item i.fa-database {
    color: #00758f;
}

.tech-item:hover i {
    color: white;
}

/* Projects Section */
.projects-section {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.project-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-gradient);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.project-year {
    background: var(--bg-tertiary);
    color: var(--accent-primary);
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.project-title {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.project-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.project-description ul {
    list-style: none;
    padding: 0;
}

.project-description li {
    color: var(--text-secondary);
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.project-description li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: bold;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.tag {
    background: var(--bg-tertiary);
    color: var(--accent-primary);
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

/* Certificates Section */
.certificates-section {
    padding: 80px 0;
    background: var(--bg-primary);
}

.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.certificate-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    /* helps keep consistent proportions */
    display: flex;
    align-items: center;
    justify-content: center;
}

.certificate-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.certificate-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* keeps full certificate visible */
    border-radius: 10px;
    transition: transform 0.4s ease;
}

.certificate-card:hover .certificate-image {
    transform: scale(1.06);
}

/* Remove any leftover old icon styles if present */
.certificate-icon {
    display: none;
}

/* Contact Section */
.contact-section {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.contact-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.contact-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    text-decoration: none;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.contact-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: white;
    transition: transform 0.3s ease;
}

.contact-card:hover .contact-icon {
    transform: scale(1.1);
}

.contact-icon.facebook {
    background: linear-gradient(135deg, #1877f2, #166fe5);
}

.contact-icon.github {
    background: linear-gradient(135deg, #333, #24292e);
}

.contact-icon.linkedin {
    background: linear-gradient(135deg, #0a66c2, #0077b5);
}

.contact-icon.phone {
    background: linear-gradient(135deg, #10b981, #059669);
}

.contact-icon.gmail {
    background: linear-gradient(135deg, #ea4335, #d33b28);
}

.contact-card h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.contact-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background: var(--bg-tertiary);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--nav-bg);
        backdrop-filter: var(--nav-blur);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        display: block;
        padding: 1rem;
        margin: 0.5rem 1rem;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .profile-card {
        flex-direction: column;
        text-align: center;
    }

    .name {
        font-size: 2rem;
    }

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

    .tech-categories {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .profile-placeholder {
        width: 120px;
        height: 120px;
        font-size: 3rem;
    }

    .name {
        font-size: 1.5rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.home-content>* {
    animation: fadeIn 0.6s ease forwards;
}

.home-content>*:nth-child(1) {
    animation-delay: 0.1s;
}

.home-content>*:nth-child(2) {
    animation-delay: 0.2s;
}

.home-content>*:nth-child(3) {
    animation-delay: 0.3s;
}

.home-content>*:nth-child(4) {
    animation-delay: 0.4s;
}