:root {
    --bg-dark: #111a2b;
    --bg-mid: #18233a;
    --card-bg: #1d2942;
    --accent: #c9a24d;
    --text-main: #e9edf5;
    --text-muted: #aab4c6;
}

/* GLOBAL */
html {
    overflow-x: clip;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    overflow-x: clip;
}

section {
    padding: 3rem 0;
}

@media (min-width: 576px) {
    section {
        padding: 4rem 0;
    }
}

@media (min-width: 992px) {
    section {
        padding: 5rem 0;
    }
}

/* NAVBAR */
.premium-nav {
    background-color: rgba(17, 26, 43, 0.9);
    backdrop-filter: blur(8px);
}

.premium-nav .navbar-toggler {
    border-color: rgba(233, 237, 245, 0.35);
}

.premium-nav .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(201, 162, 77, 0.35);
}

/* HERO */
.hero-section {
    min-height: min(75vh, 560px);
    background:
        linear-gradient(rgba(17,26,43,0.7), rgba(17,26,43,0.85)),
        url('../images/hero-image.jpg') center/cover no-repeat;
}

@media (min-width: 768px) {
    .hero-section {
        min-height: min(85vh, 720px);
    }
}

.hero-title {
    font-size: clamp(1.75rem, 5vw + 0.75rem, 3.2rem);
    font-weight: 700;
    line-height: 1.15;
    word-wrap: break-word;
    hyphens: auto;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: clamp(1rem, 1.5vw + 0.75rem, 1.2rem);
    line-height: 1.5;
}

.section-heading {
    font-size: clamp(1.5rem, 3vw + 0.75rem, 2rem);
    line-height: 1.25;
    word-wrap: break-word;
}

/* SECTIONS */
.section-dark {
    background-color: var(--bg-dark);
}

.section-mid {
    background-color: var(--bg-mid);
}

/* CARDS */
.premium-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
    transition: transform 0.3s ease;
}

@media (min-width: 576px) {
    .premium-card {
        padding: 1.5rem;
    }
}

@media (min-width: 992px) {
    .premium-card {
        padding: 30px;
    }
}

.premium-card:hover {
    transform: translateY(-5px);
}

.premium-card h4 {
    margin-bottom: 15px;
}

.premium-card ul {
    padding-left: 20px;
    color: var(--text-muted);
}

/* BUTTONS */
.btn-accent {
    background-color: var(--accent);
    color: #111;
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
}

@media (min-width: 576px) {
    .btn-accent {
        padding: 12px 28px;
    }
}

.btn-accent:hover {
    background-color: #dab867;
}

/* FORM */
.premium-input {
    background-color: #131c2e;
    border: 1px solid #2a3550;
    color: var(--text-main);
    border-radius: 8px;
}

.premium-input::placeholder {
    color: #8d98ad;
}

.premium-input:focus {
    background-color: #131c2e;
    border-color: var(--accent);
    box-shadow: none;
    color: white;
}

.text-accent {
    color: var(--accent) !important;
}

.letter-spacing-wide {
    letter-spacing: 0.12em;
}

/* PORTFOLIO — latch + collapse */
.portfolio-latch {
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.portfolio-collapse-inner {
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.portfolio-folder-nav .nav-link {
    background-color: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.portfolio-folder-nav .nav-link:hover {
    color: var(--text-main);
    border-color: rgba(201, 162, 77, 0.35);
}

.portfolio-folder-nav .nav-link.active {
    background-color: var(--accent);
    color: #111;
    border-color: var(--accent);
    font-weight: 600;
}

.portfolio-ba-card .portfolio-ba-head {
    background: linear-gradient(180deg, rgba(29, 41, 66, 0.98), rgba(24, 35, 58, 0.92));
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.portfolio-expand {
    color: var(--accent) !important;
    font-weight: 600;
    font-size: 0.8rem;
}

.ba-compare {
    position: relative;
    aspect-ratio: 4 / 3;
    touch-action: none;
    user-select: none;
    cursor: ew-resize;
    background: #0a0f18;
}

.ba-compare .ba-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.ba-compare .ba-after {
    z-index: 1;
}

.ba-compare .ba-clip {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 50%;
    overflow: hidden;
    z-index: 2;
    border-right: 2px solid var(--accent);
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.45);
}

.ba-compare .ba-clip .ba-before {
    max-width: none;
    height: 100%;
    width: 100%;
}

.ba-compare .ba-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 44px;
    margin-left: -22px;
    z-index: 4;
    cursor: ew-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.ba-compare .ba-handle::after {
    content: "";
    width: 4px;
    height: 56px;
    border-radius: 4px;
    background: var(--accent);
    box-shadow: 0 0 0 2px rgba(17, 26, 43, 0.85), 0 4px 16px rgba(0, 0, 0, 0.5);
}

.ba-compare .ba-handle:focus {
    outline: none;
}

.ba-compare .ba-handle:focus-visible::after {
    box-shadow: 0 0 0 3px rgba(201, 162, 77, 0.55), 0 4px 16px rgba(0, 0, 0, 0.5);
}

.ba-badge {
    position: absolute;
    top: 0.5rem;
    z-index: 3;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    pointer-events: none;
}

.ba-badge-before {
    left: 0.5rem;
    background: rgba(17, 26, 43, 0.82);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.ba-badge-after {
    right: 0.5rem;
    background: var(--accent);
    color: #111;
}

.ba-reset {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    z-index: 5;
    opacity: 0.88;
    pointer-events: auto;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
}

.portfolio-reel {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-color: var(--accent) rgba(255, 255, 255, 0.08);
}

.portfolio-reel-item {
    flex: 0 0 auto;
    width: min(240px, 72vw);
    scroll-snap-align: start;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    text-align: left;
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.portfolio-reel-item:hover,
.portfolio-reel-item:focus-visible {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    outline: none;
}

.portfolio-reel-frame {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.portfolio-reel-label {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
}

.portfolio-modal-content {
    background-color: var(--card-bg);
    color: var(--text-main);
}

.portfolio-modal-content .modal-header {
    background: rgba(0, 0, 0, 0.2);
}

/* FOOTER CREDIT */
.site-footer-note {
    background: linear-gradient(180deg, rgba(17, 26, 43, 0.95), rgba(10, 14, 22, 0.98));
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.8rem 0 1rem;
}

.footer-credit {
    color: #8d98ad;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
}

.footer-credit a {
    color: #b5becf;
    text-decoration: none;
    border-bottom: 1px dotted rgba(181, 190, 207, 0.5);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-credit a:hover,
.footer-credit a:focus-visible {
    color: #d5dde9;
    border-bottom-color: rgba(213, 221, 233, 0.95);
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .premium-card {
        transition: none;
    }

    .premium-card:hover {
        transform: none;
    }

    .portfolio-reel-item {
        transition: none;
    }

    .portfolio-reel-item:hover,
    .portfolio-reel-item:focus-visible {
        transform: none;
    }
}
