/* ========================================
   ROOT VARIABLES (Dark Mode Default)
   ======================================== */
:root {
    /* Dark Mode Colors */
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-card: rgba(22, 22, 31, 0.9);
    --bg-elevated: #1e1e2a;
    --border: rgba(42, 42, 58, 0.5);
    --border-light: #3a3a4a;
    --text-primary: #ffffff;
    --text-secondary: #a1a1b0;
    --text-muted: #6b6b7a;
    --accent-primary: #00e5ff;
    --accent-secondary: #7c3aed;
    --accent-tertiary: #f59e0b;
    --success: #10b981;
    --error: #ef4444;
    --gradient-1: linear-gradient(135deg, #00e5ff 0%, #7c3aed 100%);
    --gradient-2: linear-gradient(135deg, #7c3aed 0%, #f59e0b 100%);
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.5);
    --transition: all 0.3s ease;
}

/* Light Mode Colors */
[data-theme="light"] {
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-elevated: #f1f3f5;
    --border: rgba(222, 226, 230, 0.5);
    --border-light: #e9ecef;
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-muted: #6c757d;
    --accent-primary: #0d6efd;
    --accent-secondary: #6f42c1;
    --accent-tertiary: #fd7e14;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* ========================================
   GLOBAL STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    cursor: none;
}

/* ========================================
   CUSTOM CURSOR
   ======================================== */
.cursor-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease;
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transition: all 0.15s ease;
    opacity: 0.6;
}

.cursor-hover {
    transform: scale(1.5);
    background: rgba(0, 229, 255, 0.2);
    border-color: var(--accent-secondary);
}

/* ========================================
   ANIMATED BACKGROUND
   ======================================== */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.gradient-mesh {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(0, 229, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(124, 58, 237, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(245, 158, 11, 0.1) 0%, transparent 50%);
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        opacity: 0.8;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

.grid-pattern {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.3;
}

.floating-orbs {
    position: absolute;
    width: 100%;
    height: 100%;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: var(--accent-primary);
    top: 10%;
    left: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--accent-secondary);
    bottom: 10%;
    right: -150px;
    animation-delay: 5s;
}

.orb-3 {
    width: 200px;
    height: 200px;
    background: var(--accent-tertiary);
    top: 50%;
    left: 50%;
    animation-delay: 10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* ========================================
   ENTRY LOADER
   ======================================== */
.entry-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.entry-loader.hide {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-name {
    font-size: clamp(32px, 8vw, 64px);
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 16px;
    animation: fadeInUp 0.6s ease;
}

.loader-tagline {
    font-size: 18px;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    border-right: 2px solid var(--accent-primary);
    white-space: nowrap;
    overflow: hidden;
    width: 0;
    animation: typing 2s steps(30, end) forwards, blink 0.75s step-end infinite;
    margin: 0 auto;
    display: inline-block;
}

@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink {

    from,
    to {
        border-color: transparent;
    }

    50% {
        border-color: var(--accent-primary);
    }
}

.loader-progress {
    width: 200px;
    height: 2px;
    background: var(--border);
    margin: 30px auto 0;
    border-radius: 2px;
    overflow: hidden;
}

.loader-progress-bar {
    width: 0%;
    height: 100%;
    background: var(--gradient-1);
    animation: progress 2s ease forwards;
}

@keyframes progress {
    to {
        width: 100%;
    }
}

/* ========================================
   CAPSULE NAVBAR
   ======================================== */
.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 1200px;
    z-index: 1000;
    background: rgba(var(--bg-primary-rgb, 10, 10, 15), 0.7);
    backdrop-filter: blur(20px);
    border-radius: 60px;
    border: 1px solid rgba(0, 229, 255, 0.2);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    top: 10px;
    background: rgba(var(--bg-primary-rgb, 10, 10, 15), 0.9);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-primary);
}

.logo-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    font-weight: 600;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-text span {
    background: none;
    -webkit-background-clip: unset;
    color: var(--text-muted);
    font-weight: 400;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s ease;
}

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

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-primary);
}

.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 40px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
}

.theme-toggle:hover {
    border-color: var(--accent-primary);
    transform: scale(1.05);
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: clamp(40px, 6vw, 72px);
}

