:root {
    --bg-dark: #0a192f;
    --bg-darker: #020c1b;
    --text-main: #ccd6f6;
    --text-bright: #ffffff;
    --accent-cyan: #00f3ff;
    --accent-blue: #0077ff;
    --glass: rgba(10, 25, 47, 0.7);
    --glass-border: rgba(0, 243, 255, 0.1);

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

    --transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

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

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

/* Halo Effect - Immersive Dimension */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: radial-gradient(circle at center, transparent 30%, rgba(0, 243, 255, 0.03) 70%, rgba(0, 243, 255, 0.15) 100%);
    box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.5);
    /* Deepens the corners */
    mix-blend-mode: screen;
    /* Blends nicely with dark bg */
    animation: haloPulse 8s ease-in-out infinite;
}

@keyframes haloPulse {

    0%,
    100% {
        opacity: 0.6;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.02);
    }

    /* Subtle expansion/breathing */
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-accent {
    color: var(--accent-cyan);
}

.text-center {
    text-align: center;
}

/* Typography */
h1,
h2,
h3,
h4 {
    color: var(--text-bright);
    margin-bottom: 20px;
    font-weight: 700;
}

h1 {
    font-size: clamp(40px, 8vw, 80px);
    line-height: 1.1;
}

h2 {
    font-size: clamp(26px, 5vw, 42px);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    background: rgba(10, 25, 47, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo-img {
    height: 80px;
    /* Increased from 50px for better visibility */
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
}

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

.nav-links a.active {
    color: var(--accent-cyan);
    border-bottom: 2px solid var(--accent-cyan);
    padding-bottom: 5px;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    background: var(--bg-dark);
    overflow: hidden;
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    background: rgba(10, 25, 47, 0.75);
    backdrop-filter: blur(8px);
    padding: 30px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    color: var(--accent-cyan);
    font-family: monospace;
    font-size: 16px;
    margin-bottom: 20px;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border: 1px solid var(--accent-cyan);
    border-radius: 4px;
    color: var(--accent-cyan);
    text-decoration: none;
    font-family: monospace;
    font-size: 14px;
    margin-top: 30px;
    transition: var(--transition);
    background: transparent;
    cursor: pointer;
}

.btn:hover {
    background: rgba(0, 243, 255, 0.1);
    transform: translateY(-2px);
}

/* Services / Features */
.section {
    padding: 100px 0;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 50px;
}

.bio-grid {
    grid-template-columns: 2fr 1fr;
    gap: 60px;
}

.card {
    background: #112240;
    padding: 30px;
    border-radius: 4px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-cyan);
    box-shadow: 0 10px 30px -15px rgba(2, 12, 27, 0.7);
}

.card-icon {
    font-size: 40px;
    color: var(--accent-cyan);
    margin-bottom: 20px;
}

/* Footer */
footer {
    background: var(--bg-darker);
    padding: 40px 0;
    text-align: center;
    font-size: 14px;
    color: #8892b0;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Flip Card Styles */
.flip-card {
    background-color: transparent;
    width: 100%;
    height: 250px;
    perspective: 1000px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 4px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 1px solid transparent;
}

.flip-card-front {
    background-color: #112240;
    color: var(--text-bright);
    border: 1px solid rgba(0, 243, 255, 0.1);
}

.flip-card-back {
    background-color: #020c1b;
    color: var(--text-main);
    transform: rotateY(180deg);
    border: 2px solid var(--accent-cyan);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.2);
}

.flip-card-front h3 {
    font-size: 1.8rem;
    /* Larger Title on Front */
    margin: 0;
    color: var(--accent-cyan);
    font-family: 'Roboto Mono', monospace;
}

/* Profile Photo */
.profile-photo {
    float: left;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 25px;
    margin-bottom: 15px;
    border: 3px solid var(--accent-cyan);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.3);

    /* Incrusté / Halo effect */
    shape-outside: circle(50%);
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
}

.menu-toggle .bar {
    width: 30px;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 2px;
    transition: var(--transition);
}

/* Mobile Responsiveness */
@media screen and (max-width: 768px) {

    /* Navigation */
    .menu-toggle {
        display: flex;
        z-index: 1001;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -100%;
        /* Hidden by default */
        width: 70%;
        height: 100vh;
        background-color: #0a192f;
        /* Same as navbar background */
        padding-top: 100px;
        transition: right 0.4s ease-in-out;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        text-align: center;
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 20px;
        font-size: 18px;
    }

    /* Layout Adjustments */
    .hero h1 {
        font-size: 2.5rem;
    }

    /* .hero-content styles are now global */

    .hero-subtitle {
        font-size: 14px;
    }

    .section {
        padding: 60px 0;
    }

    .grid,
    .bio-grid {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }

    .logo-img {
        height: 60px;
    }

    /* Flip Card Specifics for Mobile */
    .flip-card {
        height: 300px;
        /* Give more height for text on mobile */
    }
}