/* ==========================================
   ENOC COLOMER - PERSONAL BLOG
   Modern, Professional CSS Styles
   ========================================== */

/* CSS Variables */
:root {
    /* Colors */
    --primary: #3b82f6;
    /* Brighter Blue */
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --secondary: #0f172a;
    --accent: #f59e0b;
    --accent-light: #fbbf24;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;

    /* Neutrals */
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --gradient-dark: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    --gradient-hero: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    /* Vibrant Nebula */
    --gradient-glass: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Outfit', var(--font-primary);

    /* Sizes */
    --header-height: 70px;
    --container-width: 1200px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-neon: 0 0 15px rgba(59, 130, 246, 0.5);

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Border Radius */
    --radius-sm: 8px;
    --radius: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.5);
    --glass-blur: blur(12px);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);

    /* Light Theme Colors (Default) */
    --bg-body: #f0f4f8;
    /* Slightly cool gray for depth */
    --bg-header: rgba(255, 255, 255, 0.8);
    --bg-card: rgba(255, 255, 255, 0.8);
    /* Glass effect base */
    --bg-alt: #eef2ff;
    /* Very light indigo */
    --text-main: var(--gray-700);
    --text-title: var(--gray-900);
    --text-light: var(--gray-600);
}

/* Dark Theme Colors */
body.dark-mode {
    --bg-body: #0f172a;
    --bg-header: rgba(15, 23, 42, 0.7);
    --bg-card: rgba(30, 41, 59, 0.7);
    --bg-alt: #020617;
    --text-main: #94a3b8;
    --text-title: #f8fafc;
    --text-light: #cbd5e1;
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-neon: 0 0 20px rgba(59, 130, 246, 0.3);
}

/* Theme Toggle Button */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-title);
    transition: var(--transition);
    border-radius: var(--radius-full);
}

.theme-toggle:hover {
    background: var(--gray-100);
    transform: rotate(15deg);
}

body.dark-mode .theme-toggle {
    color: var(--warning);
}

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-body);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

ul {
    list-style: none;
}

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

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

/* Section */
.section {
    padding: 100px 0;
}

.section__header {
    text-align: center;
    margin-bottom: 60px;
}

.section__subtitle {
    display: inline-block;
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.section__title {
    font-family: var(--font-heading);
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    color: var(--text-title);
    line-height: 1.2;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-family: var(--font-primary);
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

.btn--primary {
    background: var(--gradient-primary);
    color: var(--white);
    border-color: var(--primary);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

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

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

.btn--full {
    width: 100%;
}

/* ==========================================
   HEADER
   ========================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    width: 100%;
    height: var(--header-height);
    background: var(--bg-header);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav__logo {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
}

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

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

.nav__list {
    display: flex;
    gap: 40px;
}

.nav__link {
    font-weight: 500;
    color: var(--gray-600);
    position: relative;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav__link:hover,
.nav__link.active {
    color: var(--primary);
}

.nav__link:hover::after,
.nav__link.active::after {
    width: 100%;
}

.nav__toggle,
.nav__close {
    display: none;
    font-size: 24px;
    color: var(--gray-800);
    cursor: pointer;
}

/* ==========================================
   HERO SECTION
   ========================================== */
/* Hero Z-index Layering */
.hero {
    position: relative;
    /* Create stacking context */
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    /* Increased padding to prevent header overlap clipping */
    padding-top: calc(var(--header-height) + 40px);
    overflow: hidden;
    /* Fallback background if CSS image fails */
    background-color: var(--secondary);
}

.hero__bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    /* Changed to 100% for full coverage */
    height: 100%;
    /* CSS Procedural Background - Modern & Lightweight */
    background:
        radial-gradient(circle at 15% 50%, rgba(37, 99, 235, 0.15) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(236, 72, 153, 0.15) 0%, transparent 25%),
        radial-gradient(circle at 50% 50%, #0f172a 0%, #020617 100%);
    z-index: 0;
}

/* Add a subtle overlay texture */
.hero__bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
    z-index: -1;
}

.hero__particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Layer 1 - Above background, below text */
    z-index: 1;
    pointer-events: none;
}

.hero__container {
    position: relative;
    /* Layer 2 - Topmost in hero */
    z-index: 2;
}

.hero__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero__greeting {
    display: inline-block;
    color: var(--primary);
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 12px;
}

.hero__title {
    font-family: var(--font-heading);
    font-size: clamp(40px, 6vw, 72px);
    font-weight: 800;
    color: var(--text-title);
    line-height: 1.1;
    margin-bottom: 16px;
}

.hero__title span {
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__subtitle {
    font-size: 20px;
    color: var(--gray-600);
    font-weight: 500;
    margin-bottom: 20px;
}

.hero__brand {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    display: inline-block;
    position: relative;
    text-transform: uppercase;
    filter: drop-shadow(0 2px 4px rgba(37, 99, 235, 0.2));
}

.hero__brand::after {
    content: '';
    position: absolute;
    bottom: 5px;
    right: -8px;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
}

.hero__description {
    font-size: 17px;
    color: var(--gray-500);
    line-height: 1.8;
    margin-bottom: 32px;
    max-width: 500px;
}

.hero__buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
}

.hero__social {
    display: flex;
    gap: 16px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--bg-card);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-full);
    color: var(--text-light);
    font-size: 18px;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    transform: translateY(-4px);
}

