/* ============================================
   Crearzo — Branding & Design Studio
   Professional Stylesheet with Dark/Light Theme
   ============================================ */

/* --- Custom Properties: Dark Theme (Default) --- */
:root {
    --bg-primary: #09090b;
    --bg-secondary: #111114;
    --bg-tertiary: #18181b;
    --bg-card: #16161e;
    --bg-card-hover: #1e1e2a;
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --accent: #a855f7;
    --accent-rgb: 168, 85, 247;
    --accent-hover: #9333ea;
    --accent-light: rgba(168, 85, 247, 0.1);
    --gradient: linear-gradient(135deg, #a855f7, #ec4899);
    --gradient-text: linear-gradient(135deg, #c084fc 0%, #f472b6 50%, #fb923c 100%);
    --border-color: rgba(255, 255, 255, 0.06);
    --border-color-hover: rgba(255, 255, 255, 0.14);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 60px rgba(168, 85, 247, 0.12);
    --glass-bg: rgba(14, 14, 18, 0.88);
    --glass-border: rgba(255, 255, 255, 0.08);
    --nav-height: 72px;
    --section-gap: 120px;
    --container-max: 1200px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-full: 9999px;
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* --- Light Theme Override --- */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f7f7f9;
    --bg-tertiary: #ededf0;
    --bg-card: #ffffff;
    --bg-card-hover: #f5f3ff;
    --text-primary: #09090b;
    --text-secondary: #52525b;
    --text-muted: #a1a1aa;
    --accent: #9333ea;
    --accent-rgb: 147, 51, 234;
    --accent-hover: #7e22ce;
    --accent-light: rgba(147, 51, 234, 0.07);
    --gradient: linear-gradient(135deg, #9333ea, #db2777);
    --gradient-text: linear-gradient(135deg, #7e22ce 0%, #be185d 50%, #c2410c 100%);
    --border-color: rgba(0, 0, 0, 0.07);
    --border-color-hover: rgba(0, 0, 0, 0.14);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 60px rgba(147, 51, 234, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.88);
    --glass-border: rgba(0, 0, 0, 0.06);
}

/* ============================================
   BASE / RESET
   ============================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    transition: background-color var(--transition-slow), color var(--transition-slow);
}

img { display: block; max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; transition: color var(--transition-fast); }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }

::selection {
    background-color: rgba(var(--accent-rgb), 0.3);
    color: var(--text-primary);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
.section-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent);
    margin-bottom: 14px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
}

.section-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   LAYOUT UTILITIES
   ============================================ */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: var(--section-gap) 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 4px 20px rgba(var(--accent-rgb), 0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(var(--accent-rgb), 0.45);
}

.btn-outline {
    border: 1.5px solid var(--border-color-hover);
    color: var(--text-primary);
    background: transparent;
}
.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

.btn-lg { padding: 16px 40px; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }

/* ============================================
   PRELOADER
   ============================================ */
#preloader {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
#preloader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader {
    text-align: center;
}

.loader-logo {
    height: 120px;
    width: auto;
    display: block;
    margin: 0 auto 24px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    filter: drop-shadow(0 0 30px rgba(var(--accent-rgb), 0.3));
    animation: loaderPulse 2s ease-in-out infinite;
}
@keyframes loaderPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.03); }
}

.loader-tagline {
    display: block;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease 0.3s both;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.loader-bar {
    width: 160px;
    height: 3px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
}
.loader-bar::after {
    content: '';
    position: absolute;
    left: -40%;
    width: 40%;
    height: 100%;
    background: var(--gradient);
    border-radius: 4px;
    animation: loaderSlide 1s ease-in-out infinite;
}
@keyframes loaderSlide {
    0% { left: -40%; }
    100% { left: 100%; }
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb {
    background: rgba(var(--accent-rgb), 0.35);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(var(--accent-rgb), 0.55); }

/* ============================================
   NAVIGATION
   ============================================ */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1000;
    transition: all var(--transition-base);
}

#navbar.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo { display: flex; align-items: center; }

.nav-logo-img {
    height: 52px;
    width: auto;
    object-fit: contain;
    border-radius: 6px;
    transition: transform var(--transition-fast);
}
.nav-logo-img:hover {
    transform: scale(1.05);
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 8px 18px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
    position: relative;
}
.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}
.nav-link.active {
    background: var(--accent-light);
    color: var(--accent);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    border: 1px solid var(--border-color);
}
.theme-toggle:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-light);
}

