:root {
    --bg: #090d12;
    --line-strong: rgba(247, 241, 223, 0.28);
    --text: #f7f1df;
    --muted: rgba(247, 241, 223, 0.68);
    --faint: rgba(247, 241, 223, 0.42);
    --amber: #ffb05c;
    --teal: #75d6e4;
    --blue: #7da3ff;
    --gold: #d7b257;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
}

body::selection {
    background: var(--amber);
    color: #101216;
}

a {
    color: inherit;
}

.skip-link {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 80;
    padding: 0.55rem 0.85rem;
    border-radius: 2px;
    background: var(--text);
    color: #11151c;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transform: translateY(-200%);
    transition: transform 160ms ease;
}

.skip-link:focus {
    transform: translateY(0);
    outline: 2px solid var(--amber);
    outline-offset: 2px;
}

.site-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
}

.nav-inner,
.section-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 76px;
    position: relative;
}

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

.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    overflow: hidden;
}

.brand-mark svg {
    width: 100%;
    height: 100%;
    display: block;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-links a {
    text-decoration: none;
    transition: color 160ms ease;
}

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

.hero {
    position: relative;
    min-height: 100svh;
    overflow: hidden;
    background: #08111b;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: url("../images/hero-bg.jpg");
    background-image: image-set(
        url("../images/hero-bg.webp") type("image/webp"),
        url("../images/hero-bg.jpg") type("image/jpeg")
    );
    background-size: cover;
    background-position: center;
    transform: scale(1.015);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 42%, rgba(255, 176, 92, 0.06), transparent 24rem),
        linear-gradient(180deg, rgba(6, 10, 16, 0) 0%, rgba(6, 10, 16, 0.18) 62%, rgba(6, 10, 16, 0.55) 100%),
        linear-gradient(90deg, rgba(6, 10, 16, 0.28) 0%, rgba(6, 10, 16, 0) 44%, rgba(6, 10, 16, 0.22) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 100svh;
    margin: 0 auto;
    display: grid;
    justify-items: center;
    align-content: center;
    padding: 8rem 0 5rem;
    text-align: center;
}

.hero-copy {
    width: min(900px, 100%);
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    max-width: 920px;
    margin: 0 auto 1.35rem;
    font-size: clamp(3.7rem, 7.2vw, 7rem);
    line-height: 0.98;
    font-weight: 500;
    letter-spacing: 0;
}

.hero-copy p {
    width: min(620px, 100%);
    margin: 0 auto;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.7;
}

.not-found-copy .section-label {
    justify-content: center;
}

.not-found-copy h1 {
    max-width: 760px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2.2rem;
}

.button {
    position: relative;
    min-width: 132px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.62rem;
    padding: 0.72rem 1.15rem;
    border-radius: 4px;
    border: 1px solid transparent;
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    overflow: visible;
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

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

.button-primary {
    border-color: rgba(247, 241, 223, 0.34);
    background: rgba(247, 241, 223, 0.035);
    color: rgba(247, 241, 223, 0.92);
}

.button-primary:hover {
    border-color: rgba(247, 241, 223, 0.54);
    background: rgba(247, 241, 223, 0.055);
}

.button-primary::after {
    content: "";
    position: absolute;
    top: -3px;
    left: 12px;
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: #f7f1df;
    box-shadow:
        0 0 8px rgba(247, 241, 223, 0.95),
        0 0 18px rgba(255, 176, 92, 0.55);
    pointer-events: none;
    animation: buttonOrbit 4.2s linear infinite;
}

.button-primary:hover::after {
    animation-duration: 2.8s;
}

.button-primary svg {
    opacity: 0.82;
    transition: transform 180ms ease, opacity 180ms ease;
}

.button-primary:hover svg {
    opacity: 1;
    transform: translateX(3px);
}

@keyframes buttonOrbit {
    0% {
        top: -3px;
        left: 12px;
    }
    23% {
        top: -3px;
        left: calc(100% - 12px);
    }
    25% {
        top: 8px;
        left: calc(100% + 3px);
    }
    48% {
        top: calc(100% - 8px);
        left: calc(100% + 3px);
    }
    50% {
        top: calc(100% + 3px);
        left: calc(100% - 12px);
    }
    73% {
        top: calc(100% + 3px);
        left: 12px;
    }
    75% {
        top: calc(100% - 8px);
        left: -3px;
    }
    98% {
        top: 8px;
        left: -3px;
    }
    100% {
        top: -3px;
        left: 12px;
    }
}

.button svg,
.project-link svg,
.social-link svg {
    width: 16px;
    height: 16px;
}

.dark-section {
    position: relative;
    background: var(--bg);
}

.section-inner {
    position: relative;
    z-index: 2;
    padding: 5.8rem 0;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 1.2rem;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.section-label::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--amber);
}

.section-heading {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(280px, 0.55fr);
    gap: 3rem;
    align-items: end;
    margin-bottom: 4rem;
}

h2 {
    max-width: 760px;
    margin-bottom: 0;
    font-size: 3.5rem;
    line-height: 1.05;
    font-weight: 400;
    letter-spacing: -0.015em;
}

.section-heading p {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 1.02rem;
    font-weight: 300;
    line-height: 1.65;
    letter-spacing: 0.005em;
    max-width: 38ch;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4.5rem 3.5rem;
}

.project-card {
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 1.6rem 0 0;
    border-top: 1px solid rgba(247, 241, 223, 0.12);
}

.project-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.4rem;
    color: var(--faint);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.project-status {
    padding: 0;
    color: var(--muted);
    white-space: nowrap;
}

.project-card h3 {
    max-width: 420px;
    margin-bottom: 1rem;
    font-size: 2.05rem;
    line-height: 1.1;
    font-weight: 400;
    letter-spacing: -0.012em;
}

.project-card p {
    margin-bottom: 1.3rem;
    color: var(--muted);
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.7;
    letter-spacing: 0.005em;
    max-width: 46ch;
}

.project-points {
    display: grid;
    gap: 0.7rem;
    margin: 0.4rem 0 1.7rem;
    padding: 0;
    list-style: none;
    color: rgba(247, 241, 223, 0.74);
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.6;
    letter-spacing: 0.005em;
}

.project-points li {
    display: grid;
    grid-template-columns: 16px 1fr;
    gap: 0.5rem;
}

.project-points li::before {
    content: "";
    width: 6px;
    height: 6px;
    margin-top: 0.55rem;
    background: var(--accent, var(--amber));
}

.project-link {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    transition: opacity 160ms ease;
}

.project-link:hover {
    opacity: 0.85;
}

.project-link-icon {
    position: relative;
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    color: var(--accent, var(--amber));
    flex-shrink: 0;
}

.project-link-icon svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.project-link-pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid currentColor;
    opacity: 0;
    pointer-events: none;
    animation: linkPulse 2.6s ease-out infinite;
}

