/* Reset and base styles */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

:root {
    --brand-red: #e90400; /* brand primary */
    --brand-red-rgb: 233, 4, 0; /* for rgba() uses */
    
    /* Dark mode (default) */
    --brand-black: #e8e8e8;
    --text: #f0f0f0;
    --text-secondary: #b8b8b8;
    --muted: #a8a8a8;
    --surface: #161616;
    --surface-2: #151515;
    --surface-hover: #252525;
    --border: rgba(50, 50, 50, 0.1);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    
    /* Primary derived from brand red */
    --primary: var(--brand-red);
    --primary-600: #c00300; /* darker */
    --primary-700: #990200; /* even darker for hovers if needed */
    /* Azure-specific (for icon only) */
    --azure: #0078d4;
    --azure-600: #106ebe;
    --success: #22c55e;
    --radius: 14px;
}

html[data-theme="light"] {
    --brand-black: #111213;
    --text: #1a1d21;
    --text-secondary: #667085;
    --muted: #667085;
    --surface: #ffffff;
    --surface-2: #f6f6f7;
    --surface-hover: #f0f0f0;
    --border: rgba(0, 0, 0, 0.06);
    --shadow: 0 10px 30px rgba(16, 24, 40, 0.06);
}

body {
    font-family: 'Inter Tight', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: #0a0a0a;
    transition: background-color 0.3s ease, color 0.3s ease;
}

