:root {
    color-scheme: light;
    --paper: #fffdf8;
    --paper-muted: #f7f4ed;
    --surface: rgba(255, 255, 255, 0.78);
    --surface-strong: #ffffff;
    --ink: #18212f;
    --ink-soft: #526071;
    --ink-muted: #748092;
    --line: #e8e0d4;
    --line-strong: #d9cfc0;
    --accent: #1f6feb;
    --accent-deep: #174ea6;
    --accent-soft: #e9f1ff;
    --rust: #b65f2a;
    --sage: #42766c;
    --shadow-sm: 0 10px 30px rgba(24, 33, 47, 0.08);
    --shadow-md: 0 22px 60px rgba(24, 33, 47, 0.12);
    --radius-lg: 30px;
    --radius-md: 20px;
    --radius-sm: 12px;
    --page-width: 1120px;
    --section-gap: clamp(4.5rem, 9vw, 8rem);
    --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background: var(--paper);
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(31, 111, 235, 0.12), transparent 34rem),
        radial-gradient(circle at 88% 10%, rgba(182, 95, 42, 0.12), transparent 24rem),
        linear-gradient(180deg, #fffefa 0%, var(--paper) 42%, #f8f3ea 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1rem;
    line-height: 1.65;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    content: "";
    background-image:
        linear-gradient(rgba(24, 33, 47, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(24, 33, 47, 0.035) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), transparent 78%);
}

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

a {
    color: inherit;
    text-decoration-color: rgba(31, 111, 235, 0.3);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
    transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

a:hover {
    color: var(--accent-deep);
    text-decoration-color: currentColor;
}

a:focus-visible {
    outline: 3px solid rgba(31, 111, 235, 0.35);
    outline-offset: 4px;
    border-radius: 0.35rem;
}

p,
ul,
dl,
figure {
    margin-block: 0;
}

ul {
    padding: 0;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.045em;
}

h1 {
    max-width: 10ch;
    font-size: clamp(4.25rem, 12vw, 9.5rem);
}

h2 {
    max-width: 13ch;
    font-size: clamp(2.2rem, 5.4vw, 4.75rem);
}

h3 {
    font-size: clamp(1.35rem, 2.2vw, 1.75rem);
    letter-spacing: -0.03em;
}

h4 {
    color: var(--ink-muted);
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 760;
    letter-spacing: 0.16em;
    line-height: 1.2;
    text-transform: uppercase;
}

strong {
    color: var(--accent-deep);
    font-weight: 720;
}

body > header,
main > section,
body > footer {
    width: min(calc(100% - var(--gutter) * 2), var(--page-width));
    margin-inline: auto;
}

body > header {
    position: sticky;
    top: 0.85rem;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    padding: 0.78rem 0.92rem 0.78rem 1rem;
    background: rgba(255, 253, 248, 0.78);
    border: 1px solid rgba(217, 207, 192, 0.76);
    border-radius: 999px;
    box-shadow: 0 12px 34px rgba(24, 33, 47, 0.08);
    backdrop-filter: blur(18px);
}

body > header > p > a {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--ink);
    font-weight: 780;
    letter-spacing: -0.02em;
    text-decoration: none;
    white-space: nowrap;
}

body > header > p > a::before {
    display: grid;
    width: 2.2rem;
    height: 2.2rem;
    place-items: center;
    content: "LS";
    color: #ffffff;
    background: linear-gradient(135deg, var(--ink) 0%, #29405f 100%);
    border-radius: 50%;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26);
}

body > header nav ul,
main > section:first-child > nav ul,
address ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    list-style: none;
}

body > header nav a {
    display: inline-flex;
    padding: 0.45rem 0.72rem;
    border-radius: 999px;
    color: var(--ink-soft);
    font-size: 0.92rem;
    font-weight: 650;
    text-decoration: none;
}

body > header nav a:hover {
    color: var(--ink);
    background: rgba(31, 111, 235, 0.08);
}

main {
    overflow: hidden;
}

main > section {
    margin-top: var(--section-gap);
}

main > section:first-child {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 26rem);
    grid-template-areas:
        "intro profile"
        "actions profile";
    gap: clamp(1.7rem, 5vw, 4rem);
    align-items: center;
    min-height: min(760px, calc(100vh - 5rem));
    margin-top: clamp(2.5rem, 6vw, 5rem);
}

main > section:first-child > header {
    grid-area: intro;
}

main > section:first-child > header > p:first-child,
section > header > p:first-child {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    width: fit-content;
    color: var(--rust);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    line-height: 1.3;
    text-transform: uppercase;
}

main > section:first-child > header > p:first-child::before,
section > header > p:first-child::before {
    width: 0.58rem;
    height: 0.58rem;
    content: "";
    background: currentColor;
    border-radius: 999px;
    box-shadow: 0 0 0 0.32rem rgba(182, 95, 42, 0.12);
}

