/* Base Body Styles */
:root {
    --bg-color-light: #F9FAFB; /* gray-50 */
    --text-color-light: #1F2937; /* gray-800 */
    --bg-color-dark: #111827; /* gray-900 */
    --text-color-dark: #F9FAFB; /* gray-50 */
    --accent-color: #38bdf8; /* sky-400 */
    --accent-color-hover: #0ea5e9; /* sky-500 */
    --glass-border-light: rgba(0, 0, 0, 0.1);
    --glass-border-dark: rgba(255, 255, 255, 0.1);
    --card-bg-light: #ffffff;
    --card-bg-dark: #1F2937; /* gray-800 */
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color-light);
    color: var(--text-color-light);
    cursor: none; /* Hide the default cursor */
    transition: background-color 0.3s ease, color 0.3s ease;
}

html.dark body {
    background-color: var(--bg-color-dark);
    color: var(--text-color-dark);
}

body.modal-open {
    overflow: hidden;
}

/* --- Custom Cursor --- */
.cursor-dot,
.cursor-outline {
    pointer-events: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    opacity: 1;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    z-index: 9999;
}

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

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid var(--accent-color);
    opacity: 0.5;
    transition: width 0.4s ease-in-out, height 0.4s ease-in-out, border 0.4s ease-in-out;
}

/* --- Scroll Animation --- */
.scroll-animate {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* --- Custom Component Styles --- */
.glass-effect {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border-light);
}

html.dark .glass-effect {
    background: rgba(31, 41, 55, 0.5); /* gray-800 with opacity */
    border: 1px solid var(--glass-border-dark);
}

.gradient-text {
    background: linear-gradient(to right, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Typing animation cursor */
.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background-color: var(--accent-color);
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.project-card {
    background-color: var(--card-bg-light);
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

html.dark .project-card {
     background-color: var(--card-bg-dark);
}

.project-card:hover {
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.3);
}

/* --- Active Navigation Link --- */
.nav-link.active {
    color: var(--accent-color);
    font-weight: 700;
}

/* --- Background Canvases --- */
.background-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#home-bg-canvas {
     opacity: 0.2;
}

html.dark #home-bg-canvas {
    opacity: 0.4;
}

#contact-bg-canvas-container {
    opacity: 0.5;
}

html.dark #contact-bg-canvas-container {
    opacity: 0.2;
}


/* --- Back to Top Button --- */
.back-to-top-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--accent-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(100px);
    transition: all 0.4s ease;
}

.back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top-btn:hover {
    background-color: var(--accent-color-hover);
    transform: scale(1.1);
}

/* --- Social Links --- */
.social-links {
    position: fixed;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 1000;
}

.social-links a {
    color: var(--text-color-light);
    transition: transform 0.3s ease, color 0.3s ease;
}

html.dark .social-links a {
     color: var(--text-color-dark);
}

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

/* --- Project Modal --- */
#project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#project-modal.is-open {
    opacity: 1;
    visibility: visible;
}

#project-modal-backdrop {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

#project-modal-content {
    position: relative;
    max-width: 800px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

#project-modal.is-open #project-modal-content {
     transform: scale(1);
}

#project-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.3);
    border-radius: 50%;
}

/* --- Confetti Canvas --- */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10000;
}

/* --- Interactive Timeline --- */
.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background-color: var(--accent-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
    border-radius: 3px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}

.timeline-item::after {
    display: none;
}

.timeline-item.left {
    left: 0;
}

.timeline-item.right {
    left: 50%;
}

.timeline-content {
    padding: 20px 30px;
    background-color: var(--card-bg-light);
    position: relative;
    border-radius: 6px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    transition: background-color 0.3s ease;
}

html.dark .timeline-content {
    background-color: var(--card-bg-dark);
}

/* --- Skill Tags --- */
.skill-tag {
    background-color: #dbeafe; /* blue-100 */
    color: #1e40af; /* blue-800 */
    font-size: 0.875rem; /* text-sm */
    font-weight: 500; /* font-medium */
    padding: 0.5rem 1rem; /* py-2 px-4 */
    border-radius: 9999px; /* rounded-full */
}

html.dark .skill-tag {
    background-color: #374151; /* gray-700 */
    color: #93c5fd; /* blue-300 */
}


/* --- Mobile Social Links --- */
#mobile-social-links {
    display: none; /* Hidden by default on desktop */
}

.mobile-social-link {
    color: var(--text-color-light);
    transition: transform 0.3s ease, color 0.3s ease;
}

html.dark .mobile-social-link {
    color: var(--text-color-dark);
}

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

@media (max-width: 768px) {
    .social-links { display: none; }
    #mobile-social-links { display: block; } /* Show on mobile */
    .timeline::after { left: 31px; }
    .timeline-item { width: 100%; padding-left: 70px; padding-right: 25px; }
    .timeline-item.left, .timeline-item.right { left: 0%; }
}
