:root {
    --bg: #000;
    --card: #0d0d0f;
    --line: rgba(255, 255, 255, 0.08);
    --text: #f5f5f7;
    --muted: #86868b;
    --link: #2997ff;
    color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: 17px;
    line-height: 1.5;
    letter-spacing: -0.011em;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1080px; margin: 0 auto; padding-inline: 24px; }

/* Nav */
.nav {
    position: sticky; top: 0; z-index: 10;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; justify-content: space-between; align-items: center; height: 52px; font-size: 0.85rem; }
.nav__brand { font-weight: 600; }
.nav__links { display: flex; gap: 28px; color: var(--muted); }
.nav__links a:hover { color: var(--text); }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    height: 44px; padding: 0 22px; border-radius: 999px;
    font: inherit; font-size: 0.95rem; font-weight: 500; cursor: pointer; border: 0;
    transition: opacity .2s, background .2s;
}
.btn--light { background: var(--text); color: #000; }
.btn--light:hover { opacity: .85; }
.btn--dark { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.btn--dark:hover { background: rgba(255, 255, 255, 0.14); }

/* Hero */
.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; padding-block: 88px 72px; }
.hero__kicker { color: var(--muted); font-size: 0.95rem; font-weight: 500; margin-bottom: 18px; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.04; letter-spacing: -0.045em; font-weight: 700; }
h1 span {
    background: linear-gradient(180deg, #f5f5f7 0%, #6e6e73 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__lead { color: var(--muted); font-size: 1.2rem; line-height: 1.5; max-width: 30em; margin-top: 24px; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 36px; }
.hero__photo {
    position: relative; border-radius: 28px; overflow: hidden; aspect-ratio: 4 / 5;
    border: 1px solid var(--line); background: var(--card);
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 45% 40%; }
.hero__photo::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.45));
}

/* Numbers */
.numbers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; padding: 0; max-width: 1032px; }
.numbers > div { background: var(--bg); padding: 28px; display: flex; flex-direction: column; gap: 4px; }
.numbers strong { font-size: 2rem; font-weight: 600; letter-spacing: -0.03em; }
.numbers span { color: var(--muted); font-size: 0.9rem; }

/* Sections */
.section { padding-block: 120px 0; }
h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.04em; font-weight: 700; margin-bottom: 40px; }

/* Projects */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.project {
    display: flex; flex-direction: column; padding: 32px; min-height: 260px;
    background: var(--card); border: 1px solid var(--line); border-radius: 24px;
    transition: border-color .3s, transform .3s;
}
.project:hover { border-color: rgba(255, 255, 255, 0.22); transform: translateY(-2px); }
.project--featured {
    grid-column: span 2; min-height: 320px;
    background: radial-gradient(120% 140% at 100% 0%, #1c2333 0%, var(--card) 55%);
}
.project--featured h3 { font-size: 2.4rem; }
.project__meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 0.82rem; color: var(--muted); margin-bottom: auto; padding-bottom: 32px; }
.project__stat { color: var(--text); }
.project h3 { font-size: 1.6rem; letter-spacing: -0.03em; font-weight: 600; }
.project p { color: var(--muted); margin-top: 8px; max-width: 42em; font-size: 0.98rem; }
.project__link { margin-top: 20px; font-size: 0.9rem; color: var(--link); }
.project__link i { display: none; }
.project__link::after { content: ' ›'; }

/* CV */
.cv { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.cv > div { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 32px; }
.cv__title { font-size: 0.82rem; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 20px; }
.cv__title--gap { margin-top: 40px; }
.list { list-style: none; }
.job, .edu { padding-block: 16px; border-top: 1px solid var(--line); }
.job:first-child, .edu:first-child { border-top: 0; padding-top: 0; }
.job__date { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 4px; }
.job h3, .edu h3 { font-size: 1.02rem; font-weight: 600; }
.job__org { color: var(--muted); font-size: 0.92rem; }
.job__org a:hover { color: var(--text); }
.job p:last-child:not(.job__org) { color: #a1a1a6; font-size: 0.9rem; margin-top: 6px; }
.extra { display: grid; grid-template-columns: 100px 1fr; gap: 10px 16px; font-size: 0.95rem; }
.extra dt { color: var(--muted); }

/* Contact */
.contact { text-align: center; }
.contact h2 { font-size: clamp(2.4rem, 6vw, 4.2rem); margin-bottom: 20px; }
.contact__mail { font-size: clamp(1.2rem, 3vw, 1.6rem); color: var(--link); word-break: break-word; }
.contact__mail:hover { text-decoration: underline; }
.contact__links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 24px; margin-top: 14px; color: var(--muted); font-size: 0.95rem; }
.contact__links a:hover { color: var(--text); }
.note {
    max-width: 560px; margin: 40px auto 0; padding: 18px 22px; border-radius: 16px;
    background: rgba(255, 159, 10, 0.08); border: 1px solid rgba(255, 159, 10, 0.25);
    color: #d6d6db; font-size: 0.92rem; text-align: left;
}
.note strong { color: #ffb340; font-weight: 600; }
.form { display: grid; gap: 12px; max-width: 560px; margin: 24px auto 0; text-align: left; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form input, .form textarea {
    font: inherit; font-size: 1rem; width: 100%; padding: 14px 16px; border-radius: 14px;
    background: var(--card); border: 1px solid var(--line); color: var(--text);
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--link); }
.form ::placeholder { color: var(--muted); }
.form .btn { width: 100%; height: 48px; }

/* Footer */
.foot { display: flex; justify-content: space-between; gap: 16px; padding-block: 32px; margin-top: 120px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.82rem; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

@media (max-width: 800px) {
    body { font-size: 16px; }
    .wrap { padding-inline: 20px; }
    .nav__links { gap: 20px; }
    .hero { grid-template-columns: 1fr; gap: 32px; padding-block: 28px 48px; }
    .hero__photo { order: -1; aspect-ratio: 1 / 1; border-radius: 24px; }
    .hero__photo img { object-position: 45% 38%; }
    .hero__lead { font-size: 1.08rem; margin-top: 18px; }
    .hero__cta { margin-top: 28px; }
    .hero__cta .btn { flex: 1; }
    .numbers { grid-template-columns: 1fr; margin-inline: 20px; }
    .numbers > div { padding: 20px 22px; flex-direction: row; align-items: baseline; gap: 12px; }
    .numbers strong { font-size: 1.5rem; min-width: 92px; }
    .section { padding-block: 80px 0; }
    h2 { margin-bottom: 24px; }
    .projects, .cv { grid-template-columns: 1fr; }
    .project, .project--featured { grid-column: auto; padding: 24px; min-height: 0; border-radius: 20px; }
    .project__meta { padding-bottom: 24px; }
    .project--featured h3 { font-size: 1.9rem; }
    .cv > div { padding: 24px; border-radius: 20px; }
    .form__row { grid-template-columns: 1fr; }
    .foot { margin-top: 80px; flex-direction: column; gap: 4px; }
}
