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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'IBM Plex Mono', monospace;
    line-height: 1.7;
    color: #ffffff;
    background-color: #000000;
    direction: ltr;
    letter-spacing: 0.3px;
}

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .8s ease, transform .8s cubic-bezier(.19,1,.22,1);
    will-change: opacity, transform;
}

.reveal.reveal-fast { transition-duration: .55s; }
.reveal.reveal-slow { transition-duration: 1.1s; }
.reveal.reveal-hero-slower { transition-duration: 1.35s; }
.reveal.delay-1 { transition-delay: .08s; }
.reveal.delay-2 { transition-delay: .16s; }
.reveal.delay-3 { transition-delay: .24s; }
.reveal.delay-4 { transition-delay: .32s; }
.reveal.delay-5 { transition-delay: .40s; }

.reveal.show {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal, .reveal.show { transition: none; transform: none; opacity: 1; }
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #333;
    z-index: 1000;
}

.nav {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #ffffff;
    font-weight: 300;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #007AFF;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -5px;
    left: 0;
    background-color: #007AFF;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #ffffff;
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: #000000;
    position: relative;
    overflow: hidden;
    color: white;
    padding-top: 80px;
}

.hero-content {
        width: 100%;
        max-width: 1200px;
        margin: 0 auto;
    padding: 0 40px;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4rem;
    min-height: calc(100vh - 80px);
}

@media (min-width: 1200px) {
    .hero-content { margin-left: 80px; margin-right: auto; }
}

.hero-text {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.hero::before, .hero::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
}


.hero::before {
    background-image:
        radial-gradient(circle at 2px 2px, rgba(255,255,255,0.30) 2px, transparent 2px),
        radial-gradient(circle at 22px 22px, rgba(0,122,255,0.25) 2px, transparent 2px);
    background-size: 70px 70px, 70px 70px;
    background-position: 0 0, 35px 35px;
    animation: heroDotsShift 5s linear infinite;
    opacity: .55;
}

.hero::after {
    background-image:
    radial-gradient(circle at 8px 8px, rgba(255,255,255,0.22) 3px, transparent 3px),
    radial-gradient(circle at 38px 38px, rgba(0,122,255,0.18) 4px, transparent 4px);
    background-size: 95px 95px, 135px 135px;
    background-position: 0 0, 48px 48px;
    mix-blend-mode: lighten;
    opacity: .35;
}

@keyframes heroDotsShift {
    0% { background-position: 0 0, 35px 35px; }
    100% { background-position: 70px 70px, 105px 105px; }
}

.hero-title {
    font-size: 5.5rem;
    font-weight: 500;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-align: left;
}

.hero-greeting {
    font-size: 3rem;
    font-weight: 300;
    letter-spacing: 1px;
    margin-bottom: 0.3rem;
    color: #888;
    text-align: left;
}

.highlight {
    color: #007AFF;
    font-weight: 600;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 2rem;
    opacity: 0.8;
    max-width: 600px;
    margin-left: 0;
    margin-right: 0;
    line-height: 1.5;
    text-align: left;
}


.hero-social {
    display: flex;
    gap: 1.5rem;
    justify-content: flex-start;
}

.hero-social-link {
    background: none;
    color: #ffffff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    transition: color 0.3s ease, transform 0.3s ease;
    font-size: 1.3rem;
    padding: 0.2rem 0.1rem;
}

.hero-social-link:hover {
    color: #007AFF;
    transform: translateY(-3px);
}

.hero-social-link i, .footer-social-link i { font-size: 1.3rem; }

.section-title {
    text-align: left;
    font-size: 3rem;
    font-weight: 500;
    margin-bottom: 1.3rem;
    color: #ffffff;
    position: relative;
}

.star {
    color: #007AFF;
    margin-left: 0.5rem;
}

.about {
    padding: 80px 0;
    background: #000000;
    border-top: 1px solid #333;
}

.about-content {
    max-width: 800px;
}

.about-description {
    font-size: 1.25rem;
    line-height: 1.8;
    color: #cccccc;
    margin-bottom: 3rem;
}

