@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;700&display=swap');

:root {
    --bg-main: #f2f4f7;
    --bg-soft: #ffffff;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #475467;
    --accent: #0b5fff;
    --accent-light: #155eef;
    --accent-dark: #101828;
    --line: #d0d5dd;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Manrope', sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at 10% 10%, rgba(11, 95, 255, 0.08) 0%, rgba(11, 95, 255, 0) 30%),
        radial-gradient(circle at 90% 8%, rgba(23, 178, 106, 0.09) 0%, rgba(23, 178, 106, 0) 32%),
        linear-gradient(180deg, #f8fafc 0%, #eef2f6 100%);
    line-height: 1.6;
}

a {
    color: inherit;
}

.portfolio-page {
    overflow-x: hidden;
}

[data-reveal] {
    opacity: 1;
    transform: translateY(0);
}

.has-js [data-reveal].reveal-pending {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 520ms ease, transform 520ms ease;
}

.has-js [data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    z-index: 30;
    background: rgba(15, 23, 42, 0.08);
}

.scroll-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #0b5fff, #17b26a);
    transition: width 120ms linear;
}

.container {
    width: min(1180px, calc(100% - 3rem));
    margin: 0 auto;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(14px);
    background: rgba(248, 250, 252, 0.82);
    border-bottom: 1px solid rgba(208, 213, 221, 0.72);
}

.side-anchor-nav {
    position: fixed;
    top: 38%;
    left: 1.15rem;
    transform: translateY(-50%);
    display: grid;
    gap: 0.45rem;
    z-index: 18;
    padding: 0.6rem;
    border-radius: 16px;
    border: 1px solid rgba(208, 213, 221, 0.95);
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(10px);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
}

.side-anchor-nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.4rem 0.65rem;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: all 180ms ease;
}

.side-anchor-nav a:hover,
.side-anchor-nav a.is-active {
    color: var(--accent);
    background: rgba(11, 95, 255, 0.08);
    border-color: rgba(11, 95, 255, 0.22);
}

.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    min-height: 74px;
}

.brand {
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.brand__name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 700;
}

.brand__role {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.topbar__nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.topbar__nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
}

.locale-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 0.95rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(6px);
}

.section {
    padding: 4.5rem 0;
}

.section--light {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.96));
    border-top: 1px solid rgba(208, 213, 221, 0.85);
    border-bottom: 1px solid rgba(208, 213, 221, 0.85);
}

.section--accent {
    background: linear-gradient(130deg, #101828 0%, #182230 100%);
    color: #f8fafc;
}

.positioning-strip {
    position: relative;
    z-index: 2;
    margin-top: -2rem;
    padding-bottom: 1rem;
}

.positioning-strip__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.positioning-card {
    padding: 1.35rem 1.4rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(208, 213, 221, 0.9);
    box-shadow: var(--shadow);
}

.positioning-card h2 {
    font-size: 1.18rem;
    margin-bottom: 0.55rem;
}

.positioning-card p:last-child {
    margin-bottom: 0;
    color: var(--text-muted);
}

.positioning-card__kicker {
    margin: 0 0 0.45rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    font-weight: 800;
}

.hero {
    position: relative;
    min-height: calc(100vh - 74px);
    display: flex;
    align-items: center;
    isolation: isolate;
}

.hero__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.78fr);
    gap: 2rem;
    align-items: start;
}

.hero__content {
    position: relative;
    z-index: 2;
    max-width: 820px;
    animation: rise-in 900ms ease-out both;
}

.hero__bg-shape {
    position: absolute;
    border-radius: 999px;
    filter: blur(3px);
    z-index: 1;
}

.hero__bg-shape--one {
    width: 460px;
    height: 460px;
    top: 5%;
    right: -120px;
    background: linear-gradient(145deg, rgba(11, 95, 255, 0.18), rgba(23, 178, 106, 0.12));
}

.hero__bg-shape--two {
    width: 380px;
    height: 380px;
    left: -160px;
    bottom: -70px;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.08), rgba(11, 95, 255, 0.08));
}

.eyebrow {
    margin: 0 0 1rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--accent);
}

h1,
h2,
h3 {
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: -0.02em;
    margin-top: 0;
}

h1 {
    font-size: clamp(2.7rem, 6vw, 5rem);
    line-height: 1.02;
    margin-bottom: 0.8rem;
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.3rem);
    margin-bottom: 1.2rem;
}

