@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Newsreader:opsz,wght@6..72,600;6..72,700&display=swap");

:root {
    --ink: #17322f;
    --ink-soft: #536764;
    --forest: #173f3a;
    --forest-2: #245c53;
    --coral: #e76f51;
    --coral-soft: #ffe2d8;
    --gold: #e9b85c;
    --cream: #f7f2e8;
    --cream-2: #fffaf2;
    --paper: #ffffff;
    --line: #dedbd1;
    --line-strong: #c8c5ba;
    --success: #277a58;
    --success-soft: #e4f4eb;
    --warning: #9a5c12;
    --warning-soft: #fff1d7;
    --danger: #a13a38;
    --danger-soft: #fae6e4;
    --shadow-sm: 0 1px 2px rgba(23, 50, 47, 0.06);
    --shadow: 0 14px 35px rgba(23, 50, 47, 0.10);
    --shadow-lg: 0 24px 60px rgba(23, 50, 47, 0.14);
    --radius-sm: 10px;
    --radius: 18px;
    --radius-lg: 28px;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;
    --space-20: 80px;
    --page-width: 1200px;
    --page-gutter: clamp(18px, 4vw, 52px);
}

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

html {
    min-width: 0;
    color-scheme: light;
    scroll-behavior: smooth;
}

body {
    min-width: 0;
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 10% 5%, rgba(233, 184, 92, 0.16), transparent 26rem),
        radial-gradient(circle at 95% 30%, rgba(231, 111, 81, 0.10), transparent 30rem),
        var(--cream);
    font-family: "DM Sans", system-ui, sans-serif;
    font-size: 17px;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
}

img {
    display: block;
    max-width: 100%;
}

button {
    font: inherit;
}

a {
    color: var(--forest-2);
    text-underline-offset: 0.18em;
}

a:focus-visible,
button:focus-visible,
.item:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

::selection {
    color: var(--paper);
    background: var(--forest-2);
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--cream);
}

::-webkit-scrollbar-thumb {
    border: 3px solid var(--cream);
    border-radius: 99px;
    background: var(--forest-2);
}

#wrapper {
    width: min(100% - (2 * var(--page-gutter)), var(--page-width));
    min-width: 0;
    margin: 0 auto;
    padding: clamp(var(--space-10), 7vw, var(--space-20)) 0 var(--space-16);
}

#wrapper > h1 {
    max-width: 16ch;
    margin: 0 auto var(--space-6);
    padding: 0;
    color: var(--forest);
    font-family: "Newsreader", Georgia, serif;
    font-size: clamp(2.8rem, 7vw, 5.6rem);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 0.98;
    text-align: center;
}

#wrapper > h1 b {
    font-weight: 700 !important;
}

#wrapper > a {
    min-height: 46px;
    width: fit-content;
    margin: 0 auto var(--space-10);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 var(--space-4);
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    color: var(--forest);
    background: var(--cream-2);
    box-shadow: var(--shadow-sm);
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

#wrapper > a:hover {
    color: var(--paper);
    border-color: var(--forest);
    background: var(--forest);
    transform: translateY(-1px);
}

section,
.gallery {
    width: 100%;
    min-width: 0;
    padding: 0;
}

.gallery .row {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-5);
    align-items: start;
}

.gallery .row .col {
    min-width: 0;
    max-width: none;
    display: grid;
    gap: var(--space-5);
}

.gallery .row .col .fluid-container,
.gallery .row .col .fluid-container.selected {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    float: none;
    user-select: none;
}

.gallery .row .col .fluid-container .item {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--shadow-sm);
    opacity: 1;
    cursor: zoom-in;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.gallery .row .col .fluid-container .item:hover {
    border-color: var(--line-strong);
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}

.gallery .row .col .fluid-container .item .img {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border-radius: calc(var(--radius) - 1px);
    background: var(--cream-2);
}

.gallery .row .col .fluid-container .item .img img {
    width: 100%;
    height: auto;
    border-radius: 0;
    object-fit: contain;
    transition: opacity 160ms ease;
}

.gallery .row .col .fluid-container .item .img::before {
    content: "Open";
    position: absolute;
    z-index: 1;
    inset: auto var(--space-3) var(--space-3) auto;
    width: auto;
    height: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    color: var(--paper);
    background: rgba(23, 63, 58, 0.9);
    font-size: 0.82rem;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity 160ms ease, transform 160ms ease;
}

.gallery .row .col .fluid-container .item:hover .img::before,
.gallery .row .col .fluid-container .item:focus-visible .img::before {
    opacity: 1;
    transform: translateY(0);
}

.overlayed {
    overflow: hidden !important;
}

.overlay {
    position: fixed;
    z-index: 2000;
    inset: 0;
    width: 100%;
    height: 100%;
    display: none;
    padding: var(--page-gutter);
    background: rgba(12, 31, 29, 0.82);
    backdrop-filter: blur(8px);
}

.overlayed .overlay {
    display: grid;
    place-items: center;
    animation: fade-in 180ms ease-out;
}

.overlay .viewer {
    width: min(100%, 1040px);
    max-height: calc(100vh - (2 * var(--page-gutter)));
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-3);
    padding: var(--space-4);
    border: 1px solid rgba(255, 250, 242, 0.22);
    border-radius: var(--radius-lg);
    background: var(--cream-2);
    box-shadow: var(--shadow-lg);
    user-select: none;
}

.overlay .viewer div {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.overlay .viewer div:first-child {
    justify-content: flex-end;
}

.overlay .viewer img {
    width: auto;
    max-width: 100%;
    max-height: calc(100vh - 150px);
    border-radius: var(--radius);
    object-fit: contain;
}

.close {
    width: 44px;
    height: 44px;
    margin: 0;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--ink);
    background: var(--paper);
    cursor: pointer;
    transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.close:hover {
    color: var(--paper);
    border-color: var(--forest);
    background: var(--forest);
}

.material-symbols-rounded {
    font-family: "Material Symbols Rounded";
    font-size: 20px;
    font-style: normal;
    font-weight: normal;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "liga";
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
