:root {
    --background: #f8f8f6;
    --surface: #ffffff;
    --surface-soft: #f1f2ef;

    --text: #202124;
    --text-secondary: #44464d;
    --muted: #6b6e76;

    --border: #deded9;

    --accent: #46628a;
    --accent-hover: #314a70;

    --tag-background: #efefec;
    --tag-text: #55585f;

    --button-background: #202124;
    --button-text: #ffffff;

    --header-background: rgba(248, 248, 246, 0.94);

    --max-width: 1100px;
}


html[data-theme="dark"] {
    --background: #121416;
    --surface: #191c20;
    --surface-soft: #171a1e;

    --text: #f1f2f4;
    --text-secondary: #c9ccd1;
    --muted: #9ca0a7;

    --border: #2c3035;

    --accent: #91acd5;
    --accent-hover: #b3c8e8;

    --tag-background: #22262b;
    --tag-text: #c4c7cc;

    --button-background: #f1f2f4;
    --button-text: #121416;

    --header-background: rgba(18, 20, 22, 0.94);
}


/* RESET */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


html {
    scroll-behavior: smooth;
    scroll-padding-top: 88px;
}


body {
    min-height: 100vh;

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

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    font-size: 16px;
    line-height: 1.65;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}


body.menu-open {
    overflow: hidden;
}


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


button {
    font: inherit;
}


img {
    max-width: 100%;
}


/* HEADER */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    background: var(--header-background);
    border-bottom: 1px solid var(--border);

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


.nav-container {
    width: min(90%, var(--max-width));
    min-height: 70px;
    margin: 0 auto;

    display: flex;
    align-items: center;
    gap: 24px;
}


.logo-mark {
    width: 40px;
    height: 40px;

    flex-shrink: 0;

    display: grid;
    place-items: center;

    border-radius: 50%;

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

    font-size: 0.75rem;
    font-weight: 750;
    letter-spacing: 0.02em;
}


.desktop-nav {
    margin-left: auto;

    display: flex;
    align-items: center;
    gap: 25px;
}


.desktop-nav a {
    color: var(--muted);

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


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


.nav-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}


.icon-button {
    width: 37px;
    height: 37px;

    display: grid;
    place-items: center;

    padding: 0;

    border: 1px solid var(--border);
    border-radius: 50%;

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

    cursor: pointer;
}


.icon-button:hover {
    background: var(--surface);
}


.menu-toggle {
    display: none;
}


.mobile-menu {
    width: min(90%, var(--max-width));

    margin: 0 auto;
    padding: 8px 0 18px;
}


.mobile-menu a {
    display: block;

    padding: 11px 0;

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

    color: var(--muted);
    font-size: 0.94rem;
}


.mobile-menu a:last-child {
    border-bottom: none;
}


/* PAGE */

main {
    width: min(90%, var(--max-width));
    margin: 0 auto;
}


/* HERO */

.hero {
    min-height: 630px;

    padding:
        clamp(75px, 10vw, 110px) 0 clamp(85px, 11vw, 115px);

    display: grid;
    grid-template-columns:
        minmax(0, 1.35fr) minmax(250px, 0.7fr);

    align-items: center;

    gap: clamp(40px, 7vw, 80px);
}


.hero-copy {
    max-width: 720px;

    position: relative;
    z-index: 2;
}


.role {
    margin-bottom: 18px;

    color: var(--accent);

    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        monospace;

    font-size: clamp(0.82rem, 1.3vw, 0.95rem);
    font-weight: 600;

    letter-spacing: 0.10em;
    line-height: 1.4;
}


.hero h1 {
    font-size: clamp(3rem, 6.5vw, 4.6rem);

    line-height: 1;
    font-weight: 650;

    letter-spacing: -0.055em;
}


.hero-heading {
    max-width: 650px;

    margin-top: 23px;

    color: var(--text-secondary);

    font-size: clamp(1.35rem, 3vw, 1.85rem);

    line-height: 1.35;
    font-weight: 500;

    letter-spacing: -0.025em;
}


.hero-description {
    max-width: 680px;

    margin-top: 24px;

    color: var(--muted);

    font-size: 1rem;
}


.hero-actions {
    margin-top: 31px;

    display: flex;
    align-items: center;

    gap: 22px;
}


