/* Raja Portfolio — Frontend design system
   Mirrors the Raja Dev Solutions website (rajadevsolutions.online):
   sky-blue / navy palette, system font stack, white blog-style cards,
   dark navy header + footer, gradient hero panel. */

:root {
    --brand-50: #F0F9FF;
    --brand-100: #E0F2FE;
    --brand-200: #BAE6FD;
    --brand-300: #7DD3FC;
    --brand-400: #38BDF8;
    --brand-500: #0EA5E9;
    --brand-600: #0284C7;
    --brand-700: #0369A1;
    --brand-800: #075985;
    --brand-900: #0C4A6E;
    --brand-950: #082F49;
    --ink: #0A2E4A;
    --darkest: #051E33;
    --navy: #04182A;
    --header-bg: rgba(7, 31, 54, 0.95);
    --page-bg: #F5FAFE;
    --text: #334155;
    --muted: #64748B;
    --border: #DCE9F5;
    --primary: #0EA5E9;
    --accent: #0284C7;
    --gradient: linear-gradient(135deg, #0EA5E9 0%, #0284C7 55%, #2563EB 130%);
    --hero-gradient: linear-gradient(125deg, #04182A 0%, #082F49 24%, #0C4A6E 46%, #0369A1 66%, #0284C7 84%, #0C4A6E 105%);
    --text-gradient: linear-gradient(92deg, #BAE6FD 0%, #38BDF8 45%, #7DD3FC 80%, #E0F2FE 100%);
}

html { scroll-behavior: smooth; }

body {
    background-color: var(--page-bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.65;
    overflow-x: hidden;
    padding-top: 64px;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--ink);
    line-height: 1.2;
}

code, .tech-label { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-700); }

::selection { background: var(--brand-200); color: var(--brand-950); }

.text-muted-custom { color: var(--muted) !important; }
.gradient-text {
    background: var(--text-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.brand-dot { color: var(--brand-400); }

@media (min-width: 1400px) {
    .container { max-width: 1280px; }
}

/* ---------- Scroll progress ---------- */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, #38BDF8, #0EA5E9, #2563EB);
    z-index: 2000;
}

/* ---------- Navbar ---------- */
.navbar-portfolio {
    background: var(--header-bg);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    min-height: 64px;
    padding-top: .45rem;
    padding-bottom: .45rem;
    transition: box-shadow .3s ease;
}
.navbar-portfolio.scrolled {
    box-shadow: 0 14px 34px -12px rgba(4, 24, 42, 0.55);
}
.navbar-portfolio .navbar-brand {
    font-weight: 800;
    font-size: 1.32rem;
    letter-spacing: .01em;
    color: #fff !important;
}
.navbar-portfolio .nav-link {
    position: relative;
    color: rgba(224, 242, 254, .85) !important;
    font-weight: 500;
    margin: 0 .45rem;
    padding-bottom: .35rem;
    transition: color .2s ease;
}
.navbar-portfolio .nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 100%;
    background: var(--brand-400);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
}
.navbar-portfolio .nav-link:hover,
.navbar-portfolio .nav-link.active { color: #fff !important; }
.navbar-portfolio .nav-link:hover::after,
.navbar-portfolio .nav-link.active::after { transform: scaleX(1); }
.navbar-toggler { border-color: rgba(186, 230, 253, .35); }
.navbar-toggler-icon { filter: invert(1); }
.navbar-portfolio .navbar-collapse { background: transparent; }
@media (max-width: 991.98px) {
    .navbar-portfolio .navbar-collapse {
        background: rgba(7, 31, 54, .98);
        border-radius: 0 0 1rem 1rem;
        padding: .75rem .5rem 1rem;
        margin-top: .5rem;
    }
    .navbar-portfolio .nav-link { margin: .15rem .45rem; }
}

/* ---------- Buttons ---------- */
.btn-gradient {
    position: relative;
    overflow: hidden;
    background: var(--gradient);
    border: none;
    color: #fff !important;
    font-weight: 600;
    padding: .7rem 1.6rem;
    border-radius: .5rem;
    box-shadow: 0 10px 24px -8px rgba(2, 132, 199, .55), inset 0 1px 0 rgba(255, 255, 255, .25);
    transition: transform .2s ease, box-shadow .25s ease, background .25s ease;
}
.btn-gradient::after {
    content: '';
    position: absolute;
    top: 0;
    left: -90%;
    width: 45%;
    height: 100%;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .35), transparent);
    transform: skewX(-20deg);
    transition: left .6s ease;
}
.btn-gradient:hover {
    background: linear-gradient(135deg, #38BDF8 0%, #0EA5E9 55%, #0284C7 130%);
    box-shadow: 0 14px 30px -8px rgba(2, 132, 199, .65), inset 0 1px 0 rgba(255, 255, 255, .25);
    transform: translateY(-2px);
}
.btn-gradient:hover::after { left: 140%; }
.btn-outline-light-custom {
    background: #fff;
    border: 1px solid #D9E8F5;
    color: var(--brand-700) !important;
    font-weight: 600;
    padding: .7rem 1.6rem;
    border-radius: .5rem;
    box-shadow: 0 6px 16px -8px rgba(7, 47, 79, .18);
    transition: transform .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.btn-outline-light-custom:hover {
    transform: translateY(-2px);
    border-color: var(--brand-300);
    color: var(--brand-600) !important;
    box-shadow: 0 10px 22px -8px rgba(2, 132, 199, .3);
}

/* ---------- Sections ---------- */
.section { padding: 4rem 0; }
.section-alt { background: #FFFFFF; }
.section-heading { font-size: 1.875rem; font-weight: 800; margin-bottom: 1rem; color: var(--ink); }
.section-kicker {
    display: inline-block;
    background: var(--brand-100);
    color: var(--brand-700);
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .75rem;
    font-weight: 700;
    padding: .35rem .85rem;
    border-radius: 999px;
    margin-bottom: .85rem;
}
.section-sub { color: var(--muted); max-width: 640px; }

/* ---------- Hero (blog-style gradient panel) ---------- */
.hero { padding: 1.75rem 0 0; }
.hero-panel {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
    background: var(--hero-gradient);
    background-size: 170% 170%;
    padding: 3.5rem 3rem;
    box-shadow: 0 30px 60px -25px rgba(4, 24, 42, .5);
}
@media (prefers-reduced-motion: no-preference) {
    .hero-panel { animation: heroPan 16s ease-in-out infinite alternate; }
}
@keyframes heroPan {
    0% { background-position: 0% 40%; }
    100% { background-position: 100% 60%; }
}
.hero-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(125, 211, 252, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(125, 211, 252, .08) 1px, transparent 1px);
    background-size: 44px 44px;
    pointer-events: none;
}
.hero-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(560px 380px at 88% -10%, rgba(56, 189, 248, .35), transparent 62%),
        radial-gradient(620px 420px at -8% 112%, rgba(2, 132, 199, .3), transparent 62%);
    pointer-events: none;
}
.hero-panel .row { position: relative; z-index: 2; }
.hero-panel h1 {
    color: #fff;
    font-size: clamp(2.2rem, 4.6vw, 3.4rem);
    font-weight: 800;
}
.hero-panel .lead { color: #CDEBFB; font-size: 1.13rem; }
.hero-pill {
    display: inline-flex;
    align-items: center;
    background: rgba(125, 211, 252, .14);
    border: 1px solid rgba(125, 211, 252, .35);
    color: var(--brand-100);
    font-size: .85rem;
    font-weight: 600;
    padding: .4rem .95rem;
    border-radius: 999px;
}
.hero-eyebrow {
    display: inline-block;
    background: rgba(125, 211, 252, .14);
    border: 1px solid rgba(125, 211, 252, .35);
    color: var(--brand-200);
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .72rem;
    font-weight: 700;
    padding: .35rem .85rem;
    border-radius: 999px;
}
.hero-badges .badge {
    background: rgba(125, 211, 252, .12);
    border: 1px solid rgba(125, 211, 252, .32);
    color: var(--brand-100);
    font-weight: 500;
    padding: .5rem .9rem;
    border-radius: 999px;
    margin: 0 .3rem .5rem 0;
    font-size: .85rem;
}
.availability-dot {
    display: inline-block;
    width: 9px; height: 9px;
    border-radius: 50%;
    background: #34D399;
    box-shadow: 0 0 0 4px rgba(52, 211, 153, .2);
    margin-right: .45rem;
    flex-shrink: 0;
}
.hero-photo-wrap { position: relative; display: inline-block; }
.hero-photo-wrap::before {
    content: '';
    position: absolute;
    inset: -40px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 42%, rgba(56, 189, 248, .4), rgba(2, 132, 199, .18) 55%, transparent 72%);
    filter: blur(24px);
    z-index: 0;
}
.hero-photo {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    /* Transparent background-removed cutout — no border/box; the alpha-aware
       drop shadow grounds the portrait on the navy gradient hero. The soft
       bottom fade melts the bust cut-off into the backdrop. */
    filter: drop-shadow(0 26px 32px rgba(2, 20, 38, .5));
    -webkit-mask-image: linear-gradient(180deg, #000 86%, transparent 99%);
    mask-image: linear-gradient(180deg, #000 86%, transparent 99%);
}
@media (prefers-reduced-motion: no-preference) {
    .hero-photo { animation: heroFloat 7s ease-in-out infinite; }
}
@keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-9px); }
}
.hero-photo-wrap::after {
    content: '';
    position: absolute;
    left: 12%;
    right: 12%;
    bottom: -14px;
    height: 34px;
    background: radial-gradient(ellipse at center, rgba(2, 20, 38, .5), transparent 70%);
    filter: blur(7px);
    z-index: 0;
}
/* Intro video — 3D framed player in the hero (takes the portrait's place) */
.hero-video-scene {
    perspective: 1200px;
    max-width: 470px;
    margin: 0 auto;
    text-align: center;
}
@media (prefers-reduced-motion: no-preference) {
    .hero-video-float { animation: heroFloat 8s ease-in-out infinite; }
}
.hero-video-frame {
    position: relative;
    padding: 10px;
    border-radius: 1.1rem;
    background: linear-gradient(145deg, rgba(56, 189, 248, .38), rgba(2, 132, 199, .12) 45%, rgba(7, 31, 54, .65));
    border: 1px solid rgba(125, 211, 252, .5);
    box-shadow: 0 42px 70px -24px rgba(2, 20, 38, .8), 0 18px 30px -16px rgba(2, 20, 38, .55);
    transform: rotateY(-9deg) rotateX(2deg);
    transition: transform .6s ease, box-shadow .6s ease;
}
.hero-video-scene:hover .hero-video-frame {
    transform: rotateY(-3deg) rotateX(1deg) translateY(-4px);
    box-shadow: 0 48px 80px -24px rgba(2, 20, 38, .85), 0 22px 34px -16px rgba(2, 20, 38, .6);
}
.hero-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: .7rem;
    background: #04182A;
}
.hero-video-caption {
    margin: .85rem 0 0;
    color: var(--brand-100);
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .02em;
}
.hero-video-caption i { color: var(--brand-300); margin-right: .35rem; }
@media (max-width: 575.98px) {
    .hero-video-frame { transform: rotateY(-4deg) rotateX(1deg); }
    .hero-video-scene:hover .hero-video-frame { transform: rotateY(-2deg) rotateX(0deg); }
}
.scroll-cue {
    text-align: center;
    color: var(--brand-600);
    font-size: 1.15rem;
    padding: 1.1rem 0 .4rem;
    animation: bounceDown 2.2s infinite;
}
@keyframes bounceDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(7px); }
}

