/* ================================
   VARIABLES & RESET
   ================================ */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #06b6d4;
    --accent: #f59e0b;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --dark-lighter: #334155;
    --light: #f8fafc;
    --gray: #94a3b8;
    --success: #10b981;
    --danger: #ef4444;
    
    --gradient-1: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --gradient-2: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
    --gradient-dark: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 40px -10px var(--primary);
    
    --radius-sm: 0.375rem;
    --radius: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    
    --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);
    
    --font-sans: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background: var(--dark);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ================================
   LOADER
   ================================ */
.loader {
    position: fixed;
    inset: 0;
    background: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

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

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

.loader-circle {
    width: 60px;
    height: 60px;
    border: 3px solid var(--dark-lighter);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.loader-text {
    font-family: var(--font-mono);
    color: var(--primary);
    font-size: 0.875rem;
    animation: pulse 1.5s ease-in-out infinite;
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ================================
   NAVIGATION
   ================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.95);
    box-shadow: var(--shadow-lg);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--light);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: var(--transition);
}

.logo-bracket {
    color: var(--primary);
    transition: var(--transition);
}

.nav-logo:hover .logo-bracket {
    color: var(--secondary);
    transform: scale(1.1);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--gray);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0;
    transition: var(--transition);
}

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

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--light);
    transition: var(--transition);
    transform-origin: center;
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

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

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ================================
   PROGRESS BAR
   ================================ */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: var(--gradient-1);
    z-index: 1001;
    width: 0%;
    transition: width 0.1s;
}

/* ================================
   MAIN CONTENT
   ================================ */
main {
    flex: 1;
    margin-top: 80px;
    min-height: calc(100vh - 80px);
}

.page {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

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

/* ================================
   HERO SECTION
   ================================ */
.hero {
    min-height: calc(100vh - 80px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: var(--primary);
    opacity: 0.1;
    filter: blur(100px);
    border-radius: 50%;
    animation: float 10s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: var(--secondary);
    opacity: 0.1;
    filter: blur(80px);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -30px) scale(1.1); }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50px;
    font-size: 0.875rem;
    color: var(--primary-light);
    margin-bottom: 1.5rem;
    animation: slideInLeft 0.6s ease 0.2s both;
}

.hero-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    animation: slideInLeft 0.6s ease 0.3s both;
}

.hero-title .highlight {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--gray);
    margin-bottom: 2rem;
    max-width: 500px;
    animation: slideInLeft 0.6s ease 0.4s both;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2.5rem;
    animation: slideInLeft 0.6s ease 0.5s both;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray);
    margin-top: 0.25rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    animation: slideInLeft 0.6s ease 0.6s both;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.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: 0.5s;
}

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

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 4px 15px -3px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.5);
}

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

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

.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: slideInRight 0.6s ease 0.4s both;
}

.hero-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 450px;
}

.hero-image-wrapper::before {
    content: '';
    position: absolute;
    inset: -10px;
    background: var(--gradient-1);
    border-radius: var(--radius-xl);
    opacity: 0.3;
    filter: blur(20px);
    animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
    from { opacity: 0.3; transform: scale(1); }
    to { opacity: 0.5; transform: scale(1.02); }
}

.hero-img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-xl);
    position: relative;
    z-index: 1;
    box-shadow: var(--shadow-xl);
    object-fit: cover;
    aspect-ratio: 3/4;
}

.tech-stack {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    right: -2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.tech-item {
    width: 50px;
    height: 50px;
    background: var(--dark-light);
    border: 1px solid var(--dark-lighter);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    box-shadow: var(--shadow-lg);
    animation: floatTech 3s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.2s);
}

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

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

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

/* ================================
   SECTIONS COMMUNES
   ================================ */
.section {
    padding: 6rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

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

.section-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50px;
    font-size: 0.875rem;
    color: var(--primary-light);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.section-subtitle {
    color: var(--gray);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

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

.skill-card {
    background: var(--dark-light);
    border: 1px solid var(--dark-lighter);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s;
}

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

.skill-card:hover::before {
    transform: scaleX(1);
}

.skill-icon {
    width: 60px;
    height: 60px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.skill-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.skill-list {
    list-style: none;
}

.skill-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: var(--gray);
    font-size: 0.95rem;
}

.skill-list li::before {
    content: '▹';
    color: var(--primary);
    font-weight: bold;
}

/* ================================
   ABOUT PAGE
   ================================ */
.about-hero {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 4rem;
    align-items: start;
    margin-bottom: 4rem;
}

.about-image {
    position: sticky;
    top: 100px;
}

.about-image-wrapper {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.about-image-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-1);
    opacity: 0.2;
    z-index: 1;
}

.about-img {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(20%);
    transition: var(--transition);
}

.about-image-wrapper:hover .about-img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.about-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

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

.about-text {
    color: var(--gray);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

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

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--dark-light);
    border-radius: var(--radius);
    border: 1px solid var(--dark-lighter);
}