.hero__image {
    display: flex;
    justify-content: center;
}

.hero__image-wrapper {
    position: relative;
    width: 400px;
    height: 400px;
}

.hero__image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 2;
}

.hero__image-decoration {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100%;
    height: 100%;
    background: var(--gradient-hero);
    border-radius: var(--radius-lg);
    z-index: 1;
    opacity: 0.3;
}

.hero__scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-down {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--gray-400);
    font-size: 14px;
    animation: bounce 2s infinite;
}

@keyframes bounce {

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

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* ==========================================
   ABOUT SECTION
   ========================================== */
.about {
    background: var(--bg-alt);
}

.about__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.about__info {
    position: relative;
    padding: 40px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: var(--transition);
    overflow: hidden;
}

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

.about__info:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.about__description {
    font-size: 17px;
    color: var(--gray-600);
    line-height: 1.8;
    margin-bottom: 20px;
}

.about__description strong {
    color: var(--text-title);
}

.about__stats {
    display: flex;
    justify-content: center;
    /* Centered single stat */
    gap: 40px;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--gray-200);
}

.stat {
    text-align: center;
    transition: transform 0.3s ease, filter 0.3s ease;
    cursor: default;
    padding: 10px;
    border-radius: var(--radius);
}

.stat:hover {
    transform: translateY(-5px) scale(1.05);
    filter: drop-shadow(0 4px 6px rgba(37, 99, 235, 0.2));
}

.stat__number {
    display: block;
    font-family: var(--font-heading);
    font-size: 42px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.stat__label {
    font-size: 14px;
    color: var(--gray-500);
    margin-top: 8px;
}

.about__skills-title {
    font-family: var(--font-heading);
    font-size: 24px;
    color: var(--text-title);
    margin-bottom: 24px;
}

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

.skill {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
    flex-direction: column;
}

.skill:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.skill i {
    font-size: 24px;
    color: var(--primary);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.1);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.skill-info {
    width: 100%;
}

.skill span {
    display: block;
    font-weight: 600;
    color: var(--text-title);
    margin-bottom: 4px;
    font-size: 16px;
}

.skill-description {
    font-size: 14px;
    color: var(--gray-500);
    line-height: 1.5;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease-out;
    margin-top: 0;
}

.skill.active {
    background: var(--white);
    border: 1px solid var(--primary);
    box-shadow: var(--shadow-md);
}

.skill.active .skill-description {
    max-height: 200px;
    /* Arbitrary large height for transition */
    opacity: 1;
    margin-top: 8px;
}

/* ==========================================
   SERVICES SECTION
   ========================================== */
.services__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--bg-card);
    padding: 40px 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--gray-100);
    /* Additions for anchor tag behavior */
    display: block;
    text-decoration: none;
    color: inherit;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.service-card__icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    font-size: 32px;
    color: var(--white);
}

.service-card__title {
    font-family: var(--font-heading);
    font-size: 22px;
    color: var(--text-title);
    margin-bottom: 16px;
}

.service-card__description {
    color: var(--gray-500);
    line-height: 1.7;
}

/* ==========================================
   BLOG SECTION
   ========================================== */
.blog {
    background: var(--bg-alt);
}

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

.blog-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.blog-card__image {
    position: relative;
    height: 200px;
    background: var(--gradient-dark);
}

.blog-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: rgba(255, 255, 255, 0.3);
}

.blog-card__category {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 14px;
    background: var(--primary);
    color: var(--white);
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.blog-card__content {
    padding: 24px;
}

.blog-card__meta {
    display: flex;
    gap: 20px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--gray-400);
}

.blog-card__meta i {
    margin-right: 6px;
}

