@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;800;900&display=swap');

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

:root {
    --purple: #82007c;
    --purple-2: #a01498;
    --purple-soft: #d99bd2;
    --yellow: #fbff57;
    --page-bg: #2b2929;
    --section-bg: #2b2929;
    --card-bg: rgba(74, 74, 74, 0.86);
    --text-main: #ffffff;
    --text-body: #f2f2f2;
    --text-soft: #d8d8d8;
    --title-color: #ffffff;
    --border: rgba(255, 255, 255, 0.14);
    --shadow: rgba(0, 0, 0, 0.28);
    --glass: rgba(255, 255, 255, 0.06);
    --icon-bg: #ffffff;
    --footer-bg: #060606;
    --footer-text: #ffffff;
    color-scheme: dark;
}

@media (prefers-color-scheme: light) {
    :root {
        --purple: #d086d5;
        --purple-2: #df9de3;
        --purple-soft: #82007c;
        --page-bg: #eeeeee;
        --section-bg: #eeeeee;
        --card-bg: rgba(255, 255, 255, 0.9);
        --text-main: #1f1f1f;
        --text-body: #242424;
        --text-soft: #444444;
        --title-color: #82007c;
        --border: rgba(0, 0, 0, 0.1);
        --shadow: rgba(0, 0, 0, 0.14);
        --glass: rgba(255, 255, 255, 0.55);
        --footer-bg: #575757;
        color-scheme: light;
    }
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 86px;
}

body {
    font-family: 'Cairo', sans-serif;
    background:
        radial-gradient(circle at 8% 20%, rgba(251, 255, 87, 0.06), transparent 26%),
        radial-gradient(circle at 92% 60%, rgba(217, 155, 210, 0.08), transparent 30%),
        var(--page-bg);
    color: var(--text-main);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

#starsCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}
.site-header,
.section-with-content,
footer {
    position: relative;
    z-index: 2;
}

/* Header */
.site-header {
    width: 100%;
    min-height: 76px;
    background: rgba(130, 0, 124, 0.9);
    backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.site-header::after {
    content: "☾";
    position: absolute;
    top: 4px;
    right: 16%;
    color: var(--yellow);
    font-size: 62px;
    font-weight: 900;
    line-height: 1;
    animation: moonFloat 3.8s ease-in-out infinite alternate;
}

@media (prefers-color-scheme: light) {
    .site-header {
        background: rgba(208, 134, 213, 0.92);
    }

    .site-header::after {
        content: "☀";
        top: 12px;
        font-size: 44px;
    }
}

.navbar ul {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 54px;
}

.navbar a {
    color: var(--text-main);
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    position: relative;
    transition: 0.28s ease;
}

.navbar a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -9px;
    width: 0;
    height: 3px;
    border-radius: 10px;
    background: var(--yellow);
    transform: translateX(-50%);
    transition: 0.28s ease;
}

.navbar a:hover,
.navbar a:focus-visible {
    color: var(--yellow);
    outline: none;
}

.navbar a:hover::after,
.navbar a:focus-visible::after {
    width: 100%;
}

/* Hero */
.hero-section {
    min-height: 560px;
    position: relative;
    padding: 70px 110px 0;
    background:
        radial-gradient(circle at 20% 25%, rgba(251, 255, 87, 0.08), transparent 23%),
        radial-gradient(circle at 80% 45%, rgba(217, 155, 210, 0.18), transparent 36%),
        linear-gradient(135deg, #85007d, #a01498 58%, #8a087f);
    overflow: hidden;
}
.hero-section::before {
    content: "";
    position: absolute;
    width: 610px;
    height: 610px;
    right: 35px;
    top: 20px;
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(230, 162, 227, 0.9) 0%, rgba(230, 162, 227, 0.72) 45%, rgba(251, 255, 87, 0.16) 72%, transparent 100%);
    filter: blur(18px);
    animation: bgMove 9s ease-in-out infinite alternate;
    z-index: 0;
}

.hero-section::after {
    content: "";
    position: absolute;
    width: 230px;
    height: 230px;
    left: -80px;
    bottom: -60px;
    border-radius: 50%;
    background: rgba(251, 255, 87, 0.14);
    filter: blur(18px);
    animation: bgMove 7s ease-in-out infinite alternate-reverse;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: minmax(300px, 540px) 1fr;
    align-items: center;
    gap: 45px;
    max-width: 1180px;
    margin: 0 auto;
}

.hero-text {
    animation: fadeLeft 0.9s ease both;
}

.eyebrow {
    font-size: 31px;
    font-weight: 400;
    margin-bottom: 6px;
    color: #ffffff;
}

.hero-text h1 {
    font-size: clamp(42px, 5vw, 58px);
    font-weight: 900;
    line-height: 1.05;
    color: #ffffff;
}

.hero-text h2 {
    font-size: clamp(36px, 5vw, 54px);
    line-height: 1.15;
    font-weight: 900;
    color: var(--yellow);
    margin: 8px 0 28px;
}

.hero-description {
    max-width: 520px;
    font-size: 15px;
    line-height: 1.9;
    font-weight: 600;
    color: #f2e7f2;
    margin-bottom: 36px;
}

.hero-image-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    animation: fadeRight 1s ease both;
}

