/* style.css */
:root {
    --bg-color: #0b1120;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --primary-color: #ec4899; /* Pink */
    --secondary-color: #8b5cf6; /* Purple */
    --card-bg: #1e293b;
    --header-bg: rgba(11, 17, 32, 0.9);
    --gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

body.light-mode {
    --bg-color: #f8fafc;
    --text-color: #0f172a;
    --text-muted: #475569;
    --card-bg: #ffffff;
    --header-bg: rgba(248, 250, 252, 0.9);
}

html {
    scroll-behavior: smooth;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Typography & Utilities */
.highlight {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    font-weight: 700;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.primary-btn {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.5);
}

.secondary-btn {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--text-color);
}

.secondary-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* Navbar */
header {
    padding: 1.5rem 5%;
    position: sticky;
    top: 0;
    background-color: var(--header-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}

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

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 400;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

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

.theme-toggle {
    cursor: pointer;
    color: var(--primary-color);
    font-size: 1.4rem;
    transition: all 0.3s ease;
}

.nav-extra {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Sections Base */
section {
    padding: 5rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Hero Section */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 80vh;
    gap: 2rem;
}

.hero-text {
    flex: 1;
}

.hero-text .greeting {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-text h2 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 2rem;
    font-weight: 700;
}

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

.blob-bg {
    position: absolute;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: transparent;
    z-index: 0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 4px solid transparent;
    background-image: linear-gradient(var(--bg-color), var(--bg-color)), var(--gradient);
    background-origin: border-box;
    background-clip: content-box, border-box;
    box-shadow: 0 0 30px rgba(236, 72, 153, 0.4), inset 0 0 30px rgba(139, 92, 246, 0.4);
}

.hero-image img {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    position: relative;
    z-index: 1;
    object-fit: cover;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); }
    100% { transform: translate(-50%, -50%) scale(1.1); }
}

/* About Section */
.about-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

.about-image {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
}

.blob-bg-2 {
    position: absolute;
    width: 350px;
    height: 350px;
    background: var(--gradient);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    z-index: -1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.6;
    filter: blur(30px);
}

.about-image img {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    z-index: 1;
    object-fit: cover;
}

.about-text {
    flex: 1;
}

.about-text .section-title {
    text-align: left;
    margin-bottom: 1.5rem;
}

.about-text p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.8;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    justify-items: center;
}

.skill-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    width: 100%;
    max-width: 250px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: var(--primary-color);
}

.skill-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.html-icon { color: #e34c26; }
.css-icon { color: #264de4; }
.js-icon { color: #f0db4f; }
.react-icon { color: #61dafb; }

.skill-card p {
    font-weight: 600;
    font-size: 1.2rem;
}

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

.portfolio-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.portfolio-card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(236, 72, 153, 0.2);
    border-color: var(--primary-color);
}

.portfolio-img-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.portfolio-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: rgba(0, 0, 0, 0.05);
    transition: transform 0.5s ease;
}

.portfolio-card:hover .portfolio-img {
    transform: scale(1.05);
}

.portfolio-info {
    padding: 1.5rem;
}

.portfolio-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.portfolio-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
}

.live-demo-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(236, 72, 153, 0.1);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Detail Section */
#project-detail {
    min-height: 100vh;
    background-color: var(--bg-color);
}

.hidden {
    display: none !important;
}

.detail-content {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

#detail-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.detail-image-container {
    width: 100%;
    max-height: 60vh;
    overflow: hidden;
    border-radius: 20px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

#detail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-description {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-description h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.detail-description p {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.8;
}

footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: 3rem;
}

/* Responsive */
@media (max-width: 992px) {
    .hero-text h2 {
        font-size: 3rem;
    }
    
    .blob-bg, .blob-bg-2 {
        width: 300px;
        height: 300px;
    }
    
    .hero-image img, .about-image img {
        max-width: 280px;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-links {
        position: fixed;
        right: -100%;
        top: 80px;
        flex-direction: column;
        background: var(--card-bg);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        padding: 2rem 0;
        gap: 1.5rem;
    }

    .nav-links.active {
        right: 0;
    }

    .hero-section, .about-section {
        flex-direction: column-reverse;
        text-align: center;
        gap: 3rem;
    }

    .about-section {
        flex-direction: column;
    }

    .hero-text h2 {
        font-size: 2.5rem;
    }

    .hero-text .greeting {
        justify-content: center;
    }

    .about-text .section-title {
        text-align: center;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-text h2 {
        font-size: 2rem;
    }
    
    .blob-bg, .blob-bg-2 {
        width: 250px;
        height: 250px;
    }
    
    .hero-image img, .about-image img {
        max-width: 220px;
    }
    
    section {
        padding: 3rem 5%;
    }
}

/* --- Certificates Section --- */
.certificates-section {
    overflow: hidden;
    position: relative;
}

.cert-slider-container {
    width: 100%;
    overflow: hidden;
    padding: 2rem 0;
}

.cert-track {
    display: flex;
    width: max-content;
    animation: scroll 60s linear infinite;
}

.cert-track:hover {
    animation-play-state: paused;
}

.cert-slide {
    display: flex;
    gap: 2rem;
    padding-right: 2rem;
}

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

.cert-card-new {
    /* Inherits .portfolio-card */
    display: flex;
    flex-direction: column;
}

.cert-slide .portfolio-card.cert-card-new {
    width: 280px;
    flex-shrink: 0;
}

.cert-img-container {
    width: 100%;
    height: 180px;
    position: relative;
    overflow: hidden;
    background: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cert-thumbnail-iframe {
    width: 142%;
    height: 300px;
    border: none;
    transform: scale(0.7);
    transform-origin: top left;
    pointer-events: none;
}

.cert-thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 2;
}

.cert-info-new {
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.cert-info-new h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Modals */
.cert-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 17, 32, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.cert-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.cert-modal-content {
    background: var(--card-bg);
    border-radius: 20px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    padding: 1.5rem;
    position: relative;
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 30px rgba(236, 72, 153, 0.3);
    transform: scale(1);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cert-modal.hidden .cert-modal-content {
    transform: scale(0.9);
}

.all-certs-content {
    max-width: 1000px;
    overflow-y: auto;
}

.cert-close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.3s;
    z-index: 10;
}

.cert-close-btn:hover {
    color: var(--primary-color);
}

.iframe-container {
    width: 100%;
    height: 75vh;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 1rem;
}

.iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.all-certs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

