:root { --navy: #00475D; --gray: #58595B; --gold: #EA7234; --white: #FFFFFF; }
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; color: var(--gray); background-color: var(--white); }
h1, h2, h3 { color: var(--navy); font-weight: 700; line-height: 1.2; }
h1 { font-size: 3.5rem; margin-bottom: 1.5rem; }
h2 { font-size: 2.5rem; margin-bottom: 1rem; }
h3 { font-size: 1.1rem; }
.highlight { color: var(--gold); }
.container { max-width: 1280px; margin: 0 auto; padding: 0 2rem; }
header { position: fixed; top: 0; left: 0; right: 0; background: #fff; z-index: 1000; padding: 0.6rem 0; border-bottom: 1px solid rgba(0,0,0,0.06); transition: all 0.3s; }
header.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.1); padding: 0.4rem 0; }
.header-content { display: flex; justify-content: space-between; align-items: center; max-width: 1280px; margin: 0 auto; padding: 0 2rem; }
.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo img { height: 70px; }
nav.nav-links { display: flex; align-items: center; gap: 2.25rem; list-style: none; }
nav.nav-links a { color: var(--navy); text-decoration: none; font-size: 0.92rem; font-weight: 500; transition: color 0.3s; }
nav.nav-links a:hover { color: var(--gold); }
.logo-text { font-size: 0; width: 0; overflow: hidden; position: absolute; }
.dropdown { position: relative; }
.dropdown-toggle::after { content: '▼'; font-size: 0.6rem; margin-left: 0.4rem; opacity: 0.5; }
.dropdown-menu { position: absolute; top: 100%; left: -1rem; background: #fff; border: 1px solid rgba(0,71,93,0.15); border-radius: 6px; min-width: 240px; padding: 0.5rem 0; opacity: 0; visibility: hidden; transition: all 0.3s; margin-top: 0.75rem; box-shadow: 0 10px 30px rgba(0,0,0,0.12); }
.dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; margin-top: 0.25rem; }
.dropdown-menu a { display: block; padding: 0.65rem 1.25rem; color: var(--navy); border-bottom: 1px solid rgba(0,0,0,0.05); font-size: 0.88rem; }
.dropdown-menu a:hover { background: rgba(234,114,52,0.06); color: var(--gold); }
.hamburger { display: none; flex-direction: column; cursor: pointer; gap: 5px; background: none; border: none; padding: 0; }
.hamburger span { width: 25px; height: 3px; background: var(--navy); border-radius: 2px; transition: all 0.3s; }
.page-header { margin-top: 70px; min-height: 50vh; background: linear-gradient(rgba(15,15,15,0.5),rgba(15,15,15,0.5)), url('assets/images/hero-lofts-1.jpg?auto=format&q=75') center/cover; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--white); }
.page-header h1 { color: #fff; font-size: 3.5rem; }
.page-header p { color: rgba(255,255,255,0.9); font-size: 1.1rem; max-width: 600px; }
.portfolio-section { padding: 4rem 0; }
/* Compact sticky filter bar */
.portfolio-controls-wrapper { position: sticky; top: 70px; z-index: 100; margin: 0 -2rem 3rem; padding: 0 2rem; transition: all 0.3s; }
.portfolio-controls-wrapper.stuck { top: 56px; }
.portfolio-controls-glass { background: #fff; border: 1px solid rgba(0,71,93,0.14); border-radius: 8px; padding: 1rem 1.5rem; box-shadow: 0 4px 18px rgba(0,0,0,0.07); }
.portfolio-controls { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; }
.filter-btn { background: transparent; border: 1.5px solid rgba(0,71,93,0.25); color: var(--navy); padding: 0.5rem 1.2rem; border-radius: 4px; font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: background-color 0.2s, border-color 0.2s, color 0.2s; letter-spacing: 0; }
.filter-btn:hover { background: rgba(0,71,93,0.07); border-color: var(--navy); }
.filter-btn.active { background: var(--accent-button); border-color: var(--accent-button); color: #fff; box-shadow: 0 2px 12px rgba(234,114,52,0.35); }
/* Bento Box Grid */
.portfolio-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; margin-bottom: 2rem; grid-auto-rows: 280px; grid-auto-flow: dense; }
/* Cards visible by default -- scroll-reveal disabled for debugging */
.portfolio-card { position: relative; border-radius: 8px; overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; box-shadow: 0 2px 12px rgba(0,0,0,0.08); cursor: default; opacity: 1 !important; visibility: visible !important; transform: none; }
.portfolio-card.revealed { opacity: 1; transform: none; }
.portfolio-card:hover { transform: translateY(-5px) scale(1.015); box-shadow: 0 16px 44px rgba(0,0,0,0.22); z-index: 2; }
.portfolio-card.featured { grid-column: span 2; grid-row: span 2; }
.portfolio-card-image { position: absolute; inset: 0; overflow: hidden; }
.portfolio-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s ease; }
.portfolio-card:hover .portfolio-card-image img { transform: scale(1.03); }
/* Overlay gradient  - darkens on hover for text pop */
.portfolio-card-overlay { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,30,40,0.82) 0%, rgba(0,30,40,0.30) 40%, rgba(0,30,40,0.04) 70%); transition: background 0.5s ease-in-out; }
.portfolio-card:hover .portfolio-card-overlay { background: linear-gradient(0deg, rgba(0,20,28,0.92) 0%, rgba(0,20,28,0.55) 50%, rgba(0,20,28,0.15) 80%); }
.portfolio-card-content { position: absolute; bottom: 0; left: 0; right: 0; padding: 1.25rem; color: #fff; z-index: 1; transform: translateY(4px); transition: transform 0.45s cubic-bezier(.4,0,.2,1); }
.portfolio-card:hover .portfolio-card-content { transform: translateY(0); }
.portfolio-card.featured .portfolio-card-content { padding: 2rem; }
.portfolio-load-more { display: flex; justify-content: center; margin: 0 0 4rem; }
.portfolio-load-more[hidden] { display: none; }
.portfolio-load-more-button { border: 0; border-radius: 4px; background: var(--accent-button); color: #fff; min-height: 46px; padding: 0.75rem 1.35rem; font: inherit; font-weight: 700; cursor: pointer; }
.portfolio-load-more-button:hover { background: var(--accent-button-hover); }
.portfolio-load-more-button:focus-visible { outline: 3px solid rgba(0,71,93,0.35); outline-offset: 3px; }
.portfolio-card-title { font-weight: 700; color: #fff; margin-bottom: 0.3rem; font-size: 0.95rem; line-height: 1.3; }
.portfolio-card.featured .portfolio-card-title { font-size: 1.35rem; margin-bottom: 0.5rem; }
.portfolio-card-meta { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.78rem; color: rgba(255,255,255,0.8); margin-bottom: 0.5rem; }
.portfolio-card.featured .portfolio-card-meta { font-size: 0.88rem; gap: 0.35rem; }
.portfolio-card-location::before { content: ''; margin-right: 0; }
.portfolio-card-service { display: none; }
.portfolio-card.featured .portfolio-card-service { display: block; }
.portfolio-card-service::before { content: ''; margin-right: 0; }
.portfolio-card-tag { display: inline-block; background: rgba(234,114,52,0.85); color: #fff; padding: 0.25rem 0.7rem; border-radius: 50px; font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.portfolio-card.featured .portfolio-card-tag { font-size: 0.75rem; padding: 0.3rem 0.9rem; }
.portfolio-card-desc { display: none; }
.portfolio-card.featured .portfolio-card-desc { display: block; font-size: 0.82rem; color: rgba(255,255,255,0.72); line-height: 1.45; margin-top: 0.5rem; max-height: 3.6em; overflow: hidden; }
/* Authority badges  - top-right corner stack */
.portfolio-badges { position: absolute; top: 0.75rem; right: 0.75rem; z-index: 3; display: flex; flex-direction: column; gap: 0.4rem; align-items: flex-end; opacity: 0.88; transition: opacity 0.3s; }
.portfolio-card:hover .portfolio-badges { opacity: 1; }
.portfolio-badge { display: flex; align-items: center; gap: 0.3rem; background: rgba(0,0,0,0.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,0.15); border-radius: 6px; padding: 0.28rem 0.55rem; }
.portfolio-badge svg { flex-shrink: 0; }
.portfolio-badge-label { font-size: 0.6rem; font-weight: 700; color: rgba(255,255,255,0.92); text-transform: uppercase; letter-spacing: 0.06em; line-height: 1; white-space: nowrap; }
.portfolio-card.featured .portfolio-badge { padding: 0.35rem 0.65rem; }
.portfolio-card.featured .portfolio-badge-label { font-size: 0.68rem; }
@media (max-width: 768px) { .portfolio-badge-label { display: none; } .portfolio-badge { padding: 0.25rem; } }
/* Dark-mode project detail overlay */
.detail-overlay { position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,0); backdrop-filter: blur(0px); -webkit-backdrop-filter: blur(0px); display: flex; align-items: center; justify-content: center; transition: background 0.35s, backdrop-filter 0.35s, -webkit-backdrop-filter 0.35s; padding: 2rem; }
.detail-overlay.open { background: rgba(0,0,0,0.65); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.detail-panel { position: relative; width: 100%; max-width: 720px; max-height: 90vh; overflow-y: auto; background: var(--modal-dark); border-radius: 16px; box-shadow: 0 32px 80px rgba(0,0,0,0.5); transform: translateY(30px) scale(0.97); opacity: 0; transition: transform 0.4s cubic-bezier(.4,0,.2,1), opacity 0.35s; }
.detail-overlay.open .detail-panel { transform: translateY(0) scale(1); opacity: 1; }
.detail-panel::-webkit-scrollbar { width: 6px; } .detail-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }
.detail-close { position: absolute; top: 1rem; right: 1rem; z-index: 10; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.2); background: rgba(0,0,0,0.4); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); color: #fff; font-size: 1.3rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.25s; line-height: 1; }
.detail-close:hover { background: var(--gold); border-color: var(--gold); color: var(--modal-dark); }
.detail-hero { position: relative; width: 100%; height: 320px; overflow: hidden; border-radius: 16px 16px 0 0; }
.detail-hero img { width: 100%; height: 100%; object-fit: cover; }
/* rgba(26,30,36,0.3) below is the alpha-30 equivalent of var(--modal-dark). CSS variables cannot carry alpha without color-mix(), so the rgba literal is intentional. */
.detail-hero-gradient { position: absolute; inset: 0; background: linear-gradient(0deg, var(--modal-dark) 0%, rgba(26,30,36,0.3) 50%, transparent 100%); }
.detail-hero-caption { position: absolute; left: 1.25rem; right: 3.5rem; bottom: 0.9rem; z-index: 2; color: rgba(255,255,255,0.95); font-size: 0.85rem; line-height: 1.45; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }
.detail-photo-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; padding: 10px 2.5rem 0; }
.detail-photo-thumb { position: relative; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 6px; overflow: hidden; aspect-ratio: 4 / 3; opacity: 0.55; transition: opacity 0.3s ease; }
.detail-photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-photo-thumb::after { content: ''; position: absolute; inset: 0; border: 2px solid transparent; border-radius: 6px; transition: border-color 0.3s ease; }
.detail-photo-thumb.active { opacity: 1; }
.detail-photo-thumb.active::after { border-color: var(--gold); }
.detail-photo-thumb:hover, .detail-photo-thumb:focus-visible { opacity: 1; }
.detail-photo-thumb:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.detail-body { padding: 2rem 2.5rem 2.5rem; }
.detail-badges { display: flex; gap: 0.6rem; margin-bottom: 1rem; flex-wrap: wrap; }
.detail-badge { display: inline-flex; align-items: center; gap: 0.35rem; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 6px; padding: 0.35rem 0.7rem; font-size: 0.72rem; font-weight: 600; color: rgba(255,255,255,0.8); text-transform: uppercase; letter-spacing: 0.05em; }
.detail-title { color: #fff; font-size: 2rem; font-weight: 800; margin-bottom: 0.6rem; line-height: 1.15; }
.detail-meta { display: flex; align-items: center; gap: 0.6rem; color: rgba(255,255,255,0.5); font-size: 0.88rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.detail-dot { width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,0.3); }
.detail-desc { color: rgba(255,255,255,0.72); font-size: 0.95rem; line-height: 1.65; margin-bottom: 2rem; }
.detail-services-heading { color: var(--gold); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.75rem; }
.detail-services { list-style: none; padding: 0; margin: 0 0 2rem; display: flex; flex-direction: column; gap: 0.5rem; }
.detail-services li { color: rgba(255,255,255,0.78); font-size: 0.88rem; padding-left: 1.2rem; position: relative; }
.detail-services li::before { content: ''; position: absolute; left: 0; top: 0.5em; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.detail-details { color: rgba(255,255,255,0.5); font-size: 0.82rem; margin-bottom: 2rem; padding: 1rem; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); border-radius: 8px; }
.detail-details strong { color: rgba(255,255,255,0.7); }
.detail-cta { display: inline-block; background: var(--gold); color: var(--modal-dark); padding: 0.85rem 2rem; border-radius: 8px; font-weight: 700; font-size: 0.9rem; text-decoration: none; transition: all 0.3s; }
.detail-cta:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(234,114,52,0.35); }
@media (max-width: 768px) { .detail-overlay { padding: 0; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 9998; } .detail-panel { max-width: 100%; max-height: 100vh; max-height: 100dvh; border-radius: 0; -webkit-overflow-scrolling: touch; } .detail-hero { height: 220px; border-radius: 0; } .detail-body { padding: 1.5rem; } .detail-title { font-size: 1.5rem; } .detail-photo-strip { padding: 8px 1.5rem 0; gap: 5px; } .detail-hero-caption { font-size: 0.78rem; left: 1rem; } }
.cta-banner { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%); border: 1px solid rgba(234,114,52,0.3); border-radius: 8px; padding: 3rem 2rem; text-align: center; margin-bottom: 4rem; }
.cta-banner h2 { color: #fff; margin-bottom: 1rem; }
.cta-banner p { color: rgba(255,255,255,0.8); max-width: 600px; margin: 0 auto 1.5rem; }
.cta-banner-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-primary { background: var(--accent-button); color: #fff; padding: 0.85rem 2rem; border-radius: 4px; text-decoration: none; font-weight: 600; border: 2px solid var(--accent-button); transition: all 0.3s; display: inline-block; cursor: pointer; }
.btn-primary:hover { background: var(--accent-button-hover); border-color: var(--accent-button-hover); color: #fff; transform: translateY(-2px); }
.btn-outline { background: transparent; color: #fff; padding: 0.85rem 2rem; border-radius: 4px; text-decoration: none; font-weight: 600; border: 2px solid #fff; transition: all 0.3s; display: inline-block; cursor: pointer; }
.btn-outline:hover { background: #fff; color: var(--navy); transform: translateY(-2px); }
footer { background: var(--navy); color: #fff; padding: 3rem 0 1.5rem; }
.social-links { display: flex; gap: 0.75rem; margin-top: 1rem; }
.social-links a { width: 40px; height: 40px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #fff; text-decoration: none; font-weight: 600; transition: all 0.3s; }
.social-links a:hover { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.footer-links { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-links a { color: rgba(255,255,255,0.75); text-decoration: none; font-size: 0.9rem; transition: color 0.3s; }
.footer-links a:hover { color: var(--gold); }
.footer-links p { color: rgba(255,255,255,0.75); font-size: 0.9rem; margin: 0; }
.footer-bottom { max-width: 1200px; margin: 0 auto; padding: 2rem; border-top: 1px solid rgba(255,255,255,0.1); text-align: center; color: rgba(255,255,255,0.6); font-size: 0.85rem; }
@media (max-width: 1024px) and (min-width: 769px) {
    .portfolio-grid { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 240px; }
    .portfolio-card.featured { grid-column: span 2; grid-row: span 2; }
}
@media (max-width: 768px) {
    /* Mobile nav (hamburger overlay) inherits from style.css */

    .page-header {
        min-height: auto;
        padding: 5.5rem 0 1.5rem;
    }
    .page-header h1 {
        font-size: 2rem;
    }
    .page-header p {
        font-size: 1rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        grid-auto-rows: 240px;
    }

    .portfolio-card {
        min-height: 240px;
    }

    .portfolio-card.featured {
        grid-column: span 1;
        grid-row: span 1;
        min-height: 240px;
    }

    .portfolio-card.featured .portfolio-card-title {
        font-size: 1.1rem;
    }

    .portfolio-card.featured .portfolio-card-desc {
        display: none;
    }

    .portfolio-card-title {
        font-size: 0.95rem;
    }

    .portfolio-card-content {
        padding: 1rem;
    }

    .portfolio-card-meta {
        font-size: 0.8rem;
    }

    .portfolio-controls-wrapper {
        margin: 0 -2rem 2rem;
        padding: 0 1rem;
        top: 56px;
    }

    .portfolio-controls-glass {
        padding: 0.75rem;
        border-radius: 10px;
    }

    .portfolio-controls {
        flex-wrap: wrap;
        gap: 0.6rem;
    }

    .filter-btn {
        padding: 0.5rem 0.9rem;
        font-size: 0.75rem;
    }


    .detail-panel {
        max-width: 100%;
        max-height: 100vh;
        max-height: 100dvh;
    }

    .detail-body {
        padding: 1.5rem;
    }

    .detail-title {
        font-size: 1.5rem;
    }

    .header-content {
        padding: 0 1rem;
    }

    .logo img {
        height: 45px;
    }

    .container {
        padding: 0 1rem;
    }
}
/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    .portfolio-card { opacity: 1; transform: none; transition: none; }
    .portfolio-card.revealed { transform: none; }
    .portfolio-card-image img { transition: none; }
    .portfolio-card-overlay { transition: none; }
    .portfolio-card-content { transition: none; transform: none; }
}
@media (max-width: 480px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 200px;
        gap: 0.75rem;
    }

    .portfolio-card {
        min-height: 200px;
    }

    .portfolio-card.featured {
        grid-column: span 1;
        grid-row: span 1;
        min-height: 200px;
    }

    .portfolio-card.featured .portfolio-card-title {
        font-size: 1rem;
    }

    .portfolio-controls-wrapper {
        margin: 0 -1rem 1.5rem;
        padding: 0 0.5rem;
        top: 52px;
    }

    .portfolio-controls-glass {
        padding: 0.6rem;
        border-radius: 8px;
    }

    .portfolio-controls {
        gap: 0.4rem;
    }

    .filter-btn {
        padding: 0.4rem 0.7rem;
        font-size: 0.65rem;
    }

    .page-header {
        min-height: auto;
        padding: 5rem 0 1.25rem;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .page-header p {
        font-size: 0.9rem;
    }

    .portfolio-card-title {
        font-size: 0.9rem;
    }

    .portfolio-card-meta {
        font-size: 0.75rem;
    }

    .portfolio-count {
        font-size: 0.8rem;
    }

    .detail-title {
        font-size: 1.3rem;
    }

    .detail-body {
        padding: 1rem;
    }

    .container {
        padding: 0 0.75rem;
    }

    .cta-banner {
        padding: 2rem 1rem;
    }

    .cta-banner h2 {
        font-size: 1.3rem;
    }

    .cta-banner p {
        font-size: 0.9rem;
    }

    .header-content {
        padding: 0 0.75rem;
    }

    .logo img {
        height: 40px;
    }
}

/* Scroll to top button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gold);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(234, 114, 52, 0.25);
}

.scroll-to-top:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(234, 114, 52, 0.35);
}

.scroll-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .scroll-to-top {
        width: 42px;
        height: 42px;
        bottom: 1.5rem;
        right: 1.5rem;
    }
    .portfolio-section { padding: 2rem 0 !important; }
}
