@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary: #111111;
    --bg-secondary: #1a1a1a;
    --bg-card: #1e1e1e;
    --text-primary: #f0f0f0;
    --text-secondary: #888888;
    --text-muted: #555555;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --border: #242424;
    --border-light: #333333;
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
}

#page-bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -3;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
}

#hero-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.2s ease;
    will-change: transform;
    transform: translateZ(0);
}

/* ── Navigation ─────────────────────────────── */

nav {
    position: fixed;
    width: 100%;
    background: transparent;
    z-index: 100;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-brand {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #ffffff;
    text-decoration: none;
    padding: 0.2rem 0;
    flex-shrink: 0;
    transition: opacity 0.15s;
}

.nav-brand:hover {
    opacity: 0.75;
    background: transparent;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 0.1rem;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
    white-space: nowrap;
}

nav a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

li.nav-divider {
    list-style: none;
    width: 1px;
    height: 18px;
    background: #ffffff;
    margin: 0 0.6rem;
    flex-shrink: 0;
    padding: 0;
}

/* ── Hero ───────────────────────────────────── */

#home {
    /* Break out of the section max-width constraint */
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 60px 0 0;

    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;

    position: relative;
}

#home.has-banner .hero h1,
#home.has-banner .hero .tagline {
    color: #fff;
    text-shadow: 0 2px 16px rgba(0,0,0,0.6);
}

.scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    z-index: 1;
    animation: bounce 2s ease-in-out infinite;
}

.scroll-hint-label {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.scroll-hint svg {
    width: 2rem;
    height: 2rem;
    display: block;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0);   opacity: 0.7; }
    50%       { transform: translateX(-50%) translateY(8px); opacity: 1;   }
}

.hero {
    text-align: center;
    padding: 4rem 2rem 2rem;
}

.hero h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.6rem, 7vw, 4.8rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.05;
    margin-bottom: 1rem;
}

.hero .tagline {
    font-size: 1.05rem;
    color: var(--text-secondary);
    font-weight: 300;
    font-style: italic;
    margin-bottom: 1.5rem;
}

.hero-badges {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-badge {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    letter-spacing: 0.02em;
}

/* ── Sections ───────────────────────────────── */

section {
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.4rem;
    letter-spacing: -0.01em;
}

.section-label {
    text-align: center;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #ffffff;
    margin-bottom: 0.4rem;
}

.section-divider {
    width: 36px;
    height: 2px;
    background: #ffffff;
    margin: 0.75rem auto 2rem;
    border-radius: 2px;
    opacity: 0.6;
}

/* ── Card Grid ──────────────────────────────── */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.project-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    background: transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.project-card img,
.project-card video {
    width: 100%;
    height: 210px;
    object-fit: cover;
    display: block;
}

.card-body {
    padding: 1rem 1.1rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.4rem;
    background: rgba(0, 0, 0, 0.50);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.card-body h3 {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-primary);
}

.card-body p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* ── Card links ─────────────────────────────── */

.card-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.7rem;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.card-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-decoration: none;
    transition: color 0.15s;
    white-space: nowrap;
}

.card-links a:hover {
    color: var(--text-primary);
}

.card-links a i {
    font-size: 0.8rem;
}

img.favicon {
    width: 13px;
    height: 13px;
    vertical-align: middle;
    flex-shrink: 0;
    display: inline-block;
    border-radius: 2px;
}

/* ── Project description links ───────────────── */

.project-description ul li a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-primary);
    text-decoration: none;
}

.project-description ul li a:hover {
    color: var(--accent);
}

/* ── Footer ─────────────────────────────────── */

footer {
    text-align: center;
    padding: 2rem;
    border-top: none;
    color: #ffffff;
    font-size: 0.82rem;
    margin-top: 1rem;
}

footer a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.15s;
}

footer a:hover {
    color: #ffffff;
}

/* ── Mobile Menu ────────────────────────────── */

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: 0.3s;
}

/* ── Responsive ─────────────────────────────── */

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    nav ul {
        display: none;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.10);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        padding: 0.75rem 1rem;
    }

    .nav-links.active {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 0.15rem;
    }

    .nav-divider {
        display: none;
    }

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

    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1rem;
    }
}

/* ── Form / Contact (future) ────────────────── */

.contact-content form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

input, textarea {
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

input:focus, textarea:focus {
    outline: 1px solid var(--accent);
}

button {
    padding: 0.5rem 1rem;
    background: var(--accent);
    color: var(--text-primary);
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background: var(--accent-hover);
}
