:root {
    --bg-outer: rgb(15, 11, 11);
    --bg: rgb(25, 22, 22);
    --bg-dot: rgb(30, 26, 26);
    --fg: rgb(207, 205, 192);
    --muted: rgb(142, 132, 119);
    --line: rgb(92, 86, 79);
    --dim: rgb(112, 105, 95);
    --accent: rgb(75, 100, 75);
    --accent-hl: rgba(75, 100, 75, 0.2);
    --accent-text: color-mix(in srgb, var(--accent) 60%, var(--fg));
    --shadow: 0 0 0.5rem rgba(0, 0, 0, 0.5);
    --ease: 0.5s;    --link: rgb(193, 181, 164);
    --card: rgb(52, 46, 46);
    --card-hover: rgb(60, 54, 54);
    --max: 1040px;
}

* {
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
    scroll-padding-top: 72px;
}
body {
    margin: 0;
    background: var(--bg-outer);
    color: var(--fg);
    font-family: "Archivo", "Inter", system-ui, sans-serif;
    line-height: 1.6;
}
h1,
h2,
h3,
h4 {
    font-family: "Archivo Narrow", "Inter", sans-serif;
    line-height: 1.15;
    margin: 0 0 0.5em;
}
a {
    color: var(--link);
}
img {
    max-width: 100%;
    height: auto;
}
code {
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: 0.9em;
    padding: 0.1em 0.45em;
    background: var(--accent-hl);
    border: 1px solid var(--accent);
    border-radius: 4px;
    color: var(--accent-text);
}
hr {
    border: 0;
    border-top: 3px dotted var(--muted);
    margin: 0 auto;
    max-width: var(--max);
}
main {
    width: min(100% - 24px, var(--max));
    margin: 24px auto 0;
    padding: 0 40px;
    background-color: var(--bg);
    background-image: radial-gradient(var(--bg-dot) 2px, transparent 1px);
    background-size: 30px 30px;
    border-radius: 16px;
    box-shadow: var(--shadow);
}
ul {
    padding: 0;
    list-style: none;
}

/* Nav */
.nav-bar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: color-mix(in srgb, var(--bg) 90%, transparent);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}
.nav-name {
    font-family: "Archivo Narrow", "Inter", sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--fg);
    text-decoration: none;
}
.nav-links {
    display: flex;
    gap: 24px;
    margin: 0;
}
.nav-links a {
    color: var(--fg);
    text-decoration: none;
    font-weight: 500;
    display: block;
    transition: transform var(--ease);
}
.nav-links a:hover {
    color: var(--link);
    transform: scale(0.95);
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-underline-offset: 6px;
}

/* Sections */
.section,
#work {
    padding: 72px 0;
}
#work > h1,
#about h1,
#contact h1 {
    font-size: 2.25rem;
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 8px;
}

/* Hero */
#hero-content {
    display: flex;
    align-items: center;
    gap: 48px;
}
#hero-image {
    width: 240px;
    height: 240px;
    object-fit: cover;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: var(--shadow);
    border: 1px solid var(--card-hover);
}
#hero-title h3 {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--dim);
    margin: 0;
}
#hero-title h1 {
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    margin: 0;
    text-decoration: underline dotted var(--accent);
    text-decoration-thickness: 0.15rem;
    text-underline-offset: 0.12em;
}
#hero-title h2 {
    font-size: 1.25rem;
    letter-spacing: 0.12em;
    color: var(--accent);
    margin: 0.25em 0;
}
#hero-title h4 {
    color: var(--muted);
    font-weight: 400;
    margin: 0 0 1em;
}
#hero-description {
    max-width: 52ch;
}
#resume-button {
    margin-top: 32px;
}
.resume-download {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    background: var(--accent-hl);
    border: 1px solid var(--accent);
    color: var(--accent-text);
    text-decoration: none;
    box-shadow: var(--shadow);
    transition:
        transform var(--ease),
        background-color var(--ease),
        color var(--ease);
}
.resume-download:hover {
    transform: scale(0.97);
    background: var(--accent);
    color: var(--fg);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 12px;
}
.tags li {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 2px 12px;
    background: var(--accent);
    border-radius: 999px;
    color: var(--fg);
    box-shadow: var(--shadow);
}

/* Project cards */
.project-card {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 32px;
    align-items: center;
    margin: 0 0 32px;
    padding: 20px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    color: inherit;
    text-decoration: none;
    box-shadow: var(--shadow);
    transition:
        transform var(--ease),
        background-color var(--ease),
        box-shadow var(--ease);
}
.project-card:hover {
    transform: translateY(-3px);
    background: var(--card-hover);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}
.project-card:nth-of-type(even) .cover-div {
    order: 2;
}
.cover-div {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 10px;
    background: var(--line);
}
.cover-div img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--ease);
}
.project-card:hover .cover-div img {
    transform: scale(1.04);
}
.project-card .text-container h1 {
    font-size: 1.75rem;
}
.project-card .text-container h3 {
    font-family: "Archivo", "Inter", sans-serif;
    font-weight: 400;
    font-size: 1rem;
    color: var(--muted);
    margin: 0;
}
.project-card:not(:has(.cover-div)) {
    grid-template-columns: 1fr;
}

