* {
    margin: 0;
    box-sizing: border-box;
}

:root {
    --db: #2f3238;
    --dc: #f5f5f5;
    --lb: #f9f9f9;
    --lc: #1a1a1a;
    --l: #1abc89;

    font-size: 13px;
    font-family: "Source Sans Pro", system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
    line-height: 1.618;
    font-weight: 400;
}

body {
    background-color: var(--db);
    color: var(--dc);
    min-height: 100vh;
}

a {
    color: var(--l);
    text-decoration: none;
}

a:hover {
    opacity: 0.85;
}

p {
    font-size: 1.2rem;
    color: rgba(245, 245, 245, 0.5);
}

.small {
    font-size: 1rem;
    margin-top: 1em;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem 5rem;
}

header {
    text-align: center;
    padding-bottom: 3rem;
}

h1 {
    margin-bottom: 1.2rem;
}
.hero-name {
    font-size: clamp(2.6rem, 4vw, 3.4rem);
    line-height: 1.1;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-bottom: 0.6rem;
}

.hero-name .first,
.hero-name .last {
    position: relative;
    display: inline-block;
    background: linear-gradient(120deg, #ffffff, #1abc89, #8ae6ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: 0;
    transform: translateY(18px);
    animation: nameFadeIn 0.8s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.hero-name .last {
    font-weight: 700;
    letter-spacing: 0.18em;
    font-size: 0.9em;
    text-indent: 0.18em;
    animation-delay: 0.12s;
}

/* خط متحرك تحت الاسم */
.hero-name::after {
    content: "";
    position: absolute;
    bottom: 0;
    height: 2px;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #1abc89, #8ae6ff, #ffffff);
    animation: underlineGrow 0.8s ease-out forwards;
    animation-delay: 0.25s;
}

/* انيميشن الظهور */
@keyframes nameFadeIn {
    0% {
        opacity: 0;
        transform: translateY(18px);
        filter: blur(4px);
    }
    60% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* انيميشن الخط */
@keyframes underlineGrow {
    0% {
        width: 0;
        opacity: 0;
        transform: translateY(4px);
    }
    70% {
        width: 72%;
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        width: 52%;
        opacity: 0.9;
        transform: translateY(0);
    }
}
body.light .hero-name .first,
body.light .hero-name .last {
    background: linear-gradient(120deg, #111827, #1abc89, #4b9bff);
    -webkit-background-clip: text;
    background-clip: text;
}


h2 {
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
}

/* SVG / items grid */

svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

circle {
    transform-origin: 50% 50%;
    transform: scale(0);
    transition: transform 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

text {
    font-size: 1.1rem;
    text-transform: uppercase;
    text-anchor: middle;
    letter-spacing: 1px;
    font-weight: 600;
}

.svg-text {
    fill: #51555e; /* تقريب لـ lighten(#2f3238, 16%) */
}

.svg-masked-text {
    fill: rgba(255, 255, 255, 1);
}

image {
    transform: scale(1.1);
    transform-origin: 50% 50%;
    transition: transform 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.items {
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
}

.item {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    width: 300px;
    height: 200px;
    margin: 5px;
    cursor: pointer;
    background-color: #383c43; /* تقريب لـ lighten(#2f3238, 5%) */
    border-radius: 2px;
    box-shadow:
        0 5px 5px rgba(0, 0, 0, 0.02),
        inset 0 0 0 1px rgba(0, 0, 0, 0.07);
    transform: translateZ(0);
}

.item:hover circle,
.item:hover image {
    transform: scale(1);
}

/* Theme buttons */

button {
    width: 12px;
    height: 12px;
    border: none;
    appearance: none;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5);
    border-radius: 1px;
    cursor: pointer;
}

button.dark {
    background-color: var(--db);
}

button.light {
    background-color: var(--lb);
}

.options {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10;
}

.options button + button {
    margin-left: 0.5rem;
}

/* Light theme */

body.light {
    background-color: var(--lb);
    color: var(--lc);
}

body.light p {
    color: rgba(26, 26, 26, 0.5);
}

body.light .item {
    background-color: var(--dc);
}

body.light .svg-text {
    fill: rgba(0, 0, 0, 0.1);
}

/* Info section */

.info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.8rem;
    margin-top: 3.5rem;
}

.info-block {
    background: rgba(0, 0, 0, 0.18);
    border-radius: 8px;
    padding: 1.6rem 1.4rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

body.light .info-block {
    background: rgba(255, 255, 255, 0.9);
}

/* Responsive tweaks */

@media (max-width: 700px) {
    .container {
        padding: 3rem 1.2rem 4rem;
    }

    header {
        padding-bottom: 2.2rem;
    }

    h1 {
        font-size: 2.1rem;
    }

    .item {
        width: 100%;
        max-width: 360px;
        height: 220px;
    }
}