[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

.nav-cta {
    padding: 10px 24px;
    background: var(--gradient);
    color: #fff;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.88rem;
    transition: all var(--transition-base);
    box-shadow: 0 2px 12px rgba(var(--accent-rgb), 0.25);
}
.nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(var(--accent-rgb), 0.4);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    z-index: 1001;
}
.hamburger span {
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-base);
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: calc(var(--nav-height) + 40px) 0 60px;
}

.hero-bg-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.12;
}
[data-theme="light"] .shape { opacity: 0.08; }

.shape-1 {
    width: 600px; height: 600px;
    background: #a855f7;
    top: -20%; right: -10%;
    animation: floatShape 20s ease-in-out infinite;
}
.shape-2 {
    width: 500px; height: 500px;
    background: #ec4899;
    bottom: -10%; left: -10%;
    animation: floatShape 25s ease-in-out infinite reverse;
}
.shape-3 {
    width: 400px; height: 400px;
    background: #6366f1;
    top: 30%; left: 40%;
    animation: floatShape 18s ease-in-out infinite 5s;
}

@keyframes floatShape {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.05); }
    50% { transform: translate(-20px, 30px) scale(0.95); }
    75% { transform: translate(40px, 20px) scale(1.03); }
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    padding: 8px 24px;
    border: 1px solid var(--border-color-hover);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 32px;
    background: var(--accent-light);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 24px;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 64px;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-plus {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-label {
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 4px;
    letter-spacing: 0.5px;
}
.stat-divider {
    width: 1px;
    height: 48px;
    background: var(--border-color-hover);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    animation: fadeInUp 1s ease 1.2s both;
}
.mouse {
    width: 24px; height: 38px;
    border: 2px solid var(--text-muted);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}
.wheel {
    width: 3px; height: 8px;
    background: var(--accent);
    border-radius: 2px;
    animation: scrollWheel 2s ease infinite;
}
@keyframes scrollWheel {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(12px); }
}
.scroll-indicator span {
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 64px;
    align-items: center;
}

.about-image { position: relative; }

.about-img-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.about-img-wrapper:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-glow);
}
.about-img-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient);
    opacity: 0.06;
    z-index: 1;
    pointer-events: none;
}
.about-img-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 3/4;
    object-fit: cover;
}

.profile-click-hint {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: rgba(255,255,255,0.8);
    font-size: 0.78rem;
    letter-spacing: 0.5px;
    opacity: 0;
    transition: opacity var(--transition-base);
}
.about-img-wrapper:hover .profile-click-hint { opacity: 1; }

.about-experience-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: var(--gradient);
    color: #fff;
    padding: 20px 28px;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-lg);
    z-index: 2;
}
.exp-years {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    display: block;
}
.exp-text {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    display: block;
    max-width: 120px;
}

.about-content .section-title { margin-bottom: 24px; }

.about-text {
    color: var(--text-secondary);
    margin-bottom: 18px;
    font-size: 0.98rem;
}

.about-highlights {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 32px;
}

.highlight {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.highlight-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--accent);
}

.highlight strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 4px;
}
.highlight p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ============================================
   SERVICES SECTION
   ============================================ */
.services-section { background: var(--bg-secondary); }

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 24px;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 36px 30px;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base);
}
.service-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-color-hover);
    box-shadow: var(--shadow-glow);
}
.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    margin-bottom: 24px;
}

.service-card h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.service-card > p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.service-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.service-list li {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
}
.service-list li::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}

/* ============================================
   PORTFOLIO SECTION
   ============================================ */
.portfolio-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 40px;
}

.tab-btn {
    padding: 10px 24px;
    border-radius: var(--radius-full);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    background: transparent;
    transition: all var(--transition-fast);
}
.tab-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
}
.tab-btn.active {
    background: var(--gradient);
    color: #fff;
    border-color: transparent;
}

/* Portfolio Masonry Grid */
.portfolio-grid {
    columns: 4;
    column-gap: 16px;
}

