:root {
    --bg: #f5f4ef;
    --bg-deep: #e9e5dc;
    --panel: rgba(255, 255, 255, 0.72);
    --line: rgba(26, 32, 44, 0.18);
    --text: #10131a;
    --muted: #4d5260;
    --brand: #d14836;
    --brand-dark: #aa2d1f;
    --accent: #0f6f8b;
    --shadow: 0 24px 64px rgba(16, 19, 26, 0.12);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    position: relative;
    min-height: 100vh;
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 0% 0%, rgba(209, 72, 54, 0.18), transparent 34%),
        radial-gradient(circle at 100% 100%, rgba(15, 111, 139, 0.16), transparent 28%),
        linear-gradient(145deg, var(--bg), var(--bg-deep));
    overflow-x: hidden;
}

.bg-grid {
    position: fixed;
    inset: 0;
    z-index: -3;
    background-image:
        linear-gradient(to right, rgba(16, 19, 26, 0.06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(16, 19, 26, 0.06) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(circle at center, black 42%, transparent 90%);
}

.bg-glow {
    position: fixed;
    width: 36rem;
    height: 36rem;
    border-radius: 50%;
    z-index: -2;
    filter: blur(64px);
    opacity: 0.32;
}

.bg-glow-left {
    top: -14rem;
    left: -10rem;
    background: #ff8f7a;
}

.bg-glow-right {
    right: -12rem;
    bottom: -16rem;
    background: #4da9c4;
}

.site-header,
main,
.site-footer {
    width: min(1100px, calc(100% - 2.4rem));
    margin-inline: auto;
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.4rem 0 1rem;
}

.header-right {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.brand img {
    width: 2rem;
    height: 2rem;
}

.main-nav {
    display: inline-flex;
    gap: 1.2rem;
}

.main-nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.95rem;
    padding: 0.4rem 0.55rem;
    border-radius: 999px;
    transition: color 0.25s ease, background-color 0.25s ease;
}

.main-nav a:hover {
    color: var(--text);
    background-color: rgba(255, 255, 255, 0.65);
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    padding: 0.18rem;
    border: 1px solid rgba(26, 32, 44, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
    backdrop-filter: blur(6px);
}

.lang-btn {
    min-width: 2.4rem;
    border: 0;
    border-radius: 999px;
    padding: 0.34rem 0.62rem;
    color: var(--muted);
    background: transparent;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.75rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.lang-btn:hover {
    color: var(--text);
    background: rgba(16, 19, 26, 0.08);
}

.lang-btn.is-active {
    color: #fff;
    background: var(--text);
}

.hero {
    padding: 5.8rem 0 4.2rem;
}

.eyebrow {
    margin: 0;
    text-transform: uppercase;
    font-family: "IBM Plex Mono", monospace;
    letter-spacing: 0.14em;
    font-size: 0.78rem;
    color: var(--accent);
}

.hero h1 {
    margin: 1rem 0 0;
    font-size: clamp(2.2rem, 6vw, 4.9rem);
    line-height: 1.04;
    letter-spacing: -0.03em;
    max-width: 10.5em;
}

.lead {
    margin: 1.2rem 0 0;
    font-size: clamp(1.2rem, 2.4vw, 1.7rem);
    font-weight: 500;
    color: var(--brand-dark);
}

.sub-lead {
    margin-top: 1rem;
    max-width: 42rem;
    color: var(--muted);
    font-size: 1.07rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 0.8rem;
    margin-top: 2.2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.7rem 1.15rem;
    text-decoration: none;
    font-size: 0.94rem;
    font-weight: 500;
    border: 1px solid transparent;
    transition: transform 0.22s ease, background-color 0.22s ease, color 0.22s ease;
}

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

.btn-primary {
    background: var(--brand);
    color: #fff;
}

.btn-primary:hover {
    background: #bb3627;
}

.btn-ghost {
    border-color: var(--line);
    color: var(--text);
    background: rgba(255, 255, 255, 0.6);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.95);
}

.projects {
    padding: 1.8rem 0 5rem;
}

.section-title-wrap {
    margin-bottom: 1.3rem;
}

.section-title-wrap h2 {
    margin: 0.55rem 0 0;
    font-size: clamp(1.7rem, 4vw, 2.8rem);
    letter-spacing: -0.02em;
}

.project-card {
    display: grid;
    grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.1fr);
    gap: 1.4rem;
    align-items: stretch;
    padding: 1.1rem;
    background: var(--panel);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: var(--shadow);
    border-radius: 1.2rem;
}

.project-visual {
    border-radius: 0.9rem;
    background: linear-gradient(160deg, #1f2430, #2f3647);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.project-visual img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.project-content {
    padding: 1rem 0.6rem 1rem 0.3rem;
}

.project-tag {
    margin: 0;
    color: var(--accent);
    font-family: "IBM Plex Mono", monospace;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.76rem;
}

.project-content h3 {
    margin: 0.9rem 0 0;
    font-size: clamp(1.35rem, 2.5vw, 2rem);
}

.project-content p {
    margin: 0.9rem 0 0;
    line-height: 1.75;
    color: var(--muted);
}

.project-link {
    margin-top: 1.35rem;
    display: inline-flex;
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--text);
    padding-bottom: 0.18rem;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 1.5rem 0 2.2rem;
    color: var(--muted);
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.84rem;
}

.hero,
.projects,
.site-footer {
    animation: rise-up 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.projects {
    animation-delay: 0.12s;
}

.site-footer {
    animation-delay: 0.2s;
}

@keyframes rise-up {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 860px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .header-right {
        width: 100%;
        justify-content: space-between;
    }

    .hero {
        padding-top: 4.1rem;
    }

    .project-card {
        grid-template-columns: 1fr;
    }

    .project-content {
        padding: 0.4rem;
    }

    .site-footer {
        flex-direction: column;
        align-items: flex-start;
        padding-bottom: 1.8rem;
    }
}

@media (max-width: 540px) {
    .header-right {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.65rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        max-width: 16rem;
    }
}
