:root {
    --bg-color: #0a0f1c;
    /* Deep Midnight Blue */
    --text-color: #e2e8f0;
    --accent-teal: #00f2ff;
    --accent-gold: #ffd700;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --font-urdu: 'Noto Nastaliq Urdu', serif;
}

[data-theme="light"] {
    --bg-color: #f0f4f8;
    --text-color: #1a202c;
    --accent-teal: #0099a3;
    --accent-gold: #b7791f;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    overflow-x: hidden;
    line-height: 1.6;
}

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

/* Navigation */
.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 15, 28, 0.8);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    display: flex;
    align-items: center;
}

#site-logo {
    height: 50px;
    /* Adjust size as needed */
    width: auto;
    /* 
       The image has a white background. 
       To make it look cool on dark mode without editing the file:
       1. Invert colors (White -> Black, Blue Text -> Orange/Gold)
       2. Screen blend mode (Black becomes transparent)
       3. Adjust contrast/brightness to make it pop
    */
    filter: invert(1) hue-rotate(180deg) brightness(1.5);
    mix-blend-mode: screen;
    transition: transform 0.3s;
}

[data-theme="light"] #site-logo {
    filter: none;
    mix-blend-mode: multiply;
}

#site-logo:hover {
    transform: scale(1.05);
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent-gold);
}

#theme-toggle {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    margin-left: 2rem;
    color: var(--text-color);
    font-family: var(--font-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.8;
    transition: opacity 0.3s;
}

#theme-toggle:hover {
    opacity: 1;
    color: var(--accent-gold);
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 1rem;
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, var(--accent-teal));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.typing-container {
    font-size: 1.5rem;
    color: var(--accent-gold);
    margin-bottom: 2rem;
    font-family: monospace;
}

.cursor {
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.highlight {
    color: var(--accent-teal);
}

/* Sections */
.content-section {
    padding: 5rem 2rem;
    min-height: 80vh;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 2rem;
    border-left: 4px solid var(--accent-gold);
    padding-left: 1rem;
}

/* Cards */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(5px);
    transition: transform 0.3s;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-teal);
}

.interest-list {
    list-style: none;
    margin-top: 1.5rem;
}

.interest-list li {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

/* Blog Grid */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.blog-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-tag {
    font-size: 0.8rem;
    color: var(--accent-teal);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.blog-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

.urdu-text {
    font-family: var(--font-urdu);
    font-size: 1.4rem;
    line-height: 2;
    text-align: right;
    direction: rtl;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 3rem;
    background: #0a0f1c;
    /* Solid background for readability */
    border: 1px solid var(--accent-teal);
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 2rem;
    cursor: pointer;
}

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

.modal-date {
    color: var(--accent-gold);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: block;
}

.modal-body-content {
    margin-top: 2rem;
    font-size: 1.1rem;
    line-height: 1.8;
    white-space: pre-wrap;
    /* Preserves line breaks in JSON text */
}

/* Mobile */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
        /* Simple hide for now, can add hamburger later */
    }
}