.hero-image-wrapper img {
    width: min(100%, 690px);
    transform: translateX(22px);
    align-self: flex-end;
}
/* Shared */
.section-heading {
    text-align: center;
    margin-bottom: 58px;
}

.section-heading h2,
.about-content h2,
.contact-content h2 {
    font-size: clamp(40px, 5vw, 60px);
    line-height: 1.1;
    font-weight: 900;
    color: var(--title-color);
}

.section-heading p {
    color: var(--text-soft);
    margin-top: 10px;
    font-size: 17px;
}

.primary-button {
    border: none;
    background: var(--yellow);
    color: #111111;
    min-width: 190px;
    height: 58px;
    border-radius: 35px;
    padding: 0 30px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    transition: 0.28s ease;
    box-shadow: 0 12px 24px rgba(251, 255, 87, 0.22);
}

.primary-button:hover,
.primary-button:focus-visible,
.filter-button:hover,
.read-more:hover,
.circle-button:hover,
.circle-button:focus-visible {
    transform: translateY(-5px);
    outline: none;
}

.primary-button:hover,
.primary-button:focus-visible {
    box-shadow: 0 16px 30px rgba(251, 255, 87, 0.34);
}

.circle-button {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: none;
    background: var(--icon-bg);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: 0.28s ease;
    box-shadow: 0 8px 18px var(--shadow);
}

.circle-button:hover,
.circle-button:focus-visible {
    background: var(--yellow);
    transform: translateY(-6px) scale(1.08);
}

.circle-button img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.social-media-buttons {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}

/* About */
.about-section {
    min-height: 540px;
    padding: 90px 115px;
    background:
        radial-gradient(circle at 12% 30%, rgba(251, 255, 87, 0.07), transparent 28%),
        var(--section-bg);
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: 420px minmax(300px, 760px);
    justify-content: center;
    align-items: center;
    gap: 80px;
    overflow: hidden;
}

.about-image img {
    width: 390px;
    animation: floatSoft 3.6s ease-in-out infinite alternate;
}

.about-content h2 {
    margin-bottom: 36px;
}

.about-content p {
    font-size: 18px;
    line-height: 1.68;
    color: var(--text-body);
}

.about-content .social-media-buttons {
    margin-top: 34px;
}

/* Skills */
.skills-section {
    padding: 86px 120px 120px;
    background:
        radial-gradient(circle at 12% 45%, rgba(251, 255, 87, 0.1), transparent 26%),
        radial-gradient(circle at 88% 35%, rgba(217, 155, 210, 0.15), transparent 30%),
        linear-gradient(135deg, var(--section-bg), #242222);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(250px, 1fr));
    gap: 34px;
    max-width: 1050px;
    margin: 0 auto;
}

.skill-card {
    min-height: 350px;
    background: var(--card-bg);
    border-radius: 24px;
    padding: 38px 28px 32px;
    box-shadow: 0 18px 35px var(--shadow);
    border: 1px solid var(--border);
    backdrop-filter: blur(14px);
    transition: 0.35s ease;
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(251, 255, 87, 0.16), rgba(217, 155, 210, 0.12), transparent);
    opacity: 0;
    transition: 0.35s ease;
}

