@font-face {
    font-family: 'Bodoni Moda';
    src: url('../assets/fonts/bodoni-moda-500.ttf') format('truetype');
    font-style: normal;
    font-weight: 500;
    font-display: swap;
}

:root {
    color-scheme: dark;
    font-family: Arial, Helvetica, sans-serif;
    color: #f5f5f3;
    background: #080b0e;
    --page-inset: clamp(28px, 6vw, 116px);
    --muted: #b7b9bd;
}

* { box-sizing: border-box; }

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
}

body {
    position: relative;
    isolation: isolate;
    height: 100svh;
    height: 100dvh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }
a, button { -webkit-tap-highlight-color: transparent; }

a:focus-visible, button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 6px;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: var(--page-inset);
    z-index: 5;
    padding: 12px 18px;
    color: #080b0e;
    background: #fff;
    transform: translateY(-180%);
}

.skip-link:focus { transform: translateY(0); }

.home-background, .home-background::after {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.home-background img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
}

.home-background::after {
    content: "";
    z-index: auto;
    background:
        linear-gradient(180deg, rgb(3 5 7 / 85%), transparent 25%, transparent 72%, rgb(3 5 7 / 74%)),
        linear-gradient(90deg, rgb(3 5 7 / 34%), transparent 65%);
}

.home-header {
    display: flex;
    align-items: center;
    gap: 56px;
    min-height: 112px;
    padding: max(12px, env(safe-area-inset-top)) var(--page-inset) 12px;
}

.wordmark {
    display: flex;
    align-items: center;
    gap: 13px;
    flex-shrink: 0;
    font-size: 19px;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: 1px;
}

.brand-logo {
    display: block;
    width: 240px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.wordmark-subtitle {
    display: block;
    margin-top: 9px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 2.8px;
}

.home-nav {
    display: flex;
    align-items: center;
    gap: clamp(25px, 3vw, 52px);
    margin-left: auto;
}

.home-nav a {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 44px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
    color: #c9cbce;
    transition: color 160ms ease;
}

.home-nav a::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 1px;
    content: "";
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 160ms ease;
}

