/* ==========================================
   RESET & VARIABLE DEFINITION
   ========================================== */
:root {
    --bg-main: #0f172a; /* Dark Navy / Slate */
    --bg-card: #1e293b; /* Medium Dark Card */
    --bg-card-hover: #334155;
    --text-primary: #f8fafc; /* White / Bright Gray */
    --text-secondary: #94a3b8; /* Muted Gray */
    --accent: #38bdf8; /* Cyan Accent */
    --accent-glow: rgba(56, 189, 248, 0.25);
    --font-family: 'Poppins', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-family);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================
   TYPOGRAPHY & UTILITY BUTTONS
   ========================================== */
.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 45px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--accent);
    color: #0f172a;
}

.btn-primary:hover {
    background-color: #0284c7;
    color: #fff;
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn-outline {
    border-color: var(--accent);
    color: var(--accent);
    background: transparent;
}

.btn-outline:hover {
    background-color: var(--accent);
    color: #0f172a;
}

/* ==========================================
   NAVBAR
   ========================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 75px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--accent);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero-section {
    padding: 160px 0 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 50px;
    align-items: center;
}

.greeting {
    color: var(--accent);
    font-size: 1.2rem;
    font-weight: 500;
}

.name {
    font-size: 3.2rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 10px 0;
}

.role {
    font-size: 1.4rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-weight: 500;
}

.description {
    color: var(--text-secondary);
    margin-bottom: 35px;
    max-width: 520px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

.hero-image {
    display: flex;
    justify-content: center;
}

.img-wrapper {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    padding: 8px;
    background: linear-gradient(135deg, var(--accent), transparent);
    box-shadow: 0 0 35px var(--accent-glow);
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* ==========================================
   SKILLS / MARQUEE CAROUSEL SECTION
   ========================================== */
.skills-section {
    padding: 90px 0;
    background-color: rgba(30, 41, 59, 0.3);
    overflow: hidden;
}

.carousel-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 20px 0;
}

.carousel-container::before,
.carousel-container::after {
    content: "";
    position: absolute;
    top: 0;
    width: 120px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.carousel-container::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-main), transparent);
}

.carousel-container::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-main), transparent);
}

.carousel-track {
    display: flex;
    gap: 30px;
    width: max-content;
    animation: scrollMarquee 22s linear infinite;
}

.carousel-track:hover {
    animation-play-state: paused;
}

.skill-card {
    background-color: var(--bg-card);
    padding: 20px 35px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    white-space: nowrap;
}

.skill-icon {
    font-size: 1.8rem;
    color: var(--accent);
}

.skill-card span {
    font-weight: 500;
}

@keyframes scrollMarquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ==========================================
   PROJECTS SECTION
   ========================================== */
.projects-section {
    padding: 100px 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: var(--bg-card);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4), 0 0 20px var(--accent-glow);
    border-color: rgba(56, 189, 248, 0.3);
}

.project-img img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.project-content {
    padding: 25px;
}

.project-content h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.project-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.project-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.project-tags span {
    background-color: rgba(56, 189, 248, 0.1);
    color: var(--accent);
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 500;
}

.btn-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-link:hover {
    gap: 12px;
}

/* ==========================================
   CERTIFICATES SECTION
   ========================================== */
.certificates-section {
    padding: 100px 0;
    background-color: rgba(30, 41, 59, 0.2);
}

.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.certificate-card {
    background-color: var(--bg-card);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: var(--transition);
}

.certificate-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
}

.cert-img-wrapper {
    position: relative;
    overflow: hidden;
}

.cert-thumb {
    width: 100%;
    height: 210px;
    object-fit: cover;
    display: block;
    transition: var(--transition);
}

.cert-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition);
    color: var(--accent);
    font-size: 2.2rem;
}

.certificate-card:hover .cert-overlay {
    opacity: 1;
}

.certificate-card:hover .cert-thumb {
    transform: scale(1.06);
}

.cert-info {
    padding: 22px;
}

.cert-info h3 {
    font-size: 1.05rem;
    margin-bottom: 6px;
}

.cert-issuer {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.cert-date {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 500;
}

/* ==========================================
   LIGHTBOX MODAL
   ========================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(10px);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 85%;
    max-height: 75vh;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0,0,0,0.6);
}

#modal-caption {
    margin: auto;
    display: block;
    width: 80%;
    text-align: center;
    color: var(--text-primary);
    padding: 20px 0;
    font-size: 1.1rem;
    font-weight: 500;
}

.modal-close {
    position: absolute;
    top: 25px;
    right: 40px;
    color: var(--text-primary);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--accent);
}

/* ==========================================
   FOOTER & CONTACT
   ========================================== */
.footer-section {
    padding: 90px 0 35px;
    background-color: #0b1120;
    text-align: center;
}

.footer-title {
    font-size: 2.2rem;
    margin-bottom: 12px;
}

.footer-desc {
    color: var(--text-secondary);
    margin-bottom: 35px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 45px;
}

.social-links a {
    width: 48px;
    height: 48px;
    background-color: var(--bg-card);
    color: var(--text-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.social-links a:hover {
    background-color: var(--accent);
    color: #0f172a;
    transform: translateY(-4px);
    box-shadow: 0 0 20px var(--accent-glow);
}

.footer-divider {
    border: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 30px;
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ==========================================
   RESPONSIVE DESIGN (TABLET & MOBILE)
   ========================================== */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 75px;
        left: 0;
        width: 100%;
        background-color: var(--bg-card);
        flex-direction: column;
        align-items: center;
        padding: 25px 0;
        gap: 20px;
        display: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-links.active {
        display: flex;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-text {
        order: 2;
    }

    .hero-image {
        order: 1;
    }

    .hero-buttons {
        justify-content: center;
    }

    .name {
        font-size: 2.3rem;
    }

    .img-wrapper {
        width: 230px;
        height: 230px;
    }

    .modal-content {
        max-width: 95%;
    }
}