.skill-card:hover {
    transform: translateY(-18px);
    box-shadow: 0 28px 55px rgba(0, 0, 0, 0.42);
    border-color: rgba(251, 255, 87, 0.35);
}

.skill-card:hover::before {
    opacity: 1;
}

.skill-card > * {
    position: relative;
    z-index: 1;
}

.skill-card h3 {
    color: var(--purple-soft);
    font-size: 22px;
    font-weight: 900;
    margin: 26px 0 22px;
}

.skill-card p {
    color: var(--text-body);
    font-size: 14px;
    line-height: 1.7;
    font-weight: 600;
}

.featured-card {
    transform: translateY(-18px);
}

.featured-card:hover {
    transform: translateY(-28px);
}

.icon-only {
    pointer-events: none;
}

/* Projects */
.projects-section {
    padding: 72px 80px 105px;
    background:
        radial-gradient(circle at 80% 10%, rgba(217, 155, 210, 0.09), transparent 29%),
        var(--section-bg);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.project-filters {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 62px;
}

.filter-button {
    min-width: 165px;
    height: 56px;
    padding: 0 24px;
    border-radius: 35px;
    border: 1.5px solid var(--yellow);
    background: transparent;
    color: var(--yellow);
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    transition: 0.28s ease;
}

.filter-button.active,
.filter-button:hover {
    background: var(--yellow);
    color: #111111;
    box-shadow: 0 16px 30px rgba(251, 255, 87, 0.22);
}

.projects-grid {
    max-width: 1060px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 44px;
}

.project-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 14px 30px var(--shadow);
    border: 1px solid var(--border);
    transition: 0.32s ease;
}

.project-card:hover {
    transform: translateY(-14px);
    box-shadow: 0 26px 50px rgba(0, 0, 0, 0.38);
}

