/* styles.css - Generated by AI per Mohamed Karam prompt - 2023 */
:root {
    --bg-dark: #0f1720;
    --panel-dark: #0b0f13;
    --turquoise: #1fb6b4;
    --muted: #9aa6ad;
    --white: #ffffff;
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    --section-spacing: 5rem;
}

/* Light theme variables */
[data-theme="light"] {
    --bg-dark: #f5f7fa;
    --panel-dark: #ffffff;
    --muted: #6b7280;
    --white: #1f2937;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-dark);
    color: var(--muted);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Typography */
h1, h2, h3, h4 {
    color: var(--white);
    margin-bottom: 1rem;
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--turquoise);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--white);
}

/* Section styling */
.section {
    padding: var(--section-spacing) 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--turquoise);
}

/* Header & Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(11, 15, 19, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
}

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

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--white);
}

.nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
    margin-right: 1.5rem;
}

.nav-link {
    color: var(--muted);
    margin: 0 1rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--turquoise);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--turquoise);
    transition: var(--transition);
}

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

.theme-toggle {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 1.2rem;
    cursor: pointer;
    margin-right: 1rem;
    transition: var(--transition);
    padding: 0.5rem;
    border-radius: 50%;
}

.theme-toggle:hover {
    color: var(--turquoise);
    background-color: rgba(31, 182, 180, 0.1);
}

.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--muted);
    margin: 2px 0;
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 4rem;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.3);
    animation: zoomIn 15s ease-in-out infinite alternate;
}

@keyframes zoomIn {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.1);
    }
}

.hero-content {
    max-width: 800px;
    animation: fadeIn 1s ease-out;
}

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

.profile-image {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 2rem;
    border: 4px solid var(--turquoise);
    animation: fadeIn 1s ease-out 0.5s both;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.profile-image:hover img {
    transform: scale(1.1);
}

.typewriter {
    overflow: hidden;
    border-right: 0.15em solid var(--turquoise);
    white-space: nowrap;
    margin: 0 auto;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

.typewriter-delay {
    overflow: hidden;
    border-right: 0.15em solid var(--turquoise);
    white-space: nowrap;
    margin: 0 auto;
    animation: typing 3.5s steps(40, end) 1s both, blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--turquoise); }
}

.hero-intro {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(31, 182, 180, 0.1);
    color: var(--turquoise);
    transition: var(--transition);
    animation: fadeInUp 0.6s ease-out 1.5s both;
}

.social-icons a:nth-child(2) {
    animation-delay: 1.6s;
}

.social-icons a:nth-child(3) {
    animation-delay: 1.7s;
}

.social-icons a:nth-child(4) {
    animation-delay: 1.8s;
}

.social-icons a:nth-child(5) {
    animation-delay: 1.9s;
}

.social-icons a:hover {
    background-color: var(--turquoise);
    color: var(--white);
    transform: translateY(-3px);
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease-out 2s both;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background-color: var(--turquoise);
    color: var(--white);
    border: 2px solid var(--turquoise);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--turquoise);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(31, 182, 180, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--turquoise);
    border: 2px solid var(--turquoise);
}

.btn-secondary:hover {
    background-color: var(--turquoise);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(31, 182, 180, 0.3);
}

/* About Section */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

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

.skills-column h3 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.skill-item {
    margin-bottom: 1.5rem;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.skill-bar {
    height: 8px;
    background-color: rgba(154, 166, 173, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background-color: var(--turquoise);
    border-radius: 10px;
    width: 0;
    transition: width 1s ease-in-out;
}

/* Projects Section */
.projects-category {
    margin-bottom: 4rem;
}

.projects-category h3 {
    margin-bottom: 2rem;
    text-align: center;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.project-card {
    background-color: var(--panel-dark);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

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

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(31, 182, 180, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-link, .project-view {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--white);
    color: var(--turquoise);
    font-size: 1.2rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.project-link:hover, .project-view:hover {
    background-color: var(--panel-dark);
    transform: scale(1.1);
}

.project-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-content h4 {
    margin-bottom: 0.5rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.project-tech span {
    padding: 0.3rem 0.8rem;
    background-color: rgba(31, 182, 180, 0.1);
    color: var(--turquoise);
    border-radius: 20px;
    font-size: 0.8rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.project-tags span {
    padding: 0.2rem 0.6rem;
    background-color: rgba(154, 166, 173, 0.1);
    color: var(--muted);
    border-radius: 4px;
    font-size: 0.7rem;
}

.project-demo-btn {
    margin-top: auto;
    justify-content: center;
    width: 100%;
}

/* Certificates Section */
.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.certificate-item {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    cursor: pointer;
    transition: var(--transition);
}

.certificate-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.certificate-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.certificate-item:hover img {
    transform: scale(1.05);
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.contact-info h3 {
    margin-bottom: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.contact-item:hover {
    transform: translateX(5px);
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--turquoise);
    margin-right: 1rem;
    width: 30px;
}

.contact-item span {
    display: block;
    color: var(--white);
    font-weight: 600;
}

.contact-item a, .contact-item p {
    color: var(--muted);
}

.response-time {
    margin-top: 2rem;
    font-style: italic;
    color: var(--turquoise);
}

.contact-form {
    background-color: var(--panel-dark);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--white);
    font-weight: 500;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid rgba(154, 166, 173, 0.2);
    border-radius: var(--border-radius);
    background-color: rgba(154, 166, 173, 0.05);
    color: var(--muted);
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--turquoise);
    box-shadow: 0 0 0 2px rgba(31, 182, 180, 0.2);
}

/* Footer */
.footer {
    background-color: var(--panel-dark);
    padding: 2rem 0;
    text-align: center;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
}

.lightbox-close:hover {
    color: var(--turquoise);
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

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

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

/* Responsive Design */
@media (max-width: 968px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-list {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--panel-dark);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: var(--transition);
        z-index: 999;
    }
    
    .nav-list.active {
        left: 0;
    }
    
    .nav-link {
        margin: 1.5rem 0;
        font-size: 1.2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 250px;
        margin-bottom: 1rem;
    }
    
    .certificates-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .profile-image {
        width: 150px;
        height: 150px;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .typewriter, .typewriter-delay {
        animation: none;
        border-right: none;
        white-space: normal;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .hero-background img {
        animation: none;
    }
    
    .typewriter, .typewriter-delay {
        animation: none;
        border-right: none;
    }
}

/* Focus styles for accessibility */
button:focus,
a:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--turquoise);
    outline-offset: 2px;
}