:root {
    --bg-main: #0a0a0c;
    --bg-surface: #121216;
    --bg-card: #18181f;
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    
    /* Warm Terracotta / Burnt Orange Palette */
    --accent: #ea580c; 
    --accent-hover: #c2410c; 
    --accent-glow: rgba(234, 88, 12, 0.18); 
    
    --border: #262631;
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* --- BACKGROUND GRAPHICS --- */
.ambient-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent-glow) 0%, rgba(0,0,0,0) 70%);
    top: -100px;
    right: 0;
    z-index: 0;
    pointer-events: none;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(to right, rgba(255,255,255,0.02) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 0;
    pointer-events: none;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 8%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 10, 12, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.logo-mark {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-mark img {
    height: 52px;
    width: auto;
    object-fit: contain;
}

nav.desktop-nav {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

nav.desktop-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
}

nav.desktop-nav a:hover, nav.desktop-nav a.active {
    color: var(--text-primary);
}

.admin-trigger {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.8rem;
    transition: all 0.3s;
}

.admin-trigger:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

/* --- MOBILE NAVIGATION COMPONENTS --- */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.menu-toggle span {
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle:hover span {
    background-color: var(--accent);
}

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 6, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    max-width: 80vw;
    height: 100vh;
    background: var(--bg-surface);
    border-left: 1px solid var(--border);
    z-index: 1002;
    padding: 5rem 2rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

.mobile-menu-drawer.active {
    transform: translateX(0);
}

.mobile-menu-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s;
}

.mobile-menu-close:hover {
    color: var(--accent);
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.mobile-nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    transition: color 0.3s;
}

.mobile-nav a:hover {
    color: var(--accent);
}

main {
    overflow-x: hidden;
    width: 100%;
}

section {
    padding: 6rem 8%;
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 100vw;
}

/* --- HERO SECTION WITH BLENDED BACKGROUND GRAPHIC --- */
.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    padding: 8rem 8% 4rem 8%;
    position: relative;
    z-index: 1;
    overflow: hidden;
    background-image: 
        linear-gradient(90deg, rgba(10, 10, 12, 0.96) 0%, rgba(10, 10, 12, 0.75) 50%, rgba(10, 10, 12, 0.4) 100%),
        url('images/hero-bg-tech.jpeg');
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
}

.hero-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 650px;
    position: relative;
    z-index: 2;
}

.hero-tag {
    font-family: var(--font-display);
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: 3.8rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 2rem;
}

.hero h1 span {
    color: transparent;
    -webkit-text-stroke: 1px rgba(255,255,255,0.3);
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Hide old mockup container since graphic is now background */
.hero-right, .desktop-3d-mockup-container {
    display: none;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    letter-spacing: -0.02em;
    margin-bottom: 4rem;
}

/* --- ABOUT SECTION --- */
.about-split {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 4rem;
    align-items: start;
}

.profile-img-frame {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    padding: 10px;
    background: var(--bg-surface);
    overflow: hidden;
    box-shadow: 0 0 30px var(--accent-glow);
}

.profile-img-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.about-content p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.bg-alt {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem;
}

.no-projects-msg {
    grid-column: 1 / -1;
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-style: italic;
    text-align: center;
    padding: 4rem 0;
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: 12px;
}

/* --- RECOMMENDATIONS GRID (3 COLUMNS) --- */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

.project-card, .testimonial-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
}

.project-img-wrapper {
    width: 100%;
    height: 320px;
    background: #1e1e24;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-meta, .testimonial-card {
    padding: 2.5rem;
}

.project-category {
    font-family: var(--font-display);
    color: var(--accent);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
}

.project-title { font-family: var(--font-display); font-size: 1.75rem; margin-bottom: 1rem; }
.project-desc { color: var(--text-secondary); line-height: 1.6; }

.testimonial-text {
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
    font-size: 1.02rem;
}