.button {
    min-height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 9px 17px;

    border-radius: 6px;

    font-size: 0.87rem;
    font-weight: 600;
}


.primary-button {
    background: var(--button-background);
    color: var(--button-text);
}


.text-link {
    font-size: 0.88rem;
    font-weight: 600;
}


/* HERO CLOUD VISUAL */

.hero-visual {
    min-width: 0;

    display: flex;
    align-items: center;
    justify-content: flex-end;

    pointer-events: none;
}


.cloud-svg {
    display: block;

    width: 118%;
    max-width: 470px;
    height: auto;

    color: var(--accent);

    opacity: 0.28;

    transform-origin: center;

    animation:
        cloud-float 9s ease-in-out infinite;
}


.orbit {
    fill: none;

    stroke: currentColor;
    stroke-width: 1;

    opacity: 0.26;
}


.orbit-large {
    opacity: 0.13;
}


.cloud-outline {
    fill: none;

    stroke: currentColor;
    stroke-width: 2.1;
}


.network-line {
    stroke: currentColor;
    stroke-width: 1.5;

    opacity: 0.48;
}


.network-node {
    fill: var(--background);

    stroke: currentColor;
    stroke-width: 2;

    animation:
        network-node-pulse 4.8s ease-in-out infinite;
}


.network-node:nth-of-type(even) {
    animation-delay: -2.4s;
}


@keyframes cloud-float {

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

    50% {
        transform: translateY(-6px);
    }

}


@keyframes network-node-pulse {

    0%,
    100% {
        opacity: 0.65;
    }

    50% {
        opacity: 1;
    }

}


/* GENERAL SECTIONS */

.section {
    padding: clamp(65px, 8vw, 88px) 0;

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


.section-title {
    margin-bottom: 42px;
}


.section-title h2 {
    font-size: clamp(1.55rem, 3vw, 1.85rem);

    font-weight: 630;

    letter-spacing: -0.03em;
}


.section-title>p {
    max-width: 640px;

    margin-top: 9px;

    color: var(--muted);

    font-size: 0.92rem;
}


.lead {
    color: var(--text-secondary);

    font-size: 1.04rem;
}


/* ABOUT */

.about-grid {
    display: grid;

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

    gap: clamp(40px, 7vw, 75px);

    align-items: start;
}


.about-image {
    display: block;

    width: 100%;

    aspect-ratio: 4 / 5;

    object-fit: cover;
    object-position: center 24%;

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

    filter:
        contrast(1.02) saturate(1.01) brightness(1.01);
}


.about-content {
    max-width: 670px;
}


.about-content p+p {
    margin-top: 19px;
}


.about-content p:not(.lead) {
    color: var(--muted);
}


.about-panels {
    margin-top: 24px;

    display: grid;

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

    gap: 16px;
}


.about-panel {
    padding: 18px;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: 12px;
}


.about-panel h3 {
    font-size: 0.96rem;

    font-weight: 620;
}


.about-panel p {
    margin-top: 8px;

    color: var(--muted);

    font-size: 0.88rem;
}


/* WORK */

.work-grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(320px, 1fr));

    gap: 22px;
}


.work-card {
    min-height: 420px;

    display: flex;
    flex-direction: column;

    padding: 29px;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: 12px;
}


.work-meta {
    color: var(--accent);

    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        monospace;

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

    letter-spacing: 0.08em;
}


.work-card h3 {
    margin-top: 17px;

    font-size: 1.22rem;
    font-weight: 630;
}


.work-description {
    margin-top: 13px;

    color: var(--muted);

    font-size: 0.92rem;
}


.work-subsection {
    margin-top: 18px;
}


.work-subsection h4 {
    color: var(--text);

    font-size: 0.86rem;
    font-weight: 620;
}


.work-points {
    margin-top: 9px;

    padding-left: 18px;

    color: var(--muted);

    font-size: 0.89rem;
}


.work-points li+li {
    margin-top: 6px;
}


.tech-tags {
    margin-top: 10px;

    display: flex;
    flex-wrap: wrap;

    gap: 7px;
}


.tech-tags span {
    padding: 5px 8px;

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

    border-radius: 4px;

    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        monospace;

    font-size: 0.65rem;
}