.blog-card__title {
    font-family: var(--font-heading);
    font-size: 20px;
    color: var(--text-title);
    margin-bottom: 12px;
    line-height: 1.4;
}

.blog-card__excerpt {
    color: var(--gray-500);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 16px;
}

.blog-card__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 600;
    font-size: 15px;
}

.blog-card__link:hover {
    gap: 12px;
}

/* ==========================================
   CONTACT SECTION
   ========================================== */
.contact__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact__info-title {
    font-family: var(--font-heading);
    font-size: 28px;
    color: var(--text-title);
    margin-bottom: 16px;
}

.contact__info-description {
    color: var(--gray-500);
    margin-bottom: 32px;
    line-height: 1.7;
}

.contact__details {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 32px;
}

.contact__item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.contact__item-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.1);
    border-radius: var(--radius);
    color: var(--primary);
    font-size: 22px;
}

.contact__item-label {
    display: block;
    font-size: 13px;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.contact__item-value {
    color: var(--text-main);
    font-weight: 500;
}

.contact__item-value:hover {
    color: var(--primary);
}

.contact__social {
    display: flex;
    align-items: center;
    gap: 16px;
}

.contact__social>span {
    color: var(--gray-500);
}

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

.contact__social-links a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    color: var(--gray-600);
    transition: var(--transition);
}

.contact__social-links a:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-3px);
}

/* Contact Form */
.contact__form {
    background: var(--bg-card);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

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

.form__input {
    width: 100%;
    padding: 16px 20px;
    font-family: var(--font-primary);
    font-size: 15px;
    color: var(--text-main);
    background: var(--bg-alt);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    outline: none;
    transition: var(--transition);
}

.form__input:focus {
    border-color: var(--primary);
    background: var(--white);
}

.form__input::placeholder {
    color: var(--gray-400);
}

.form__label {
    display: none;
}

.form__textarea {
    min-height: 150px;
    resize: vertical;
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 80px 0 30px;
}

.footer__content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer__logo {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    display: inline-block;
}

.footer__logo .logo-text {
    color: var(--white);
}

.footer__description {
    color: var(--gray-400);
    line-height: 1.7;
    max-width: 300px;
}

.footer__links h4,
.footer__social h4 {
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 18px;
    margin-bottom: 24px;
}

.footer__links ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer__links a {
    color: var(--gray-400);
    transition: var(--transition);
}

.footer__links a:hover {
    color: var(--primary-light);
    padding-left: 8px;
}

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

.footer__social-links a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-800);
    border-radius: var(--radius-full);
    color: var(--gray-400);
    transition: var(--transition);
}

.footer__social-links a:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-3px);
}

.footer__bottom {
    padding-top: 30px;
    border-top: 1px solid var(--gray-800);
    text-align: center;
    color: var(--gray-500);
    font-size: 14px;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

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

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

/* WhatsApp Button */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 999;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    background-color: #20bd5a;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Hero Particles */
.hero__particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* Behind content but above background */
    pointer-events: none;
    /* Let clicks pass through */
}


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

    .hero__text {
        order: 2;
    }

    .hero__image {
        order: 1;
    }

    .hero__description {
        margin: 0 auto 32px;
    }

    .hero__buttons {
        justify-content: center;
    }

    .hero__social {
        justify-content: center;
    }

    .hero__bg {
        width: 100%;
        height: 50%;
        clip-path: polygon(0 0, 100% 0, 100% 80%, 0% 100%);
    }

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

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

    .footer__content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer__description {
        margin: 0 auto;
    }

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

@media (max-width: 768px) {
    .nav__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--white);
        box-shadow: var(--shadow-xl);
        padding: 100px 40px;
        transition: var(--transition);
    }

    .nav__menu.show-menu {
        right: 0;
    }

    .nav__list {
        flex-direction: column;
        gap: 24px;
    }

    .nav__link {
        font-size: 20px;
    }

    .nav__toggle,
    .nav__close {
        display: block;
    }

    .nav__close {
        position: absolute;
        top: 24px;
        right: 24px;
    }

    .hero__image-wrapper {
        width: 280px;
        height: 280px;
    }

    .hero__buttons {
        flex-direction: column;
    }

    .about__stats {
        flex-direction: column;
        gap: 24px;
    }

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

    .section {
        padding: 70px 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .contact__form {
        padding: 24px;
    }

    .hero__scroll {
        display: none;
    }
}

/* Developer Signature */
.dev-signature {
    margin-top: 2rem;
    text-align: center;
    display: flex;
    justify-content: center;
}

