/* Page Preloader */
.preloader {
    position: fixed;
    inset: 0;
    background: #0a0a0f;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
}

.preloader-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 24px;
    animation: logoPulseLoader 1.5s ease-in-out infinite;
}

@keyframes logoPulseLoader {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.preloader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(99, 102, 241, 0.2);
    border-top-color: #6366f1;
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.preloader-text {
    color: #a1a1aa;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* CSS Variables & Design System */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-tertiary: #1a1a24;
    --bg-card: rgba(26, 26, 36, 0.6);
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    --accent-glow: rgba(99, 102, 241, 0.4);
    --flutter-blue: #02569B;
    --flutter-light: #45D1FD;
    --laravel-red: #FF2D20;
    --laravel-light: #FF6B61;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(99, 102, 241, 0.3);
    --font-primary: 'Inter', -apple-system, sans-serif;
    --font-display: 'Outfit', -apple-system, sans-serif;
    --section-padding: 120px;
    --container-max: 1200px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --shadow-glow: 0 0 40px var(--accent-glow);
    --theme-transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Mode Theme */
[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-tertiary: #e2e8f0;
    --bg-card: rgba(255, 255, 255, 0.8);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-color: rgba(0, 0, 0, 0.08);
    --border-glow: rgba(99, 102, 241, 0.2);
    --accent-glow: rgba(99, 102, 241, 0.2);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
}

/* Theme Toggle Button */
.theme-toggle {
    position: relative;
    width: 56px;
    height: 28px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--theme-transition);
    display: flex;
    align-items: center;
    padding: 3px;
}

.theme-toggle:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px var(--accent-glow);
}

.theme-toggle-track {
    position: absolute;
    inset: 3px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
}

.theme-toggle-icon {
    width: 14px;
    height: 14px;
    transition: all var(--theme-transition);
}

.theme-toggle-icon.sun {
    color: #fbbf24;
    opacity: 0.4;
}

.theme-toggle-icon.moon {
    color: #a78bfa;
    opacity: 1;
}

[data-theme="light"] .theme-toggle-icon.sun {
    opacity: 1;
}

[data-theme="light"] .theme-toggle-icon.moon {
    opacity: 0.4;
}

.theme-toggle-thumb {
    position: absolute;
    width: 22px;
    height: 22px;
    background: var(--accent-gradient);
    border-radius: 50%;
    left: 3px;
    transition: all var(--theme-transition);
    box-shadow: 0 2px 10px var(--accent-glow);
}

[data-theme="light"] .theme-toggle-thumb {
    left: calc(100% - 25px);
}

/* Theme transition for all elements */
body,
.navbar,
.stat-card,
.skill-category,
.contact-form-wrapper,
.project-card,
.contact-item,
.social-link,
.btn,
.tech-badge,
.profile-image,
.floating-icon,
input,
textarea {
    transition: background var(--theme-transition),
        border-color var(--theme-transition),
        color var(--theme-transition),
        box-shadow var(--theme-transition);
}

/* Light mode specific adjustments */
[data-theme="light"] .bg-animation {
    opacity: 0.3;
}

[data-theme="light"] .navbar {
    background: rgba(248, 250, 252, 0.9);
}

[data-theme="light"] .profile-glow {
    opacity: 0.15;
}

[data-theme="light"] .name {
    background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

[data-theme="light"] .tech-badge.flutter {
    background: rgba(2, 86, 155, 0.1);
}

[data-theme="light"] .tech-badge.laravel {
    background: rgba(255, 45, 32, 0.1);
}

[data-theme="light"] .social-link svg {
    fill: var(--text-secondary);
}

[data-theme="light"] .floating-icon {
    background: rgba(255, 255, 255, 0.9);
}

/* ===== MICRO-ANIMATIONS ===== */

/* Logo pulse animation */
.logo-text {
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {

    0%,
    100% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.2);
    }
}

/* Navigation link underline animation */
.nav-link::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

/* Button shine effect */
.btn-primary::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: left 0.5s ease;
}

.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary:hover::before {
    left: 100%;
}

/* Card hover animations */
.stat-card,
.skill-category,
.project-card,
.contact-item {
    transform: translateY(0);
}

.stat-card:hover,
.project-card:hover {
    transform: translateY(-8px);
}

