* {
    box-sizing: border-box;
}

:root {
    --bg: #f5f3ee;
    --surface: #ffffff;
    --surface-soft: #eeece6;

    --text: #22262b;
    --text-soft: #4d5660;
    --muted: #7b838c;

    --border: #ddd9d1;
    --border-soft: #e9e6df;

    --accent: #315d72;
    --accent-dark: #244a5d;
    --accent-soft: #e1ebef;

    --warm: #b48962;

    --shadow-sm: 0 8px 22px rgba(35, 39, 42, 0.05);
    --shadow-md: 0 16px 40px rgba(35, 39, 42, 0.08);

    --content-width: 1160px;
}


/* =================================================
   BASE
================================================= */

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;

    color: var(--text);
    background: var(--bg);

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    line-height: 1.5;
}

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

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

button {
    font: inherit;
}

.me-page-wrapper {
    min-height: 100vh;

    display: flex;
    flex-direction: column;
}


/* =================================================
   HEADER
================================================= */

.me-header {
    position: sticky;
    top: 0;
    z-index: 100;

    background: rgba(245, 243, 238, 0.94);

    border-bottom: 1px solid rgba(49, 54, 60, 0.09);

    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.me-header-inner {
    width: min(var(--content-width), calc(100% - 48px));
    height: 74px;

    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;
}

.me-brand {
    display: inline-flex;
    align-items: center;

    gap: 11px;

    color: var(--text);

    font-weight: 750;
    letter-spacing: -0.02em;
}

.me-brand-logo {
    width: 34px;
    height: 34px;
}

.me-nav {
    display: flex;
    align-items: center;

    gap: 26px;
}

.me-nav-link {
    position: relative;

    padding: 9px 0;

    color: var(--text-soft);

    font-size: 0.92rem;
    font-weight: 600;

    transition: color 0.18s ease;
}

.me-nav-link::after {
    content: "";

    position: absolute;
    left: 0;
    right: 100%;
    bottom: 3px;

    height: 2px;

    background: var(--accent);

    transition: right 0.2s ease;
}

.me-nav-link:hover,
.me-nav-link.active {
    color: var(--accent-dark);
}

.me-nav-link:hover::after,
.me-nav-link.active::after {
    right: 0;
}

.me-nav-toggle {
    display: none;

    width: 42px;
    height: 42px;

    padding: 9px;

    background: transparent;

    border: 1px solid var(--border);
    border-radius: 8px;

    cursor: pointer;
}

.me-nav-toggle span {
    display: block;

    width: 100%;
    height: 2px;

    margin: 4px 0;

    background: var(--text);

    border-radius: 999px;
}


/* =================================================
   MAIN
================================================= */

.me-main {
    flex: 1;

    width: min(var(--content-width), calc(100% - 48px));

    margin: 0 auto;

    padding: 70px 0 90px;
}


/* =================================================
   COMMON
================================================= */

.me-eyebrow {
    margin-bottom: 12px;

    color: var(--warm);

    font-size: 0.75rem;
    font-weight: 800;

    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.me-page-header {
    max-width: 780px;

    margin-bottom: 48px;
}

.me-page-header h1 {
    margin: 0;

    font-family: Georgia, "Times New Roman", serif;

    font-size: clamp(2.7rem, 6vw, 4.8rem);
    line-height: 1;

    font-weight: 500;
    letter-spacing: -0.045em;
}

.me-page-header p {
    max-width: 680px;

    margin: 20px 0 0;

    color: var(--text-soft);

    font-size: 1.05rem;
    line-height: 1.75;
}

.me-section-heading {
    margin-bottom: 28px;
}

.me-section-heading h2 {
    margin: 0;

    font-family: Georgia, "Times New Roman", serif;

    font-size: clamp(1.8rem, 3vw, 2.5rem);

    font-weight: 500;
    letter-spacing: -0.025em;
}


/* =================================================
   HERO
================================================= */

.me-hero {
    display: grid;

    grid-template-columns:
        minmax(280px, 390px)
        minmax(0, 1fr);

    align-items: center;

    gap: clamp(45px, 8vw, 90px);

    min-height: 540px;
}

.me-hero-image {
    position: relative;
}

.me-hero-image::before {
    content: "";

    position: absolute;

    left: -18px;
    top: 22px;

    width: 100%;
    height: 100%;

    background: var(--accent-soft);

    border-radius: 2px;

    z-index: -1;
}

.me-hero-image img {
    width: 100%;

    aspect-ratio: 4 / 5;

    object-fit: cover;

    border-radius: 2px;

    box-shadow: var(--shadow-md);
}

.me-hero-content h1 {
    margin: 0;

    font-family: Georgia, "Times New Roman", serif;

    font-size: clamp(3.4rem, 7vw, 6.3rem);
    line-height: 0.91;

    font-weight: 500;
    letter-spacing: -0.06em;
}

.me-lead {
    max-width: 700px;

    margin: 28px 0 0;

    color: var(--text-soft);

    font-size: 1.12rem;
    line-height: 1.75;
}

.me-hero-actions {
    display: flex;
    flex-wrap: wrap;

    gap: 12px;

    margin-top: 32px;
}


/* =================================================
   BUTTONS
================================================= */

.me-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 44px;
    padding: 0 19px;

    border: 1px solid;

    border-radius: 6px;

    font-size: 0.9rem;
    font-weight: 700;

    transition:
        background 0.18s ease,
        color 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease;
}

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

.me-btn.primary {
    color: #fff;

    background: var(--accent);
    border-color: var(--accent);
}

.me-btn.primary:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
}