.skills-section h3 {
    font-size: 1.4rem;
    color: #ffffff;
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tag {
    background: transparent;
    color: #ffffff;
    padding: 0.4rem 0.8rem;
    border: 1px solid #333;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 300;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    border-color: #007AFF;
    color: #007AFF;
}
/* أزرار المهارات (Python / SQL) بسيطة بدون نبض */
.expand-skills, .expand-skills2 {
    background: transparent;
    cursor: pointer;
    border: 2px solid #007AFF;
    color: #007AFF !important;
    position: relative;
    border-radius: 8px;
    transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.expand-skills:hover, .expand-skills2:hover {
    background: rgba(0,122,255,0.07);
}
.expand-skills:active, .expand-skills2:active { transform: none; }

.expand-skills::before, .expand-skills2::before,
.expand-skills::after, .expand-skills2::after { display: none; }


.additional-skills {
    display: none !important;
}

.additional-skills2 {
    display: none !important;
}

.skills-tooltip {
    position: absolute;
    min-width: 180px;
    max-width: 300px;
    background: rgba(18,18,18,0.96);
    border: 1px solid #262626;
    border-radius: 8px;
    padding: 0.55rem 0.7rem 0.55rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    box-shadow: 0 6px 16px -4px rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
    opacity: 0;
    transform: translateY(6px) scale(.96);
    pointer-events: none;
    transition: opacity .22s ease, transform .26s cubic-bezier(.19,1,.22,1);
    z-index: 3000;
}

.skills-tooltip.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.skills-tooltip:before { display: none; }

.skills-tooltip .skill-tag {
    position: relative;
    cursor: pointer;
}

.skills-tooltip .skill-tag:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(0,122,255,0.4); border-color:#007AFF; }

.skills-tooltip .skill-tag.copied::after { content: attr(data-copied); position:absolute; top:-14px; left:50%; transform:translateX(-50%); font-size:0.5rem; background:#007AFF; color:#fff; padding:2px 5px; border-radius:4px; letter-spacing:.5px; animation: fadePop .7s ease forwards; }

@keyframes fadePop { 0%{opacity:0;transform:translate(-50%,2px) scale(.92);} 30%{opacity:1;transform:translate(-50%,0) scale(1);} 80%{opacity:1;} 100%{opacity:0;transform:translate(-50%,-2px) scale(.94);} }

.skill-tag.is-open {
    border-color: #007AFF;
    box-shadow: 0 0 0 2px rgb(0, 123, 255);
}

@media (max-width: 640px) {
    .skills-tooltip {
        left: 50% !important;
        transform: translate(-50%, 8px) scale(.96);
        max-width: 90vw;
    }
    .skills-tooltip.show { transform: translate(-50%, 0) scale(1); }
    /* لا مثلث */
}

.expand-skills:focus, .expand-skills2:focus { outline: none; }
.expand-skills:focus-visible, .expand-skills2:focus-visible {
    box-shadow: 0 0 0 2px rgba(0,122,255,0.45);
    border-color: #007AFF;
}

.additional-skills-content, .additional-skills-content2 {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    padding: 1rem;
    background: rgba(0, 122, 255, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(0, 122, 255, 0.3);
    animation: slideInUp 0.5s ease-out;
}

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


.experience {
    padding: 80px 0;
    background: #000000;
    border-top: 1px solid #333;
}

.experience-item {
    background: transparent;
    padding: 2rem 0;
    border-left: 2px solid #007AFF;
    padding-left: 2rem;
    margin-bottom: 2rem;
}

.experience-header h3 {
    font-size: 1.5rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.experience-header .company {
    display: block;
    color: #007AFF;
    font-weight: 300;
    margin-bottom: 0.5rem;
}

.experience-header .date-range {
    display: block;
    color: #888;
    font-size: 1rem;
    font-weight: 300;
    margin-bottom: 1rem;
}

.experience-bullets {
    list-style: none;
    padding: 0;
}

.experience-bullets li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 0.8rem;
    color: #cccccc;
    line-height: 1.6;
    font-weight: 300;
    font-size: 1.05rem;
}

.experience-bullets li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #007AFF;
}


.projects {
    padding: 80px 0;
    background: #000000;
    border-top: 1px solid #333;
}

.projects-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: .6rem;
    margin-bottom: 1rem;
}

.projects-nav {
    background: transparent;
    color: #ffffff;
    border: 1px solid #333;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color .2s ease, color .2s ease, transform .2s ease;
}

.projects-nav:hover { color: #007AFF; border-color: #4a4a4a; transform: translateY(-1px); }
.projects-nav:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* two columns by default */
    gap: 1.1rem;
    max-width: 1100px;
    transition: opacity 0.2s ease-in-out, min-height 0.3s ease-in-out;
}

.projects-grid.fade-out {
    opacity: 0;
}

.project-card.hidden-by-pager { display: none; }

.project-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    border: 1px solid #333;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    max-height: 210px;
    max-width: 100%;
}

.project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s cubic-bezier(.19,1,.22,1);
    display: block;
    max-height: 210px;
    max-width: 100%;
}

