@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@300;400;500;600;700&family=Sora:wght@300;400;600;700;800&display=swap');

:root {
    /* New Dark Premium Palette */
    --bg-dark: #020617;
    --surface: #0f172a;
    --primary: #22d3ee; /* Cyan */
    --primary-glow: rgba(34, 211, 238, 0.4);
    --secondary: #818cf8; /* Indigo */
    --secondary-glow: rgba(129, 140, 248, 0.4);
    --accent: #f472b6; /* Pink accent for micro-elements */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --border-color: rgba(30, 41, 59, 1);
    --shadow-soft: 0 4px 20px -2px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    --transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 92%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

/* -------------------------------------------------------------------------- */
/* Dynamic Mesh Background
/* -------------------------------------------------------------------------- */
.bg-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at 0% 0%, rgba(34, 211, 238, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 100% 100%, rgba(129, 140, 248, 0.08) 0%, transparent 50%);
}

.blob {
    position: absolute;
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    filter: blur(120px);
    border-radius: 50%;
    opacity: 0.1;
    z-index: -1;
    animation: move 20s infinite alternate;
}

@keyframes move {
    0% { transform: translate(-10%, -10%); }
    100% { transform: translate(100%, 100%); }
}

/* -------------------------------------------------------------------------- */
/* Typography
/* -------------------------------------------------------------------------- */
h1, h2, h3 {
    font-family: 'Sora', sans-serif;
    font-weight: 800;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* -------------------------------------------------------------------------- */
/* Navbar Glassmorphism
/* -------------------------------------------------------------------------- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    z-index: 1000;
    transition: var(--transition);
}

nav.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    height: 70px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: 'Sora', sans-serif;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-muted);
    position: relative;
    text-decoration: none;
    transition: var(--transition);
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

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

.menu-btn {
    display: none;
    cursor: pointer;
    font-size: 1.8rem;
}

/* -------------------------------------------------------------------------- */
/* Hero Section
/* -------------------------------------------------------------------------- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
}

.hero .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 50px;
}

.hero-content {
    flex: 1.2;
}

.hero-visual {
    flex: 0.8;
    display: flex;
    justify-content: center;
    position: relative;
}

.hero h1 {
    font-size: 5rem;
    line-height: 1;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 550px;
}

.hero-blob-wrap {
    position: relative;
    width: 400px;
    height: 400px;
}

.hero-blob {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: morph 8s ease-in-out infinite alternate;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 50px var(--primary-glow);
}

.hero-blob img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    transform: scale(1.05);
    transform-origin: center 35%;
}

@keyframes morph {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    50% { border-radius: 66% 34% 33% 67% / 65% 57% 43% 35%; }
    100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
}

.btn-group {
    display: flex;
    gap: 20px;
}

.btn {
    padding: 16px 36px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    box-shadow: 0 10px 30px -10px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -10px var(--primary-glow);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn-outline:hover {
    border-color: var(--primary);
    background: rgba(34, 211, 238, 0.05);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* -------------------------------------------------------------------------- */
/* Glass Components
/* -------------------------------------------------------------------------- */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 50px;
    transition: var(--transition);
    box-shadow: var(--shadow-soft);
}

.glass-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
    box-shadow: var(--shadow-lg);
}

/* -------------------------------------------------------------------------- */
/* About Section Zigzag
/* -------------------------------------------------------------------------- */
.section-title {
    text-align: center;
    margin-bottom: 70px;
}

.section-title h2 {
    font-size: 3rem;
    margin-bottom: 15px;
}

.section-line {
    width: 60px;
    height: 6px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    margin: 0 auto;
    border-radius: 10px;
}

.about-split {
    display: flex;
    align-items: center;
    gap: 60px;
}

.about-text {
    flex: 1;
}

.about-text h3 {
    margin-bottom: 20px;
    font-size: 2rem;
}

.about-stats {
    flex: 0.8;
    text-align: center;
    position: relative;
}

.stat-icon {
    font-size: 10rem;
    color: var(--primary);
    opacity: 0.05;
    position: absolute;
    top: -50px;
    right: 20px;
    z-index: -1;
}

.about-split.reverse {
    flex-direction: row-reverse;
}

.about-points {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

.point-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    font-weight: 500;
}

.point-item i {
    color: var(--primary);
}

/* -------------------------------------------------------------------------- */
/* Skills Badge
/* -------------------------------------------------------------------------- */
.skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.skill-badge {
    background: var(--surface);
    padding: 24px;
    border-radius: 24px;
    text-align: center;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.skill-badge:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 10px 30px var(--primary-glow);
}

.skill-badge i {
    font-size: 2rem;
}

/* -------------------------------------------------------------------------- */
/* Timeline
/* -------------------------------------------------------------------------- */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding-left: 50px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    border-radius: 10px;
}

.timeline-item {
    margin-bottom: 50px;
    position: relative;
}

.timeline-dot {
    position: absolute;
    left: -48px;
    top: 0;
    width: 18px;
    height: 18px;
    background: var(--bg-dark);
    border: 4px solid var(--primary);
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 0 15px var(--primary-glow);
}

/* -------------------------------------------------------------------------- */
/* Projects Overlay
/* -------------------------------------------------------------------------- */
.project-card {
    position: relative;
    height: 400px;
    border-radius: 32px;
    overflow: hidden;
    cursor: pointer;
}

.project-img {
    width: 100%;
    height: 100%;
    background: #eef2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: var(--primary);
    transition: var(--transition);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 40px;
    opacity: 1;
    transition: var(--transition);
}

.project-card:hover .project-img {
    transform: scale(1.1);
    filter: blur(5px);
}

.project-btn {
    margin-top: 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
}

