:root {
    color-scheme: dark;

    --bg: #0e1111;
    --surface: #171817;
    --text: #f2f0e8;
    --muted: #a4aaa5;
    --border: #303735;
    --accent: #d9364f;

    --max-width: 1180px;
    --radius: 4px;
}


/* -------------------------
   RESET
------------------------- */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 42px;
}

body {
    min-height: 100vh;

    display: flex;
    flex-direction: column;

    background: var(--bg);
    color: var(--text);
    font-family: "Manrope", sans-serif;
    line-height: 1.6;
}

main {
    flex: 1;
    padding-top: 82px;
}

::selection {
    background: var(--accent);
    color: var(--bg);
}

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

button {
    font: inherit;
}


/* -------------------------
   GLOBAL
------------------------- */

.shell {
    width: min(calc(100% - 48px), var(--max-width));
    margin-inline: auto;
}

.mono {
    font-family: "DM Mono", monospace;
}

.copy-toast {
    position: fixed;
    top: 75%;
    left: 50%;
    z-index: 200;
    padding: 12px 16px;
    border: 1px solid #69e39a;
    border-radius: var(--radius);
    background: #237a4a;
    color: #f2fff5;
    font-family: "DM Mono", monospace;
    font-size: 0.82rem;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -12px);
    transition: opacity 180ms ease, transform 180ms ease;
}

.copy-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.eyebrow,
.section-label {
    font-family: "DM Mono", monospace;
    font-size: 0.9rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section-label {
    color: var(--muted);
}


/* -------------------------
   HEADER
------------------------- */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(16, 19, 19, 0.94);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    pointer-events: auto;
}

.header-inner {
    min-height: 82px;

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

.brand {
    display: flex;
    align-items: center;
    gap: 12px;

    font-size: 0.95rem;
    font-weight: 700;
}

.brand-mark {
    width: 34px;
    height: 34px;

    display: grid;
    place-items: center;

    border: 1px solid var(--text);

    font-family: "DM Mono", monospace;
    font-size: 0.85rem;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.site-nav a {
    position: relative;

    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;

    transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--accent);
}

.site-nav a.active::after {
    content: "";

    position: absolute;
    left: 0;
    right: 0;
    bottom: -9px;

    height: 1px;
    background: var(--accent);
}

.menu-toggle {
    display: none;

    padding: 7px 7px;

    border: 0;
    background: transparent;

    cursor: pointer;
}

.menu-toggle span {
    display: block;

    width: 26px;
    height: 1px;

    background: var(--text);

    transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle span + span {
    margin-top: 7px;
}

.menu-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-8px) rotate(-45deg);
}

/* -------------------------
   SECTIONS
------------------------- */

.section {
    opacity: 0;
    padding-top: 90px;
}

.section.is-visible {
    animation: hero-enter 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 0.2s;
}

.area-card,
.project {
    opacity: 0;
}