.project-thumb:hover img {
    transform: scale(1.04);
}

.project-card {
    background: transparent;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 1.2rem 1rem 1.2rem 1rem;
    transition: all 0.3s ease;
    position: relative;
}


.project-card:hover {
    border-color: #007AFF;
}

.project-title {
    font-size: 1.13rem;
    color: #ffffff;
    margin-bottom: 0.7rem;
    font-weight: 400;
}

.project-description {
    color: #cccccc;
    line-height: 1.5;
    margin-bottom: 1rem;
    font-weight: 300;
    font-size: 0.97rem;
}

.project-tech {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tech-tag {
    background: transparent;
    color: #007AFF;
    padding: 0.3rem 0.6rem;
    border: 1px solid #333;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 300;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    text-decoration: none;
    color: #007AFF;
    font-weight: 300;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.project-link:hover {
    color: #ffffff;
}

.project-card.coming-soon {
    opacity: 0.5;
    border-style: dashed;
}

.project-card.coming-soon:hover {
    opacity: 0.7;
    border-color: #333;
}

.coming-soon-text {
    color: #666 !important;
    cursor: default;
}

.coming-soon-text:hover {
    color: #666 !important;
}

.footer {
    background: #000000;
    color: #666;
    padding: 2rem 0;
    border-top: 1px solid #333;
}

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

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social-link {
    background: none;
    color: #666;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
    font-size: 1rem;
    padding: 0.15rem 0.1rem;
}

.footer-social-link:hover {
    color: #007AFF;
    transform: translateY(-2px);
}

.footer-content p {
    margin: 0;
    font-weight: 300;
    font-size: 1rem;
}


@media (max-width: 768px) {
    .header {
        display: none;
    }

    .hero {
        padding-top: 0;
        text-align: center;
    }

    .hero-content {
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 24px;
        gap: 1.4rem;
        margin: 0;
        padding-left: 1.1rem;
        padding-right: 1.1rem;
        min-height: auto; /* reduce tall height */
    }


    .hero-text {
        text-align: left;
    }
    .hero-greeting {
        font-size: 1.3rem;
    }

    .hero-social {
        justify-content: flex-start;
    }

    .nav-menu {
        position: fixed;
        right: -100%;
        top: 70px;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(0, 0, 0, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 2rem;
        transition: right 0.3s ease;
        border-top: 1px solid #333;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-toggle {
        display: block;
    }

    .hero-title {
        font-size: 3rem; /* smaller on small screens */
        line-height: 1.25;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 3rem;
        margin-bottom: 1rem;
    }
    .about-content,


    .about-description {
        font-size: 1.2rem;
    }

    #projects .container {
        display: flex;
        flex-direction: column;
    }

    #projects .section-title {
        order: 1;
    }

    .projects-grid {
        grid-template-columns: 1fr; /* single column on tablets & small screens */
        gap: 1.7rem;
        order: 2;
    }

    .projects-controls {
        justify-content: center;
        order: 3;
        margin-top: 1.5rem;
        margin-bottom: 0;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .header {
        display: none;
    }

    .hero {
        padding-top: 0;
        text-align: center;
    }

    .hero-content {
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 24px;
        gap: 1.4rem;
        margin: 0;
        padding-left: 1.25rem; /* slightly more breathing room on tiny screens */
        padding-right: 1.25rem;
        min-height: auto; /* reduce tall height */
    }

    .hero-text {
        text-align: center;
    }
    .hero-greeting {
        font-size: 1.3rem;
    }

    .hero-social {
        justify-content: flex-start;
    }

    .nav-menu {
        position: fixed;
        right: -100%;
        top: 70px;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(0, 0, 0, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 2rem;
        transition: right 0.3s ease;
        border-top: 1px solid #333;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-toggle {
        display: block;
    }

    .hero-title {
        font-size: 2.2rem; /* smaller on small screens */
        line-height: 1.25;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2.5rem;
        margin-bottom: 0.8rem;
    }

    .about-content,

    .about-description {
        font-size: 1.1rem;
    }

    .projects-grid {
        grid-template-columns: 1fr; /* single column on tablets & small screens */
        gap: 1.7rem;
    }

    .project-description {
        font-size: 1rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }
}
