/* Advanced Styles for AbdulElah Othman Gwaith */
:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --accent: #10b981;
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --header-bg: rgba(255, 255, 255, 0.8);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark-theme {
    --bg: #0f172a;
    --card: #1e293b;
    --text: #f1f5f9;
    --text-light: #94a3b8;
    --header-bg: rgba(15, 23, 42, 0.8);
}

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

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

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.7;
    transition: var(--transition);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px;
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    z-index: 1000;
    padding: 15px 0;
    box-shadow: 0 4px 30px rgba(0,0,0,0.03);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--primary);
    font-weight: 800;
    font-size: 1.3rem;
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
}

nav ul {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 25px;
}

nav a {
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

nav a:hover {
    color: var(--primary);
}

.theme-btn {
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
    transition: var(--transition);
}

.theme-btn:hover {
    color: var(--primary);
    transform: rotate(20deg);
}

/* Hero Section */
.hero {
    padding: 180px 0 100px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    text-align: center;
    position: relative;
}

.profile-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 30px;
}

.profile-img {
    width: 180px;
    height: 180px;
    border-radius: 50px;
    border: 8px solid rgba(255,255,255,0.15);
    object-fit: cover;
    background: white;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    transition: var(--transition);
}

.profile-wrapper:hover .profile-img {
    transform: scale(1.05) rotateZ(5deg);
}

.status-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: var(--accent);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 20px;
    opacity: 0.9;
    font-weight: 600;
}

.hero-description {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 40px;
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 35px;
    border-radius: 15px;
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: white;
    color: var(--primary);
}

.btn-outline {
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
}

.btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Wave */
.wave-container {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    line-height: 0;
}

.wave-container svg {
    fill: var(--bg);
    transition: var(--transition);
}

/* Sections */
section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 60px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 5px;
    background: var(--primary);
    border-radius: 10px;
}

/* About Grid */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.card {
    background: var(--card);
    border-radius: 25px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.03);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.08);
}

.about-card {
    padding: 40px;
    text-align: center;
}

.about-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text);
}

.about-card p {
    color: var(--text-light);
    line-height: 1.8;
}

.icon-box {
    width: 70px;
    height: 70px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 25px;
    transition: var(--transition);
}

.about-card:hover .icon-box {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

/* Projects */
.alt-bg {
    background: rgba(37, 99, 235, 0.03);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.project-card {
    text-align: right;
    padding: 0;
    overflow: hidden;
}

.project-img-placeholder {
    height: 150px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    opacity: 0.9;
    transition: var(--transition);
}

.project-card:hover .project-img-placeholder {
    opacity: 1;
    transform: scale(1.05);
}

.project-card h3 { 
    padding: 20px 20px 10px; 
    color: var(--text);
    font-size: 1.3rem;
}

.project-card p { 
    padding: 0 20px 20px; 
    font-size: 0.9rem; 
    color: var(--text-light);
}

.tags {
    padding: 0 20px 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tags span {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    transition: var(--transition);
}

.tags span:hover {
    background: var(--primary);
    color: white;
}

.project-links {
    padding: 0 20px 20px;
    display: flex;
    gap: 10px;
}

.btn-sm {
    padding: 6px 15px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
}

.btn-sm:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.skill-item {
    background: var(--card);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
    text-align: center;
    transition: var(--transition);
}

.skill-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

.skill-item i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
    transition: var(--transition);
}

.skill-item:hover i {
    transform: scale(1.2) rotateZ(10deg);
}

.skill-item span {
    display: block;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text);
}

.progress-bar {
    height: 8px;
    background: rgba(0,0,0,0.05);
    border-radius: 10px;
    margin-top: 15px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 10px;
    animation: fillProgress 1s ease-out forwards;
}

@keyframes fillProgress {
    from { width: 0; }
}

/* Links Section */
.link-card {
    padding: 0;
    overflow: hidden;
}

.card-header {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: white;
    transition: var(--transition);
}

.link-card:hover .card-header {
    transform: scale(1.1);
}

.github { background: #24292e; }
.linkedin-card { background: #0077b5; }
.google-card { background: #4285f4; }
.huggingface-card { background: #ffd21e; color: #000 !important; }
.orcid-card { background: #a6ce39; }
.email-card { background: #ea4335; }

.link-card h3 { 
    margin: 25px 0 10px; 
    text-align: center; 
    color: var(--text);
    font-size: 1.3rem;
}

.link-card p { 
    padding: 0 25px; 
    margin-bottom: 25px; 
    text-align: center; 
    color: var(--text-light);
}

.link-card .btn { 
    margin: 0 auto 30px; 
    width: 80%; 
    justify-content: center; 
}

.btn-dark { background: #24292e; color: white; }
.btn-linkedin { background: #0077b5; color: white; }
.btn-google { background: #4285f4; color: white; }
.btn-huggingface { background: #ffd21e; color: #000; }
.btn-orcid { background: #a6ce39; color: white; }
.btn-email { background: #ea4335; color: white; }

.btn-dark:hover { background: #1a1f26; }
.btn-linkedin:hover { background: #005a8b; }
.btn-google:hover { background: #357ae8; }
.btn-huggingface:hover { background: #ffcd00; }
.btn-orcid:hover { background: #95bb2f; }
.btn-email:hover { background: #d33426; }

/* Contact */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
    background: var(--card);
    border-radius: 15px;
    transition: var(--transition);
}

.info-item:hover {
    transform: translateX(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.info-item i {
    width: 50px;
    height: 50px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    transition: var(--transition);
}

.info-item:hover i {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.info-item h4 {
    color: var(--text);
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.info-item p {
    color: var(--text-light);
    margin: 0;
}

.info-item a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

.info-item a:hover {
    text-decoration: underline;
}

.contact-form {
    background: var(--card);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.03);
}

.contact-form h3 {
    color: var(--text);
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.contact-form p {
    color: var(--text-light);
    margin-bottom: 30px;
}

.form-group { 
    margin-bottom: 20px; 
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid rgba(0,0,0,0.1);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 80px 0 40px;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: var(--primary);
}

.social-links {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    transition: var(--transition);
    opacity: 0.7;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.social-links a:hover {
    opacity: 1;
    color: var(--primary);
    background: rgba(37, 99, 235, 0.2);
    transform: translateY(-5px);
}

.copyright {
    font-weight: 600;
    margin-bottom: 10px;
}

.footer-text {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title { 
        font-size: 2.5rem; 
    }

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

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

    .about-grid { 
        grid-template-columns: 1fr; 
    }

    .header-content { 
        flex-direction: column; 
        gap: 15px; 
    }

    nav ul { 
        gap: 15px; 
        flex-wrap: wrap;
        justify-content: center;
    }

    nav a {
        font-size: 0.85rem;
    }

    .contact-wrapper { 
        grid-template-columns: 1fr; 
    }

    .section-title {
        font-size: 2rem;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title { 
        font-size: 1.8rem; 
    }

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

    .hero-description {
        font-size: 0.9rem;
    }

    nav ul {
        gap: 10px;
    }

    nav a {
        font-size: 0.75rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 40px;
    }

    .section-title::after {
        width: 60px;
    }

    .contact-form {
        padding: 25px;
    }

    .info-item {
        padding: 15px;
    }
}
