/* ========================================
   MIRADO RAZAFINDRATANDRA - PORTFOLIO
   Theme: Universe/Galaxy - Light & Dark Mode
   With Sunrise/Sunset Animation
   ======================================== */

:root {
    /* Light Mode (Sunrise) - Default */
    --bg-primary: #f0f4ff;
    --bg-secondary: #e8efff;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a6a;
    --text-muted: #7a7a9a;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-tertiary: #ec4899;
    --accent-sun: #fbbf24;
    --accent-moon: #a78bfa;
    --gradient-sky: linear-gradient(180deg, #87ceeb 0%, #ffecd2 50%, #fcb69f 100%);
    --gradient-accent: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
    --gradient-card: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
    --shadow-sm: 0 2px 10px rgba(99, 102, 241, 0.1);
    --shadow-md: 0 10px 40px rgba(99, 102, 241, 0.15);
    --shadow-lg: 0 20px 60px rgba(99, 102, 241, 0.2);
    --border-color: rgba(99, 102, 241, 0.2);
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.8);
    
    /* Transition */
    --transition-theme: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode (Night/Galaxy) */
[data-theme="dark"] {
    --bg-primary: #0a0a1a;
    --bg-secondary: #12122a;
    --bg-card: rgba(20, 20, 50, 0.8);
    --bg-card-hover: rgba(30, 30, 70, 0.95);
    --text-primary: #f0f4ff;
    --text-secondary: #c4c8e8;
    --text-muted: #8a8eb8;
    --gradient-sky: linear-gradient(180deg, #0a0a1a 0%, #1a1a3a 50%, #2a2a5a 100%);
    --gradient-card: linear-gradient(135deg, rgba(30,30,60,0.9), rgba(20,20,50,0.7));
    --shadow-sm: 0 2px 10px rgba(139, 92, 246, 0.2);
    --shadow-md: 0 10px 40px rgba(139, 92, 246, 0.25);
    --shadow-lg: 0 20px 60px rgba(139, 92, 246, 0.3);
    --border-color: rgba(139, 92, 246, 0.3);
    --glass-bg: rgba(20, 20, 50, 0.6);
    --glass-border: rgba(139, 92, 246, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    transition: var(--transition-theme);
    min-height: 100vh;
}

/* ========== SKY BACKGROUND WITH SUN/MOON ========== */
.sky-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -10;
    overflow: hidden;
    transition: var(--transition-theme);
}

.sky-gradient {
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--gradient-sky);
    transition: var(--transition-theme);
}

/* Sun */
.celestial-body {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    transition: var(--transition-theme);
}

.sun {
    background: radial-gradient(circle, #fff7ed 0%, #fbbf24 40%, #f59e0b 100%);
    box-shadow: 
        0 0 60px rgba(251, 191, 36, 0.8),
        0 0 120px rgba(251, 191, 36, 0.5),
        0 0 200px rgba(251, 191, 36, 0.3);
    animation: celestialGlow 4s ease-in-out infinite;
}

[data-theme="dark"] .sun {
    opacity: 0;
    transform: translateY(100px);
}

/* Moon */
.moon {
    background: radial-gradient(circle at 30% 30%, #f5f5f5 0%, #e0e0e0 50%, #c0c0c0 100%);
    box-shadow: 
        0 0 60px rgba(167, 139, 250, 0.8),
        0 0 120px rgba(167, 139, 250, 0.5),
        0 0 200px rgba(167, 139, 250, 0.3),
        inset -20px -10px 40px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(100px);
}

[data-theme="dark"] .moon {
    opacity: 1;
    transform: translateY(0);
}

@keyframes celestialGlow {
    0%, 100% { 
        box-shadow: 
            0 0 60px rgba(251, 191, 36, 0.8),
            0 0 120px rgba(251, 191, 36, 0.5),
            0 0 200px rgba(251, 191, 36, 0.3);
    }
    50% { 
        box-shadow: 
            0 0 80px rgba(251, 191, 36, 0.9),
            0 0 150px rgba(251, 191, 36, 0.6),
            0 0 250px rgba(251, 191, 36, 0.4);
    }
}

/* Stars (visible in dark mode) */
.stars {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
}

[data-theme="dark"] .stars {
    opacity: 1;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Clouds (visible in light mode) */
.clouds {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 1;
    transition: opacity 1s ease;
}

[data-theme="dark"] .clouds {
    opacity: 0.1;
}

.cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 100px;
    filter: blur(2px);
    animation: floatCloud 30s linear infinite;
}

@keyframes floatCloud {
    from { transform: translateX(-200px); }
    to { transform: translateX(calc(100vw + 200px)); }
}

/* ========== CUSTOM CURSOR ========== */
.cursor-main {
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 99999;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    transform: translate(-50%, -50%);
}

.cursor-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-secondary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 100000;
    transform: translate(-50%, -50%);
}

.cursor-main.hover {
    transform: translate(-50%, -50%) scale(2);
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--accent-tertiary);
}

@media (max-width: 768px) {
    .cursor-main, .cursor-dot {
        display: none;
    }
}

/* ========== THEME TOGGLE ========== */
.theme-toggle {
    position: fixed;
    top: 100px;
    right: 30px;
    z-index: 1000;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: var(--transition-theme);
    overflow: hidden;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: var(--shadow-lg);
}

.theme-toggle .sun-icon,
.theme-toggle .moon-icon {
    position: absolute;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle .sun-icon {
    color: #fbbf24;
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.theme-toggle .moon-icon {
    color: #a78bfa;
    opacity: 0;
    transform: rotate(-90deg) scale(0);
}

[data-theme="dark"] .theme-toggle .sun-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

[data-theme="dark"] .theme-toggle .moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* ========== LOADER ========== */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

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

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

.loader-logo {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 2rem;
    animation: pulse 1.5s ease-in-out infinite;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ========== NAVIGATION ========== */
.nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: var(--transition-theme);
}

.nav.scrolled {
    padding: 1rem 5%;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: white;
    background: var(--gradient-accent);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
    padding: 10px;
}

.menu-toggle span {
    width: 28px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

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

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

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

/* ========== HERO SECTION ========== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 5%;
    position: relative;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-content {
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    animation: fadeInUp 0.8s ease forwards;
}

.status-dot {
    width: 10px;
    height: 10px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
    box-shadow: 0 0 10px #10b981;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

.hero-title .greeting {
    display: block;
    font-size: 0.4em;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.hero-title .name {
    display: block;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title .role {
    display: block;
    font-size: 0.35em;
    color: var(--accent-primary);
    margin-top: 0.5rem;
    font-weight: 500;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
    max-width: 500px;
    animation: fadeInUp 0.8s ease 0.4s forwards;
    opacity: 0;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.6s forwards;
    opacity: 0;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient-accent);
    color: white;
    box-shadow: var(--shadow-md);
}

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

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

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

.hero-stats {
    display: flex;
    gap: 2.5rem;
    margin-top: 3rem;
    animation: fadeInUp 0.8s ease 0.8s forwards;
    opacity: 0;
}

.hero-stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Hero Image */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInRight 1s ease 0.5s forwards;
    opacity: 0;
}

.hero-image-container {
    position: relative;
    width: 400px;
    height: 400px;
}

.hero-image-wrapper {
    position: absolute;
    inset: 0;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    overflow: hidden;
    animation: morphBlob 10s ease-in-out infinite;
    border: 4px solid var(--accent-primary);
    box-shadow: var(--shadow-lg);
}

.hero-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.5s ease;
}

.hero-image-wrapper:hover img {
    transform: scale(1.05);
}

@keyframes morphBlob {
    0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    25% { border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%; }
    50% { border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%; }
    75% { border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%; }
}

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

@keyframes pulseGlow {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.1); }
}

