:root {
    --ink: #142033;
    --muted: #667085;
    --accent: #0f766e;
    --accent-strong: #115e59;
    --accent-soft: #d9f5ef;
    --paper: #f6f8fb;
    --surface: #ffffff;
    --line: rgba(15, 23, 42, .12);
    --shadow-sm: 0 8px 20px rgba(15, 23, 42, .05);
    --shadow-md: 0 14px 34px rgba(15, 23, 42, .08);
}

html {
    scroll-behavior: smooth;
}

body {
    color: var(--ink);
    font-family: "Aptos", "Segoe UI Variable", "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: .9rem;
    line-height: 1.58;
    background:
        linear-gradient(180deg, rgba(217, 245, 239, .34), rgba(246, 248, 251, 0) 28rem),
        var(--paper);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

p {
    margin-bottom: 1rem;
}

.navbar {
    backdrop-filter: blur(18px);
    background: rgba(255, 255, 255, .88);
    border-bottom: 1px solid rgba(15, 23, 42, .08);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .04);
}

.navbar-brand {
    font-size: clamp(.95rem, 1.05vw, 1.08rem);
    font-weight: 800;
    letter-spacing: 0;
    color: #102033;
}

.nav-link {
    position: relative;
    font-size: .82rem;
    font-weight: 600;
    color: #334155;
    border-radius: 8px;
    padding: .55rem .75rem;
}

.nav-link:hover,
.nav-link:focus,
.nav-link.active {
    color: var(--accent);
    background: rgba(15, 118, 110, .08);
}

.language-switch {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .25rem;
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}

.language-switch a {
    min-width: 38px;
    padding: .32rem .55rem;
    border-radius: 6px;
    color: #475569;
    font-size: .72rem;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
}

.language-switch a.active {
    color: #fff;
    background: var(--accent);
    box-shadow: 0 8px 18px rgba(15, 118, 110, .22);
}

.hero,
.page-hero,
.parallax-band {
    color: #fff;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero {
    min-height: 92vh;
    display: flex;
    align-items: center;
    padding: 9rem 0 5rem;
    background-image: linear-gradient(90deg, rgba(10, 19, 31, .9), rgba(15, 118, 110, .5)), url('https://images.unsplash.com/photo-1518770660439-4636190af475?auto=format&fit=crop&w=1800&q=80');
}

.page-hero {
    padding: 9rem 0 5rem;
    background-image: linear-gradient(90deg, rgba(10, 19, 31, .9), rgba(15, 118, 110, .52)), url('https://images.unsplash.com/photo-1504384308090-c894fdcc538d?auto=format&fit=crop&w=1800&q=80');
}

.about-hero {
    background-image: linear-gradient(90deg, rgba(10, 19, 31, .82), rgba(15, 118, 110, .36)), url('../img/about-me.jpeg');
    background-position: center 42%;
}

.portfolio-hero {
    background-image: linear-gradient(90deg, rgba(10, 19, 31, .82), rgba(15, 118, 110, .34)), url('../img/portfolio.jpeg');
    background-position: center 48%;
}

.hero h1,
.page-hero h1 {
    max-width: 980px;
    font-size: clamp(1.82rem, 4.2vw, 3.35rem);
    line-height: 1.1;
    font-weight: 790;
    letter-spacing: 0;
    text-wrap: balance;
}

.hero .lead,
.page-hero .lead {
    max-width: 720px;
    color: rgba(255, 255, 255, .86);
    font-size: clamp(.9rem, 1.15vw, 1rem);
    line-height: 1.62;
    text-wrap: pretty;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .45rem .8rem;
    border: 1px solid rgba(255, 255, 255, .25);
    background: rgba(255, 255, 255, .1);
    border-radius: 999px;
    color: rgba(255, 255, 255, .92);
    font-weight: 700;
    font-size: .7rem;
    letter-spacing: .02em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16);
}

.section-pad {
    padding: clamp(2.75rem, 5.5vw, 4.75rem) 0;
}

