/* ============================================
   Andrea Berni - Portfolio Theme
   ============================================ */

/* --------------------------------------------
   CSS Variables
   -------------------------------------------- */
:root {
    /* Colors - Azzurro/Cyan Theme */
    --color-primary: #0ea5e9;          /* Sky 500 - azzurro più intenso per light mode */
    --color-primary-dark: #0284c7;     /* Sky 600 */
    --color-primary-light: #38bdf8;    /* Sky 400 - per hover */
    --color-secondary: #64748b;
    --color-accent: #06b6d4;           /* Cyan 500 - turchese più intenso */

    /* Light Theme Colors */
    --color-light: #ffffff;            /* Bianco puro */
    --color-light-soft: #f8fafc;       /* Slate 50 - sfondo alternativo */
    --color-light-muted: #f1f5f9;      /* Slate 100 - card background */
    --color-border: #e2e8f0;           /* Slate 200 - bordi */
    --color-border-dark: #cbd5e1;      /* Slate 300 - bordi hover */

    /* Legacy dark colors per compatibilità */
    --color-dark: #0f172a;             /* Slate 900 - per testi e footer */
    --color-dark-light: #1e293b;       /* Slate 800 */
    --color-dark-lighter: #334155;     /* Slate 700 */

    /* Text Colors - Light mode */
    --color-text: #0f172a;             /* Slate 900 - testo principale */
    --color-text-muted: #64748b;       /* Slate 500 - testo secondario */
    --color-text-lead: #475569;        /* Slate 600 - per lead/subtitle */
    --color-text-light: #f8fafc;       /* Per testo su sfondo scuro */

    /* Glassmorphism - Light version */
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(14, 165, 233, 0.2);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);

    /* Fonts */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Spacing */
    --section-padding: 100px;
    --section-padding-sm: 60px;

    /* Transitions */
    --transition-base: 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

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

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; }

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition-base);
}

a:hover {
    color: var(--color-primary-light);
}

img {
    max-width: 100%;
    height: auto;
}

/* --------------------------------------------
   Utilities
   -------------------------------------------- */
.text-gradient {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section {
    padding: var(--section-padding) 0;
}

.section-sm {
    padding: var(--section-padding-sm) 0;
}

.section-title {
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--color-text-lead);
    font-size: 1.125rem;
    max-width: 600px;
}

/* Section Label */
.section-label {
    display: inline-block;
    color: var(--color-primary);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(14, 165, 233, 0.08);
    border-radius: 50px;
    border: 1px solid rgba(14, 165, 233, 0.15);
}

/* Section with Background */
.section-with-bg {
    position: relative;
    overflow: hidden;
}

.section-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.section-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(1.1) saturate(0.3);
    opacity: 0.15;
}

.section-bg::after {
    display: none;
}

.section-with-bg .container {
    position: relative;
    z-index: 1;
}

/* Section Decoration Image */
.section-decoration-img {
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--color-border);
    opacity: 0.95;
    transition: var(--transition-base);
}

.section-decoration-img:hover {
    transform: scale(1.02);
    opacity: 1;
}

.section-decoration-img-left {
    border-radius: 20px;
    margin-right: 2rem;
}

/* Section Divider */
.section-divider {
    padding: 3rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.divider-line {
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-primary), var(--color-accent), transparent);
    position: relative;
}

.divider-line::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: var(--color-primary);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(14, 165, 233, 0.4);
}

/* Image Break Section */
.section-image-break {
    padding: 0;
    margin: 0;
}

.image-break-container {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.image-break-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.85);
}

.image-break-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(248, 250, 252, 0.9) 0%,
        rgba(248, 250, 252, 0.6) 50%,
        rgba(248, 250, 252, 0.9) 100%
    );
}

.image-break-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-break-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text);
    text-align: center;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid var(--color-border);
}

@media (max-width: 768px) {
    .image-break-text {
        font-size: 1.1rem;
        padding: 0.75rem 1.5rem;
    }

    .image-break-container {
        height: 200px;
    }
}

/* Lead text - più visibile */
.lead {
    color: var(--color-text-lead) !important;
    font-size: 1.2rem;
    font-weight: 400;
}

.text-muted {
    color: var(--color-text-muted) !important;
}

.bg-dark-light {
    background-color: var(--color-light-soft);
}

.bg-dark-lighter {
    background-color: var(--color-light-muted);
}

.bg-light-soft {
    background-color: var(--color-light-soft);
}

/* --------------------------------------------
   Buttons - 3D Style
   -------------------------------------------- */
