/* 
=============================================
PORTFOLIO STYLES
A clean, game-inspired minimal stylesheet
=============================================
*/

/* 
=============================================
CSS VARIABLES — EASY TO CUSTOMIZE
Change these values to quickly update 
the entire site's look and feel
=============================================
*/
:root {
    /* Colors - Muted, sophisticated palette */
    --color-bg: #F5F3F0;              /* Warm off-white background */
    --color-bg-alt: #EDEAE5;          /* Slightly darker for sections */
    --color-surface: #FFFFFF;          /* Card/surface white */
    --color-text: #2A2926;             /* Dark warm gray for text */
    --color-text-muted: #6B6862;       /* Muted text for secondary info */
    --color-accent: #C4705A;           /* Warm terracotta accent */
    --color-accent-hover: #A85D4A;     /* Darker accent for hover */
    --color-border: #D8D4CE;           /* Subtle borders */
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --font-mono: 'Space Mono', monospace;  /* Game-inspired touch */
    
    /* Spacing scale (8px base) */
    --space-xs: 0.5rem;    /* 8px */
    --space-sm: 1rem;      /* 16px */
    --space-md: 1.5rem;    /* 24px */
    --space-lg: 2rem;      /* 32px */
    --space-xl: 3rem;      /* 48px */
    --space-2xl: 5rem;     /* 80px */
    --space-3xl: 8rem;     /* 128px */
    
    /* Layout */
    --max-width: 1200px;
    --border-radius: 4px;  /* Subtle, pixel-precise corners */
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
}

/* 
=============================================
RESET & BASE STYLES
=============================================
*/
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

/* 
=============================================
UTILITY CLASSES
=============================================
*/
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* 
=============================================
NAVIGATION
Fixed minimal nav with game-inspired 
monospace elements
=============================================
*/
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: var(--space-sm) 0;
    background-color: rgba(245, 243, 240, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
}

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

.nav__logo {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Decorative pixel marker before logo */
.nav__logo::before {
    content: '■';
    color: var(--color-accent);
    margin-right: var(--space-xs);
}

.nav__links {
    display: flex;
    gap: var(--space-md);
    list-style: none;
}

.nav__link {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.nav__link:hover {
    color: var(--color-accent);
}

/* Active nav link state */
.nav__link--active {
    color: var(--color-accent);
}

/* 
=============================================
HERO SECTION
Large, impactful intro with featured artwork
=============================================
*/
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: var(--space-3xl) 0 var(--space-2xl);
}

.hero__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
}

.hero__content {
    max-width: 500px;
}

/* Small label above the main title */
.hero__label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

/* Decorative line after label */
.hero__label::after {
    content: '';
    width: 32px;
    height: 1px;
    background-color: var(--color-accent);
}

.hero__title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-md);
}

.hero__description {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
    max-width: 400px;
}

.hero__cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--color-accent);
    padding-bottom: 2px;
    border-bottom: 1px solid var(--color-accent);
    transition: gap var(--transition-base);
}

.hero__cta:hover {
    gap: var(--space-sm);
}

.hero__cta-arrow {
    transition: transform var(--transition-base);
}

.hero__cta:hover .hero__cta-arrow {
    transform: translateX(4px);
}

/* Featured image container with subtle border */
.hero__image {
    position: relative;
    min-height: 400px;
    height: 60vh;
    background-color: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    z-index: 1;
}

/* Grid overlay for game-inspired touch */
.hero__image::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(42, 41, 38, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(42, 41, 38, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: 0;
}

.hero__image img,
.hero__image video {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    z-index: 1;
}

/* Placeholder text for empty image */
.hero__image-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.project-detail__gallery img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    font-weight: bold;
    transition: color 0.3s;
}

.close:hover {
    color: #ccc;
}

/* 
=============================================
PAGE HEADER
For inner pages (project details, etc.)
=============================================
*/
.page-header {
    padding: var(--space-3xl) 0 var(--space-xl);
}

.page-header__label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.page-header__label::after {
    content: '';
    width: 32px;
    height: 1px;
    background-color: var(--color-accent);
}

.page-header__title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-md);
}

.page-header__description {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    max-width: 600px;
}

/* 
=============================================
SECTION STYLES
Reusable section header components
=============================================
*/
.section {
    padding: var(--space-3xl) 0;
}

.section--alt {
    background-color: var(--color-bg-alt);
}

.section__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: var(--space-xl);
}

.section__label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xs);
}

.section__title {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.section__count {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/*
=============================================
WORK/PORTFOLIO SECTION
Grid layout for project thumbnails
=============================================
*/
.work {
    padding: var(--space-3xl) 0;
    background-color: var(--color-bg-alt);
    position: relative;
}

/* Grid overlay for background */
.work::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(42, 41, 38, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(42, 41, 38, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: 0;
}

.work .container {
    position: relative;
    z-index: 1;
}

/* Project grid - responsive columns */
.work__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-md);
}

/* Individual project card */
.project {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.project:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(42, 41, 38, 0.08);
}

.project__image {
    aspect-ratio: 16/10;
    background-color: var(--color-bg-alt);
    overflow: hidden;
    position: relative;
}

/* Subtle grid overlay on project images */
.project__image::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(42, 41, 38, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(42, 41, 38, 0.02) 1px, transparent 1px);
    background-size: 16px 16px;
    pointer-events: none;
    transition: opacity var(--transition-base);
}

