/* --- style.css --- */

:root {
    --bg-dark: #0f172a; /* Dark Slate Blue */
    --bg-card: rgba(30, 41, 59, 0.6); /* Semi-transparent Slate */
    --border-color: rgba(71, 85, 105, 0.5); /* Slate border */
    --text-primary: #f1f5f9; /* Light Slate */
    --text-secondary: #94a3b8; /* Medium Slate */
    --primary-purple: #a855f7; /* Vibrant Purple */
    --primary-pink: #ec4899; /* Vibrant Pink */
    --primary-glow: rgba(168, 85, 247, 0.4); /* Glow effect color */
    --primary-gradient: linear-gradient(45deg, var(--primary-purple), var(--primary-pink));
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    background: var(--bg-dark);
    color: var(--text-primary);
}

/* Animated Particle Canvas Background */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: var(--bg-dark); 
}

/* Glass Card Base Style */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.glass-card:hover {
    border-color: var(--primary-purple);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 30px var(--primary-glow);
}

/* 3D Tilt Card Style */
.tilt-card {
    transform-style: preserve-3d;
    will-change: transform;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 5%;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s;
}

nav.scrolled {
    padding: 0.75rem 5%;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
}

.nav-content {
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    cursor: pointer;
    transition: transform 0.3s;
}

.logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
    padding: 0.5rem 0;
    font-weight: 600;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: width 0.3s;
}

.nav-links a:hover {
    color: white;
}

.nav-links a:hover::after {
    width: 100%;
}

.btn-nav-cta {
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
    margin-left: 1rem;
}

.btn-nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-nav-cta::after {
    display: none;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Buttons */
.btn {
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 5px 20px rgba(168, 85, 247, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px var(--primary-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--primary-purple);
}

.btn-secondary:hover {
    background: rgba(168, 85, 247, 0.1);
    transform: translateY(-3px);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 5% 4rem;
    position: relative;
}

.hero-content {
    max-width: 1320px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 4.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary-purple), var(--primary-pink), #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: slideInLeft 1s ease;
    line-height: 1.2;
}

.hero-text .tagline {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--primary-purple);
    margin-bottom: 2rem;
    animation: slideInLeft 1s ease 0.2s backwards;
}

.hero-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    animation: slideInLeft 1s ease 0.4s backwards;
    max-width: 600px;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    animation: slideInLeft 1s ease 0.6s backwards;
}

.hero-visual {
    position: relative;
    animation: slideInRight 1s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 2rem;
    transition: all 0.3s;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.profile-image {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    border: 7px solid var(--primary-purple);
    object-fit: cover;
    animation: pulse-glow 3s ease-in-out infinite; 
    box-shadow: 0 0 50px var(--primary-glow);
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 40px var(--primary-glow);
        border-color: var(--primary-purple);
    }
    50% {
        box-shadow: 0 0 70px rgba(168, 85, 247, 0.7);
        border-color: var(--primary-pink);
    }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* General Sections */
.section {
    padding: 6rem 5%;
    position: relative;
}

.section-container {
    max-width: 1320px;
    margin: 0 auto;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 4rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Skills Section */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.skill-category-group {
    padding: 2.5rem;
}

.skill-category-group:hover {
    transform: translateY(-5px); 
}

.skill-category-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 0.75rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    border-bottom: 2px solid var(--border-color);
}

.skill-category-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--primary-gradient);
}

.skill-pills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.4);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: default;
}

.skill-pill:hover {
    background: var(--primary-purple);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px var(--primary-glow);
    border-color: var(--primary-purple);
}

.skill-pill svg {
    width: 16px;
    height: 16px;
    color: var(--primary-pink);
    transition: all 0.3s ease;
}

.skill-pill:hover svg {
    color: white;
}

/* Languages Section */
.languages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.language-card {
    padding: 2.5rem;
    text-align: center;
    transition: all 0.3s;
}

.language-card:hover {
    transform: translateY(-10px);
}

.language-card:hover .language-icon svg {
    color: var(--primary-pink);
    transform: scale(1.1);
}

.language-icon svg {
    width: 48px;
    height: 48px;
    margin-bottom: 1.5rem;
    color: var(--primary-purple);
    transition: all 0.3s;
}

.language-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.language-card p {
    color: var(--text-secondary);
    font-style: italic;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.project-card {
    overflow: hidden;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background-color: var(--bg-dark);
    position: relative;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-image-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-gradient);
    font-size: 4rem;
    font-weight: 600;
    color: white;
}

.project-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.project-desc {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex-grow: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    background: rgba(168, 85, 247, 0.2);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-purple);
}

.project-card .btn-primary {
    padding: 0.8rem 1.5rem;
    align-self: flex-start;
}