.testimonial-author { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.testimonial-title { color: var(--accent); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; margin-top: 0.25rem; }

/* --- CONTACT FORM --- */
.contact-split {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 5rem;
}

.contact-info h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.contact-info p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.contact-details a {
    display: block;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

.contact-details a:hover { color: var(--accent); }

.social-link {
    display: inline-block;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 2px;
    transition: color 0.3s, border-color 0.3s;
}

.social-link:hover { color: var(--accent); border-color: var(--accent); }
.contact-input-group { margin-bottom: 1.5rem; }
.contact-input-group label { display: block; font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.5rem; font-weight: 500; }

/* --- CONTROL PANEL MODALS --- */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 6, 0.9);
    backdrop-filter: blur(15px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal.active { opacity: 1; pointer-events: auto; }

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 2.5rem;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.modal-close {
    position: absolute; top: 1.25rem; right: 1.25rem; background: transparent; border: none; color: var(--text-secondary); font-size: 1.5rem; cursor: pointer;
}

.admin-split-workspace { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; width: 100%; max-width: 1000px; }
.admin-column { background: var(--bg-card); border: 1px solid var(--border); padding: 2.5rem; border-radius: 12px; }
.project-inventory-list { max-height: 380px; overflow-y: auto; margin-top: 1rem; }

.inventory-item {
    display: flex; justify-content: space-between; align-items: center; padding: 1rem; border-bottom: 1px solid var(--border); background: var(--bg-main); margin-bottom: 0.5rem; border-radius: 6px;
}

.inventory-item-info h4 { font-size: 0.95rem; margin-bottom: 0.25rem; }
.inventory-item-info span { font-size: 0.75rem; color: var(--text-secondary); }
.inventory-actions { display: flex; gap: 0.5rem; }

.action-btn { padding: 0.35rem 0.75rem; font-size: 0.75rem; font-weight: 600; border-radius: 4px; cursor: pointer; border: 1px solid var(--border); background: transparent; color: var(--text-primary); }
.action-btn.edit:hover { border-color: var(--accent); color: var(--accent); }
.action-btn.delete:hover { border-color: #ef4444; color: #ef4444; }

.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.5rem; }

.form-control { width: 100%; background: var(--bg-main); border: 1px solid var(--border); border-radius: 8px; padding: 0.75rem 1rem; color: var(--text-primary); font-family: var(--font-body); font-size: 0.95rem; }
.form-control:focus { outline: none; border-color: var(--accent); }
textarea.form-control { min-height: 90px; resize: vertical; }

.form-btn { width: 100%; background: var(--accent); color: white; border: none; padding: 0.85rem; border-radius: 8px; font-weight: 600; cursor: pointer; transition: background 0.3s; }
.form-btn:hover { background: var(--accent-hover); }

.error-msg { color: #ef4444; font-size: 0.85rem; margin-top: 0.5rem; display: none; }
.file-custom { border: 1px dashed var(--border); padding: 1.5rem; text-align: center; border-radius: 8px; cursor: pointer; background: var(--bg-main); }

footer { padding: 4rem 8%; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; width: 100%; }
footer p { color: var(--text-secondary); font-size: 0.9rem; }

/* --- CASE STUDY PAGE WIDE STYLES --- */

.case-hero-inner {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* Prevents title and subtitle text from overlapping */
}

.case-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-top: 0.5rem; /* Gives clean breathing room below the main title */
}

.back-link {
    display: inline-block;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--text-primary);
}

.case-title {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.case-content {
    padding: 6rem 8%;
    width: 100%;
}

.case-section {
    margin-bottom: 4rem;
}

.case-section h2 {
    font-family: var(--font-display);
    font-size: 2.2rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.case-section h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.case-section p, .case-section li {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.2rem;
}

.case-section ul, .case-section ol {
    padding-left: 2rem;
    margin-bottom: 1.5rem;
}

.case-section li {
    margin-bottom: 0.85rem;
}

.case-card-box {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    padding: 3rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.case-card-box p:last-child {
    margin-bottom: 0;
}

.highlight-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 2.5rem;
    border-radius: 12px;
    margin-top: 2rem;
}

.case-img-placeholder {
    width: 100%;
    margin: 4rem 0;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    text-align: center;
}

.case-media {
    width: 100%;
    max-height: 650px;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid var(--border);
}

.placeholder-caption {
    display: block;
    padding: 1.2rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
    background: var(--bg-card);
}

.solutions-grid-wide {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    margin-top: 2rem;
}

.solution-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 2.5rem;
    border-radius: 12px;
}

.solution-card h4 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.solution-card p {
    font-size: 1.05rem;
    margin-bottom: 0;
}

/* --- STRICT MOBILE & RESPONSIVE BREAKPOINTS --- */
@media screen and (max-width: 1200px) {
    .testimonial-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 968px) {
    header {
        padding: 1.25rem 5%;
    }

    nav.desktop-nav {
        display: none !important;
    }

    .menu-toggle {
        display: flex !important;
    }

    section {
        padding: 4rem 5%;
    }

    .hero { 
        grid-template-columns: 1fr; 
        text-align: center; 
        min-height: auto; 
        padding-top: 6rem; 
        gap: 2rem; 
        background-image: 
            linear-gradient(180deg, rgba(10, 10, 12, 0.95) 0%, rgba(10, 10, 12, 0.85) 100%),
            url('images/hero-bg-tech.jpeg');
    }

    .hero h1 { 
        font-size: 2.2rem; 
    }

    .about-split {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        gap: 2rem;
    }

    .profile-img-frame {
        width: 180px;
        height: 180px;
    }

    .portfolio-grid, .testimonial-grid, .contact-split, .solutions-grid-wide { 
        grid-template-columns: 1fr; 
        gap: 2rem; 
    }

    .admin-split-workspace {
        grid-template-columns: 1fr;
    }

    footer { 
        flex-direction: column; 
        gap: 1rem; 
        text-align: center; 
        padding: 2.5rem 5%;
    }
    
    .case-title {
        font-size: 2.1rem;
    }
    
    .case-hero, .case-content {
        padding-left: 5%;
        padding-right: 5%;
    }
}