/* CSS Reset & Variables */
:root {
    --bg-color: #0b1120;
    /* Dark Blue-Grey */
    --text-color: #ffffff;
    --primary-color: #38bdf8;
    /* Cyan */
    --secondary-color: #2563eb;
    /* Blue */
    --accent-color: #7dd3fc;
    /* Light Cyan */
    --card-bg: rgba(30, 41, 59, 0.5);
    --card-border: rgba(56, 189, 248, 0.2);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --transition: all 0.3s ease;
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
    position: relative;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: 1rem;
}

h1 {
    font-size: 4rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #a0a0a0;
}

/* Animations & Effects */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gradient-text {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Custom Cursor */
.custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease;
    mix-blend-mode: difference;
    display: none;
    /* Hide on mobile/touch */
}

@media (pointer: fine) {
    .custom-cursor {
        display: block;
    }
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 5%;
    /* Reduced padding slightly */
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(11, 17, 32, 0.85);
    /* Matches new bg */
    backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid var(--card-border);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.lang-btn {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    margin-left: 1rem;
}

.lang-btn:hover {
    background: var(--primary-color);
    color: var(--bg-color);
}

.nav-links a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: var(--transition);
}

/* Mobile Menu */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Hidden by default */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-color);
        padding: 2rem;
        text-align: center;
        border-bottom: 1px solid var(--card-border);
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: flex;
    }
}


/* Sections */
section {
    padding: 6rem 5%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Center content vertically in section */
}

/* Hero Section */
.hero {
    /* text-align: left; */
    position: relative;
    padding-top: 8rem;
    /* Account for fixed header */
    display: flex;
    flex-direction: row;
    /* Side by side layout */
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
}

.hero-content {
    max-width: 600px;
    z-index: 2;
    animation: fadeIn 1s ease-out;
}

.hero .subtitle {
    font-size: 1.2rem;
    color: var(--secondary-color);
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.cta-group {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    display: inline-block;
}

.btn.primary {
    background-color: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
}

.btn.primary:hover {
    background-color: transparent;
    color: var(--primary-color);
}

.btn.secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn.secondary:hover {
    background-color: white;
    color: var(--bg-color);
}

.hero-visual {
    position: relative;
    width: 400px;
    height: 400px;
    z-index: 1;
}

/* Hero Blobs */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 6s infinite ease-in-out;
}

.blob-1 {
    width: 300px;
    height: 300px;
    background: var(--primary-color);
    top: 0;
    left: 0;
}

.blob-2 {
    width: 250px;
    height: 250px;
    background: var(--secondary-color);
    bottom: 0;
    right: 0;
    animation-delay: -3s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.hero-avatar {
    width: 350px;
    height: 350px;
    object-fit: cover;
    object-position: top center;
    border-radius: 50%;
    border: 4px solid var(--card-border);
    box-shadow: 0 0 50px rgba(123, 44, 191, 0.3);
    position: relative;
    z-index: 10;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: float 6s infinite ease-in-out;
}

@media (max-width: 900px) {
    .hero {
        flex-direction: column-reverse;
        text-align: center;
        justify-content: center;
    }

    .hero-visual {
        width: 300px;
        height: 300px;
        margin-bottom: 2rem;
    }

    .hero-avatar {
        width: 250px;
        height: 250px;
    }

    .cta-group {
        justify-content: center;
    }

    h1 {
        font-size: 3rem;
    }
}

/* About Section */
.about-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--card-border);
}


/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--card-border);
    transition: var(--transition);
    text-align: center;
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(123, 44, 191, 0.2);
}

.skill-card i {
    width: 48px;
    height: 48px;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.skill-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}


/* Projects Section - Enhanced Only */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    border: 1px solid rgba(56, 189, 248, 0.3);
    overflow: hidden;
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.2);
}

.project-image {
    height: 200px;
    background: #0f172a;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    transition: var(--transition);
    /* Flex alignment handled by inline styles in HTML, but good to have fallback */
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-card:hover .image-placeholder {
    transform: scale(1.05);
}

/* Icon overlay for placeholders (pseudo-element) */
.project-image::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.project-info {
    padding: 1.5rem;
    position: relative;
    z-index: 2;
}

.project-info h3 {
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

.project-tags span {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.2);
    color: var(--accent-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition);
}

.project-tags span:hover {
    background: rgba(56, 189, 248, 0.2);
    transform: scale(1.05);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: white;
    font-weight: 600;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.project-link:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--bg-color);
    transform: translateY(-2px);
}


/* Contact Section */
.contact-container {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-container p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.contact-details {
    margin: 2rem 0;
    text-align: left;
    display: inline-block;
}

.contact-details p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-details i {
    color: var(--secondary-color);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
}

.social-links a {
    color: var(--text-color);
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.social-links svg {
    width: 32px;
    height: 32px;
}


/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    background: #050505;
    color: #666;
    font-size: 0.9rem;
}

/* Timeline / Education */
.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    width: 2px;
    height: 100%;
    background: var(--card-border);
}

.timeline-item {
    position: relative;
    padding-left: 50px;
    margin-bottom: 3rem;
    animation: fadeIn 0.5s ease-out forwards;
}

.timeline-dot {
    position: absolute;
    left: 11px;
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--secondary-color);
    border-radius: 50%;
    border: 4px solid var(--bg-color);
    box-shadow: 0 0 0 2px var(--secondary-color);
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.timeline-content {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--card-border);
    transition: var(--transition);
}

.timeline-content:hover {
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.timeline-content h3 {
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.timeline-content p {
    margin-bottom: 0.5rem;
    color: #a0a0a0;
}

/* Button Outline */
.btn.outline {
    background: transparent;
    border: 2px solid var(--card-border);
    color: var(--text-color);
}

.btn.outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Utilities */
.section-title {
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

.category-title {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
}

/* Certificates Section */
.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.certificate-card {
    background: #1e293b;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.certificate-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 25px -5px rgba(56, 189, 248, 0.15), 0 10px 10px -5px rgba(56, 189, 248, 0.04);
}

.certificate-img-wrapper {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
}

.certificate-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.certificate-card:hover img {
    transform: scale(1.1);
}

.certificate-card p {
    font-size: 1rem;
    padding: 1.25rem;
    color: #e2e8f0;
    font-weight: 600;
    text-align: center;
    background: linear-gradient(to bottom, #1e293b, #0f172a);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
}

#back-to-top.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

#back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(56, 189, 248, 0.6);
}

#back-to-top i {
    width: 28px;
    height: 28px;
    stroke-width: 2.5px;
}

/* Footer overrides */
footer {
    padding: 3rem 5%;
    text-align: center;
    border-top: 1px solid var(--card-border);
    margin-top: 4rem;
    font-size: 0.95rem;
    color: var(--secondary-color);
    background: linear-gradient(to bottom, var(--bg-color), #0f172a);
}

/* Image Modal (Lightbox) */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 900px;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
    font-size: 1.2rem;
    font-weight: 500;
}

.modal-content,
#caption {
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2001;
}

.close:hover,
.close:focus {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}

@media only screen and (max-width: 700px) {
    .modal-content {
        width: 100%;
    }
}