/* About */
#about {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 48px;
}
#other-work {
    grid-column: 1 / -1;
}
#other-work h2 {
    font-size: 1.5rem;
}
#other-work li {
    padding: 4px 0;
}
.skills {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    gap: 12px;
    margin: 0 0 16px;
}
.skills li {
    padding: 4px 16px;
    background: var(--accent-hl);
    border: 1px solid var(--accent);
    border-radius: 4px;
    box-shadow: var(--shadow);
    color: var(--accent-text);
    font-weight: 500;
}
.skills i {
    margin-right: 8px;
}
#contact li i {
    width: 2em;
    color: var(--accent);
}
.hint {
    color: var(--dim);
    font-size: 0.875rem;
}

/* Contact */
#contact li {
    padding: 6px 0;
}
#contact li a,
#other-work li a {
    color: var(--accent-text);
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color var(--ease);
}
#contact li a:hover,
#other-work li a:hover {
    text-decoration-color: var(--link);
}

/* Project page / text page */
#project,
#page {
    max-width: 760px;
    margin: 0 auto;
    padding: 48px 0 80px;
}
#project h1,
#page h1 {
    font-size: clamp(2.25rem, 6vw, 3.5rem);
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 3px;
    text-underline-offset: 8px;
}
.back-link {
    display: inline-block;
    margin-bottom: 24px;
    text-decoration: none;
    font-weight: 500;
}
.project-summary {
    font-size: 1.25rem;
    color: var(--muted);
}
.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 40px;
    margin: 24px 0;
    padding: 16px 0;
    border-block: 1px solid var(--line);
}
.project-meta dt {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}
.project-meta dd {
    margin: 0;
    font-weight: 500;
}
.project-cover {
    width: 100%;
    border-radius: 12px;
    margin: 16px 0 32px;
    box-shadow: var(--shadow);
}

/* Deliverables */
#deliverables {
    margin: 0 0 32px;
    padding: 12px 24px 20px;
    background: rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}
#deliverables h3 {
    margin: 0 0 12px;
    text-align: center;
    font-weight: 400;
    font-size: 2rem;
    color: var(--dim);
}
.deliverable-links {
    display: flex;
    justify-content: center;
    gap: 8px;
}
.deliverable {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 15rem;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    box-shadow: var(--shadow);
    color: var(--muted);
    text-decoration: none;
    transition:
        transform var(--ease),
        background-color var(--ease);
}
.deliverable:hover {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.2);
}
.deliverable i {
    font-size: clamp(2rem, 10vw, 5rem);
    transition: transform var(--ease);
}
.deliverable:hover i {
    transform: scale(1.05);
}
.deliverable p {
    margin: 0;
    font-size: 1.25rem;
    text-align: center;
}
.project-body img {
    border-radius: 10px;
    margin: 16px 0;
}
.project-body h2,
.page-body h2 {
    margin-top: 1.8em;
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 6px;
}
.project-body h3,
.project-body h4,
.page-body h3 {
    margin-top: 1.4em;
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-underline-offset: 5px;
}
.project-body ul,
.page-body ul {
    list-style: disc;
    padding-left: 1.4em;
}
.project-body .image-grid ul,
.project-body .video-embed ul {
    list-style: none;
    padding-left: 0;
}
.project-body hr,
.page-body hr {
    margin: 2em 0;
}
.eyebrow {
    margin: 0 0 12px;
    font-size: 0.875rem;
    color: var(--muted);
}
.eyebrow.accent {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.75rem;
}

/* Project content layout blocks */
.side-by-side {
    display: flex;
    flex-wrap: wrap;
    gap: 0 24px;
}
.side-by-side > * {
    flex: 1 1 260px;
    min-width: 0;
}
.image-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 16px;
    width: 100%;
    padding: 8px 0;
}
.image-grid > div {
    min-width: 0;
    max-width: 100%;
}
.image-grid img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 40rem;
    margin: 0;
}
.image-grid img.gif {
    max-width: min(18rem, 100%);
}
.image-grid img.no-round {
    border-radius: 0;
}
.caption {
    margin: 8px 0 0;
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
}
.video-embed {
    display: flex;
    justify-content: center;
    margin: 24px 0;
}
.video-embed iframe {
    width: 100%;
    max-width: 560px;
    height: auto;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 10px;
}
.project-body figure {
    margin: 24px 0;
}
.project-body figcaption,
.project-body em:only-child {
    color: var(--muted);
    font-size: 0.9rem;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 10px 5px;
    color: var(--muted);
    font-size: 0.875rem;
}

@media (max-width: 760px) {
    #hero-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }
    #hero-image {
        width: 160px;
        height: 160px;
    }
    .project-card,
    #about {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .project-card:nth-of-type(even) .cover-div {
        order: 0;
    }
    .section,
    #work {
        padding: 48px 0;
    }
    main {
        padding: 0 20px;
    }
}
