/* Reset et variables CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light Mode Colors */
    --primary-color: #22d3ee;
    --primary-hover: #06b6d4;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --border-color: #e5e7eb;
    --card-bg: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

[data-theme="dark"] {
    /* Dark Mode Colors */
    --primary-color: #22d3ee;
    --primary-hover: #06b6d4;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-tertiary: #374151;
    --border-color: #374151;
    --card-bg: #1f2937;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.6);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.nav-logo i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 16px;
}

.lang-toggle {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    width: 50px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.lang-toggle:hover {
    border-color: var(--primary-color);
    background: var(--bg-tertiary);
    transform: scale(1.05);
}

.lang-toggle .lang-text {
    position: relative;
    z-index: 1;
}

.lang-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    opacity: 0.2;
    transition: left 0.5s ease;
}

.lang-toggle:hover::before {
    left: 100%;
}

.theme-toggle {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 1.125rem;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    border-color: var(--primary-color);
    background: var(--bg-tertiary);
    transform: scale(1.05) rotate(15deg);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: 0.3s;
    border-radius: 2px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 70px;
    background: var(--bg-primary);
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.hero-content {
    animation: fadeInUp 1s ease-out;
}

.hero-profile-small {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 24px;
    border: 3px solid var(--border-color);
}

.hero-profile-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-name {
    color: var(--primary-color);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--text-primary);
    min-height: 120px; /* Prevent layout shift during typing */
}

.hero-title.typing::after {
    content: '|';
    color: var(--primary-color);
    animation: blink 0.7s infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 28px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-secondary i {
    font-size: 0.875rem;
}

.hero-image {
    position: relative;
    animation: fadeInRight 1s ease-out;
}

.profile-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    background: linear-gradient(135deg, var(--primary-color) 0%, #06b6d4 100%);
    padding: 4px;
}

.profile-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
    background: var(--bg-primary);
}

.profile-decoration {
    position: absolute;
    border-radius: 50%;
    background: var(--primary-color);
    opacity: 0.3;
}

.decoration-1 {
    width: 100px;
    height: 100px;
    top: -30px;
    right: -30px;
    background: linear-gradient(135deg, var(--primary-color), transparent);
}

.decoration-2 {
    width: 80px;
    height: 80px;
    bottom: 30px;
    left: -20px;
    background: var(--primary-color);
}

/* Section Styling */
.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* About Section */
.about {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 80px;
    align-items: center;
}

.illustration-container {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.about-illustration {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 24px;
}

.illustration-decoration {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--primary-color);
    opacity: 0.3;
}

.about-text {
    padding-right: 40px;
}

.about-subtitle {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.about-description {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.highlight-text {
    color: var(--primary-color);
    font-weight: 600;
}

.about-cta {
    margin-top: 32px;
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: 16px;
    border-left: 4px solid var(--primary-color);
}

.cta-badge {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.cta-badge i {
    font-size: 2rem;
    color: var(--primary-color);
    background: var(--bg-primary);
    padding: 16px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.cta-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cta-content strong {
    font-size: 1.125rem;
    color: var(--text-primary);
    font-weight: 700;
}

.cta-content span {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.cta-text {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.9375rem;
    margin: 0;
}

/* Projects Section */
.projects {
    padding: 100px 0;
    background: var(--bg-primary);
}

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

.project-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

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

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.project-link {
    color: white;
    font-size: 1.5rem;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.project-link:hover {
    transform: scale(1.2);
}

.project-content {
    padding: 24px;
}

.project-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.project-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
    font-size: 0.9375rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 6px 12px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
}

/* Skills Section */
.skills {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.skills-category {
    margin-bottom: 64px;
}

.skills-category:last-child {
    margin-bottom: 0;
}

.skills-category-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 32px;
}

.skills-grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.skill-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    transition: all 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.skill-card-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--bg-secondary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

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

.skill-card h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Contact Section */
.contact {
    padding: 100px 0;
    background: var(--bg-primary);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 64px;
    margin-top: 48px;
}

.contact-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.7;
}

.contact-details {
    margin-bottom: 32px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    color: var(--text-secondary);
    position: relative;
}

.contact-item i {
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

.copy-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-left: auto;
}

.copy-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.copy-btn:active {
    transform: scale(0.95);
}

.copy-btn.copied {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.copy-btn.copied i::before {
    content: "\f00c"; /* Font Awesome check icon */
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    border-color: var(--primary-color);
}

.contact-form {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

/* Footer */
.footer {
    background: var(--bg-secondary);
    padding: 32px 0;
    border-top: 1px solid var(--border-color);
}

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

.footer-social {
    display: flex;
    gap: 16px;
}

.footer-social-link {
    color: var(--text-secondary);
    font-size: 1.25rem;
    transition: color 0.3s ease;
}

.footer-social-link:hover {
    color: var(--primary-color);
}

.footer-content p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

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

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

/* Responsive Design */
@media (max-width: 968px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 48px;
        text-align: center;
    }

    .hero-content {
        order: 2;
    }

    .hero-image {
        order: 1;
        max-width: 400px;
        margin: 0 auto;
    }

    .hero-profile-small {
        margin: 0 auto 24px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .about-text {
        padding-right: 0;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 48px;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-actions {
        margin-left: auto;
        margin-right: 16px;
        gap: 8px;
    }

    .lang-toggle {
        width: 40px;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--bg-primary);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-md);
        padding: 32px 0;
        gap: 16px;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu.active {
        left: 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

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

    .skills-grid-cards {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

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

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

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

    .btn {
        width: 100%;
        text-align: center;
    }

    .hero-buttons {
        width: 100%;
    }

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

    .contact-form {
        padding: 24px;
    }
}