/* ==========================================================================
   Arsinergi — static site stylesheet
   ========================================================================== */

:root {
    --maroon: #800000;
    --text: #606060;
    --heading: #333333;
    --line: #e5e5e5;
    --header-h: 80px;
}

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: #ffffff;
    color: var(--text);
    font-family: "Open Sans", Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.8;
}

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

a {
    color: var(--maroon);
    text-decoration: none;
    transition: color .3s ease, opacity .3s ease;
}

a:hover {
    color: #4d0000;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Roboto Condensed", Arial, sans-serif;
    font-weight: 400;
    color: var(--heading);
    margin: 0 0 18px;
    line-height: 1.3;
}

h2 {
    font-size: 30px;
}

h3 {
    font-size: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

p {
    margin: 0 0 18px;
}

.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header ------------------------------------------------------------------ */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--header-h);
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--line);
}

.site-header .container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* The home slide stands on its own — the bar comes back on mobile for the menu. */
.page-home .site-header {
    display: none;
}

.logo img {
    height: 44px;
    width: auto;
}

/* Hamburger — only the mobile nav uses it. */
#menu-btn {
    display: none;
    width: 34px;
    height: 28px;
    padding: 4px 0;
    background: none;
    border: 0;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
}

#menu-btn span {
    display: block;
    height: 2px;
    background: var(--heading);
    transition: transform .3s ease, opacity .3s ease;
}

#menu-btn[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

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

#menu-btn[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.mobile-nav {
    display: none;
}

.mobile-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav a {
    display: block;
    padding: 12px 20px;
    font-family: "Roboto Condensed", Arial, sans-serif;
    font-size: 15px;
    letter-spacing: 2px;
    color: var(--heading);
    border-bottom: 1px solid var(--line);
}

.mobile-nav li.current > a,
.mobile-nav a:hover {
    color: var(--maroon);
}

/* Home slider ------------------------------------------------------------- */

.home-slider {
    position: relative;
    height: 100vh;
    min-height: 480px;
    overflow: hidden;
    background: #111;
}

.home-slider .slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

.home-slider .slide.is-active {
    opacity: 1;
}

.slider-caption {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
    padding: 0 20px;
    pointer-events: none;
}

.wordmark {
    font-family: "Alegreya Sans SC", "Roboto Condensed", sans-serif;
    font-weight: 100;
    font-size: clamp(42px, 11vw, 150px);
    line-height: 1;
    color: #ffffff;
    letter-spacing: .04em;
    text-shadow: 0 2px 24px rgba(0, 0, 0, .35);
    white-space: nowrap;
}

/* Inner pages ------------------------------------------------------------- */

.inner {
    padding-top: calc(var(--header-h) + 50px);
    padding-bottom: 60px;
}

.layout {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.sidebar {
    flex: 0 0 200px;
}

.sidebar-title {
    font-size: 22px;
    letter-spacing: 3px;
    margin-bottom: 16px;
}

.sidebar-title a {
    color: var(--heading);
}

.sidebar-title a:hover {
    color: var(--maroon);
}

.sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-menu a {
    display: block;
    padding: 6px 0;
    font-family: "Roboto Condensed", Arial, sans-serif;
    font-size: 14px;
    letter-spacing: 2px;
    color: var(--text);
}

.sidebar-menu li.current > a,
.sidebar-menu a:hover {
    color: var(--maroon);
}

.content {
    flex: 1 1 500px;
    min-width: 0;
}

.breadcrumb {
    font-size: 13px;
    margin-bottom: 30px;
}

.breadcrumb strong {
    color: var(--heading);
    font-weight: 600;
}

.text ul {
    margin: 0 0 18px;
    padding-left: 18px;
}

.text li {
    margin-bottom: 4px;
}

.single-image {
    margin: 32px 0;
}

.single-image img {
    width: 100%;
}

.contact-info strong {
    color: var(--heading);
    font-weight: 600;
}

/* Projects grid ----------------------------------------------------------- */

.home-title {
    text-align: center;
    font-size: 32px;
    letter-spacing: 6px;
    margin-bottom: 12px;
}

.home-title a {
    color: var(--heading);
}

.home-title a:hover {
    color: var(--maroon);
}

.page-projects .breadcrumb {
    text-align: center;
}

#filters {
    list-style: none;
    margin: 0 0 32px;
    padding: 0;
    text-align: center;
}

