/* =======================================================
   1. CSS VARIABLES (DARK & LIGHT MODE)
   ======================================================= */
:root {
    /* Base Colors (Electric Indigo) */
    --hue: 250;
    --primary-color: hsl(var(--hue), 80%, 65%);
    --primary-color-hover: hsl(var(--hue), 80%, 55%);
    --gradient-1: linear-gradient(135deg, hsl(250, 80%, 65%), hsl(290, 80%, 65%));
    
    /* Default Dark Theme */
    --bg-main: #0a0a0c;
    --bg-secondary: #141418;
    --text-main: #ffffff;
    --text-muted: #9ca3af;
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(10, 10, 12, 0.7);
    
    /* Utilities */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 12px;
}

[data-theme="light"] {
    --bg-main: #ffffff;
    --bg-secondary: #f3f4f6;
    --text-main: #111827;
    --text-muted: #4b5563;
    --border-color: rgba(0, 0, 0, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.7);
}

/* =======================================================
   2. RESET & BASE SETUP
   ======================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    cursor: none; /* Hide default cursor globally */
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

a, button, input, textarea {
    cursor: none; /* Ensure interactive elements hide cursor */
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 100px 0;
}

/* =======================================================
   3. CUSTOM UI ELEMENTS (Cursor, Loader, Progress)
   ======================================================= */
.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
}

.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9998;
    /* ONLY transition the visual size, NEVER transition left/top/transform */
    transition: width 0.2s ease-in-out, height 0.2s ease-in-out, background-color 0.2s ease-in-out;
}

.loader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--bg-main);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease;
}

.loader-spinner {
    width: 50px; height: 50px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.scroll-progress-container {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 3px;
    background: transparent;
    z-index: 1000;
}

.scroll-progress-bar {
    height: 100%;
    background: var(--gradient-1);
    width: 0%;
}

/* =======================================================
   4. NAVIGATION BAR (Glassmorphism)
   ======================================================= */
.header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(12px); 
    border-bottom: 1px solid var(--border-color);
    z-index: 900;
    transition: var(--transition);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

#theme-toggle {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.2rem;
}

.hamburger {
    display: none;
}

/* =======================================================
   5. BUTTONS & HERO SECTION
   ======================================================= */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary {
    background: var(--gradient-1);
    color: #fff;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.5);
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--text-main);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: #fff;
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px; 
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content .greeting {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.2rem;
    display: block;
    margin-bottom: 1rem;
}

.hero-name {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: var(--text-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-title {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.typing-cursor {
    animation: blink 0.8s infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.hero-description {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
}

.hero-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
}

.image-blob {
    width: 400px;
    height: 400px;
    background: var(--gradient-1);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: morph 8s ease-in-out infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(108, 92, 231, 0.2);
}

.image-blob img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes morph {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    50% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; }
    100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
}

/* =======================================================
   6. GLOBAL SECTION TITLES
   ======================================================= */
.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title span {
    color: var(--primary-color);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--gradient-1);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* =======================================================
   7. ABOUT SECTION
   ======================================================= */
.about-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.about-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 3rem 0;
}

.stat-box {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    min-width: 150px;
}

.stat-box:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(108, 92, 231, 0.1);
}

.stat-num {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* =======================================================
   8. SKILLS SECTION
   ======================================================= */
.glass-section {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.skill-card {
    background: var(--bg-main);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.skill-card:hover {
    border-color: var(--primary-color);
    transform: scale(1.02);
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-weight: 600;
}

.skill-info i {
    color: var(--primary-color);
    margin-right: 10px;
    font-size: 1.2rem;
}

.skill-bar-bg {
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.skill-bar-fill {
    height: 100%;
    background: var(--gradient-1);
    border-radius: 4px;
}

/* =======================================================
   10. LOGIN MODAL
   ======================================================= */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-box {
    background: var(--bg-main);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 400px;
    transform: translateY(50px) scale(0.95);
    transition: transform 0.4s ease;
    position: relative;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}

.modal-overlay.active .modal-box {
    transform: translateY(0) scale(1);
}

.close-modal {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 1.5rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.close-modal:hover { color: var(--primary-color); }

.modal-box h2 {
    text-align: center; margin-bottom: 2rem; color: var(--text-main);
}

.input-group {
    position: relative; margin-bottom: 1.5rem;
}

.input-group i {
    position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted);
}

.input-group input {
    width: 100%; padding: 12px 15px 12px 45px;
    background: var(--bg-secondary); border: 1px solid var(--border-color);
    border-radius: 8px; color: var(--text-main); font-family: 'Inter', sans-serif;
    outline: none; transition: var(--transition);
}

.input-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
}

.login-error {
    background: rgba(220, 38, 38, 0.1); color: #ef4444; border: 1px solid rgba(220, 38, 38, 0.3);
    padding: 10px; border-radius: 6px; margin-bottom: 1rem; text-align: center; font-size: 0.9rem;
}

/* =======================================================
   11. SERVICES SECTION
   ======================================================= */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-main);
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(108, 92, 231, 0.15);
}

.service-icon {
    width: 70px; height: 70px;
    background: rgba(108, 92, 231, 0.1);
    color: var(--primary-color);
    font-size: 2rem;
    display: flex; justify-content: center; align-items: center;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background: var(--gradient-1);
    color: #fff;
    transform: rotateY(360deg);
}

.service-card h3 {
    font-size: 1.2rem; margin-bottom: 1rem; color: var(--text-main);
}

.service-card p {
    color: var(--text-muted); font-size: 0.95rem;
}

/* =======================================================
   12. CONTACT SECTION
   ======================================================= */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    background: var(--bg-secondary);
    padding: 3rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.contact-info h3 {
    font-size: 1.8rem; margin-bottom: 1rem; color: var(--text-main);
}

.contact-info > p {
    color: var(--text-muted); margin-bottom: 2.5rem;
}

.info-item {
    display: flex; gap: 1.5rem; margin-bottom: 2rem; align-items: flex-start;
}

.info-icon {
    width: 50px; height: 50px;
    background: rgba(108, 92, 231, 0.1); color: var(--primary-color);
    display: flex; justify-content: center; align-items: center;
    border-radius: 50%; font-size: 1.2rem;
}

.info-item h4 {
    font-size: 1.1rem; color: var(--text-main); margin-bottom: 0.3rem;
}

.info-item p {
    color: var(--text-muted); font-size: 0.95rem;
}

.contact-form-wrapper {
    background: var(--bg-main); padding: 2.5rem;
    border-radius: var(--border-radius); border: 1px solid var(--border-color);
}

.form-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
}

.form-group { margin-bottom: 1.5rem; }

.form-group input, .form-group textarea {
    width: 100%; padding: 15px;
    background: var(--bg-secondary); border: 1px solid var(--border-color);
    border-radius: 8px; color: var(--text-main); font-family: 'Inter', sans-serif;
    outline: none; transition: var(--transition); resize: vertical;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
}

@media (max-width: 900px) {
    .hero-container, .contact-container { grid-template-columns: 1fr; gap: 2rem; }
    .hero-name { font-size: 3rem; }
    .form-grid { grid-template-columns: 1fr; }
    .nav-links { display: none; }
    .hamburger { display: block; }
}