/* ==========================================================================
   DESIGN SYSTEM & CORE ROOT DEFINITIONS
   ========================================================================== */
:root {
    /* Dynamic Theme Accent Hue (Configurable via customizer) */
    --accent-hue: 225; /* Default: Cosmic Indigo */
    
    /* Core Accent Derivatives */
    --accent: hsl(var(--accent-hue), 100%, 60%);
    --accent-hover: hsl(var(--accent-hue), 100%, 52%);
    --accent-light: hsl(var(--accent-hue), 100%, 75%);
    --accent-rgb: 43, 86, 255;
    --accent-bg: hsla(var(--accent-hue), 100%, 60%, 0.12);
    --accent-bg-hover: hsla(var(--accent-hue), 100%, 60%, 0.2);
    
    /* Theme Mode Dependent Colors (Dark Mode Default) */
    --bg: #090b11;
    --bg-panel: rgba(16, 20, 35, 0.6);
    --text: #e2e8f0;
    --text-muted: #8a99ad;
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --glass-bg: rgba(16, 20, 35, 0.45);
    --glass-blur: blur(14px);
    --shadow: rgba(0, 0, 0, 0.4);
    --shadow-glow: rgba(var(--accent-rgb), 0.25);
    --input-bg: rgba(255, 255, 255, 0.02);
    
    /* Constants */
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme Variables Override */
.light-theme {
    --bg: #f5f7fb;
    --bg-panel: rgba(255, 255, 255, 0.85);
    --text: #0f172a;
    --text-muted: #57657a;
    --border: rgba(15, 23, 42, 0.06);
    --border-hover: rgba(15, 23, 42, 0.12);
    --glass-bg: rgba(255, 255, 255, 0.65);
    --shadow: rgba(15, 23, 42, 0.06);
    --shadow-glow: hsla(var(--accent-hue), 100%, 60%, 0.15);
    --input-bg: rgba(15, 23, 42, 0.01);
}

/* ==========================================================================
   RESET & SYSTEM STYLES
   ========================================================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-slow), color var(--transition-slow);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: 5px;
    border: 2px solid var(--bg);
}

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

/* General Layout Utilities */
section {
    padding: 100px 24px;
    position: relative;
    z-index: 2;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
}

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

.subtitle-badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--accent-bg);
    color: var(--accent);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
}

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

.section-divider {
    width: 60px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
    margin: 20px auto 0;
}

/* Glassmorphism Generic Card Styling */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-md);
    box-shadow: 0 10px 30px var(--shadow);
    padding: 40px;
    transition: border-color var(--transition-medium), box-shadow var(--transition-medium), transform var(--transition-medium);
}

.glass-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 15px 40px var(--shadow-glow);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 4px 15px var(--shadow-glow);
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 6px 20px var(--shadow-glow);
}

.btn-secondary {
    background: var(--accent-bg);
    color: var(--accent);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--accent-bg-hover);
    border-color: var(--accent);
}

/* Hidden Utility */
.hidden {
    display: none !important;
}

/* ==========================================================================
   VISUAL ASSETS & CANVAS SCROLLER
   ========================================================================== */
#scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(to right, var(--accent), var(--accent-light));
    width: 0%;
    z-index: 1000;
    transition: width 0.1s ease-out;
}

#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
}

/* ==========================================================================
   THEME CUSTOMIZATION DRAWER
   ========================================================================== */
.customizer-panel {
    position: fixed;
    top: 100px;
    right: -260px;
    width: 260px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-right: none;
    border-radius: var(--border-radius-md) 0 0 var(--border-radius-md);
    box-shadow: 0 10px 40px var(--shadow);
    padding: 24px;
    z-index: 999;
    transition: right var(--transition-medium);
}

.customizer-panel.active {
    right: 0;
}

.customizer-toggle {
    position: absolute;
    left: -48px;
    top: 20px;
    width: 48px;
    height: 48px;
    background: var(--glass-bg);
    border: 1px solid var(--border);
    border-right: none;
    border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: -4px 4px 15px var(--shadow);
}

