:root {
    /* Dark Mode (Default) */
    --bg: #050505;
    --text: #e0e0e0;
    --primary: #ff3e3e;
    /* Red for passion/boldness */
    --card-bg: rgba(20, 20, 20, 0.6);
    --border: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] {
    /* Light Mode */
    --bg: #e6e6e6;
    --text: #1a1a1a;
    --primary: #0051ff;
    --card-bg: rgba(255, 255, 255, 0.6);
    --border: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    transition: background 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* Background Canvas */
#bgCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 40%, var(--bg) 90%);
    pointer-events: none;
    z-index: -1;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 10%;
    position: relative; /* Needed for mobile menu positioning */
    z-index: 100;
}

.logo {
    font-family: 'Courier Prime', monospace;
    font-weight: 700;
    font-size: 1.5rem;
}

.highlight {
    color: var(--primary);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Desktop Menu Links */
.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-item {
    text-decoration: none;
    color: var(--text);
    font-family: 'Courier Prime', monospace;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-item:hover {
    border-color: var(--primary);
    color: var(--primary);
    text-shadow: 0 0 5px var(--primary);
}

#theme-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-family: 'Courier Prime', monospace;
    border-radius: 4px;
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--text);
}

/* Hero Section */
#hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10%;
}

.content-wrapper {
    max-width: 800px;
}

.pre-title {
    opacity: 0.6;
    margin-bottom: 1rem;
    font-family: 'Courier Prime', monospace;
}

.main-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.cursor {
    animation: blink 1s infinite;
    color: var(--primary);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.8;
    max-width: 500px;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Buttons */
.btn-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 4px;
    font-weight: 600;
    transition: transform 0.2s;
}

.btn:hover {
    transform: translateY(-3px);
}

.primary {
    background: var(--primary);
    color: #fff;
    border: 1px solid var(--primary);
}

.outline {
    border: 1px solid var(--border);
    color: var(--text);
}

/* About & Cards */
section {
    padding: 4rem 10%;
}

.glass {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    padding: 2.5rem;
    border-radius: 12px;
}

.glass h2 {
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.glass p {
    margin-bottom: 1rem;
    opacity: 0.9;
    font-size: 1.1rem;
}

.skills-ticker {
    margin-top: 2rem;
    font-family: 'Courier Prime', monospace;
    opacity: 0.5;
    font-size: 0.9rem;
}

/* Grid for Projects */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.project-box {
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: 8px;
    transition: 0.3s;
    background: var(--card-bg);
}

.project-box:hover {
    border-color: var(--primary);
}

.status {
    font-family: 'Courier Prime', monospace;
    font-size: 0.8rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

footer {
    text-align: center;
    padding: 3rem 2rem;
    opacity: 0.6;
    font-family: 'Courier Prime', monospace;
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.policy-link {
    color: var(--text);
    text-decoration: none;
    font-size: 0.75rem;
    letter-spacing: 1px;
    opacity: 0.5;
    transition: all 0.3s ease;
    border-bottom: 1px dotted transparent;
}

.policy-link:hover {
    opacity: 1;
    color: var(--primary);
    border-bottom: 1px dotted var(--primary);
    text-shadow: 0 0 5px var(--primary);
}

@keyframes blink {
    50% { opacity: 0; }
}

/* Social Icons Styling */
.social-grid {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.social-grid img {
    width: 28px;
    height: 28px;
    opacity: 0.6;
    filter: grayscale(100%);
    transition: all 0.3s ease;
}

.social-grid img:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: translateY(-5px) scale(1.1);
}

[data-theme="dark"] .social-grid img {
    filter: grayscale(100%) invert(1);
}

[data-theme="dark"] .social-grid img:hover {
    filter: grayscale(0%) invert(0);
}

/* --- MOBILE RESPONSIVE & HAMBURGER MENU --- */
@media (max-width: 768px) {
    .main-title {
        font-size: 3rem;
    }

    .navbar {
        padding: 1.5rem 5%;
    }

    section {
        padding: 3rem 5%;
    }

    /* Hamburger Logic */
    .hamburger {
        display: block; /* Show hamburger on mobile */
        z-index: 200;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Hide links by default on mobile */
    .nav-links {
        position: fixed;
        left: -100%; /* Hidden off-screen */
        top: 70px;
        flex-direction: column;
        background: var(--card-bg); /* Glass effect background */
        backdrop-filter: blur(15px);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        border-bottom: 1px solid var(--border);
    }

    /* Slide in when active */
    .nav-links.active {
        left: 0;
    }

    .nav-item {
        margin: 1.5rem 0;
        display: block; /* Stack vertically */
        font-size: 1.2rem;
    }
}

/* --- App Dock Section --- */
#app-dock-section {
    padding-bottom: 0; /* Merge slightly with section below */
}

.dock-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    font-family: 'Courier Prime', monospace;
    font-size: 0.9rem;
    opacity: 0.7;
}

.blink {
    color: var(--primary);
    animation: blink 2s infinite;
}

/* The "Depth" Container */
.depth-scroll-view {
    height: 300px; /* FIXED HEIGHT as requested */
    overflow-y: auto; /* Scrollable inside */
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid var(--border);
    /* INSET SHADOW creates the "sunken" depth look */
    box-shadow: inset 0 0 15px #000; 
    padding: 1rem;
    
    /* Custom Scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

/* Individual App Row (Card) */
.app-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.app-row:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
    border-color: var(--primary);
}

.app-icon-img {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.app-info {
    flex: 1; /* Takes up remaining space */
}

.app-info h4 {
    margin: 0 0 0.3rem 0;
    font-size: 1.1rem;
    color: var(--text);
}

.app-info p {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.6;
    line-height: 1.4;
    max-width: 90%;
}

.install-btn {
    padding: 0.6rem 1.2rem;
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 4px;
    transition: 0.3s;
    white-space: nowrap; /* Prevents text wrapping */
}

.install-btn:hover {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 10px var(--primary);
}

/* Mobile Tweak: Stack them if screen is too small */
@media (max-width: 600px) {
    .app-row {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    .install-btn {
        width: 100%;
        text-align: center;
    }
}

/* --- Personal Link Styling (Clean & Classic) --- */
.personal-connect {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border); /* Subtle divider line */
    text-align: center;
    font-family: 'Inter', sans-serif; /* Matches body text, not terminal */
    font-size: 0.95rem;
    opacity: 0.8;
}

.personal-connect a {
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
    margin-left: 5px;
    transition: color 0.3s ease;
}

.personal-connect a:hover {
    color: var(--primary); /* Changes to Red/Blue on hover */
    text-shadow: 0 0 10px var(--primary); /* Soft glow */
}

.project-box:hover {
    border-color: var(--primary);
    transform: translateY(-5px); /* Adds a nice subtle lift */
    cursor: pointer;
}