.btn {
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border: none;
    color: var(--color-dark);
    font-weight: 600;
    box-shadow:
        0 4px 15px rgba(56, 189, 248, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -2px 0 rgba(0, 0, 0, 0.1);
}

.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:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 10px 30px rgba(56, 189, 248, 0.4),
        0 0 20px rgba(56, 189, 248, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -2px 0 rgba(0, 0, 0, 0.1);
    color: var(--color-dark);
}

.btn-outline-light {
    border: 2px solid var(--color-primary);
    background: transparent;
    color: var(--color-primary);
}

.btn-outline-light:hover {
    background-color: var(--color-primary);
    color: var(--color-light);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.25);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* --------------------------------------------
   Header / Navbar
   -------------------------------------------- */
.site-header .navbar {
    padding: 1rem 0;
    background: transparent;
    transition: var(--transition-base);
}

.site-header .navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.navbar-brand .brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
}

.navbar-nav .nav-link {
    color: var(--color-text-lead);
    font-weight: 500;
    padding: 0.5rem 1rem;
    position: relative;
}

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

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: var(--color-primary);
    transform: scaleX(0);
    transition: var(--transition-base);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    transform: scaleX(1);
}

.navbar-nav .btn {
    padding: 0.5rem 1.25rem;
}

.navbar-nav .btn::after {
    display: none;
}

/* --------------------------------------------
   Hero Section
   -------------------------------------------- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-light) 0%, var(--color-light-soft) 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 40%, rgba(14, 165, 233, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 60%, rgba(6, 182, 212, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(14, 165, 233, 0.04) 0%, transparent 40%);
    pointer-events: none;
    z-index: 1;
}

/* Hero decorative image */
.hero-image {
    position: absolute;
    right: -5%;
    top: 50%;
    transform: translateY(-50%);
    width: 45%;
    height: 80%;
    z-index: 0;
    opacity: 0.15;
    mask-image: linear-gradient(to left, rgba(0,0,0,0.8), transparent);
    -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,0.8), transparent);
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.5) brightness(0.8);
}

.hero .container {
    position: relative;
    z-index: 2;
}

@media (max-width: 991px) {
    .hero-image {
        display: none;
    }
}

.hero-subtitle {
    display: inline-block;
    color: var(--color-primary);
    font-weight: 500;
    font-size: 1.125rem;
    margin-bottom: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

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

.hero-description {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    max-width: 600px;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 4rem;
    padding: 1.5rem;
    background: var(--color-light);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.hero-stat {
    text-align: center;
    padding: 0.5rem 1.5rem;
    position: relative;
}

.hero-stat:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 40px;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--color-primary), transparent);
}

.hero-stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(56, 189, 248, 0.3);
}

.hero-stat-label {
    color: var(--color-text-lead);
    font-size: 0.875rem;
    font-weight: 500;
}

/* --------------------------------------------
   Tech Stack - 3D Badges
   -------------------------------------------- */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

.tech-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--color-light);
    border: 1px solid var(--color-border);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-lead);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.tech-badge:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-3px) scale(1.05);
    box-shadow:
        0 8px 25px rgba(14, 165, 233, 0.15),
        0 0 20px rgba(14, 165, 233, 0.08);
}

.tech-badge i {
    font-size: 1.25rem;
    filter: drop-shadow(0 0 3px currentColor);
}

/* --------------------------------------------
   Services Section - Glassmorphism 3D
   -------------------------------------------- */
.service-card {
    background: var(--color-light);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 2rem;
    height: 100%;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

/* Effetto luce top */
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.service-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--color-primary);
    box-shadow:
        0 20px 40px rgba(14, 165, 233, 0.12),
        0 0 40px rgba(14, 165, 233, 0.05);
}

.service-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-radius: 16px;
    margin-bottom: 1.5rem;
    box-shadow:
        0 10px 30px rgba(56, 189, 248, 0.3),
        inset 0 -2px 5px rgba(0, 0, 0, 0.2),
        inset 0 2px 5px rgba(255, 255, 255, 0.2);
    transform: perspective(500px) rotateX(5deg);
    transition: var(--transition-base);
}

.service-card:hover .service-icon {
    transform: perspective(500px) rotateX(0deg) scale(1.1);
    box-shadow:
        0 15px 40px rgba(56, 189, 248, 0.4),
        inset 0 -2px 5px rgba(0, 0, 0, 0.2),
        inset 0 2px 5px rgba(255, 255, 255, 0.3);
}

.service-icon i {
    font-size: 1.75rem;
    color: white;
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--color-text-muted);
    margin-bottom: 0;
}

/* --------------------------------------------
   Projects Section - 3D Cards
   -------------------------------------------- */
.project-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: var(--color-light);
    border: 1px solid var(--color-border);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

/* Bordo luminoso top */
.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--color-primary);
    box-shadow:
        0 25px 50px rgba(14, 165, 233, 0.12),
        0 0 50px rgba(14, 165, 233, 0.05);
}

.project-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-base);
}

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

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9), transparent);
    opacity: 0;
    transition: var(--transition-base);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

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