.customizer-icon {
    width: 20px;
    height: 20px;
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

.customizer-content h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}

.customizer-section {
    margin-bottom: 20px;
}

.customizer-section span {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.theme-mode-switch {
    display: flex;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    padding: 2px;
}

.mode-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.mode-btn.active {
    background: var(--accent);
    color: #ffffff;
}

.accent-color-options {
    display: flex;
    gap: 8px;
}

.color-option {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    position: relative;
    transition: transform var(--transition-fast);
}

.color-option.active {
    border-color: var(--text);
    transform: scale(1.1);
}

/* ==========================================================================
   NAVIGATION HEADER
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 76px;
    z-index: 900;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: background-color var(--transition-medium), border-color var(--transition-medium), height var(--transition-medium);
}

.navbar.scrolled {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-color: var(--border);
    height: 68px;
    box-shadow: 0 4px 20px var(--shadow);
}

.nav-container {
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
}

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

.logo-text {
    margin: 0 2px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    transition: color var(--transition-fast);
}

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

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

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

.nav-cta {
    background: var(--accent-bg);
    color: var(--accent) !important;
    border: 1px solid var(--border);
    padding: 8px 18px;
    border-radius: var(--border-radius-sm);
    transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.nav-cta::after {
    display: none;
}

.nav-cta:hover {
    background: var(--accent-bg-hover);
    border-color: var(--accent);
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 951;
}

.hamburger-menu span {
    width: 100%;
    height: 2px;
    background-color: var(--text);
    border-radius: 2px;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--accent-bg);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 24px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent);
    border-radius: 50%;
    position: relative;
}

.badge-dot::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--accent);
    border-radius: 50%;
    animation: ping 1.5s infinite;
}

@keyframes ping {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(2.5); opacity: 0; }
}

.hero-greeting {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 12px;
}

.hero-subtitle {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.typing-text {
    color: var(--accent);
}

.cursor-pipe {
    animation: blink 0.8s infinite;
    font-weight: 300;
    color: var(--accent);
}

@keyframes blink {
    50% { opacity: 0; }
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 580px;
    margin-bottom: 36px;
}

.hero-cta-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--input-bg);
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: transform var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.social-link svg {
    width: 18px;
    height: 18px;
}

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

/* Avatar Card 3D Setup */
.hero-visual-content {
    display: flex;
    justify-content: center;
    perspective: 1000px;
}

.avatar-card-wrapper {
    width: 320px;
    height: 380px;
    transform-style: preserve-3d;
    transition: transform var(--transition-medium);
}

.avatar-card {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: var(--border-radius-lg);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    box-shadow: 0 20px 50px var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    transform-style: preserve-3d;
}

.avatar-glow {
    position: absolute;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    opacity: 0.15;
    z-index: 1;
    pointer-events: none;
    border-radius: 50%;
    filter: blur(20px);
}

.avatar-border {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    box-shadow: 0 10px 30px var(--shadow-glow);
    z-index: 2;
    transform: translateZ(30px);
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    background-color: var(--bg);
}

.avatar-tag {
    position: absolute;
    padding: 8px 14px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 4px 15px var(--shadow);
    z-index: 3;
    transform: translateZ(50px);
}

.code-tag {
    top: 50px;
    left: -20px;
    color: var(--accent);
}

.design-tag {
    bottom: 50px;
    right: -20px;
    color: var(--accent-light);
}

.scroll-down-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.scroll-down-indicator:hover {
    color: var(--text);
}

.mouse-wheel {
    width: 22px;
    height: 36px;
    border: 2px solid var(--text-muted);
    border-radius: 12px;
    position: relative;
}

.mouse-wheel::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 6px;
    width: 4px;
    height: 8px;
    background-color: var(--accent);
    border-radius: 2px;
    animation: scrollMouse 1.8s infinite;
}