.portfolio-item {
    break-inside: avoid;
    margin-bottom: 16px;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    animation: gridReveal 0.4s ease forwards;
}
.portfolio-item:nth-child(1) { animation-delay: 0s; }
.portfolio-item:nth-child(2) { animation-delay: 0.05s; }
.portfolio-item:nth-child(3) { animation-delay: 0.1s; }
.portfolio-item:nth-child(4) { animation-delay: 0.15s; }
.portfolio-item:nth-child(5) { animation-delay: 0.2s; }
.portfolio-item:nth-child(6) { animation-delay: 0.25s; }
.portfolio-item:nth-child(7) { animation-delay: 0.3s; }
.portfolio-item:nth-child(8) { animation-delay: 0.35s; }
.portfolio-item:nth-child(n+9) { animation-delay: 0.4s; }

@keyframes gridReveal {
    to { opacity: 1; transform: translateY(0); }
}

.portfolio-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.portfolio-item .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-base);
    display: flex;
    align-items: flex-end;
    padding: 20px;
}
.portfolio-item .overlay span {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    transform: translateY(10px);
    transition: transform var(--transition-base);
}

.portfolio-item:hover img { transform: scale(1.06); }
.portfolio-item:hover .overlay { opacity: 1; }
.portfolio-item:hover .overlay span { transform: translateY(0); }

/* Skeleton loading state */
.portfolio-item.skeleton {
    background: var(--bg-tertiary);
    min-height: 200px;
    animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.portfolio-load-more {
    text-align: center;
    margin-top: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.portfolio-count {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
}
.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: rgba(255,255,255,0.7);
    padding: 12px;
    border-radius: 50%;
    transition: all var(--transition-fast);
    z-index: 10;
}
.lightbox-close:hover { color: #fff; background: rgba(255,255,255,0.1); }

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.7);
    padding: 16px;
    border-radius: 50%;
    transition: all var(--transition-fast);
    z-index: 10;
}
.lightbox-nav:hover { color: #fff; background: rgba(255,255,255,0.1); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: 0 0 60px rgba(0,0,0,0.5);
    transition: opacity var(--transition-base);
}

.lightbox-caption {
    color: rgba(255,255,255,0.7);
    font-size: 0.88rem;
    margin-top: 16px;
    text-align: center;
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.5);
    font-size: 0.82rem;
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}
.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient);
    opacity: 0.03;
}

.cta-content {
    text-align: center;
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}
.cta-content h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    margin-bottom: 16px;
}
.cta-content > p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 36px;
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 48px;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}
.contact-card:hover {
    border-color: var(--accent);
    transform: translateX(4px);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-glow);
}

.contact-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
}

.contact-card h4 {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.contact-card span {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition-fast);
}
.contact-card:hover span { color: var(--accent); }

/* Contact Form */
.contact-form-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 36px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    transition: all var(--transition-fast);
    outline: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}
.form-group select {
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}
.form-group textarea { resize: vertical; min-height: 100px; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 48px 0 24px;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 6px;
}

.footer-logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
    border-radius: 6px;
}

.footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}
.footer-links a {
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}
.footer-links a:hover { color: var(--accent); }

.footer-social {
    display: flex;
    gap: 12px;
}
.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}
.footer-social a:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-light);
}

.footer-bottom {
    text-align: center;
}
.footer-bottom p {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ============================================
   FLOATING ELEMENTS
   ============================================ */
.whatsapp-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 56px;
    height: 56px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.35);
    z-index: 999;
    transition: all var(--transition-base);
    animation: whatsappPulse 3s ease-in-out infinite;
}
.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(37, 211, 102, 0.5);
}
@keyframes whatsappPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.35); }
    50% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.55), 0 0 0 12px rgba(37, 211, 102, 0.1); }
}

.back-to-top {
    position: fixed;
    bottom: 28px;
    left: 28px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all var(--transition-base);
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-light);
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
[data-animate="fade-right"] { transform: translateX(-40px); }
[data-animate="fade-left"] { transform: translateX(40px); }

