@font-face {
    font-family: Figtree;
    src: url("assets/fonts/figtree-regular.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: Figtree;
    src: url("assets/fonts/figtree-semibold.woff2") format("woff2");
    font-weight: 600;
    font-display: swap;
}

:root {
    color-scheme: dark;
    --background: #0b0e14;
    --surface: #141c28;
    --line: #303b4d;
    --text: #f0f4fb;
    --muted: #adbbce;
    --subtle: #93a4bc;
    --accent: #83d4fc;
    --accent-light: #b5e8ff;
    --available: #76dbb2;
    --preview-top: #293548;
    --preview-bottom: #384355;
    --preview-frame: #0c1220;
    --preview-shadow: #080c1599;
    --font: Figtree, "Segoe UI", sans-serif;
    --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
    --page-gutter: clamp(1.125rem, 5vw, 4rem);
    --section-space: clamp(2.75rem, 6vw, 5.75rem);
    --column-gap: clamp(1.5rem, 6vw, 6rem);
    --content-width: 77rem;
    --transition: 160ms ease-out;
}

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

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.55;
}

h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }

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

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

a, button {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: color var(--transition), background-color var(--transition);
}

a:focus-visible, button:focus-visible {
    outline: 2px solid var(--accent-light);
    outline-offset: 4px;
    border-radius: 3px;
}

::selection { background: var(--accent); color: var(--background); }

html { scrollbar-color: var(--subtle) var(--background); }

.container {
    width: min(var(--content-width), calc(100% - var(--page-gutter) * 2));
    margin-inline: auto;
}

.skip-link {
    position: fixed;
    z-index: 2;
    inset: 0.75rem auto auto 0.75rem;
    padding: 0.625rem 1rem;
    background: var(--accent);
    color: var(--background);
    transform: translateY(calc(-100% - 1rem));
}

.skip-link:focus { transform: none; }

.icon-library { position: absolute; width: 0; height: 0; }

.icon {
    width: 1.125em;
    height: 1.125em;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.site-header {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.25rem 0.625rem;
    padding-block: 0.7rem 0.45rem;
    border-bottom: 1px solid var(--line);
}

.brand {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-self: start;
    gap: 0.375rem;
    min-height: 44px;
    margin-inline-start: -5px;
    font-weight: 600;
    line-height: 1.15;
}

.brand img { flex: none; }

.brand:hover { color: var(--accent-light); }

.site-nav, .project-nav, .social-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 1.4rem;
    font-size: 0.9375rem;
}

.site-nav {
    grid-column: 1;
    gap: 0 clamp(0.55rem, 3.8vw, 1.4rem);
}

.site-nav a, .project-nav a, .social-links a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--muted);
    white-space: nowrap;
}

.site-nav a:hover, .project-nav a:hover, .social-links a:hover {
    color: var(--accent-light);
}

.lang-switch:not([hidden]) {
    grid-row: 2;
    grid-column: 2;
    display: inline-flex;
    align-items: center;
    justify-self: end;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.lang-switch button {
    min-width: 40px;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: 5px;
    color: var(--muted);
    background: transparent;
    font: 600 0.8125rem var(--font);
    cursor: pointer;
}

.lang-switch button[aria-pressed="true"] {
    color: var(--background);
    background: var(--accent);
}

.lang-switch button[aria-pressed="false"]:hover {
    color: var(--text);
    background: var(--surface);
}

.hero {
    display: grid;
    gap: 1.35rem;
    padding-block: clamp(2.5rem, 7vw, 6.5rem) var(--section-space);
}

.hero h1 {
    align-self: end;
    font-size: clamp(2.65rem, 7.15vw, 6rem);
    font-weight: 600;
    line-height: 1.02;
    letter-spacing: -0.04em;
    text-wrap: balance;
}

.hero h1 span { display: block; }

.hero-accent { color: var(--accent); }

.hero-intro { align-self: end; }

.hero-role { font-size: clamp(1.0625rem, 1.55vw, 1.25rem); font-weight: 600; }

.hero-desc {
    max-width: 42ch;
    margin-top: 0.45rem;
    color: var(--muted);
}

.hero-actions, .project-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.125rem;
}

.hero-actions { margin-top: 1.375rem; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    min-height: 44px;
    padding-inline: 0.9rem;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 600;
}

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

.button-primary:hover { background: var(--accent-light); }

.availability {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--muted);
    font-size: 0.875rem;
}