/* Greeting text animation */
.greeting {
    animation: fadeSlideIn 0.8s ease-out;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Name text gradient animation */
.name {
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
}

/* Typing Animation Cursor */
.typing-cursor {
    color: var(--accent-primary);
    animation: blink 1s step-end infinite;
    font-weight: 100;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Title typing cursor effect */
.title::after {
    content: '|';
    animation: blink 1s step-end infinite;
    color: var(--accent-primary);
    margin-left: 4px;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* Tech badge bounce on hover */
.tech-badge {
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.tech-badge:hover {
    transform: scale(1.08) translateY(-2px);
}

/* Social link ripple effect */
.social-link {
    position: relative;
    overflow: hidden;
}

.social-link::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
    opacity: 0;
    transform: scale(0);
    transition: all 0.4s ease;
}

.social-link:hover::after {
    opacity: 0.15;
    transform: scale(2);
}

/* Form input focus animation */
.form-group input:focus,
.form-group textarea:focus {
    transform: translateY(-2px);
}

/* Section title animation on scroll */
.section-title {
    animation: slideInFromLeft 0.8s ease-out;
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Profile image hover zoom */
.profile-photo {
    transition: transform 0.5s ease;
}

.profile-image:hover .profile-photo {
    transform: scale(1.05);
}

/* Floating icon enhanced animation */
.floating-icon {
    animation: floatIcon 6s ease-in-out infinite, iconGlow 3s ease-in-out infinite;
}

@keyframes iconGlow {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
    }

    50% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
    }
}

/* Scroll indicator bounce */
.scroll-indicator .mouse {
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(8px);
    }
}

/* Project card image zoom on hover */
.project-card:hover .project-image {
    transform: scale(1.05);
}

.project-image {
    transition: transform 0.4s ease;
}

/* Contact form submit button pulse */
.contact-form .btn-primary {
    animation: subtlePulse 2s ease-in-out infinite;
}

@keyframes subtlePulse {

    0%,
    100% {
        box-shadow: 0 4px 20px var(--accent-glow);
    }

    50% {
        box-shadow: 0 4px 30px var(--accent-glow);
    }
}

/* Staggered animation delays for skill items */
.skill-item:nth-child(1) {
    animation-delay: 0s;
}

.skill-item:nth-child(2) {
    animation-delay: 0.1s;
}

.skill-item:nth-child(3) {
    animation-delay: 0.2s;
}

.skill-item:nth-child(4) {
    animation-delay: 0.3s;
}

.skill-item:nth-child(5) {
    animation-delay: 0.4s;
}

.skill-item:nth-child(6) {
    animation-delay: 0.5s;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

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

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

/* Animated Background */
.bg-animation {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-primary), transparent 70%);
    top: -200px;
    right: -100px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--laravel-red), transparent 70%);
    bottom: -150px;
    left: -100px;
    animation-delay: -7s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--flutter-blue), transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-30px, 30px) scale(0.95);
    }
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

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

.logo-text {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 8px 0;
}

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

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

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

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

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition-fast);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 120px 24px 60px;
    position: relative;
}

