@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 300 500;
    font-display: swap;
    src: url('../fonts/dm-sans-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD, U+02E0-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 300 500;
    font-display: swap;
    src: url('../fonts/dm-sans-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'DM Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/dm-mono-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD, U+02E0-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'DM Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/dm-mono-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Instrument Serif';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/instrument-serif-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD, U+02E0-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Instrument Serif';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/instrument-serif-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color-scheme: light;
    scroll-behavior: smooth;
    hanging-punctuation: first last;
}

body {
    --text: #000;
    --secondary: #3d3d3d;
    --tertiary: #737373;
    --rule: #e4e4e4;
    --link: #0055d4;
    --select: rgba(0, 85, 212, 0.10);
    --tech-hover-bg: rgba(0, 85, 212, 0.05);
    --photo-shadow: rgba(0, 0, 0, 0.06);

    background: #fff;
    color: var(--text);
    font-family: 'DM Sans', system-ui, sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.55;
}

::selection { background: var(--select); }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 2px; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

.page {
    max-width: 520px;
    margin: 0 auto;
    padding: clamp(72px, 14vh, 180px) 24px clamp(48px, 8vh, 96px);
    position: relative;
    z-index: 1;
}

@keyframes reveal {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

[data-reveal] {
    animation: reveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: calc(var(--d, 0) * 1ms);
}

@supports (scrollbar-width: thin) {
    html { scrollbar-width: thin; scrollbar-color: var(--rule) transparent; }
}
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--tertiary); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
    [data-reveal] { opacity: 1; transform: none; }
}

header {
    display: grid;
    grid-template-columns: 104px 1fr;
    gap: 28px;
    align-items: center;
    margin-bottom: 56px;
}

.photo-wrap {
    perspective: 600px;
    width: 104px;
    height: 104px;
    position: relative;
}

.photo {
    width: 104px;
    height: 104px;
    border-radius: 24px;
    object-fit: cover;
    display: block;
    box-shadow: 0 4px 20px var(--photo-shadow);
    transition: box-shadow 0.4s cubic-bezier(0.03, 0.98, 0.52, 0.99);
    will-change: transform;
}

@keyframes tracking {
    from { letter-spacing: -0.06em; opacity: 0; }
    to { letter-spacing: -0.025em; opacity: 1; }
}

.name {
    font-family: 'Instrument Serif', Georgia, serif;
    font-weight: 400;
    font-size: clamp(2rem, 5vw, 2.75rem);
    line-height: 1.08;
    letter-spacing: -0.025em;
    text-rendering: optimizeLegibility;
    animation: tracking 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 60ms;
}

.meta {
    font-size: 0.875rem;
    font-weight: 300;
    color: var(--secondary);
    margin-top: 6px;
}

.meta a {
    text-decoration: none;
    background-image: linear-gradient(var(--link), var(--link));
    background-size: 100% 1.5px;
    background-position: 0% 100%;
    background-repeat: no-repeat;
    transition: background-size 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.meta a:hover { background-size: 0% 1.5px; }

.about {
    font-size: 0.9375rem;
    font-weight: 300;
    color: var(--secondary);
    line-height: 1.75;
    text-wrap: balance;
}

.stack {
    font-family: 'DM Mono', monospace;
    font-size: 0.8125rem;
    color: var(--tertiary);
    line-height: 2;
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--rule);
    display: flex;
    flex-wrap: wrap;
    gap: 0 4px;
}

.stack span {
    padding: 2px 6px;
    border-radius: 4px;
    transition: color 0.2s, background-color 0.2s;
    cursor: default;
    white-space: nowrap;
}

.stack span:not(:last-child)::after {
    content: ' \00b7';
    color: var(--tertiary);
    margin-left: 2px;
}

.stack span:hover {
    color: var(--secondary);
    background-color: var(--tech-hover-bg);
}

hr {
    border: none;
    height: 1px;
    background: var(--rule);
    margin-top: 32px;
}

nav {
    margin-top: 32px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

nav a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--link);
    text-decoration: none;
    padding-bottom: 2px;
    background-image: linear-gradient(var(--link), var(--link));
    background-size: 0% 1.5px;
    background-position: 0% 100%;
    background-repeat: no-repeat;
    transition: background-size 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

nav a:hover {
    background-size: 100% 1.5px;
    text-decoration: none;
}

nav a svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    opacity: 0.55;
    transition: opacity 0.2s;
}

nav a:hover svg { opacity: 0.85; }

@media (hover: hover) {
    body::before {
        content: '';
        position: fixed;
        inset: 0;
        background: radial-gradient(
            600px circle at var(--cx, 50%) var(--cy, 50%),
            rgba(0, 85, 212, 0.025) 0%,
            transparent 60%
        );
        pointer-events: none;
        z-index: 0;
        transition: opacity 0.3s;
    }
}

footer {
    margin-top: 80px;
    font-size: 0.75rem;
    color: var(--tertiary);
    display: flex;
    align-items: center;
    gap: 12px;
}

footer a, .lang-toggle {
    color: var(--tertiary);
    text-decoration: none;
    background: none;
    border: none;
    font: inherit;
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

footer a:hover, .lang-toggle:hover { color: var(--secondary); }

.sep { opacity: 0.35; }

@view-transition { navigation: auto; }

[data-i18n] { view-transition-name: var(--vt); }

::view-transition-old(*),
::view-transition-new(*) {
    animation-duration: 0.2s;
    animation-timing-function: ease;
}

.back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: var(--tertiary);
    margin-bottom: 40px;
    transition: color 0.2s;
}

.back:hover { color: var(--secondary); text-decoration: none; }
.back svg { width: 14px; height: 14px; }

.legal h1 {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 32px;
}

.legal h2 {
    font-size: 0.9375rem;
    font-weight: 500;
    margin-top: 40px;
    margin-bottom: 12px;
}

.legal p {
    color: var(--secondary);
    font-weight: 300;
    font-size: 0.9375rem;
    line-height: 1.75;
}

.legal p + p { margin-top: 8px; }

@media (max-width: 480px) {
    .page { padding-top: clamp(48px, 10vh, 120px); padding-bottom: clamp(32px, 6vh, 64px); }
    header {
        grid-template-columns: 80px 1fr;
        gap: 20px;
        margin-bottom: 36px;
    }
    .photo-wrap { width: 80px; height: 80px; }
    .photo { width: 80px; height: 80px; border-radius: 20px; }
    .name { font-size: 1.75rem; }
    .stack { margin-top: 24px; padding-top: 24px; }
    hr { margin-top: 24px; }
    nav { gap: 16px; margin-top: 24px; }
    footer { margin-top: 56px; }
}

@media (prefers-reduced-motion: reduce) {
    .photo { will-change: auto; }
    .name { opacity: 1; letter-spacing: -0.025em; }
}

@media print {
    body { background: white; color: black; }
    .page { padding: 40px 0; }
    .photo { box-shadow: none; }
    nav a { color: black; background-image: none; gap: 4px; }
    nav a::after { content: ' (' attr(href) ')'; font-size: 0.7rem; color: #666; }
    nav a svg { display: none; }
    hr { background: #ccc; }
    footer, .back { display: none; }
}
