/* 
  Colors 
*/
:root {
    --bg-color: #121522;
    --text-primary: #ffffff;
    --text-secondary: #a3a8b6;
    --coral: #fc6e6e;
    --coral-hover: #ff8585;
    --dark-surface: #1a1e2f;
    --darker-surface: #171a29;
    --border-color: #2b3044;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Header */
header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 8%;
}

.logo {
    display: flex;
    justify-content: center;
}

.logo img {
    max-height: 80px;
    width: auto;
}

.logo-coral {
    color: var(--coral);
}

/* Dropdown replacing login */
.projects-nav .dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-btn {
    background: transparent;
    border: 1px solid var(--coral);
    color: var(--text-primary);
    padding: 10px 25px;
    border-radius: 30px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.dropdown-btn:hover {
    background: rgba(252, 110, 110, 0.1);
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; /* Changed from right to left due to RTL maybe? Wait, in RTL, left: 0 aligns to the left edge of the button */
    background-color: var(--dark-surface);
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.5);
    border-radius: 12px;
    z-index: 10;
    margin-top: 10px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.dropdown:hover .dropdown-content {
    display: block;
    animation: fadeIn 0.3s ease;
}

.dropdown-content a {
    color: var(--text-primary);
    padding: 12px 20px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.3s;
    font-weight: 600;
}

.dropdown-content a:hover {
    background-color: rgba(255,255,255,0.05);
    color: var(--coral);
}

/* Main Content */
main {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8%;
    gap: 50px;
}

/* Text Section */
.hero-text {
    flex: 1;
    max-width: 550px;
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
    font-weight: 800;
}

.hero-text h1 .coral {
    color: var(--coral);
}

.hero-text p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 30px;
}

/* Tags */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.tag {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: rgba(255,255,255,0.02);
}

.tag .coral {
    color: var(--coral);
}

/* Projects Section */
.projects-section {
    padding: 70px 8% 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.project-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 20px;
    text-decoration: none !important;
    color: var(--text-primary) !important;
    transition: all 0.3s ease;
    text-align: right;
}

.project-card:hover,
.project-card:focus-visible {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: var(--coral);
    transform: translateX(-5px); /* Move slightly in RTL */
}

.project-card:focus-visible {
    outline: 2px solid var(--coral);
    outline-offset: 3px;
}

.project-card.is-dev {
    opacity: 0.7;
}

.project-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(252, 110, 110, 0.1);
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: var(--coral);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

/* Category colors */
.project-icon.cat-finance {
    background-color: rgba(52, 211, 153, 0.12);
    color: #34d399;
}

.project-icon.cat-education {
    background-color: rgba(96, 165, 250, 0.12);
    color: #60a5fa;
}

.project-icon.cat-security {
    background-color: rgba(245, 185, 66, 0.12);
    color: #f5b942;
}

.project-icon.cat-network {
    background-color: rgba(167, 139, 250, 0.12);
    color: #a78bfa;
}

.project-card:hover .project-icon,
.project-card:focus-visible .project-icon {
    background-color: var(--coral);
    color: #fff;
    box-shadow: 0 0 20px rgba(252, 110, 110, 0.5);
    transform: scale(1.05);
}

.project-details h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.project-details p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.hero-text .project-details p {
    margin-bottom: 0;
}