/* ---------- Cards (blog pattern) ---------- */
.card-dark {
    position: relative;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.8rem;
    height: 100%;
    overflow: hidden;
    box-shadow: 0 6px 18px -8px rgba(7, 47, 79, .08);
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.card-dark::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #38BDF8, #0EA5E9, #2563EB);
}
.card-dark:hover {
    transform: translateY(-4px);
    border-color: var(--brand-300);
    box-shadow: 0 18px 34px -16px rgba(2, 132, 199, .35);
}
.card-dark h3 { font-size: 1.25rem; color: var(--ink); }
.card-dark p { color: var(--muted); }
.icon-badge {
    width: 52px; height: 52px;
    border-radius: .75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-100);
    color: var(--brand-600);
    font-size: 1.3rem;
    margin-bottom: 1.1rem;
    transition: transform .3s ease;
}
.card-dark:hover .icon-badge { transform: scale(1.08) rotate(-4deg); }

.feature-list { list-style: none; padding: 0; margin: 0; }
.feature-list li {
    color: #475569;
    padding: .28rem 0;
    font-size: .95rem;
}
.feature-list li i { color: var(--brand-600); margin-right: .5rem; font-size: .8rem; }

/* ---------- Skills ---------- */
.skill-category-title { font-size: 1.15rem; margin-bottom: 1.1rem; color: var(--ink); }
.skill-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.1rem 1.2rem;
    text-align: center;
    font-weight: 600;
    color: var(--ink);
    box-shadow: 0 6px 18px -10px rgba(7, 47, 79, .1);
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
    height: 100%;
}
.skill-card:hover {
    transform: translateY(-4px);
    border-color: var(--brand-300);
    box-shadow: 0 18px 34px -16px rgba(2, 132, 199, .35);
}
.skill-card i { display: block; font-size: 1.5rem; margin-bottom: .5rem; color: var(--brand-600); }
.proficiency {
    height: 6px;
    background: var(--brand-100);
    border-radius: 999px;
    margin-top: .7rem;
    overflow: hidden;
}
.proficiency > span {
    display: block;
    height: 100%;
    background: var(--gradient);
    border-radius: 999px;
    width: 0;
    transition: width 1.1s ease;
}