@keyframes scrollMouse {
    0% { top: 6px; opacity: 1; }
    80% { top: 16px; opacity: 0; }
    100% { top: 6px; opacity: 0; }
}

.mouse-label {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ==========================================================================
   ABOUT & STATS SECTION
   ========================================================================== */
.about-content {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 30px;
}

.about-main-card h3 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.about-main-card p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.stats-counter-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 36px;
}

.stat-item {
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    padding: 20px;
    text-align: center;
    transition: border-color var(--transition-fast);
}

.stat-item:hover {
    border-color: var(--accent);
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
}

.stat-plus {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Skills Panel CSS */
.skills-dashboard h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.skills-categories-tabs {
    display: flex;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    padding: 4px;
    margin-bottom: 30px;
}

.skill-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 10px;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.skill-tab.active {
    background: var(--accent);
    color: #ffffff;
}

.skills-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.skill-bar-wrapper {
    transition: opacity var(--transition-fast);
}

.skill-label-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.skill-pct {
    color: var(--accent);
    font-weight: 600;
}

.skill-track {
    width: 100%;
    height: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50px;
    overflow: hidden;
}

.skill-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(to right, var(--accent), var(--accent-light));
    border-radius: 50px;
    transition: width 1.2s cubic-bezier(0.1, 1, 0.1, 1);
}

/* ==========================================================================
   EXPERIENCE TIMELINE SECTION
   ========================================================================== */
.timeline-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0;
}

.timeline-line {
    position: absolute;
    left: 30px;
    top: 0;
    width: 2px;
    height: 100%;
    background: var(--border-hover);
}

.timeline-item {
    position: relative;
    padding-left: 70px;
    margin-bottom: 40px;
}

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

.timeline-marker {
    position: absolute;
    left: 21px;
    top: 24px;
    width: 20px;
    height: 20px;
    background: var(--bg);
    border: 3px solid var(--accent);
    border-radius: 50%;
    z-index: 5;
    transition: transform var(--transition-fast);
}

