:root {
    --bg-color: #26334d;
    /* Much lighter, smooth slate-blue */
    --card-bg: rgba(255, 255, 255, 0.05);
    /* White-tinted glass for freshness */
    --card-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #e2e8f0;
    /* Very light grey */
    --accent-color: #38bdf8;
    --accent-glow: #7dd3fc;
    /* Softer pastel cyan */
    --success-color: #34d399;

    --font-main: 'Cairo', sans-serif;
    --font-alt: 'Tajawal', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    background-image:
        radial-gradient(circle at 10% 20%, rgba(56, 189, 248, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(52, 211, 153, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.05) 0%, transparent 60%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Background Abstract Effect */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    right: -50%;
    bottom: -50%;
    width: 200%;
    height: 200%;
    background: transparent url('http://assets.iceable.com/img/noise-transparent.png') repeat 0 0;
    background-repeat: repeat;
    animation: bg-animation .2s infinite;
    opacity: .05;
    visibility: visible;
    pointer-events: none;
    z-index: -1;
}

/* Glassmorphism Utility */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-color);
}

/* Layout Utilities */
.container {
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.section {
    padding: 60px 0;
}

/* Typography */
h1,
h2,
h3 {
    font-family: var(--font-alt);
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-glow));
    margin: 10px auto 0;
    border-radius: 2px;
}

/* Hero Section */
.hero-section {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 40px;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.image-wrapper {
    position: relative;
    margin-bottom: 2rem;
    width: 180px;
    height: 180px;
}

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--card-bg);
    position: relative;
    z-index: 2;
}

.glow-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 102%;
    height: 102%;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--accent-color), var(--success-color));
    filter: blur(15px);
    z-index: 1;
    animation: pulse-glow 3s infinite alternate;
}

@keyframes pulse-glow {
    0% {
        opacity: 0.5;
        filter: blur(15px);
    }

    100% {
        opacity: 0.8;
        filter: blur(20px);
    }
}

.hero-name {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-title {
    font-size: 1.2rem;
    color: var(--accent-glow);
    margin-bottom: 2rem;
}

.personal-info-card {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    padding: 1.5rem 2rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-item .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--accent-color);
}

.info-item .icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    filter: drop-shadow(0 0 3px rgba(56, 189, 248, 0.6));
}

/* Timeline (Education) */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    right: 20px;
    /* Arabic RTL alignment */
    height: 100%;
    width: 2px;
    background: var(--card-border);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding: 1.5rem;
    margin-right: 50px;
    /* Space for the line */
}

.timeline-dot {
    position: absolute;
    top: 2rem;
    right: -36px;
    width: 16px;
    height: 16px;
    background: var(--accent-color);
    border-radius: 50%;
    border: 4px solid var(--bg-color);
    box-shadow: 0 0 10px var(--accent-color);
}

.timeline-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.timeline-content .date {
    display: inline-block;
    font-size: 0.9rem;
    color: var(--accent-glow);
    margin-bottom: 0.5rem;
    padding: 2px 8px;
    background: rgba(14, 165, 233, 0.1);
    /* Low opacity accent */
    border-radius: 4px;
}

.institution {
    color: var(--text-secondary);
}

/* Skills Cards/Tags */
.skills-category {
    margin-bottom: 3rem;
    text-align: center;
}

.category-title {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.tag {
    padding: 0.8rem 1.8rem;
    font-weight: 500;
    cursor: default;
    border-radius: 8px;
    /* Slightly softer corners, less pill-like */
    position: relative;
    z-index: 1;
    overflow: hidden;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
}

.tag:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-color);
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Removed previous ::before pseudo element for cleaner look */



/* Grid Cards (Courses/Hobbies) */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card {
    padding: 2rem;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card h3 {
    color: var(--accent-color);
}

.card p {
    color: var(--text-secondary);
}

/* Footer & Contact */
.footer {
    margin-top: 4rem;
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid var(--card-border);
    border-radius: 30px 30px 0 0;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.contact-btn {
    text-decoration: none;
    color: var(--text-primary);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: bold;
}

.contact-btn:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(14, 165, 233, 0.4);
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Reveal Class (handled by JS) */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}


/* About Section */
.about-content {
    padding: 2rem;
    text-align: center;
    line-height: 1.8;
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .section-title {
        font-size: 1.8rem;
    }

    .timeline::before {
        right: 20px;
    }

    .timeline-item {
        margin-right: 40px;
        padding: 1rem;
    }

    .hero-name {
        font-size: 2rem;
    }
}