/* Experience & Education (Timeline) */
.timeline {
    position: relative;
    padding-left: 50px;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-gradient);
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding: 2.5rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -47px;
    top: 2.5rem;
    width: 15px;
    height: 15px;
    background: var(--primary-pink);
    border-radius: 50%;
    border: 3px solid var(--bg-dark);
    box-shadow: 0 0 20px rgba(219, 39, 119, 0.5);
    z-index: 1;
}

.timeline-item:hover {
    transform: translateX(10px);
}

.timeline-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.timeline-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.timeline-subtitle {
    color: var(--primary-purple);
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.timeline-item p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Courses Section */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.course-card {
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.course-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    flex-grow: 1;
}

.course-card p {
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 1.5rem;
}

.course-card a {
    padding: 0.8rem 1.5rem;
    align-self: flex-start;
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.contact-card {
    padding: 2.5rem;
    text-align: center;
    transition: all 0.3s;
    text-decoration: none;
    color: var(--text-primary);
}

.contact-card:hover {
    transform: translateY(-10px);
}

.contact-card:hover .contact-icon svg {
    color: var(--primary-pink);
    transform: scale(1.1);
}

.contact-icon svg {
    width: 48px;
    height: 48px;
    margin-bottom: 1.5rem;
    color: var(--primary-purple);
    transition: all 0.3s;
}

.contact-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.contact-card p {
    color: var(--text-secondary);
    word-break: break-all;
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem 2rem;
    background: rgba(15, 23, 42, 0.8);
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.footer-socials a {
    color: var(--text-secondary);
    transition: all 0.3s;
}

.footer-socials a:hover {
    color: var(--primary-purple);
    transform: scale(1.1);
}

.footer-socials svg {
    width: 28px;
    height: 28px;
}

footer p {
    color: var(--text-secondary);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--primary-purple);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-pink);
}

/* --- Project Detail Page Specific Styles --- */

.project-detail-section {
    padding-top: 8rem;
    min-height: 100vh;
}

.project-detail-card {
    padding: 3rem 4rem;
}

.project-detail-header h1 {
    font-size: 3rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.project-links .btn {
    padding: 0.8rem 2rem;
}

.project-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-top: 2rem;
    margin-bottom: 3rem;
}

.project-description h3, .project-description h4 {
    color: var(--text-primary);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.75rem;
    margin-bottom: 2rem;
    margin-top: 3rem;
    position: relative;
}

.section-subtitle::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--primary-gradient);
}

.project-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    display: block;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.gallery-item:hover {
    transform: scale(1.03);
    border-color: var(--primary-purple);
    box-shadow: 0 8px 30px var(--primary-glow);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.back-link {
    display: inline-block;
    margin-top: 3rem;
    text-align: center;
}

.back-link .btn-secondary {
    padding: 0.8rem 2rem;
}

/* Animation class */
.fade-in-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-element.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }
    .hero-text {
        order: 2;
    }
    .hero-visual {
        order: 1;
    }
    .hero-text p {
        margin-left: auto;
        margin-right: auto;
    }
    .cta-buttons {
        justify-content: center;
    }
    .profile-image {
        width: 250px;
        height: 250px;
    }
    .hero-text h1 {
        font-size: 3.5rem;
    }
    .hero-text .tagline {
        font-size: 1.5rem;
    }
    .btn-nav-cta {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 68px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 68px);
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: left 0.3s ease;
        gap: 3rem;
    }
    
    nav.scrolled .nav-links {
        top: 60px;
        height: calc(100vh - 60px);
    }

    .nav-links.active {
        left: 0;
    }
    
    .nav-links a {
        font-size: 1.2rem;
    }

    .menu-toggle {
        display: flex;
    }

    .section {
        padding: 4rem 5%;
    }

    .section-title {
        font-size: 2.5rem;
        margin-bottom: 3rem;
    }

    .projects-grid, .skills-container, .languages-grid, .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline {
        padding-left: 30px;
    }

    .timeline::before {
        left: 10px;
    }

    .timeline-item::before {
        left: -37px;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }

    /* Detail Page Mobile */
    .project-detail-section {
        padding-top: 6rem;
    }
    
    .project-detail-card {
        padding: 2rem;
    }
    
    .project-detail-header h1 {
        font-size: 2.2rem;
    }
    
    .project-description {
        font-size: 1rem;
    }
    
    .project-gallery-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 2.2rem;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .btn {
        width: 100%;
    }
    
    .profile-image {
        width: 200px;
        height: 200px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .timeline-item {
        padding: 1.5rem;
    }
    
    .timeline-title {
        font-size: 1.25rem;
    }
    
    .timeline-subtitle {
        font-size: 1rem;
    }
}