:root {
    /* ROPEX CINEMATIC SYSTEM */
    --system-black: #050505;
    --system-border: rgba(255, 255, 255, 0.15);
    --electric-blue: #5B2EFF;
    --cold-white: #EDEDED;
    --card-bg: transparent;
    /* Brutalist: No bg by default */

    --font-main: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    /* Tech vibe */

    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --header-height: 80px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--system-black);
    color: var(--cold-white);
    font-family: var(--font-main);
    line-height: 1.5;
    overflow-x: hidden;
    position: relative;
}

/* Industrial Noise Overlay */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('noise_texture.png');
    opacity: 0.07;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: overlay;
}

/* --- CINEMATIC UTILS --- */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

h1,
h2,
h3 {
    font-family: var(--font-mono);
    /* Uppercase headers */
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    border: 1px solid var(--system-border);
    background: transparent;
    color: var(--cold-white);
    font-family: var(--font-mono);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
}

.btn:hover {
    background: var(--cold-white);
    color: var(--system-black);
    border-color: var(--cold-white);
}

.btn-primary {
    background: var(--electric-blue);
    border-color: var(--electric-blue);
    color: #fff;
    box-shadow: 0 4px 12px rgba(91, 46, 255, 0.3);
    /* Add glow */
    border-radius: 4px;
    /* Slight rounding */
}

.btn-primary:hover {
    background: #4a22e0;
    color: #fff;
    transform: translateY(-2px);
    /* Lift effect */
    box-shadow: 0 6px 16px rgba(91, 46, 255, 0.5);
}

/* --- NAVIGATION --- */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    padding: 0 40px;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    border-bottom: 1px solid var(--system-border);
}

.nav-brand {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    /* Increased to match footer */
    font-weight: 800;
    letter-spacing: -1px;
    text-decoration: none;
    color: var(--cold-white);
}

.nav-brand span {
    color: var(--electric-blue);
}

.nav-links {
    display: flex;
    gap: 3rem;
}

.nav-link {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
}

.nav-link:hover {
    color: var(--cold-white);
}

.system-link {
    color: var(--electric-blue);
    font-family: 'JetBrains Mono';
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid rgba(91, 46, 255, 0.3);
    border-radius: 4px;
    transition: var(--transition);
}

.system-link:hover {
    background: rgba(91, 46, 255, 0.1);
    border-color: var(--electric-blue);
}

/* Toggle Switch */
.view-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 2rem;
    cursor: pointer;
}

.toggle-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--neutral-grey);
}

.toggle-switch {
    width: 40px;
    height: 20px;
    background: #333;
    border-radius: 20px;
    position: relative;
    transition: var(--transition);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: var(--transition);
}

.mode-simple .toggle-switch {
    background: var(--electric-blue);
}

.mode-simple .toggle-switch::after {
    transform: translateX(20px);
}


/* --- HERO SECTION --- */
#hero {
    height: 100vh;
    display: flex;
    align-items: flex-end;
    /* Bottom align for cinematic feel */
    position: relative;
    padding-bottom: 80px;
    border-bottom: 1px solid var(--system-border);
    background:
        linear-gradient(to top, #050505 0%, transparent 80%),
        radial-gradient(circle at 50% 50%, rgba(91, 46, 255, 0.15) 0%, transparent 50%);
}

/* Background Grid Lines */
#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 40px;
    right: 40px;
    bottom: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.03);
    border-right: 1px solid rgba(255, 255, 255, 0.03);
    pointer-events: none;
}

.hero-content {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    align-items: end;
    gap: 40px;
}

.hero-title {
    font-size: 3.5rem;
    /* Reduced from 5rem */
    line-height: 1;
    font-weight: 800;
    margin-bottom: 2rem;
    color: var(--cold-white);
}

.hero-subtitle {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 2rem;
    max-width: 400px;
    text-transform: uppercase;
}

/* --- SERVICES --- */
#services {
    padding: 120px 0;
    border-bottom: 1px solid var(--system-border);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 60px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--system-border);
}

.hero-tag {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--electric-blue);
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.section-title {
    font-size: 2rem;
    /* Reduced from 3rem */
    margin: 0;
}

.services-tabs {
    display: flex;
    gap: 0;
    border: 1px solid var(--system-border);
    width: fit-content;
}

.tab-btn {
    background: transparent;
    border: none;
    border-right: 1px solid var(--system-border);
    color: rgba(255, 255, 255, 0.5);
    padding: 16px 32px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn:last-child {
    border-right: none;
}

.tab-btn:hover,
.tab-btn.active {
    background: var(--cold-white);
    color: var(--system-black);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 4 Columns for dense info */
    border-left: 1px solid var(--system-border);
    border-top: 1px solid var(--system-border);
}

.service-card {
    aspect-ratio: 1/1;
    background: transparent;
    border-right: 1px solid var(--system-border);
    border-bottom: 1px solid var(--system-border);
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
    border-radius: 0;
    /* Square edges */
}

.service-card:hover {
    background: var(--electric-blue);
    border-color: var(--electric-blue);
}

.card-icon {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.card-desc {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.service-card:hover .card-desc {
    color: rgba(255, 255, 255, 0.9);
}

/* --- CONTACT --- */
#contact {
    padding: 120px 0;
}

.contact-wrapper {
    border: 1px solid var(--system-border);
    border-radius: 0;
    background: transparent;
    padding: 60px;
}

.form-input,
.form-textarea {
    background: rgba(255, 255, 255, 0.1);
    /* Increased visibility */
    border: 1px solid var(--system-border);
    border-radius: 4px;
    /* Slight radius for modern feel */
    font-family: var(--font-mono);
    color: var(--cold-white);
    font-size: 16px;
    /* Prevents iOS zoom on focus */
}

/* Responsive Matches */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3.5rem;
    }

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

@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        padding-bottom: 40px;
    }

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

    /* Mobile Dashboard Adjustments */
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 20px;
    }

    .timer-card,
    .log-card {
        padding: 1.5rem;
    }

    .timer-display {
        font-size: 3rem;
    }
}

/* --- FOOTER --- */
footer {
    border-top: 1px solid var(--system-border);
    padding: 80px 0 40px;
    background: var(--system-black);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.footer-logo {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 800;
}

.footer-logo span {
    color: var(--electric-blue);
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-link {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    transition: var(--transition);
}

.social-link:hover {
    color: var(--electric-blue);
}

.copyright {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--system-border);
}