/* 🎨 Elegance Grid Palette & Typography */
:root {
    --color-primary: #1a73e8; /* Google Blue - Professional & Trustworthy */
    --color-secondary: #ff6e40; /* Vibrant Accent Orange */
    --color-dark: #1f2937; /* Dark Grey for Background/Footer */
    --color-light: #ffffff;
    --color-text-dark: #374151; /* Dark text for light background */
    --color-text-light: #f3f4f6; /* Light text for dark background */
    --color-text-body: #4b5563; /* General paragraph text color */
    --font-heading: 'Rubik', sans-serif;
    --font-body: 'Inter', sans-serif;
    --color-code-bg: #282c34; /* Dark background for code block */
}

/* Base Setup */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}
body {
    font-family: var(--font-body);
    color: var(--color-text-dark);
    background-color: var(--color-light);
    overflow-x: hidden;
    line-height: 1.6;
}
section {
    padding: 120px 8%; /* Updated padding for modern look */
    position: relative;
}
a {
    text-decoration: none;
    color: var(--color-primary);
    transition: color 0.3s;
}
h1, h2, h3 {
    font-family: var(--font-heading);
    color: var(--color-dark);
}

/* ======================================= */
/* 🚀 1. HEADER (UNIVERSAL & RESPONSIVE) */
/* ======================================= */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 8%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}
nav .logo {
    font-size: 30px;
    font-weight: 700;
    color: var(--color-dark);
    letter-spacing: -0.5px;
}
nav .logo span {
    color: var(--color-primary);
}
nav ul {
    display: flex;
    gap: 35px;
    list-style: none;
    margin: 0;
}
nav ul li a {
    font-weight: 500;
    color: var(--color-text-dark);
    padding: 5px 0;
    position: relative;
    transition: all 0.3s;
}
nav ul li a:hover, nav ul li a.active {
    color: var(--color-primary);
}
nav ul li a.active::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background: var(--color-secondary);
    bottom: -8px;
    left: 0;
    border-radius: 2px;
}
/* Mobile Toggle Icon */
.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--color-dark);
}

/* ======================================= */
/* 2. BUTTONS (UNIVERSAL) */
/* ======================================= */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 14px 30px; /* Slightly larger buttons */
    border-radius: 5px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    text-transform: none; /* Removed uppercase */
}
.btn-primary {
    background: var(--color-primary);
    color: var(--color-light);
    border: 2px solid var(--color-primary);
    box-shadow: 0 8px 15px rgba(26, 115, 232, 0.3);
}
.btn-primary:hover {
    background: var(--color-dark);
    border-color: var(--color-dark);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}
.btn-secondary {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    margin-left: 15px;
}
.btn-secondary:hover {
    background: var(--color-primary);
    color: var(--color-light);
    box-shadow: 0 8px 15px rgba(26, 115, 232, 0.3);
}

/* ======================================= */
/* 3. SECTION HEADERS (UNIVERSAL) */
/* ======================================= */
.section-header {
    text-align: center;
    margin-bottom: 70px;
}
.section-header h2 {
    font-size: clamp(36px, 5vw, 54px);
    font-weight: 800;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}
.section-header h2::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 4px;
    background: var(--color-secondary);
    bottom: -10px;
    left: 25%;
    border-radius: 2px;
}
.section-header p {
    font-size: 18px;
    color: darkgray;
    max-width: 800px;
    margin: auto;
}

/* ======================================= */
/* 4. FOOTER (UNIVERSAL & RESPONSIVE) */
/* ======================================= */
footer {
    padding: 50px 8% 20px;
    background: var(--color-dark);
    color: darkgray;
    font-size: 14px;
}
.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr; /* Standard Desktop Layout */
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 30px;
}
.footer-col h4 {
    font-size: 18px;
    color: var(--color-primary);
    margin-bottom: 20px;
    font-weight: 700;
}
.footer-col p, .footer-col ul {
    font-size: 14px;
    color: #a0a7b4;
    list-style: none;
    padding: 0;
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
    color: #a0a7b4;
    transition: color 0.3s;
}
.footer-col ul li a:hover { color: var(--color-secondary); }
.footer-contact .item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
}
.footer-contact i {
    color: var(--color-secondary);
    margin-right: 10px;
    width: 20px;
    text-align: center;
    padding-top: 2px;
}
.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.social-links a {
    font-size: 20px;
    margin: 0 10px;
    color: #a0a7b4;
    transition: color 0.3s;
}
.social-links a:hover { color: var(--color-primary); }