html[data-theme="light"] body {
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Navigation */
.navbar {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    background: rgba(8, 8, 8, 0.8);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

html[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.7);
}

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

.contact-cta { display: flex; justify-content: center; }
.contact-card { 
    background: var(--surface); 
    padding: 2rem; 
    border-radius: var(--radius); 
    box-shadow: var(--shadow); 
    border: 1px solid var(--border); 
    max-width: 640px; 
    width: 100%; 
    text-align: center;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.contact-card .btn-linkedin { margin-top: 20px; }
.btn-linkedin { background: #0a66c2; color: white; border-color: transparent; }
.btn-linkedin:hover { background: #094b8f; }

.brand { display: inline-flex; align-items: baseline; gap: 0; text-decoration: none; line-height: 1; font-family: 'Khand', 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif; }
.brand-t { color: var(--brand-red); font-weight: 600; font-size: 2.6rem; letter-spacing: 0.2px; }
.brand-rest { color: var(--brand-black); font-weight: 600; font-size: 1.8rem; margin-left: -3px; }
.brand-inline .brand-t { font-size: 1em; }
.brand-inline .brand-rest { font-size: 1em; margin-left: -3px; }

.nav-menu { display: flex; gap: 2rem; }

.nav-link { text-decoration: none; color: var(--text); font-weight: 500; transition: color 0.25s ease; letter-spacing: 0.005em; }
.nav-link:hover, .nav-link:focus { color: var(--primary); outline: none; }

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.3s ease, color 0.3s ease;
    color: var(--text);
}

.theme-toggle:hover {
    background-color: var(--surface-hover);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

.theme-toggle .sun-icon {
    display: block;
}

.theme-toggle .moon-icon {
    display: none;
}

html[data-theme="light"] .theme-toggle .sun-icon {
    display: none;
}

html[data-theme="light"] .theme-toggle .moon-icon {
    display: block;
}

.bar { width: 25px; height: 3px; background-color: var(--text); margin: 3px 0; transition: 0.3s; }

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background: radial-gradient(1000px 400px at 20% 10%, rgba(var(--brand-red-rgb), 0.15), transparent 60%),
                radial-gradient(1200px 500px at 80% 0%, rgba(var(--brand-red-rgb), 0.08), transparent 60%),
                linear-gradient(135deg, #0a0a0a 0%, #050505 100%);
    min-height: 100vh; display: flex; align-items: center;
    transition: background 0.3s ease;
}

html[data-theme="light"] .hero {
    background: radial-gradient(1000px 400px at 20% 10%, rgba(var(--brand-red-rgb), 0.08), transparent 60%),
                radial-gradient(1200px 500px at 80% 0%, rgba(var(--brand-red-rgb), 0.05), transparent 60%),
                linear-gradient(135deg, #f7f9fc 0%, #edf1f7 100%);
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title { font-size: 3.25rem; font-weight: 800; line-height: 1.15; margin-bottom: 1.5rem; color: var(--text); letter-spacing: -0.01em; }

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

.hero-subtitle { font-size: 1.2rem; color: var(--muted); margin-bottom: 2rem; line-height: 1.7; }

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

.btn { padding: 12px 20px; border-radius: 12px; text-decoration: none; font-weight: 600; transition: all 0.25s ease; display: inline-flex; align-items: center; gap: 8px; border: 1px solid transparent; box-shadow: var(--shadow); letter-spacing: 0.005em; }
.btn:focus { outline: 3px solid rgba(var(--brand-red-rgb), 0.25); outline-offset: 2px; }
.btn-primary { background-color: var(--primary); color: white; border-color: transparent; }
.btn-primary:hover { background-color: var(--primary-600); transform: translateY(-2px); }
.btn-secondary { background-color: var(--surface); color: var(--primary); border-color: rgba(var(--brand-red-rgb), 0.25); }
.btn-secondary:hover { background-color: rgba(var(--brand-red-rgb), 0.06); transform: translateY(-2px); }

.tech-icons {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: flex-start;
}


.icon-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    width: clamp(280px, 32vw, 360px);
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow:
        0 10px 20px rgba(0, 0, 0, 0.2),
        0 2px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.icon-item:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(17,24,39,0.08), 0 4px 10px rgba(17,24,39,0.06); }

.icon { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.1rem; color: white; letter-spacing: 0.2px; }

/* label next to icon */
.icon-item > span { color: var(--text); font-size: 1rem; font-weight: 500; }

.azure-icon { background: linear-gradient(135deg, var(--azure), var(--azure-600)); }
.ai-icon { background: linear-gradient(135deg, #e11d48, #7c3aed); }
.dotnet-icon { background: linear-gradient(135deg, #6d28d9, #4c1d95); }

/* Sections */
.services, .about, .contact {
    padding: 80px 0;
}

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

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.section-header p {
    font-size: 1.2rem;
    color: var(--muted);
    transition: color 0.3s ease;
}

/* Services */
.services { 
    background-color: var(--surface-2);
    transition: background-color 0.3s ease;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.service-card { 
    background: var(--surface); 
    padding: 2rem; 
    border-radius: var(--radius); 
    box-shadow: var(--shadow); 
    border: 1px solid var(--border); 
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease; 
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1);
}

.service-icon {
    margin-bottom: 1.5rem;
}

/* Service icon colors to match hero icons */
.ai-service .icon { background: linear-gradient(135deg, #e11d48, #7c3aed); }
.azure-service .icon { background: linear-gradient(135deg, var(--azure), var(--azure-600)); }
.dotnet-service .icon { background: linear-gradient(135deg, #6d28d9, #4c1d95); }

.service-card h3 { 
    font-size: 1.3rem; 
    font-weight: 700; 
    margin-bottom: 1rem; 
    color: var(--text); 
    letter-spacing: 0.002em;
    transition: color 0.3s ease;
}

.service-card p { 
    color: var(--muted); 
    margin-bottom: 1.25rem;
    transition: color 0.3s ease;
}

.service-features {
    list-style: none;
}

.service-features li {
    padding: 0.5rem 0;
    color: var(--muted);
    position: relative;
    padding-left: 1.5rem;
    transition: color 0.3s ease;
}

.service-features li:before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 800; }

/* About */
.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 { 
    font-size: 2.25rem; 
    font-weight: 800; 
    color: var(--text); 
    margin-bottom: 1.25rem; 
    letter-spacing: -0.02em;
    transition: color 0.3s ease;
}

.about-text p { 
    font-size: 1.05rem; 
    color: var(--muted); 
    margin-bottom: 1.25rem;
    transition: color 0.3s ease;
}

.stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number { 
    font-size: 2.25rem; 
    font-weight: 800; 
    color: var(--primary);
    transition: color 0.3s ease;
}

.stat-label {
    color: var(--muted);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.expertise-badges {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}


.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--text);
    padding: 0.25rem 0;
    border-radius: 0;
    text-align: left;
    font-weight: 500;
    border: none;
    box-shadow: none;
    transition: color 0.3s ease;
}

.badge::before {
    content: "➣";
    color: var(--primary);
    font-weight: 700;
    line-height: 1;
    display: inline-block;
    transform: translateY(1px);
    font-size: 1em; /* scale arrow with text */
}

/* Larger, readable badges in About */
.expertise-badges .badge {
    font-size: clamp(1.05rem, 0.9rem + 0.5vw, 1.25rem);
    line-height: 1.35;
}

/* Contact */
.contact { 
    background-color: var(--surface-2);
    transition: background-color 0.3s ease;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item h4 {
    color: var(--text);
    margin-bottom: 0.5rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.contact-item p {
    color: var(--muted);
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.contact-form { 
    background: var(--surface); 
    padding: 2rem; 
    border-radius: var(--radius); 
    box-shadow: var(--shadow); 
    border: 1px solid var(--border);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

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


.form-group input,
.form-group textarea { 
    width: 100%; 
    padding: 12px; 
    border: 1.5px solid var(--border);
    border-radius: 10px; 
    font-size: 1rem; 
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease; 
    font-family: inherit; 
    background: var(--surface);
    color: var(--text);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--muted);
}

.form-group input:focus,
.form-group textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(var(--brand-red-rgb), 0.12); }

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

/* Footer */
.footer { 
    background-color: #050505;
    color: white; 
    padding: 3rem 0 1rem;
    transition: background-color 0.3s ease;
}

html[data-theme="light"] .footer {
    background-color: #111315;
}

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

.footer-section h3,
.footer-section h4 { margin-bottom: 1rem; color: var(--primary); }

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a { 
    color: #adb5bd; 
    text-decoration: none; 
    transition: color 0.3s ease; 
    letter-spacing: 0.003em;
}

.footer-section ul li a:hover { color: white; }

.footer-bottom { 
    border-top: 1px solid rgba(255,255,255,0.08); 
    padding-top: 1rem; 
    text-align: center; 
    color: #94a3b8;
    transition: border-color 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--surface);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.2);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-title { font-size: 2.25rem; }

    .hero-buttons {
        justify-content: center;
    }

    .tech-icons {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .stats {
        justify-content: center;
    }

    /* No grid needed for contact CTA on mobile */

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title { font-size: 1.9rem; }
    .hero-subtitle { font-size: 1.05rem; }
    .section-header h2 { font-size: 1.8rem; }
    .stats { flex-direction: column; gap: 1rem; }
}

/* Animation for mobile menu toggle */
.nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.nav-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}