.hero-content {
    max-width: var(--container-max);
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.hero-text {
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.greeting {
    font-size: 18px;
    color: var(--accent-primary);
    font-weight: 500;
    margin-bottom: 12px;
}

.name {
    font-family: var(--font-display);
    font-size: clamp(48px, 8vw, 80px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #fff 0%, #a1a1aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-wrapper {
    margin-bottom: 24px;
}

.title {
    font-family: var(--font-display);
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.tech-stack {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.tech-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition-normal);
}

.tech-badge.flutter {
    background: rgba(2, 86, 155, 0.2);
    border: 1px solid rgba(69, 209, 253, 0.3);
    color: var(--flutter-light);
}

.tech-badge.flutter:hover {
    background: rgba(2, 86, 155, 0.3);
    box-shadow: 0 0 20px rgba(69, 209, 253, 0.3);
}

.tech-badge.laravel {
    background: rgba(255, 45, 32, 0.2);
    border: 1px solid rgba(255, 107, 97, 0.3);
    color: var(--laravel-light);
}

.tech-badge.laravel:hover {
    background: rgba(255, 45, 32, 0.3);
    box-shadow: 0 0 20px rgba(255, 107, 97, 0.3);
}

.tech-icon {
    width: 18px;
    height: 18px;
}

.description {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 40px;
    max-width: 500px;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    transition: var(--transition-normal);
    cursor: pointer;
    border: none;
}

.btn-icon {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

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

.btn-large {
    padding: 18px 36px;
    font-size: 16px;
}

/* Hero Visual */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.profile-card {
    position: relative;
    width: 400px;
    height: 400px;
}

.profile-glow {
    position: absolute;
    inset: -20px;
    background: var(--accent-gradient);
    border-radius: 50%;
    opacity: 0.3;
    filter: blur(60px);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.05);
    }
}

.profile-image {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.profile-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-radius: 50%;
}

.profile-placeholder span {
    font-family: var(--font-display);
    font-size: 120px;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Floating Icons */
.floating-icons {
    position: absolute;
    inset: 0;
}

.floating-icon {
    position: absolute;
    width: 56px;
    height: 56px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: floatIcon 6s ease-in-out infinite;
}

.floating-icon svg {
    width: 28px;
    height: 28px;
}

.floating-icon.icon-1 {
    top: 10%;
    left: -20px;
    color: var(--flutter-light);
}

.floating-icon.icon-2 {
    top: 20%;
    right: -30px;
    color: var(--laravel-light);
    animation-delay: -1.5s;
}

.floating-icon.icon-3 {
    bottom: 25%;
    left: -40px;
    color: var(--text-primary);
    animation-delay: -3s;
}

.floating-icon.icon-4 {
    bottom: 10%;
    right: -20px;
    color: #0A66C2;
    animation-delay: -4.5s;
}

@keyframes floatIcon {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 12px;
    animation: fadeIn 1s ease-out 1s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--text-muted);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 4px;
    animation: scroll 2s ease-in-out infinite;
}

@keyframes scroll {

    0%,
    100% {
        transform: translateY(0);
        opacity: 1;
    }

    50% {
        transform: translateY(8px);
        opacity: 0.3;
    }
}

/* Section Styles */
section {
    padding: var(--section-padding) 0;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 700;
    margin-bottom: 60px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-color), transparent);
    max-width: 300px;
}

.title-accent {
    color: var(--accent-primary);
    font-family: var(--font-primary);
    font-weight: 500;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-text p {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 24px;
}

.about-text strong {
    color: var(--text-primary);
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    transition: var(--transition-normal);
}

.stat-card:hover {
    border-color: var(--accent-primary);
    transform: translateX(8px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--accent-primary);
}

.stat-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.stat-card p {
    font-size: 14px;
    color: var(--text-muted);
}

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

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

.skill-category {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 32px;
    transition: var(--transition-normal);
}

.skill-category:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
}

.category-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 28px;
}

.category-title svg {
    width: 24px;
    height: 24px;
    stroke: var(--accent-primary);
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.skill-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skill-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.skill-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    width: var(--progress);
    background: var(--accent-gradient);
    border-radius: 4px;
    animation: fillBar 1.5s ease-out forwards;
    transform-origin: left;
}

@keyframes fillBar {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

/* Profile Photo */
.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

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

.contact-intro {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    transition: var(--transition-normal);
}

.contact-item:hover {
    border-color: var(--accent-primary);
    transform: translateX(8px);
}

.contact-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--accent-primary);
}

.contact-text h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.contact-text p {
    font-size: 14px;
    color: var(--text-secondary);
}

.contact-text a {
    color: var(--accent-primary);
}

.contact-text a:hover {
    text-decoration: underline;
}

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

.social-link {
    width: 48px;
    height: 48px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
}

.social-link svg {
    width: 20px;
    height: 20px;
    fill: var(--text-secondary);
    transition: var(--transition-fast);
}

.social-link:hover {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-4px);
}

.social-link:hover svg {
    fill: var(--accent-primary);
}

/* Contact Form */
.contact-form-wrapper {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

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

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-family: var(--font-primary);
    font-size: 15px;
    color: var(--text-primary);
    transition: var(--transition-normal);
    resize: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

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

.contact-form .btn {
    width: 100%;
    justify-content: center;
    margin-top: 8px;
}

/* Projects Section */
.projects {
    background: var(--bg-secondary);
}

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

.project-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition-normal);
}

.project-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-8px);
    box-shadow: var(--shadow-glow);
}

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
}

.project-content {
    padding: 28px;
}

.project-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.project-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

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

.project-tag {
    padding: 6px 14px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--accent-primary);
}

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

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-normal);
}

.project-link:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.project-link svg {
    width: 16px;
    height: 16px;
}

/* Footer */
.footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.footer strong {
    color: var(--text-secondary);
}