.home-nav a[aria-current], .home-nav a:hover { color: #fff; }
.home-nav a[aria-current]::after, .home-nav a:hover::after { transform: scaleX(1); }

.home-language {
    display: flex;
    align-items: center;
    gap: 3px;
    color: #777e86;
    font-size: 11px;
}

.home-language button {
    min-width: 36px;
    min-height: 44px;
    padding: 0 7px;
    border: 0;
    color: #abb0b7;
    background: transparent;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.home-language button[aria-pressed="true"], .home-language button:hover { color: #fff; }

.home-main {
    display: flex;
    align-items: center;
    min-height: 0;
    padding: 0 var(--page-inset) 36px;
    outline: none;
}

.home-intro { min-width: 0; max-width: 720px; }

.home-discipline {
    margin: 0 0 26px;
    color: #c1c4c8;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 3px;
}

h1 {
    margin: 0;
    font-size: clamp(48px, 5.4vw, 92px);
    line-height: 1.06;
    font-weight: 500;
    letter-spacing: -2.8px;
}

.name-period { color: #b3b9bf; }

.home-intro h1 {
    font-family: 'Bodoni Moda', Georgia, 'Times New Roman', serif;
    font-size: clamp(54px, 5.8vw, 100px);
    font-weight: 500;
    line-height: 1.04;
    letter-spacing: -.035em;
    font-optical-sizing: auto;
}

.hero-surname { display: inline-block; font-size: 1.1em; }
.home-intro .name-period { color: #c7ae7e; }

.home-description {
    margin: 25px 0 0;
    color: #c0c3c7;
    font-size: clamp(13px, 1.1vw, 16px);
    line-height: 1.65;
    letter-spacing: .1px;
}

.projects-link {
    display: inline-flex;
    align-items: center;
    gap: 32px;
    min-height: 44px;
    margin-top: 28px;
    border-bottom: 1px solid rgb(255 255 255 / 45%);
    font-size: 12px;
    font-weight: 500;
    transition: border-color 160ms ease;
}

.projects-link svg { width: 20px; height: 20px; }
.projects-link:hover { border-color: #fff; }

.home-footer {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 12px var(--page-inset) max(30px, env(safe-area-inset-bottom));
}

.home-socials { display: flex; gap: 25px; }

.home-socials a {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    color: #c5c8cc;
    font-size: 11px;
}

.home-socials svg { width: 16px; height: 16px; }
.home-socials a:hover { color: #fff; }

.home-copyright {
    margin: 0 0 0 auto;
    color: #a7acb3;
    font-size: 10px;
    letter-spacing: .3px;
}

@media (max-width: 950px) {
    .home-header { gap: 24px; min-height: 96px; }
    .home-nav { gap: 24px; }
    .home-nav a { font-size: 11px; }
    .home-copyright { margin-left: auto; margin-right: 0; font-size: 9px; }
    .home-socials a span { display: none; }
    h1 { font-size: clamp(48px, 6.5vw, 64px); }
    .home-intro h1 { font-size: clamp(48px, 6.3vw, 66px); }
    .wordmark { gap: 10px; font-size: 16px; }
    .brand-logo { width: 210px; }
}

@media (max-width: 700px) and (orientation: portrait) {
    :root { --page-inset: 24px; }
    .home-header {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 13px 16px;
        min-height: 0;
        padding-top: max(21px, env(safe-area-inset-top));
        padding-bottom: 0;
    }
    .wordmark { font-size: 12px; gap: 9px; }
    .brand-logo { width: 190px; }
    .wordmark-subtitle { margin-top: 6px; font-size: 8px; letter-spacing: 2.2px; }
    .home-language { grid-column: 2; grid-row: 1; }
    .home-nav {
        grid-column: 1 / -1;
        justify-content: space-between;
        gap: 12px;
        width: 100%;
        margin: 0;
        border-bottom: 1px solid rgb(255 255 255 / 15%);
    }
    .home-nav a { min-height: 42px; font-size: 10px; letter-spacing: 1.1px; }
    .home-nav a::after { bottom: -1px; }
    .home-main {
        align-items: flex-start;
        padding-top: clamp(24px, 4dvh, 40px);
        padding-bottom: 12px;
    }
    .home-discipline { margin-bottom: 17px; font-size: 8px; letter-spacing: 2.2px; }
    h1 { font-size: clamp(35px, 10.2vw, 58px); line-height: 1.06; letter-spacing: -1.5px; }
    .home-intro h1 { font-size: clamp(34px, 10.5vw, 58px); }
    .home-description { max-width: 215px; margin-top: 16px; font-size: 12px; line-height: 1.65; }
    .projects-link { gap: 22px; margin-top: 14px; font-size: 11px; }
    .home-background::after {
        background: linear-gradient(180deg, rgb(3 5 7 / 25%), transparent 50%, transparent 76%, rgb(3 5 7 / 90%));
    }
    .home-footer { flex-wrap: nowrap; justify-content: space-between; gap: 16px; padding-top: 0; padding-bottom: max(18px, env(safe-area-inset-bottom)); }
    .home-socials { gap: 22px; }
    .home-socials a { min-width: 24px; justify-content: center; }
    .home-copyright { margin: 0 0 0 auto; font-size: 8px; }
}

@media (max-height: 700px) and (orientation: portrait) {
    .home-main { padding-top: 23px; }
    .home-discipline { margin-bottom: 12px; }
    .home-description { margin-top: 12px; }
    .projects-link { margin-top: 6px; }
    h1 { font-size: clamp(32px, 10vw, 40px); }
    .home-intro h1 { font-size: clamp(30px, 9.7vw, 39px); }
    .home-description { max-width: 190px; }
}

@media (max-height: 520px) and (orientation: landscape) {
    .home-header { min-height: 72px; }
    .wordmark { font-size: 14px; }
    .brand-logo { width: 180px; }
    .wordmark-subtitle { font-size: 7px; margin-top: 5px; }
    .home-main { padding-bottom: 0; }
    .home-discipline { margin-bottom: 12px; font-size: 9px; }
    h1 { font-size: clamp(32px, 7vh, 48px); letter-spacing: -1px; }
    .home-intro h1 { font-size: clamp(32px, 7vh, 48px); }
    .home-description { margin-top: 12px; font-size: 12px; }
    .projects-link { margin-top: 8px; min-height: 36px; }
    .home-footer { padding-top: 0; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}
