/* ==================== RESET & BASE STYLES ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette - Soft & Elegant */
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --dark-bg: #0f172a;
    --light-bg: #f8fafc;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --white: #ffffff;
    --overlay: rgba(15, 23, 42, 0.7);
    
    /* Spacing */
    --section-padding: 80px 0;
    --container-padding: 0 20px;
    
    /* Transitions */
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--container-padding);
}

/* ==================== NAVIGATION ==================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

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

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

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    transition: var(--transition);
}

/* ==================== HERO SECTION ==================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('herosection.jpg') center/cover no-repeat;
    position: relative;
    margin-top: 70px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(4px);
}
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    padding: 0 20px;
    max-width: 900px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 30px;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s backwards;
}

.btn-primary {
    display: inline-block;
    padding: 15px 40px;
    background: var(--white);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    animation: fadeInUp 1s ease 0.4s backwards;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.3);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: bounce 2s infinite;
}

.scroll-indicator i {
    font-size: 2rem;
    color: var(--white);
}

/* ==================== ABOUT SECTION ==================== */
.about {
    padding: var(--section-padding);
    background: var(--light-bg);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 50px;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image img {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto;
    border: 5px solid #667eea;
}

.image-placeholder i {
    font-size: 4rem;
    margin-bottom: 10px;
}
.about-text h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.about-text p {
    margin-bottom: 15px;
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-text strong {
    color: var(--primary-color);
}

.about-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 25px;
}

.skill-tag {
    padding: 8px 20px;
    background: var(--white);
    border-radius: 50px;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.1);
}

/* ==================== PROJECTS SECTION ==================== */
.projects {
    padding: var(--section-padding);
    background: var(--white);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.project-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.project-image .image-placeholder {
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.project-image .image-placeholder i {
    font-size: 3rem;
    margin-bottom: 10px;
}

.project-image img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    object-position: center;
    display: block;
}

.project-info {
    padding: 25px;
}

.project-info h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.project-info p {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tag {
    padding: 5px 15px;
    background: var(--light-bg);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 500;
}

.btn-secondary {
    display: inline-block;
    padding: 10px 25px;
    background: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--secondary-color);
    transform: translateX(5px);
}

/* ==================== WRITING SECTION (Updated) ==================== */
.writing {
    padding: var(--section-padding);
    background: var(--light-bg);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.article-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.article-image {
    position: relative;
    width: 100%;
}

.article-image .image-placeholder {
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.article-image .image-placeholder i {
    font-size: 3rem;
    margin-bottom: 10px;
}

.article-image img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    object-position: center;
    display: block;
}

.article-type {
    position: absolute;
    top: 15px;
    left: 15px;
}
.article-type {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-type.blog {
    background: #3b82f6;
}

.article-type.tutorial {
    background: #10b981;
}

.article-type.script {
    background: #f59e0b;
}

.article-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.article-content h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--text-dark);
    line-height: 1.4;
}

.article-excerpt {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.article-meta {
    display: flex;
    gap: 20px;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--light-bg);
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-meta i {
    color: var(--primary-color);
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--dark-bg);
    color: var(--white);
    padding: 60px 0 30px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.footer-info h3 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.footer-info p {
    color: var(--text-light);
}

.footer-social {
    display: flex;
    gap: 20px;
}

.social-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.3rem;
    text-decoration: none;
    transition: var(--transition);
}

.social-icon:hover {
    background: var(--primary-color);
    transform: translateY(-5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 20px 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .about-content {
        grid-template-columns: 1fr !important;
        text-align: center;
        gap: 2rem;
    }
    
    .about-image img {
        width: 250px !important;
        height: 250px !important;
        margin: 0 auto 1.5rem;
    }
    
    .about-text h3 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .about-text p {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 1rem;
    }
    
    .about-skills {
        justify-content: center;
        gap: 0.6rem;
    }
    
    .skill-tag {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        max-width: 100%;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}