.footer-year {
    font-size: 12px;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 60px;
        text-align: center;
    }

    .hero-text {
        order: 1;
    }

    .hero-visual {
        order: 0;
    }

    .description {
        margin-left: auto;
        margin-right: auto;
    }

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

    .profile-card {
        width: 300px;
        height: 300px;
    }

    .profile-placeholder span {
        font-size: 80px;
    }

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

    .about-stats {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .stat-card {
        flex: 1;
        min-width: 200px;
    }

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

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

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

@media (max-width: 768px) {
    :root {
        --section-padding: 80px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        width: 100%;
        background: rgba(10, 10, 15, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 32px;
        gap: 24px;
        border-bottom: 1px solid var(--border-color);
    }

    [data-theme="light"] .nav-links {
        background: rgba(248, 250, 252, 0.98);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .tech-stack {
        justify-content: center;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

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

    .floating-icons,
    .scroll-indicator {
        display: none;
    }

    .about-stats {
        flex-direction: column;
    }

    .stat-card {
        min-width: 100%;
    }

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

    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .name {
        font-size: 40px;
    }

    .title {
        font-size: 20px;
    }

    .profile-card {
        width: 240px;
        height: 240px;
    }

    .profile-placeholder span {
        font-size: 60px;
    }
}

/* Skill Tags Layout (New Professional Look) */
.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skill-tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: default;
    display: flex;
    align-items: center;
    gap: 8px;
}

.skill-tag:hover {
    background: var(--bg-card);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.skill-tag::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent-secondary);
    border-radius: 50%;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px var(--accent-glow);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 30px var(--accent-glow);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    stroke: white;
}

/* Form Success Modal */
.form-success {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.form-success.show {
    opacity: 1;
    visibility: visible;
}

.form-success-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.form-success.show .form-success-content {
    transform: scale(1);
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
    margin: 0 auto 20px;
    animation: successPulse 0.6s ease;
}

@keyframes successPulse {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.form-success-content h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.form-success-content p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

@media (max-width: 480px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }

    .form-success-content {
        margin: 20px;
        padding: 30px;
    }
}

/* Experience Timeline */
.experience {
    position: relative;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-primary) 0%, rgba(99, 102, 241, 0.1) 100%);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -36px;
    top: 0;
    width: 14px;
    height: 14px;
    background: var(--accent-gradient);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--accent-glow);
    z-index: 2;
}

.timeline-content {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateX(5px);
    background: var(--bg-card);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.timeline-date {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 20px;
    color: var(--accent-secondary);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}

.timeline-role {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-family: var(--font-display);
}

.timeline-company {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.timeline-company svg {
    width: 16px;
    height: 16px;
    color: var(--accent-primary);
}

.timeline-desc {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.timeline-tag {
    font-size: 12px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 6px;
}

/* Skip Link (Accessibility) */
.skip-link {
    position: fixed;
    top: -100px;
    left: 20px;
    background: var(--accent-primary);
    color: white;
    padding: 12px 24px;
    z-index: 10001;
    border-radius: 0 0 8px 8px;
    text-decoration: none;
    font-weight: 600;
    transition: top 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.skip-link:focus {
    top: 0;
    outline: 2px solid white;
}

/* Form Error Styling Override */
.form-error .success-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

/* ===== TESTIMONIALS SECTION ===== */
.testimonials {
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.testimonials::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-primary), transparent 70%);
    opacity: 0.1;
    filter: blur(100px);
    pointer-events: none;
}

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

.testimonial-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 32px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.testimonial-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15);
}

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

.testimonial-quote {
    position: relative;
    margin-bottom: 24px;
}

.quote-icon {
    width: 40px;
    height: 40px;
    fill: var(--accent-primary);
    opacity: 0.3;
    margin-bottom: 16px;
}

.testimonial-quote p {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-secondary);
    font-style: italic;
}

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

.author-avatar {
    width: 56px;
    height: 56px;
    min-width: 56px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.author-avatar span {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.author-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.author-info p {
    font-size: 14px;
    color: var(--text-muted);
}

.testimonial-rating {
    display: flex;
    gap: 4px;
}

.testimonial-rating .star {
    font-size: 18px;
    color: #fbbf24;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

/* Light mode adjustments for testimonials */
[data-theme="light"] .testimonial-card {
    background: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .testimonial-card:hover {
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.1);
}

[data-theme="light"] .testimonials::before {
    opacity: 0.05;
}

/* Testimonials responsive */
@media (max-width: 768px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonial-card {
        padding: 24px;
    }
}

/* Staggered animation for testimonial cards */
.testimonial-card:nth-child(1) {
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.testimonial-card:nth-child(2) {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.testimonial-card:nth-child(3) {
    animation: fadeInUp 0.6s ease-out 0.3s both;
}