.glass {
    background: rgba(33, 66, 74, 0.2);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ── Project Cards ─────────────────────────────────────────── */
.project-card {
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.35s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(6, 204, 249, 0.12),
                0 8px 24px rgba(0, 0, 0, 0.4);
    border-color: rgba(6, 204, 249, 0.3);
}

/* Glowing top edge accent on hover */
.project-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(6, 204, 249, 0.5) 0%, transparent 50%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.project-card:hover::before {
    opacity: 1;
}

/* Image scroll height */
.card-img-scroll {
    height: 230px;
    overflow: hidden;
    position: relative;
}

.card-img-scroll img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 3.5s ease-in-out;
}

.project-card:hover .card-img-scroll img {
    transform: translateY(calc(-100% + 230px));
}

/* Gradient overlay fading bottom of image into card body */
.card-img-scroll::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: linear-gradient(to bottom, transparent, rgba(15, 31, 35, 0.85));
    pointer-events: none;
    z-index: 1;
}

/* Shine sweep on image hover */
.card-img-scroll::before {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(255, 255, 255, 0.08) 50%,
        transparent 100%
    );
    transform: skewX(-20deg);
    z-index: 2;
    opacity: 0;
    transition: none;
    pointer-events: none;
}

.project-card:hover .card-img-scroll::before {
    animation: card-shine 0.65s ease forwards;
}

@keyframes card-shine {
    0%   { left: -75%; opacity: 1; }
    100% { left: 125%; opacity: 1; }
}

/* Tag pills */
.project-card span[class*="text-primary"] {
    background: rgba(6, 204, 249, 0.1);
    border: 1px solid rgba(6, 204, 249, 0.25);
    border-radius: 9999px;
    padding: 2px 10px;
    letter-spacing: 0.06em;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.project-card:hover span[class*="text-primary"] {
    background: rgba(6, 204, 249, 0.18);
    border-color: rgba(6, 204, 249, 0.45);
}

/* External link icon button */
.project-card a span.material-symbols-outlined {
    transition: transform 0.25s ease, color 0.25s ease;
}

.project-card a:hover span.material-symbols-outlined {
    transform: translate(2px, -2px) scale(1.15);
}
/* ─────────────────────────────────────────────────────────── */
.header-modern-divider {
    position: sticky;
}
.header-modern-divider::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: min(94%, 1180px);
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(6, 204, 249, 0.2) 18%, rgba(103, 232, 249, 0.92) 50%, rgba(6, 204, 249, 0.2) 82%, transparent 100%);
    box-shadow: 0 0 14px rgba(6, 204, 249, 0.32);
    pointer-events: none;
}
html:not(.dark) .header-modern-divider::after {
    background: linear-gradient(90deg, transparent 0%, rgba(6, 204, 249, 0.12) 18%, rgba(6, 204, 249, 0.62) 50%, rgba(6, 204, 249, 0.12) 82%, transparent 100%);
    box-shadow: 0 0 10px rgba(6, 204, 249, 0.2);
}
.text-gradient {
    background: linear-gradient(to right, #06ccf9, #22d3ee);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.logo-script {
    font-family: "Great Vibes", "Brush Script MT", "Lucida Handwriting", cursive;
    font-weight: 700;
    letter-spacing: 0.01em;
}
.nav-link {
    position: relative;
    z-index: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.48rem 0.9rem;
    border-radius: 9999px;
    overflow: hidden;
    transition: color 220ms ease, transform 220ms ease;
}
.menu-shell {
    border: 1px solid rgba(6, 204, 249, 0.16);
    background: linear-gradient(135deg, rgba(6, 204, 249, 0.07), rgba(255, 255, 255, 0.02));
    backdrop-filter: blur(10px);
}
.nav-link-icon {
    font-size: 1rem;
    line-height: 1;
    transition: transform 220ms ease, color 220ms ease;
}
.nav-link-label {
    letter-spacing: 0.02em;
}
.nav-link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(130deg, rgba(6, 204, 249, 0.16), rgba(103, 232, 249, 0.05));
    border-radius: 9999px;
    transform: scale(0.88);
    opacity: 0;
    transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1), opacity 260ms ease, box-shadow 260ms ease;
}
.nav-link:hover {
    color: #06ccf9;
    transform: translateY(-1px) scale(1.01);
    text-shadow: 0 0 16px rgba(6, 204, 249, 0.25);
}
.nav-link:hover::after {
    transform: scale(1);
    opacity: 1;
}
.nav-link:hover .nav-link-icon {
    transform: translateY(-1px) scale(1.08);
}
.nav-link.is-active {
    color: #04171b !important;
    text-shadow: none;
    transform: none;
    box-shadow: 0 10px 24px rgba(6, 204, 249, 0.28), inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}
