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

:root {

    --color-brand-50:  #cad2c5;
    --color-brand-100: #a4bfa1;
    --color-brand-500: #4a6d56;
    --color-brand-700: #354f52;
    --color-brand-900: #2f3e46;

    /* Accent Palette */
    --color-accent-blue:   #a1b3bf;
    --color-accent-purple: #bca1bf;
    --color-accent-warm:   #bfada1;

    /* Surface */
    --surface-1: #ffffff;
    --surface-2: #f8f9fa;
    --surface-3: #eef1ee;
    --surface-dark: #212529;

    /* Text */
    --text-1: #2f3e46;
    --text-2: #5c6b73;
    --text-inverse: #ffffff;

    /* Semantic */
    --primary: var(--color-brand-500);
    --primary-hover: var(--color-brand-700);
    --primary-subtle: var(--color-brand-50);

    --background: var(--surface-1);
    --foreground: var(--text-1);

    /* Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.625rem;
    --radius-lg: 1rem;

    /* Spacing */
    --space-xs: .25rem;
    --space-sm: .5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 4rem;

    /* Shadow */
    --shadow-sm: 0 2px 8px rgb(0 0 0 / 0.08);
    --shadow-md: 0 8px 24px rgb(0 0 0 / 0.12);
    --shadow-lg: 0 16px 48px rgb(0 0 0 / 0.18);

    --gallery-gap: 20px;
    --gallery-row-height: 280px

}

:root[data-theme="dark"] {
    /* Surface */
    --surface-1: #11161d;
    --surface-2: #1a222d;
    --surface-3: #222c38;
    --surface-dark: #000000;

    /* Text */
    --text-1: #f1f4f8;
    --text-2: #acb5c0;
    --text-inverse: #11161d;

    /* Semantic */
    --background: var(--surface-1);
    --foreground: var(--text-1);

    --primary: var(--color-brand-500);
    --primary-hover: var(--color-brand-100);
    --primary-subtle: var(--color-brand-700);

    /* Borders */
    --border: #3e4855;
    --border-subtle: rgb(164 180 201 / 30%);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgb(0 0 0 / 0.35);
    --shadow-md: 0 8px 24px rgb(0 0 0 / 0.45);
    --shadow-lg: 0 16px 48px rgb(0 0 0 / 0.6);

    --text-on-media: #ffffff;
}

html {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif, Apple Color Emoji, "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";


}#nav-bar {
    position: sticky;
    top: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    gap: 1rem;

    min-height: 4rem;
    padding: 0.5rem 1.25rem;

    background: var(--color-brand-100);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    border-bottom: 1px solid rgb(255 255 255 / 0.08);
    box-shadow: var(--shadow-md);
}

/* Site title */
#nav-bar .navbar__brand {
flex: 0 0 auto;

padding: 0.6rem 0.75rem;

color: var(--text-1);
text-decoration: none;

font-size: 1.05rem;
font-weight: 750;
letter-spacing: -0.01em;

white-space: nowrap;
}

/* Menu */
#nav-bar .navbar__links {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 0.25rem;

margin: 0;
padding: 0;

list-style: none;

flex: 1 1 auto;
min-width: 0;
flex-wrap: wrap;
}

#nav-bar .navbar__links li {
flex: 0 0 auto;
margin: 0;
padding: 0;
}

/* Links */
#nav-bar .navbar__links a {
position: relative;

display: inline-flex;
align-items: center;
gap: 0.45rem;

min-height: 2.5rem;
padding: 0.55rem 0.8rem;

border-radius: var(--radius-md);

color: var(--text-1);
text-decoration: none;

font-size: 0.95rem;
font-weight: 550;

white-space: nowrap;

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

#nav-bar .navbar__links a:hover,
#nav-bar .navbar__links a:focus-visible {
color: var(--text-inverse);
background: rgb(255 255 255 / 0.1);
transform: translateY(-1px);
}

#nav-bar .navbar__links a:focus-visible {
outline: 2px solid var(--color-brand-100);
outline-offset: 2px;
}

/* Active-page treatment */
#nav-bar .navbar__links a.active {
color: var(--text-inverse);
background: rgb(255 255 255 / 0.12);
}