.floating-elements {
    position: absolute;
    inset: -60px;
    pointer-events: none;
}

.float-item {
    position: absolute;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: var(--shadow-md);
    animation: floatItem 5s ease-in-out infinite;
}

.float-item i {
    font-size: 1.2rem;
    color: var(--accent-primary);
}

.float-item-1 { top: 15%; left: -10%; animation-delay: 0s; }
.float-item-2 { top: 55%; right: -15%; animation-delay: -1.5s; }
.float-item-3 { bottom: 15%; left: -5%; animation-delay: -3s; }

@keyframes floatItem {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* ========== SECTIONS COMMON ========== */
section {
    padding: 100px 5%;
    position: relative;
}

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

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ========== ABOUT SECTION ========== */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.about-image-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1rem;
    box-shadow: var(--shadow-lg);
}

.about-image-card img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    object-position: center top;
    border-radius: 16px;
    transition: transform 0.5s ease;
}

.about-image-card:hover img {
    transform: scale(1.02);
}

.about-card-info {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 1.25rem;
    border: 1px solid var(--glass-border);
}

.about-card-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.about-card-role {
    color: var(--accent-primary);
    font-size: 0.9rem;
}

.about-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.about-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.about-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-primary);
}

.about-stat-number {
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.about-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.about-content h3 span {
    color: var(--accent-primary);
}

.about-text {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.about-highlights {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.highlight-item:hover {
    border-color: var(--accent-primary);
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.highlight-item i {
    font-size: 1.3rem;
    color: var(--accent-primary);
}

.highlight-item span {
    font-size: 0.95rem;
    font-weight: 500;
}

/* ========== SKILLS SECTION ========== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.75rem;
    transition: all 0.4s ease;
    box-shadow: var(--shadow-sm);
}

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

.skill-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.skill-icon {
    width: 55px;
    height: 55px;
    background: var(--gradient-accent);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: white;
    box-shadow: var(--shadow-md);
}

.skill-card-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.skill-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    transform: scale(1.05);
}

.skill-tag i {
    color: var(--accent-secondary);
}

.skill-tag:hover i {
    color: white;
}

/* ========== PROJECTS SECTION ========== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

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

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

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

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

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

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    width: 45px;
    height: 45px;
    background: var(--gradient-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: transform 0.3s ease;
}

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

.project-content {
    padding: 1.75rem;
}

.project-category {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.project-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.project-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

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

.project-tech span {
    padding: 0.35rem 0.75rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--accent-secondary);
    font-weight: 500;
}

/* ========== EXPERIENCE SECTION ========== */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding-left: 2.5rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient-accent);
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    padding-bottom: 2.5rem;
}

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

.timeline-dot {
    position: absolute;
    left: -2.5rem;
    top: 0;
    width: 18px;
    height: 18px;
    background: var(--gradient-accent);
    border-radius: 50%;
    transform: translateX(-7.5px);
    box-shadow: 0 0 20px var(--accent-primary);
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.75rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.timeline-content:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-primary);
}

.timeline-date {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: var(--gradient-accent);
    border-radius: 50px;
    font-size: 0.85rem;
    color: white;
    margin-bottom: 1rem;
}

.timeline-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-company {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-primary);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.timeline-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.timeline-tech span {
    padding: 0.3rem 0.7rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--accent-secondary);
}