.info-icon {
    width: 45px;
    height: 45px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.25rem;
}

.info-content h4 {
    font-size: 0.875rem;
    color: var(--gray);
    margin-bottom: 0.25rem;
}

.info-content p {
    font-weight: 600;
    color: var(--light);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gradient-1);
}

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    border: 3px solid var(--dark);
    box-shadow: 0 0 0 3px var(--primary);
}

.timeline-date {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.timeline-subtitle {
    color: var(--primary-light);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.timeline-desc {
    color: var(--gray);
    font-size: 0.95rem;
}

/* ================================
   PROJECTS PAGE
   ================================ */
.projects-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: var(--dark-light);
    border: 1px solid var(--dark-lighter);
    color: var(--gray);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

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

.project-card {
    background: var(--dark-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--dark-lighter);
    transition: var(--transition);
    position: relative;
}

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

.project-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: var(--dark);
}

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

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

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    transition: var(--transition);
}

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

.project-link {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transform: translateY(20px);
    transition: var(--transition);
}

.project-card:hover .project-link {
    transform: translateY(0);
}

.project-link:hover {
    background: var(--secondary);
    transform: scale(1.1);
}

.project-content {
    padding: 1.5rem;
}

.project-category {
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--light);
}

.project-description {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

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

.tech-tag {
    padding: 0.25rem 0.75rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-light);
    border-radius: 50px;
    font-size: 0.8rem;
    font-family: var(--font-mono);
}

/* ================================
   CONTACT PAGE
   ================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.contact-info > p {
    color: var(--gray);
    margin-bottom: 2rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-method {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--dark-light);
    border-radius: var(--radius-lg);
    border: 1px solid var(--dark-lighter);
    transition: var(--transition);
}

.contact-method:hover {
    border-color: var(--primary);
    transform: translateX(10px);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.contact-details h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.contact-details p,
.contact-details a {
    color: var(--gray);
    text-decoration: none;
    transition: var(--transition);
}

.contact-details a:hover {
    color: var(--primary);
}

.contact-form-wrapper {
    background: var(--dark-light);
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--dark-lighter);
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--dark);
    border: 1px solid var(--dark-lighter);
    border-radius: var(--radius);
    color: var(--light);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

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

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

.form-error {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

.form-group.error input,
.form-group.error textarea {
    border-color: var(--danger);
}

.form-group.error .form-error {
    display: block;
}

.honeypot {
    position: absolute;
    left: -9999px;
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-submit .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn-submit.loading .spinner {
    display: inline-block;
}

.btn-submit.loading .btn-text {
    display: none;
}

/* ================================
   TOAST NOTIFICATIONS
   ================================ */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toast {
    background: var(--dark-light);
    border: 1px solid var(--dark-lighter);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-xl);
    animation: slideInRight 0.3s ease;
    min-width: 300px;
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast-icon {
    font-size: 1.25rem;
}

.toast.success .toast-icon {
    color: var(--success);
}

.toast.error .toast-icon {
    color: var(--danger);
}

.toast-content h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.toast-content p {
    font-size: 0.875rem;
    color: var(--gray);
}

.toast-close {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 0.25rem;
    transition: var(--transition);
}

.toast-close:hover {
    color: var(--light);
}

/* ================================
   FOOTER
   ================================ */
.footer {
    background: var(--dark-light);
    border-top: 1px solid var(--dark-lighter);
    padding: 4rem 2rem 2rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-logo {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--gray);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

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

.footer-social a {
    width: 40px;
    height: 40px;
    background: var(--dark);
    border: 1px solid var(--dark-lighter);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    text-decoration: none;
    transition: var(--transition);
}

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

.footer-links h4,
.footer-contact h4 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--light);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--gray);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 0.5rem;
}

.footer-contact p {
    color: var(--gray);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.footer-contact i {
    color: var(--primary);
    width: 20px;
}

.footer-bottom {
    border-top: 1px solid var(--dark-lighter);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--gray);
    font-size: 0.9rem;
}

.footer-tech {
    color: var(--primary);
}

