:root {
    --bg-color: #0a0a0a;
    --text-color: #ffffff;
    --canvas-dot-color: 255, 255, 255;
    --nav-bg: rgba(25, 25, 25, 0.6);
    --nav-border: rgba(255, 255, 255, 0.1);
    --cursor-border: rgba(255, 255, 255, 0.5);
    --cursor-hover: #ffffff;
}

body.light-mode {
    --bg-color: #f5f5f5;
    --text-color: #1a1a1a;
    --canvas-dot-color: 0, 0, 0;
    --nav-bg: rgba(230, 230, 230, 0.6);
    --nav-border: rgba(0, 0, 0, 0.1);
    --cursor-border: rgba(255, 255, 255, 0.5);
    --cursor-hover: #ffffff;
}

html {
    scroll-behavior: smooth;
    scroll-snap-type: y proximity;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none !important;
}

/* Global Media & Interaction Protection */
img, video, canvas {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

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

#hero-canvas {
    display: block;
    width: 100vw;
    height: 100vh;
    transition: opacity 0.1s ease-out; /* Smooth opacity changes for scroll */
}

.quote-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 15%;
    text-align: center;
}

.quote-section h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 2.5rem;
    line-height: 1.4;
    color: var(--text-color);
}

/* Floating Home Button */
#home-btn {
    position: fixed;
    top: 30px;
    left: 30px;
    background: var(--nav-bg);
    border: 1px solid var(--nav-border);
    color: var(--text-color);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    z-index: 1000;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, background-color 0.3s ease, transform 0.2s ease;
}

#home-btn:hover {
    transform: scale(1.1);
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 30px;
    right: 30px;
    background: var(--nav-bg);
    border: 1px solid var(--nav-border);
    color: var(--text-color);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.2rem;
    z-index: 1000;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: background-color 0.3s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

@keyframes arcAnimation {
    0% { transform: rotate(-60deg); opacity: 0; }
    100% { transform: rotate(0deg); opacity: 1; }
}

.animate-arc {
    animation: arcAnimation 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    transform-origin: 50% 150%;
    display: inline-block;
}

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 80%;
    max-width: 800px;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--nav-border);
    padding: 6px 40px;
    border-radius: 50px; 
    z-index: 1000;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.nav-brand {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    position: relative;
    color: var(--text-color);
    text-decoration: none;
}
.nav-links {
    display: flex;
    gap: 12px;
}
.nav-links a {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.95rem;
    transition: background-color 0.3s ease, opacity 0.3s ease;
    opacity: 0.7;
    padding: 8px 16px;
    border-radius: 99px;
}
.nav-links a:hover {
    opacity: 1;
    background-color: rgba(11, 109, 255, 0.2);
}

/* Work Section */
.work-section {
    padding: 100px 10%;
    width: 100%;
}

.section-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 3.5rem;
    margin-bottom: 60px;
    text-align: left;
    color: var(--text-color);
}

.project-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    width: 100%;
    height: calc(100vh - 100px);
    margin-bottom: 100px;
    scroll-snap-align: center;
    scroll-snap-stop: always;
}

.project-card {
    height: calc(100vh - 100px);
    width: 100%;
    margin-bottom: 100px;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    box-sizing: border-box;
    --swipe-speed: .5s; /* Swipe speed of tags */
    --swipe-curve: cubic-bezier(0.16, 1, 0.3, 1);
    --swipe-off-delay: .3s; /* Delay before swipe off */
    --tag-swipe-dist: -30px;
    --text-swipe-dist: 30px;
    --desc-delay: 0s; /* Add extra delay before swipe off for tags*/
}

.project-card-link .project-card {
    height: 100%;
    margin-bottom: 0;
}

.media-container {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    background-color: var(--nav-border);
}

.poster-img,
.hover-video,
.reverse-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hover-video,
.reverse-video {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.card-tags {
    position: absolute;
    top: 30px;
    right: 30px;
    display: flex;
    gap: 12px;
    z-index: 10;
    transition: all var(--swipe-speed) var(--swipe-curve);
    transition-delay: 0s;
}

.tag {
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 800;
    padding: 8px 16px;
    border-radius: 99px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px;
    z-index: 10;
    color: #ffffff;
    --gradient-rgb: 0, 0, 0;
    --gradient-opacity: 1;
    --gradient-height: 85%;
    --headline-spacing: 1.1;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-info::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to top, rgba(var(--gradient-rgb), var(--gradient-opacity)) 0%, rgba(var(--gradient-rgb), 0) var(--gradient-height));
    transition: all var(--swipe-speed) var(--swipe-curve) !important;
}

.project-card:hover .card-info::before {
    opacity: 0;
    transition-delay: var(--swipe-off-delay) !important;
}

