:root {
    /* Modern Palette - Dark Mode (Default) */
    --bg-primary: #050505;
    --bg-secondary: #0a0a0a;
    --bg-card: rgba(20, 20, 20, 0.6);
    
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    
    --accent-primary: #00ff9d; /* Neon Mint */
    --accent-secondary: #00b8ff; /* Electric Blue */
    --accent-gradient: linear-gradient(135deg, #00ff9d 0%, #00b8ff 100%);
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.2);
    
    --glass-blur: blur(12px);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.2);
    
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

body.light-mode {
    /* Modern Palette - Light Mode */
    --bg-primary: #f4f5f7;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.8);
    
    --text-primary: #111111;
    --text-secondary: #555555;
    
    --accent-primary: #00a859;
    --accent-secondary: #0066cc;
    --accent-gradient: linear-gradient(135deg, #00a859 0%, #0066cc 100%);
    
    --border-color: rgba(0, 0, 0, 0.06);
    --border-hover: rgba(0, 0, 0, 0.15);
    
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.06);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
    /* Cursor handling moved to media query */
}

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

/* ... (rest of styles) ... */

/* Cursor - Desktop Only */
@media (pointer: fine) {
    body {
        cursor: none;
    }
    
    .cursor-follower {
        display: block;
    }
}

@media (pointer: coarse) {
    .cursor-follower {
        display: none !important;
    }
    
    body {
        cursor: auto;
    }
    
    a, button, .logo, .nav-item {
        cursor: pointer;
        touch-action: manipulation;
    }
}

/* ... (existing cursor styles, ensure .cursor-follower base display is none or handled) ... */

/* Mobile Responsiveness */
@media (max-width: 900px) {
    .hero-title { font-size: 3rem; }
    .section-title { font-size: 2.2rem; } /* Added responsive title size */
    .hero-content { padding-top: 2rem; }
    
    .section { padding: 4rem 5%; }
    .section-header { text-align: center; }
/* ... */
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* Typography */
h1, h2, h3, .logo {
    font-family: var(--font-heading);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    cursor: inherit;
}

button {
    cursor: inherit;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

/* Cursor */
.cursor-follower {
    position: fixed;
    width: 12px;
    height: 12px;
    background-color: var(--accent-primary);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 10000;
    transition: transform 0.1s, width 0.3s, height 0.3s, background-color 0.3s;
    mix-blend-mode: difference;
}

.cursor-follower.active {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: invert(1);
}

.cursor-follower.hovered {
    width: 30px;
    height: 30px;
    background-color: transparent;
    border: 1px solid var(--accent-primary);
}

/* Background */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Navbar */
.navbar-container {
    position: fixed;
    top: 2rem;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 1000;
    padding: 0 1rem;
}

.navbar {
    background: rgba(15, 15, 15, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    padding: 0.8rem 2rem;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 3rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

body.light-mode .navbar {
    background: rgba(255, 255, 255, 0.7);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

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

.nav-item {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.3s;
}

.nav-item:hover {
    color: var(--text-primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#theme-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.3s;
}

#theme-toggle:hover {
    background: var(--border-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
}

.hamburger span {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Menu Overlay Styles */
@media (max-width: 900px) {
    .nav-links {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--bg-primary);
        z-index: 999; /* Below navbar container but covers content */
        align-items: center;
        justify-content: center;
        gap: 3rem;
        transform: translateY(-100%);
        opacity: 0;
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
        pointer-events: none;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }
    
    .nav-item {
        font-size: 2rem;
    }
    
    body.no-scroll {
        overflow: hidden;
    }
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 6rem 1rem;
    position: relative;
}

.badge-container {
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.2s forwards;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(0, 255, 157, 0.1);
    border: 1px solid rgba(0, 255, 157, 0.2);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--accent-primary);
    font-weight: 500;
}

.pulse {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(0, 255, 157, 0.4);
    animation: pulse 2s infinite;
}

.hero-title {
    font-size: 5rem;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.4s forwards;
}

.hero-title span {
    display: block;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.6s forwards;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.8s forwards;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
}

.btn-secondary {
    border: 1px solid var(--border-color);
    background: rgba(255,255,255,0.03);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.08);
    border-color: var(--text-primary);
}

.social-links {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    opacity: 0;
    animation: fadeUp 0.8s ease 1s forwards;
}

.social-icon {
    color: var(--text-secondary);
    transition: color 0.3s, transform 0.3s;
    padding: 10px;
}

.social-icon:hover {
    color: var(--accent-primary);
    transform: translateY(-3px);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    opacity: 0;
    animation: fadeIn 1s ease 1.5s forwards;
}

.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid var(--text-secondary);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--text-secondary);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 1.5s infinite;
}

/* Bento Grid / Projects */
.section {
    padding: 6rem 10%;
    max-width: 1600px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 4rem;
}

.section-title {
    font-size: 3rem;
    letter-spacing: -1px;
}

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

.bento-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.bento-item:hover {
    border-color: var(--border-hover);
    transform: translateY(-5px);
    box-shadow: var(--shadow-card);
}

.bento-item.large {
    grid-column: span 2;
    grid-row: span 2;
}

.bento-item.wide {
    grid-column: span 2;
}

.bento-item::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(0,255,157,0.05), transparent 40%);
    z-index: 0;
    opacity: 0.5;
}

