/* --- Global Variables & Reset --- */
:root {
    /* Dark Mode Palette */
    --bg-dark: #050a14;
    /* Deepest Void */
    --bg-card: #0a192f;
    /* Dark Navy Surface */
    --bg-card-hover: #112240;
    /* Lighter Navy Surface */

    --primary: #0a192f;
    /* Matches card for headers if needed, but mostly used for contrast */
    --accent: #64ffda;
    /* Electric Cyan / Mint */
    --accent-glow: rgba(100, 255, 218, 0.2);
    --secondary: #bd34fe;
    /* Neon Purple for gradients */

    --text-main: #8892b0;
    /* Muted Lavender/Gray */
    --text-headers: #e6f1ff;
    /* Near White */
    --text-highlight: #ccd6f6;
    /* Lighter Gray */

    --border-color: rgba(255, 255, 255, 0.1);

    /* Effects */
    --shadow-soft: 0 10px 30px -10px rgba(2, 12, 27, 0.7);
    --shadow-glow: 0 0 20px var(--accent-glow);
    --glass-bg: rgba(10, 25, 47, 0.7);
    --glass-border: rgba(255, 255, 255, 0.05);

    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    margin: 0;
    padding: 0;
    color: var(--text-main);
    line-height: 1.6;
    background-color: var(--bg-dark);
    /* Dark Background */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-headers);
    margin-top: 0;
    font-weight: 700;
}

a {
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--accent);
}

a:hover {
    color: var(--text-headers);
}

/* --- Header & Navigation --- */
header {
    background-color: rgba(5, 10, 20, 0.85);
    /* Glass effect base */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo-img {
    height: 60px;
    margin-right: 15px;
    /* Invert/Brightness filter if logo is dark, assuming it might need pop */
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.2));
}

.logo-text {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 1px;
    color: var(--text-headers);
}

nav a {
    color: var(--text-main);
    text-decoration: none;
    margin-left: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
}

nav a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent);
    transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 0 8px var(--accent);
}

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

nav a:hover:after {
    width: 100%;
}

nav a.active {
    color: var(--accent);
}

/* --- Hero Section --- */
.hero {
    /* Dark Gradient Background */
    background: radial-gradient(circle at 10% 20%, rgba(20, 30, 60, 1) 0%, rgba(5, 10, 20, 1) 90%);
    padding: 140px 5% 160px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Abstract Grid Overlay */
.hero:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.5;
    pointer-events: none;
}

/* Glowing Orb Effect */
.hero:after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(100, 255, 218, 0.05) 0%, transparent 70%);
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    z-index: 1;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 25px;
    letter-spacing: -2px;
    line-height: 1.1;
    background: linear-gradient(135deg, #e6f1ff 0%, #8892b0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.3rem;
    color: var(--text-main);
    margin-bottom: 50px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    background-color: transparent;
    color: var(--accent);
    padding: 16px 40px;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid var(--accent);
    border-radius: 4px;
    font-size: 1rem;
    font-family: 'SF Mono', 'Fira Code', 'Roboto Mono', monospace;
    /* Tech feel */
    transition: all 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    background-color: rgba(100, 255, 218, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(100, 255, 218, 0.3);
}

.btn-outline {
    border-color: var(--text-main);
    color: var(--text-main);
    margin-left: 20px;
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--text-headers);
    color: var(--text-headers);
    box-shadow: none;
}

/* --- Sections & Grid --- */
.section {
    padding: 120px 5%;
}

.section-alt {
    background-color: #081020;
    /* Slightly lighter/different shade */
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 80px;
    font-size: 2.2rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

/* Lines next to title */
.section-title:before,
.section-title:after {
    content: '';
    display: block;
    width: 80px;
    height: 1px;
    background: #233554;
}

.section-title span {
    color: var(--accent);
    font-family: monospace;
    font-weight: normal;
    font-size: 1.2rem;
    margin-right: 10px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background-color: var(--bg-card);
    padding: 35px;
    border-radius: 6px;
    box-shadow: var(--shadow-soft);
    transition: all 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
    border: 1px solid transparent;
}

.card:hover {
    transform: translateY(-7px);
    background-color: var(--bg-card-hover);
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-headers);
}

.card p {
    color: var(--accent);
    font-family: monospace;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.card li {
    padding-left: 20px;
    position: relative;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

/* Custom bullet points */
.card li:before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* --- Showcase --- */
.project-highlight {
    display: flex;
    align-items: center;
    gap: 60px;
    max-width: 1100px;
    margin: 0 auto 120px;
}

.project-highlight.reverse {
    flex-direction: row-reverse;
}

.project-text {
    flex: 1;
    z-index: 2;
}

.project-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--text-headers);
}

.project-text p {
    background-color: var(--bg-card-hover);
    padding: 25px;
    border-radius: 6px;
    color: var(--text-light);
    box-shadow: var(--shadow-soft);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 20px;
    border-left: 3px solid var(--accent);
}

.tag {
    display: inline-block;
    color: var(--accent);
    font-family: monospace;
    font-size: 0.85rem;
    margin-right: 15px;
    margin-bottom: 5px;
}

.project-visual {
    flex: 1.2;
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid #233554;
    transition: all 0.25s;
}

.project-visual:hover {
    border-color: var(--accent);
}

.project-visual:before {
    /* Overlay to tint images until hover */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(10, 25, 47, 0.4);
    transition: all 0.25s;
    z-index: 1;
    pointer-events: none;
}

.project-visual:hover:before {
    background-color: transparent;
}

.project-visual img,
.project-visual video {
    width: 100%;
    height: auto;
    display: block;
    position: relative;
    z-index: 0;
    filter: grayscale(100%) contrast(1.1);
    transition: all 0.25s;
    object-fit: cover;
    /* Ensures video fills correctly if aspect ratio differs slightly */
}

.project-visual:hover img,
.project-visual:hover video,
.project-visual.video-active video {
    filter: none;
}

/* --- About Page Specifics --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 900px;
    margin: -80px auto 80px;
    z-index: 10;
    position: relative;
}

.stat-card {
    background: rgba(17, 34, 64, 0.9);
    backdrop-filter: blur(5px);
    padding: 40px 20px;
    text-align: center;
    border-radius: 6px;
    box-shadow: 0 10px 30px -15px rgba(2, 12, 27, 0.7);
    border: 1px solid #233554;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(100, 255, 218, 0.3);
}

.stat-label {
    font-weight: 600;
    color: var(--text-headers);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2px;
}

.logo-wall {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

.logo-item {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    border: 1px solid #233554;
    padding: 15px 30px;
    border-radius: 4px;
    transition: all 0.2s;
}

.logo-item:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(100, 255, 218, 0.05);
}

/* --- Contact & Footer --- */
.contact-section {
    background: linear-gradient(180deg, var(--bg-dark) 0%, #020c1b 100%);
    text-align: center;
    padding-bottom: 100px;
}

.contact-container {
    padding: 60px;
    max-width: 600px;
    margin: 0 auto;
}

footer {
    text-align: center;
    padding: 30px;
    font-size: 0.85rem;
    color: var(--text-main);
    font-family: monospace;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .header {
        padding: 20px;
    }

    .project-highlight,
    .project-highlight.reverse {
        flex-direction: column;
        gap: 40px;
    }

    .project-text p {
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        margin-top: 40px;
        gap: 15px;
    }

    .hero h1 {
        font-size: 2.8rem;
    }
}