.project-picture {
    width: 100%;
    height: 220px;
    background:
        linear-gradient(135deg, rgba(251, 255, 87, 0.2), rgba(217, 155, 210, 0.28)),
        linear-gradient(135deg, #ffffff, #e9e9e9);
    transition: 0.32s ease;
}

.project-card:hover .project-picture {
    transform: scale(1.035);
}

.project-info {
    padding: 26px 30px 30px;
}

.project-category {
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 8px;
}

.project-info h3 {
    color: var(--text-main);
    font-size: 20px;
    font-weight: 900;
    margin-bottom: 10px;
}

.project-info p {
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.62;
    margin-bottom: 22px;
}

.read-more {
    min-height: 36px;
    padding: 0 14px;
    border-radius: 18px;
    background: transparent;
    color: var(--yellow);
    border: 1.5px solid var(--yellow);
    font-size: 12px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.28s ease;
}

.read-more:hover {
    background: var(--yellow);
    color: #111111;
}

.read-more img {
    width: 16px;
}

/* Contact */
.contact-section {
    min-height: 540px;
    padding: 72px 20px 74px;
    background:
        radial-gradient(circle at 50% 20%, rgba(251, 255, 87, 0.08), transparent 30%),
        var(--section-bg);
    text-align: center;
    overflow: hidden;
}

.contact-content {
    max-width: 850px;
    margin: 0 auto;
}

.contact-content h2 {
    background: linear-gradient(90deg, #e5a2c9, var(--yellow));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 22px;
}

.contact-content p {
    color: var(--text-body);
    font-size: clamp(22px, 3vw, 31px);
    line-height: 1.55;
    font-weight: 500;
}

.say-hello {
    min-width: 250px;
    height: 50px;
    margin: 34px 0 38px;
    gap: 12px;
    overflow: hidden;
}

.say-hello .plane {
    display: inline-block;
    transform: translateX(0);
}

.say-hello:hover .plane,
.say-hello:focus-visible .plane {
    animation: planeStraight 0.55s ease-in-out;
}

.social-title {
    color: var(--yellow) !important;
    font-size: 28px !important;
    margin-bottom: 24px;
}

.contact-section .social-media-buttons {
    justify-content: center;
}

.github-icon img {
    width: 34px;
    height: 34px;
    filter: invert(1);
}

@media (prefers-color-scheme: light) {
    .contact-content h2 {
        background: none;
        -webkit-background-clip: initial;
        background-clip: initial;
        color: var(--title-color);
    }

    .filter-button {
        border-color: #111111;
        color: #111111;
    }

    .filter-button.active,
    .filter-button:hover {
        background: var(--purple);
        border-color: var(--purple);
        color: #ffffff;
    }

    .contact-section .circle-button {
        background: #000000;
    }

    .contact-section .circle-button img {
        filter: invert(1);
    }
}

/* Footer */
footer {
    min-height: 78px;
    background: var(--footer-bg);
    color: var(--footer-text);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 18px;
    font-size: 14px;
    font-weight: 700;
}

/* Reveal animation */
.reveal-section .reveal-item {
    opacity: 0;
    transform: translateY(55px) scale(0.985);
    transition: opacity 0.85s ease, transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-section .reveal-item.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Keyframes */
@keyframes fadeLeft {
    from { opacity: 0; transform: translateX(-55px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeRight {
    from { opacity: 0; transform: translateX(55px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes floatSoft {
    from { transform: translateY(0); }
    to { transform: translateY(-14px); }
}

@keyframes bgMove {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(28px, -22px) scale(1.08); }
    100% { transform: translate(-18px, 16px) scale(0.98); }
}

@keyframes moonFloat {
    from { transform: translateY(0) rotate(-10deg); }
    to { transform: translateY(-6px) rotate(-10deg); }
}

@keyframes planeStraight {
    0% { transform: translateX(0); }
    45% { transform: translateX(28px); }
    100% { transform: translateX(0); }
}

/* Responsive */
@media (max-width: 1200px) {
    .navbar ul {
        gap: 34px;
    }

    .hero-section {
        padding-left: 60px;
        padding-right: 60px;
    }

    .about-section {
        padding-left: 70px;
        padding-right: 70px;
        grid-template-columns: 340px minmax(300px, 1fr);
        gap: 55px;
    }

    .skills-section,
    .projects-section {
        padding-left: 50px;
        padding-right: 50px;
    }
}

@media (max-width: 900px) {
    html {
        scroll-padding-top: 115px;
    }

    .site-header {
        padding: 16px 20px;
    }

    .site-header::after {
        display: none;
    }

    .navbar ul {
        flex-wrap: wrap;
        gap: 16px 24px;
    }

    .navbar a {
        font-size: 13px;
    }

    .hero-section {
        padding: 58px 28px 64px;
        text-align: center;
    }

    .hero-section::before {
        width: 460px;
        height: 460px;
        right: 50%;
        transform: translateX(50%);
        top: 290px;
        filter: blur(28px);
        opacity: 0.75;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-image-wrapper img {
        width: min(90%, 420px);
        transform: none;
    }

    .about-section {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 60px 28px;
    }

    .about-image img {
        width: min(80%, 320px);
        margin: 0 auto;
    }

    .about-content .social-media-buttons {
        justify-content: center;
    }

    .skills-section,
    .projects-section {
        padding: 62px 24px 80px;
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
        max-width: 480px;
    }

    .featured-card {
        transform: none;
    }

    .featured-card:hover {
        transform: translateY(-18px);
    }

    .project-filters {
        margin-bottom: 44px;
    }

    .filter-button {
        width: min(100%, 260px);
    }

    .contact-section {
        padding: 62px 20px 70px;
    }
}

@media (max-width: 520px) {
    .hero-text h1 {
        font-size: 40px;
    }

    .hero-text h2 {
        font-size: 32px;
    }

    .eyebrow {
        font-size: 24px;
    }

    .primary-button {
        width: 100%;
        max-width: 260px;
    }

    .project-info {
        padding: 24px 22px 26px;
    }

    .social-media-buttons {
        justify-content: center;
        gap: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
.admin-link {
    display: inline-block;
    margin-left: 12px;
    opacity: 0.35;
    font-size: 12px;
    color: inherit;
    text-decoration: none;
    transition: 0.25s ease;
}

.admin-link:hover {
    opacity: 1;
    color: var(--yellow);
}