:root {
    /* Default Dark Theme */
    --bg-color: #0a0a0a;
    --text-color: #e0e0e0;
    --primary-color: #00dc82;
    --secondary-color: #64748b;
    --accent-color: #3b82f6;
    --card-bg: #171717;
    --nav-bg: rgba(10, 10, 10, 0.8);
    --border-color: rgba(255, 255, 255, 0.1);
    --input-bg: rgba(255, 255, 255, 0.05);

    --font-main: 'Outfit', sans-serif;
    --font-mono: 'Space Grotesk', monospace;
    --container-width: 1200px;
    --transition: all 0.3s ease;
    --hero-gradient: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
}

/* Light Theme Overrides */
body.light-theme {
    --bg-color: #f8fafc;
    --text-color: #1e293b;
    --primary-color: #059669;
    /* Darker green for contrast on white */
    --secondary-color: #64748b;
    --accent-color: #2563eb;
    --card-bg: #ffffff;
    --nav-bg: rgba(255, 255, 255, 0.9);
    --border-color: #e2e8f0;
    --input-bg: #f1f5f9;
    --hero-gradient: linear-gradient(135deg, #0f172a 0%, #4338ca 100%);
}

/* 1. Ocean Theme (Deep Blue) */
body.ocean-theme {
    --bg-color: #0f172a;
    --text-color: #e2e8f0;
    --primary-color: #38bdf8;
    --primary-rgb: 56, 189, 248;
    --secondary-color: #94a3b8;
    --accent-color: #0ea5e9;
    --card-bg: #1e293b;
    --nav-bg: rgba(15, 23, 42, 0.9);
    --border-color: rgba(56, 189, 248, 0.2);
    --input-bg: rgba(30, 41, 59, 0.8);
    --hero-gradient: linear-gradient(135deg, #e0f2fe 0%, #7dd3fc 100%);
}

/* 2. Sunset Theme (Warm Purple/Orange) */
body.sunset-theme {
    --bg-color: #2e1065;
    --text-color: #fce7f3;
    --primary-color: #f472b6;
    --primary-rgb: 244, 114, 182;
    --secondary-color: #e9d5ff;
    --accent-color: #c084fc;
    --card-bg: #4c1d95;
    --nav-bg: rgba(46, 16, 101, 0.9);
    --border-color: rgba(244, 114, 182, 0.2);
    --input-bg: rgba(76, 29, 149, 0.5);
    --hero-gradient: linear-gradient(135deg, #fce7f3 0%, #f472b6 100%);
}

/* 3. Forest Theme (Dark Green) */
body.forest-theme {
    --bg-color: #052e16;
    --text-color: #dcfce7;
    --primary-color: #4ade80;
    --primary-rgb: 74, 222, 128;
    --secondary-color: #86efac;
    --accent-color: #22c55e;
    --card-bg: #14532d;
    --nav-bg: rgba(5, 46, 22, 0.9);
    --border-color: rgba(74, 222, 128, 0.2);
    --input-bg: rgba(20, 83, 45, 0.5);
    --hero-gradient: linear-gradient(135deg, #dcfce7 0%, #4ade80 100%);
}

/* 4. Nebula Theme (Space Dark) */
body.nebula-theme {
    --bg-color: #09090b;
    --text-color: #e4e4e7;
    --primary-color: #8b5cf6;
    --primary-rgb: 139, 92, 246;
    --secondary-color: #a1a1aa;
    --accent-color: #6366f1;
    --card-bg: #18181b;
    --nav-bg: rgba(9, 9, 11, 0.95);
    --border-color: rgba(139, 92, 246, 0.15);
    --input-bg: rgba(24, 24, 27, 0.8);
    --hero-gradient: linear-gradient(135deg, #e4e4e7 0%, #8b5cf6 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
    /* Custom cursor */
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid var(--primary-color);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

body:hover .cursor-outline {
    opacity: 1;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}

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

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

/* Pagination */
.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.5rem;
    justify-content: center;
}

.page-item .page-link {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ccc;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.page-item.active .page-link {
    background: #00dc82;
    color: #000;
    border-color: #00dc82;
    font-weight: 600;
}

.page-item.disabled .page-link {
    opacity: 0.5;
    cursor: default;
}

.page-item .page-link:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    background-color: var(--nav-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: var(--font-mono);
}

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

@media (max-width: 768px) {
    .logo {
        font-size: 1.5rem;
    }
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

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

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: #fff;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    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;
}

.greeting {
    color: var(--primary-color);
    font-family: var(--font-mono);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.name {
    font-size: 4.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.role {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    height: 3rem;
    /* Prevent layout shift */
}

.bio {
    font-size: 1.1rem;
    color: #a1a1aa;
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #000;
}

.btn-primary:hover {
    background-color: #00b368;
}

.btn-outline {
    border-color: var(--secondary-color);
    color: #fff;
}

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

/* Code Block Visual */
.code-block {
    background-color: #1e1e1e;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    font-family: 'Fira Code', monospace;
    border: 1px solid #333;
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.code-block:hover {
    transform: perspective(1000px) rotateY(0) rotateX(0);
}

.code-header {
    display: flex;
    gap: 8px;
    margin-bottom: 1rem;
}

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

.red {
    background-color: #ff5f56;
}

.yellow {
    background-color: #ffbd2e;
}

.green {
    background-color: #27c93f;
}

pre {
    color: #d4d4d4;
    font-size: 0.9rem;
    overflow-x: auto;
}

.keyword {
    color: #c586c0;
}

.class-name {
    color: #4ec9b0;
}

.string {
    color: #ce9178;
}

.number {
    color: #b5cea8;
}

.function {
    color: #dcdcaa;
}

.this {
    color: #569cd6;
}

.return {
    color: #c586c0;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--secondary-color);
    border-radius: 20px;
    display: block;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 2px;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 1.5s infinite;
}

@keyframes scroll {
    0% {
        top: 10px;
        opacity: 1;
    }

    100% {
        top: 30px;
        opacity: 0;
    }
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: #a1a1aa;
}

.stats {
    display: flex;
    gap: 3rem;
    margin-top: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.skills-container h3 {
    margin-bottom: 1.5rem;
    font-family: var(--font-mono);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tags span {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.skill-tags span:hover {
    background-color: rgba(0, 220, 130, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

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

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
}

.timeline-item {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 4rem;
    position: relative;
}

.timeline-dot {
    width: 16px;
    height: 16px;
    background-color: var(--primary-color);
    border-radius: 50%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    box-shadow: 0 0 0 4px rgba(0, 220, 130, 0.2);
}

.timeline-date {
    position: absolute;
    left: 0;
    width: 45%;
    text-align: right;
    padding-right: 2rem;
    color: var(--secondary-color);
    font-family: var(--font-mono);
}

.timeline-content {
    width: 45%;
    margin-left: auto;
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.timeline-content:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.timeline-item:nth-child(even) .timeline-date {
    left: auto;
    right: 0;
    text-align: left;
    padding-right: 0;
    padding-left: 2rem;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 0;
    margin-right: auto;
}

.timeline-content h3 {
    margin-bottom: 0.5rem;
    color: #fff;
}

.timeline-content .location {
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.timeline-content p {
    color: #a1a1aa;
    font-size: 0.95rem;
}

/* Contact Section */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    background-color: var(--card-bg);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.contact-info p {
    color: #a1a1aa;
    margin-bottom: 2rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #fff;
}

.contact-item span.material-symbols-outlined {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-icon:hover {
    background-color: var(--primary-color);
    color: #000;
    border-color: var(--primary-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #fff;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    color: #fff;
    font-family: var(--font-main);
    transition: var(--transition);
}

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

/* Footer */
footer {
    padding: 2rem 0;
    text-align: center;
    color: var(--secondary-color);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 4rem;
}

/* Responsive Design */
@media (max-width: 968px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        order: 2;
    }

    .hero-visual {
        order: 1;
        margin-bottom: 2rem;
    }

    .bio {
        margin: 0 auto 2.5rem;
    }

    .cta-buttons {
        justify-content: center;
    }

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

    .timeline::before {
        left: 0;
    }

    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 2rem;
    }

    .timeline-dot {
        left: 0;
    }

    .timeline-date {
        position: relative;
        width: 100%;
        text-align: left;
        padding: 0;
        margin-bottom: 0.5rem;
    }

    .timeline-content {
        width: 100%;
        margin: 0;
    }

    .timeline-item:nth-child(even) .timeline-date {
        text-align: left;
        padding: 0;
    }

    .timeline-item:nth-child(even) .timeline-content {
        margin: 0;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .name {
        font-size: 3rem;
    }
}

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

    .hero {
        padding-top: 80px;
        /* Reduced padding */
        height: auto;
        min-height: 100vh;
        /* Keep full height but allow compacting */
        padding-bottom: 2rem;
        align-items: center;
        /* Center vertically if space allows */
        justify-content: center;
    }

    .hero .container {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        /* Tighter gap */
        width: 100%;
        max-width: 100%;
    }

    /* Visual First - Compact */
    .hero-visual {
        margin: 0;
        opacity: 1;
        position: relative;
        transform: none;
        z-index: 1;
        width: 100%;
        display: flex;
        justify-content: center;
        order: 1;
        height: auto;
    }

    .code-block {
        padding: 0.6rem;
        /* Tighter padding */
        font-size: 0.5rem;
        /* Even smaller font */
        transform: perspective(800px) rotateY(-5deg) rotateX(5deg) !important;
        width: 100%;
        max-width: 260px;
        /* Tighter width */
        margin: 0 auto;
    }

    /* Force code to wrap and remove scrollbar */
    .code-block pre {
        white-space: pre-wrap;
        word-wrap: break-word;
        overflow-x: hidden;
        margin: 0;
    }

    .code-block code {
        line-height: 1.3;
        /* Tighter line height */
    }

    .hero-content {
        width: 100%;
        margin-top: 0.5rem;
        order: 2;
        text-align: center;
        /* Center align for better balance */
    }

    .greeting {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    .name {
        font-size: 2rem;
        /* Compact header */
        line-height: 1.1;
        margin-bottom: 0.5rem;
    }

    .role {
        font-size: 1rem;
        min-height: auto;
        /* Remove fixed height constraint */
        margin-bottom: 1rem;
        white-space: normal;
    }

    .bio {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 1.5rem;
        max-width: 100%;
    }

    /* Side-by-side buttons to save vertical space */
    .cta-buttons {
        flex-direction: row;
        width: 100%;
        gap: 10px;
        padding-bottom: 0;
        justify-content: center;
    }

    .btn {
        width: auto;
        /* Let buttons size to content */
        flex: 1;
        /* Equal width */
        text-align: center;
        padding: 0.8rem 0;
        font-size: 0.9rem;
    }

    .scroll-indicator {
        display: none;
    }

    .section-title {
        left: auto;
        transform: none;
        display: block;
        text-align: center;
        width: 100%;
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }

    .section-title::after {
        left: 50%;
        transform: translateX(-50%);
        width: 60px;
        /* Shorten the underline */
    }

    .contact-wrapper {
        padding: 1.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }
}