/* Small underline */
#nav-bar .navbar__links a::after {
content: "";

position: absolute;
left: 0.75rem;
right: 0.75rem;
bottom: 0.25rem;

height: 2px;
border-radius: 999px;

background: var(--color-brand-100);

transform: scaleX(0);
transform-origin: center;

transition: transform 0.2s ease;
}

#nav-bar .navbar__links a:hover::after,
#nav-bar .navbar__links a:focus-visible::after,
#nav-bar .navbar__links a.active::after {
transform: scaleX(1);
}

/* Search */
#nav-bar .navbar__search {
gap: 0.5rem;
}

#nav-bar .navbar__search svg {
flex: 0 0 auto;
}


/*
 *  TABLET
 *   */

@media (max-width: 850px) {
    #nav-bar {
    gap: 0.5rem;
    padding-inline: 0.75rem;
    }

    #nav-bar .navbar__links a {
    padding-inline: 0.65rem;
    font-size: 0.9rem;
    }
}


/*
 *  MOBILE
 *   */

@media (max-width: 650px) {
    #nav-bar {
    display: block;

    padding: 0.45rem 0;
    }

    /*
     * Brand gets its own row.
     */
    #nav-bar .navbar__brand {
    display: block;

    padding: 0.45rem 1rem 0.5rem;

    font-size: 1rem;
    }

    /*
     * The menu becomes a horizontal scrolling strip.
     */
    #nav-bar .navbar__links {
    display: flex;
    justify-content: flex-start;

    width: 100%;

    padding: 0.1rem 0.75rem 0.45rem;

    overflow-x: auto;
    overflow-y: hidden;

    scrollbar-width: none;

    -webkit-overflow-scrolling: touch;
    }

    #nav-bar .navbar__links::-webkit-scrollbar {
    display: none;
    }

    #nav-bar .navbar__links a {
    min-height: 2.35rem;
    padding: 0.5rem 0.75rem;

    font-size: 0.9rem;
    }

    /*
     * Search stays compact on phones.
     */
    #nav-bar .navbar__search span {
    display: none;
    }

    #nav-bar .navbar__search {
    width: 2.35rem;
    justify-content: center;
    padding-inline: 0;
    }
}


/*
 *  VERY SMALL PHONES
 */

@media (max-width: 380px) {
    #nav-bar .navbar__brand {
    font-size: 0.95rem;
    }

    #nav-bar .navbar__links {
    padding-inline: 0.5rem;
    }

    #nav-bar .navbar__links a {
    font-size: 0.85rem;
    padding-inline: 0.65rem;
    }
}



dialog {
    border: dotted;
    border-radius: 1rem;
    background-color: var(--color-brand-50);
    max-width: min(90vw, 700px);
    width: 100%;
    box-shadow:
    0 20px 60px rgb(0 0 0 / 0.25),
    0 8px 24px rgb(0 0 0 / 0.15);
    animation: dialog-in 180ms ease-out;
}


dialog::backdrop {
    background: rgb(0 0 0 / 0.5);
    backdrop-filter: blur(6px);
    animation: backdrop-in 180ms ease-out;
}


dialog > * {
    padding: 1.5rem;
}

