/* =========================================
   Variables & Design System
   ========================================= */
:root {
    /* Palette */
    --primary: #059669; /* Emerald 600 - Professional Green */
    --primary-dark: #047857; /* Emerald 700 */
    --primary-light: #34d399; /* Emerald 400 */
    --accent: #f59e0b; /* Amber 500 - for warm highlights */
    
    --bg-body: #ffffff;
    --bg-light: #f8fafc;
    --bg-dark: #0f172a;
    --bg-card: #ffffff;

    --text-main: #1e293b; /* Slate 800 */
    --text-muted: #64748b; /* Slate 500 */
    --text-inverted: #ffffff;

    /* Typography */
    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing & Layout */
    --container-width: 1280px;
    --header-height: 80px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;

    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-hover: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-body);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

/* =========================================
   Utilities
   ========================================= */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}

.section { padding: 6rem 0; }

.bg-light { background-color: var(--bg-light); }
.bg-dark { background-color: var(--bg-dark); color: var(--text-inverted); }

.text-center { text-align: center; }
.text-primary { color: var(--primary); }

/* Typography Utilities */
.display-1 { font-size: clamp(2.5rem, 5vw, 4.5rem); letter-spacing: -0.02em; font-weight: 800; }
.display-2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.01em; }
.lead { font-size: 1.125rem; color: var(--text-muted); max-width: 65ch; }
.bg-dark .lead { color: #94a3b8; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary);
    color: var(--text-inverted);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-outline:hover {
    background-color: var(--text-main);
    color: var(--text-inverted);
}

.btn-white {
    background-color: var(--text-inverted);
    color: var(--primary);
}

.btn-white:hover {
    background-color: var(--bg-light);
}

/* =========================================
   Navigation
   ========================================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    height: var(--header-height);
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.header.scrolled {
    box-shadow: var(--shadow-sm);
    height: 70px;
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.03em;
}

.logo span { color: var(--primary); }

.nav-menu {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-main);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active { color: var(--primary); }

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
    padding-top: calc(var(--header-height) + 4rem);
    padding-bottom: 6rem;
    min-height: 90vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 50%;
    height: 80%;
    background: linear-gradient(to bottom left, var(--primary-light), transparent);
    filter: blur(100px);
    opacity: 0.2;
    border-radius: 50%;
    z-index: 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-actions {
    margin-top: 2.5rem;
    display: flex;
    gap: 1rem;
}

.hero-image {
    position: relative;
}

.hero-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.stat-card {
    position: absolute;
    bottom: 30px;
    left: -30px;
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* =========================================
   Cards & Grids
   ========================================= */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }

.card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-md);
    border: 1px solid #e2e8f0;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-light);
}

.icon-box {
    width: 56px;
    height: 56px;
    background: rgba(5, 150, 105, 0.1);
    color: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

/* =========================================
   Portfolio
   ========================================= */
.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    border: 1px solid #e2e8f0;
    background: transparent;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
    background: var(--text-main);
    color: var(--text-inverted);
    border-color: var(--text-main);
}

.project-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-dark);
    aspect-ratio: 4/3;
    cursor: pointer;
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    opacity: 0.9;
}

.project-card:hover img {
    transform: scale(1.05);
    opacity: 0.4;
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    transform: translateY(20px);
    opacity: 0;
    transition: var(--transition);
}

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

.project-category {
    color: var(--primary-light);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 0.5rem;
}

.project-title {
    color: var(--text-inverted);
    font-size: 1.5rem;
    margin-bottom: 0;
}

/* =========================================
   Blog
   ========================================= */
.blog-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
}

.article-card {
    margin-bottom: 3rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 3rem;
}

.article-card:last-child { border-bottom: none; }

.article-img {
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 1.5rem;
    aspect-ratio: 16/9;
}

.article-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.sidebar-widget {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
}

.category-list li {
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 0;
}

.category-list li a {
    display: flex;
    justify-content: space-between;
}

.category-list li a:hover { color: var(--primary); }

/* =========================================
   Contact
   ========================================= */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.contact-info-box {
    background: var(--bg-dark);
    color: var(--text-inverted);
    padding: 3rem;
    border-radius: var(--radius-md);
}

.info-item {
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
}

.info-item i {
    color: var(--primary);
    font-size: 1.5rem;
    margin-top: 0.25rem;
}

.form-control {
    width: 100%;
    padding: 1rem;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-family: var(--font-body);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* =========================================
   Team
   ========================================= */
.team-card {
    text-align: center;
    background: transparent;
    border: none;
    box-shadow: none;
}

.team-img {
    border-radius: 50%;
    width: 180px;
    height: 180px;
    margin: 0 auto 1.5rem;
    overflow: hidden;
    border: 4px solid var(--bg-light);
    box-shadow: var(--shadow-md);
}

.team-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =========================================
   Footer
   ========================================= */
.footer {
    background-color: var(--text-main);
    color: var(--text-inverted);
    padding: 5rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-title {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.footer-link {
    display: block;
    color: #94a3b8;
    margin-bottom: 0.75rem;
}

.footer-link:hover { color: var(--primary-light); }

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.social-icon:hover { background: var(--primary); }

/* =========================================
   Animations
   ========================================= */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 1024px) {
    .hero-grid, .about-grid, .contact-grid, .blog-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero { padding-top: 8rem; text-align: center; }
    .hero-actions { justify-content: center; }
    
    .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .mobile-toggle { display: block; }
    
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background: var(--bg-body);
        flex-direction: column;
        padding: 2rem;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        gap: 1.5rem;
    }
    
    .nav-menu.active { transform: translateX(0); }
    
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    
    .display-1 { font-size: 2.5rem; }
}