.nav-link.is-active::after {
    opacity: 1;
    transform: scale(1);
    background: linear-gradient(125deg, #06ccf9, #67e8f9);
    box-shadow: 0 6px 20px rgba(6, 204, 249, 0.35);
}
.nav-link.is-active .nav-link-icon,
.nav-link.is-active .nav-link-label {
    position: relative;
    z-index: 2;
}
html.dark .nav-link.is-active {
    color: #032129 !important;
}
html:not(.dark) .menu-shell {
    border-color: rgba(15, 31, 35, 0.1);
    background: linear-gradient(135deg, rgba(6, 204, 249, 0.12), rgba(255, 255, 255, 0.85));
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}
html:not(.dark) .nav-link.is-active {
    color: #05242c !important;
    box-shadow: 0 10px 22px rgba(6, 204, 249, 0.24), inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}
section + section {
    position: relative;
}
section + section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(86%, 980px);
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(6, 204, 249, 0.16) 20%, rgba(103, 232, 249, 0.58) 50%, rgba(6, 204, 249, 0.16) 80%, transparent 100%);
    pointer-events: none;
}
section + section::after {
    content: "";
    position: absolute;
    top: -4px;
    left: 50%;
    width: 8px;
    height: 8px;
    transform: translateX(-50%) rotate(45deg);
    border-radius: 1px;
    background: rgba(103, 232, 249, 0.8);
    box-shadow: 0 0 14px rgba(6, 204, 249, 0.35);
    pointer-events: none;
}
html:not(.dark) section + section::before {
    background: linear-gradient(90deg, transparent 0%, rgba(6, 204, 249, 0.12) 20%, rgba(6, 204, 249, 0.38) 50%, rgba(6, 204, 249, 0.12) 80%, transparent 100%);
}
html:not(.dark) section + section::after {
    background: rgba(6, 204, 249, 0.62);
    box-shadow: 0 0 12px rgba(6, 204, 249, 0.22);
}
.theme-toggle {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 60;
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 31, 35, 0.82);
    border: 1px solid rgba(6, 204, 249, 0.32);
    color: #67e8f9;
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 24px rgba(2, 12, 16, 0.35);
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}
.theme-toggle:hover {
    transform: translateY(-2px) scale(1.04);
    border-color: rgba(6, 204, 249, 0.75);
    box-shadow: 0 16px 28px rgba(2, 12, 16, 0.45);
}
html:not(.dark) .theme-toggle {
    background: rgba(255, 255, 255, 0.92);
    color: #0f1f23;
    border-color: rgba(15, 31, 35, 0.12);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.15);
}
html:not(.dark) .glass {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}
html:not(.dark) .bg-slate-800\/50 {
    background-color: rgba(15, 23, 42, 0.05) !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
}
html:not(.dark) .bg-slate-800\/30 {
    background-color: rgba(15, 23, 42, 0.04) !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
}
html:not(.dark) .bg-slate-800 {
    background-color: rgba(15, 23, 42, 0.06) !important;
}
html:not(.dark) #services {
    background: linear-gradient(180deg, #f8fbfc 0%, #eef6f8 100%);
}
html:not(.dark) #services h2,
html:not(.dark) #services h3 {
    color: #0f172a;
}
html:not(.dark) #services .text-slate-400 {
    color: #475569;
}
html:not(.dark) #services .bg-slate-800\/50 {
    background: rgba(255, 255, 255, 0.82) !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}
html:not(.dark) #services .bg-slate-800\/50:hover {
    border-color: rgba(6, 204, 249, 0.45) !important;
    box-shadow: 0 14px 28px rgba(6, 204, 249, 0.12);
}
html:not(.dark) #contact input,
html:not(.dark) #contact textarea {
    background: #ffffff !important;
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.12) !important;
}
html:not(.dark) #contact input::placeholder,
html:not(.dark) #contact textarea::placeholder {
    color: #64748b;
}
html:not(.dark) .text-white {
    color: #0f172a;
}

/* Footer Divider */
footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(94%, 1180px);
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(6, 204, 249, 0.2) 18%, rgba(103, 232, 249, 0.92) 50%, rgba(6, 204, 249, 0.2) 82%, transparent 100%);
    box-shadow: 0 0 14px rgba(6, 204, 249, 0.32);
    pointer-events: none;
}

footer::after {
    content: none;
}

html:not(.dark) footer::before {
    background: linear-gradient(90deg, transparent 0%, rgba(6, 204, 249, 0.12) 18%, rgba(6, 204, 249, 0.62) 50%, rgba(6, 204, 249, 0.12) 82%, transparent 100%);
    box-shadow: 0 0 10px rgba(6, 204, 249, 0.2);
}
.reveal-item {
    opacity: 0;
    transform: translateY(28px) scale(0.98);
    filter: blur(6px);
    will-change: transform, opacity, filter;
    transition:
        opacity 780ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 780ms cubic-bezier(0.22, 1, 0.36, 1),
        filter 780ms cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--reveal-delay, 0ms);
}
.reveal-item.anim-slide-left {
    transform: translateX(-44px) scale(0.98);
}
.reveal-item.anim-slide-right {
    transform: translateX(44px) scale(0.98);
}
.reveal-item.anim-lift {
    transform: translateY(30px) scale(0.98);
    filter: blur(7px);
}
.reveal-item.anim-zoom {
    transform: scale(0.9);
    filter: blur(5px);
}
.reveal-item.anim-tilt-left {
    transform: translateY(24px) rotate(-2.2deg) scale(0.97);
    transform-origin: left center;
}
.reveal-item.anim-tilt-right {
    transform: translateY(24px) rotate(2.2deg) scale(0.97);
    transform-origin: right center;
}
.reveal-item.anim-soft-pop {
    transform: translateY(18px) scale(0.94);
    filter: blur(4px);
}
.reveal-item.anim-blur-rise {
    transform: translateY(22px);
    filter: blur(10px);
}
.reveal-item.is-visible {
    opacity: 1;
    transform: translate(0, 0) scale(1);
    filter: blur(0);
}
@media (prefers-reduced-motion: reduce) {
    .reveal-item,
    .reveal-item.anim-slide-left,
    .reveal-item.anim-slide-right,
    .reveal-item.anim-lift,
    .reveal-item.anim-zoom,
    .reveal-item.anim-tilt-left,
    .reveal-item.anim-tilt-right,
    .reveal-item.anim-soft-pop,
    .reveal-item.anim-blur-rise {
        opacity: 1;
        transform: none;
        filter: none;
        transition: none;
    }
}