dialog button {
    padding: 0.65rem 1.2rem;
    border: none;
    border-radius: 0.5rem;
    background: var(--color-brand-700);
    color: white;
    font: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

dialog button:hover {
    background: var(--color-brand-900);
}

dialog button:active {
    transform: scale(0.97);
}


@keyframes dialog-in {
    from {
        opacity: 0;
        transform: translateY(1rem) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

.section {
    display: none;
    padding: 2rem;

    @media screen and (min-width: 768px) {
        padding: 4rem;
    }

    @supports (display: grid) {
        display: block;
    }
}

.grid {
    display: grid;
    grid-gap: var(--gallery-gap);
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    grid-auto-rows: var(--gallery-row-height);
    grid-auto-flow: row dense;
    counter-reset: item-counter;
    width: 100%;
    min-width: 0;
}

.image-grid__item img {

}


.item {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-width: 0;
    min-height: 0;
    box-sizing: border-box;
    overflow: hidden;              /* keeps cover-fit image clipped to the cell */
    color: var(--color-surface);
    background: var(--color-overlay);
    grid-column-start: auto;
    grid-row-start: auto;
    counter-increment: item-counter;
    transition: transform 0.3s ease-in-out;

    img {
        position: absolute;
        inset: 0;
        display: block;
        width: 100%;
        height: 100%;
        min-width: 0;
        min-height: 0;
        object-fit: cover;
        object-position: center;
        transition: transform 0.3s ease-in-out;
    }

    &:after {
        content: '';
        position: absolute;
        inset: 0;
        background-color: var(--color-overlay);
        opacity: 0.3;
        transition: opacity 0.3s ease-in-out;
        pointer-events: none;
    }

    &:hover {
        transform: scale(1.05);

        img {
            transform: scale(1.08);   /* subtle parallax-style zoom on the image itself */
        }

        &:after {
            opacity: 0;
        }
    }

    &--medium {
        grid-row-end: span 2;
    }

    &--large {
        grid-row-end: span 3;
    }

    &--full {
        @media screen and (min-width: 768px) {
            grid-column: 1 / -1;
            grid-row-end: span 2;
        }
    }

    &__details {
        position: relative;
        z-index: 1;
        padding: 15px;
        color: var(--color-text-muted);
        background: var(--color-surface);
        text-transform: lowercase;
        letter-spacing: 1px;

        &:before {
            content: counter(item-counter);
            font-weight: bold;
            font-size: 1.1rem;
            padding-right: 0.5em;
            color: var(--color-text);
        }
    }
}

.modular {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 10px 10px; }
.module {
        aspect-ratio: 1.7777777777777777; }
.module.spanned {
            aspect-ratio: auto; }

.image-block {
    margin: 2rem 0;
}

.image-block__image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0.75rem;
}


.image-block__caption {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-top: 0.75rem;
    padding-inline: 0.25rem;
    font-size: 0.9rem;
    color: var(--color-text-muted, #666);
    border-top: 1px solid var(--color-border, #e5e7eb);
    padding-top: 0.5rem;
}

.image-block__text {
    font-style: italic;
    flex: 1;
}

.image-block__credit {
    white-space: nowrap;
    font-size: 0.8rem;
    opacity: 0.8;
}

@media (max-width: 640px) {
    .image-block__caption {
        flex-direction: column;
        align-items: flex-start;
    }

    .image-block__credit {
        white-space: normal;
    }
}


/* HTML: <div class="cube"></div> */
.cube {
    --d: 40px;

    height: 300px;
    aspect-ratio: 1;
    padding: 10px;
    box-sizing: border-box;

    border: solid transparent;
    border-width: 0 var(--d) var(--d) 0;

    clip-path: polygon(
        0 0,
        calc(100% - var(--d)) 0,
                       100% var(--d),
                       100% 100%,
                       var(--d) 100%,
                       0 calc(100% - var(--d))
    );

    background:
    conic-gradient(
        at calc(100% - var(--d)) calc(100% - var(--d)),
                   color-mix(in srgb, var(--color-brand-700) 85%, transparent) 37.5%,
                   color-mix(in srgb, var(--color-brand-900) 90%, transparent) 0 75%,
                   transparent 0
    ) border-box,
    var(--color-brand-100);
}

.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.gallery-img {
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
    display: block;
    max-height: 480px;
}
.gallery-img:hover { opacity: 0.7; }

/* The Modal (background) */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.9);
}

/* Modal Content (image) */
.modal-content {
    margin: auto;
    display: block;
    width: 75%;
}

/* Caption of Modal Image */
#caption {
margin: auto;
display: block;
width: 80%;
max-width: 700px;
text-align: center;
color: #ccc;
padding: 10px 0;
height: 150px;
}

/* Animation */
.modal-content, #caption {
    -webkit-animation-name: zoom;
    -webkit-animation-duration: 0.6s;
    animation-name: zoom;
    animation-duration: 0.6s;
}
.out {
    animation-name: zoom-out;
    animation-duration: 0.6s;
}
@-webkit-keyframes zoom {
    from { -webkit-transform: scale(1) }
    to { -webkit-transform: scale(2) }
}
@keyframes zoom {
    from { transform: scale(0.4) }
    to { transform: scale(1) }
}
@keyframes zoom-out {
    from { transform: scale(1) }
    to { transform: scale(0) }
}