.content-parallax {
    position: relative;
    overflow: hidden;
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
}

.content-parallax > .container {
    position: relative;
    z-index: 1;
}

.parallax-network {
    background-image:
        linear-gradient(rgba(246, 248, 251, .92), rgba(246, 248, 251, .88)),
        url('https://images.unsplash.com/photo-1558494949-ef010cbdcc31?auto=format&fit=crop&w=1800&q=80');
}

.parallax-profile {
    background-image:
        linear-gradient(rgba(246, 248, 251, .94), rgba(246, 248, 251, .9)),
        url('https://images.unsplash.com/photo-1497366754035-f200968a6e72?auto=format&fit=crop&w=1800&q=80');
}

.parallax-operations {
    background-image:
        linear-gradient(rgba(255, 255, 255, .93), rgba(255, 255, 255, .9)),
        url('https://images.unsplash.com/photo-1552664730-d307ca884978?auto=format&fit=crop&w=1800&q=80');
}

.parallax-systems {
    background-image:
        linear-gradient(rgba(246, 248, 251, .94), rgba(246, 248, 251, .9)),
        url('https://images.unsplash.com/photo-1516321318423-f06f85e504b3?auto=format&fit=crop&w=1800&q=80');
}

.parallax-portfolio {
    background-image:
        linear-gradient(rgba(246, 248, 251, .92), rgba(246, 248, 251, .88)),
        url('https://images.unsplash.com/photo-1544197150-b99a580bb7a8?auto=format&fit=crop&w=1800&q=80');
}

.parallax-courses {
    background-image:
        linear-gradient(rgba(255, 255, 255, .94), rgba(255, 255, 255, .9)),
        url('https://images.unsplash.com/photo-1516321497487-e288fb19713f?auto=format&fit=crop&w=1800&q=80');
}

.section-title {
    max-width: 820px;
    margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
}

.section-title span {
    color: var(--accent);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .68rem;
}

.section-title h2 {
    font-size: clamp(1.38rem, 2.65vw, 2.25rem);
    font-weight: 780;
    letter-spacing: 0;
    margin-top: .5rem;
    line-height: 1.08;
    text-wrap: balance;
}

