/* =============================
   Variables
   ============================= */
:root {
    --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    --font-size: 16px;
    --line-height: 1.7;

    --color-bg: #ffffff;
    --color-surface: #ffffff;

    --color-text: #111111;
    --color-muted: #6b6b6b;

    --color-accent: #e86a1f; /* warm orange */
    --color-border: #e1e1e1;
}

/* =============================
   Base
   ============================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background: var(--color-bg);
    font-family: var(--font-body);
    color: var(--color-text);
    font-size: var(--font-size);
    line-height: var(--line-height);
    display: flex;
    justify-content: center;
}

.page {
    width: 100%;
    max-width: 1080px;
    background: var(--color-surface);
    padding: 40px 32px;
    margin: 0;
    border: none;
}

/* =============================
   Header
   ============================= */
.site-header {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    border-bottom: 2px solid var(--color-text);
    padding-bottom: 24px;
    margin-bottom: 40px;
}

.brand {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
}

.avatar-circle {
    width: 40px;
    height: 40px;
    border: 1px solid var(--color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.site-title {
    margin: 0;
    font-size: 2.8rem;
    line-height: 1.1;
    text-transform: uppercase;
}

.tagline {
    margin: 6px 0 0;
    color: var(--color-muted);
}

/* nav */
.site-nav {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    align-items: flex-start;
}

.site-nav a {
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-text);
    border-bottom: 2px solid transparent;
}

.site-nav a:hover {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

/* =============================
   Main Grid
   ============================= */
main {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 28px 24px;
}

.intro {
    grid-column: 1 / span 7;
}

/* section headings */
.section {
    grid-column: 1 / span 12;
}

.section-heading {
    border-top: 2px solid var(--color-text);
    padding-top: 10px;
}

.section-heading h2 {
    font-size: 1rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin: 0;
}

.section-subtitle {
    margin-top: 4px;
    font-size: 0.85rem;
    color: var(--color-muted);
}

/* =============================
   Project Cards
   ============================= */
.project-grid {
    grid-column: 1 / span 12;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 28px;
}

/* Entire card clickable + hover overlay */
.project-card {
    grid-column: span 6;
    border: 1px solid var(--color-border);
    padding: 20px;
    background: #ffffff;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.project-card:hover {
    background-color: #f5f5f5;
    border-color: #d5d5d5;
}

/* Click overlay */
.project-card a.project-card-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    text-indent: -9999px;
    overflow: hidden;
}

/* Keep visible link clickable above overlay */
.project-link {
    position: relative;
    z-index: 2;
}

.project-card h3 {
    margin: 0;
    font-size: 1.05rem;
}

.project-meta {
    margin: 6px 0 8px;
    font-size: 0.8rem;
    color: var(--color-muted);
}

.project-card p {
    margin: 12px 0;
    font-size: 0.95rem;
}

/* tags */
.tag-row {
    margin-top: 6px;
}

.tag {
    display: inline-block;
    border: 1px solid var(--color-accent);
    padding: 2px 6px;
    margin-right: 6px;
    margin-bottom: 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--color-accent);
}

/* =============================
   Project Image — 3:1 ratio
   ============================= */
.project-image-wrapper {
    position: relative;
    overflow: hidden;
    margin: 14px -20px 10px;
    width: calc(100% + 40px);
}

.project-image {
    width: 100%;
    aspect-ratio: 3 / 1; /* CORRECTED ratio */
    object-fit: cover;
    height: auto;
}

/* =============================
   Project link
   ============================= */
.project-link {
    text-decoration: none;
    font-size: 0.83rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-accent);
    border-bottom: 1px solid transparent;
}

.project-link:hover {
    border-bottom-color: var(--color-accent);
}

/* =============================
   Footer
   ============================= */
.site-footer {
    grid-column: 1 / span 12;
    padding-top: 20px;
    margin-top: 40px;
    border-top: 1px solid var(--color-border);
    font-size: 0.8rem;
    color: var(--color-muted);
}

/* =============================
   Responsive
   ============================= */
@media (max-width: 860px) {
    .site-header {
        grid-template-columns: 1fr;
    }
    main {
        grid-template-columns: repeat(6, 1fr);
    }
    .intro, .section {
        grid-column: 1 / span 6;
    }
    .project-card {
        grid-column: span 6;
    }
}
