/* ============================================================
   BASE & RESET
   ============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #f5f8ff;
    --bg-card: #ffffff;
    --bg-card-2: #ebf0ff;
    --accent: #0052ff;
    --accent-2: #5b21b6;
    --accent-3: #059669;
    --accent-dim: #e0eaff;
    --accent-dim-2: #ede8ff;
    --text: #050d1a;
    --text-muted: #354563;
    --border: #c7d6f8;
    --radius: 6px;
    --radius-lg: 10px;
    --shadow: 0 4px 24px rgba(0, 82, 255, .18);
    --shadow-card: 0 1px 4px rgba(5, 13, 26, .09), 0 8px 28px rgba(0, 82, 255, .13);
    --nav-h: 68px;
    --font: 'Inter', system-ui, sans-serif;
    --transition: .25s cubic-bezier(.4, 0, .2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img {
    display: block;
    max-width: 100%;
}

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

ul,
ol {
    list-style: none;
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
    width: min(1160px, 100% - 3rem);
    margin-inline: auto;
}

.section {
    padding-block: 100px;
}

.section__header {
    margin-bottom: 56px;
}

.section__header--center {
    text-align: center;
}

.section__tag {
    display: inline-flex;
    align-items: center;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-dim);
    padding: .28rem .8rem;
    border-radius: 4px;
    margin-bottom: 12px;
}

.section__title {
    font-size: clamp(1.9rem, 4vw, 2.9rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -.03em;
    color: var(--text);
}

.section__lead {
    margin-top: 12px;
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.72;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    border-radius: 5px;
    font-weight: 600;
    font-size: .88rem;
    transition: all var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    white-space: nowrap;
    padding: .7rem 1.5rem;
    letter-spacing: .01em;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn--primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 3px 16px rgba(0, 82, 255, .4);
}

.btn--primary:hover {
    filter: brightness(1.1);
    box-shadow: 0 6px 28px rgba(0, 82, 255, .55);
}

.btn--outline {
    border-color: var(--border);
    color: var(--text);
    background: transparent;
}

.btn--outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
}

.btn--sm {
    padding: .44rem 1rem;
    font-size: .78rem;
    border-radius: 4px;
}

/* ============================================================
   TAGS
   ============================================================ */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.tag {
    font-size: .72rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: .25rem .65rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tag__yrs {
    font-style: normal;
    font-size: .62rem;
    font-weight: 700;
    color: var(--accent);
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    transition: opacity var(--transition), max-width var(--transition);
}

.tag:hover .tag__yrs {
    opacity: .8;
    max-width: 3rem;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    z-index: 1000;
    background: rgba(245, 248, 255, .88);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition);
}

.nav.scrolled {
    border-color: var(--border);
}

.nav__inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.nav__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.nav__logo-mark {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.nav__logo-wordmark {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--text);
    line-height: 1;
}

.nav__logo-wordmark strong {
    color: var(--accent);
}

.nav__links {
    display: flex;
    align-items: center;
    gap: 1.6rem;
}

.nav__links a {
    font-size: .84rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color var(--transition);
}

.nav__links a:hover {
    color: var(--text);
}

.nav__links .btn {
    background: var(--accent);
    color: #fff !important;
    box-shadow: 0 2px 10px rgba(0, 82, 255, .32);
}

.nav__links .btn:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 16px rgba(0, 82, 255, .45);
}

.nav__burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav__burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    padding-top: var(--nav-h);
    padding-bottom: 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 60% at 80% 50%, rgba(0, 82, 255, .13) 0%, transparent 60%),
        radial-gradient(ellipse 50% 55% at 10% 80%, rgba(91, 33, 182, .11) 0%, transparent 58%),
        radial-gradient(ellipse 40% 40% at 50% 0%, rgba(5, 150, 105, .07) 0%, transparent 55%);
    pointer-events: none;
    z-index: 1;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Ccircle cx='1' cy='1' r='1' fill='%230052ff' fill-opacity='.10'/%3E%3C/svg%3E");
    background-size: 32px 32px;
    background-repeat: repeat;
    -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, black 30%, transparent 80%);
    mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, black 30%, transparent 80%);
    pointer-events: none;
    z-index: 0;
}