.work-link {
    margin-top: auto;

    padding-top: 24px;

    color: var(--accent);

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


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


/* CREDENTIALS */

.credentials-grid {
    display: grid;

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

    gap: 18px;
}


.credential-card {
    min-width: 0;

    overflow: hidden;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: 12px;
}


.credential-image-link {
    min-height: 165px;

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

    padding: 14px;

    background: var(--surface-soft);

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

    overflow: hidden;
}


.credential-image {
    display: block;

    width: 100%;

    max-height: 145px;

    object-fit: contain;
}


.credential-content {
    padding: 21px;
}


.credential-provider {
    color: var(--muted);

    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        monospace;

    font-size: 0.61rem;

    letter-spacing: 0.07em;
}


.credential-content h3 {
    margin-top: 8px;

    font-size: 1rem;
}


.credential-content p {
    margin-top: 5px;

    color: var(--muted);

    font-size: 0.82rem;
}


.credential-link {
    display: inline-block;

    margin-top: 16px;

    color: var(--accent);

    font-size: 0.81rem;
    font-weight: 600;
}


/* CONTACT */

.contact-section {
    padding-top: clamp(70px, 10vw, 110px);
    padding-bottom: clamp(80px, 11vw, 120px);
}


.contact-content {
    max-width: 730px;
}


.contact-label {
    color: var(--accent);

    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        monospace;

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

    letter-spacing: 0.09em;
}


.contact-content h2 {
    margin-top: 14px;

    font-size: clamp(1.8rem, 4vw, 2.6rem);

    line-height: 1.2;

    letter-spacing: -0.04em;
}


.contact-content>p:not(.contact-label) {
    max-width: 610px;

    margin-top: 18px;

    color: var(--muted);
}


.contact-links {
    margin-top: 27px;

    display: flex;
    flex-wrap: wrap;

    gap: 24px;
}


.contact-links a {
    color: var(--accent);

    font-size: 0.9rem;
    font-weight: 600;
}


/* FOOTER */

.footer {
    width: min(90%, var(--max-width));

    margin: 0 auto;

    padding: 29px 0 42px;

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

    display: flex;
    justify-content: flex-end;

    gap: 20px;

    color: var(--muted);

    font-size: 0.7rem;
}


/* THEME TRANSITIONS */

body,
.site-header,
.about-panel,
.work-card,
.credential-card,
.logo-mark,
.icon-button,
.tech-tags span {
    transition:
        background-color 180ms ease,
        color 180ms ease,
        border-color 180ms ease;
}


/* TABLET */

@media (max-width: 900px) {

    .desktop-nav {
        display: none;
    }


    .menu-toggle {
        display: grid;
    }


    .hero {
        min-height: auto;

        grid-template-columns: 1fr;

        gap: 26px;
    }


    .hero-visual {
        width: 100%;
        max-width: 430px;

        margin-left: auto;
    }


    .cloud-svg {
        width: 100%;
    }


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


    .credential-card {
        max-width: 680px;
    }

}


/* MOBILE */

@media (max-width: 650px) {

    .nav-container {
        min-height: 64px;
    }


    .hero {
        padding-top: 70px;
        padding-bottom: 80px;
    }


    .hero h1 {
        font-size: clamp(2.7rem, 14vw, 3.5rem);
    }


    .hero-heading {
        font-size: 1.28rem;
    }


    .hero-description {
        font-size: 0.95rem;
    }


    .hero-actions {
        flex-direction: column;
        align-items: flex-start;

        gap: 17px;
    }


    .hero-visual {
        width: 100%;
        max-width: 340px;

        margin: -4px auto 0;
    }


    .cloud-svg {
        width: 100%;

        opacity: 0.24;
    }


    .section {
        padding: 57px 0;
    }


    .section-title {
        margin-bottom: 32px;
    }


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

        gap: 31px;
    }


    .about-image-wrap {
        max-width: 250px;
    }


    .about-panels {
        grid-template-columns: 1fr;
    }


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


    .work-card {
        min-height: auto;

        padding: 23px;
    }


    .footer {
        flex-direction: column;

        align-items: flex-end;

        gap: 7px;
    }

}


/* SMALL PHONES */

@media (max-width: 380px) {

    main,
    .nav-container,
    .mobile-menu,
    .footer {
        width: 92%;
    }


    .hero h1 {
        font-size: 2.45rem;
    }

}


/* ACCESSIBILITY */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }


    .cloud-svg,
    .network-node {
        animation: none !important;
    }


    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }

}