:root {
    --bg: #f3f6fb;
    --surface: #ffffff;
    --surface-alt: #eaf0f8;
    --ink: #142033;
    --muted: #5f6f86;
    --line: #d9e2ee;
    --primary: #1d4ed8;
    --primary-deep: #173ea8;
    --accent: #0f766e;
    --accent-soft: rgba(15, 118, 110, 0.12);
    --shadow: 0 20px 60px rgba(20, 32, 51, 0.08);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 16px;
}

* {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Manrope', sans-serif;
    background:
        radial-gradient(circle at top left, rgba(29, 78, 216, 0.08), transparent 32%),
        linear-gradient(180deg, #f8fbff 0%, var(--bg) 38%, #eef3f9 100%);
    color: var(--ink);
}

a {
    text-decoration: none;
}

.navbar {
    background: rgba(248, 251, 255, 0.84);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(217, 226, 238, 0.9);
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    overflow: hidden;
    background: #020817;
    box-shadow: 0 12px 26px rgba(20, 32, 51, 0.14);
    flex-shrink: 0;
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
    line-height: 1;
    position: relative;
    padding-left: 0.95rem;
}

.brand-text::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.1rem;
    bottom: 0.1rem;
    width: 1px;
    background: linear-gradient(180deg, rgba(29, 78, 216, 0.12), rgba(29, 78, 216, 0.45), rgba(29, 78, 216, 0.12));
}

.brand-name {
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: -0.03em;
    color: var(--ink);
}

.brand-role {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
}

.nav-link {
    color: var(--muted);
    font-weight: 600;
}

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

.hero-section {
    padding: 7.5rem 0 5rem;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.6rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(217, 226, 238, 0.9);
    color: var(--primary);
    font-size: 0.92rem;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(20, 32, 51, 0.04);
}

.hero-title {
    font-size: clamp(2.8rem, 5vw, 5rem);
    line-height: 1.02;
    letter-spacing: -0.05em;
    font-weight: 800;
    margin: 1.4rem 0 1.25rem;
}

.hero-title .highlight {
    color: var(--primary);
}

.hero-copy {
    font-size: 1.08rem;
    line-height: 1.85;
    color: var(--muted);
    max-width: 620px;
}

.btn-main,
.btn-ghost {
    padding: 0.9rem 1.5rem;
    border-radius: 999px;
    font-weight: 700;
    transition: 0.2s ease;
}

.btn-main {
    background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
    color: #fff;
    border: 1px solid transparent;
    box-shadow: 0 16px 36px rgba(29, 78, 216, 0.2);
}

.btn-main:hover {
    background: linear-gradient(135deg, var(--primary-deep) 0%, var(--primary) 100%);
    color: #fff;
    transform: translateY(-1px);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.8);
    color: var(--ink);
    border: 1px solid var(--line);
}

.btn-ghost:hover {
    background: #fff;
    border-color: #c8d4e4;
    color: var(--primary);
}

.hero-panel,
.content-card,
.project-card,
.skill-card,
.contact-card,
.metric-card {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(217, 226, 238, 0.9);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.hero-panel {
    border-radius: 34px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.hero-panel::before {
    content: "";
    position: absolute;
    inset: auto -60px -80px auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(29, 78, 216, 0.2), transparent 70%);
}

.hero-logo-wrap {
    width: 122px;
    height: 122px;
    border-radius: 30px;
    overflow: hidden;
    background: #020817;
    box-shadow: 0 20px 40px rgba(20, 32, 51, 0.18);
}

.hero-logo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-card,
.skill-card,
.content-card,
.contact-card,
.metric-card {
    content-visibility: auto;
    contain-intrinsic-size: 320px;
}

.hero-panel h3 {
    font-size: 1.65rem;
    font-weight: 800;
    margin-top: 1.5rem;
}

.hero-meta {
    display: grid;
    gap: 1rem;
    margin-top: 1.75rem;
}

.hero-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
}

.hero-meta-item i {
    color: var(--accent);
    font-size: 1.2rem;
}

.section-shell {
    padding: 5rem 0;
}

.section-label {
    display: inline-block;
    margin-bottom: 0.85rem;
    color: var(--primary);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.82rem;
}

.section-title {
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
    font-weight: 800;
    margin-bottom: 1rem;
}

