:root {
    --bg-color: #0f172a;
    --bg-darker: #0b1120;
    --surface-color: #1e293b;
    --accent-color: #38bdf8; /* لون أزرق سماوي نيون */
    --accent-hover: #0ea5e9;
    --accent-glow: rgba(56, 189, 248, 0.4);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --gradient: linear-gradient(135deg, var(--accent-color) 0%, #818cf8 100%);
    --section-padding: 100px 0;
}

* { margin: 0; padding: 0; box-sizing: border-box; scroll-behavior: smooth; }

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Utilities */
.glass {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}
.container { width: 90%; max-width: 1200px; margin: 0 auto; }
.section { padding: var(--section-padding); }
.bg-darker { background-color: var(--bg-darker); }
.accent { color: var(--accent-color); }
.section-title { font-size: 2.5rem; text-align: center; margin-bottom: 60px; font-weight: 700; }

/* Navbar */
.navbar {
    position: fixed; top: 15px; left: 50%; transform: translateX(-50%);
    width: 92%; max-width: 1200px; padding: 12px 30px;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 1000; border-radius: 50px;
}
.logo { font-weight: 700; font-size: 1.4rem; letter-spacing: 0.5px; }
.nav-links { display: flex; gap: 25px; list-style: none; align-items: center;}
.nav-links a { color: var(--text-secondary); text-decoration: none; transition: 0.3s; font-size: 0.95rem; font-weight: 500;}
.nav-links a:hover, .nav-links a.active { color: var(--accent-color); }
.btn-nav {
    background: var(--gradient); color: #fff !important;
    padding: 8px 22px; border-radius: 30px; box-shadow: 0 5px 15px rgba(56, 189, 248, 0.2);
}
.menu-toggle { display: none; font-size: 1.5rem; cursor: pointer; color: var(--text-primary); }

/* Hero Section */
.hero {
    min-height: 95vh; display: flex; align-items: center;
    padding-top: 100px; position: relative;
}
.hero-container { display: grid; grid-template-columns: 1fr 0.9fr; gap: 40px; align-items: center; }
.badge {
    background: rgba(56, 189, 248, 0.15); color: var(--accent-color);
    padding: 6px 16px; border-radius: 20px; font-size: 0.9rem; font-weight: 500; display: inline-block; margin-bottom: 15px;
}
.hero h1 { font-size: 3.2rem; line-height: 1.15; margin-bottom: 20px; }
.hero p { font-size: 1.1rem; color: var(--text-secondary); max-width: 550px; margin-bottom: 30px; }
.typewriter-text {
    background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.cursor { animation: blink 1s infinite; color: var(--accent-color);}

/* Buttons */
.cta-group { display: flex; gap: 15px; flex-wrap: wrap; }
.btn {
    padding: 12px 28px; border-radius: 10px; text-decoration: none;
    font-weight: 600; transition: all 0.3s ease; display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary { background: var(--gradient); color: #fff; box-shadow: 0 8px 25px var(--accent-glow); border: none;}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 35px var(--accent-glow); }
.btn-outline {
    background: transparent; border: 2px solid var(--accent-color); color: var(--accent-color);
}
.btn-outline:hover { background: rgba(56, 189, 248, 0.1); transform: translateY(-3px); }

/* Code Block Visual */
.code-block {
    padding: 25px; transform: rotate(-3deg) scale(0.95); transition: 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}
.code-block:hover { transform: rotate(0deg) scale(1); }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; margin-right: 6px; margin-bottom: 15px;}
.red { background: #ff5f56; } .yellow { background: #ffbd2e; } .green { background: #27c93f; }
code { font-family: 'Fira Code', monospace; color: #e2e8f0; display: block; font-size: 0.9rem; }
.k { color: #c778dd; } .s { color: #98c379; } .c { color: #e5c07b; }

/* Skills Section */
.skills-wrapper { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.skill-category { padding: 30px; transition: transform 0.3s; }
.skill-category:hover { transform: translateY(-5px); border-color: var(--accent-color); }
.skill-category h3 { margin-bottom: 20px; display: flex; align-items: center; gap: 10px; color: var(--accent-color); }
.tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tags span {
    background: rgba(255, 255, 255, 0.05); padding: 8px 16px; border-radius: 8px;
    font-size: 0.9rem; font-weight: 500; display: flex; align-items: center; gap: 8px;
    border: 1px solid transparent; transition: 0.3s;
}
.tags span:hover { border-color: var(--accent-color); background: rgba(56, 189, 248, 0.1); }

/* --- Projects Section --- */
.projects-grid-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}
.project-box {
    overflow: hidden; border-radius: 16px; transition: all 0.3s ease;
    display: flex; flex-direction: column;
}
.project-box:hover { transform: translateY(-10px); border-color: var(--accent-color); }
.project-thumb {
    height: 220px; width: 100%; background-size: cover; background-position: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.project-content { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }
.project-content h3 { font-size: 1.3rem; margin-bottom: 10px; }
.project-content p { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 20px; flex-grow: 1; }
.tech-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 25px; }
.tech-tags span {
    font-size: 0.8rem; color: var(--accent-color); background: rgba(56, 189, 248, 0.1);
    padding: 4px 10px; border-radius: 20px;
}
.btn-github-link {
    text-align: center; width: 100%; padding: 12px; background: var(--surface-color);
    color: var(--text-primary); text-decoration: none; border-radius: 8px; font-weight: 600;
    transition: 0.3s; border: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-github-link:hover { background: var(--accent-color); color: var(--bg-color); border-color: var(--accent-color); }

/* --- Contact Section --- */
.contact-layout {
    display: grid; grid-template-columns: 1fr 1.3fr; gap: 50px; align-items: start;
}
.info-card {
    display: flex; align-items: center; gap: 20px; padding: 20px; margin-bottom: 20px;
    transition: 0.3s;
}
.info-card:hover { border-color: var(--accent-color); transform: translateX(5px); }
.icon-box {
    width: 50px; height: 50px; background: var(--gradient); border-radius: 12px;
    display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: #fff;
    flex-shrink: 0;
}
.info-text h4 { font-size: 1.1rem; margin-bottom: 5px; }
.info-text a { color: var(--text-secondary); text-decoration: none; transition: 0.3s; }
.info-text a:hover { color: var(--accent-color); }

.contact-form { padding: 35px; }
.contact-form h3 { margin-bottom: 25px; font-size: 1.5rem; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; font-size: 0.9rem; color: var(--text-primary);}
input, textarea {
    width: 100%; padding: 14px; background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; color: #fff;
    font-family: inherit; transition: 0.3s; outline: none;
}
input:focus, textarea:focus { border-color: var(--accent-color); background: rgba(15, 23, 42, 0.8); }
.full-width { width: 100%; justify-content: center; cursor: pointer; font-size: 1rem; }

/* Footer */
.footer { text-align: center; padding: 30px; color: var(--text-secondary); font-size: 0.9rem; margin-top: 50px; border-top: 1px solid rgba(255,255,255,0.05); }
.footer strong { color: var(--accent-color); }

/* Animations */
@keyframes blink { 50% { opacity: 0; } }
.fade-up { opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.fade-in { opacity: 0; transition: opacity 1s ease; }
.visible { opacity: 1; transform: translateY(0); }
.delay-100 { transition-delay: 0.1s; } .delay-200 { transition-delay: 0.2s; }

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .hero h1 { font-size: 2.8rem; }
    .container { width: 94%; }
}

@media (max-width: 768px) {
    :root { --section-padding: 70px 0; }
    .navbar { width: 95%; top: 10px; padding: 12px 20px; }
    .nav-links {
        position: absolute; top: 70px; left: 0; width: 100%; background: var(--surface-color);
        flex-direction: column; padding: 30px; gap: 20px; border-radius: 16px;
        display: none; border: 1px solid rgba(255,255,255,0.08);
    }
    .nav-links.active { display: flex; }
    .menu-toggle { display: block; }
    .hero { padding-top: 130px; text-align: center; min-height: auto; padding-bottom: 60px;}
    .hero-container { grid-template-columns: 1fr; gap: 50px; }
    .hero h1 { font-size: 2.5rem; }
    .hero p { margin: 0 auto 30px; }
    .cta-group { justify-content: center; }
    .code-block { transform: rotate(0) scale(1); max-width: 100%; overflow-x: auto;}
    .section-title { font-size: 2rem; margin-bottom: 40px; }
    .contact-layout { grid-template-columns: 1fr; gap: 40px; }
    .info-card { padding: 15px; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 2rem; }
    .btn { padding: 10px 20px; width: 100%; justify-content: center; }
    .projects-grid-boxes { grid-template-columns: 1fr; }
}