.me-btn.secondary {
    color: var(--text);

    background: transparent;
    border-color: #bbb6ad;
}

.me-btn.secondary:hover {
    background: var(--surface);
    border-color: var(--accent);
}


/* =================================================
   HOME
================================================= */

.me-home-section {
    margin-top: 100px;
}

.me-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 18px;
}

.me-feature-card {
    position: relative;

    min-height: 220px;

    padding: 30px;

    background: rgba(255, 255, 255, 0.62);

    border: 1px solid var(--border-soft);

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.me-feature-card:hover {
    transform: translateY(-2px);

    background: var(--surface);

    box-shadow: var(--shadow-sm);
}

.me-feature-icon {
    margin-bottom: 30px;

    color: var(--warm);

    font-family: Georgia, "Times New Roman", serif;

    font-size: 0.95rem;
}

.me-feature-card h3 {
    margin: 0 0 10px;

    font-family: Georgia, "Times New Roman", serif;

    font-size: 1.35rem;
    font-weight: 500;
}

.me-feature-card p {
    max-width: 470px;

    margin: 0;

    color: var(--text-soft);

    line-height: 1.7;
}


/* =================================================
   ABOUT
================================================= */

.me-about-layout {
    display: grid;

    grid-template-columns:
        minmax(220px, 300px)
        minmax(0, 1fr);

    gap: 56px;

    align-items: start;
}

.me-about-profile {
    position: sticky;
    top: 110px;

    background: transparent;
}

.me-about-profile img {
    width: 100%;

    aspect-ratio: 4 / 5;

    object-fit: cover;

    box-shadow: var(--shadow-md);
}

.me-about-profile-text {
    padding: 20px 0 0;
}

.me-about-profile-text strong {
    display: block;

    font-family: Georgia, "Times New Roman", serif;

    font-size: 1.3rem;
    font-weight: 500;
}

.me-about-profile-text span {
    display: block;

    margin-top: 7px;

    color: var(--muted);

    font-size: 0.88rem;
    line-height: 1.55;
}

.me-about-content {
    display: grid;

    gap: 0;
}

.me-text-section {
    padding: 30px 0;

    border-top: 1px solid var(--border);
}

.me-text-section:first-child {
    padding-top: 0;

    border-top: 0;
}

.me-text-section h2 {
    margin: 0 0 15px;

    font-family: Georgia, "Times New Roman", serif;

    font-size: 1.55rem;
    font-weight: 500;
}

.me-text-section p {
    max-width: 760px;

    margin: 0;

    color: var(--text-soft);

    font-size: 1rem;
    line-height: 1.8;
}

.me-text-section p + p {
    margin-top: 15px;
}


/* =================================================
   RESUME
================================================= */

.me-resume-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    gap: 38px;
}

.me-resume-section {
    padding-top: 24px;

    border-top: 2px solid var(--text);
}

.me-resume-section > h2 {
    margin: 0 0 30px;

    font-family: Georgia, "Times New Roman", serif;

    font-size: 1.7rem;
    font-weight: 500;
}

.me-timeline {
    display: grid;
}

.me-timeline-item {
    display: grid;

    grid-template-columns:
        110px
        minmax(0, 1fr);

    gap: 18px;

    padding: 18px 0;

    border-top: 1px solid var(--border-soft);
}

.me-timeline-item:first-child {
    padding-top: 0;
    border-top: 0;
}

.me-timeline-date {
    color: var(--warm);

    font-size: 0.8rem;
    font-weight: 800;
}

.me-timeline-content h3 {
    margin: 0;

    font-size: 1rem;
    font-weight: 700;
}

.me-timeline-content p {
    margin: 6px 0 0;

    color: var(--text-soft);

    font-size: 0.9rem;
    line-height: 1.6;
}


/* =================================================
   SKILLS
================================================= */