.card-info h3, .card-info p {
    max-width: 800px;
}

.card-info h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 5rem;
    font-weight: 550;
    line-height: var(--headline-spacing);
    margin-bottom: 8px;
    color: #ffffff;
    text-shadow: 0 0px 18px rgba(0, 0, 0, 0.2);
    transition: all var(--swipe-speed) var(--swipe-curve);
    transition-delay: 0s;
}

.card-info p {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    opacity: 1;
    line-height: 1.5;
    color: #eeeeee;
    text-shadow: 0 0px 12px rgba(0, 0, 0, 0.2);
    transition: all var(--swipe-speed) var(--swipe-curve);
    transition-delay: 0s;
}



.project-card:hover .card-tags {
    opacity: 0;
    transform: translateY(var(--tag-swipe-dist));
    transition-delay: var(--swipe-off-delay) !important;
}

.project-card:hover .card-info h3 {
    opacity: 0;
    transform: translateY(var(--text-swipe-dist));
    transition-delay: var(--swipe-off-delay) !important;
}

.project-card:hover .card-info p {
    opacity: 0;
    transform: translateY(var(--text-swipe-dist));
    transition-delay: calc(var(--swipe-off-delay) + var(--desc-delay)) !important;
}

/* Glass Card Shine Effect */
.glass-card {
    position: relative;
    background: rgba(20, 20, 20, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

body.light-mode .glass-card {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.glass-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: linear-gradient(115deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 30%, rgba(255,255,255,0.8) 50%, rgba(255,255,255,0) 70%, rgba(255,255,255,0.05) 100%);
    background-size: 300% 300%;
    background-position: var(--rx, 50%) var(--ry, 50%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

body.light-mode .glass-card::before {
    background: linear-gradient(115deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0) 70%, rgba(0,0,0,0.05) 100%);
    background-size: 300% 300%;
    background-position: var(--rx, 50%) var(--ry, 50%);
}

.glass-card:hover::before {
    opacity: 1;
}

.view-more-container {
    display: flex;
    justify-content: center;
    width: 100%;
    padding-top: 40px;
    padding-bottom: 60px;
}
.view-more-btn {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    color: var(--text-color);
    text-decoration: none;
    padding: 12px 32px;
    border-radius: 99px;
    border: 1px solid var(--nav-border);
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.view-more-btn:hover {
    transform: scale(1.05);
    background-color: rgba(255, 255, 255, 0.1);
}
body.light-mode .view-more-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

/* About Section */
.about-section {
    padding: 100px 10%;
    width: 100%;
}

.about-intro {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 100px;
}

.id-card-canvas {
    width: 100%;
    height: 100%;
    min-height: 650px;
    cursor: grab;
    position: relative;
    border-radius: 20px;
}
.id-card-canvas:active {
    cursor: grabbing;
}

.about-text {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    line-height: 1.6;
    color: var(--text-color);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.about-card {
    border-radius: 20px;
    height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.6;
}

.about-card .card-info {
    position: relative;
    z-index: 10;
    bottom: auto;
    left: auto;
    padding: 30px;
    background: none;
}

.about-card .card-info h3 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.about-card .card-info p {
    font-size: 1rem;
    opacity: 0.8;
}

.scroll-indicators {
    position: fixed;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 1000;
    opacity: 0;
    pointer-events: auto;
    transition: opacity 0.4s ease;
}

.scroll-indicators.visible {
    opacity: 1;
}

.indicator {
    position: relative;
    width: 8px;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.35);
    border-radius: 8px;
    transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Expanded hit-box so dots are effortlessly clickable */
.indicator::before {
    content: '';
    position: absolute;
    top: -8px;
    bottom: -8px;
    left: -14px;
    right: -14px;
}

.indicator:hover {
    background-color: rgba(255, 255, 255, 0.85);
}

body.light-mode .indicator {
    background-color: rgba(0, 0, 0, 0.35);
}

body.light-mode .indicator:hover {
    background-color: rgba(0, 0, 0, 0.85);
}

.indicator.active {
    height: 28px;
    background-color: var(--text-color);
}

/* ==========================================================================
   CUSTOM CURSOR STYLES
   ========================================================================== */
*, *::before, *::after {
    cursor: none !important;
}

.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    background-color: #ffffff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none; 
    z-index: 99999;
    transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s ease, border 0.25s ease;
    mix-blend-mode: difference;
    box-sizing: border-box;
}

.custom-cursor.hover {
    transform: translate(-50%, -50%) scale(1.8);
    background-color: transparent;
    border: 2px solid var(--cursor-hover, #ffffff);
    opacity: 1;
}

.custom-cursor.active {
    transform: translate(-50%, -50%) scale(1) !important;
}