.project:hover .project__image::after {
    opacity: 1;
}

.project__image img,
.project__image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.project:hover .project__image img,
.project:hover .project__image video {
    transform: scale(1.02);
}

/* Placeholder for empty project images */
.project__image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.625rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project__content {
    padding: var(--space-md);
}

.project__category {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    margin-bottom: var(--space-xs);
}

.project__title {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.project__description {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* 
=============================================
PROJECT DETAIL PAGE STYLES
For individual project pages
=============================================
*/
.project-detail__image {
    width: 100%;
    background-color: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: var(--space-xl);
    position: relative;
}

.project-detail__image::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(42, 41, 38, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(42, 41, 38, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: 0;
}

.project-detail__image img,
.project-detail__image video {
    width: 100%;
    height: auto;
    position: relative;
    z-index: 1;
}

.project-detail__meta {
    display: flex;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}

.project-detail__meta-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.project-detail__meta-label {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
}

.project-detail__meta-value {
    font-size: 0.875rem;
    font-weight: 500;
}

.project-detail__content {
    max-width: 720px;
}

.project-detail__content p {
    margin-bottom: var(--space-md);
    line-height: 1.7;
}

.project-detail__content h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
}

.project-detail__gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin: var(--space-xl) 0;
}

.project-detail__gallery-image {
    background-color: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.project-detail__gallery-image img,
.project-detail__gallery-image video {
    width: 100%;
    height: auto;
}

/* Back link for project pages */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
    transition: color var(--transition-fast);
}

.back-link:hover {
    color: var(--color-accent);
}

.back-link__arrow {
    transition: transform var(--transition-base);
}

.back-link:hover .back-link__arrow {
    transform: translateX(-4px);
}

/* 
=============================================
ABOUT SECTION
Bio and profile image side by side
=============================================
*/
.about {
    padding: var(--space-3xl) 0;
}

.about__inner {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-xl);
    align-items: start;
}

.about__image {
    aspect-ratio: 1;
    background-color: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
}

.about__image img,
.about__image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Decorative corner accents - game UI inspired */
.about__image::before,
.about__image::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border: 2px solid var(--color-bg);
}

.about__image::before {
    top: var(--space-sm);
    left: var(--space-sm);
    border-right: none;
    border-bottom: none;
    z-index: 1;
}

.about__image::after {
    bottom: var(--space-sm);
    right: var(--space-sm);
    border-left: none;
    border-top: none;
    z-index: 1;
}

.about__content {
    max-width: 600px;
}

.about__text {
    font-size: 1.125rem;
    line-height: 1.7;
    margin-bottom: var(--space-md);
}

.about__text:last-of-type {
    margin-bottom: var(--space-lg);
}

/* Skills/tools list */
.about__skills {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.skill-tag {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--space-xs) var(--space-sm);
    background-color: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    color: var(--color-text-muted);
}

/*
=============================================
CLIENTS SECTION
Grid layout for client logos
=============================================
*/
.clients {
    padding: var(--space-3xl) 0;
}

.clients__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
}

.client {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.client:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(42, 41, 38, 0.06);
}

.client__logo {
    aspect-ratio: 16/9;
    background-color: var(--color-bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    position: relative;
}

.client__logo img,
.client__logo video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: filter var(--transition-base), opacity var(--transition-base);
}

.client:hover .client__logo img,
.client:hover .client__logo video {
    filter: grayscale(0%);
    opacity: 1;
}

.client__logo-placeholder {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/*
=============================================
CONTACT SECTION
Simple, minimal contact info
=============================================
*/
.contact {
    padding: var(--space-3xl) 0;
    background-color: var(--color-bg-alt);
}

.contact__inner {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact__title {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-sm);
}

.contact__description {
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
}

.contact__email {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--color-accent);
    padding-bottom: 2px;
    border-bottom: 1px solid var(--color-accent);
    margin-bottom: var(--space-xl);
    transition: color var(--transition-fast), border-color var(--transition-fast);
}

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

/* Social links */
.contact__socials {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
}

.social-link {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.social-link:hover {
    color: var(--color-accent);
}

/* 
=============================================
FOOTER
Minimal footer with credits
=============================================
*/
.footer {
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--color-border);
}

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

.footer__text {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* 
=============================================
RESPONSIVE STYLES
Mobile-first adjustments
=============================================
*/
@media (max-width: 900px) {
    .hero__inner {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .hero__content {
        order: 2;
        text-align: center;
        max-width: 100%;
    }

    .hero__label {
        justify-content: center;
    }

    .hero__description {
        max-width: 100%;
    }

    .hero__image {
        order: 1;
    }

    .about__inner {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .about__image {
        max-width: 280px;
    }

    .about__content {
        max-width: 100%;
    }

    .project-detail__meta {
        flex-wrap: wrap;
        gap: var(--space-md);
    }

    .project-detail__gallery {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .nav__links {
        gap: var(--space-sm);
    }

    .nav__link {
        font-size: 0.6875rem;
    }

    .work__grid {
        grid-template-columns: 1fr;
    }

    .footer__inner {
        flex-direction: column;
        gap: var(--space-sm);
        text-align: center;
    }

    .page-header__label {
        justify-content: center;
    }

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

    .page-header__description {
        margin: 0 auto;
    }
}