.project-content {
    padding: 1.5rem;
}

.project-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.project-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.project-title a {
    color: var(--color-text);
}

.project-title a:hover {
    color: var(--color-primary);
}

.project-description {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

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

.project-tech span {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: var(--color-light-muted);
    border-radius: 50px;
    color: var(--color-text-muted);
}

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

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

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    background: var(--color-primary);
    border-radius: 50%;
    transform: translateX(-5px);
}

.timeline-date {
    font-size: 0.875rem;
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.timeline-company {
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.timeline-description {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* --------------------------------------------
   Skills
   -------------------------------------------- */
.skill-bar {
    margin-bottom: 1.5rem;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.skill-name {
    font-weight: 500;
}

.skill-percentage {
    color: var(--color-text-muted);
}

.skill-progress {
    height: 8px;
    background: var(--color-light-muted);
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    border-radius: 4px;
    transition: width 1s ease-out;
    box-shadow: 0 0 8px rgba(14, 165, 233, 0.25);
}

/* --------------------------------------------
   Contact Form
   -------------------------------------------- */
.contact-form .form-control,
.contact-form .form-select {
    background: var(--color-light);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    padding: 1rem;
    border-radius: 8px;
    transition: var(--transition-base);
}

.contact-form .form-control:focus,
.contact-form .form-select:focus {
    background: var(--color-light);
    border-color: var(--color-primary);
    color: var(--color-text);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.contact-form .form-control::placeholder {
    color: var(--color-text-muted);
}

.contact-form label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-info-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-light-muted);
    border-radius: 12px;
    flex-shrink: 0;
}

.contact-info-icon i {
    font-size: 1.25rem;
    color: var(--color-primary);
}

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

.contact-info-content p {
    color: var(--color-text-muted);
    margin-bottom: 0;
}

/* --------------------------------------------
   Footer
   -------------------------------------------- */
.site-footer {
    background: var(--color-light-soft);
    border-top: 1px solid var(--color-border);
    padding: 80px 0 0;
}

.footer-brand .brand-text {
    font-size: 1.75rem;
    font-weight: 700;
}

.footer-bio {
    color: var(--color-text-muted);
    margin: 1rem 0;
}

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

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-light-muted);
    border-radius: 8px;
    color: var(--color-text-muted);
    transition: var(--transition-base);
}

.social-links a:hover {
    background: var(--color-primary);
    color: var(--color-light);
    box-shadow: 0 5px 15px rgba(14, 165, 233, 0.3);
}

.footer-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.footer-links a {
    color: var(--color-text-muted);
}

.footer-links a:hover {
    color: var(--color-text);
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--color-text-muted);
}

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

.footer-contact a {
    color: var(--color-text-muted);
}

.footer-bottom {
    margin-top: 60px;
    padding: 1.5rem 0;
    border-top: 1px solid var(--color-border);
}

.copyright,
.credits {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.credits a {
    color: var(--color-primary);
}

/* --------------------------------------------
   404 Page
   -------------------------------------------- */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.error-code {
    font-size: 10rem;
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --------------------------------------------
   CTA Section with Background Image
   -------------------------------------------- */
.cta-section {
    position: relative;
    overflow: hidden;
}

.cta-background {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.cta-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.9) saturate(0.8);
}

.cta-background::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(14, 165, 233, 0.9) 0%,
        rgba(6, 182, 212, 0.85) 50%,
        rgba(14, 165, 233, 0.9) 100%
    );
}

.cta-section .container {
    position: relative;
    z-index: 1;
}

.cta-section h2 {
    color: var(--color-light);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.cta-section p {
    color: rgba(255, 255, 255, 0.9);
}

.cta-section .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.8);
    color: var(--color-light);
}

.cta-section .btn-outline-light:hover {
    background: var(--color-light);
    color: var(--color-primary);
}

/* --------------------------------------------
   Skills Section with Background
   -------------------------------------------- */
.skills-section {
    position: relative;
    overflow: hidden;
}

.skills-background {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.skills-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.9) saturate(0.6);
    opacity: 0.5;
}

.skills-background::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(248, 250, 252, 0.95) 0%,
        rgba(248, 250, 252, 0.85) 50%,
        rgba(248, 250, 252, 0.95) 100%
    );
}

.skills-section .container {
    position: relative;
    z-index: 1;
}

/* --------------------------------------------
   Contact Header with Background
   -------------------------------------------- */
.contact-header {
    position: relative;
    overflow: hidden;
    padding-top: 150px;
}

.contact-header-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.contact-header-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.9) saturate(0.7);
}

.contact-header-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(248, 250, 252, 0.8) 0%,
        rgba(248, 250, 252, 0.92) 70%,
        rgba(255, 255, 255, 1) 100%
    );
}