h3 {
    margin-bottom: 0.35rem;
    font-size: 1.14rem;
}

.lead {
    margin: 0;
    font-size: 1.18rem;
    font-weight: 600;
    color: var(--text-muted);
}

.intro {
    margin: 1.4rem 0 0;
    font-size: 1.08rem;
    max-width: 65ch;
}

.hero__highlights {
    display: grid;
    gap: 0.55rem;
    margin: 1.25rem 0 0;
    padding: 0;
    list-style: none;
}

.hero__highlights li {
    position: relative;
    padding-left: 1.1rem;
    color: var(--text-muted);
}

.hero__highlights li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.62rem;
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: var(--accent);
}

.hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.8rem;
}

.hero__meta span,
.hero__meta a {
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: rgba(255, 255, 255, 0.84);
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    text-decoration: none;
    backdrop-filter: blur(6px);
}

.hero__meta a:hover,
.topbar__nav a:hover,
.locale-switch:hover,
.text-link:hover {
    color: var(--accent);
}

.hero__actions {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-top: 1.35rem;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
    margin-top: 1.5rem;
}

.metric-card {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem 1.05rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(208, 213, 221, 0.9);
    box-shadow: var(--shadow);
}

.metric-card strong {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.45rem;
}

.metric-card span {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.hero__side {
    display: grid;
    gap: 1rem;
}

.profile-card,
.credential-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(208, 213, 221, 0.92);
    border-radius: 28px;
    box-shadow: var(--shadow);
    padding: 1.4rem;
}

.profile-card__avatar {
    display: block;
    width: 116px;
    height: 116px;
    object-fit: cover;
    border-radius: 22px;
    margin-bottom: 1rem;
    border: 4px solid rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.profile-card__body,
.credential-card__body {
    padding: 0;
}

.profile-card__label,
.credential-card__label,
.section-heading__eyebrow {
    margin: 0 0 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.74rem;
    font-weight: 800;
}

.profile-card__label,
.section-heading__eyebrow {
    color: var(--accent);
}

.credential-card__label {
    color: #93c5fd;
}

.profile-card__facts {
    margin: 1rem 0 0;
    padding-left: 1.1rem;
}

.profile-card__facts li {
    margin-bottom: 0.4rem;
    color: var(--text-muted);
}

.credential-card--link {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96));
    color: #f8fafc;
}

.text-link {
    color: #93c5fd;
    font-weight: 700;
    text-decoration: none;
}

/* Certificate trigger button styling */
[data-cert-trigger] {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    color: inherit;
    transition: color 200ms ease;
}

.text-link[data-cert-trigger] {
    color: #93c5fd;
    font-weight: 700;
}

.text-link[data-cert-trigger]:hover {
    color: var(--accent);
}

.btn[data-cert-trigger] {
    /* Inherits button styling from .btn */
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-heading__body {
    max-width: 42ch;
    color: var(--text-muted);
    margin: 0;
}

.panel--editorial {
    position: relative;
    overflow: hidden;
}

.panel--editorial::after {
    content: '';
    position: absolute;
    right: -20px;
    top: -20px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(11, 95, 255, 0.11), rgba(11, 95, 255, 0));
}

.editorial-quote {
    margin: 1.5rem 0 0;
    padding: 1rem 1.1rem 1rem 1.2rem;
    border-left: 4px solid var(--accent);
    background: #f8fbff;
    border-radius: 0 16px 16px 0;
    font-size: 1.05rem;
    color: var(--accent-dark);
}

.delivery-block {
    margin-top: 1.4rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(208, 213, 221, 0.9);
}

.delivery-block__title {
    margin: 0 0 0.85rem;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
}

.grid {
    display: grid;
    gap: 1.3rem;
}

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

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

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

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

