:root {
    --bg: #0b0f19;
    --card: rgba(255,255,255,0.06);
    --border: rgba(255,255,255,0.12);
    --text: rgba(255,255,255,0.88);
    --muted: rgba(255,255,255,0.65);
    --brand: #60a5fa;
    --accent: #10b981;
    --shadow: 0 18px 45px rgba(0,0,0,0.35);
    --ring: 0 0 0 10px rgba(16,185,129,0.12);
    color-scheme: dark;
}

body.light {
    --bg: #f7fafc;
    --card: rgba(0,0,0,0.04);
    --border: rgba(0,0,0,0.08);
    --text: #0b0f19;
    --muted: rgba(20,30,55,0.7);
    --brand: #2563eb;
    --accent: #059669;
    --shadow: 0 18px 45px rgba(0,0,0,0.12);
    --ring: 0 0 0 10px rgba(37,99,235,0.12);
    color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Layout helpers */
.wrap { width: min(1100px, 92%); margin-inline: auto; }
.section { padding: 64px 0; }
.section-title {
    font-size: clamp(24px, 2vw + 10px, 32px);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 24px;
    background: linear-gradient(90deg, var(--brand), #a78bfa, var(--accent));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Parallax backdrop */
.parallax-bg {
    position: fixed; inset: -10% -10% auto -10%;
    height: 60vh;
    background:
            radial-gradient(1200px 600px at 20% 10%, rgba(96,165,250,0.18), transparent 70%),
            radial-gradient(900px 500px at 80% 20%, rgba(16,185,129,0.16), transparent 70%);
    filter: blur(8px) saturate(120%);
    z-index: -1;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

/* Top bar */
.topbar {
    position: sticky; top: 0; z-index: 30;
    padding: 14px 0;
    display: flex; align-items: center; justify-content: space-between;
    backdrop-filter: saturate(140%) blur(8px);
}
.brand-link {
    font-weight: 800; letter-spacing: -0.02em; text-decoration: none;
    color: var(--brand);
    display: inline-flex; gap: 4px; align-items: center;
}
.brand-link span { color: #a5b4fc; }
.actions { display: flex; gap: 10px; align-items: center; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    height: 38px; padding: 0 14px; border-radius: 12px;
    font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer;
    border: 1px solid transparent;
    transition: transform .2s ease, box-shadow .35s ease, background-color .35s ease, color .35s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
    background: linear-gradient(90deg, var(--brand), var(--accent));
    color: white; box-shadow: var(--shadow);
}
.btn-primary:hover { box-shadow: var(--shadow), var(--ring); }

.btn-soft {
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-soft:hover {
    background: linear-gradient(90deg, color-mix(in oklab, var(--card), #fff 6%), color-mix(in oklab, var(--card), #fff 2%));
    box-shadow: var(--ring);
}

.btn-ghost {
    background: transparent; color: var(--text);
    border: 1px solid var(--border);
}
.btn-ghost:hover { box-shadow: var(--ring); }

.btn-toggle {
    width: 38px; padding: 0; min-width: 38px; aspect-ratio: 1;
    border-radius: 10px; border: 1px solid var(--border); background: var(--card);
}

/* Cards & hover polish */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    overflow: hidden;
}
.hover-card {
    transition: transform .45s cubic-bezier(.25,.8,.25,1), box-shadow .45s cubic-bezier(.25,.8,.25,1), background-color .4s;
}
.hover-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 50px rgba(0,0,0,0.35);
}

/* Hero */
.hero {
    display: grid; grid-template-columns: 1.2fr .9fr; gap: 28px;
    padding: 64px 0 48px;
}
.hero-text h1 {
    font-size: clamp(28px, 3.2vw + 10px, 44px); margin: 0 0 12px; font-weight: 900; letter-spacing: -0.03em;
}
.kicker { color: var(--muted); margin: 0 0 18px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-media img { display: block; width: 100%; height: auto; }

/* Two-column minis */
.grid-2 {
    display: grid; grid-template-columns: repeat(2,1fr); gap: 16px;
}
.mini-card {
    padding: 18px 18px 16px;
    border-radius: 16px;
    background: var(--card);
    border: 1px solid var(--border);
}
.mini-card h3 { margin: 0 0 8px; font-size: 18px; }
.mini-card p, .mini-card li { color: var(--muted); }
.mini-card.alt { background: color-mix(in oklab, var(--card), #fff 4%); }

/* Clean list */
.clean { margin: 0; padding-left: 16px; }
.clean li { margin: 6px 0; }

/* Gallery */
.gallery {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px;
}
.gallery-card { overflow: hidden; }
.gallery-card img { width: 100%; height: 180px; object-fit: cover; display: block;
    transition: transform 1.2s cubic-bezier(.25,1,.5,1), filter .6s ease; }
.gallery-card:hover img { transform: scale(1.06); }
.gallery-card figcaption {
    font-size: 13px; color: var(--muted); padding: 10px 12px 12px;
}

/* Details grid */
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.detail { padding: 18px; }
.detail h4 { margin: 0 0 6px; }
.detail p { margin: 0; color: var(--muted); }

/* Footer */
.footer {
    padding: 48px 0 28px;
    border-top: 1px solid var(--border);
    margin-top: 48px;
    text-align: center;
}
.footer-cta {
    margin-top: 14px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
}

/* Subtle tilt (GPU-friendly) */
.tilt { will-change: transform; transform: translateZ(0); }
.tilt:hover { transform: translateY(-6px) rotateX(0.6deg) rotateY(-0.6deg); transition: transform .6s cubic-bezier(.25,1,.5,1); }

/* Parallax easing for motion-safe users */
@media (prefers-reduced-motion: reduce) {
    .hover-card, .tilt, .gallery-card img { transition: none !important; }
}

/* Responsive */
@media (max-width: 1024px) {
    .gallery { grid-template-columns: repeat(3,1fr); }
    .hero { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .grid-2 { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: 1fr; }
    .gallery { grid-template-columns: repeat(2,1fr); }
}

/* === ULTRA-SMOOTH HOVER POLISH (Apple-style) === */

/* Universal transition settings */
.hover-card,
.mini-card,
.gallery-card,
.detail,
.btn,
.card img {
    transition:
            transform 0.6s cubic-bezier(0.25, 1, 0.5, 1),
            box-shadow 0.6s cubic-bezier(0.25, 1, 0.5, 1),
            background-color 0.5s ease,
            color 0.5s ease,
            filter 0.5s ease;
    will-change: transform, box-shadow, background-color;
}

/* ===== Cards Hover ===== */
.hover-card:hover,
.mini-card:hover,
.detail:hover,
.gallery-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 20px 45px rgba(59, 130, 246, 0.25),
    0 8px 25px rgba(16, 185, 129, 0.2);
    background: linear-gradient(
            145deg,
            color-mix(in srgb, var(--card), var(--brand) 12%),
            color-mix(in srgb, var(--card), var(--accent) 12%)
    );
    border-color: rgba(255, 255, 255, 0.15);
    filter: brightness(1.05);
}

/* Light mode refinement */
body.light .hover-card:hover,
body.light .mini-card:hover,
body.light .detail:hover,
body.light .gallery-card:hover {
    box-shadow: 0 20px 45px rgba(16, 185, 129, 0.2),
    0 8px 20px rgba(59, 130, 246, 0.15);
    background: linear-gradient(
            145deg,
            color-mix(in srgb, var(--card), var(--brand) 10%),
            color-mix(in srgb, var(--card), var(--accent) 10%)
    );
    filter: brightness(1.02);
}

/* ===== Buttons Hover ===== */
.btn:hover {
    transform: translateY(-3px);
    filter: brightness(1.08);
}

/* Primary buttons get soft glowing gradient */
.btn-primary:hover {
    background: linear-gradient(90deg, var(--accent), var(--brand));
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.45),
    0 0 35px rgba(59, 130, 246, 0.35);
}

/* Soft/ghost buttons subtle elevation */
.btn-soft:hover,
.btn-ghost:hover {
    background: color-mix(in srgb, var(--card), var(--brand) 8%);
    color: var(--text);
    box-shadow: 0 6px 22px rgba(59, 130, 246, 0.25);
}

/* Theme toggle hover animation */
.btn-toggle:hover {
    transform: rotate(8deg) scale(1.1);
    background: linear-gradient(135deg, var(--brand), var(--accent));
    color: #fff;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

/* ===== Image Hover (Parallax-like lift) ===== */
/* === PERFECT LANDSCAPE GALLERY (Apple-style widescreen look) === */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 28px;
    justify-content: center;
    align-items: start;
    margin-top: 1.5rem;
    padding-inline: 0.5rem;
}

/* Each card is wider and shallower now */
.gallery-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    aspect-ratio: 16 / 9; /* landscape ratio */
}

/* Make images fully fill in 16:9 frame */
.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition:
            transform 1.2s cubic-bezier(0.25, 1, 0.5, 1),
            filter 0.6s ease,
            box-shadow 0.6s ease;
    transform-origin: center center;
}

/* Smooth hover lift */
.gallery-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px rgba(59, 130, 246, 0.25);
}

/* Subtle zoom on image */
.gallery-card:hover img {
    transform: scale(1.06);
    filter: brightness(1.08);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.3);
}

/* Caption sits below image */
.gallery-card figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

/* Light mode refinement */
body.light .gallery-card:hover {
    box-shadow: 0 25px 50px rgba(16, 185, 129, 0.25);
}
body.light .gallery-card:hover img {
    filter: brightness(1.05);
    box-shadow: 0 15px 35px rgba(16, 185, 129, 0.25);
}

/* ===== Parallax background hover illusion ===== */
body:hover .parallax-bg {
    transform: translateY(-10px) scale(1.02);
    transition: transform 2.4s cubic-bezier(0.25, 1, 0.5, 1);
}