.hero__inner {
    z-index: 2;
}

.hero__scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition), transform var(--transition);
}

.hero__scroll:hover {
    color: var(--accent);
    transform: translateX(-50%) translateY(3px);
}

.hero__scroll-text {
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    opacity: .5;
}

.hero__scroll svg {
    width: 18px;
    height: 18px;
    opacity: .5;
    animation: scrollBounce 2s ease-in-out infinite;
}

.hero__scroll:hover svg {
    opacity: 1;
}

@keyframes scrollBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(5px);
    }
}

.hero__inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

.hero__text {
    max-width: 680px;
}

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-dim);
    border: 1px solid rgba(0, 82, 255, .2);
    border-radius: 4px;
    padding: .3rem .9rem;
    margin-bottom: 22px;
}

.hero__title {
    font-size: clamp(3.2rem, 7vw, 5.8rem);
    font-weight: 800;
    line-height: 1.0;
    letter-spacing: -.045em;
    margin-bottom: 22px;
    color: var(--text);
}

.hero__title span {
    background: linear-gradient(105deg, var(--accent) 0%, var(--accent-2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__sub {
    font-size: 1.08rem;
    color: var(--text-muted);
    max-width: 640px;
    margin-bottom: 34px;
    line-height: 1.78;
}

.hero__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 52px;
}

.hero__stats {
    display: flex;
    gap: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

.hero__stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hero__stat-num {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -.04em;
    color: var(--text);
    line-height: 1;
}

.hero__stat-label {
    font-size: .68rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .1em;
}

/* ============================================================
   CLIENTS / MARQUEE
   ============================================================ */
.clients {
    padding-block: 48px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.clients__label {
    text-align: center;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 26px;
    opacity: .55;
}

.clients__track-wrap {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.clients__track {
    display: flex;
    gap: 56px;
    width: max-content;
    animation: marquee 32s linear infinite;
    align-items: center;
}

.clients__track:hover {
    animation-play-state: paused;
}

@keyframes marquee {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.clients__item {
    display: flex;
    align-items: center;
    height: 36px;
    flex-shrink: 0;
}

.clients__item img {
    height: 100%;
    width: auto;
    object-fit: contain;
    filter: grayscale(1);
    opacity: .4;
    transition: opacity var(--transition), filter var(--transition);
}

.clients__item img:hover {
    filter: none;
    opacity: 1;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about {
    background: var(--bg);
}

.about__grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 56px;
    align-items: start;
}

.about__aside {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    position: sticky;
    top: calc(var(--nav-h) + 24px);
}

.about__photo {
    width: 160px;
}

.about__photo img {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    border: 3px solid #fff;
    box-shadow: 0 0 0 3px var(--accent), 0 8px 32px rgba(0, 82, 255, .2);
    display: block;
}

.about__links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.about__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: .84rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
    width: 100%;
}

.about__link svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.about__link--malt {
    background: #ff5c57;
    color: #fff;
}

.about__link--linkedin {
    background: #0a66c2;
    color: #fff;
}

.about__link:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .2);
}

.about__content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.about__intro {
    font-size: 1.04rem;
    color: var(--text-muted);
    line-height: 1.85;
}

.about__skills {
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-top: 1px solid var(--border);
    padding-top: 28px;
}

.skill-label {
    display: block;
    font-size: .67rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 8px;
}

/* ============================================================
   PROJECTS
   ============================================================ */
.projects {
    background: var(--bg-card-2);
}

.projects__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 82, 255, .2);
    border-color: rgba(0, 82, 255, .35);
}

.project-card__body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.project-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

.project-card__header-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.project-card__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.project-card__client {
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent);
}

.project-card__year {
    font-size: .68rem;
    font-weight: 500;
    color: var(--text-muted);
}

.project-card__type {
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: .18rem .6rem;
    border-radius: 3px;
}

.project-card__type--freelance {
    background: var(--accent-dim);
    color: var(--accent);
}

.project-card__type--employed {
    background: var(--accent-dim-2);
    color: var(--accent-2);
}

.project-card__title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.3;
    color: var(--text);
}

.project-card__desc {
    font-size: .84rem;
    color: var(--text-muted);
    line-height: 1.7;
    flex: 1;
}

