/* CSS Variables for Dark Mode */
:root {
    --bg-color: #fff;
    --text-color: #333;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --nav-text: #2c3e50;
    --primary-color: #16a085;
    --secondary-bg: #f8f9fa;
    --card-bg: #fff;
    --border-color: #eee;
    --shadow: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --nav-bg: rgba(26, 26, 26, 0.95);
    --nav-text: #e0e0e0;
    --secondary-bg: #2d2d2d;
    --card-bg: #333;
    --border-color: #444;
    --shadow: rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

/* Fixed Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    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: 60px;
}

.nav-logo a {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--nav-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-logo a:hover {
    color: var(--primary-color);
}

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

.nav-link {
    color: var(--nav-text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Navigation Controls - Dark Mode Toggle */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(22, 160, 133, 0.4);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--nav-text);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 25%, #2d1b69 50%, #1e3a8a 75%, #0f172a 100%);
    padding-top: 80px;
}

[data-theme="dark"] .hero {
    background: linear-gradient(135deg, #000000 0%, #1a1a2e 25%, #16213e 50%, #0f3460 75%, #000000 100%);
}

.ai-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, #3b82f6 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, #8b5cf6 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, #06b6d4 0%, transparent 30%);
    opacity: 0.3;
    animation: neuralPulse 4s ease-in-out infinite alternate;
}

.ai-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(45deg, transparent 40%, rgba(59, 130, 246, 0.1) 50%, transparent 60%),
        linear-gradient(-45deg, transparent 40%, rgba(139, 92, 246, 0.1) 50%, transparent 60%);
    animation: dataFlow 6s linear infinite;
}

@keyframes neuralPulse {
    0% { opacity: 0.2; transform: scale(1); }
    100% { opacity: 0.4; transform: scale(1.05); }
}

@keyframes dataFlow {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.hero-content {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 2;
    margin-top: 20px;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-img-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    border: 4px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    animation: profilePulse 3s ease-in-out infinite;
}

@keyframes profilePulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    }
}

.profile-img:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.5) !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
}

.hero-name {
    font-size: 3.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-top: 1rem;
}

.hero-title {
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    font-weight: 300;
}

.hero-education {
    margin: 2rem 0;
}

.education-header {
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    text-align: center;
}

.degree-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.degree-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.degree-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.degree-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.degree-content h4 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.degree-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.degree-year {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    font-style: italic;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-contact {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.contact-item span {
    font-size: 1.2rem;
}

.contact-item a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: #fff;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.btn--primary {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.btn--primary:hover {
    background: #138d75;
    border-color: #138d75;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(22, 160, 133, 0.4);
}

.btn--outline {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
}

.btn--outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

.btn--sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Section Styles */
.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

/* About Section */
.about {
    padding: 80px 0;
    background: var(--secondary-bg);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    opacity: 0.9;
}

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

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

.project-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 25px var(--shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-15px) scale(1.02) !important;
    box-shadow: 0 25px 60px var(--shadow) !important;
    border-color: var(--primary-color) !important;
}

.project-card.featured {
    border: 2px solid var(--primary-color);
    background: var(--card-bg);
}

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

.project-title {
    margin: 0;
    flex: 1;
}

.project-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: var(--primary-color) !important;
}

.github-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.project-card:hover .github-icon {
    transform: rotate(15deg) scale(1.1);
}

.project-date {
    color: var(--text-color);
    opacity: 0.7;
    font-size: 0.9rem;
    font-style: italic;
    white-space: nowrap;
    margin-left: 1rem;
}

.project-description {
    color: var(--text-color);
    opacity: 0.8;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    transition: color 0.3s ease;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background: var(--border-color);
    color: var(--text-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.project-card:hover .tech-tag {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
}

.featured .tech-tag {
    background: var(--primary-color);
    color: #fff;
}

/* Skills Section */
.skills {
    padding: 80px 0;
    background: var(--secondary-bg);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--shadow);
    transition: transform 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
}

.skill-category-title {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tag {
    background: var(--primary-color);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: default;
}

.skill-tag:hover {
    background: #138d75;
    transform: scale(1.05);
}

/* Education Section */
.education {
    padding: 80px 0;
    background: var(--bg-color);
}

.education-timeline {
    max-width: 800px;
    margin: 0 auto;
}

.education-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--shadow);
    transition: transform 0.3s ease;
}

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

