
/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background-color: #ffffff;
    overflow-x: hidden;
}

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

/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 40px;
    width: auto;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #2563eb;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #2563eb;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: #1a1a1a;
    transition: all 0.3s ease;
}

/* Hero Section - Adham Dannaway Inspired */
.hero {
    min-height: 100vh;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px 20px;
    position: relative;
    overflow: hidden;
}

.hero-container {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
}

.hero-image-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.hero-image {
    position: relative;
    width: 400px;
    height: 400px;
    cursor: pointer;
    transition: all 0.8s ease;
}

.portrait {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: all 0.7s ease;
    border-radius: 8px;
}

/* Artistic Creative Overlay - Left Side */
.artistic-overlay {
    position: absolute;
    left: 0;
    top: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(circle at 30% 20%, rgba(255, 107, 107, 0.8) 0%, transparent 50%),
                radial-gradient(circle at 80% 30%, rgba(78, 205, 196, 0.7) 0%, transparent 50%),
                radial-gradient(circle at 40% 70%, rgba(255, 206, 84, 0.8) 0%, transparent 50%),
                radial-gradient(circle at 20% 80%, rgba(162, 155, 254, 0.7) 0%, transparent 50%),
                radial-gradient(circle at 70% 60%, rgba(255, 154, 162, 0.6) 0%, transparent 50%);
    mix-blend-mode: multiply;
    clip-path: polygon(0 0, 100% 0, 80% 100%, 0 100%);
    transition: all 1s ease;
    border-radius: 8px 0 0 8px;
}

.hero-image:hover .artistic-overlay {
    width: 60%;
}

/* Code Overlay - Right Side */
.code-overlay {
    position: absolute;
    right: 0;
    top: 0;
    width: 50%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    color: #e2e8f0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    border-radius: 0 8px 8px 0;
    clip-path: polygon(20% 0, 100% 0, 100% 100%, 0 100%);
}

.hero-image:hover .code-overlay {
    opacity: 1;
    transform: translateX(0);
}

.code-content {
    line-height: 1.5;
}

.code-line {
    margin-bottom: 0.3rem;
    opacity: 0;
    animation: codeLineAppear 0.5s ease forwards;
}

.hero-image:hover .code-line:nth-child(1) { animation-delay: 0.1s; }
.hero-image:hover .code-line:nth-child(2) { animation-delay: 0.2s; }
.hero-image:hover .code-line:nth-child(3) { animation-delay: 0.3s; }
.hero-image:hover .code-line:nth-child(4) { animation-delay: 0.4s; }
.hero-image:hover .code-line:nth-child(5) { animation-delay: 0.5s; }
.hero-image:hover .code-line:nth-child(6) { animation-delay: 0.6s; }
.hero-image:hover .code-line:nth-child(7) { animation-delay: 0.7s; }
.hero-image:hover .code-line:nth-child(8) { animation-delay: 0.8s; }
.hero-image:hover .code-line:nth-child(9) { animation-delay: 0.9s; }
.hero-image:hover .code-line:nth-child(10) { animation-delay: 1.0s; }
.hero-image:hover .code-line:nth-child(11) { animation-delay: 1.1s; }

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

.code-comment { color: #64748b; }
.code-keyword { color: #c084fc; }
.code-class { color: #38bdf8; }
.code-property { color: #fb7185; }
.code-number { color: #fbbf24; }
.code-string { color: #34d399; }

/* Hero Name Display */
.hero-name {
    text-align: center;
    opacity: 0;
    animation: heroNameAppear 1.2s ease 0.5s forwards;
}

@keyframes heroNameAppear {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.name-text {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
}

.tagline {
    font-size: 1.25rem;
    color: #64748b;
    font-weight: 300;
    letter-spacing: 0.05em;
}

/* Section Common Styles */
section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* About Section */
.about {
    background: #f8fafc;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
    align-items: start;
}

.text-block {
    margin-bottom: 2rem;
}

.text-block h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.text-block p {
    color: #4b5563;
    line-height: 1.7;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.25rem;
}

/* Expertise Grid */
.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.expertise-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.expertise-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.expertise-card:hover::before {
    transform: scaleX(1);
}

.expertise-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.15);
}

.expertise-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
}

.expertise-icon.ai {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.expertise-icon.dev {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.expertise-icon.sys {
    background: linear-gradient(135deg, #10b981, #059669);
}

.expertise-card h4 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.expertise-card p {
    color: #64748b;
    line-height: 1.6;
}

/* Services Section */
.services {
    background: white;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.service-card {
    background: #f8fafc;
    padding: 3rem;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(29, 78, 216, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    border-color: #2563eb;
}

.service-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.service-card p {
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.service-features {
    list-style: none;
    position: relative;
    z-index: 1;
}

.service-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: #374151;
    font-size: 0.95rem;
}

.service-features i {
    color: #10b981;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Portfolio Section */
.portfolio {
    background: #f8fafc;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.15);
}

.portfolio-image {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.portfolio-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
}

.portfolio-placeholder.ai-bg {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.portfolio-placeholder.cloud-bg {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.portfolio-placeholder.app-bg {
    background: linear-gradient(135deg, #10b981, #059669);
}

.portfolio-placeholder.security-bg {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.portfolio-content {
    padding: 2rem;
}

.portfolio-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.portfolio-content p {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.portfolio-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.portfolio-tech span {
    background: #f1f5f9;
    color: #475569;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Contact Section */
.contact {
    background: white;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.contact-details h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.25rem;
}

.contact-details a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-details a:hover {
    color: #1d4ed8;
}

.contact-details p {
    color: #64748b;
}

.contact-cta {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    margin-top: 2rem;
}

.contact-cta h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.contact-cta p {
    color: #64748b;
    line-height: 1.6;
}

/* Contact Form */
.contact-form-wrapper {
    background: #f8fafc;
    padding: 3rem;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    padding: 0.875rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
}

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

.submit-btn {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -3px rgba(37, 99, 235, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Footer */
.footer {
    background: #1a1a1a;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.footer-logo img {
    height: 32px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer-logo span {
    font-size: 1.25rem;
    font-weight: 600;
}

.footer-section p {
    color: #a1a1aa;
    line-height: 1.6;
}

.footer-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #a1a1aa;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    color: #a1a1aa;
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-image {
        width: 350px;
        height: 350px;
    }
    
    .name-text {
        font-size: 2.5rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero-image {
        width: 300px;
        height: 300px;
    }
    
    .name-text {
        font-size: 2rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    .expertise-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .code-overlay {
        font-size: 0.7rem;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 100px 15px 20px;
    }
    
    .hero-image {
        width: 250px;
        height: 250px;
    }
    
    .name-text {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .service-card,
    .contact-form-wrapper {
        padding: 2rem;
    }
    
    .expertise-card {
        padding: 2rem;
    }
}

/* Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mt-4 {
    margin-top: 2rem;
}

.hidden {
    display: none;
}

.visible {
    display: block;
}
