/* =========================================
   CSS Reset & Variables
   ========================================= */
:root {
    --bg-color: #020617;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent-primary: #10b981;   /* Emerald */
    --accent-secondary: #06b6d4; /* Cyan */
    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.08);
    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* =========================================
   Typography & Utilities
   ========================================= */
h1, h2, h3, .logo {
    font-family: var(--font-heading);
}

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

.section {
    padding: 100px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 3rem;
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.title-underline {
    height: 4px;
    width: 60px;
    background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary));
    margin: 0 auto;
    border-radius: 2px;
}

/* Glassmorphism Card */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* =========================================
   Navigation
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 5%;
    z-index: 100;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition-smooth);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    text-decoration: none;
    color: var(--text-main);
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

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

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-main);
}

/* Active nav indicator */
.nav-links a.active:not(.btn-primary-outline) {
    color: var(--accent-primary);
}

/* Hamburger Button */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 101;
}

.ham-line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: var(--transition-smooth);
    transform-origin: center;
}

.hamburger.open .ham-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger.open .ham-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.hamburger.open .ham-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
}

.mobile-menu.open {
    max-height: 300px;
    padding-bottom: 1rem;
}

.mobile-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 1rem;
}

.mobile-link {
    display: block;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    transition: var(--transition-smooth);
}

.mobile-link:hover {
    color: var(--text-main);
    background: rgba(255,255,255, 0.05);
}

/* =========================================
   Buttons
   ========================================= */
.btn-primary, .btn-primary-outline, .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
    font-size: 1rem;
    font-family: var(--font-sans);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
    color: white;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.25);
}

.btn-primary:hover {
    box-shadow: 0 6px 25px rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}

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

.btn-primary-outline:hover {
    background: rgba(16, 185, 129, 0.1);
}

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
}

.resume-btn {
    margin-top: 2rem;
    display: inline-flex;
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
}

.hero-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    max-width: 1200px;
    width: 100%;
    z-index: 2;
}

.hero-content {
    flex: 1;
    max-width: 650px;
}

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

.profile-image {
    width: 100%;
    max-width: 350px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 20px;
    border: 4px solid var(--glass-border);
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.2);
    position: relative;
    z-index: 2;
    transition: var(--transition-smooth);
}

.profile-image:hover {
    transform: scale(1.02);
    box-shadow: 0 0 60px rgba(6, 182, 212, 0.3);
    border-color: rgba(6, 182, 212, 0.5);
}

/* Glowing ring behind profile */
.profile-ring {
    position: absolute;
    width: 370px;
    height: 370px;
    border-radius: 24px;
    border: 2px solid transparent;
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    animation: spin-ring 8s linear infinite;
    z-index: 1;
    opacity: 0.5;
}

@keyframes spin-ring {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2.5rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.social-link:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    background: rgba(16, 185, 129, 0.08);
    transform: translateY(-3px);
}

/* Background Blobs */
.blur-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: 0;
    opacity: 0.4;
    animation: float 10s infinite alternate ease-in-out;
}

.blob-1 {
    top: 10%;
    left: 10%;
    width: 400px;
    height: 400px;
    background: var(--accent-primary);
}

.blob-2 {
    bottom: 20%;
    right: 10%;
    width: 300px;
    height: 300px;
    background: var(--accent-secondary);
    animation-delay: -5s;
}

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

/* =========================================
   About Section
   ========================================= */
.about-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 2rem;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.about-stats {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
}

.stat-item {}

.stat-label {
    color: var(--accent-secondary);
    margin-bottom: 0.4rem;
    font-family: var(--font-heading);
    font-size: 0.95rem;
}

.stat-value {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.stat-open {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-primary) !important;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
    70%  { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Skill Tags */
.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skills-card-title {
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.tag {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.tag:hover {
    color: var(--text-main);
    border-color: var(--accent-primary);
    background: rgba(16, 185, 129, 0.08);
}

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

.project-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
}

.project-card:hover {
    transform: translateY(-6px);
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 12px 40px rgba(16, 185, 129, 0.1);
}

/* Project Icon Banner */
.project-icon-banner {
    width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px 20px 0 0;
    flex-shrink: 0;
}

.project-banner-1 {
    background: linear-gradient(135deg, rgba(16,185,129,0.15), rgba(6,182,212,0.15));
    color: var(--accent-primary);
}
.project-banner-2 {
    background: linear-gradient(135deg, rgba(6,182,212,0.15), rgba(99,102,241,0.15));
    color: var(--accent-secondary);
}
.project-banner-3 {
    background: linear-gradient(135deg, rgba(245,158,11,0.15), rgba(239,68,68,0.15));
    color: #f59e0b;
}

.project-info {
    padding: 1.8rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-title {
    font-size: 1.3rem;
    color: var(--accent-primary);
    margin-bottom: 0.25rem;
}

.project-date {
    font-size: 0.85rem;
    color: var(--accent-secondary);
    margin-bottom: 1rem;
}

.project-info p {
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.project-tech {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 1.2rem;
}

.project-tech span {
    font-size: 0.75rem;
    color: var(--accent-primary);
    background: rgba(16, 185, 129, 0.1);
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* =========================================
   Contact Section
   ========================================= */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--text-muted);
    margin-bottom: 1.2rem;
}

.contact-socials {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.contact-social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    transition: var(--transition-smooth);
}

.contact-social-link:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    background: rgba(16, 185, 129, 0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-main);
    font-family: var(--font-sans);
    transition: var(--transition-smooth);
    font-size: 1rem;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(255,255,255,0.05);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.submit-btn {
    width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Loader Animation */
.loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    position: absolute;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.form-message {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.8rem;
    border-radius: 8px;
    display: none;
}

.form-message.success {
    display: block;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.form-message.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* =========================================
   Footer
   ========================================= */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    border-top: 1px solid var(--glass-border);
    margin-top: 50px;
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition-smooth);
    font-size: 0.85rem;
}

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

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 768px) {
    /* Show hamburger, hide desktop nav */
    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu {
        display: block;
    }

    /* Hero */
    .hero-layout {
        flex-direction: column-reverse;
        text-align: center;
        gap: 2rem;
        margin-top: 3rem;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-cta {
        justify-content: center;
        flex-direction: column;
        align-items: center;
    }

    .social-links {
        justify-content: center;
    }

    .profile-image {
        max-width: 220px;
    }

    .profile-ring {
        width: 240px;
        height: 240px;
    }

    /* About & Contact */
    .about-grid, .contact-container {
        grid-template-columns: 1fr;
    }

    .resume-btn {
        justify-content: center;
    }

    /* Section headings */
    .section-title {
        font-size: 2rem;
    }
}