/* ======================================= */
/* 5. HOME PAGE SPECIFIC STYLES (INDEX.HTML) */
/* ======================================= */

/* Hero Section */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    align-items: center;
    padding-top: 150px;
}
.hero-text h1 { font-size: clamp(45px, 6vw, 80px); line-height: 1.05; }
.hero-text span { color: var(--color-secondary); }
.hero-text p { font-size: 20px; color: darkgray; }
.code-block {
    width: 100%; max-width: 450px; height: 300px; background: var(--color-code-bg);
    border-radius: 10px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3); padding: 20px;
    overflow: hidden; position: relative; opacity: 0; transform: scale(0.95);
    font-family: monospace;
}
#code-output { color: #abb2bf; white-space: pre-wrap; font-size: 14px; line-height: 1.5; }
.code-block .tag { color: #e06c75; }
.code-block .attr { color: #98c379; }
.code-block .val { color: #d19a66; }
.code-block .comment { color: #5c6370; }
.code-block .cursor { display: inline-block; width: 8px; height: 14px; background: white; margin-left: 5px; }

/* Feature Grid */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.feature-card { padding: 30px; background: white; border: 1px solid #e5e7eb; border-top: 4px solid var(--color-primary); border-radius: 8px; opacity: 0; transform: translateY(30px); }
.feature-card ul { color: darkgray; }

/* Process Section */
#process { background-color: #f3f4f6; }
.process-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; max-width: 1200px; margin: auto; }
.step-number { background: var(--color-secondary); }

/* Technology Stack */
.tech-stack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 30px; max-width: 1000px; margin: auto; text-align: center; }
.tech-item { padding: 15px; border-radius: 8px; background: white; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05); opacity: 0; transform: translateY(30px); }

/* CTA Section */
#cta { background: var(--color-primary); color: white; text-align: center; }
#cta h2 { color: white; }
#cta .btn-primary { background: var(--color-secondary); border-color: var(--color-secondary); }


/* ======================================= */
/* 6. GENERAL PAGES LAYOUTS (OTHER PAGES) */
/* ======================================= */

.page-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.image-box img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}
.text-content p { color: darkgray; }

/* About Page Metrics */
#about-page .key-metrics { text-align: center; padding: 40px; background-color: #f3f4f6; border-radius: 12px; }
#about-page .metric-container { display: flex; justify-content: space-around; flex-wrap: wrap; }
#about-page .metric-item p:first-child { font-size: 48px; font-weight: 700; color: var(--color-secondary); }

/* Services Page Cards */
#services-grid .service-card { padding: 35px; background: #f9f9f9; border-left: 5px solid var(--color-primary); border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
#services-grid .service-card i { font-size: 45px; color: var(--color-primary); }
#services-grid .service-card p { color: darkgray; }

/* Portfolio Page */
.project-card { border-radius: 10px; overflow: hidden; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); transition: transform 0.3s ease-out; position: relative; }
.project-card:hover { transform: translateY(-5px); }
.project-card img { width: 100%; height: 250px; object-fit: cover; display: block; }
.project-info { padding: 20px; background: white; border-top: 4px solid var(--color-primary); }
.project-info p { color: #6b7280; }

/* Contact Page */
.contact-form-card { padding: 40px; background: #f9f9f9; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); }
.contact-form-card input, .contact-form-card textarea { font-family: var(--font-body); }
.info-box { background-color: #f3f4f6; padding: 40px; border-radius: 12px; }
.info-box h3 { color: var(--color-primary); }
.info-box i { color: var(--color-secondary); }


/* ========================================= */
/* 🌟 ANIMATION/REVEAL CLASSES (UNIVERSAL) */
/* ========================================= */
.section-reveal, .reveal-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.section-reveal.active, .reveal-item.active {
    opacity: 1;
    transform: translateY(0);
}
.anim-initial {
    opacity: 0;
    transform: translateY(30px);
}


/* ========================================= */
/* 📱 MEDIA QUERIES (RESPONSIVE OVERRIDES) */
/* ========================================= */
@media (max-width: 900px) {
    section { padding: 80px 5%; }
    
    /* 1. HEADER / NAVIGATION */
    nav { padding: 15px 5%; }
    nav ul {
        display: none; 
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        text-align: center;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        border-top: 1px solid #eee;
        z-index: 999;
    }
    nav ul.active { display: flex; }
    nav ul li { width: 100%; }
    nav ul li a {
        display: block;
        padding: 15px;
        border-bottom: 1px solid #f3f4f6;
        color: var(--color-dark);
    }
    .menu-toggle {
        display: block;
    }

    /* 2. PAGE LAYOUTS */
    .hero, .page-layout {
        grid-template-columns: 1fr;
        padding-top: 100px;
    }
    /* Hero order swap for mobile */
    .hero-visual { order: 1; margin-bottom: 50px; text-align: center; }
    .hero-text { order: 2; text-align: center; }
    
    /* Button stacking */
    .btn-secondary { margin-left: 0; margin-top: 15px; display: block; }
    .anim-buttons { text-align: center; }
    .code-block { max-width: 100%; height: 250px; margin: auto; }
    
    /* Process Section */
    .step-item:not(:last-child)::after { display: none !important; } /* Hide arrow connectors */

    /* 3. FOOTER */
    footer { padding: 40px 5% 15px; }
    .footer-container {
        grid-template-columns: 1fr; /* Stack all columns vertically */
        text-align: center;
        gap: 20px;
        margin-bottom: 20px;
    }
    .footer-col { margin-bottom: 10px; }
    .footer-col ul { text-align: center; padding: 0; }
    .footer-contact .item {
        justify-content: center; 
    }
}


.section-header {
    text-align: center;
    margin-bottom: 70px;
}
.section-header h2 {
    font-size: clamp(36px, 5vw, 54px);
    margin-bottom: 10px;
}
.section-header p {
    font-size: 18px;
    color: darkgray;
    max-width: 800px;
    margin: auto;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.feature-card {
    padding: 30px;
    background: white;
    border: 1px solid #e5e7eb;
    border-top: 4px solid var(--color-primary);
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
}

.feature-card ul li{
    color: darkgray;
}

.feature-card:hover {
    border-top-color: var(--color-secondary);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}
.feature-card i {
    font-size: 36px;
    color: var(--color-primary);
    margin-bottom: 15px;
}
.feature-card h3 {
    font-size: 22px;
    margin-bottom: 10px;
}
.feature-card ul {
    list-style: none;
    padding-left: 0;
    margin-top: 15px;
    font-size: 15px;
    color: darkgray;
}

#process { background-color: #f3f4f6; }
.process-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: auto;
}
.step-item {
    text-align: center;
    position: relative;
    padding: 20px;
    opacity: 0;
    transform: translateY(30px);
}
.step-item p {
    color: darkgray !important;
}
.step-item:not(:last-child)::after {
    content: '\f0da';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50px;
    right: -25px;
    color: var(--color-primary);
    font-size: 30px;
    display: none; /* Controlled by media query */
}
@media (min-width: 1000px) {
    .step-item:not(:last-child)::after { display: block; }
}
.step-number {
    width: 60px;
    height: 60px;
    background: var(--color-secondary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    margin: 0 auto 15px;
    box-shadow: 0 5px 15px rgba(255, 123, 0, 0.4);
}

.tech-stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: auto;
    text-align: center;
}
.tech-item {
    padding: 15px;
    border-radius: 8px;
    background: white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    opacity: 0;
    transform: translateY(30px);
}
.tech-item i {
    font-size: 45px;
    margin-bottom: 5px;
    color: var(--color-primary);
}
.tech-item p {
    font-weight: 600;
    font-size: 14px;
}

#cta {
    background: var(--color-primary);
    color: white;
    text-align: center;
}
#cta h2 {
    color: white;
    font-size: clamp(32px, 4vw, 48px);
}
#cta .btn-primary {
    background: var(--color-secondary);
    border-color: var(--color-secondary);
    color: white;
    box-shadow: 0 10px 25px rgba(255, 123, 0, 0.5);
    margin-top: 30px;
}