.education-date {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
}

.education-institution {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.education-degree {
    color: var(--text-color);
    opacity: 0.8;
    font-size: 1.1rem;
}

/* Certifications Section - Final Perfect Alignment */
.certifications {
    padding: 80px 0;
    background: var(--secondary-bg, #f8f9fa);
}

.cert-section {
    margin-bottom: 4rem;
}

.cert-section-title {
    color: #0ea5e9;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: left;
    border-bottom: none;
}

/* 2x2 Grid for Completed Courses */
.completed-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

/* 3-Column Row for Ongoing Courses */
.ongoing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* Certificate Items */
.cert-item {
    background: #2d3748;
    color: #ffffff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 220px;
}

.cert-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.cert-item.ongoing {
    background: #374151;
}

.cert-title {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.8rem;
    flex-grow: 1;
}

.cert-provider {
    color: #9ca3af;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.cert-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
}

/* Status Badges */
.cert-status {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.cert-status.completed {
    background: #10b981;
    color: #ffffff;
}

.cert-status.ongoing {
    background: #f59e0b;
    color: #ffffff;
}

/* Certificate Buttons */
.cert-button {
    background: #0ea5e9;
    color: #ffffff;
    text-decoration: none;
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cert-button:hover {
    background: #0284c7;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .completed-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .ongoing-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .completed-grid,
    .ongoing-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .cert-item {
        padding: 1.5rem;
        min-height: 200px;
    }
    
    .cert-title {
        font-size: 1rem;
    }
    
    .cert-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .cert-button {
        text-align: center;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .cert-item {
        padding: 1.2rem;
        min-height: 180px;
    }
    
    .cert-title {
        font-size: 0.95rem;
    }
    
    .cert-provider {
        font-size: 0.85rem;
    }

    .cert-section-title {
        font-size: 1.3rem;
    }
}


/* Achievements Section */
.achievements {
    padding: 80px 0;
    background: var(--bg-color);
}

.achievements-list {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    gap: 2rem;
}

.achievement-item {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--shadow);
    transition: transform 0.3s ease;
    border-left: 5px solid var(--primary-color);
}

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

.achievement-item h3 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.achievement-item p {
    color: var(--text-color);
    opacity: 0.8;
    line-height: 1.6;
}

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

.contact-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.contact-text {
    font-size: 1.1rem;
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 3rem;
    line-height: 1.6;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.contact-item-large {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--shadow);
    transition: transform 0.3s ease;
}

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

.contact-item-large h3 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.contact-item-large a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-item-large a:hover {
    color: #138d75;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: #fff;
    padding: 3rem 0 1rem;
}

[data-theme="dark"] .footer {
    background: #000;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-section p {
    line-height: 1.6;
    color: #bdc3c7;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .completed-courses-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .ongoing-courses-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background: var(--nav-bg);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 2rem 0;
        gap: 2rem;
        transition: left 0.3s ease;
        box-shadow: 0 2px 10px var(--shadow);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-link {
        font-size: 1.1rem;
        padding: 1rem 0;
        width: 100%;
        text-align: center;
    }

    .hero {
        padding-top: 70px;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-name {
        font-size: 2.2rem;
        margin-top: 2rem;
    }

    .hero-title {
        font-size: 1.4rem;
    }

    .degree-cards {
        grid-template-columns: 1fr;
    }

    .hero-contact {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .profile-img {
        width: 140px;
        height: 140px;
    }

    .completed-courses-grid,
    .ongoing-courses-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .cert-card {
        padding: 1.5rem;
        min-height: 200px;
    }
    
    .cert-title {
        font-size: 1rem;
    }
    
    .cert-bottom {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .cert-btn {
        text-align: center;
        width: 100%;
    }

    .education-item {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

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

    .hero-title {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .profile-img {
        width: 120px;
        height: 120px;
    }

    .cert-card {
        padding: 1.2rem;
        min-height: 180px;
    }
    
    .cert-title {
        font-size: 0.95rem;
    }
    
    .cert-provider {
        font-size: 0.85rem;
    }
}