/* Status Dot (live projects) */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #34d399;
    margin-inline-end: 8px;
    flex-shrink: 0;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); }
    70% { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

/* Graphic Section */
.hero-graphic {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.graphic-circle {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(43,47,68,0.5) 0%, rgba(20,23,36,0) 70%);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.center-shield {
    font-size: 8rem;
    color: #fff;
    filter: drop-shadow(0 0 30px rgba(255,255,255,0.3));
    z-index: 2;
}

.floating-item {
    position: absolute;
    width: 60px;
    height: 60px;
    background-color: var(--dark-surface);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    animation: float 4s ease-in-out infinite;
}

.item-1 { top: 15%; right: 15%; animation-delay: 0s; }
.item-2 { bottom: 25%; right: 5%; animation-delay: 1s; }
.item-3 { bottom: 15%; left: 20%; animation-delay: 2s; }

/* Footer */
footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 8%;
    background-color: rgba(0,0,0,0.1);
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: 50px;
}

.footer-contact {
    display: flex;
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.footer-brand {
    text-align: left; /* Because RTL pushes this visually left, we want text left-aligned inside it */
    direction: ltr;
}

.brand-title {
    font-weight: 800;
    font-size: 1.2rem;
}

.brand-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Animations */
@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 1024px) {
    main {
        flex-direction: column;
        text-align: center;
        gap: 30px;
        padding-top: 40px;
    }
    
    .hero-text {
        max-width: 100%;
    }
    
    .tags-container, .hero-actions {
        justify-content: center;
    }
    
    .graphic-circle {
        width: 350px;
        height: 350px;
    }
    
    footer {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .footer-contact {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Tablets / large phones */
@media (max-width: 768px) {
    header {
        padding: 20px 6%;
    }

    .logo img {
        max-height: 60px;
    }

    main {
        padding: 0 6%;
    }

    .hero-text h1 {
        font-size: 2.4rem;
    }

    .hero-text p {
        font-size: 1rem;
        line-height: 1.7;
    }

    .tag {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .graphic-circle {
        width: 260px;
        height: 260px;
    }

    .center-shield {
        font-size: 5rem;
    }

    .floating-item {
        width: 46px;
        height: 46px;
        font-size: 1.1rem;
    }

    .projects-section {
        padding: 50px 6% 10px;
    }

    .section-header h2 {
        font-size: 1.6rem;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 15px;
    }

    .project-card {
        padding: 16px;
        gap: 15px;
    }

    .project-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
        border-radius: 12px;
    }

    .project-details h3 {
        font-size: 1.05rem;
    }

    .project-details p {
        font-size: 0.85rem;
    }

    footer {
        padding: 25px 6%;
    }
}

/* Phones */
@media (max-width: 480px) {
    header {
        padding: 18px 5%;
    }

    main {
        padding: 0 5%;
        padding-top: 30px;
        gap: 20px;
    }

    .hero-text h1 {
        font-size: 1.9rem;
    }

    .hero-text p {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }

    .tags-container {
        gap: 10px;
        margin-bottom: 30px;
    }

    .tag {
        padding: 7px 14px;
        font-size: 0.8rem;
    }

    .graphic-circle {
        width: 200px;
        height: 200px;
    }

    .center-shield {
        font-size: 3.5rem;
    }

    .floating-item {
        width: 38px;
        height: 38px;
        font-size: 0.95rem;
        border-radius: 10px;
    }

    .item-1 { right: 5%; }
    .item-3 { left: 5%; }

    .projects-section {
        padding: 40px 5% 10px;
    }

    .section-header {
        margin-bottom: 25px;
    }

    .section-header h2 {
        font-size: 1.4rem;
    }

    .section-header p {
        font-size: 0.9rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .project-card {
        flex-wrap: wrap;
        padding: 14px;
    }

    .project-details h3 {
        font-size: 1rem;
        flex-wrap: wrap;
    }

    .footer-contact {
        flex-direction: column;
        gap: 12px;
    }

    .contact-item {
        font-size: 0.85rem;
        text-align: center;
    }
}

/* Toast Notification */
.dev-toast {
    visibility: hidden;
    min-width: 250px;
    background-color: var(--coral);
    color: #fff;
    text-align: center;
    border-radius: 30px;
    padding: 16px 30px;
    position: fixed;
    z-index: 1000;
    left: 50%;
    bottom: 30px;
    font-size: 1.1rem;
    font-weight: bold;
    transform: translateX(-50%);
    box-shadow: 0 5px 20px rgba(252, 110, 110, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
}

.dev-toast.show {
    visibility: visible;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@keyframes fadein {
    from {bottom: 0; opacity: 0;}
    to {bottom: 30px; opacity: 1;}
}

@keyframes fadeout {
    from {bottom: 30px; opacity: 1;}
    to {bottom: 0; opacity: 0;}
}

/* Dev Badge */
.dev-badge {
    background-color: rgba(255,255,255,0.1);
    color: var(--text-secondary);
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 10px;
    margin-right: 10px;
    font-weight: normal;
    border: 1px solid var(--border-color);
}