/* Close Button */
.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}
.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
}

/* 100% Image Width on Smaller Screens */
@media only screen and (max-width: 700px) {
    .modal-content {
        width: 100%;
    }
}

portfolio {
    padding:var(--space-lg);
}

.portfolio-title {
    max-width: 900px;
    margin: 2rem auto;


    text-align: center;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;

    color:var(--text-inverse);;
    background: linear-gradient(135deg,
                                var(--color-brand-500),
                                var(--color-brand-700));

    border-radius:var(--radius-lg);
    box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);

    position: relative;
    overflow: hidden;
}


.portfolio-title::before {
    content: "";
    position: absolute;
    top: 0;
    left: -150%;
    width: 60%;
    height: 100%;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.25),
                                transparent
    );

    transform: skewX(-25deg);
    transition: left 0.8s ease;
}

.portfolio-title:hover::before {
    left: 150%;
}


body {
    min-height: 100vh;
    max-width: 800px;
    margin: 0 auto;
    padding: 10px;
    display: grid;
    gap: 3vw;
    grid-template-rows: min-content 1fr min-content;
    background: linear-gradient(
        180deg,
        var(--color-brand-100) 0%,
                                var(--color-brand-100) 30%,
                                var(--color-brand-500) 40%,
                                var(--color-brand-700) 70%,
                                var(--color-brand-900) 100%
    );
    word-break: break-word;

}

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


portfolio {
    padding: 10px;
}

a {
    color: var(--text-inverse);
     font-weight: bold;

}


a:visited {
    color: #1a5952;
}
a:hover, a:focus {
    color: var( --color-brand-500:);
    text-decoration: underline;
    -webkit-transition: all 0.25s ease-out;
    -moz-transition: all 0.25s ease-out;
    transition: all 0.25s ease-out;
}

footer {
    margin-top: 4rem;
    padding: 2rem 1.5rem;

    background: linear-gradient(
        180deg,
        var(--color-brand-100),
                                var(--color-brand-500)
    );

    color: var(--text-inverse);
    text-align: center;

    border-top: 1px solid rgb(255 255 255 / 0.08);
    box-shadow: 0 -8px 24px rgb(0 0 0 / 0.12);
}

footer p {
    margin: 0;
    color: var(--text-2);
    font-size: 0.95rem;
    line-height: 1.6;
}

footer a {
    color: var(--color-brand-100);
    text-decoration: none;
    font-weight: 500;
    color: var(--text-2);
    transition: color 0.25s ease;
}

footer a:hover,
footer a:focus-visible {
    color:var(--text-inverse);;
}

footer .footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.header {
    display: block;
    font-size: 1.5em;
    margin-top: 0.83em;
    margin-bottom: 0.83em;
    margin-left: 0;
    margin-right: 0;
    font-weight: bold;
}

.article {
    padding: 1.25rem;
    margin-bottom: 1rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;

}

/* HTML: <div class="ribbon">Your text content</div> */.ribbon {
    --d: 0.8em;

    position: absolute;
    top: 50%;
    left: var(--d);
    right: var(--d);
    transform: translateY(-50%);

    box-sizing: border-box;
    max-width: calc(100% - 2 * var(--d));

    padding-block: var(--d);
    padding-inline: 1rem;

    font-size: clamp(18px, 4vw, 28px);
    font-weight: bold;
    line-height: 1.4;
    text-align: center;

    color: #fff;
    background-color: var(--color-brand-500);

    clip-path: polygon(
        0 var(--d),
                       calc(100% - var(--d)) var(--d),
                       calc(100% - var(--d)) 0,
                       100% var(--d),
                       100% calc(100% - var(--d)),
                       var(--d) calc(100% - var(--d)),
                       var(--d) 100%,
                       0 calc(100% - var(--d))
    );

    border-image: conic-gradient(#0008 0 0) 50% / var(--d);
}

.four_corner_box {
    mask: radial-gradient(40px at 40px 40px,#0000 98%,#000) -40px -40px;
}

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

    box-sizing: border-box;
    appearance: none;
    cursor: pointer;

    padding: 0.9rem 1.8rem;
    margin: 1rem;

    border: none;
    border-radius: var(--radius-md);

    background: linear-gradient(
        135deg,
        var(--color-brand-500),
                                var(--color-brand-700)
    );

    color: var(--text-inverse);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-decoration: none;
    white-space: nowrap;

    box-shadow: var(--shadow-sm);

    transition:
    transform 0.2s ease,
    box-shadow 0.25s ease,
    background 0.25s ease,
    opacity 0.25s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);

    background: linear-gradient(
        135deg,
        var(--color-brand-700),
                                var(--color-brand-900)
    );
}

.btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.btn:focus-visible {
    outline: 3px solid var(--color-brand-100);
    outline-offset: 3px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.wavy_lines {
    --s: 100px; /* control the size*/
    --c1: #f8b195;
    --c2: #355c7d;

    --_g:
    var(--c2) 6%  14%,var(--c1) 16% 24%,var(--c2) 26% 34%,var(--c1) 36% 44%,
    var(--c2) 46% 54%,var(--c1) 56% 64%,var(--c2) 66% 74%,var(--c1) 76% 84%,var(--c2) 86% 94%;
    background:
    radial-gradient(100% 100% at 100% 0,var(--c1) 4%,var(--_g),#0008 96%,#0000),
    radial-gradient(100% 100% at 0 100%,#0000, #0008 4%,var(--_g),var(--c1) 96%)
    var(--c1);
    background-size: var(--s) var(--s);
}

.box {
    mask: conic-gradient(from -47.5deg at bottom,#0000,#000 1deg 94deg,#0000 95deg) 50%/65.48px 100%
}

.scoops {
    mask:
    linear-gradient(0,#0000 50px,#000 0),
    radial-gradient(50px,#000 calc(100% - 1px),#0000) bottom/92.5px 100px
}

.container {
    width: min(100% - 2rem, 1200px);
    margin-inline: auto;
    padding-inline: 1rem;
    box-sizing: border-box;
    position: relative

}



.sidebar{
    position: absolute;
    top: 320px;
    left: 510px;
    width: 210px;
    margin-right: 30px;
}

.surface {
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    padding: 1.25rem 1.5rem;
    background: var(--color-brand-100);
    border: 1px solid rgb(0 0 0 / 0.06);
    border-radius: 1rem;
    box-shadow: 0 8px 24px rgb(0 0 0 / 0.08);
    border-style: groove;
}


.surface h2,
.surface h3,
.surface h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.surface a {
    color: var(--color-brand-700);
    font-weight: 600;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
}

.surface a:hover {
    text-decoration-thickness: 2px;
}


@media (prefers-reduced-motion: reduce) {
    .surface {
        transition: none;
    }

    .surface:hover {
        transform: none;
    }
}

.hero__text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    z-index: 2;
    margin: 0;
    width: 90%;

    color: white;
    text-align: center;
    font-size: clamp(2rem, 5vw, 5rem);
    font-weight: 700;
}

.triangle_top {
    clip-path: polygon(0 0,100% 0,100% calc(100% - 50px),50% 100%,0 calc(100% - 50px));
}
.triangle_bottom {
    clip-path: polygon(0 0,50% 50px,100% 0,100% 100%,0 100%);
    margin-top: -40px;
}

.container-under-text {
    position: relative;
}


.text-block {
    position: absolute;
    top: 20%;
    right: 20px;
    background-color: var( --color-brand-900);
    color: white;
    padding-left: 20px;
    padding-right: 20px;
}

.template-homepage main {
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin: 0 auto;

}

.skip-link {
    position: absolute;
    top: -30px;
}

.skip-link:focus-visible {
    top: 5px;
}

.page-form label {
    display: block;
    margin-top: 10px;
    margin-bottom: 5px;
    text-align:justify

}

.page-form :is(textarea, input, select) {
    width: 100%;
    max-width: 500px;
    min-height: 40px;
    margin-top: 5px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);

}

.page-form .helptext {
    font-style: italic;
}


.template-portfolio .container,
.template-portfolio .container * {
    max-width: 100%;
    box-sizing: border-box;
    word-break: break-word;
    overflow-x: hidden;
}
