:root {
    /* Colors */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --accent-primary: #6366f1;
    /* Indigo */
    --accent-secondary: #818cf8;
    --accent-hover: #4f46e5;
    --border-color: #334155;

    /* Spacing & Layout */
    --container-width: 1200px;
    --header-height: 80px;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;

    /* Fonts */
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;

    /* Transitions */
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
    --transition: all 0.4s var(--ease-out-expo);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    cursor: none;
    /* Hide default cursor */
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

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

/* Custom Cursor */
.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-secondary);
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(129, 140, 248, 0.5);
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9998;
    pointer-events: none;
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

/* Hover state for cursor */
body.hovering .cursor-outline {
    width: 60px;
    height: 60px;
    background-color: rgba(99, 102, 241, 0.1);
    border-color: var(--accent-primary);
}

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

section {
    padding: 5rem 0;
}

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

h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent-primary);
    margin: 1rem auto 0;
    border-radius: 2px;
}

a,
button,
.btn,
.project-card,
.story-card,
.skill-badge {
    cursor: none;
    /* Ensure custom cursor is used */
}

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

img {
    max-width: 100%;
    display: block;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.btn-outline:hover {
    background-color: rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}

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

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
}

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--header-height);
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.15), transparent 40%);
}

.hero-content {
    max-width: 800px;
}

.hero-greeting {
    font-size: 1.25rem;
    color: var(--accent-secondary);
    display: block;
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: slideUpFade 0.8s var(--ease-out-expo) 0.2s forwards;
}

.hero-name {
    font-size: clamp(3rem, 5vw, 5rem);
    margin-bottom: 1rem;
    color: white;
    opacity: 0;
    animation: slideUpFade 0.8s var(--ease-out-expo) 0.4s forwards;
}

.hero-tagline {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: slideUpFade 0.8s var(--ease-out-expo) 0.6s forwards;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    opacity: 0;
    animation: slideUpFade 0.8s var(--ease-out-expo) 0.8s forwards;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

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

.about-img-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    transition: transform 0.5s var(--ease-out-expo);
}

.about-img-wrapper:hover {
    transform: scale(1.02);
}

.about-img {
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
    object-fit: cover;
    background-color: var(--bg-secondary);
}

/* Education Timeline */
.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    border-left: 2px solid var(--border-color);
    padding-left: 2rem;
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    opacity: 0;
    /* JS handles reveal */
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.6rem;
    top: 0.5rem;
    width: 1.2rem;
    height: 1.2rem;
    background-color: var(--accent-primary);
    border-radius: 50%;
    border: 4px solid var(--bg-primary);
    transition: background-color 0.3s ease;
}

.timeline-item:hover::before {
    background-color: white;
}

.timeline-year {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--accent-secondary);
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-degree {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
    color: white;
}

.timeline-institution {
    color: var(--text-secondary);
}

/* Skills Badges */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.skill-category h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--accent-secondary);
}

.skill-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-badge {
    padding: 0.5rem 1rem;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.skill-badge:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background-color: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    opacity: 0;
    /* JS handles reveal */
}

.project-card:hover {
    transform: translateY(-12px);
    border-color: var(--accent-primary);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
}

.project-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: white;
}

.project-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.project-stack {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.85rem;
    color: var(--accent-secondary);
    font-family: monospace;
}

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

/* Stories */
.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.story-card {
    padding: 2rem;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    opacity: 0;
    /* JS handles reveal */
}

.story-card:hover {
    border-color: var(--accent-primary);
    transform: scale(1.02);
}

.story-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: white;
}

.story-excerpt {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.story-link {
    color: var(--accent-secondary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.story-link:hover {
    color: var(--accent-hover);
}

/* Hobbies */
.hobbies-wrapper {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 3rem;
    text-align: center;
}

.hobby-item {
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    transition: var(--transition);
}

.hobby-item:hover {
    color: var(--accent-primary);
    transform: translateY(-5px);
}

/* Contact */
.contact-section {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-form {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    text-align: left;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 1rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 1rem;
    transition: var(--transition);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background-color: rgba(99, 102, 241, 0.05);
}

.social-links {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.social-link {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

.social-link:hover {
    color: var(--accent-primary);
    transform: scale(1.2);
}

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

/* Animation Utilities for JS Stagger */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

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

/* Mobile Tweaks */
@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

    /* Disable custom cursor on mobile */
    *,
    *::before,
    *::after {
        cursor: auto;
    }

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

    h2 {
        font-size: 2rem;
    }

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

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

    .nav-links {
        display: none;
    }
}