.bento-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.bento-item h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.bento-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: auto;
}

.bento-item .tags {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.bento-item .tags span {
    background: rgba(255,255,255,0.05);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.project-link {
    margin-top: 1.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.bento-item:hover .project-link {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   Experience Section (Journal Style - Restored V2)
   ========================================= */
.journal-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.journal-row {
    display: grid;
    grid-template-columns: 150px 1fr; /* Restored 150px width */
    gap: 3rem;
    margin-bottom: 4rem;
    align-items: flex-start;
}

/* Sticky Date Left */
.journal-date {
    text-align: right;
    position: sticky;
    top: 100px; /* Restored top position */
    height: fit-content;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding-top: 1rem;
}

.journal-date .year {
    font-family: var(--font-heading);
    font-size: 3.5rem; /* Restored larger font size */
    font-weight: 700;
    line-height: 1;
    color: var(--text-secondary);
    opacity: 0.3; /* Restored lower opacity */
    transition: 0.3s; /* Restored quicker transition */
}

.journal-date .duration {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* Active/Hover State for Date */
.journal-row:hover .year {
    color: var(--accent-primary);
    opacity: 1;
    text-shadow: 0 0 20px rgba(0, 255, 157, 0.3);
    transform: none; /* Removed translate transform for stability */
}

/* Content Card */
.journal-content.card {
    background: var(--bg-card); /* Use variable for Light Mode compatibility */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px; /* Slightly sharper than refined */
    padding: 0; 
    transition: var(--transition-smooth);
    overflow: hidden;
}

.journal-content:hover {
    border-color: var(--accent-secondary);
    transform: translateY(-5px); /* Subtle lift */
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Card Header (Title + Company) */
.card-header {
    padding: 1.5rem 2rem 1rem 2rem; /* Adjusted padding */
    border-bottom: 1px solid var(--border-color);
}

.journal-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1;
    display: inline-block;
    filter: drop-shadow(0 0 15px rgba(0, 255, 157, 0.2)); /* Subtle glow */
}

.card-header h3 {
    font-size: 1.5rem;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.company-line {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.company-line .icon {
    font-size: 1rem;
}

/* Card Body */
.card-body {
    padding: 1.5rem 2rem;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

/* Card Footer (Tags) */
.card-footer {
    padding: 0 2rem 2rem 2rem;
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.tech-tag {
    background: rgba(255, 255, 255, 0.03); /* Default for dark mode */
    border: 1px solid var(--border-color);
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: 0.3s;
    cursor: default;
}

/* Light Mode Specific Override for Tags if needed, though var border helps */
body.light-mode .tech-tag {
    background: rgba(0, 0, 0, 0.03);
}

.tech-tag:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(0, 255, 157, 0.05);
}

/* Responsive Adjustments */
@media (max-width: 900px) {
    .journal-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .journal-date {
        position: relative;
        top: 0;
        text-align: left;
        align-items: flex-start; /* Left align */
        flex-direction: row;
        gap: 1rem;
        padding-top: 0;
        margin-bottom: 0.5rem;
        padding-left: 0; /* Reset padding */
        align-items: baseline;
    }

    .journal-date .year {
        font-size: 2.5rem;
        opacity: 1;
        color: var(--accent-primary); /* Highlighted by default on mobile */
    }
    
    .journal-content.card {
        margin: 0; /* Reset margins */
    }
}

/* Timeline / Experience (Legacy - Removed) */

/* Skills */
.skills-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

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

.skill-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: 0.3s;
}

.skill-item:hover {
    background: rgba(255,255,255,0.05);
    transform: scale(1.02);
}

.achievements-section .section-header {
    margin-bottom: 3rem;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.achievement-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 1.75rem;
    transition: var(--transition-smooth);
}

.achievement-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
}

.achievement-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.achievement-icon {
    font-size: 2rem;
    line-height: 1;
    filter: drop-shadow(0 0 16px rgba(0, 255, 157, 0.15));
}

.achievement-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    padding: 6px 12px;
    border-radius: 999px;
}

.achievement-title {
    font-size: 1.4rem;
    letter-spacing: -0.5px;
    margin-bottom: 0.25rem;
}

.achievement-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.achievements-ticker {
    width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
    overflow: hidden;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    background: var(--bg-secondary);
}

.ticker-wrap {
    display: flex;
    white-space: nowrap;
    animation: ticker 20s linear infinite;
}

.ticker-item {
    padding: 0 2rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

@media (prefers-reduced-motion: reduce) {
    .ticker-wrap {
        animation: none;
    }
}

/* Playground */
.playground-section {
    position: relative;
}

.playground-container {
    width: 100%;
    height: 600px;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
    background: #000;
}

.playground-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    pointer-events: none;
    color: #fff;
}

.controls {
    pointer-events: auto;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Footer */
.main-footer {
    padding: 4rem 10%;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.footer-left h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    max-width: 400px;
}

.email-link {
    font-size: 1.2rem;
    text-decoration: underline;
    text-underline-offset: 5px;
    transition: color 0.3s;
}

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

.footer-right {
    text-align: right;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scroll {
    0% { top: 8px; opacity: 1; }
    100% { top: 24px; opacity: 0; }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 255, 157, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(0, 255, 157, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 255, 157, 0); }
}

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
    .hero-title { font-size: 3rem; }
    .hero-content { padding-top: 2rem; }
    
    .section { padding: 4rem 5%; }
    .section-header { text-align: center; }
    
    /* Stack Grid */
    .bento-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
    .bento-item.large, .bento-item.wide { grid-column: span 1; grid-row: span 1; }
    .bento-item { min-height: auto; padding: 2rem; }
    
    .navbar { padding: 0.8rem 1.5rem; width: 90%; justify-content: space-between; }
    .hamburger { display: flex; }
    
    /* Center Timeline */
    .timeline-container::before { 
        left: 50%; 
        transform: translateX(-50%); 
        opacity: 0.3; /* Subtle line */
    }
    .timeline-block { 
        padding-left: 0; 
        flex-direction: column; 
        gap: 1rem; 
        align-items: center; 
        text-align: center; 
    }
    .timeline-year { 
        text-align: center; 
        padding-top: 0; 
        min-width: auto; 
        margin-bottom: 0;
        background: var(--bg-primary);
        padding: 5px 15px;
        border-radius: 20px;
        border: 1px solid var(--border-color);
        z-index: 2;
    }
    .timeline-content.card { 
        width: 100%; 
        text-align: center; 
    }
    .card-head { 
        justify-content: center; 
        flex-direction: column; 
        gap: 0.5rem; 
    }
    
    /* Center Footer */
    .footer-content { 
        flex-direction: column; 
        align-items: center; 
        gap: 3rem; 
        text-align: center; 
    }
    .footer-left h2 { 
        font-size: 2rem; 
        margin: 0 auto 1rem auto; 
    }
    .footer-right { text-align: center; }
    
    /* Center Skills */
    .skills-wrapper { text-align: center; }
    .skill-group h3 { text-align: center; }
    .skill-list { align-items: center; }
    .skill-item { width: 100%; justify-content: center; }
}
