/* ============================================
   The Electronic Workbench — Shared Stylesheet
   ============================================ */

@import url('fonts/fonts.css');

/* === RESET === */
html { scroll-behavior: smooth; }
* { margin: 0; padding: 0; box-sizing: border-box; }

/* === BODY === */
body {
    font-family: 'Rajdhani', sans-serif;
    background: #0a110b;
    color: #9a9ab0;
    position: relative;
}

/* === CRT SCANLINE OVERLAY === */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.08) 2px,
        rgba(0, 0, 0, 0.08) 4px
    );
}

/* === NAV === */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 17, 11, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #1a3a1c;
    z-index: 100;
}

.logo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1em;
    color: #00ffcc;
}

.logo .dim { color: #335533; }

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav a {
    color: #b0b0c0;
    text-decoration: none;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.1em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.3s;
}

nav a:hover { color: #00ffcc; }
nav a.active { color: #00ffcc; }

.nav-status {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8em;
    color: #3a5a3a;
    display: flex;
    align-items: center;
    gap: 6px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.online-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00ff44;
    box-shadow: 0 0 8px rgba(0, 255, 68, 0.5);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* === HAMBURGER MENU === */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 200;
}

.hamburger span {
    display: block;
    width: 28px;
    height: 2px;
    background: #00ffcc;
    transition: all 0.4s ease;
    transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* === PAGE HERO (sub-pages) === */
.page-hero {
    padding: 140px 40px 60px;
    text-align: center;
    background:
        linear-gradient(90deg, rgba(34, 221, 136, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(34, 221, 136, 0.03) 1px, transparent 1px),
        radial-gradient(ellipse at 50% 40%, #0f1f10 0%, #0a110b 70%);
    background-size: 40px 40px, 40px 40px, 100% 100%;
}

.page-hero h1 {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(2em, 4vw, 3.5em);
    color: #00ffcc;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 15px;
    text-shadow: 0 0 30px rgba(0, 255, 204, 0.3), 0 0 60px rgba(0, 255, 204, 0.1);
}

.page-hero p {
    font-size: 1.3em;
    color: #d0d0e0;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

/* === SECTIONS === */
section {
    padding: 60px 80px;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.section-header .line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #1a3a1c 20%, #2a5a2c 50%, #1a3a1c 80%, transparent);
}

.section-header h2 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.8em;
    color: #00ffcc;
    text-transform: uppercase;
    letter-spacing: 3px;
    white-space: nowrap;
    text-shadow: 0 0 20px rgba(0, 255, 204, 0.3);
}

/* === BUTTON === */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: 1px solid #00ffcc;
    color: #00ffcc;
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85em;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover {
    background: #00ffcc;
    color: #0d1b0e;
    box-shadow: 0 0 30px rgba(0, 255, 204, 0.3), 0 0 60px rgba(0, 255, 204, 0.1);
    transform: translateY(-2px);
}

/* === FOOTER === */
footer {
    text-align: center;
    padding: 40px;
    color: #1a3a1c;
    font-size: 0.8em;
    border-top: 1px solid #1a3a1c;
    font-family: 'JetBrains Mono', monospace;
}

footer a {
    color: #3a5a3a;
    text-decoration: none;
}

footer a:hover { text-decoration: underline; }


/* ============================================
   RESPONSIVE — MOBILE PORTRAIT (max 768px)
   ============================================ */
@media (max-width: 768px) {

    /* --- Nav: hamburger visible, links hidden --- */
    .hamburger { display: flex; }

    nav {
        padding: 15px 20px;
    }

    nav ul {
        position: fixed;
        top: 0;
        left: -100%;
        width: 70%;
        height: 100vh;
        flex-direction: column;
        background: rgba(10, 17, 11, 0.98);
        padding: 100px 40px;
        gap: 25px;
        border-right: 1px solid #1a3a1c;
        transition: left 0.4s ease;
    }

    nav ul.open {
        left: 0;
    }

    nav a {
        font-size: 1.3em;
    }

    .nav-status {
        display: none;
    }

    .logo {
        font-size: 0.85em;
    }

    /* --- Page hero --- */
    .page-hero {
        padding: 100px 20px 40px;
    }

    .page-hero p {
        font-size: 1.1em;
    }

    /* --- Sections --- */
    section {
        padding: 40px 20px;
    }

    .section-header h2 {
        font-size: 1.2em;
        letter-spacing: 1px;
    }

    /* --- Footer --- */
    footer {
        padding: 25px 15px;
        font-size: 0.7em;
    }
}

/* ============================================
   RESPONSIVE — VERY SMALL (max 480px)
   ============================================ */
@media (max-width: 480px) {
    nav {
        padding: 12px 15px;
    }

    .logo {
        font-size: 0.75em;
    }

    .page-hero {
        padding: 90px 15px 30px;
    }

    section {
        padding: 30px 15px;
    }

    .section-header h2 {
        font-size: 1em;
    }
}