[data-animate].animated {
    opacity: 1;
    transform: translate(0, 0);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet Landscape */
@media (max-width: 1024px) {
    :root { --section-gap: 90px; }

    .portfolio-grid { columns: 3; }

    .about-grid { gap: 40px; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Tablet Portrait */
@media (max-width: 768px) {
    :root { --section-gap: 72px; --nav-height: 64px; }

    .nav-logo-img { height: 44px; }
    .loader-logo { height: 96px; }
    .footer-logo-img { height: 42px; }

    /* Mobile Nav */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-primary);
        flex-direction: column;
        align-items: flex-start;
        padding: 100px 32px 40px;
        gap: 4px;
        border-left: 1px solid var(--border-color);
        transition: right var(--transition-base);
        z-index: 999;
    }
    .nav-links.active { right: 0; }
    .nav-link { width: 100%; padding: 12px 16px; font-size: 1rem; }

    .nav-cta { display: none; }
    .hamburger { display: flex; }

    /* Hero */
    .hero-title { font-size: clamp(2rem, 7vw, 3rem); }
    .hero-stats { gap: 24px; }
    .stat-number { font-size: 2rem; }
    .stat-divider { height: 36px; }
    .scroll-indicator { display: none; }

    /* About */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .about-image { max-width: 400px; margin: 0 auto; }

    /* Portfolio */
    .portfolio-grid { columns: 2; }

    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    .footer-links { justify-content: center; }
    .footer-social { justify-content: center; }
}

/* Mobile */
@media (max-width: 480px) {
    :root { --section-gap: 60px; }

    .container { padding: 0 16px; }

    .nav-logo-img { height: 38px; }
    .loader-logo { height: 72px; }
    .footer-logo-img { height: 36px; }

    .hero-actions { flex-direction: column; align-items: center; }
    .hero-actions .btn { width: 100%; justify-content: center; }

    .hero-stats { flex-direction: column; gap: 20px; }
    .stat-divider { width: 48px; height: 1px; }

    .services-grid { grid-template-columns: 1fr; }
    .portfolio-grid { columns: 2; column-gap: 10px; }
    .portfolio-item { margin-bottom: 10px; }
    .portfolio-tabs { gap: 6px; }
    .tab-btn { padding: 8px 16px; font-size: 0.8rem; }

    .contact-form-wrapper { padding: 24px 18px; }

    .about-experience-badge { bottom: -12px; right: -8px; padding: 14px 18px; }
    .exp-years { font-size: 1.5rem; }
    .exp-text { font-size: 0.65rem; }

    .lightbox-nav { display: none; }
    .cta-actions { flex-direction: column; align-items: center; }
    .cta-actions .btn { width: 100%; justify-content: center; }

    .whatsapp-float { width: 50px; height: 50px; bottom: 20px; right: 20px; }
    .back-to-top { width: 40px; height: 40px; bottom: 20px; left: 20px; }
}

/* ============================================
   PROFILE POPOVER
   ============================================ */
.profile-popover-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
}
.profile-popover-overlay.active {
    opacity: 1;
    visibility: visible;
}

.profile-popover {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    background: var(--bg-card);
    border: 1px solid var(--border-color-hover);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    max-width: 420px;
    width: 90vw;
    text-align: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
    max-height: 90vh;
    overflow-y: auto;
}
.profile-popover.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.popover-close {
    position: absolute;
    top: 14px;
    right: 14px;
    color: var(--text-muted);
    padding: 6px;
    border-radius: 50%;
    transition: all var(--transition-fast);
}
.popover-close:hover {
    color: var(--text-primary);
    background: var(--accent-light);
}

.popover-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 18px;
    border: 3px solid transparent;
    background: var(--gradient) border-box;
    background-clip: padding-box, border-box;
    background-origin: padding-box, border-box;
    box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.2);
}
.popover-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-popover h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.popover-role {
    font-size: 0.82rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 16px;
}

.popover-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.popover-services {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}
.popover-services span {
    padding: 5px 14px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.popover-cta {
    width: 100%;
    justify-content: center;
    margin-bottom: 16px;
}

.popover-socials {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.popover-socials a {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
    transition: color var(--transition-fast);
}
.popover-socials a:hover { color: var(--accent); }
.popover-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-muted);
}

@media (max-width: 480px) {
    .profile-popover {
        padding: 32px 20px;
        width: 94vw;
    }
    .popover-photo { width: 80px; height: 80px; }
    .profile-popover h3 { font-size: 1.2rem; }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}