.panel,
.card,
.timeline__item {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.panel,
.card {
    padding: 1.5rem;
}

.card__kicker {
    margin: 0 0 0.55rem;
    color: var(--accent-light);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.card--featured {
    grid-column: span 2;
    background:
        linear-gradient(135deg, rgba(11, 95, 255, 0.06), rgba(255, 255, 255, 1) 45%),
        #ffffff;
}

.project-index {
    display: inline-flex;
    margin-bottom: 0.8rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: rgba(15, 23, 42, 0.38);
}

.project-outcome {
    margin: 1rem 0 0;
    padding-top: 0.9rem;
    border-top: 1px solid rgba(208, 213, 221, 0.9);
    color: var(--accent-dark);
    font-weight: 600;
}

.tag-list,
.info-list {
    margin: 0;
    padding-left: 1.1rem;
}

.tag-list--chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    padding-left: 0;
    list-style: none;
}

.tag-list--chips li {
    margin: 0;
    padding: 0.65rem 0.9rem;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #d0d5dd;
    font-weight: 600;
}

.info-list li,
.tag-list li {
    margin-bottom: 0.45rem;
}

.info-list li span {
    display: block;
    color: var(--text-muted);
}

.timeline {
    display: grid;
    gap: 1rem;
}

.timeline__item {
    position: relative;
    padding: 1.35rem 1.35rem 1.35rem 1.7rem;
    border-left: 4px solid rgba(11, 95, 255, 0.4);
}

.timeline__item::before {
    content: '';
    position: absolute;
    left: -9px;
    top: 1.55rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-light);
    box-shadow: 0 0 0 5px rgba(21, 94, 239, 0.12);
}

.period {
    margin: 0 0 0.55rem;
    color: var(--accent-light);
    font-weight: 700;
}

.panel--documents p {
    margin-top: 0;
}

.documents__actions,
.contact__actions {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.documents__actions {
    margin-top: 1rem;
}

.contact {
    text-align: center;
}

.contact p {
    max-width: 65ch;
    margin: 0 auto;
    opacity: 0.94;
}

.contact__actions {
    justify-content: center;
    margin-top: 1.4rem;
}

.portfolio-footer {
    padding: 1.4rem 0 2.4rem;
}

.portfolio-footer__inner {
    display: flex;
    justify-content: center;
}

.portfolio-footer p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid transparent;
    background: var(--accent);
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    padding: 0.75rem 1.3rem;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.2);
}

.btn--ghost {
    background: transparent;
    color: #f8fafc;
    border-color: rgba(248, 250, 252, 0.35);
}

.btn--secondary,
.btn--outline {
    background: transparent;
    color: var(--accent-dark);
    border-color: rgba(15, 23, 42, 0.16);
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Certificate Modal Styles */
.certificate-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.certificate-modal.is-open {
    display: flex;
    animation: fadeIn 300ms ease;
}

.certificate-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.certificate-modal__content {
    position: relative;
    background: var(--bg-soft);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 25px 50px rgba(15, 23, 42, 0.15);
    max-width: 90vw;
    max-height: 90vh;
    animation: slideUp 300ms ease;
    z-index: 10;
}

.certificate-modal__image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 80vh;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.certificate-modal__image {
    max-width: 100%;
    max-height: 80vh;
    height: auto;
    display: block;
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.certificate-modal__close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    background: rgba(15, 23, 42, 0.08);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 11;
    transition: background-color 200ms ease;
}

.certificate-modal__close:hover {
    background-color: rgba(15, 23, 42, 0.15);
}

.certificate-modal__close::before,
.certificate-modal__close::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 2px;
    background-color: var(--text-main);
    border-radius: 1px;
}

.certificate-modal__close::before {
    transform: rotate(45deg);
}

.certificate-modal__close::after {
    transform: rotate(-45deg);
}

/* Prevent right-click context menu on certificate modal */
.certificate-modal__image-container {
    -webkit-touch-callout: none;
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (max-width: 980px) {
    .topbar__inner,
    .section-heading {
        display: grid;
    }

    .hero__layout,
    .positioning-strip__grid,
    .two-columns,
    .three-columns,
    .cards,
    .cards--projects,
    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .card--featured {
        grid-column: span 1;
    }

    .section {
        padding: 3.4rem 0;
    }

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

    .side-anchor-nav {
        display: none;
    }

    .positioning-strip {
        margin-top: 0;
        padding-top: 0.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .has-js [data-reveal].reveal-pending {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(1180px, calc(100% - 1.4rem));
    }

    .topbar__nav {
        display: none;
    }

    .hero__meta {
        gap: 0.45rem;
    }

    .hero__meta span,
    .hero__meta a,
    .documents__actions .btn,
    .hero__actions .btn,
    .contact__actions .btn {
        width: 100%;
        border-radius: 14px;
    }

    /* Certificate Modal Responsive */
    .certificate-modal__content {
        border-radius: 16px;
        padding: 1.5rem;
    }

    .certificate-modal__image {
        max-height: 85vh;
    }

    .certificate-modal__close {
        width: 36px;
        height: 36px;
    }
}