.contact-header .container {
    position: relative;
    z-index: 1;
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* --------------------------------------------
   Profile Avatar
   -------------------------------------------- */
.profile-avatar {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-radius: 50%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 40px rgba(14, 165, 233, 0.25),
        0 0 80px rgba(6, 182, 212, 0.12);
    animation: pulseGlow 3s ease-in-out infinite;
}

.profile-avatar i {
    font-size: 8rem;
    color: white;
    opacity: 0.6;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow:
            0 0 40px rgba(14, 165, 233, 0.25),
            0 0 80px rgba(6, 182, 212, 0.12);
    }
    50% {
        box-shadow:
            0 0 50px rgba(14, 165, 233, 0.35),
            0 0 100px rgba(6, 182, 212, 0.2);
    }
}

/* --------------------------------------------
   Why Choose Me Section
   -------------------------------------------- */
.section-why-me {
    position: relative;
    overflow: hidden;
}

.section-why-me .section-bg {
    opacity: 0.8;
}

.why-me-features {
    margin-top: 2rem;
}

.why-me-item {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: var(--color-light);
    border-radius: 16px;
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
}

.why-me-item:hover {
    border-color: var(--color-primary);
    transform: translateX(10px);
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.1);
}

.why-me-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-radius: 14px;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(56, 189, 248, 0.3);
}

.why-me-icon i {
    font-size: 1.5rem;
    color: white;
}

.why-me-text h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: var(--color-text);
}

.why-me-text p {
    color: var(--color-text-muted);
    margin-bottom: 0;
    font-size: 0.95rem;
}

.why-me-image {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12);
}

.why-me-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.why-me-image:hover img {
    transform: scale(1.05);
}

.why-me-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(56, 189, 248, 0.1) 0%,
        transparent 50%,
        rgba(34, 211, 238, 0.1) 100%
    );
    pointer-events: none;
}

/* Border glow effect */
.why-me-image::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-radius: 26px;
    z-index: -1;
    opacity: 0.5;
}

/* --------------------------------------------
   Technologies Section
   -------------------------------------------- */
.section-technologies {
    background: var(--color-light-soft);
    position: relative;
}

.section-technologies::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
}

.section-technologies::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
}

.tech-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.tech-logo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 2rem;
    background: var(--color-light);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-width: 120px;
}

.tech-logo-item:hover {
    transform: translateY(-8px) scale(1.05);
    border-color: var(--color-primary);
    box-shadow:
        0 20px 40px rgba(14, 165, 233, 0.12),
        0 0 30px rgba(14, 165, 233, 0.06);
}

.tech-logo-item img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    filter: brightness(1);
    transition: all 0.3s ease;
}

.tech-logo-item:hover img {
    filter: brightness(1.05) drop-shadow(0 0 10px rgba(14, 165, 233, 0.3));
    transform: scale(1.1);
}

.tech-logo-item span {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-muted);
    transition: color 0.3s ease;
}

.tech-logo-item:hover span {
    color: var(--color-primary);
}

/* --------------------------------------------
   CTA Buttons
   -------------------------------------------- */
.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-buttons .btn {
    min-width: 180px;
}

/* Projects Section Specific */
.section-projects {
    position: relative;
}

.section-projects::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 10% 20%, rgba(14, 165, 233, 0.04) 0%, transparent 40%),
        radial-gradient(ellipse at 90% 80%, rgba(6, 182, 212, 0.03) 0%, transparent 40%);
    pointer-events: none;
}

/* --------------------------------------------
   Responsive
   -------------------------------------------- */
@media (max-width: 991px) {
    .hero-stats {
        gap: 2rem;
    }

    .section {
        padding: var(--section-padding-sm) 0;
    }
}

@media (max-width: 767px) {
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
    }

    .hero-stat {
        text-align: left;
    }

    .navbar-collapse {
        background: var(--color-light);
        padding: 1rem;
        border-radius: 12px;
        margin-top: 1rem;
        border: 1px solid var(--color-border);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    }

    .navbar-nav .btn {
        margin-top: 1rem;
        margin-left: 0 !important;
    }

    /* Why Me Section Mobile */
    .why-me-item {
        flex-direction: column;
        text-align: center;
    }

    .why-me-item:hover {
        transform: translateY(-5px);
    }

    .why-me-image {
        margin-top: 2rem;
    }

    /* Tech Logos Mobile */
    .tech-logos {
        gap: 1rem;
    }

    .tech-logo-item {
        padding: 1rem 1.25rem;
        min-width: 100px;
    }

    .tech-logo-item img {
        width: 40px;
        height: 40px;
    }

    /* CTA Buttons Mobile */
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-buttons .btn {
        width: 100%;
        max-width: 280px;
    }

    /* Section decoration images hidden on mobile */
    .section-decoration-img,
    .section-decoration-img-left {
        display: none;
    }
}
