:root {
    --bg-dark: #030712;
    --bg-card: rgba(17, 24, 39, 0.7);
    --bg-card-hover: rgba(31, 41, 55, 0.8);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --accent-primary: #00f3ff;
    --accent-secondary: #bd00ff;
    --accent-glow: rgba(0, 243, 255, 0.15);

    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;

    --border-light: rgba(255, 255, 255, 0.05);
    --transition-speed: 0.3s;
}

[data-theme="light"] {
    --bg-dark: #f0fdfa;
    /* Very light teal/white */
    --bg-card: rgba(255, 255, 255, 0.7);
    --bg-card-hover: rgba(255, 255, 255, 0.9);
    --text-main: #1f2937;
    --text-muted: #4b5563;
    --accent-primary: #0891b2;
    /* Darker cyan for light mode */
    --accent-secondary: #7e22ce;
    --accent-glow: rgba(8, 145, 178, 0.15);
    --border-light: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .navbar {
    background: rgba(240, 253, 250, 0.8);
    border-bottom: 1px solid var(--border-light);
}

[data-theme="light"] .project-card,
[data-theme="light"] .card {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .project-header h3,
[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4 {
    color: #111827;
}

[data-theme="light"] .tag {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-muted);
}

[data-theme="light"] .hero h1 {
    background: linear-gradient(to right, #111827, #4b5563);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

[data-theme="light"] .nav-links a:hover {
    color: var(--accent-primary);
}

[data-theme="light"] .tags span {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-muted);
}

[data-theme="light"] .tags span:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: var(--accent-primary);
    color: #111827;
}

[data-theme="light"] .contact-pill {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-muted);
    border-color: transparent;
}

[data-theme="light"] .contact-pill:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #111827;
    border-color: var(--accent-primary);
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Effects */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 15% 50%, rgba(189, 0, 255, 0.05), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(0, 243, 255, 0.05), transparent 25%);
    pointer-events: none;
    z-index: -1;
}

.cursor-glow {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 243, 255, 0.08) 0%, transparent 70%);
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: left 0.1s ease, top 0.1s ease;
    mix-blend-mode: screen;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: #fff;
    line-height: 1.2;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: var(--transition-speed);
}

a:hover {
    color: var(--accent-secondary);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(3, 7, 18, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    z-index: 100;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
}

.logo .dot {
    color: var(--accent-primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
}

.nav-links a:hover {
    color: #fff;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width var(--transition-speed);
}

.nav-links a:hover::after {
    width: 100%;
}

.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.2rem;
    transition: color var(--transition-speed);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    color: var(--accent-primary);
}

/* Icon logic:
   - Dark theme (default): Show Sun (to switch to light)
   - Light theme: Show Moon (to switch to dark)
*/

.moon-icon {
    display: none;
}

.sun-icon {
    display: inline-block;
}

[data-theme="light"] .sun-icon {
    display: none;
}

[data-theme="light"] .moon-icon {
    display: inline-block;
}

.highlight {
    color: var(--accent-primary);
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

[data-theme="light"] .highlight {
    color: var(--accent-primary);
    text-shadow: none;
    background: rgba(8, 145, 178, 0.1);
    padding: 0 4px;
    border-radius: 4px;
}

/* Page Layout */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 6rem 0;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}



/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 5rem;
}

.hero-content {
    max-width: 600px;
    z-index: 2;
}

.badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: var(--accent-glow);
    color: var(--accent-primary);
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #9ca3af);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.03em;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.bio {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.cta-group {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
    transition: all var(--transition-speed);
}

.btn.primary {
    background: var(--accent-primary);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.3);
}

.btn.primary:hover {
    background: #fff;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.4);
}

.btn.secondary {
    background: transparent;
    border: 1px solid var(--border-light);
    color: #fff;
}

.btn.secondary:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

[data-theme="light"] .btn.secondary {
    border-color: rgba(0, 0, 0, 0.2);
    color: var(--text-main);
}

[data-theme="light"] .btn.secondary:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Animations included in app.js via IntersectionObserver class toggles */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 2rem;
    transition: all var(--transition-speed);
    backdrop-filter: blur(10px);
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.timeline {
    margin-top: 1.5rem;
}

.timeline-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border-light);
}

.timeline-item .year {
    font-family: var(--font-heading);
    color: var(--accent-secondary);
    font-weight: 700;
}

.timeline-item h4 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.timeline-item .sub {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.cert-list {
    list-style: none;
    margin-top: 1rem;
}

.cert-list li {
    margin-bottom: 0.8rem;
    padding-left: 1.2rem;
    position: relative;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.cert-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
}

.cert-list li.learning {
    color: var(--accent-primary);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1.75rem;
    transition: all var(--transition-speed);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
    transform: translateY(-5px);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.project-header h3 {
    font-size: 1.2rem;
    color: #fff;
    margin-right: 1rem;
}

.tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    white-space: nowrap;
}

.tag.high-priority {
    background: var(--accent-glow);
    color: var(--accent-primary);
    border: 1px solid rgba(0, 243, 255, 0.2);
}

.tech-stack {
    font-size: 0.85rem;
    color: var(--accent-secondary);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.project-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.project-links {
    margin-top: auto;
}

.project-links a {
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.project-links .arrow {
    transition: transform 0.2s;
}

.project-links a:hover .arrow {
    transform: translate(2px, -2px);
}

/* Skills */
.skills-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.skill-category h3 {
    font-size: 1.1rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tags span {
    font-size: 0.85rem;
    padding: 0.3rem 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    border-radius: 50px;
    color: #e5e7eb;
    transition: all 0.2s;
}

.tags span:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    transform: scale(1.05);
}

/* Contact */
.contact-card {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.contact-card p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.contact-links-large {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.contact-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    color: #fff;
    border: 1px solid transparent;
    transition: all var(--transition-speed);
}

.contact-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-primary);
    transform: translateY(-3px);
    color: #fff;
}

.contact-pill .icon {
    font-family: monospace;
    color: var(--accent-primary);
}

/* Footer */
footer {
    padding: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-light);
    margin-top: 4rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }

    .nav-links {
        display: none;
        /* Simple hiding for now, often would do a hamburger menu */
    }

    .hero h1 {
        font-size: 3rem;
    }

    .section {
        padding: 4rem 0;
    }
}