/* David the Gnomad - Main Styles */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&family=Cormorant+Garamond:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    /* Color Palette - Forest & Magic inspired */
    --color-bg-dark: #0f1410;
    /* Very dark forest green */
    --color-bg-light: #f4f6f3;
    /* Mist white */
    --color-text-main: #e0e5e0;
    --color-text-dark: #1a231b;
    --color-accent: #d96c4bc0;
    /* Terracotta/Mushroom */
    --color-accent-glow: #d96c4b;
    --color-secondary: #5c8065;
    /* Sage */

    /* Typography */
    --font-main: 'Outfit', sans-serif;
    --font-display: 'Cormorant Garamond', serif;

    /* Spacing */
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;
}

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

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

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Intro Animation */
#intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background-color: var(--color-bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    animation: fadeOutIntro 1s ease-in-out 3.5s forwards;
    pointer-events: none;
    /* Let clicks pass through after animation starts fading */
}

.intro-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/images/hero-bg.png');
    background-size: cover;
    background-position: center;
    animation: forestWalk 4s ease-out forwards;
    filter: brightness(0.8);
}

.intro-text {
    position: relative;
    z-index: 2;
    color: #fff;
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 4rem);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    opacity: 0;
    animation: fadeInText 1s ease-out 0.5s forwards, fadeOutText 1s ease-in 3s forwards;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

@keyframes forestWalk {
    0% {
        transform: scale(1.1) translate(0, 0);
    }

    100% {
        transform: scale(1.2) translate(-2%, -2%);
    }
}

@keyframes fadeInText {
    to {
        opacity: 1;
        transform: translateY(0);
    }

    from {
        opacity: 0;
        transform: translateY(20px);
    }
}

@keyframes fadeOutText {
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

@keyframes fadeOutIntro {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.vis-hidden {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(20px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.vis-visible {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* Navigation - Minimal */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: var(--spacing-md);
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    mix-blend-mode: difference;
}

.logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}

.logo img {
    height: 80px;
    width: auto;
    margin-bottom: -15px;
    /* Pull text up */
    z-index: 1;
}

.logo span {
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    /* Ensure legibility */
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
}

.nav-links a {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.7;
}

.nav-links a:hover {
    opacity: 1;
}

/* Section Basics */
section {
    min-height: 100vh;
    padding: var(--spacing-lg) 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    line-height: 1.1;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 400;
    margin-bottom: var(--spacing-md);
    line-height: 1;
}

em {
    font-style: italic;
    font-weight: 300;
    color: var(--color-accent);
}

/* Hero Section Specifics */
#hero {
    position: relative;
    background-image: linear-gradient(rgba(15, 20, 16, 0.3), rgba(15, 20, 16, 0.8)), url('../assets/images/hero-bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Parallax-ish effect */
    display: flex;
    align-items: flex-start;
    /* Align text to left/top area usually better for hero */
    justify-content: center;
}

.hero-content {
    max-width: 800px;
    z-index: 2;
}

.hero-content p {
    font-size: 1.25rem;
    letter-spacing: 0.05em;
    max-width: 60ch;
    margin-top: var(--spacing-sm);
    opacity: 0.9;
}

h2 {
    font-size: clamp(2rem, 5vw, 4rem);
    margin-bottom: var(--spacing-lg);
    font-weight: 400;
    text-align: center;
}

/* About Section */
.about-grid {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    max-width: 800px;
    margin: 0 auto;
    align-items: center;
    text-align: center;
}

.about-image img {
    width: 100%;
    max-width: 300px;
    /* Significantly smaller */
    height: auto;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.about-text p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--color-text-main);
    opacity: 0.9;
    margin-bottom: 1rem;
}

/* Work / Gallery Section */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    width: 100%;
}

.gallery-item {
    position: relative;
    aspect-ratio: 16/9;
    background-color: var(--color-secondary);
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.4s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: var(--spacing-md);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-info {
    opacity: 1;
    transform: translateY(0);
}

.gallery-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #fff;
}



/* Apps Section - Wide Cards */
.apps-stack {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    padding: 2rem 0;
}

.app-wide-card {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    background-color: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    min-height: 350px;
    transition: transform 0.3s ease;
}

.app-wide-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

/* Alternating Colors */
.app-wide-card:nth-child(odd) {
    background-color: #f8f9fa;
    color: #1a231b;
}

.app-wide-card:nth-child(even) {
    background-color: #2a3b22;
    /* Dark Green */
    color: #fff;
}

.app-content {
    flex: 1;
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
}

.app-content h3 {
    font-size: 2.2rem;
    margin: 0;
    font-family: var(--font-display);
}

.app-content p {
    font-size: 1.1rem;
    max-width: 45ch;
    opacity: 0.9;
    line-height: 1.7;
}

.app-image {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.app-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.app-wide-card:hover .app-image img {
    transform: scale(1.05);
}

/* Button Styling */
.btn-learn-more {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    border-radius: 4px;
    /* Slightly rounded rect */
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    width: fit-content;
    transition: all 0.3s ease;
    text-decoration: none;
    margin-top: 1rem;
}

/* Odd cards (Light bg) -> White button with dark text/border */
.app-wide-card:nth-child(odd) .btn-learn-more {
    background-color: #fff;
    color: #1a231b;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.app-wide-card:nth-child(odd) .btn-learn-more:hover {
    background-color: #1a231b;
    color: #fff;
    border-color: #1a231b;
    transform: translateY(-2px);
}

/* Even cards (Dark bg) -> White button */
.app-wide-card:nth-child(even) .btn-learn-more {
    background-color: #fff;
    color: #2a3b22;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.app-wide-card:nth-child(even) .btn-learn-more:hover {
    background-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.arrow {
    transition: transform 0.3s ease;
}

.btn-learn-more:hover .arrow {
    transform: translateX(4px);
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
    .app-wide-card {
        flex-direction: column-reverse;
        max-width: 500px;
        margin: 0 auto;
    }

    .app-image {
        width: 100%;
        height: 250px;
        min-height: 250px;
    }

    .app-content {
        padding: 2rem;
        align-items: flex-start;
    }
}

/* Contact Section */
#contact {
    text-align: center;
    align-items: center;
}

#contact p {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-lg);
    color: var(--color-text-main);
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: var(--color-accent);
    color: #fff;
    box-shadow: 0 0 20px var(--color-accent);
}

/* Footerish */
footer {
    padding: var(--spacing-md);
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.5;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}