.is-visible .area-card,
.is-visible .project {
    animation: hero-enter 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.is-visible .area-card:nth-child(1),
.is-visible .project:nth-child(1) {
    animation-delay: 0.15s;
}

.is-visible .area-card:nth-child(2),
.is-visible .project:nth-child(2) {
    animation-delay: 0.3s;
}

.is-visible .area-card:nth-child(3),
.is-visible .project:nth-child(3) {
    animation-delay: 0.45s;
}

@media (prefers-reduced-motion: reduce) {
    .area-card,
    .project {
        opacity: 1;
        animation: none;
    }
}


/* -------------------------
   SECTION HEADINGS
------------------------- */

.section-heading {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

.section-heading .section-label {
    color: var(--text);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    line-height: 1.1;
    letter-spacing: 0;
}

/* -------------------------
   HERO
------------------------- */

.hero {
    margin-top: -82px;
    min-height: calc(100vh + 1px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-bottom: 1px solid var(--border);
}

@keyframes hero-enter {
    from {
        opacity: 0;
        transform: translateY(22px);
    }

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

.hero > * {
    opacity: 0;
    animation: hero-enter 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero > :nth-child(1) {
    animation-delay: 0.15s;
}

.hero > :nth-child(2) {
    animation-delay: 0.3s;
}

.hero > :nth-child(3) {
    animation-delay: 0.45s;
}

.hero > :nth-child(4) {
    animation-delay: 0.60s;
}

.hero > :nth-child(5) {
    animation-delay: 0.75s;
}

@media (prefers-reduced-motion: reduce) {
    .hero > *,
    .section {
        opacity: 1;
        animation: none;
    }
}

.hero .eyebrow {
    margin-bottom: 28px;
    color: var(--muted);
}

.hero h1 {
    font-size: clamp(3.5rem, 15vw, 7rem);
    line-height: 0.9;
    letter-spacing: -0.07em;
    font-weight: 800;
}

.hero h1 span {
    color: var(--accent);
}

.hero-subtitle {
    margin-top: 32px;

    font-family: "DM Mono", monospace;
    font-size: 1.2rem;
}

.hero-intro {
    max-width: 560px;
    margin-top: 20px;

    color: var(--muted);
    font-size: 1rem;
}

.hero-actions {
    display: flex;
    gap: 10px;

    margin-top: 34px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 46px;
    padding: 0 20px;

    border: 1px solid var(--text);

    font-size: 0.78rem;
    font-weight: 700;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.button-primary {
    background: var(--accent);
    color: var(--text);
}

.button-primary:hover {
    background: transparent;
    color: var(--accent);
}

.button-secondary {
    background: transparent;
}

.button-secondary:hover {
    background: var(--accent);
    color: var(--text);
}

.scroll-cue {
    position: absolute;
    right: 5%;
    bottom: 5%;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 16px;
    color: #c4c7bd;
    font-size: 0.62rem;
    letter-spacing: 0.11em;
    writing-mode: vertical-rl;
}

.scroll-cue i {
    width: 1px;
    height: 66px;
    background: var(--accent);
}

.hero-image {
    position: absolute;
    inset: 0;
}

.hero-image.aviation {
    background: url("/images/aviation_background.webp") center / cover no-repeat;
    filter: opacity(0.5);
}

.hero-image.software-development {
    background: url("/images/software_development_background.webp") center / cover no-repeat;
    filter: opacity(0.5);
}

.hero-image.photography {
    background: url("/images/photography_background.webp") center / cover no-repeat;
    filter: opacity(0.5);
}


/* -------------------------
   AREAS
------------------------- */

.area-grid {
    margin-top: 28px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.area-card {
    position: relative;
    padding: 28px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--bg);
    transition: background 0.2s ease, transform 0.2s ease;
}

.area-image {
    width: 320px;
    max-width: 100%;
    height: 120px;
    display: block;
    margin-inline: auto;
    border-radius: 3px;

    object-fit: cover;
}

.area-card:hover {
    background: var(--surface);
}

.area-card h3 {
    margin-bottom: 12px;

    font-size: 1.5rem;
    letter-spacing: -0.03em;
}

.area-card h3.small {
    font-size: 1.25rem;
}

.area-card p {
    max-width: 300px;

    color: var(--muted);
    font-size: 0.88rem;
}

.area-iwt {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.card-arrow {
    position: absolute;
    bottom: 26px;
    right: 28px;

    font-size: 1.1rem;

    transition: transform 0.2s ease;
}

.area-card:hover .card-arrow {
    transform: translate(3px, -3px);
}

.small-label {
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}


/* -------------------------
   PROJECTS
------------------------- */

.project-list {
    margin-top: 28px;
    border-top: 1px solid var(--border);
}

.project {
    display: grid;
    grid-template-columns: 180px 1fr 40px;
    gap: 40px;

    padding: 38px 0;

    border-bottom: 1px solid var(--border);

    transition: padding-left 0.2s ease;
}

.project-image {
    max-width: 100%;
    height: 120px;
    display: block;
    margin-inline: auto;
    border-radius: 3px;

    object-fit: cover;
}

.project:hover {
    padding-left: 12px;
}

.project-content h3 {
    margin-bottom: 8px;

    font-size: 1.5rem;
    letter-spacing: -0.03em;
}

.project-content p {
    max-width: 600px;

    color: var(--muted);
    font-size: 0.88rem;
}

.project-arrow {
    align-self: center;

    font-size: 1.1rem;
}


/* -------------------------
   TEXT PARAGRAPH
------------------------- */

.text-paragraph-inner {
    display: grid;
    grid-template-columns: 1fr;
}

.text-paragraph-inner > .section-label {
    color: var(--text);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    line-height: 1.1;
    letter-spacing: 0;
}

.text-paragraph-inner p:not(.section-label),
.text-paragraph-inner h3 {
    margin-top: 24px;
}

.text-paragraph-inner p:not(.section-label),
.text-paragraph-inner li {
    max-width: 800px;

    color: var(--muted);
    font-size: 0.92rem;
}

.text-paragraph-inner ul,
.text-paragraph-inner ol {
    padding-left: 1.2em;
}

.text-paragraph-inner li {
    line-height: 1.6;
}

.text-link {
    display: inline-flex;
    gap: 10px;
    border-bottom: 1px solid var(--accent);
    padding-bottom: 3px;
    font-size: 0.8rem;
    font-weight: 700;
    max-width: max-content;
    margin-top: 24px;
}

.text-link span {
    transition: transform 0.2s ease;
}

.text-link:hover span {
    transform: translateX(4px);
}

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


/* -------------------------
   FOOTER
------------------------- */

.site-footer {
    margin-top: 90px;
    border-top: 1px solid var(--border);
}

.footer-inner {
    min-height: 90px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    color: var(--muted);
    font-size: 0.9rem;
}

.footer-inner a {
    border-bottom: 1px solid var(--muted);
}


/* -------------------------
   LIGHTBOX
------------------------- */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    padding: 28px;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.lightbox.is-open {
    visibility: visible;
    opacity: 1;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 7, 7, 0.92);
}

.lightbox-dialog {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    gap: 14px;
    max-width: min(1200px, 100%);
    max-height: 100%;
}

.lightbox-image {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: calc(100vh - 118px);
    object-fit: contain;
    cursor: zoom-in !important;
    border-radius: 3px;
    user-select: none;
    transition: transform 0.2s ease;
}

.lightbox-image.is-zoomed {
    cursor: zoom-out !important;
    touch-action: none;
}

.lightbox-image.is-dragging {
    cursor: grabbing !important;
    transition: none;
}

.lightbox-close {
    position: absolute;
    top: -16px;
    right: -16px;
    z-index: 1;
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    color: var(--text);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
}

.lightbox-close:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.lightbox-controls {
    position: fixed;
    bottom: 12px;
    left: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 16px;
    transform: translateX(-50%);
}

.lightbox-previous,
.lightbox-next {
    width: 42px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: var(--surface);
    color: var(--text);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.lightbox-previous:hover,
.lightbox-previous:focus-visible,
.lightbox-next:hover,
.lightbox-next:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
}

.lightbox-previous:disabled,
.lightbox-next:disabled {
    cursor: default;
    opacity: 0.35;
}

.lightbox-counter {
    min-width: 52px;
    color: var(--muted);
    font-family: "DM Mono", monospace;
    font-size: 0.78rem;
    text-align: center;
}


/* -------------------------
   SMALLER SCREENS
------------------------- */

@media (max-width: 1000px) {
    .scroll-cue {
        right: 1%;
        bottom: 1%;
    }

    .shell {
        width: min(calc(100% - 32px), var(--max-width));
    }

    .menu-toggle {
        display: flex;
        flex-direction: column;
    }

    .site-nav {
        display: none;
    }

    .site-nav.open {
        position: fixed;
        z-index: 10;

        top: 70px;
        left: 0;
        right: 0;

        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;

        padding: 24px 16px;

        background: var(--bg);
        border-bottom: 1px solid var(--border);
    }

    .site-nav a {
        font-size: 0.9rem;
    }

    .site-nav a.active::after {
        display: none;
    }


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

    .project {
        grid-template-columns: 1fr 30px;
        gap: 15px;
    }

    .project-image {
        grid-column: 1 / -1;
    }


    .footer-inner {
        flex-direction: column;
        gap: 8px;
        align-items: center;

        min-height: 100px;
        padding-block: 20px;
    }
}