.section-desc {
    color: var(--muted);
    line-height: 1.8;
    max-width: 700px;
}

.metric-card {
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    height: 100%;
}

.metric-number {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--primary);
}

.metric-label {
    color: var(--muted);
    margin-top: 0.35rem;
}

.content-card {
    border-radius: var(--radius-xl);
    padding: 2rem;
    height: 100%;
}

.service-list {
    display: grid;
    gap: 1rem;
    margin-top: 1.75rem;
}

.service-item {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 1rem 1.1rem;
    border-radius: var(--radius-md);
    background: var(--surface-alt);
}

.service-item i {
    color: var(--primary);
    font-size: 1.15rem;
}

.skill-card,
.project-card,
.contact-card {
    border-radius: var(--radius-lg);
    padding: 1.6rem;
    height: 100%;
}

.skill-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(29, 78, 216, 0.1);
    color: var(--primary);
    font-size: 1.45rem;
    margin-bottom: 1rem;
}

.skill-tags,
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1rem;
}

.tag {
    padding: 0.42rem 0.72rem;
    border-radius: 999px;
    background: var(--surface-alt);
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.project-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 50px rgba(20, 32, 51, 0.12);
}

.project-type {
    display: inline-block;
    margin-bottom: 0.9rem;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
}

.project-card h5 {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 0.8rem;
}

.project-card p,
.contact-card p,
.modal-body p {
    color: var(--muted);
    line-height: 1.75;
}

.project-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.4rem;
}

.link-btn {
    color: var(--primary);
    font-weight: 800;
}

.link-btn:hover {
    color: var(--primary-deep);
}

.contact-card i {
    font-size: 1.1rem;
    color: var(--primary);
}

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

.social-links a {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-alt);
    color: var(--primary);
    font-size: 1.15rem;
    transition: 0.2s ease;
}

.social-links a:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

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

.footer .container {
    row-gap: 0.75rem;
}

.modal-content {
    background: #f8fbff;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 24px;
}

.modal-header {
    border-bottom-color: var(--line);
}

.modal-footer {
    border-top-color: var(--line);
}

.modal-body ul {
    color: var(--muted);
}

.modal-body img {
    border-radius: 18px;
    border: 1px solid var(--line);
}

.modal-gallery-item {
    display: block;
    height: 100%;
    cursor: zoom-in;
}

.modal-gallery-item img {
    width: 100%;
    height: 100%;
    min-height: 180px;
    object-fit: cover;
    background: #edf2f8;
}

.project-carousel {
    margin-bottom: 1rem;
}

.project-carousel .carousel-inner {
    border-radius: 20px;
    overflow: hidden;
    background: transparent;
}

.project-carousel .carousel-item {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    overflow: hidden;
}

.project-carousel .carousel-item img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
    border: 0;
    border-radius: 0;
}

.project-carousel .carousel-caption {
    position: static;
    padding: 1rem 1.1rem 1.1rem;
    background: #fff;
    text-align: left;
    border-top: 1px solid var(--line);
}

.project-carousel .carousel-caption h6 {
    margin-bottom: 0.3rem;
    color: var(--ink);
}

.project-carousel .carousel-caption p {
    color: var(--muted) !important;
    line-height: 1.65;
}

.project-carousel .carousel-indicators {
    margin-bottom: 0.6rem;
}

.project-carousel .carousel-indicators [data-bs-target] {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.project-carousel .carousel-control-prev,
.project-carousel .carousel-control-next {
    width: 12%;
}

.project-carousel .carousel-control-prev-icon,
.project-carousel .carousel-control-next-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: rgba(20, 32, 51, 0.55);
    background-size: 48%;
}

.project-thumbs {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.75rem;
}

.project-thumb {
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    padding: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.project-thumb:hover {
    transform: translateY(-2px);
}

.project-thumb.is-active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.14);
}

.project-thumb img {
    width: 100%;
    height: 84px;
    object-fit: cover;
    display: block;
}

.lightbox-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(2, 8, 23, 0.88);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 2000;
}

.lightbox-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.lightbox-dialog {
    position: relative;
    max-width: min(1100px, 100%);
    max-height: 100%;
}

.lightbox-image {
    max-width: 100%;
    max-height: calc(100vh - 5rem);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    display: block;
}