.me-skills-section {
    margin-top: 60px;
    padding-top: 28px;

    border-top: 2px solid var(--text);
}

.me-skill-list {
    display: flex;
    flex-wrap: wrap;

    gap: 8px;
}

.me-skill-list span {
    padding: 8px 12px;

    color: var(--accent-dark);

    background: var(--accent-soft);

    border-radius: 4px;

    font-size: 0.85rem;
    font-weight: 650;
}

.me-language-section {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-top: 34px;
    padding: 18px 0;

    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.me-language-section strong {
    font-family: Georgia, "Times New Roman", serif;

    font-size: 1.15rem;
    font-weight: 500;
}

.me-language-section span {
    color: var(--text-soft);
}


/* =================================================
   FOOTER
================================================= */

.me-footer {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    padding: 26px 24px;

    color: var(--muted);

    border-top: 1px solid var(--border-soft);

    font-size: 0.82rem;
}

.me-footer-separator {
    opacity: 0.45;
}


/* =================================================
   TABLET
================================================= */

@media (max-width: 920px) {

    .me-hero {
        grid-template-columns:
            minmax(230px, 300px)
            minmax(0, 1fr);

        gap: 42px;
    }

    .me-about-layout {
        grid-template-columns:
            220px
            minmax(0, 1fr);

        gap: 34px;
    }

    .me-resume-grid {
        grid-template-columns: 1fr;
    }
}


/* =================================================
   MOBILE
================================================= */

@media (max-width: 700px) {

    .me-header-inner,
    .me-main {
        width: calc(100% - 28px);
    }

    .me-header-inner {
        height: 64px;
    }


    /* NAV */

    .me-nav-toggle {
        display: block;
    }

    .me-nav {
        position: absolute;

        top: 64px;
        left: 14px;
        right: 14px;

        display: none;
        flex-direction: column;
        align-items: stretch;

        gap: 0;

        padding: 8px;

        background: #faf9f6;

        border: 1px solid var(--border);
        border-radius: 8px;

        box-shadow: var(--shadow-md);
    }

    .me-nav.open {
        display: flex;
    }

    .me-nav-link {
        padding: 12px;

        border-radius: 5px;
    }

    .me-nav-link::after {
        display: none;
    }

    .me-nav-link:hover,
    .me-nav-link.active {
        background: var(--accent-soft);
    }


    /* MAIN */

    .me-main {
        padding: 38px 0 60px;
    }


    /* HERO */

    .me-hero {
        grid-template-columns: 1fr;

        min-height: auto;

        gap: 36px;
    }

    .me-hero-image {
        width: min(280px, 78vw);

        margin: 0 auto;
    }

    .me-hero-image::before {
        left: -10px;
        top: 12px;
    }

    .me-hero-content {
        text-align: center;
    }

    .me-hero-content h1 {
        font-size: clamp(3rem, 16vw, 4.6rem);
    }

    .me-hero-content .me-eyebrow {
        text-align: center;
    }

    .me-lead {
        font-size: 1rem;
    }

    .me-hero-actions {
        justify-content: center;
    }


    /* HOME */

    .me-home-section {
        margin-top: 70px;
    }

    .me-feature-grid {
        grid-template-columns: 1fr;
    }

    .me-feature-card {
        min-height: auto;

        padding: 24px;
    }


    /* PAGE */

    .me-page-header {
        margin-bottom: 34px;
    }

    .me-page-header h1 {
        font-size: clamp(2.5rem, 13vw, 3.6rem);
    }


    /* ABOUT */

    .me-about-layout {
        grid-template-columns: 1fr;

        gap: 38px;
    }

    .me-about-profile {
        position: static;

        display: grid;

        grid-template-columns:
            105px
            minmax(0, 1fr);

        align-items: center;

        gap: 18px;
    }

    .me-about-profile img {
        width: 105px;
        height: 125px;

        object-fit: cover;
    }

    .me-about-profile-text {
        padding: 0;
    }


    /* CV */

    .me-timeline-item {
        grid-template-columns: 1fr;

        gap: 5px;

        padding: 18px 0;
    }

    .me-language-section {
        align-items: flex-start;

        flex-direction: column;

        gap: 5px;
    }

    .me-footer {
        flex-wrap: wrap;
    }
}


/* =================================================
   SMALL MOBILE
================================================= */

@media (max-width: 430px) {

    .me-brand span {
        display: none;
    }

    .me-hero-actions {
        display: grid;

        width: 100%;
    }

    .me-btn {
        width: 100%;
    }

    .me-about-profile {
        grid-template-columns:
            82px
            minmax(0, 1fr);
    }

    .me-about-profile img {
        width: 82px;
        height: 100px;
    }
}