.project-card__footer {
    border-top: 1px solid var(--border);
    padding-top: 14px;
    margin-top: 4px;
}

/* ============================================================
   EXPERIENCE / TIMELINE
   ============================================================ */
.experience {
    background: var(--bg);
}

.timeline {
    position: relative;
    padding-left: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent) 0%, transparent 90%);
    border-radius: 2px;
}

.timeline__item {
    position: relative;
    padding-bottom: 22px;
}

.timeline__item:last-child {
    padding-bottom: 0;
}

.timeline__marker {
    position: absolute;
    left: calc(-32px + 3px);
    top: 14px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--bg);
    box-shadow: 0 0 0 3px var(--accent-dim);
    transition: transform var(--transition);
}

.timeline__item:hover .timeline__marker {
    transform: scale(1.3);
}

.timeline__content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 22px;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.timeline__item:hover .timeline__content {
    border-color: rgba(0, 82, 255, .35);
    box-shadow: 0 3px 12px rgba(0, 82, 255, .2);
}

.timeline__period {
    display: block;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 4px;
}

.timeline__role {
    font-size: .95rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
    margin-bottom: 2px;
}

.timeline__company {
    font-size: .76rem;
    color: var(--text-muted);
    font-weight: 500;
    display: block;
    margin-bottom: 8px;
}

.timeline__content p {
    font-size: .84rem;
    color: var(--text-muted);
    line-height: 1.65;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
    background: var(--bg-card-2);
}

.contact__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact__sub {
    margin-top: 12px;
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 460px;
    line-height: 1.7;
}

.contact__cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 40px;
    width: 100%;
    max-width: 640px;
}

.contact__card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 22px;
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
    font-size: .9rem;
    font-weight: 500;
    color: var(--text);
    flex: 1;
    min-width: 220px;
}

.contact__card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.contact__card--location {
    cursor: default;
}

.contact__card--location:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--border);
}

.contact__card svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--accent);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: var(--bg-card-2);
    border-top: 1px solid var(--border);
    padding-block: 28px;
}

.footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.footer__copy {
    text-align: right;
}

.footer__copy p {
    font-size: .74rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.footer__meta {
    font-size: .7rem;
    color: var(--text-muted);
    opacity: .6;
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .55s cubic-bezier(.4, 0, .2, 1), transform .55s cubic-bezier(.4, 0, .2, 1);
}

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

/* ============================================================
   RESPONSIVE — 900px
   ============================================================ */
@media (max-width: 900px) {
    .hero__title {
        font-size: clamp(2.6rem, 9vw, 3.6rem);
    }

    .hero__stats {
        gap: 24px;
    }

    .about__grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .about__aside {
        flex-direction: row;
        align-items: flex-start;
        position: static;
        gap: 24px;
    }

    .about__photo {
        width: 96px;
        flex-shrink: 0;
    }

    .about__photo img {
        width: 96px;
        height: 96px;
    }

    .about__links {
        flex-direction: row;
        width: auto;
    }

    .about__link {
        width: auto;
    }

    .projects__grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ============================================================
   RESPONSIVE — 640px
   ============================================================ */
@media (max-width: 640px) {
    .section {
        padding-block: 64px;
    }

    .nav__links {
        display: none;
        flex-direction: column;
        align-items: flex-start;
    }

    .nav__links.open {
        display: flex;
        position: fixed;
        top: var(--nav-h);
        left: 0;
        right: 0;
        background: var(--bg-card);
        border-top: 1px solid var(--border);
        padding: 24px;
        gap: 18px;
        z-index: 999;
    }

    .nav__burger {
        display: flex;
    }

    .hero__actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero__stats {
        gap: 20px;
        flex-wrap: wrap;
    }

    .hero__stat-num {
        font-size: 1.4rem;
    }

    .projects__grid {
        grid-template-columns: 1fr;
    }

    .about__aside {
        flex-direction: column;
        align-items: center;
    }

    .about__links {
        flex-direction: column;
        width: 100%;
    }

    .about__link {
        width: 100%;
    }

    .timeline {
        padding-left: 24px;
    }

    .contact__cards {
        flex-direction: column;
    }

    .footer__inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer__copy {
        text-align: left;
    }
}