:root {
    --bg: #eef5ff;
    --bg-soft: #f8fbff;
    --surface: rgba(255, 255, 255, 0.88);
    --surface-strong: #ffffff;
    --text: #0f1f46;
    --muted: #5a6f99;
    --line: rgba(27, 65, 140, 0.12);
    --brand: #1f6fff;
    --brand-dark: #123d8f;
    --accent: #4aa3ff;
    --shadow: 0 20px 55px rgba(28, 66, 136, 0.14);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --nav-height: 84px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Outfit", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(74, 163, 255, 0.22), transparent 28%),
        radial-gradient(circle at top right, rgba(31, 111, 255, 0.2), transparent 25%),
        linear-gradient(180deg, #ffffff 0%, #edf4ff 48%, #dbeaff 100%);
    min-height: 100vh;
}

.flash-stack {
    position: fixed;
    top: 96px;
    right: 20px;
    z-index: 1100;
    width: min(420px, calc(100vw - 2rem));
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
}

.portfolio-navbar {
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(31, 111, 255, 0.08);
    transition: padding 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.portfolio-navbar.is-scrolled {
    padding: 0.75rem 0;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 35px rgba(28, 66, 136, 0.1);
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.brand-logo-wrap {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(230, 240, 255, 0.94));
    box-shadow: 0 10px 25px rgba(31, 111, 255, 0.18);
    overflow: hidden;
}

.brand-logo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-text {
    font-size: 1rem;
}

.social-nav {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.social-nav a {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(31, 111, 255, 0.08);
    color: var(--brand-dark);
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.social-nav a:hover,
.social-nav a:focus {
    background: linear-gradient(135deg, var(--brand), #6dc4ff);
    color: #fff;
    transform: translateY(-1px);
}

.nav-link {
    color: var(--text);
    font-weight: 500;
    margin-left: 0.4rem;
    margin-right: 0.4rem;
}

.nav-link:hover,
.nav-link:focus,
.nav-link.active {
    color: var(--brand);
}

.navbar-toggler {
    border-color: rgba(23, 32, 51, 0.1);
}

.navbar-toggler:focus {
    box-shadow: none;
}

.btn-brand {
    background: linear-gradient(135deg, var(--brand), #6dc4ff);
    border: 0;
    color: #fff;
    border-radius: 999px;
    padding: 0.9rem 1.5rem;
    box-shadow: 0 14px 30px rgba(31, 111, 255, 0.24);
}

.btn-brand:hover,
.btn-brand:focus {
    color: #fff;
    transform: translateY(-1px);
}

.hero-section {
    position: relative;
    overflow: hidden;
    padding-top: var(--nav-height);
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 28%, rgba(109, 196, 255, 0.24), transparent 22%),
        linear-gradient(115deg, rgba(14, 39, 92, 0.12), rgba(22, 86, 181, 0.04));
    opacity: 1;
    transform: scale(1.08);
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(31, 111, 255, 0.12);
    color: var(--brand-dark);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero-title,
.section-heading h2,
.about-copy h3,
.service-card h3,
.blog-card h2,
.contact-strip h2,
.blog-hero h1,
.blog-cta h3 {
    font-family: "Space Grotesk", sans-serif;
    letter-spacing: -0.04em;
}

.hero-title {
    max-width: 11ch;
    margin-top: 1.2rem;
    font-weight: 700;
    color: var(--text);
}

.hero-copy {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 58ch;
    margin: 1.3rem 0 1.8rem;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.stat-card,
.hero-visual-card,
.profile-card,
.testimonial-card,
.service-card,
.blog-card,
.blog-cta {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.58);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow);
}

.stat-card {
    padding: 1rem;
    border-radius: var(--radius-md);
}

.stat-value {
    display: block;
    font-weight: 800;
    color: var(--brand-dark);
}

.stat-label {
    display: block;
    margin-top: 0.3rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.hero-visual-card {
    border-radius: var(--radius-xl);
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.94);
    overflow: hidden;
}

.hero-profile-card {
    padding: 1.2rem;
}

.hero-badges-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
    margin-bottom: 1.2rem;
}

.hero-badge-item {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(234, 243, 255, 0.96));
    border: 1px solid rgba(31, 111, 255, 0.14);
    border-radius: 20px;
    padding: 0.75rem;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px rgba(31, 111, 255, 0.1);
}

.hero-badge-item img {
    max-width: 100%;
    max-height: 90px;
    object-fit: contain;
}

.hero-profile-frame {
    position: relative;
    background:
        radial-gradient(circle at top, rgba(116, 194, 255, 0.18), transparent 38%),
        linear-gradient(180deg, #ffffff, #eef5ff);
    border: 1px solid rgba(31, 111, 255, 0.12);
    border-radius: calc(var(--radius-xl) - 6px);
    padding: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-portrait-image {
    width: min(100%, 420px);
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 28px;
    box-shadow: 0 16px 34px rgba(18, 61, 143, 0.18);
}

.content-section,
.contact-strip,
.blog-hero {
    padding: 6rem 0;
}

.alt-section {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.46), rgba(222, 236, 255, 0.7));
}

.section-heading {
    max-width: 760px;
    margin-bottom: 3rem;
}

.section-heading h2 {
    margin-top: 1rem;
    margin-bottom: 0.9rem;
    font-size: clamp(2rem, 4vw, 3rem);
}

.section-heading p,
.about-copy p,
.testimonial-author span,
.service-card p,
.contact-strip p,
.blog-card p,
.blog-hero p,
.blog-cta p {
    color: var(--muted);
}

.profile-card {
    border-radius: var(--radius-xl);
    padding: 1rem;
}

.profile-image {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center top;
    border-radius: calc(var(--radius-xl) - 6px);
}

.about-copy h3 {
    margin-bottom: 1rem;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.skills-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.8rem;
}

.skill-chip,
.service-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    background: rgba(31, 111, 255, 0.1);
    color: var(--accent);
    font-weight: 700;
    font-size: 0.85rem;
}

.testimonial-card,
.service-card,
.blog-card {
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.testimonial-quote {
    font-size: 1.05rem;
    line-height: 1.75;
    margin-bottom: 1.6rem;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.service-card h3,
.blog-card h2 {
    font-size: 1.45rem;
    margin: 1rem 0 0.8rem;
}

.service-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--brand);
    font-weight: 700;
}

.disabled-link {
    pointer-events: none;
    opacity: 0.75;
}

.contact-strip {
    position: relative;
}

.contact-strip .container {
    background:
        linear-gradient(135deg, rgba(9, 34, 84, 0.98), rgba(28, 91, 196, 0.96)),
        radial-gradient(circle at top right, rgba(109, 196, 255, 0.26), transparent 35%);
    border-radius: var(--radius-xl);
    padding: 3rem;
    box-shadow: var(--shadow);
}

.contact-direct-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.contact-direct-links a {
    color: #fff;
    font-weight: 600;
}

.contact-form {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.contact-form .form-label {
    color: #fff;
    font-weight: 600;
}

.contact-form .form-control,
.contact-form .form-select,
.admin-card .form-control,
.admin-card .form-select {
    border-radius: 14px;
    border: 1px solid rgba(31, 111, 255, 0.16);
    padding: 0.9rem 1rem;
}

.contact-form .form-control,
.contact-form .form-select {
    background: rgba(255, 255, 255, 0.96);
}

.contact-strip h2,
.contact-strip p,
.contact-strip .section-tag {
    color: #fff;
}

.contact-strip .section-tag {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.12);
}

.site-footer {
    padding: 1.4rem 0 2rem;
    color: var(--muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
}

.footer-links a:hover,
.footer-links a:focus {
    color: var(--brand);
}

.blog-page {
    padding-top: var(--nav-height);
}

.blog-hero {
    text-align: center;
}

.blog-hero h1 {
    margin-top: 1rem;
    font-size: clamp(2.2rem, 4vw, 4rem);
}

.blog-cta {
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    margin-top: 3rem;
    text-align: center;
}

.blog-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 2.5rem;
}

.category-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(31, 111, 255, 0.12);
    color: var(--brand-dark);
    font-weight: 600;
}

.category-chip span {
    color: var(--muted);
    font-size: 0.88rem;
}

.category-chip.is-active,
.category-chip:hover,
.category-chip:focus {
    background: linear-gradient(135deg, var(--brand), #6dc4ff);
    color: #fff;
}

.category-chip.is-active span,
.category-chip:hover span,
.category-chip:focus span {
    color: rgba(255, 255, 255, 0.88);
}

.blog-category-block + .blog-category-block {
    margin-top: 3rem;
}

.blog-category-header {
    margin-bottom: 1.5rem;
}

.blog-category-header h2 {
    margin: 0.9rem 0 0.5rem;
    font-family: "Space Grotesk", sans-serif;
}

.blog-empty-state,
.blog-article-card,
.blog-sidebar-card,
.admin-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(31, 111, 255, 0.12);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.blog-empty-state,
.admin-card {
    padding: 2rem;
}

.blog-post-hero {
    padding: calc(var(--nav-height) + 3rem) 0 4rem;
}

.blog-post-hero h1 {
    margin: 1rem 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(2.4rem, 4vw, 4rem);
}

.blog-article-card {
    padding: 2.2rem;
}

.blog-article-gallery {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.blog-article-gallery img {
    width: 100%;
    border-radius: 20px;
    border: 1px solid rgba(31, 111, 255, 0.12);
    box-shadow: 0 14px 28px rgba(18, 61, 143, 0.1);
}

.blog-article-card p {
    color: var(--muted);
    line-height: 1.9;
    margin-bottom: 1.2rem;
    text-align: justify;
    white-space: pre-line;
}

.blog-sidebar-card {
    padding: 1.8rem;
}

.blog-sidebar-card h3,
.admin-card h2,
.admin-card-head h2 {
    font-family: "Space Grotesk", sans-serif;
}

.blog-sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin-top: 1rem;
}

.blog-sidebar-links a {
    color: var(--brand-dark);
    font-weight: 600;
}

.admin-hero {
    text-align: left;
}

.admin-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.admin-table th {
    color: var(--brand-dark);
    font-weight: 700;
    border-bottom-color: rgba(31, 111, 255, 0.12);
}

.admin-table td {
    color: var(--muted);
    vertical-align: top;
    border-bottom-color: rgba(31, 111, 255, 0.08);
}

.admin-message-cell {
    min-width: 220px;
    white-space: normal;
}

.sortable-image-list {
    display: grid;
    gap: 1rem;
}

.sortable-image-card {
    display: grid;
    grid-template-columns: minmax(0, 180px) minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border-radius: 20px;
    border: 1px solid rgba(31, 111, 255, 0.12);
    background: rgba(255, 255, 255, 0.86);
    cursor: grab;
}

.sortable-image-card.is-dragging {
    opacity: 0.55;
    cursor: grabbing;
}

.sortable-image-card.is-removed {
    opacity: 0.35;
    filter: grayscale(1);
}

.sortable-image-card img {
    width: 100%;
    max-height: 130px;
    object-fit: cover;
    border-radius: 16px;
}

.sortable-image-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

@media (max-width: 991.98px) {
    :root {
        --nav-height: 78px;
    }

    .portfolio-navbar {
        background: rgba(255, 255, 255, 0.96);
    }

    .navbar-collapse {
        margin-top: 1rem;
        padding: 1rem;
        background: rgba(255, 255, 255, 0.92);
        border-radius: 18px;
        border: 1px solid rgba(31, 111, 255, 0.08);
    }

    .social-nav {
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .hero-title {
        max-width: none;
    }

    .hero-badges-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .content-section,
    .contact-strip,
    .blog-hero {
        padding: 4.5rem 0;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }

    .contact-strip .container {
        padding: 2rem;
    }

    .flash-stack {
        left: 1rem;
        right: 1rem;
        width: auto;
    }

    .hero-profile-card {
        padding: 1rem;
    }

    .hero-badges-strip {
        gap: 0.75rem;
    }

    .hero-badge-item {
        min-height: 100px;
        padding: 0.65rem;
    }

    .hero-badge-item img {
        max-height: 72px;
    }

    .hero-profile-frame {
        padding: 0.9rem;
    }

    .blog-article-card,
    .blog-sidebar-card,
    .admin-card,
    .blog-empty-state {
        padding: 1.4rem;
    }

    .admin-card-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .sortable-image-card {
        grid-template-columns: 1fr;
    }

    .sortable-image-meta {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .btn-brand,
    .portfolio-navbar {
        transition: none;
    }
}
