:root {
    --primary-color: #000000;
    --secondary-color: #1d1d1f;
    --accent-color: #007aff;
    --background-color: #f5f5f7;
    --surface-color: #ffffff;
    --text-color: #1d1d1f;
    --text-light: #86868b;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.5);
    --border-radius: 30px;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.1);
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --inverse-text: #ffffff;
    --footer-text-secondary: rgba(255, 255, 255, 0.6);
    --footer-border: rgba(255, 255, 255, 0.1);
    --cursor-border: rgba(0, 0, 0, 0.5);
    --cursor-hover-bg: rgba(0, 0, 0, 0.1);
    --section-bg: #f5f5f7;
}

@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #ffffff;
        --secondary-color: #f5f5f7;
        --accent-color: #0a84ff;
        --background-color: #000000;
        --surface-color: #1d1d1f;
        --text-color: #f5f5f7;
        --text-light: #a1a1a6;
        --glass-bg: rgba(0, 0, 0, 0.8);
        --glass-border: rgba(255, 255, 255, 0.1);
        --shadow-soft: 0 10px 30px rgba(255, 255, 255, 0.05);
        --shadow-hover: 0 20px 40px rgba(255, 255, 255, 0.1);
        --inverse-text: #000000;
        --footer-text-secondary: rgba(0, 0, 0, 0.6);
        --footer-border: rgba(0, 0, 0, 0.1);
        --cursor-border: rgba(255, 255, 255, 0.5);
        --cursor-hover-bg: rgba(255, 255, 255, 0.1);
        --section-bg: #111111;
    }
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none; /* Hide default cursor */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
    overflow-x: hidden; /* Prevent horizontal scroll */
    -webkit-font-smoothing: antialiased;
    overflow: hidden; /* Initially hidden for loader */
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

/* 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(--cursor-border);
    transition: width 0.2s, height 0.2s, background-color 0.2s, border-color 0.2s;
}

.cursor-outline.hover {
    width: 60px;
    height: 60px;
    background-color: var(--cursor-hover-bg);
    border-color: transparent;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

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

.logo {
    font-weight: 600;
    font-size: 1.25rem;
    text-decoration: none;
    color: var(--text-color);
    letter-spacing: -0.02em;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--text-color);
    opacity: 0.8;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--inverse-text) !important;
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: #333;
    transform: scale(1.02);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    text-align: center;
    overflow: hidden;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.gradient-text {
    background: linear-gradient(90deg, #ff9a9e 0%, #ff8965 25%, #ff5277 50%, #ac255e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 3rem;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-secondary {
    background-color: transparent;
    color: var(--accent-color);
    padding: 0.8rem 2rem;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.btn-secondary:hover {
    text-decoration: underline;
}

.btn-primary.large {
    font-size: 1.1rem;
    padding: 1rem 2.5rem;
    border-radius: 30px;
}

.hero-background-gradient {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(200, 200, 255, 0.2) 0%, rgba(255, 230, 230, 0.1) 40%, transparent 70%);
    transform: translate(-50%, -50%);
    filter: blur(80px);
    z-index: -1;
    animation: pulse 10s infinite alternate;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    100% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }

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

/* Bento Grid */
.section-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 3rem;
    letter-spacing: -0.02em;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 400px;
    gap: 2rem;
}

.bento-item {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.bento-item:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-hover);
}

.bento-item.large { grid-column: span 2; }
.bento-item.wide { grid-column: span 3; }
.bento-item.medium { grid-column: span 1; }

.bento-content {
    z-index: 2;
    position: relative;
}

.bento-content h3 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.bento-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.tag {
    display: inline-block;
    background: rgba(0, 0, 0, 0.05);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    font-weight: 500;
}

.bento-visual {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 80%;
    height: 80%;
    border-radius: var(--border-radius) 0 0 0;
    opacity: 0.8;
}

.gradient-1 { background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%); }
.gradient-2 { background: linear-gradient(135deg, #d4fc79 0%, #96e6a1 100%); }
.gradient-3 { background: linear-gradient(135deg, #fccb90 0%, #d57eeb 100%); }
.gradient-4 { background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%); }

/* Skills Section */
.skills-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: center;
}

.grey-bg {
    background-color: var(--section-bg);
    padding: 8rem 0;
}

.skill-card {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.skill-card h4 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.skill-card p {
    color: var(--text-light);
}

.skill-card:hover {
    transform: translateY(-5px);
}

.skill-card .icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* Footer */
footer {
    padding: 8rem 0 4rem;
    background: var(--surface-color);
    color: var(--text-color);
    text-align: center;
}

.footer-content h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
}

.footer-links {
    margin-top: 6rem;
    padding-top: 2rem;
    border-top: 1px solid var(--footer-border);
    display: flex;
    justify-content: space-between;
    color: var(--text-light);
}

.socials a {
    color: var(--text-color);
    margin-left: 1.5rem;
    text-decoration: none;
    transition: opacity 0.3s;
}

.socials a:hover {
    opacity: 0.7;
}

/* Loading Animation */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--surface-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.loader-logo {
    color: var(--text-color);
    font-size: 3rem;
    font-weight: 500;
    margin-bottom: 2rem;
    display: block;
}

.progress-bar {
    width: 200px;
    height: 6px;
    background: rgba(0, 0, 0, 0.1); /* Light mode track */
    border-radius: 3px;
    overflow: hidden;
    margin-top: 1rem;
}

.progress {
    width: 0%;
    height: 100%;
    background: var(--text-color);
    border-radius: 3px;
    transition: width 0.2s ease-out;
}

@media (prefers-color-scheme: dark) {
    .progress-bar {
        background: #333333;
    }
}

/* Scroll Reveal */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Mobile Menu Button */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.menu-toggle.is-active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.is-active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.is-active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Hide custom cursor on touch devices */
    .cursor-dot, .cursor-outline {
        display: none;
    }
    
    * {
        cursor: auto; /* Restore default cursor */
    }

    /* Navigation */
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--surface-color);
        flex-direction: column;
        justify-content: center;
        transition: right 0.4s ease;
        z-index: 999;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin: 1.5rem 0;
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    /* Hero Section */
    .hero h1 {
        font-size: 3rem;
    }
    
    .hero-background-gradient {
        width: 100vw;
        height: 100vw;
    }

    /* Bento Grid */
    .bento-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }

    .bento-item.large,
    .bento-item.medium,
    .bento-item.wide {
        grid-column: span 1;
    }
    
    .bento-item {
        min-height: 300px;
    }

    /* Skills Section */
    .skills-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    /* Footer */
    .footer-links {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    
    .socials {
        margin-top: 1rem;
    }
    
    .socials a:first-child {
        margin-left: 0;
    }
}