.footer-tech i {
    margin: 0 0.25rem;
}

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

    .hero-content {
        order: 2;
    }

    .hero-image {
        order: 1;
    }

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

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

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

    .tech-stack {
        display: none;
    }

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

    .about-image {
        position: relative;
        top: 0;
        max-width: 300px;
        margin: 0 auto;
    }

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

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

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--dark-light);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--dark-lighter);
        transform: translateY(-150%);
        transition: transform 0.3s ease;
    }

    .nav-menu.active {
        transform: translateY(0);
    }

    .nav-toggle {
        display: flex;
    }

    .section {
        padding: 4rem 1.5rem;
    }

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

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .contact-form-wrapper {
        padding: 1.5rem;
    }
}

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

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

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

/* ================================
   ANIMATIONS SCROLL
   ================================ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

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

/* Typing effect */
.typing {
    border-right: 3px solid var(--primary);
    animation: blink 0.75s step-end infinite;
}

@keyframes blink {
    50% { border-color: transparent; }
}

/* Particle background */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.3;
    animation: float-particle 15s infinite;
}

@keyframes float-particle {
    0%, 100% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ================================
   COOKIE CONSENT
   ================================ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--dark-light);
    border-top: 1px solid var(--dark-lighter);
    padding: 1.5rem;
    z-index: 9998;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.cookie-text h4 {
    color: var(--light);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cookie-text h4 i {
    color: var(--accent);
}

.cookie-text p {
    color: var(--gray);
    font-size: 0.9rem;
    max-width: 600px;
}

.cookie-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.btn-cookie-secondary {
    background: transparent;
    border: 1px solid var(--dark-lighter);
    color: var(--gray);
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
}

.btn-cookie-secondary:hover {
    border-color: var(--primary);
    color: var(--light);
}

.btn-cookie-primary {
    background: var(--dark);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
}

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

.btn-cookie-accent {
    background: var(--gradient-1);
    color: white;
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    border: none;
}

.btn-cookie-accent:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cookie-modal.show {
    opacity: 1;
    visibility: visible;
}

.cookie-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.cookie-modal-content {
    background: var(--dark-light);
    border: 1px solid var(--dark-lighter);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.cookie-modal.show .cookie-modal-content {
    transform: scale(1);
}

.cookie-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--dark-lighter);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-modal-header h3 {
    font-size: 1.25rem;
}

.cookie-modal-close {
    background: none;
    border: none;
    color: var(--gray);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition);
}

.cookie-modal-close:hover {
    color: var(--light);
    transform: rotate(90deg);
}

.cookie-modal-body {
    padding: 1.5rem;
}

.cookie-option {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--dark-lighter);
}

.cookie-option:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.cookie-option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.cookie-option-header h5 {
    color: var(--light);
    margin-bottom: 0.25rem;
}

.cookie-option-header p {
    color: var(--gray);
    font-size: 0.875rem;
}

/* Toggle Switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--dark-lighter);
    border-radius: 26px;
    transition: 0.3s;
}

.cookie-toggle-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background: var(--primary);
}

.cookie-toggle input:checked + .cookie-toggle-slider::before {
    transform: translateX(24px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--dark-lighter);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Responsive Cookie Banner */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .cookie-actions .btn {
        width: 100%;
    }
}

/* ================================
   LEGAL PAGES STYLES
   ================================ */
.legal-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.legal-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--dark-lighter);
}

.legal-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.legal-header .last-update {
    color: var(--gray);
    font-size: 0.9rem;
}

.legal-section {
    margin-bottom: 3rem;
}

.legal-section h2 {
    font-size: 1.5rem;
    color: var(--primary-light);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.legal-section h3 {
    font-size: 1.25rem;
    color: var(--light);
    margin: 1.5rem 0 0.75rem;
}

.legal-section p,
.legal-section li {
    color: var(--gray);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.legal-section ul {
    list-style: none;
    padding-left: 1.5rem;
}

.legal-section ul li::before {
    content: '•';
    color: var(--primary);
    font-weight: bold;
    margin-right: 0.75rem;
}

.legal-section a {
    color: var(--primary);
    text-decoration: none;
}

.legal-section a:hover {
    text-decoration: underline;
}

.legal-contact-box {
    background: var(--dark-light);
    border: 1px solid var(--dark-lighter);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 2rem;
}

.legal-contact-box h3 {
    margin-top: 0;
}

.cookie-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

.cookie-table th,
.cookie-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--dark-lighter);
}

.cookie-table th {
    background: var(--dark);
    color: var(--primary);
    font-weight: 600;
}

.cookie-table tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

@media print {
    .navbar,
    .footer,
    .cookie-banner,
    .back-to-top {
        display: none !important;
    }
    
    .legal-content {
        max-width: 100%;
    }
}