main > section:first-child h1 {
    margin-top: 1.15rem;
}

main > section:first-child > header > p:last-child {
    max-width: 42rem;
    margin-top: 1.4rem;
    color: var(--ink-soft);
    font-size: clamp(1.12rem, 2.1vw, 1.4rem);
    line-height: 1.65;
}

main > section:first-child > nav {
    grid-area: actions;
    align-self: start;
}

main > section:first-child > nav ul {
    gap: 0.75rem;
}

main > section:first-child > nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3.15rem;
    padding: 0.8rem 1.1rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--ink);
    font-weight: 750;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(24, 33, 47, 0.06);
}

main > section:first-child > nav li:first-child a {
    border-color: transparent;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
    box-shadow: 0 14px 32px rgba(31, 111, 235, 0.26);
}

main > section:first-child > nav a:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

main > section:first-child > aside {
    position: relative;
    grid-area: profile;
    padding: 0.82rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 250, 242, 0.86));
    border: 1px solid rgba(217, 207, 192, 0.86);
    border-radius: calc(var(--radius-lg) + 0.4rem);
    box-shadow: var(--shadow-md);
}

main > section:first-child > aside::before {
    position: absolute;
    right: -18%;
    bottom: 14%;
    z-index: -1;
    width: 14rem;
    height: 14rem;
    content: "";
    background: radial-gradient(circle, rgba(66, 118, 108, 0.22), transparent 68%);
    border-radius: 50%;
}

figure {
    position: relative;
}

figure img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius-lg);
    filter: saturate(0.96) contrast(1.02);
}

figcaption {
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    padding: 0.68rem 0.8rem;
    color: #ffffff;
    background: rgba(24, 33, 47, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 1rem;
    font-size: 0.82rem;
    line-height: 1.35;
    backdrop-filter: blur(12px);
}

main > section:first-child dl {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.8rem 1rem;
    margin-top: 0.9rem;
    padding: 1.05rem;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

dt {
    color: var(--ink-muted);
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

dd {
    margin: 0;
    color: var(--ink);
    font-weight: 650;
    line-height: 1.45;
}

section > header {
    max-width: 54rem;
    margin-bottom: clamp(1.6rem, 4vw, 2.7rem);
}

section > header h2 {
    margin-top: 0.85rem;
}

section > header h2 + p {
    max-width: 42rem;
    margin-top: 1rem;
    color: var(--ink-soft);
    font-size: 1.08rem;
}

#about {
    position: relative;
    padding: clamp(2rem, 5vw, 3.3rem);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(233, 241, 255, 0.62));
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

#about::after {
    position: absolute;
    right: clamp(1.2rem, 4vw, 3rem);
    bottom: clamp(1rem, 3vw, 2.2rem);
    width: clamp(4rem, 12vw, 7rem);
    height: clamp(4rem, 12vw, 7rem);
    content: "";
    background:
        linear-gradient(90deg, transparent calc(50% - 1px), rgba(31, 111, 235, 0.2) calc(50% - 1px), rgba(31, 111, 235, 0.2) calc(50% + 1px), transparent calc(50% + 1px)),
        linear-gradient(transparent calc(50% - 1px), rgba(31, 111, 235, 0.2) calc(50% - 1px), rgba(31, 111, 235, 0.2) calc(50% + 1px), transparent calc(50% + 1px));
    border: 1px solid rgba(31, 111, 235, 0.14);
    border-radius: 50%;
    opacity: 0.7;
}

#about > p {
    position: relative;
    max-width: 58rem;
    color: var(--ink-soft);
    font-size: clamp(1.08rem, 2vw, 1.3rem);
}

#expertise,
#projects {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

#expertise > header,
#projects > header {
    grid-column: 1 / -1;
}

article {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 36px rgba(24, 33, 47, 0.055);
}

#expertise > article,
#projects > article {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: clamp(1.2rem, 3vw, 1.65rem);
}

#expertise > article:nth-of-type(2),
#projects > article:nth-of-type(2) {
    transform: translateY(1.2rem);
}

#expertise > article::before,
#projects > article::before {
    display: block;
    width: 2.7rem;
    height: 0.22rem;
    margin-bottom: 1.25rem;
    content: "";
    background: linear-gradient(90deg, var(--accent), var(--sage));
    border-radius: 999px;
}

#expertise article p,
#projects article p {
    margin-top: 0.78rem;
    color: var(--ink-soft);
}

#expertise article h4 {
    margin-top: 1.4rem;
}

#expertise article ul,
#experience article ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
    list-style: none;
}

#expertise article li,
#experience article li {
    padding: 0.38rem 0.65rem;
    color: var(--accent-deep);
    background: var(--accent-soft);
    border: 1px solid rgba(31, 111, 235, 0.12);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 740;
}

#experience {
    position: relative;
}

