* {
    box-sizing: border-box;
}

:root {
    --sky-muted: #b9d8e8;
    --navy-soft: #355f80;
    --navy-mid: #4f81a3;
    --warm-light: #efe0c6;
    --paper: #fbfcfa;
    --text-main: #1f2c34;
    --card: rgba(255, 255, 255, 0.82);
    --border: rgba(53, 95, 128, 0.26);
    --shadow: 0 18px 40px rgba(44, 76, 104, 0.16);
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Courier New", Courier, monospace;
    background:
        radial-gradient(circle at top left, rgba(185, 216, 232, 0.88), transparent 35%),
        linear-gradient(180deg, #e7f1f6 0%, #f3eadb 100%);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

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

button {
    font-family: inherit;
}

img {
    max-width: 100%;
}

.page-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0 48px;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 28px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
}

.brand a {
    font-size: 1.05rem;
    color: #294d69;
    font-weight: bold;
    letter-spacing: 0.02em;
}

.main-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.main-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(185, 216, 232, 0.62);
    border: 1px solid rgba(53, 95, 128, 0.12);
    color: #223745;
    transition: 0.2s ease;
}

.main-nav a:hover {
    background: rgba(185, 216, 232, 0.9);
}

.main-nav a.active {
    background: rgba(16, 68, 102, 0.98);
    color: #ffffff;
}

.content-area {
    display: grid;
    gap: 24px;
}

.hero,
.links-page {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 26px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
    align-items: center;
    padding: 28px;
}

.compact-hero {
    grid-template-columns: 1fr;
    padding-bottom: 18px;
}

.eyebrow {
    color: #436f90;
    letter-spacing: 0.12em;
    font-size: 0.8rem;
    margin: 0 0 10px;
}

.hero h1,
.links-intro h1 {
    margin: 0 0 14px;
    font-size: clamp(1.8rem, 5vw, 2.9rem);
    line-height: 1.1;
    color: #264b66;
}

.hero p,
.links-intro p {
    line-height: 1.75;
    margin: 0 0 18px;
    text-align: justify;
    hyphens: auto;
    color: #22313a;
}

.hero p {
    text-wrap: pretty;
}

.hero-text {
    max-width: 65ch;
}

.hero-image-card {
    background: transparent;
    border: none;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image-card img {
    display: block;
    width: min(100%, 360px);
    height: auto;
    border-radius: 14px;
}

.links-page {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    padding: 28px;
    border-radius: 26px;
}

.linktree-style {
    display: grid;
    gap: 14px;
    margin-top: 24px;
    align-items: center;
}

.link-card {
    display: grid;
    grid-template-columns: 44px 1fr 32px;
    align-items: center;
    gap: 16px;

    width: min(720px, 100%);
    margin: 0 auto;

    padding: 12px 18px;

    background: #fbfcfa;
    border: 3px solid #1f4561;

    border-radius: 40px;

    box-shadow: 10px 10px 0 rgba(46, 71, 96, 0.72);

    transition: transform 0.12s ease, background 0.12s ease;
}

.link-card:hover {
    transform: translateY(-2px);
    background: #f4f9fc;
}

.link-icon {
    width: 44px;
    height: 44px;
    object-fit: contain;
    display: block;
}

.link-label {
    text-align: center;
    justify-self: center;
    color: #1f2c34;
    font-weight: 600;
}

.link-card::after {
    content: "";
    width: 44px;
    height: 44px;
    display: block;
}

.portfolio-tabs-section {
    width: 100%;
    max-width: none;
    margin: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 26px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    padding: 24px;
}

.tabs-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 20px;
}

.tab-button {
    border: 1px solid rgba(53, 95, 128, 0.24);
    background: rgba(231, 242, 248, 0.98);
    color: #264b66;

    padding: 14px 26px;
    font-size: 1.05rem;

    border-radius: 999px;
    cursor: pointer;

    transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.tab-button:hover {
    background: rgba(185, 216, 232, 1);
    transform: translateY(-1px);
}

.tab-button.active {
    background: rgba(16, 68, 102, 0.98);
    color: #fff;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    align-items: start;
}

.gallery-column {
    display: grid;
    gap: 10px;
    align-content: start;
}

.gallery-card {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
}

.gallery-card img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;

    border-radius: 12px;

    box-shadow: 0 10px 28px rgba(53, 95, 128, 0.16);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        filter 0.25s ease;
}

.gallery-card:hover img {
    transform: translateY(-4px) scale(1.02);

    box-shadow:
        0 18px 40px rgba(53, 95, 128, 0.26);

    filter: brightness(1.05);
}

.lightbox[hidden] {
    display: none !important;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 999;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 27, 39, 0.82);
    backdrop-filter: blur(4px);
}

.lightbox-dialog {
    position: relative;
    z-index: 2;
    width: min(92vw, 1000px);
    height: 100vh;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 16px;
}

.lightbox-dialog img {
    max-width: 100%;
    max-height: calc(100vh - 80px);
    width: auto;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.38);
    background: #fff;
}

.lightbox-close {
    position: absolute;
    top: 18px;
    right: 10px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    color: #264b66;
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .page-shell {
        width: min(1120px, calc(100% - 20px));
        padding-top: 12px;
    }

    .site-header,
    .hero,
    .links-page,
    .portfolio-tabs-section {
        padding: 18px;
        border-radius: 20px;
    }

    .site-header {
        align-items: flex-start;
    }

    .main-nav {
        width: 100%;
        justify-content: flex-start;
    }

    .main-nav a {
        flex: 0 0 auto;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .gallery-column {
        gap: 6px;
    }

    .main-nav a {
        padding: 9px 12px;
    }

    .link-card {
        grid-template-columns: 40px 1fr;
        gap: 12px;
        width: 100%;
        padding: 12px 16px;
        box-shadow: 14px 14px 0 rgba(46, 71, 96, 0.72);
    }

    .link-card:active {
        transform: translate(6px, 6px);
        box-shadow: 4px 4px 0 rgba(46, 71, 96, 0.72);
    }

    .link-card::after {
        display: none;
    }

    .link-icon {
        width: 40px;
        height: 40px;
        object-fit: contain;
    }

    .link-label {
        justify-self: start;
        text-align: left;
        overflow-wrap: anywhere;
        word-break: break-word;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .tab-button {
        width: 100%;
        text-align: center;
    }
}

.portfolio-hero-minimal {
    padding-top: 20px;
    padding-bottom: 14px;
}

.portfolio-hero-minimal .hero-text p,
.portfolio-hero-minimal .hero-text .eyebrow {
    margin-bottom: 8px;
}

.portfolio-hero-minimal .hero-text h1 {
    margin-bottom: 0;
}

.portfolio-description p {
    line-height: 1.75;
    text-align: justify;
    hyphens: auto;
    margin-bottom: 22px;
    max-width: 70ch;
}