/* --- 1. VARIABLES & RESET --- */
:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent-primary: #38bdf8; /* Cyan */
    --accent-secondary: #c084fc; /* Purple */
    --gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --nav-height: 80px; /* Standardize navbar height for offsets */
}

html {
    scroll-behavior: smooth;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased; 
    -moz-osx-font-smoothing: grayscale;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* --- 2. LAYOUT UTILITIES --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px; /* This 20px side padding is now safe */
}

/* FIXED: Changed from 'padding: 100px 0' to protect side padding */
.section-padding {
    padding-top: 100px;
    padding-bottom: 100px;
}

.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* --- 3. TYPOGRAPHY --- */
h1, h2, h3 {
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -0.02em; 
}

h1 { font-size: 3.5rem; font-weight: 800; letter-spacing: -0.04em; }
h2 { font-size: 2.5rem; font-weight: 700; margin-bottom: 3rem; }
h3 { font-size: 1.5rem; font-weight: 600; }

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    /* Fallback for non-supporting browsers */
    color: var(--accent-primary); 
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.25rem;
    max-width: 600px;
    font-weight: 300;
}

/* --- 4. NAVIGATION --- */
nav {
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

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

.logo { font-weight: 800; font-size: 1.5rem; letter-spacing: -0.03em; }
.logo span { color: var(--accent-primary); }

.nav-links { display: flex; gap: 30px; font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover { color: var(--accent-primary); }

.cta-btn-nav {
    border: 1px solid var(--accent-primary);
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-primary);
    transition: all 0.3s ease-in-out;
    white-space: nowrap;
}
.cta-btn-nav:hover { background: var(--accent-primary); color: var(--bg-color); }

/* --- 5. HERO SECTION --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: var(--nav-height);
}

.hero-graphic {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 40%;
    height: 60%;
    opacity: 0.2;
    z-index: -1;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        var(--accent-primary) 10px,
        var(--accent-primary) 11px
    );
    mask-image: linear-gradient(to left, black, transparent);
    -webkit-mask-image: linear-gradient(to left, black, transparent);
}

.hero-content { z-index: 1; }

.primary-btn {
    display: inline-block;
    background: var(--gradient);
    color: white;
    padding: 16px 36px;
    border-radius: 50px;
    font-weight: 600;
    margin-top: 2rem;
    box-shadow: 0 10px 20px rgba(56, 189, 248, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    letter-spacing: 0.02em;
}
.primary-btn:hover { transform: translateY(-3px); box-shadow: 0 15px 30px rgba(56, 189, 248, 0.4); }

/* --- 6. SERVICES CARDS --- */
.service-card {
    background: var(--card-bg);
    padding: 2.5rem 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.03);
    transition: 0.3s;
    height: 100%; /* Ensures equal height in grid */
    display: flex;
    flex-direction: column;
}
.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}
.icon-box {
    width: 50px;
    height: 50px;
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 700;
}

/* --- 7. PROFILE SECTION --- */
.bio-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr; 
    gap: 5rem;
    align-items: center;
}

.bio-image-wrapper img {
    width: 100%;
    max-width: 400px;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    display: block;
    margin: 0 auto;
}

.bio-text {
    font-size: 1.05rem;
    color: #cbd5e1; /* Slightly lighter than muted for readability */
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

/* --- 8. TESTIMONIALS CAROUSEL --- */
.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
}

.carousel-track {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding: 20px 5px; 
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track { -ms-overflow-style: none; scrollbar-width: none; }

.carousel-card {
    min-width: 400px; 
    background: rgba(255, 255, 255, 0.02); 
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 3.5rem 2.5rem;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.carousel-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.nav-btn {
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--accent-primary);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    transition: 0.2s;
    flex-shrink: 0;
    z-index: 10;
}
.nav-btn:hover {
    background: var(--accent-primary);
    color: var(--bg-color);
    border-color: var(--accent-primary);
}


.quote {
    font-size: 1.15rem;
    color: #e2e8f0; 
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.author {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 0.8rem;
}

/* --- 9. CONTACT SECTION & FORM --- */
.contact-section {
    background: var(--card-bg);
    text-align: center;
    border-radius: 24px 24px 0 0;
    margin-top: 50px;
}

.contact-form-wrapper {
    max-width: 500px;
    margin: 3rem auto 0;
    text-align: left;
}

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

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

.form-input, .form-textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: 0.3s;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.1);
}

.form-textarea { resize: vertical; min-height: 120px; }

.form-submit-btn {
    width: 100%;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 1rem;
}

#form-status {
    margin-top: 1rem;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    font-size: 0.9rem;
    display: none;
}
.status-success {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.status-error {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* --- 10. FOOTER --- */
footer {
    background: var(--bg-color);
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 60px;
    padding-bottom: 30px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-col h4 {
    color: var(--text-main);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.footer-links li { margin-bottom: 0.8rem; }

.footer-links a {
    color: var(--text-muted);
    transition: 0.2s;
}

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

.footer-address { font-style: normal; line-height: 1.8; }

.copyright-bar {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    font-size: 0.85rem;
    opacity: 0.6;
}

/* --- 11. MOBILE & RESPONSIVE --- */
@media (max-width: 768px) {
    /* FIXED: Adjusted to specific padding to preserve container margins */
    .section-padding { 
        padding-top: 60px; 
        padding-bottom: 60px;
    }
    
    h1 { font-size: 2.25rem; } 
    h2 { font-size: 1.75rem; margin-bottom: 2rem; } 
    
    .nav-links { display: none; } 
    
    .hero-graphic { width: 80%; opacity: 0.1; }
    
    .bio-grid { grid-template-columns: 1fr; gap: 2rem; }
    
    /* Carousel: Use viewport width for cards on mobile */
    .carousel-card { 
        min-width: 85vw; 
        padding: 2rem; /* Keep padding smaller on mobile */
    }
    .nav-btn { display: none; }

    .footer-grid { gap: 2rem; }
}