#filters li {
    display: inline-block;
    margin: 0 2px 8px;
}

#filters a {
    display: block;
    padding: 6px 14px;
    font-family: "Roboto Condensed", Arial, sans-serif;
    font-size: 13px;
    letter-spacing: 2px;
    color: var(--text);
    border: 1px solid transparent;
}

#filters a:hover {
    color: var(--maroon);
}

#filters a.selected {
    color: var(--maroon);
    border-color: var(--line);
}

.gallery {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 0 20px;
}

/* Filtering: items fade in/out while survivors glide to their new slot. */
.gallery .item {
    display: block;
    transition: opacity .4s ease, transform .4s ease;
}

.gallery .item.is-hidden {
    display: none;
}

/* Revealed but not yet faded in. */
.gallery .item.is-entering {
    opacity: 0;
}

/* Lifted out of flow (positioned inline by the script) so the grid can reflow. */
.gallery .item.is-leaving {
    z-index: 1;
    pointer-events: none;
}

.gallery .item.is-gone {
    opacity: 0;
    transform: scale(.94);
}

.picframe {
    position: relative;
    overflow: hidden;
}

.picframe img {
    width: 100%;
    aspect-ratio: 700 / 466;
    object-fit: cover;
    transition: transform .6s ease;
}

.picframe:hover img {
    transform: scale(1.06);
}

.picframe .overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    text-align: center;
    background: rgba(128, 0, 0, .78);
    opacity: 0;
    transition: opacity .35s ease;
}

.picframe:hover .overlay {
    opacity: 1;
}

.project-name {
    font-family: "Roboto Condensed", Arial, sans-serif;
    font-size: 16px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #ffffff;
}

/* Single project ---------------------------------------------------------- */

.project-view .container {
    max-width: 1024px;
}

.project-title {
    margin-bottom: 4px;
}

.project-cat {
    font-size: 12px;
    letter-spacing: 3px;
    color: #999;
    margin-bottom: 24px;
}

.project-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    font-family: "Roboto Condensed", Arial, sans-serif;
    font-size: 13px;
    letter-spacing: 1px;
}

.project-nav .all {
    letter-spacing: 3px;
}

/* Footer ------------------------------------------------------------------ */

.site-footer {
    border-top: 1px solid var(--line);
    padding-top: 40px;
    margin-top: 20px;
}

.page-home .site-footer {
    margin-top: 0;
}

.footer-menu {
    list-style: none;
    margin: 0 0 30px;
    padding: 0;
    text-align: center;
}

.footer-menu li {
    display: inline-block;
    margin: 0 10px 6px;
}

.footer-menu a {
    font-family: "Roboto Condensed", Arial, sans-serif;
    font-size: 13px;
    letter-spacing: 3px;
    color: var(--text);
}

.footer-menu li.current > a,
.footer-menu a:hover {
    color: var(--maroon);
}

.subfooter {
    border-top: 1px solid var(--line);
    padding: 16px 0;
}

.subfooter .container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.social-icons {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* inline-flex + block svg keeps the glyph off the text baseline, which is what
   left it sitting high in the bar; the fixed box also gives a usable tap target. */
.social-icons a {
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-right: -6px;
}

.social-icons svg {
    display: block;
}

.social-icons a:hover {
    color: var(--maroon);
}

/* Responsive -------------------------------------------------------------- */

@media (max-width: 991px) {
    .gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    /* Mobile needs the bar back — it carries the menu button. */
    .page-home .site-header {
        display: block;
    }

    #menu-btn {
        display: flex;
    }

    .mobile-nav {
        display: block;
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        background: #ffffff;
        border-bottom: 1px solid var(--line);
        max-height: 0;
        overflow: hidden;
        transition: max-height .35s ease;
    }

    .mobile-nav.is-open {
        max-height: 320px;
    }

    .layout {
        gap: 24px;
    }

    .sidebar {
        flex: 1 1 100%;
    }

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

    /* Touch devices have no hover — keep the caption visible. */
    .picframe .overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(128, 0, 0, .8), rgba(128, 0, 0, 0) 60%);
        align-items: flex-end;
    }

    .project-nav {
        flex-direction: column;
        text-align: center;
    }
}

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

@media (prefers-reduced-motion: reduce) {
    .home-slider .slide,
    .gallery .item,
    .picframe img,
    .picframe .overlay {
        transition-duration: .01ms;
    }
}