.marker-pulse {
    position: absolute;
    top: -5px;
    left: -5px;
    width: 24px;
    height: 24px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    opacity: 0;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.timeline-item:hover .timeline-marker {
    transform: scale(1.2);
}

.timeline-item:hover .marker-pulse {
    transform: scale(1.4);
    opacity: 0.4;
}

.timeline-content {
    padding: 30px !important;
}

.timeline-header {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.timeline-date {
    display: inline-block;
    padding: 4px 10px;
    background: var(--accent-bg);
    color: var(--accent);
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.timeline-header h4 {
    grid-column: 1 / 3;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
}

.company-label {
    grid-column: 1 / 3;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.timeline-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.timeline-highlights-toggle {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    cursor: pointer;
    margin-bottom: 16px;
    user-select: none;
}

.timeline-highlights-toggle:hover {
    text-decoration: underline;
}

.timeline-highlights {
    list-style-type: none;
    margin-bottom: 16px;
    padding-left: 4px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity var(--transition-fast);
}

.timeline-highlights.expanded {
    max-height: 250px;
    opacity: 1;
}

.timeline-highlights li {
    font-size: 0.85rem;
    color: var(--text-muted);
    position: relative;
    padding-left: 16px;
}

.timeline-highlights li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tag {
    padding: 4px 10px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.timeline-item:hover .tech-tag {
    border-color: var(--border-hover);
    color: var(--text);
}

/* ==========================================================================
   PROJECTS & SHOWCASE SECTION
   ========================================================================== */
.projects-filter-bar {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 44px;
}

.filter-btn {
    background: var(--glass-bg);
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.filter-btn:hover, .filter-btn.active {
    background: var(--accent-bg);
    border-color: var(--accent);
    color: var(--text);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.project-card-wrapper {
    transition: transform var(--transition-medium), opacity var(--transition-medium);
}

.project-card {
    padding: 0 !important;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-img-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: var(--bg);
}

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

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(var(--accent-rgb), 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-medium);
}

.project-action-links {
    display: flex;
    gap: 16px;
    transform: translateY(20px);
    transition: transform var(--transition-medium);
}

.proj-link-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ffffff;
    color: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.proj-link-icon:hover {
    transform: scale(1.1);
    background: var(--accent-light);
}

.proj-link-icon svg {
    width: 20px;
    height: 20px;
}

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

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

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

.project-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-badge {
    display: inline-block;
    align-self: flex-start;
    padding: 2px 8px;
    background: var(--accent-bg);
    color: var(--accent);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.project-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.project-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    flex-grow: 1;
}

.project-tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.project-tech-tags span {
    font-size: 0.7rem;
    color: var(--text-muted);
    background: var(--input-bg);
    border: 1px solid var(--border);
    padding: 2px 8px;
    border-radius: 4px;
}

/* ==========================================================================
   SERVICES SECTION
   ========================================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    text-align: center;
}

.service-icon-box {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius-sm);
    background: var(--accent-bg);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    border: 1px solid var(--border);
    transition: transform var(--transition-fast);
}

.service-icon-box svg {
    width: 26px;
    height: 26px;
}

.service-card:hover .service-icon-box {
    transform: scale(1.1) rotate(5deg);
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 4px 15px var(--shadow-glow);
}

.service-card h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.service-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ==========================================================================
   INTERACTIVE CONTACT SECTION
   ========================================================================== */
.contact-layout {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 30px;
    align-items: stretch;
}

.contact-info-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.contact-info-panel h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.contact-info-panel p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.contact-details-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 30px;
}

.contact-item-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    padding: 16px;
    border-radius: var(--border-radius-sm);
}

.item-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent-bg);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.item-icon-box svg {
    width: 18px;
    height: 18px;
}

.item-text span {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.item-text a, .item-text p {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
}

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

/* Coding terminal visual */
.contact-terminal {
    padding: 20px !important;
    background: #05060b !important;
    border-radius: var(--border-radius-sm);
}

.terminal-dots {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot.red { background-color: #ef4444; }
.dot.yellow { background-color: #eab308; }
.dot.green { background-color: #22c55e; }

.terminal-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
}

.t-accent { color: #f472b6; }
.t-string { color: #34d399; }
.t-keyword { color: #60a5fa; }

/* Contact Form Input Visuals */
.contact-form-panel {
    position: relative;
}

.contact-form-panel h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 24px;
}

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

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

.form-group input, .form-group textarea {
    width: 100%;
    padding: 14px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.form-group textarea {
    resize: none;
}

/* Floating Label Magic */
.form-group label {
    position: absolute;
    left: 14px;
    top: 14px;
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: transform var(--transition-fast), font-size var(--transition-fast), color var(--transition-fast), background-color var(--transition-fast);
    pointer-events: none;
}

.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
    transform: translateY(-22px) scale(0.8);
    left: 10px;
    padding: 0 4px;
    color: var(--accent);
    background-color: var(--bg); /* Blends background */
    border-radius: 4px;
}

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

.input-focus-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition-medium);
}

.form-group input:focus ~ .input-focus-line,
.form-group textarea:focus ~ .input-focus-line {
    width: 100%;
}

.error-msg {
    position: absolute;
    bottom: -18px;
    left: 4px;
    font-size: 0.75rem;
    color: #ef4444;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.form-group.invalid input, .form-group.invalid textarea {
    border-color: #ef4444;
}

.form-group.invalid .error-msg {
    opacity: 1;
}

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

/* SUCCESS CARD PANEL OVERLAY */
.success-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--border-radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
    transition: opacity var(--transition-medium), transform var(--transition-medium);
}

.success-card:not(.hidden) {
    opacity: 1;
    pointer-events: all;
    transform: scale(1);
}

.success-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.checkmark {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    stroke-width: 2;
    stroke: #22c55e;
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px #22c55e;
    animation: fillCheckmark .4s ease-in-out .4s forwards, scaleCheckmark .3s ease-in-out .9s alternate forwards;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #22c55e;
    fill: none;
    animation: strokeCircle 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke-width: 3;
    animation: strokeCheck 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

@keyframes strokeCircle {
    100% { stroke-dashoffset: 0; }
}

@keyframes strokeCheck {
    100% { stroke-dashoffset: 0; }
}

@keyframes fillCheckmark {
    100% { box-shadow: inset 0px 0px 0px 30px rgba(34, 197, 94, 0.1); }
}

@keyframes scaleCheckmark {
    0% { transform: none; }
    50% { transform: scale3d(1.1, 1.1, 1); }
    100% { transform: scale3d(1, 1, 1); }
}

.success-card h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.success-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
    max-width: 320px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
    border-top: 1px solid var(--border);
    padding: 30px 24px;
    background: var(--bg);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

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

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: var(--font-heading);
    font-weight: 500;
    transition: color var(--transition-fast);
}

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

.scroll-top-btn {
    position: absolute;
    right: 0;
    top: -66px;
    width: 44px;
    height: 44px;
    border-radius: var(--border-radius-sm);
    background: var(--glass-bg);
    border: 1px solid var(--border);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--shadow);
    transition: transform var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.scroll-top-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-4px);
}

/* ==========================================================================
   SCROLL TRIGGERS & OTHER REVEALS
   ========================================================================== */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ==========================================================================
   RESPONSIVE LAYOUT BREAKPOINTS
   ========================================================================== */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 60px;
        text-align: center;
    }
    
    .hero-badge, .hero-cta-buttons, .social-links {
        justify-content: center;
    }
    
    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 50px;
    }
}

@media (max-width: 768px) {
    section {
        padding: 60px 16px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .navbar {
        height: 68px;
    }
    
    .hamburger-menu {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 68px;
        left: 0;
        width: 100%;
        height: calc(100vh - 68px);
        background: var(--bg);
        border-top: 1px solid var(--border);
        flex-direction: column;
        justify-content: center;
        gap: 40px;
        padding-bottom: 80px;
        transform: translateX(100%);
        transition: transform var(--transition-medium);
        z-index: 950;
    }
    
    .nav-links.active {
        transform: translateX(0);
    }
    
    .nav-link {
        font-size: 1.2rem;
    }
    
    .hamburger-menu.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger-menu.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger-menu.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .hero-greeting {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.4rem;
        justify-content: center;
    }
    
    .projects-filter-bar {
        flex-wrap: wrap;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .form-group-row {
        grid-template-columns: 1fr;
    }
    
    .footer-container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .scroll-top-btn {
        position: relative;
        top: 0;
        right: 0;
        margin: 10px auto 0;
    }
}

/* ==========================================================================
   FLOATING WHATSAPP WIDGET
   ========================================================================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.3), 
                0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    text-decoration: none;
    z-index: 999;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                box-shadow 0.3s ease;
}

.whatsapp-float::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    z-index: -1;
    opacity: 0.4;
    animation: wa-pulse 2s infinite;
}

@keyframes wa-pulse {
    0% {
        transform: scale(1);
        opacity: 0.4;
    }
    50% {
        transform: scale(1.4);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

.whatsapp-float:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 12px 30px rgba(37, 211, 102, 0.5), 
                0 0 0 2px rgba(255, 255, 255, 0.2) inset;
    color: #ffffff;
}

.whatsapp-icon {
    width: 30px;
    height: 30px;
}

/* Tooltip style */
.whatsapp-tooltip {
    position: absolute;
    left: 75px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 16px;
    border-radius: var(--border-radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 15px var(--shadow);
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    transform: translateX(0);
}

/* Responsive adjustment */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        left: 20px;
        width: 50px;
        height: 50px;
    }
    
    .whatsapp-icon {
        width: 25px;
        height: 25px;
    }
    
    .whatsapp-tooltip {
        display: none; /* Hide tooltip on mobile to avoid screen overlap */
    }
}