h2 {
    font-size: clamp(28px, 4vw, 42px);
    margin-bottom: 16px;
}

h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.section-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--accent-primary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 12px;
    display: inline-block;
}

.highlight {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ========================================
   CONTAINER & LAYOUT
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

section {
    padding: 80px 0;
}

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

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 229, 255, 0.1);
    border: 1px solid rgba(0, 229, 255, 0.2);
    padding: 6px 14px;
    border-radius: 40px;
    font-size: 12px;
    font-weight: 500;
    color: var(--accent-primary);
    margin-bottom: 24px;
}

.hero-sub {
    font-size: 18px;
    color: var(--text-secondary);
    margin: 20px 0;
}

#typing-text {
    color: var(--accent-primary);
    font-weight: 600;
}

.hero-stats {
    display: flex;
    gap: 32px;
    margin: 24px 0;
}

.stat-number {
    font-size: 28px;
    font-weight: 800;
    color: var(--accent-primary);
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
}

.btn-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.profile-img {
    width: 100%;
    max-width: 350px;
    border-radius: 30px;
    border: 3px solid var(--accent-primary);
    box-shadow: var(--shadow-lg);
    transition: all 0.3s;
}

.profile-img:hover {
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.3);
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 229, 255, 0.3);
}

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

.btn-outline:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-2px);
}

/* ========================================
   CARDS
   ======================================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.card:hover {
    transform: translateY(-6px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
}

/* ========================================
   GRIDS
   ======================================== */
.projects-grid,
.skills-grid,
.achievements-grid {
    display: grid;
    gap: 24px;
}

.projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}

.skills-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.achievements-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* ========================================
   SKILL ITEMS
   ======================================== */
.skill-category {
    margin-bottom: 32px;
}

.skill-category h3 {
    margin-bottom: 20px;
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 40px;
    padding: 10px 20px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    backdrop-filter: blur(5px);
}

.skill-item:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-2px);
}

/* ========================================
   TIMELINE
   ======================================== */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

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

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 48px;
}

.timeline-dot {
    position: absolute;
    left: 12px;
    top: 4px;
    width: 18px;
    height: 18px;
    background: var(--bg-primary);
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    z-index: 1;
}

.timeline-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--accent-primary);
    margin-bottom: 6px;
}

.timeline-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.timeline-org {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.timeline-desc {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

/* ========================================
   PROJECT BADGES
   ======================================== */
.project-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    margin-bottom: 16px;
}

.badge-live {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.project-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

.project-stack span {
    background: var(--bg-elevated);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted);
}

.project-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s;
}

.project-link:hover {
    gap: 10px;
}

/* ========================================
   CONTACT FORM
   ======================================== */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.contact-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
}

.contact-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.contact-label {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.contact-value {
    font-weight: 600;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s;
}

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

.form-status {
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
}

.form-status.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid var(--success);
}

.form-status.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid var(--error);
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 60px 0 30px;
    position: relative;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand p {
    color: var(--text-secondary);
    margin-top: 16px;
    font-size: 14px;
}

.footer-links h4,
.footer-social h4 {
    font-size: 16px;
    margin-bottom: 20px;
    color: var(--accent-primary);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

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

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

.social-icons a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 18px;
    transition: all 0.3s;
}

.social-icons a:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-muted);
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 99;
}

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

.back-to-top:hover {
    transform: translateY(-3px);
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

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

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {

    .cursor-dot,
    .cursor-outline {
        display: none;
    }

    body {
        cursor: auto;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        border-radius: 20px;
        margin-top: 10px;
        backdrop-filter: blur(20px);
    }

    .nav-links.active {
        display: flex;
    }

    .menu-btn {
        display: block;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-stats {
        justify-content: center;
    }

    .btn-group {
        justify-content: center;
    }

    .projects-grid,
    .skills-grid,
    .achievements-grid {
        grid-template-columns: 1fr;
    }

    section {
        padding: 60px 0;
    }

    .navbar {
        top: 10px;
        width: calc(100% - 20px);
    }

    .logo-text {
        font-size: 14px;
    }

    .logo-img {
        width: 32px;
        height: 32px;
    }
}