#experience > article {
    position: relative;
    display: grid;
    grid-template-columns: minmax(12rem, 0.34fr) minmax(0, 1fr);
    gap: clamp(1rem, 3vw, 2rem);
    padding: clamp(1.2rem, 3vw, 1.7rem);
    margin-left: clamp(0rem, 4vw, 2rem);
    background: rgba(255, 255, 255, 0.72);
}

#experience > article + article {
    margin-top: 0.85rem;
}

#experience > article::before {
    position: absolute;
    top: 1.45rem;
    left: -1.35rem;
    width: 0.76rem;
    height: 0.76rem;
    content: "";
    background: var(--paper);
    border: 3px solid var(--accent);
    border-radius: 999px;
    box-shadow: 0 0 0 0.35rem rgba(31, 111, 235, 0.09);
}

#experience > article:not(:last-child)::after {
    position: absolute;
    top: 2.28rem;
    bottom: -1.65rem;
    left: -1rem;
    width: 1px;
    content: "";
    background: var(--line-strong);
}

#experience article header p {
    color: var(--rust);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.45;
    text-transform: uppercase;
}

#experience article h3 {
    margin-top: 0.55rem;
}

#experience article > p {
    color: var(--ink-soft);
}

#experience article h4,
#experience article ul {
    grid-column: 2;
}

#experience article h4 {
    margin-top: -0.25rem;
}

#projects > article p:last-child {
    width: fit-content;
    margin-top: auto;
    padding: 0.45rem 0.7rem;
    color: var(--sage);
    background: rgba(66, 118, 108, 0.1);
    border: 1px solid rgba(66, 118, 108, 0.16);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
}

#contact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.55fr);
    gap: clamp(1.4rem, 4vw, 3rem);
    align-items: end;
    padding: clamp(2rem, 5vw, 3.5rem);
    color: #ffffff;
    background:
        radial-gradient(circle at 92% 15%, rgba(255, 255, 255, 0.16), transparent 15rem),
        linear-gradient(135deg, #172133 0%, #203956 58%, #174ea6 100%);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

#contact > header {
    grid-column: 1 / -1;
    margin-bottom: 0;
}

#contact > header > p:first-child {
    color: #b9d2ff;
}

#contact h2,
#contact p {
    color: #ffffff;
}

#contact > p {
    max-width: 46rem;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.08rem;
}

address {
    font-style: normal;
}

address ul {
    align-items: stretch;
    flex-direction: column;
    gap: 0.65rem;
}

address a {
    display: flex;
    padding: 0.78rem 0.9rem;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 0.95rem;
    text-decoration: none;
}

address a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
}

body > footer {
    padding-block: 2.3rem 2.8rem;
    color: var(--ink-muted);
    font-size: 0.92rem;
}

@media (max-width: 920px) {
    body > header {
        position: static;
        align-items: flex-start;
        border-radius: var(--radius-md);
    }

    body > header nav ul {
        justify-content: flex-end;
    }

    main > section:first-child,
    #contact {
        grid-template-columns: 1fr;
    }

    main > section:first-child {
        grid-template-areas:
            "intro"
            "actions"
            "profile";
        min-height: 0;
    }

    #expertise,
    #projects {
        grid-template-columns: 1fr;
    }

    #expertise > article:nth-of-type(2),
    #projects > article:nth-of-type(2) {
        transform: none;
    }

    #experience > article {
        grid-template-columns: 1fr;
    }

    #experience article h4,
    #experience article ul {
        grid-column: auto;
    }
}

@media (max-width: 640px) {
    :root {
        --gutter: 1rem;
    }

    body {
        line-height: 1.6;
    }

    body > header {
        gap: 0.85rem;
        padding: 0.85rem;
    }

    body > header,
    body > header nav ul,
    main > section:first-child > nav ul {
        align-items: stretch;
        flex-direction: column;
    }

    body > header nav a,
    main > section:first-child > nav a {
        width: 100%;
    }

    h1 {
        font-size: clamp(3.45rem, 19vw, 5.2rem);
    }

    main > section:first-child dl {
        grid-template-columns: 1fr;
    }

    #about,
    #contact {
        padding: 1.35rem;
        border-radius: var(--radius-md);
    }

    #about::after,
    #experience > article::before,
    #experience > article::after {
        display: none;
    }

    #experience > article {
        margin-left: 0;
    }

    address a {
        word-break: break-word;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0ms !important;
    }
}

@media print {
    body {
        color: #000000;
        background: #ffffff;
    }

    body::before,
    body > header,
    figcaption,
    main > section:first-child > nav {
        display: none;
    }

    main > section,
    body > footer {
        width: 100%;
        margin-top: 2rem;
    }

    article,
    #about,
    #contact {
        color: #000000;
        background: #ffffff;
        border-color: #cccccc;
        box-shadow: none;
    }
}