/* ====== Modern UI layer ======
   Loaded after site.css and architect.css.
   Selectively overrides for a 2026-feel: glassmorphism,
   animated aurora, gradient accents, scroll reveals.
*/

:root {
    --grad-primary: linear-gradient(135deg, #6366f1 0%, #a855f7 45%, #ec4899 100%);
    --grad-cool:    linear-gradient(135deg, #38bdf8 0%, #6366f1 50%, #a855f7 100%);
    --glass-bg:     rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-bg-dark: rgba(15, 23, 42, 0.55);
    --shadow-color-primary: 0 18px 40px -12px rgba(99, 102, 241, 0.35);
    --shadow-color-accent:  0 18px 40px -12px rgba(236, 72, 153, 0.30);
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
}

body {
    background:
        radial-gradient(at 5% -5%, rgba(99, 102, 241, 0.08) 0, transparent 35%),
        radial-gradient(at 95% 0%, rgba(236, 72, 153, 0.06) 0, transparent 40%),
        radial-gradient(at 50% 100%, rgba(56, 189, 248, 0.05) 0, transparent 45%),
        var(--bg-light);
    background-attachment: fixed;
}

/* ====== Animated aurora hero ====== */
.hero-section {
    background:
        radial-gradient(1200px 600px at -10% 0%, rgba(99, 102, 241, 0.45) 0, transparent 55%),
        radial-gradient(900px 500px at 110% 100%, rgba(236, 72, 153, 0.35) 0, transparent 60%),
        radial-gradient(700px 400px at 50% 50%, rgba(56, 189, 248, 0.25) 0, transparent 60%),
        linear-gradient(135deg, #0b1024 0%, #060818 100%);
    background-size: 200% 200%;
    animation: auroraShift 18s ease-in-out infinite alternate;
}

@keyframes auroraShift {
    0%   { background-position: 0% 0%, 100% 100%, 50% 50%, 0 0; }
    100% { background-position: 25% 30%, 75% 70%, 60% 40%, 0 0; }
}

.hero-section::before,
.hero-section::after { display: none; }

.hero-name {
    background: linear-gradient(135deg, #ffffff 0%, #c7d2fe 35%, #f0abfc 70%, #fbcfe8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: shimmerText 8s ease-in-out infinite;
}

@keyframes shimmerText {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

/* ====== Modern buttons ====== */
.hero-actions .btn,
.btn-primary,
.btn-outline-primary {
    border-radius: 999px;
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s var(--ease-out-expo);
}

.hero-actions .btn-primary,
section .btn-primary {
    background: var(--grad-primary);
    border: none;
    color: #fff;
    box-shadow: var(--shadow-color-primary);
}

.hero-actions .btn-primary:hover,
section .btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 22px 50px -12px rgba(168, 85, 247, 0.55);
    background: var(--grad-primary);
}

.hero-actions .btn-outline-light {
    border: 1px solid rgba(255,255,255,0.35);
    color: #fff;
    backdrop-filter: blur(12px);
    background: rgba(255,255,255,0.06);
}

.hero-actions .btn-outline-light:hover {
    background: rgba(255,255,255,0.14);
    border-color: rgba(255,255,255,0.6);
    transform: translateY(-3px);
}

/* shimmer on primary buttons */
.hero-actions .btn-primary::after,
section .btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.35), transparent);
    transform: skewX(-20deg);
    transition: left 0.7s var(--ease-out-expo);
}

.hero-actions .btn-primary:hover::after,
section .btn-primary:hover::after {
    left: 130%;
}

/* ====== Glass nav ====== */
.portfolio-nav {
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
}

.portfolio-nav.scrolled {
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 6px 24px -12px rgba(15, 23, 42, 0.18);
}

.portfolio-nav .nav-link {
    border-radius: 999px;
    transition: background 0.25s var(--ease-out-expo), color 0.2s ease;
}

.portfolio-nav .nav-link:hover {
    background: rgba(99, 102, 241, 0.10);
}

.portfolio-nav .nav-link::after { display: none; }

/* ====== Modern section titles ====== */
.section-title {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.section-divider {
    width: 80px;
    height: 5px;
    background: var(--grad-primary);
    border-radius: 999px;
    box-shadow: 0 4px 16px -4px rgba(99, 102, 241, 0.5);
}

/* ====== Glass cards ====== */
.skill-card,
.edu-card,
.project-card,
.timeline-content,
.package-card,
.contact-card,
.freelance-services {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    box-shadow:
        0 1px 0 0 rgba(255,255,255,0.6) inset,
        0 12px 28px -16px rgba(15, 23, 42, 0.18);
    transition:
        transform 0.4s var(--ease-out-expo),
        box-shadow 0.4s var(--ease-out-expo),
        border-color 0.3s ease;
    border-radius: 18px;
}

.section-alt .skill-card,
.section-alt .edu-card,
.section-alt .project-card,
.section-alt .timeline-content,
.section-alt .package-card,
.section-alt .contact-card,
.section-alt .freelance-services {
    background: rgba(255, 255, 255, 0.85);
}

.skill-card:hover,
.edu-card:hover,
.project-card:hover,
.timeline-content:hover,
.package-card:hover,
.contact-card:hover {
    transform: translateY(-6px);
    box-shadow:
        0 1px 0 0 rgba(255,255,255,0.8) inset,
        var(--shadow-color-primary);
    border-color: rgba(99, 102, 241, 0.4);
}

/* gradient halo on card hover */
.skill-card,
.edu-card,
.project-card,
.package-card {
    position: relative;
}

.skill-card::before,
.edu-card::before,
.project-card::before,
.package-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: var(--grad-primary);
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.skill-card:hover::before,
.edu-card:hover::before,
.project-card:hover::before,
.package-card:hover::before {
    opacity: 1;
}

/* ====== Modern progress bars ====== */
.progress {
    height: 8px;
    background: rgba(99, 102, 241, 0.10);
    border-radius: 999px;
}

.progress-bar {
    background: var(--grad-primary);
    border-radius: 999px;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.4);
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    transform: translateX(-100%);
    animation: barShimmer 3s ease-in-out infinite;
}

@keyframes barShimmer {
    0%   { transform: translateX(-100%); }
    60%  { transform: translateX(220%); }
    100% { transform: translateX(220%); }
}

/* ====== Skill / Education icons ====== */
.skill-category {
    color: transparent;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
}

.skill-category i {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.edu-icon {
    background: var(--grad-primary);
    box-shadow: var(--shadow-color-primary);
}

/* ====== Timeline polish ====== */
.timeline::before {
    width: 3px;
    background: var(--grad-primary);
    box-shadow: 0 0 24px rgba(168, 85, 247, 0.35);
    border-radius: 999px;
}

.timeline-marker {
    width: 22px;
    height: 22px;
    background: var(--grad-primary);
    border: 4px solid var(--bg-light);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.35), 0 0 18px rgba(168, 85, 247, 0.5);
}

.section-alt .timeline-marker {
    border-color: #fff;
}

.timeline-content:hover {
    transform: translateX(6px) translateY(-3px);
}

/* ====== Package card refinements ====== */
.package-featured {
    background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(245, 243, 255, 0.9));
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
}

