/* Base Resets & Variables */
:root {
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --accent: #38bdf8;
    --accent-glow: rgba(56, 189, 248, 0.4);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.75); /* Made slightly more opaque to read text over the animation */
    --glass-border: rgba(255, 255, 255, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
html { scroll-behavior: smooth; }
body { background: var(--bg-darker); color: var(--text-main); line-height: 1.6; min-height: 100vh; overflow-x: hidden; }

/* Matrix Canvas Styling */
#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1; /* Keeps it behind everything */
    opacity: 0.25; /* Subtle opacity so it doesn't distract from reading */
}

/* Typography & Layout */
.container { width: 90%; max-width: 1100px; margin: auto; padding: 40px 0; }
h1, h2, h3 { color: #fff; margin-bottom: 15px; font-weight: 600; }
h2 { font-size: 2.2rem; margin-bottom: 25px; }
p { color: var(--text-muted); margin-bottom: 15px; }
.text-center { text-align: center; }
.text-accent { color: var(--accent); }

/* Glassmorphism Components */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}
.card-padding { padding: 40px; }

/* Header & Nav */
.header-nav { position: sticky; top: 10px; z-index: 1000; width: 95%; max-width: 1200px; margin: 10px auto; padding: 0 20px; }
.nav { padding: 15px 0; display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 800; margin: 0; }
.logo span { color: var(--accent); }

nav { display: flex; gap: 20px; }
nav a { color: var(--text-main); text-decoration: none; font-size: 0.95rem; font-weight: 600; transition: color 0.3s ease; }
nav a:hover { color: var(--accent); }
.menu-toggle { display: none; font-size: 1.5rem; cursor: pointer; color: var(--text-main); }

/* Hero Section */
.hero { height: 80vh; display: flex; justify-content: center; align-items: center; text-align: center; }
.hero-subtitle { color: var(--accent); font-size: 1.2rem; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 10px; }
.hero h2 { font-size: 3.5rem; font-weight: 800; line-height: 1.2; margin-bottom: 20px; }
.hero h2 span { background: linear-gradient(to right, #38bdf8, #818cf8); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.btn { display: inline-block; background: var(--accent); color: #000; padding: 12px 28px; border-radius: 8px; text-decoration: none; font-weight: 600; margin-top: 20px; transition: all 0.3s ease; box-shadow: 0 0 15px var(--accent-glow); }
.btn:hover { background: #fff; transform: translateY(-2px); box-shadow: 0 0 25px var(--accent-glow); }

/* Sections & Grid Layouts */
.section { margin: 40px auto; }
.section-title { margin-bottom: 40px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 25px; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }

/* Cards & Hover Effects */
.card { padding: 30px; transition: all 0.4s ease; border-top: 2px solid transparent; }
.card:hover { transform: translateY(-8px); border-top: 2px solid var(--accent); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); background: rgba(30, 41, 59, 0.95); }
.card-icon { font-size: 2.5rem; color: var(--accent); margin-bottom: 20px; }

/* Lists & Badges */
.custom-list { list-style: none; }
.custom-list li { margin-bottom: 10px; color: var(--text-muted); display: flex; align-items: flex-start; gap: 10px; }
.custom-list i { color: var(--accent); margin-top: 4px; font-size: 0.9rem; }
.badge { display: inline-block; background: rgba(56, 189, 248, 0.1); color: var(--accent); padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; margin-bottom: 15px; border: 1px solid var(--accent-glow); }
.badge-alt { background: rgba(129, 140, 248, 0.1); color: #818cf8; border-color: rgba(129, 140, 248, 0.3); }

/* Tags (Tools section) */
.tags-container { display: flex; flex-wrap: wrap; gap: 15px; justify-content: center; }
.tag { background: rgba(255, 255, 255, 0.05); padding: 10px 20px; border-radius: 8px; font-size: 0.95rem; border: 1px solid var(--glass-border); transition: all 0.3s; }
.tag:hover { background: var(--accent); color: #000; border-color: var(--accent); box-shadow: 0 0 15px var(--accent-glow); }

/* Contact Links */
.contact-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; margin-top: 20px; }
.contact-btn { display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, 0.05); padding: 12px 24px; border-radius: 8px; color: #fff; text-decoration: none; border: 1px solid var(--glass-border); transition: all 0.3s; }
.contact-btn:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--accent); transform: translateY(-2px); }

/* Animations */
.popup { opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.popup.show { opacity: 1; transform: translateY(0); }

footer { text-align: center; padding: 30px; border-top: 1px solid var(--glass-border); color: var(--text-muted); font-size: 0.9rem; margin-top: 50px; }

/* Mobile View */
@media (max-width: 850px) {
    .about-grid { grid-template-columns: 1fr; }
    .hero h2 { font-size: 2.5rem; }
    .menu-toggle { display: block; }
    nav { display: none; flex-direction: column; width: 100%; position: absolute; top: 70px; left: 0; background: var(--bg-dark); padding: 20px; border-radius: 12px; border: 1px solid var(--glass-border); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
    nav.active { display: flex; }
}