/* ---------- Projects ---------- */
.project-card { overflow: hidden; padding: 0; display: flex; flex-direction: column; }
.project-card .project-media {
    height: 210px;
    background: linear-gradient(140deg, var(--brand-100), var(--brand-200));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.project-card .project-media img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}
.project-card:hover .project-media img { transform: scale(1.05); }
.project-card .project-media .media-placeholder {
    font-size: 3rem;
    color: var(--brand-500);
    opacity: .65;
}
.project-card .project-body { padding: 1.6rem; display: flex; flex-direction: column; flex: 1; }
.project-card .project-body h3 { transition: color .2s ease; }
.project-card:hover .project-body h3 { color: var(--brand-600); }
.project-category {
    display: inline-block;
    align-self: flex-start;
    background: var(--brand-100);
    color: var(--brand-700);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    font-weight: 700;
    padding: .28rem .75rem;
    border-radius: 999px;
}
.case-link { font-weight: 600; color: var(--brand-600); }
.case-link:hover { color: var(--brand-700); }
.case-link i { transition: transform .2s ease; }
.case-link:hover i { transform: translateX(3px); }
.tech-pill {
    display: inline-block;
    border: 1px solid var(--brand-100);
    background: var(--brand-50);
    color: var(--brand-700);
    border-radius: 999px;
    padding: .18rem .7rem;
    font-size: .78rem;
    margin: 0 .3rem .4rem 0;
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- Process ---------- */
.process-step { position: relative; }
.process-number {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(2, 132, 199, .55);
}

/* ---------- Forms ---------- */
.form-control, .form-select {
    background-color: #fff;
    border: 1px solid #CBD8E6;
    color: var(--text);
    border-radius: .5rem;
    padding: .7rem 1rem;
}
.form-control:focus, .form-select:focus {
    background-color: #fff;
    border-color: var(--brand-400);
    color: var(--text);
    box-shadow: 0 0 0 .25rem rgba(56, 189, 248, .28);
}
.form-control::placeholder { color: rgba(100, 116, 139, .65); }
.form-select option { background: #fff; color: var(--text); }
.form-label { font-weight: 600; font-size: .92rem; color: var(--ink); }

/* ---------- Testimonials ---------- */
.testimonial-placeholder {
    border: 1.5px dashed var(--brand-200);
    background: #fff;
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
    color: var(--muted);
}
.stars { color: #F59E0B; }

/* ---------- Footer ---------- */
footer {
    background: linear-gradient(180deg, var(--brand-950) 0%, var(--navy) 100%);
    padding: 3.5rem 0 2rem;
    color: rgba(186, 230, 253, .78);
    margin-top: 4rem;
}
footer h5, footer h6 { color: #fff; font-weight: 700; }
footer a { color: rgba(186, 230, 253, .78); }
footer a:hover { color: #fff; }
footer .footer-brand { font-size: 1.35rem; font-weight: 800; color: #fff !important; }
footer hr { border-color: rgba(186, 230, 253, .18); opacity: 1; }
.social-icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(186, 230, 253, .35);
    color: var(--brand-200) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: .5rem;
    transition: background .2s ease, transform .2s ease, color .2s ease;
}
.social-icon:hover { background: var(--gradient); color: #fff !important; transform: translateY(-3px); }

/* ---------- Back to top ---------- */
#back-to-top {
    position: fixed;
    right: 1.4rem;
    bottom: 1.4rem;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: var(--gradient);
    color: #fff;
    font-size: 1rem;
    box-shadow: 0 12px 26px -8px rgba(2, 132, 199, .6);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
    z-index: 1500;
}
#back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
#back-to-top:hover { transform: translateY(-3px); }

/* ---------- Inner page banners (blog-style) ---------- */
.page-header { padding: 1.75rem 0 0; background: transparent; }
.page-header .container {
    position: relative;
    overflow: hidden;
    background: var(--hero-gradient);
    background-size: 170% 170%;
    border-radius: 1.5rem;
    padding: 3rem 2.75rem;
    box-shadow: 0 30px 60px -25px rgba(4, 24, 42, .5);
}
.page-header .container::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(125, 211, 252, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(125, 211, 252, .08) 1px, transparent 1px);
    background-size: 44px 44px;
    pointer-events: none;
}
.page-header .container::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(560px 380px at 88% -10%, rgba(56, 189, 248, .35), transparent 62%),
        radial-gradient(620px 420px at -8% 112%, rgba(2, 132, 199, .3), transparent 62%);
    pointer-events: none;
}
.page-header .container > * { position: relative; z-index: 2; }
.page-header .section-heading { color: #fff; font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
.page-header .section-sub { color: #CDEBFB; }
.page-header .section-kicker {
    background: rgba(125, 211, 252, .14);
    border: 1px solid rgba(125, 211, 252, .35);
    color: var(--brand-200);
}
.page-header .tech-pill {
    background: rgba(125, 211, 252, .12);
    border-color: rgba(125, 211, 252, .35);
    color: var(--brand-200);
}

/* ---------- Landing pages ---------- */
.landing-hero { padding: 1.75rem 0 0; }
.landing-hero .container {
    position: relative;
    overflow: hidden;
    background: var(--hero-gradient);
    background-size: 170% 170%;
    border-radius: 1.5rem;
    padding: 3.5rem 3rem;
    box-shadow: 0 30px 60px -25px rgba(4, 24, 42, .5);
}
.landing-hero .container::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(125, 211, 252, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(125, 211, 252, .08) 1px, transparent 1px);
    background-size: 44px 44px;
    pointer-events: none;
}
.landing-hero .container::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(560px 380px at 88% -10%, rgba(56, 189, 248, .35), transparent 62%),
        radial-gradient(620px 420px at -8% 112%, rgba(2, 132, 199, .3), transparent 62%);
    pointer-events: none;
}
.landing-hero .container > * { position: relative; z-index: 2; }
.landing-hero .section-heading { color: #fff; }
.landing-hero .section-kicker {
    background: rgba(125, 211, 252, .14);
    border: 1px solid rgba(125, 211, 252, .35);
    color: var(--brand-200);
}
.landing-hero .text-muted-custom { color: #CDEBFB !important; }
.accordion-item { background: #fff; border-color: var(--border) !important; }
.accordion-button { background: #fff; color: var(--ink); font-weight: 600; }
.accordion-button:not(.collapsed) { background: var(--brand-50); color: var(--brand-700); box-shadow: none; }
.accordion-button:focus { box-shadow: 0 0 0 .25rem rgba(56, 189, 248, .28); border-color: var(--brand-400); }
.accordion-body { color: var(--muted); }

/* ---------- Reveal animations (JS-gated, fail-safe) ----------
   Elements are only hidden once frontend.js adds .rv (so no-JS or a
   script failure leaves everything fully visible). .rv.in plays a
   CSS transition — compositor-driven, always completes. */
.rv {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .8s cubic-bezier(.22, .61, .36, 1), transform .8s cubic-bezier(.22, .61, .36, 1);
    transition-delay: var(--rv-delay, 0s);
    will-change: opacity, transform;
}
.rv.in { opacity: 1; transform: translateY(0); }

/* ---------- Misc ---------- */
.gallery-img { border-radius: 1rem; border: 1px solid var(--border); width: 100%; object-fit: cover; }
.alert-success-custom {
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    color: #065F46;
    border-radius: .8rem;
    padding: 1rem 1.2rem;
}
.hp-field { position: absolute !important; left: -9999px !important; opacity: 0; height: 0; overflow: hidden; }

@media (max-width: 767px) {
    .section { padding: 3rem 0; }
    .section-heading { font-size: 1.6rem; }
    .hero-panel { padding: 2.4rem 1.4rem; }
    .page-header .container { padding: 2.2rem 1.4rem; }
    .landing-hero .container { padding: 2.4rem 1.4rem; }
    .hero-photo { max-width: 290px; }
    footer { margin-top: 3rem; }
}

/* ---------- Animation polish (site-wide) ---------- */
/* Subtle page-load fade/slide for the main content — runs once on
   load and always ends at full opacity. */
@media (prefers-reduced-motion: no-preference) {
    main { animation: pageIn .5s ease-out both; }
}
@keyframes pageIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Floating accent shapes inside the home hero panel — decorative,
   slow and subtle; the panel already clips overflow. */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}
.hero-orb-1 {
    width: 120px; height: 120px;
    top: -34px; right: 11%;
    border: 1.5px solid rgba(125, 211, 252, .35);
}
.hero-orb-2 {
    width: 54px; height: 54px;
    bottom: 10%; left: 45%;
    background: radial-gradient(circle at 35% 35%, rgba(125, 211, 252, .5), rgba(2, 132, 199, .12));
}
.hero-orb-3 {
    width: 22px; height: 22px;
    top: 20%; left: 3%;
    background: rgba(56, 189, 248, .45);
}
@media (prefers-reduced-motion: no-preference) {
    .hero-orb-1 { animation: orbFloat 11s ease-in-out infinite; }
    .hero-orb-2 { animation: orbFloat 9s ease-in-out infinite reverse; }
    .hero-orb-3 { animation: orbFloat 7s ease-in-out infinite; }
}
@keyframes orbFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}
@media (max-width: 767px) {
    .hero-orb-2 { left: auto; right: 8%; bottom: 6%; }
}

/* Footer list links glide sideways on hover */
footer ul.list-unstyled a {
    display: inline-block;
    transition: transform .25s ease, color .2s ease;
}
footer ul.list-unstyled a:hover { transform: translateX(4px); }

/* Animated mobile menu: panel fade/slide on open, links stagger in,
   toggler icon eases round while the menu is open. (Bootstrap's
   height transition already animates the close.) */
.navbar-toggler .navbar-toggler-icon { transition: transform .3s ease; }
.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon { transform: rotate(90deg); }
@media (max-width: 991.98px) {
    .navbar-portfolio .navbar-collapse.show { animation: navPanelIn .3s ease both; }
}
@keyframes navPanelIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 991.98px) and (prefers-reduced-motion: no-preference) {
    .navbar-portfolio .navbar-collapse.show .nav-item { animation: navLinkIn .35s ease both; }
    .navbar-portfolio .navbar-collapse.show .nav-item:nth-child(2) { animation-delay: .04s; }
    .navbar-portfolio .navbar-collapse.show .nav-item:nth-child(3) { animation-delay: .08s; }
    .navbar-portfolio .navbar-collapse.show .nav-item:nth-child(4) { animation-delay: .12s; }
    .navbar-portfolio .navbar-collapse.show .nav-item:nth-child(5) { animation-delay: .16s; }
    .navbar-portfolio .navbar-collapse.show .nav-item:nth-child(6) { animation-delay: .20s; }
    .navbar-portfolio .navbar-collapse.show .nav-item:nth-child(7) { animation-delay: .24s; }
}
@keyframes navLinkIn {
    from { opacity: 0; transform: translateX(-8px); }
    to { opacity: 1; transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .scroll-cue { animation: none; }
    .hero-panel { animation: none; }
    .hero-orb { animation: none; }
    .navbar-portfolio .navbar-collapse.show { animation: none; }
    * { transition-duration: 0.01ms !important; }
}

/* ---------- Responsive fix ----------
   Below 576px the .container is full-width, so a g-5 row's 1.5rem
   negative margins overhang the container's .75rem padding by 12px
   per side and widen the page. Halving only the horizontal gutter
   there keeps the content inset identical (columns are stacked at
   this width anyway) and removes the overhang. */
@media (max-width: 575.98px) {
    .container > .row.g-5 { --bs-gutter-x: 1.5rem; }
}
