/* ===== VARIABLES ===== */

:root {
    --primary: #0061ff;
    --primary-light: #3a86ff;
    --primary-dark: #0044cc;
    --secondary: #00d4ff;
    --accent: #8338ec;
    --success: #00c853;
    --warning: #ffab00;
    --error: #ff1744;
    --text-dark: #1a1a2e;
    --text-light: #f5f5f5;
    --bg-light: #ffffff;
    --bg-dark: #0f172a;
    --card-light: #f8fafc;
    --card-dark: #1e293b;
    --border-light: #e2e8f0;
    --border-dark: #334155;
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --gradient-dark: linear-gradient(135deg, var(--primary-dark) 0%, #0f172a 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
    --shadow-dark: 0 10px 30px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 12px;
    --border-radius-lg: 20px;
}


/* ===== THEMES ===== */

.light-mode {
    --bg-color: var(--bg-light);
    --text-color: var(--text-dark);
    --card-bg: var(--card-light);
    --border-color: var(--border-light);
    --shadow-color: var(--shadow-lg);
}

.dark-mode {
    --bg-color: var(--bg-dark);
    --text-color: var(--text-light);
    --card-bg: var(--card-dark);
    --border-color: var(--border-dark);
    --shadow-color: var(--shadow-dark);
}


/* ===== BASE STYLES ===== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Tajawal', 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: var(--transition-slow);
    overflow-x: hidden;
}

body[dir="rtl"] {
    font-family: 'Tajawal', sans-serif;
}

body[dir="ltr"] {
    font-family: 'Poppins', sans-serif;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}


/* ===== PRELOADER ===== */

.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    text-align: center;
}

.loader-circle {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.loader-text {
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: 500;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}


/* ===== FLOATING ELEMENTS ===== */

.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.float-circle {
    position: absolute;
    border-radius: 50%;
    background: var(--gradient-primary);
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.circle-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.circle-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.circle-3 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 15%;
    animation-delay: 4s;
}

.float-square {
    position: absolute;
    background: var(--gradient-accent);
    opacity: 0.05;
    animation: float 8s ease-in-out infinite;
}

.square-1 {
    width: 120px;
    height: 120px;
    top: 20%;
    right: 5%;
    animation-delay: 1s;
}

.square-2 {
    width: 80px;
    height: 80px;
    bottom: 10%;
    right: 20%;
    animation-delay: 3s;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}


/* ===== NAVBAR ===== */

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

.dark-mode .navbar {
    background: rgba(15, 23, 42, 0.95);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    width: 45px;
    height: 45px;
    background: var(--gradient-primary);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.3rem;
    transition: var(--transition);
}

.logo-text {
    color: var(--primary);
    font-weight: 800;
    font-size: 1.6rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    padding: 0.5rem 0;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.toggle-container {
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border-radius: 50px;
    padding: 6px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.toggle-btn {
    background: transparent;
    border: none;
    padding: 8px 16px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-color);
}

.toggle-btn.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    margin: 3px 0;
    transition: var(--transition);
    border-radius: 3px;
}


/* ===== HERO SECTION ===== */

.hero {
    padding: 160px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0.03;
    z-index: -1;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    animation: fadeInUp 1s ease;
}

.profile-image-container {
    display: flex;
    justify-content: center;
    margin: 2rem 0 1.5rem 0;
    position: relative;
    z-index: 10;
}

.profile-image-container .profile-image {
    width: 300px !important;
    height: 300px !important;
    border-radius: 50%;
    overflow: hidden;
    transition: var(--transition);
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

.profile-image-container .profile-image:hover {
    transform: scale(1.05);
}

.profile-image-container .profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: var(--transition);
}

.hero-badge {
    display: inline-block;
    background: var(--gradient-primary);
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
    font-weight: 800;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.hero-subtitle {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    opacity: 0.9;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
    opacity: 0.8;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 1rem 2.2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition-slow);
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.btn-secondary {
    background: transparent;
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--card-bg);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.hero-stats {
    display: flex;
    gap: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
}

.stat-text {
    font-size: 1rem;
    opacity: 0.8;
    font-weight: 500;
}


/* ===== HERO IMAGE ===== */

.hero-image {
    position: relative;
    animation: fadeInRight 1s ease;
}

.image-container {
    position: relative;
    width: 100%;
    height: 500px;
}

.main-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 350px;
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.code-window {
    width: 100%;
    height: 100%;
    background: #1e1e1e;
    display: flex;
    flex-direction: column;
}

.window-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #2d2d2d;
    border-bottom: 1px solid #404040;
}

.window-dots {
    display: flex;
    gap: 6px;
}

.window-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.window-dots span:nth-child(1) {
    background: #ff5f57;
}

.window-dots span:nth-child(2) {
    background: #ffbd2e;
}

.window-dots span:nth-child(3) {
    background: #28ca42;
}

.window-title {
    color: #ccc;
    font-size: 0.9rem;
    font-weight: 500;
}

.code-content {
    flex: 1;
    padding: 1rem;
    overflow: auto;
}

.dart-code {
    color: #d4d4d4;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    line-height: 1.5;
}

.floating-card {
    position: absolute;
    background: var(--card-bg);
    padding: 12px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    border: 1px solid var(--border-color);
    animation: float 3s ease-in-out infinite;
}

.card-1 {
    top: 10%;
    right: 10%;
    animation-delay: 0s;
}

.card-2 {
    bottom: 20%;
    left: 5%;
    animation-delay: 1s;
}

.card-3 {
    bottom: 10%;
    right: 20%;
    animation-delay: 2s;
}


/* ===== SECTIONS COMMON STYLES ===== */

section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.section-subtitle {
    font-size: 1.3rem;
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto;
}


/* ===== ABOUT SECTION ===== */

.about {
    background: var(--card-bg);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    position: relative;
    animation: fadeInLeft 1s ease;
}

.image-frame {
    position: relative;
    width: 100%;
    height: 500px;
    background: var(--gradient-primary);
    border-radius: var(--border-radius-lg);
    padding: 20px;
}

.profile-image {
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    border-radius: calc(var(--border-radius-lg) - 10px);
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><rect width="200" height="200" fill="%23f8fafc"/><circle cx="100" cy="80" r="40" fill="%23e2e8f0"/><path d="M100 140 L60 200 L140 200 Z" fill="%23e2e8f0"/></svg>');
    background-size: cover;
    background-position: center;
}

.image-overlay {
    position: absolute;
    bottom: -20px;
    right: -20px;
}

.experience-badge {
    background: var(--gradient-accent);
    color: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-xl);
}