.stat,
.skill-pill,
.gallery-card,
.contact-panel,
.profile-panel {
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.stat {
    padding: 1rem;
    height: 100%;
    transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease;
}

.stat:hover {
    border-color: rgba(15, 118, 110, .28);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat strong {
    display: block;
    font-size: clamp(1.05rem, 1.6vw, 1.3rem);
    color: var(--accent);
    line-height: 1;
}

.stat span {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 650;
    line-height: 1.4;
}

.skill-pill {
    display: flex;
    align-items: center;
    min-height: 54px;
    height: 100%;
    padding: .75rem .85rem;
    color: #24364d;
    font-size: clamp(.78rem, .95vw, .88rem);
    font-weight: 720;
    line-height: 1.45;
    transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease;
}

.skill-pill:hover {
    border-color: rgba(15, 118, 110, .3);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.profile-panel {
    padding: clamp(.95rem, 1.8vw, 1.25rem);
}

.resume-card-grid {
    display: grid;
    align-items: stretch;
    gap: .9rem;
}

.resume-card-grid-experience {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    grid-auto-rows: 1fr;
}

.resume-card-grid-core {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    grid-auto-rows: 1fr;
}

.resume-card {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    min-height: 112px;
    height: 100%;
    padding: .95rem;
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease;
}

.resume-card:hover {
    border-color: rgba(15, 118, 110, .34);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.resume-card h3,
.profile-panel h3 {
    margin-bottom: .35rem;
    color: #24364d;
    font-size: clamp(.82rem, 1vw, .92rem);
    font-weight: 760;
    line-height: 1.32;
}

.resume-card p {
    margin-bottom: .35rem;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 650;
    line-height: 1.5;
}

.resume-card span {
    color: var(--accent);
    font-size: .72rem;
    font-weight: 760;
    line-height: 1.4;
}

.core-card {
    min-height: 92px;
    align-items: center;
}

.core-card h3 {
    margin-bottom: 0;
    font-size: .9rem;
}

.core-check-card {
    display: grid;
    grid-template-columns: 20px 1fr;
    align-items: flex-start;
    gap: .55rem;
    min-height: 92px;
    height: 100%;
    padding: .8rem .85rem;
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease;
}

.core-check-card:hover {
    border-color: rgba(15, 118, 110, .34);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.core-check-card h3 {
    margin-bottom: 0;
    color: #24364d;
    font-size: clamp(.76rem, .9vw, .84rem);
    font-weight: 680;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.core-check-icon {
    display: inline-grid;
    width: 18px;
    height: 18px;
    place-items: center;
    margin-top: .08rem;
    border: 1.4px solid var(--accent);
    border-radius: 50%;
    color: var(--accent);
    font-size: .74rem;
    line-height: 1;
}

.resume-card-icon {
    display: inline-grid;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: .95rem;
    line-height: 1;
}

.experience-card {
    flex-direction: column;
}

.experience-card .resume-card-icon {
    margin-bottom: .15rem;
}

.panel-label {
    display: inline-block;
    margin-bottom: .65rem;
    color: var(--accent);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.publication-link {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: var(--accent);
    font-weight: 800;
    text-decoration: none;
}

.profile-linkedin {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-top: .35rem;
    padding: .65rem .85rem;
    border: 1px solid rgba(15, 118, 110, .22);
    border-radius: 8px;
    color: var(--accent);
    background: rgba(217, 245, 239, .45);
    font-size: .84rem;
    font-weight: 760;
    text-decoration: none;
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.profile-linkedin:hover {
    border-color: rgba(15, 118, 110, .42);
    color: var(--accent-strong);
    background: rgba(217, 245, 239, .8);
    transform: translateY(-2px);
}

.about-contact-grid {
    display: grid;
    gap: .55rem;
}

.about-contact-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .65rem .7rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.about-contact-item .icon-box {
    width: 34px;
    height: 34px;
    font-size: .86rem;
}

.about-contact-item strong {
    display: block;
    color: #24364d;
    font-size: .72rem;
    line-height: 1.3;
}

.about-contact-item p {
    margin: .12rem 0 0;
    color: var(--muted);
    font-size: .76rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.publication-link:hover {
    color: var(--accent-strong);
}

.parallax-band {
    background-image: linear-gradient(rgba(15, 23, 42, .76), rgba(15, 23, 42, .72)), url('../img/dc.jpeg');
    background-position: center 48%;
}

.gallery-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    transition: transform .25s ease, box-shadow .25s ease;
}

.gallery-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.gallery-card img {
    width: 100%;
    aspect-ratio: 16 / 8.5;
    object-fit: cover;
    transition: transform .35s ease;
}

.gallery-card:hover img {
    transform: scale(1.04);
}

.gallery-card .card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: .8rem .85rem;
}

.gallery-card h3 {
    font-size: clamp(.82rem, 1vw, .92rem);
    font-weight: 760;
    line-height: 1.35;
}

.gallery-card p {
    flex: 1;
    font-size: .76rem;
    line-height: 1.45;
}

.portfolio-courses {
    margin-top: clamp(2rem, 4vw, 3rem);
    padding-top: clamp(1.45rem, 3vw, 2rem);
    border-top: 1px solid rgba(15, 23, 42, .1);
}

.section-title-compact {
    max-width: 680px;
    margin-bottom: 1.2rem;
}

.section-title-compact span {
    font-size: .62rem;
}

.section-title-compact h2 {
    font-size: clamp(1.05rem, 1.8vw, 1.5rem);
    line-height: 1.16;
    margin-top: .35rem;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    align-items: stretch;
    grid-auto-rows: 1fr;
    gap: .75rem;
}

.course-grid-compact {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: .7rem;
}

.course-card {
    display: grid;
    grid-template-columns: 20px 1fr;
    align-items: flex-start;
    gap: .5rem;
    min-height: 76px;
    height: 100%;
    padding: .68rem .75rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease;
}

.course-card:hover {
    border-color: rgba(15, 118, 110, .32);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.course-icon {
    display: inline-grid;
    width: 18px;
    height: 18px;
    place-items: center;
    color: var(--accent);
    font-size: .78rem;
    line-height: 1;
}

.course-card h3 {
    margin: 0;
    color: #24364d;
    font-size: clamp(.72rem, .82vw, .8rem);
    font-weight: 680;
    line-height: 1.42;
    overflow-wrap: anywhere;
}

.course-grid-compact .course-card {
    grid-template-columns: 18px 1fr;
    gap: .48rem;
    min-height: 72px;
    padding: .62rem .7rem;
}

.course-grid-compact .course-icon {
    width: 18px;
    height: 18px;
    font-size: .78rem;
}

.course-grid-compact .course-card h3 {
    font-size: clamp(.7rem, .78vw, .76rem);
    line-height: 1.36;
}

.btn-accent {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--accent);
    --bs-btn-border-color: var(--accent);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--accent-strong);
    --bs-btn-hover-border-color: var(--accent-strong);
    font-size: .84rem;
    font-weight: 720;
    border-radius: 8px;
    padding: .8rem 1.05rem;
    box-shadow: 0 14px 28px rgba(15, 118, 110, .2);
}

.btn-outline-light,
.btn-outline-secondary {
    border-radius: 8px;
    font-size: .84rem;
    font-weight: 720;
    padding: .8rem 1.05rem;
}

.contact-panel {
    padding: clamp(1rem, 2.2vw, 1.45rem);
}

.form-control,
.form-select {
    border-radius: 8px;
    border-color: rgba(15, 23, 42, .16);
    padding: .8rem .95rem;
    background-color: #fbfcfe;
    font-size: .84rem;
}

.form-label {
    font-size: .8rem;
    font-weight: 680;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 .25rem rgba(15, 118, 110, .16);
}

.icon-box {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--accent);
    flex: 0 0 auto;
}

footer {
    background: #101828;
    color: rgba(255, 255, 255, .74);
    font-size: .8rem;
    padding: 2rem 0;
}

::selection {
    color: #fff;
    background: var(--accent);
}

@media (max-width: 991.98px) {
    .hero,
    .page-hero,
    .parallax-band,
    .content-parallax {
        background-attachment: scroll;
    }

    .hero {
        min-height: auto;
        padding-top: 8rem;
    }

    .navbar-collapse {
        margin-top: .75rem;
        padding: .85rem;
        border: 1px solid rgba(15, 23, 42, .1);
        border-radius: 8px;
        background: rgba(255, 255, 255, .96);
        box-shadow: var(--shadow-sm);
    }

    .language-switch {
        margin-top: .5rem;
    }

    .resume-card-grid {
        gap: 1rem;
    }

    .section-title h2 {
        max-width: 720px;
    }
}

@media (max-width: 575.98px) {
    body {
        font-size: .86rem;
    }

    .hero,
    .page-hero {
        padding: 7rem 0 3.65rem;
    }

    .hero h1,
    .page-hero h1 {
        font-size: clamp(1.58rem, 8.5vw, 2.25rem);
        line-height: 1.12;
    }

    .section-title h2 {
        font-size: clamp(1.25rem, 7vw, 1.78rem);
    }

    .resume-card,
    .core-check-card,
    .skill-pill,
    .profile-panel,
    .contact-panel {
        padding: 1rem;
    }

    .btn {
        width: 100%;
    }

    .publication-link {
        align-items: flex-start;
        overflow-wrap: anywhere;
    }

    .resume-card-grid-experience,
    .resume-card-grid-core,
    .course-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 575.98px) {
    .gallery-card img {
        aspect-ratio: 16 / 9;
    }
}