.lightbox-close {
    position: absolute;
    top: -0.75rem;
    right: -0.75rem;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    font-size: 1.4rem;
    line-height: 1;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    font-size: 1.6rem;
    line-height: 1;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.lightbox-prev {
    left: 1rem;
}

.lightbox-next {
    right: 1rem;
}

@media (max-width: 991px) {
    .navbar .container {
        align-items: flex-start;
    }

    .navbar-collapse {
        width: 100%;
        margin-top: 1rem;
        padding: 1rem 0 0.25rem;
        border-top: 1px solid rgba(217, 226, 238, 0.9);
    }

    .navbar-nav {
        gap: 0.25rem !important;
    }

    .hero-section {
        padding-top: 6.5rem;
    }

    .hero-copy {
        max-width: 100%;
    }

    .hero-panel {
        margin-top: 2rem;
    }

    .section-shell {
        padding: 4.5rem 0;
    }

    .project-thumbs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .navbar-brand {
        gap: 0.75rem;
    }

    .brand-mark {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .brand-text {
        padding-left: 0.75rem;
    }

    .brand-name {
        font-size: 0.94rem;
    }

    .brand-role {
        font-size: 0.62rem;
        letter-spacing: 0.14em;
    }

    .hero-section,
    .section-shell {
        padding: 4rem 0;
    }

    .eyebrow {
        font-size: 0.82rem;
        padding: 0.55rem 0.85rem;
    }

    .hero-title {
        font-size: clamp(2.2rem, 9vw, 3.4rem);
        line-height: 1.05;
    }

    .hero-copy {
        font-size: 1rem;
        line-height: 1.75;
    }

    .btn-main,
    .btn-ghost {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .hero-panel,
    .content-card,
    .project-card,
    .skill-card,
    .contact-card,
    .metric-card {
        padding: 1.4rem;
    }

    .hero-logo-wrap {
        width: 96px;
        height: 96px;
        border-radius: 22px;
    }

    .hero-panel h3 {
        font-size: 1.35rem;
        line-height: 1.25;
    }

    .section-title {
        font-size: clamp(1.7rem, 8vw, 2.35rem);
    }

    .service-item,
    .project-actions {
        gap: 0.7rem;
    }

    .project-actions a {
        width: 100%;
    }

    .social-links {
        gap: 0.8rem;
    }

    .footer .container {
        justify-content: center !important;
        text-align: center;
    }

    .project-carousel .carousel-item img {
        height: 240px;
    }

    .project-carousel .carousel-caption {
        padding: 0.9rem 0.95rem 1rem;
    }

    .project-carousel .carousel-caption h6 {
        font-size: 1rem;
    }

    .project-thumb img {
        height: 72px;
    }
}

@media (max-width: 575px) {
    .navbar {
        padding-top: 0.55rem;
        padding-bottom: 0.55rem;
    }

    .brand-text::before {
        top: 0.05rem;
        bottom: 0.05rem;
    }

    .brand-role {
        display: none;
    }

    .hero-section {
        padding-top: 5.5rem;
    }

    .hero-title {
        font-size: clamp(2rem, 10vw, 2.8rem);
    }

    .metric-number {
        font-size: 1.7rem;
    }

    .section-label {
        font-size: 0.76rem;
        letter-spacing: 0.07em;
    }

    .skill-tags,
    .project-tags {
        gap: 0.45rem;
    }

    .tag {
        font-size: 0.82rem;
        padding: 0.38rem 0.64rem;
    }

    .modal-dialog {
        margin: 0.75rem;
    }

    .modal-content {
        border-radius: 18px;
    }

    .modal-gallery-item img {
        min-height: 140px;
    }

    .project-thumbs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-carousel .carousel-item {
        border-radius: 18px;
    }

    .project-carousel .carousel-item img {
        height: 200px;
    }

    .project-carousel .carousel-caption {
        padding: 0.85rem 0.9rem 0.95rem;
    }

    .lightbox-overlay {
        padding: 1rem;
    }

    .lightbox-close {
        top: 0.5rem;
        right: 0.5rem;
    }

    .lightbox-nav {
        width: 42px;
        height: 42px;
        font-size: 1.3rem;
    }

    .lightbox-prev {
        left: 0.5rem;
    }

    .lightbox-next {
        right: 0.5rem;
    }
}