.exp-years {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}

.exp-text {
    font-size: 1rem;
    font-weight: 600;
}

.about-text {
    animation: fadeInRight 1s ease;
}

.about-bio h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.about-bio p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    line-height: 1.7;
}

.about-features {
    margin-top: 2.5rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.feature-content h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.feature-content p {
    opacity: 0.8;
    line-height: 1.6;
}


/* ===== SKILLS SECTION ===== */

.skills-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.skills-category {
    animation: fadeInUp 1s ease;
}

.category-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    font-weight: 700;
    color: var(--text-color);
}

.skills-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-item {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.skill-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.skill-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 1rem;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.skill-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.skill-percent {
    font-weight: 700;
    color: var(--primary);
}

.skill-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 10px;
    width: 0;
    transition: width 1.5s ease-in-out;
}


/* ===== PROJECTS SECTION ===== */

.projects {
    background: var(--card-bg);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background: var(--bg-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    animation: fadeInUp 1s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.project-image {
    position: relative;
    height: 250px;
    background: var(--gradient-primary);
    overflow: hidden;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.project-link:hover {
    transform: scale(1.1);
}

.project-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--gradient-accent);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
}

.project-info {
    padding: 2rem;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.project-description {
    opacity: 0.8;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.tech-tag {
    background: var(--card-bg);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
}


/* ===== CONTACT SECTION ===== */

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    animation: fadeInLeft 1s ease;
}

.contact-info h3 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.contact-info>p {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.contact-item:hover {
    transform: translateX(10px);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.contact-content h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.contact-content span {
    opacity: 0.8;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 50px;
    height: 50px;
    background: var(--card-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.3rem;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.social-link:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-3px);
}

.contact-form {
    animation: fadeInRight 1s ease;
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1.2rem 1rem;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-color);
    font-size: 1rem;
    transition: var(--transition);
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group label {
    position: absolute;
    top: 1.2rem;
    right: 1rem;
    color: var(--text-color);
    opacity: 0.7;
    transition: var(--transition);
    pointer-events: none;
    background: var(--card-bg);
    padding: 0 0.5rem;
}

.form-group input:focus+label,
.form-group textarea:focus+label,
.form-group input:not(:placeholder-shown)+label,
.form-group textarea:not(:placeholder-shown)+label {
    top: -0.5rem;
    font-size: 0.9rem;
    opacity: 1;
    color: var(--primary);
}

.focus-border {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
    transform: translateX(-50%);
}

.form-group input:focus~.focus-border,
.form-group textarea:focus~.focus-border {
    width: 100%;
}

.submit-btn {
    width: 100%;
    justify-content: center;
    margin-top: 1rem;
}


/* ===== FOOTER ===== */

.footer {
    background: var(--card-bg);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    text-align: center;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.footer-text {
    font-size: 1.1rem;
    opacity: 0.8;
    max-width: 500px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    opacity: 0.7;
}


/* ===== SCROLL TO TOP ===== */

.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}


/* ===== ANIMATIONS ===== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}


/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 1200px) {
    .hero-title {
        font-size: 3rem;
    }
    .section-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 992px) {
    .hero-container,
    .about-content,
    .skills-container,
    .contact-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .hero-image {
        order: -1;
    }
    .about-image {
        order: -1;
    }
    .nav-menu {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 80%;
        height: calc(100vh - 80px);
        background: var(--bg-color);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 2rem;
        transition: var(--transition);
        box-shadow: var(--shadow-xl);
    }
    .nav-menu.active {
        right: 0;
    }
    .hamburger {
        display: flex;
    }
    .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(7px, -6px);
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-subtitle {
        font-size: 1.5rem;
    }
    .section-title {
        font-size: 2rem;
    }
    .projects-grid {
        grid-template-columns: 1fr;
    }
    .hero-buttons {
        flex-direction: column;
        align-items: flex-start;
    }
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    .nav-container {
        padding: 1rem;
    }
    .profile-image-container .profile-image {
        width: 250px !important;
        height: 250px !important;
    }
    .profile-image-container {
        margin: 1.5rem 0 1rem 0;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    .hero-subtitle {
        font-size: 1.3rem;
    }
    .section-title {
        font-size: 1.8rem;
    }
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    .feature-item {
        flex-direction: column;
        text-align: center;
    }
    .contact-item {
        flex-direction: column;
        text-align: center;
    }
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
    .profile-image-container .profile-image {
        width: 200px !important;
        height: 200px !important;
    }
    .profile-image-container {
        margin: 1rem 0 0.5rem 0;
    }
}