.package-featured::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: var(--grad-primary);
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}

.package-badge {
    background: var(--grad-primary);
    box-shadow: var(--shadow-color-primary);
}

.package-price-amount {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ====== Contact card ====== */
.contact-card {
    padding: 2rem 1.5rem;
    text-align: center;
    border-radius: 18px;
}

.contact-card i {
    font-size: 2rem;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ====== Tech tags refresh ====== */
.tech-tag {
    background: rgba(99, 102, 241, 0.10);
    color: var(--primary-dark);
    border: 1px solid rgba(99, 102, 241, 0.18);
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tech-tag:hover {
    background: var(--grad-primary);
    color: #fff;
    border-color: transparent;
}

/* ====== Decorative section blobs ====== */
.section,
.section-alt {
    position: relative;
    overflow: hidden;
}

.section::before,
.section-alt::before {
    content: '';
    position: absolute;
    width: 540px;
    height: 540px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.10) 0, transparent 60%);
    top: -270px;
    right: -180px;
    pointer-events: none;
    z-index: 0;
}

.section-alt::before {
    background: radial-gradient(circle, rgba(236, 72, 153, 0.08) 0, transparent 60%);
    top: auto;
    bottom: -270px;
    right: auto;
    left: -180px;
}

.section .container,
.section-alt .container {
    position: relative;
    z-index: 1;
}

/* ====== Scroll reveals ====== */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.7s var(--ease-out-expo),
        transform 0.7s var(--ease-out-expo);
    will-change: opacity, transform;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ====== Footer / generic anchor accent ====== */
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }

/* ====== Custom selection ====== */
::selection {
    background: rgba(168, 85, 247, 0.35);
    color: inherit;
}

/* ====== Custom scrollbar (WebKit) ====== */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(99,102,241,0.55), rgba(236,72,153,0.55));
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(99,102,241,0.85), rgba(236,72,153,0.85));
    background-clip: padding-box;
}

/* ====== Tweak architect.css overlap ====== */
.section-title .title-tag {
    -webkit-text-fill-color: initial;
    background: none;
    color: var(--primary-light);
    opacity: 0.6;
}

/* ====== Mobile polish ====== */
@media (max-width: 767px) {
    .section, .section-alt { padding: 70px 0; }
    .section::before, .section-alt::before { width: 320px; height: 320px; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-section,
    .hero-name,
    .progress-bar::after,
    .reveal { animation: none !important; transition: none !important; }
    .reveal { opacity: 1; transform: none; }
}

/* Navbar brand mark */
.portfolio-nav .brand-mark {
    border-radius: 7px;
    box-shadow: 0 4px 12px -4px rgba(99, 102, 241, 0.5);
    transition: transform 0.3s var(--ease-out-expo);
}

.portfolio-nav .navbar-brand:hover .brand-mark {
    transform: rotate(-6deg) scale(1.06);
}