@keyframes linkPulse {
    0%   { transform: scale(0.85); opacity: 0.55; }
    80%  { transform: scale(1.55); opacity: 0; }
    100% { transform: scale(1.55); opacity: 0; }
}

.project-link-arrow {
    transition: transform 260ms cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: center;
}

.project-link:hover .project-link-arrow {
    transform: translateX(3px);
}

.project-link:hover .project-link-pulse {
    animation-duration: 1.6s;
}

@media (prefers-reduced-motion: reduce) {
    .button-primary::after {
        animation: none;
        top: -3px;
        left: calc(100% - 12px);
    }
    .button-primary svg {
        transition: none;
    }
    .project-link-pulse { animation: none; opacity: 0.35; }
    .project-link-arrow { transition: none; }
}

.project-course {
    --accent: var(--amber);
}

.project-studio {
    --accent: var(--teal);
}

.project-avatar {
    --accent: var(--blue);
}

.project-linguist {
    --accent: var(--gold);
}

.project-course .project-status { color: var(--amber); }
.project-studio .project-status { color: var(--teal); }
.project-avatar .project-status { color: var(--blue); }
.project-linguist .project-status { color: var(--gold); }

.system-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.75fr) minmax(320px, 1fr);
    gap: 4rem;
    align-items: start;
}

.system-copy p {
    max-width: 580px;
    color: var(--muted);
}

.system-list {
    display: grid;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.system-list li {
    display: grid;
    grid-template-columns: 118px 1fr;
    gap: 1rem;
    padding: 0;
}

.system-list strong {
    font-weight: 700;
}

.system-list span {
    color: var(--muted);
}

.contact-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2rem;
    align-items: end;
    padding: 0;
}

.contact-panel h2 {
    margin-bottom: 0.75rem;
}

.contact-panel p {
    max-width: 600px;
    margin-bottom: 0;
    color: var(--muted);
}

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
}

.social-link {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.68rem 0.9rem;
    border: 1px solid rgba(247, 241, 223, 0.22);
    border-radius: 2px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
}

.language-switcher {
    position: relative;
    z-index: 60;
    color: var(--text);
    opacity: 0.72;
    transition: opacity 160ms ease;
}

.language-switcher:hover,
.language-switcher:focus-within {
    opacity: 1;
}

.language-toggle {
    min-width: 38px;
    min-height: 32px;
    border: 0;
    border-radius: 2px;
    color: var(--muted);
    background: rgba(8, 12, 18, 0.36);
    cursor: pointer;
    font: inherit;
    font-size: 0.74rem;
    font-weight: 800;
}

.language-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    display: none;
    min-width: 154px;
    padding: 0.35rem;
    border: 0;
    border-radius: 6px;
    background: rgba(8, 12, 18, 0.9);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.36);
}

.language-switcher.is-open .language-menu {
    display: grid;
}

.language-option {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.55rem 0.6rem;
    border: 0;
    border-radius: 6px;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-size: 0.8rem;
    text-align: left;
}

.language-option:hover,
.language-option.is-active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
}

.language-option span:last-child {
    color: var(--faint);
    font-size: 0.72rem;
    font-weight: 800;
}

@media (max-width: 900px) {
    .nav-links {
        display: none;
    }

    h1 {
        font-size: 3.6rem;
    }

    h2 {
        font-size: 2.55rem;
    }

    .section-heading,
    .project-grid,
    .system-layout,
    .contact-panel {
        grid-template-columns: 1fr;
    }

    .system-list li {
        grid-template-columns: 1fr;
        gap: 0.24rem;
    }

    .contact-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .nav-inner,
    .section-inner,
    .hero-content {
        width: min(100% - 24px, 1180px);
    }

    .hero-bg {
        background-position: 61% center;
    }

    .hero-content {
        padding: 6.5rem 0 4rem;
    }

    h1 {
        font-size: clamp(2.65rem, 12vw, 3rem);
    }

    h2 {
        font-size: 2.15rem;
    }

    .hero-copy p {
        font-size: 1rem;
        line-height: 1.62;
    }

    .hero-actions,
    .contact-actions {
        flex-direction: column;
    }

    .hero-actions {
        width: min(100%, 340px);
        margin-left: auto;
        margin-right: auto;
    }

    .button,
    .social-link {
        width: 100%;
    }

    .hero-actions .button {
        width: auto;
    }

    .project-card,
    .contact-panel {
        padding: 0;
    }

    .project-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.55rem;
        margin-bottom: 1.4rem;
    }
}
