@layer base, utils, components;

@import 'vendor/webtui/css/base.css';

/* Utils */
@import 'vendor/webtui/css/utils/box.css';

/* Components */
@import 'vendor/webtui/css/components/button.css';
@import 'vendor/webtui/css/components/typography.css';
@import 'vendor/webtui/css/components/badge.css';
@import 'vendor/webtui/css/components/spinner.css';
@import 'vendor/webtui/css/components/separator.css';

/* Plugins */
@import 'vendor/webtui/plugin-nf/index.css';

/* Theme */
@import 'vendor/webtui/theme-nord/index.css';


* { box-sizing: border-box; }

body {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 1rem;
    border-bottom: var(--box-border);
}

nav .nav-links {
    display: flex;
    gap: 1.5rem;
}

footer {
    margin-top: 4rem;
    padding-top: 1rem;
    border-top: var(--box-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.hero {
    margin-bottom: 3rem;
    padding: 2rem;
    border: var(--box-border);
}

.hero h1 { margin-bottom: 0.5rem; }
.hero p { margin-bottom: 0; max-width: 60ch; }

.projects-section h2 {
    margin-bottom: 1.5rem;
}

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

.project-card {
    border: var(--box-border);
    text-decoration: none;
    color: inherit;
    display: block;
    transition: opacity 0.15s;
}

.project-card:hover { opacity: 0.75; }

.project-card .card-image {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
    background: var(--color-nord1);
}

.project-card .card-image-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--color-nord1);
    display: flex;
    /* box-sizing: border-box;
    display: block;
    object-fit: contain; */
    align-items: center;
    justify-content: center;
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--color-nord3);
}

.project-card .card-body {
    padding: 1rem;
    border-top: var(--box-border);
}

.project-card .card-body h3 { margin-bottom: 0.25rem; }
.project-card .card-body p  { margin-bottom: 0.5rem; font-size: 0.875rem; }

.card-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.back-link {
    margin-bottom: 1.5rem;
    display: block;
}

.project-header {
    margin-bottom: 5rem;
}

.project-header .header-image {
    width: 100%;
    aspect-ratio: 21/9;
    object-fit: cover;
    border: var(--box-border);
    display: block;
    background: var(--color-nord1);
}

.project-header .header-image-placeholder {
    width: 100%;
    aspect-ratio: 21/9;
    background: var(--color-nord1);
    border: var(--box-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: monospace;
    font-size: 0.875rem;
    color: var(--color-nord3);
    margin-bottom: 1.5rem;
}

.project-header h1 { margin-bottom: 0.5rem; }

.project-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 0.75rem;
    margin-bottom: 1.5rem;
}

.project-meta span { font-size: 0.875rem; color: var(--color-nord4); }

.project-sections {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.project-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: var(--box-border);
    margin-bottom: 5rem;
}

.project-section.reverse {
    direction: rtl;
}

.project-section.reverse > * {
    direction: ltr;
}

.section-text {
    padding: 2rem;
}

.section-text h2 { margin-bottom: 0.75rem; }
.section-text p  { margin-bottom: 0.75rem; font-size: 0.9375rem; line-height: 1.6; }
.section-text p:last-child { margin-bottom: 0; }

.section-image {
    border-left: var(--box-border);
}

.project-section.reverse .section-image {
    border-left: none;
    border-right: var(--box-border);
}

.section-image img,
.section-image video,
.section-image .image-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.section-image .image-placeholder {
    background: var(--color-nord1);
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--color-nord3);
}

@media (max-width: 640px) {
    .project-section,
    .project-section.reverse {
        grid-template-columns: 1fr;
        direction: ltr;
    }

    .project-section.reverse .section-image {
        border-right: none;
        border-top: var(--box-border);
    }

    .section-image {
        border-left: none;
        border-top: var(--box-border);
    }
}