.availability::before {
    content: "";
    width: 0.4rem;
    height: 0.4rem;
    flex: none;
    border-radius: 50%;
    background: var(--available);
}

.section, .site-footer { border-top: 1px solid var(--line); }

.section, .project, .site-footer { scroll-margin-top: 1rem; }

.section-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0 1rem;
    padding-block: 0.875rem;
}

.section-heading h2, .site-footer h2 {
    font-size: clamp(1.35rem, 2.25vw, 1.625rem);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.project-nav { gap: 0 1.1rem; }

.project-nav .icon { color: var(--accent); }

.project {
    display: grid;
    align-items: start;
    gap: 1.5rem var(--column-gap);
    padding-block: 1.25rem var(--section-space);
}

.project + .project {
    border-top: 1px solid var(--line);
    padding-top: var(--section-space);
}

.project-copy h3 {
    color: var(--text);
    font-size: clamp(3.25rem, 6.1vw, 5rem);
    font-weight: 600;
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.project-lead {
    margin-top: 1rem;
    font-size: clamp(1.35rem, 2.5vw, 2rem);
    font-weight: 600;
    line-height: 1.18;
    letter-spacing: -0.023em;
    text-wrap: balance;
}

.project-description {
    max-width: 48ch;
    margin-top: 0.85rem;
    color: var(--muted);
}

.technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.8rem;
    margin: 1.1rem 0 0.7rem;
    padding: 0;
    color: var(--subtle);
    font: 0.8125rem/1.5 var(--mono);
    list-style: none;
}

.technologies li + li { border-inline-start: 1px solid var(--line); padding-inline-start: 0.8rem; }

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 44px;
    color: var(--accent);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 0.24em;
    transition: color var(--transition), text-decoration-color var(--transition);
}

.text-link:hover { color: var(--accent-light); text-decoration-color: currentColor; }

.text-link-secondary { color: var(--muted); }

.product-preview {
    min-width: 0;
    padding: clamp(1rem, 3vw, 2.35rem) clamp(0.9rem, 3.4vw, 2.65rem);
    border-radius: 14px;
    background: linear-gradient(150deg, var(--preview-top), var(--preview-bottom));
}

.screenshots {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: clamp(0.75rem, 2.75vw, 2rem);
    max-width: 27rem;
    margin-inline: auto;
}

.screenshots a {
    display: block;
    padding: clamp(3px, 0.55vw, 7px);
    border-radius: 13px;
    background: var(--preview-frame);
    box-shadow: 0 12px 24px var(--preview-shadow);
}

.screenshots a:hover { background: var(--accent); }

.screenshots a + a { margin-top: clamp(0.8rem, 2.3vw, 1.9rem); }

.screenshots img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.project-status {
    margin-top: 0.8rem;
    color: var(--accent);
    font: 0.8125rem/1.5 var(--mono);
}

.architecture h4 {
    margin-bottom: 0.75rem;
    color: var(--text);
    font-size: 1.125rem;
    font-weight: 600;
}

.architecture dl > div, .stack-list > div {
    border-top: 1px solid var(--line);
    padding-block: 0.95rem;
}

.architecture dt, .stack-list dt { color: var(--text); font-weight: 600; }

.architecture dd, .stack-list dd {
    max-width: 68ch;
    margin-top: 0.3rem;
    color: var(--muted);
}

.stack { padding-bottom: calc(var(--section-space) * 0.8); }

.stack-list { margin-top: 0.75rem; }

.site-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 0.5rem 2rem;
    padding-block: 1.875rem 2.25rem;
}

.footer-email { overflow-wrap: anywhere; }

@media (min-width: 42rem) {
    .site-header {
        grid-template-columns: 1fr auto auto;
        gap: 1.75rem;
        padding-block: 0.95rem;
    }

    .brand { grid-column: 1; }
    .site-nav { grid-column: 2; }
    .lang-switch:not([hidden]) { grid-row: 1; grid-column: 3; }

    .stack-list > div {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
        align-items: baseline;
        gap: 1rem var(--column-gap);
    }

    .stack-list dd { margin: 0; }
}

@media (min-width: 49rem) {
    .project {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.42fr);
    }

    .lyape { align-items: center; }
}

@media (min-width: 61rem) {
    .hero {
        grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
        column-gap: var(--column-gap);
    }
}

@media (prefers-reduced-motion: reduce) {
    a, button { transition: none; }
}
