/* 
   MOHAMED ALMAJZOUB - MASTER ARCHITECTURE
   Theme: Cybernetic / AI Neural Network
*/

:root {
    --bg-color: #0a0a0a;
    --main-color: #00ff41; /* Matrix Green */
    --text-color: #e0e0e0;
    --card-bg: rgba(15, 15, 15, 0.85);
    --highlight-color: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    line-height: 1.5;
}

/* --- BACKGROUND LAYER (Neural Network Canvas) --- */
#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.45;
    z-index: -1;
    pointer-events: none;
}

/* --- HOME PAGE (Minimized & Single Line) --- */
header {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 5%;
    background: transparent !important;
}

.hero-content {
    width: 100%;
    max-width: 1000px;
    z-index: 2;
}

.hero-content h1 {
    /* clamp ensures it stays on one line across most desktops */
    font-size: clamp(1.8rem, 5.5vw, 4rem); 
    white-space: nowrap; 
    font-weight: 800;
    margin-bottom: 0.2rem;
    letter-spacing: -1px;
    text-transform: uppercase;
}

.highlight {
    color: var(--main-color);
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.job-title {
    font-size: clamp(0.9rem, 2.5vw, 1.3rem);
    color: var(--main-color);
    font-weight: 600;
    margin-bottom: 0.8rem;
    letter-spacing: 1px;
}

.hero-summary {
    font-size: 0.9rem;
    max-width: 580px;
    margin: 0 auto 1.5rem auto;
    opacity: 0.8;
    line-height: 1.4;
}

/* --- INTERACTIVE BUTTONS --- */
.social-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    padding: 0.6rem 2rem;
    border: 2px solid var(--main-color);
    color: var(--main-color);
    text-decoration: none;
    font-weight: bold;
    font-size: 0.85rem;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: rgba(0, 0, 0, 0.4);
}

.btn:hover {
    background: var(--main-color);
    color: #000;
    box-shadow: 0 0 20px var(--main-color);
    transform: translateY(-3px);
}

/* --- MENU TOGGLE (High-Intensity Highlight) --- */
.side-menu {
    position: fixed;
    left: 25px;
    top: 25px;
    z-index: 1000;
}

.menu-toggle {
    background: var(--main-color);
    color: #000;
    border: none;
    padding: 12px 18px;
    cursor: pointer;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1.2rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

/* The Highlight Effect requested */
.menu-toggle:hover {
    background: var(--highlight-color);
    color: #000;
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 0 30px var(--main-color), 0 0 60px rgba(0, 255, 65, 0.2);
}

.menu-panel {
    position: absolute;
    top: 60px;
    left: 0;
    background: rgba(5, 5, 5, 0.98);
    border: 1px solid var(--main-color);
    backdrop-filter: blur(15px);
    width: 200px;
    padding: 1rem;
    display: none;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}

.menu-panel.open {
    display: block;
    animation: fadeIn 0.3s ease;
}

.menu-panel ul li {
    list-style: none;
    margin: 1rem 0;
}

.menu-panel ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    transition: 0.2s;
}

.menu-panel ul li a:hover {
    color: var(--main-color);
    padding-left: 10px;
}

/* --- SECTIONS & 3D CARDS --- */
.section {
    padding: 6rem 10%;
    min-height: 100vh;
    background: transparent !important;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 3rem;
    color: var(--main-color);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 65, 0.1);
    border-left: 5px solid var(--main-color);
    transform-style: preserve-3d;
    transition: transform 0.1s ease, box-shadow 0.3s ease;
    will-change: transform;
}

.card:hover {
    box-shadow: 0 15px 35px rgba(0, 255, 65, 0.15);
}

.subtitle {
    color: var(--main-color);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* --- CV LISTS --- */
.cv-list li {
    font-size: 0.9rem;
    margin-bottom: 0.7rem;
    list-style: none;
    position: relative;
    padding-left: 1.5rem;
    opacity: 0.9;
}

.cv-list li::before {
    content: "›";
    color: var(--main-color);
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 1.1rem;
    top: -2px;
}

/* --- SKILLS TAGS --- */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.skill-tag {
    padding: 4px 14px;
    border: 1px solid var(--main-color);
    color: var(--main-color);
    border-radius: 20px;
    font-size: 0.8rem;
    background: rgba(0, 255, 65, 0.05);
}

/* --- ANIMATIONS --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- RESPONSIVE OPTIMIZATION --- */
@media (max-width: 768px) {
    .hero-content h1 {
        white-space: normal; /* Allow wrap on mobile to prevent overflow */
        font-size: 2.5rem;
    }
    .section {
        padding: 5rem 5%;
    }
    .card-container {
        grid-template-columns: 1fr;
    }
    .btn {
        width: 100%;
    }
}