.project-card:hover .project-btn {
    opacity: 1;
    transform: translateY(0);
}

/* -------------------------------------------------------------------------- */
/* Contact Section
/* -------------------------------------------------------------------------- */
.contact-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    width: 100%;
    margin-top: 40px;
}

.contact-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    padding: 30px;
    border-radius: 24px;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.contact-item:hover {
    background: var(--primary);
    color: var(--bg-dark);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--primary-glow);
}

/* -------------------------------------------------------------------------- */
/* Lightbox Overlay
/* -------------------------------------------------------------------------- */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    cursor: pointer;
    padding: 20px;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 16px;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 40px;
    right: 40px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

.lightbox-caption {
    position: absolute;
    bottom: 40px;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    background: rgba(0,0,0,0.5);
    padding: 10px 20px;
    border-radius: 10px;
}

/* -------------------------------------------------------------------------- */
/* Certificate Cards
/* -------------------------------------------------------------------------- */
.certificate-card {
    text-align: center;
    cursor: pointer;
}

.certificate-card .cert-preview {
    width: 100%;
    height: 180px;
    border-radius: 16px;
    margin-bottom: 20px;
    background: #f1f5f9;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.certificate-card .cert-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.certificate-card:hover .cert-preview img {
    transform: scale(1.1);
}

.skills-wrapper, .projects-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.experience-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
}

/* -------------------------------------------------------------------------- */
/* Utilities & Helper Classes
/* -------------------------------------------------------------------------- */
.sub-title {
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 10px;
}

.text-large {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 25px;
}

.stat-grid {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.stat-card {
    background: var(--surface);
    padding: 30px;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-soft);
    flex: 1;
}

.stat-card h4 {
    color: var(--primary);
    font-size: 2rem;
}

.stat-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.stat-card.offset {
    margin-top: 30px;
}

.section-alt {
    background: rgba(15, 23, 42, 0.3);
}

.footer-brand {
    color: var(--text-main);
    font-weight: 700;
}

.footer-copy {
    color: var(--text-muted);
    margin-top: 10px;
    font-size: 0.9rem;
}

/* -------------------------------------------------------------------------- */
/* Responsive Optimization
/* -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .hero h1 { font-size: 4rem; }
    .hero-blob-wrap { width: 350px; height: 350px; }
    .about-split { gap: 40px; }
    .experience-wrapper { gap: 30px; }
}

@media (max-width: 768px) {
    /* Container Frame Enhancement */
    .container { 
        width: 100%;
        padding: 0 15px;
        border-left: 1px solid var(--glass-border);
        border-right: 1px solid var(--glass-border);
        margin: 0 auto;
        max-width: 540px;
    }

    nav .container { 
        width: 90%; 
        border: none;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -110%; /* Hidden by default */
        width: 100%;
        height: 100vh;
        background: rgba(2, 6, 23, 0.98);
        backdrop-filter: blur(15px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        transition: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 999;
    }

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

    .menu-btn {
        display: block;
        z-index: 1001;
    }

    /* Hero Responsive */
    .hero { height: auto; padding: 140px 0 60px; }
    .hero .container { flex-direction: column-reverse; text-align: center; gap: 40px; border: none; }
    .hero h1 { font-size: 3rem; }
    .hero p { margin: 0 auto 30px; font-size: 1.1rem; }
    .btn-group { justify-content: center; flex-direction: column; width: 100%; }
    .btn { justify-content: center; width: 100%; }
    .hero-blob-wrap { width: 280px; height: 280px; }

    /* Sections Adjustment */
    section { padding: 60px 0; }
    .section-title h2 { font-size: 2.5rem; }
    .glass-card { 
        padding: 30px 20px; 
        border-radius: 24px; 
        border-color: rgba(255,255,255,0.12); /* Slightly more visible border */
    }

    .about-split { flex-direction: column; text-align: center; gap: 40px; }
    .about-points { grid-template-columns: 1fr; }
    
    .skills-wrapper, .experience-wrapper, .projects-wrapper {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .section-title { text-align: center; margin-bottom: 40px; }
    .section-title h2 { font-size: 2.2rem; }
    
    .contact-grid { 
        grid-template-columns: 1fr; 
        gap: 15px;
    }

    .contact-item {
        padding: 25px;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    .hero h1 { font-size: 2.5rem; }
    .hero-blob-wrap { width: 240px; height: 240px; }
    .section-title h2 { font-size: 1.8rem; }
    .skill-grid { 
        grid-template-columns: 1fr; 
        gap: 12px;
    }
    .skill-badge {
        padding: 20px;
        flex-direction: row;
        justify-content: flex-start;
        gap: 20px;
    }
    .skill-badge i { font-size: 1.5rem; }
    .glass-card { padding: 25px 15px; }
    
    .contact-item {
        padding: 20px 15px;
    }
}

/* -------------------------------------------------------------------------- */
/* Animations & Transitions
/* -------------------------------------------------------------------------- */
.reveal {
    position: relative;
    transform: translateY(30px);
    opacity: 0;
    transition: 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal.active {
    transform: translateY(0);
    opacity: 1;
}

@keyframes morph {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    50% { border-radius: 66% 34% 33% 67% / 65% 57% 43% 35%; }
    100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
}

/* -------------------------------------------------------------------------- */
/* Custom Section Styles
/* -------------------------------------------------------------------------- */
section {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

#home { padding-top: 160px; }

/* -------------------------------------------------------------------------- */
/* Lightbox Refresh
/* -------------------------------------------------------------------------- */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(12px);
    display: none;
    z-index: 2000;
    padding: 20px;
    align-items: center;
    justify-content: center;
}

.lightbox.active { display: flex; }

.lightbox-content {
    max-width: 90%;
    max-height: 70vh;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}
