:root {
    /* Light Mode Palette - Professional & Airy */
    --bg-main: #f8f9fa;
    --bg-gradient: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    --bg-glass: rgba(255, 255, 255, 0.65);
    --bg-glass-strong: rgba(255, 255, 255, 0.85);

    --text-primary: #2d3436;
    --text-secondary: #636e72;

    --accent-color: #0984e3;
    /* Professional Blue */
    --accent-hover: #74b9ff;
    --success-color: #00b894;
    --danger-color: #e17055;

    --border-glass: 1px solid rgba(255, 255, 255, 0.3);
    --border-light: 1px solid rgba(0, 0, 0, 0.05);

    --shadow-soft: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
    /* Glass shadow */
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.1);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* --- EMERGENCY CURSOR RESTORE --- */
html,
body,
* {
    cursor: auto !important;
}

a,
button,
.clickable,
input,
textarea,
.nav-link,
.tool-btn {
    cursor: pointer !important;
}

input[type="text"],
input[type="password"] {
    cursor: text !important;
}

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

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

/* Global Background Canvas */
#bgCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* Background confirmed */
    pointer-events: none;
    /* Must not block mouse */
}

/* Global Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: var(--border-glass);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    z-index: 100;
    /* Top layer */
    transition: all 0.3s ease;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.6rem;
    background: linear-gradient(45deg, var(--text-primary), var(--accent-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.nav-center {
    display: flex;
    gap: 40px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 5px 0;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-tools {
    display: flex;
    align-items: center;
    gap: 15px;
}

.date-display {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.03);
    padding: 5px 12px;
    border-radius: 20px;
    margin-right: 10px;
}

.tool-btn {
    background: transparent;
    border: 1px solid transparent;
    font-size: 1.1rem;
    color: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-btn:hover {
    background: white;
    color: var(--accent-color);
    border-color: rgba(9, 132, 227, 0.2);
    box-shadow: 0 5px 15px rgba(9, 132, 227, 0.15);
    transform: translateY(-2px);
}

/* --- Hero Section --- */
.hero-section {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 70px;
    overflow: hidden;
    z-index: 1;
    /* Above canvas, below navbar */
}

/* Deleted old IDs to prevent confusion */
#heroCanvas,
#cursor-dot,
#cursor-follower {
    display: none !important;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 0 20px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-color) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -2px;
    line-height: 1.1;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.cta-btn {
    padding: 15px 35px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: var(--font-heading);
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.cta-btn.primary {
    background: var(--accent-color);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(9, 132, 227, 0.3);
}

.cta-btn.secondary {
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(5px);
}

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

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

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

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

/* --- Side Panels --- */
.side-panel {
    position: fixed;
    top: 70px;
    right: -450px;
    width: 400px;
    height: calc(100vh - 70px);
    background: var(--bg-glass-strong);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: var(--border-glass);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9900;
    display: flex;
    flex-direction: column;
}

.side-panel.active {
    right: 0;
}

.panel-header {
    padding: 25px;
    border-bottom: var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    font-size: 1.3rem;
    color: var(--text-primary);
    font-weight: 700;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--danger-color);
}

.panel-content {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Inputs & Textareas */
input[type="text"],
input[type="password"],
textarea,
input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(5px);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.2s;
    outline: none;
}

input:focus,
textarea:focus {
    background: white;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(9, 132, 227, 0.1);
}

/* Task Widget */
.add-task-box {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.add-task-box button {
    width: 48px;
    background: var(--text-primary);
    color: white;
    border: none;
    border-radius: 12px;
    transition: all 0.2s;
}

.add-task-box button:hover {
    background: var(--accent-color);
    transform: scale(1.05);
}

.task-list {
    list-style: none;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.task-item:hover {
    transform: translateX(-3px);
    background: white;
    box-shadow: var(--shadow-soft);
}

.task-item.completed .task-text {
    text-decoration: line-through;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Learning Log */
#learningLogArea {
    width: 100%;
    height: 100%;
    resize: none;
    line-height: 1.7;
}

.log-status-bar {
    text-align: right;
    margin-bottom: 8px;
    font-size: 0.8rem;
    color: var(--success-color);
    font-weight: 600;
}

/* Calendar Widget */
.floating-widget {
    position: fixed;
    top: 80px;
    right: 180px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: var(--border-white);
    box-shadow: var(--shadow-soft);
    border-radius: 20px;
    padding: 25px;
    width: 340px;
    z-index: 9950;
    display: none;
    animation: fadeInDown 0.3s ease;
}

.floating-widget.active {
    display: block;
}

.cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-weight: 700;
    font-size: 1.1rem;
}

.cal-header button {
    background: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 8px;
    width: 30px;
    height: 30px;
    transition: all 0.2s;
}

.cal-header button:hover {
    background: var(--accent-color);
    color: white;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    text-align: center;
}

.cal-day-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 5px;
}

.cal-day {
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: background 0.2s, transform 0.2s;
}

.cal-day:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: scale(1.1);
}

.cal-day.today {
    background: var(--accent-color);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(9, 132, 227, 0.3);
}

.cal-day.has-task::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 4px;
    height: 4px;
    background: var(--danger-color);
    border-radius: 50%;
}

/* Security Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    z-index: 20000;
    display: none;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 40px;
    border-radius: 24px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
    position: relative;
    text-align: center;
}

.pass-input-group {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.pass-input-group input {
    padding: 10px 15px;
    text-align: center;
    letter-spacing: 5px;
    width: 140px;
}

/* Content Pages */
.page-container {
    padding: 120px 5% 50px;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
}

/* About Grid */
.tech-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: transform 0.2s;
    backdrop-filter: blur(5px);
}

/* Checkbox */
.custom-checkbox {
    position: relative;
    cursor: pointer;
    /* Ensure pointer */
    width: 20px;
    height: 20px;
}

.custom-checkbox input {
    opacity: 0;
    position: absolute;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #eee;
    border-radius: 6px;
    transition: 0.2s;
}

.custom-checkbox:hover input~.checkmark {
    background-color: #ddd;
}

.custom-checkbox input:checked~.checkmark {
    background-color: var(--success-color);
}