:root {
    --primary-color: #00d2ff;
    --secondary-color: #3a7bd5;
    --accent-color: #ff007f;
    --bg-dark: #0a0b10;
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-main: #ffffff;
    --text-dim: #b0b0b0;
    --glass-border: rgba(255, 255, 255, 0.1);
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --phone-border: #1a1a1a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Almarai', 'Outfit', sans-serif;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Effects */
.bg-glow {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 210, 255, 0.1) 0%, rgba(58, 123, 213, 0.05) 50%, transparent 70%);
    z-index: -1;
    pointer-events: none;
    animation: pulseGlow 10s infinite alternate;
}

@keyframes pulseGlow {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0.8;
    }
}

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(var(--glass-border) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -2;
    opacity: 0.3;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
    background: rgba(10, 11, 16, 0.5);
    backdrop-filter: blur(10px);
}

.navbar.scrolled {
    padding: 10px 0;
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 2px;
}

.logo img {
    height: 60px;
    width: auto;
    display: block;
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
    opacity: 0.7;
}

.nav-links a:hover {
    color: var(--primary-color);
    opacity: 1;
}

.nav-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

/* Sections General */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 15px;
}

.divider {
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    margin: 0 auto;
    border-radius: 2px;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding-top: 150px;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 60px;
}

.hero-text h1 {
    font-size: 64px;
    font-weight: 800;
    line-height: 1.1;
    margin: 10px 0;
}

.hero-text h3 {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.hero-text p {
    font-size: 18px;
    color: var(--text-dim);
    max-width: 500px;
    margin-bottom: 40px;
}

.badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(0, 210, 255, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.hero-btns {
    display: flex;
    gap: 20px;
}

.btn {
    padding: 15px 35px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
    text-align: center;
}

.btn.primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 10px 20px rgba(0, 210, 255, 0.2);
}

.btn.primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 210, 255, 0.3);
}

.btn.secondary {
    border: 2px solid var(--glass-border);
    color: var(--text-main);
}

.btn.secondary:hover {
    background: var(--glass-border);
}

.hero-image-wrapper {
    position: relative;
    width: 400px;
    height: 400px;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    border: 5px solid var(--glass-border);
    animation: morph 8s ease-in-out infinite;
    background: rgba(255, 255, 255, 0.05);
    padding: 40px;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
}

@keyframes morph {
    0% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }

    50% {
        border-radius: 66% 34% 33% 67% / 58% 73% 27% 42%;
    }

    100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
}

.image-glow {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    filter: blur(50px);
    opacity: 0.3;
    z-index: 0;
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.5;
}

.mouse {
    width: 25px;
    height: 40px;
    border: 2px solid var(--text-main);
    border-radius: 15px;
    position: relative;
}

.mouse::after {
    content: '';
    width: 4px;
    height: 8px;
    background: var(--text-main);
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% {
        transform: translate(-50%, 0);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, 15px);
        opacity: 0;
    }
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.stats-row {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.stat-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    flex: 1;
    border: 1px solid var(--glass-border);
}

.stat-card h4 {
    font-size: 24px;
    color: var(--primary-color);
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
}

.ai-insight h3 {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.ai-insight ul {
    list-style: none;
    margin-top: 20px;
}

.ai-insight li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 14px;
    opacity: 0.8;
}

.ai-insight li i {
    color: var(--primary-color);
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.skill-category {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    transition: var(--transition);
}

.skill-category:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.category-header i {
    font-size: 24px;
    color: var(--primary-color);
}

.skill-list {
    list-style: none;
}

.skill-list li {
    margin-bottom: 20px;
}

.skill-list li span {
    display: block;
    font-size: 14px;
    margin-bottom: 8px;
}

.bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.featured-card {
    grid-column: span 1;
}

@media (min-width: 992px) {
    .featured-card {
        grid-column: span 2;
    }
}

.project-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.project-card:hover {
    transform: scale(1.02);
}

.project-img {
    height: 220px;
    width: 100%;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #1a1c23 0%, #2d313d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-icon {
    position: absolute;
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.05);
    z-index: 0;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    position: relative;
    z-index: 1;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition);
    z-index: 2;
}

.project-card:hover .overlay {
    opacity: 1;
}

.view-btn {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 700;
}

.project-info {
    padding: 25px;
}

.project-info h3 {
    margin-bottom: 10px;
}

.project-info p {
    font-size: 14px;
    color: var(--text-dim);
    margin-bottom: 15px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tags span {
    font-size: 10px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid var(--glass-border);
}

.featured {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 210, 255, 0.1), rgba(255, 0, 127, 0.1));
    border: 1px dashed var(--primary-color);
}

.label {
    font-size: 10px;
    color: var(--primary-color);
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: block;
}

.more-projects {
    text-align: center;
    margin-top: 50px;
}

.link-group {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.link-group a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

.link-group a:hover {
    border-bottom: 1px solid var(--primary-color);
}

/* Contact Section */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    padding: 60px;
}

.contact-links {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
    color: var(--text-main);
    font-size: 18px;
    transition: var(--transition);
}

.contact-item i {
    width: 50px;
    height: 50px;
    background: var(--card-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    color: var(--primary-color);
    border: 1px solid var(--glass-border);
}

.contact-item:hover {
    color: var(--primary-color);
}

.contact-form-placeholder img {
    width: 100%;
    border-radius: 20px;
    opacity: 0.8;
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid var(--glass-border);
}

.highlight {
    color: var(--primary-color);
    font-weight: 700;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 992px) {
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
    }

    .about-grid,
    .skills-grid,
    .projects-grid,
    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .hero-text h1 {
        font-size: 48px;
    }

    .hero-image-wrapper {
        width: 300px;
        height: 300px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: block;
    }
}

/* Phone Frame Styles */
.phone-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
    transition: var(--transition);
}

.phone-wrapper:hover {
    transform: translateY(-10px);
}

.phone-frame {
    width: 260px;
    height: 540px;
    background: #000;
    border: 10px solid var(--phone-border);
    border-radius: 40px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), inset 0 0 10px rgba(255, 255, 255, 0.1);
}

.phone-frame::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 25px;
    background: var(--phone-border);
    border-radius: 0 0 15px 15px;
    z-index: 5;
}

.phone-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
    margin-top: 10px;
    padding: 5px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

/* Adjust projects grid for phones */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 40px;
    justify-items: center;
}

/* Project Categories */
.project-category {
    margin-bottom: 80px;
    width: 100%;
}

.category-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    padding-right: 25px;
    border-right: 4px solid var(--primary-color);
}

.category-grid {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    padding: 20px 10px 40px 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) rgba(255, 255, 255, 0.05);
    scroll-snap-type: x mandatory;
}

.category-grid::-webkit-scrollbar {
    height: 8px;
}

.category-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.category-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
}

.category-grid .phone-wrapper {
    flex: 0 0 auto;
    scroll-snap-align: start;
}