.timeline-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.timeline-description ul {
    list-style: none;
    padding: 0;
}

.timeline-description ul li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
}

.timeline-description ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    border-radius: 50%;
}

/* ========== FORMATION SECTION ========== */
.formation-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.formation-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: var(--shadow-sm);
}

.formation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-accent);
}

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

.formation-icon {
    width: 65px;
    height: 65px;
    background: var(--gradient-accent);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: white;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
}

.formation-date {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.formation-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.formation-school {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.formation-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ========== LANGUAGES & INTERESTS ========== */
.li-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.li-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.li-section-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.75rem;
}

.li-section-title i {
    font-size: 1.6rem;
    color: var(--accent-primary);
}

.languages-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.language-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

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

.language-flag {
    width: 45px;
    height: 45px;
    background: var(--gradient-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.language-info h4 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.language-info p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

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

.interest-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.interest-item:hover {
    border-color: var(--accent-primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.interest-item i {
    font-size: 2rem;
    color: var(--accent-primary);
}

.interest-item span {
    font-size: 0.95rem;
    font-weight: 500;
}

/* ========== CONTACT SECTION ========== */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 1.25rem;
    line-height: 1.2;
}

.contact-info h3 span {
    color: var(--accent-primary);
}

.contact-text {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

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

.contact-item-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.contact-item-text {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

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

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 50px;
    height: 50px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.social-link:hover {
    background: var(--gradient-accent);
    border-color: transparent;
    color: white;
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

/* Contact Form */
.contact-form-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
}

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

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

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

.form-group label {
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    padding: 1rem 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.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);
}

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

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

.form-submit {
    margin-top: 0.5rem;
}

.form-submit .btn {
    width: 100%;
    justify-content: center;
    padding: 1.15rem 2rem;
}

.form-status {
    text-align: center;
    padding: 1rem;
    border-radius: 12px;
    display: none;
    margin-top: 1rem;
}

.form-status.success {
    display: block;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.form-status.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* ========== FOOTER ========== */
footer {
    padding: 2.5rem 5%;
    text-align: center;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

footer p {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

footer i.fa-heart {
    color: var(--accent-tertiary);
}

footer i.fa-coffee {
    color: var(--accent-secondary);
}

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

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

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.stagger-children.active > *:nth-child(1) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.stagger-children.active > *:nth-child(2) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.stagger-children.active > *:nth-child(3) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.stagger-children.active > *:nth-child(4) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }
.stagger-children.active > *:nth-child(5) { transition-delay: 0.5s; opacity: 1; transform: translateY(0); }
.stagger-children.active > *:nth-child(6) { transition-delay: 0.6s; opacity: 1; transform: translateY(0); }

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content { order: 2; }
    .hero-visual { order: 1; }
    .hero-description { margin: 0 auto 2rem; }
    .hero-cta { justify-content: center; }
    .hero-stats { justify-content: center; }
    .hero-image-container { width: 320px; height: 320px; }
    .floating-elements { display: none; }
}

@media (max-width: 1024px) {
    .about-container { grid-template-columns: 1fr; gap: 3rem; }
    .contact-container { grid-template-columns: 1fr; }
    .projects-grid { grid-template-columns: 1fr; }
    .formation-grid { grid-template-columns: 1fr; }
    .li-grid { grid-template-columns: 1fr; }
    .theme-toggle { top: auto; bottom: 30px; right: 30px; }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        height: 100vh;
        background: var(--bg-primary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 1rem;
        transition: right 0.4s ease;
        border-left: 1px solid var(--border-color);
    }

    .nav-links.active { right: 0; }
    .menu-toggle { display: flex; }

    .hero-title { font-size: clamp(2rem, 8vw, 3.5rem); }
    .hero-stats { flex-direction: column; gap: 1.5rem; }
    .hero-image-container { width: 260px; height: 260px; }
    .about-stats-grid { grid-template-columns: 1fr; }
    .about-highlights { grid-template-columns: 1fr; }
    .skills-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .interests-list { grid-template-columns: 1fr; }

    section { padding: 70px 5%; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 2rem; }
    .section-title { font-size: 1.8rem; }
    .btn { padding: 0.85rem 1.5rem; font-size: 0.9rem; }
    .contact-form-wrapper { padding: 1.5rem; }
    .theme-toggle { width: 50px; height: 50px; }
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-accent);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}