.dev-signature a {
    font-size: 0.8rem;
    color: var(--gray-400);
    text-decoration: none;
    background: rgba(15, 23, 42, 0.6);
    /* Semi-transparent dark bg */
    padding: 8px 16px;
    border-radius: 50px;
    /* Pill shape */
    border: 1px solid rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.dev-signature a i {
    color: var(--primary);
    font-size: 0.9rem;
}

.dev-signature a strong {
    color: var(--gray-300);
    font-weight: 600;
}

.dev-signature a:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.2);
}

.dev-signature a:hover strong {
    color: var(--white);
}

.dev-signature a:hover i {
    transform: rotate(360deg);
    transition: transform 0.6s ease;
}

/* Light mode adjustment if applicable (using general override structure if needed, but variables handle most) */
body.light-mode .dev-signature a {
    color: var(--gray-400);
}

/* Contact Form Validation */
.form__input.valid {
    border-color: #10b981;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2310b981' width='18px' height='18px'%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.form__input.invalid {
    border-color: #ef4444;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ef4444' width='18px' height='18px'%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.validation-message {
    font-size: 12px;
    color: #ef4444;
    margin-top: 4px;
    display: none;
}

.form__input.invalid+.form__label+.validation-message {
    display: block;
}

/* WhatsApp Button in Form */
.btn--whatsapp {
    background: #25D366;
    color: white;
    border-color: #25D366;
    margin-top: 10px;
}

.btn--whatsapp:hover {
    background: #128C7E;
    color: white;
    border-color: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
}

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


/* ==========================================
   PRELOADER
   ========================================== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-body);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

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

.preloader__content {
    text-align: center;
}

.preloader__logo {
    font-size: 32px;
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.preloader__bar {
    width: 200px;
    height: 4px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin: 0 auto;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.2s forwards;
}

.preloader__progress {
    width: 0%;
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    animation: progress 1.5s ease-in-out forwards;
}

@keyframes progress {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}

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

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

/* ==========================================
   GLASSMORPHISM & 3D EFFECTS
   ========================================== */
/* Glassmorphism Utilities */
.glass {
    background: var(--glass-bg);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* Apply Glassmorphism to specific components */
.service-card,
.blog-card,
.skill,
.about__info {
    position: relative;
    /* Essential for tilt effect glare positioning */
    overflow: hidden;
    /* Essential to contain glare */
    background: var(--glass-bg);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
    transition: var(--transition);
}

/* Refined Hover States for Glass Cards */
.service-card:hover,
.blog-card:hover,
.skill:hover {
    background: rgba(255, 255, 255, 0.85);
    /* Slightly more opaque on hover */
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-neon);
    /* Neon glow effect */
    transform: translateY(-5px) scale(1.02);
}

/* Dark Mode Adjustments */
body.dark-mode .service-card:hover,
body.dark-mode .blog-card:hover,
body.dark-mode .skill:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
}

/* 3D Tilt Effect Classes */
.tilt-card {
    transition: transform 0.1s ease;
    /* Fast transition for smooth following */
    transform-style: preserve-3d;
    perspective: 1000px;
}

.tilt-card-content {
    transform: translateZ(30px);
    /* Lift content off the card */
}

.tilt-card-glare {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(125deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    mix-blend-mode: overlay;
    border-radius: inherit;
    /* Match card border radius */
}

.tilt-card:hover .tilt-card-glare {

    opacity: 1;
}

/* ==========================================
   INTERNAL SERVICE PAGES
   ========================================== */
.service-hero {
    padding: 120px 0 80px;
    background: var(--bg-alt);
    text-align: center;
}

.service-hero .section__subtitle {
    max-width: 600px;
    margin: 0 auto;
}

.service-content {
    padding: 80px 0;
}

.about__info h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--text-title);
}

.feature-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.feature-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-list i {
    color: var(--primary);
}

.service-cta {
    margin-top: 40px;
}

/* ==========================================
   LIGHTBOX MODAL
   ========================================== */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0, 0, 0);
    background-color: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    max-height: 80vh;
    object-fit: contain;
    animation-name: zoom;
    animation-duration: 0.3s;
}

@keyframes zoom {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
}

#lightbox-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
}

.lightbox-trigger {
    cursor: pointer;
    transition: 0.3s;
}

.lightbox-trigger:hover {
    opacity: 0.9;
}

/* Responsiveness */
@media only screen and (max-width: 700px) {
    .lightbox-content {
        width: 100%;
    }
}