:root {
    --bg: #f5f5f3;
    --bg-alt: #ececea;
    --surface: #ffffff;
    --ink: #16161a;
    --muted: #71717a;
    --line: #e6e6e1;
    --accent: #3d2bff;
    --accent-soft: rgba(61, 43, 255, .08);
    --danger: #c0392b;
    --danger-bg: #fdecea;
    --ok: #1f7a4d;
    --ok-bg: #e7f5ee;
    --radius: 16px;
    --shadow: 0 1px 2px rgba(16, 16, 26, .04),
              0 16px 40px -16px rgba(16, 16, 26, .18);
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --container: 1080px;
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

.container {
    width: min(var(--container), calc(100% - 40px));
    margin-inline: auto;
}

.dot { color: var(--accent); }

.eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 10px;
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(245, 245, 243, .88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s ease;
}

.site-header.is-scrolled,
body:not(:target) .site-header {
    border-bottom-color: var(--line);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 20px;
}

.site-logo {
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.site-nav a {
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    padding: 8px 12px;
    border-radius: 999px;
    transition: background .15s ease, color .15s ease;
}

.site-nav a:hover {
    color: var(--ink);
    background: rgba(0, 0, 0, .04);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    cursor: pointer;
    padding: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
}

/* ---------- Hero ---------- */
.hero {
    padding: 56px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(60% 50% at 10% 0%, rgba(61, 43, 255, .07), transparent 70%),
        radial-gradient(40% 40% at 100% 80%, rgba(61, 43, 255, .05), transparent 70%);
    pointer-events: none;
}

.hero__grid {
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 48px;
    align-items: center;
}

.hero--no-photo .hero__grid {
    grid-template-columns: 1fr;
    max-width: 720px;
}

.hero__content h1 {
    font-size: clamp(40px, 7vw, 64px);
    line-height: 1.02;
    letter-spacing: -0.04em;
    font-weight: 600;
    margin: 0 0 16px;
}

.hero__tagline {
    font-size: 18px;
    color: var(--muted);
    max-width: 520px;
    margin: 0 0 28px;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.hero__social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero__social a {
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 6px 12px;
    border-radius: 999px;
}

.hero__visual {
    display: flex;
    justify-content: center;
}

.hero__photo {
    width: min(100%, 320px);
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 28px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 24px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform .08s ease, filter .15s ease, background .15s ease;
}

.btn--primary {
    background: var(--accent);
    color: #fff;
}

.btn--primary:hover { filter: brightness(1.07); }

.btn--ghost {
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
}

.btn--ghost:hover { background: #fff; }

.btn--block { width: 100%; }

.btn:active { transform: translateY(1px); }

/* ---------- Sections ---------- */
.section {
    padding: 80px 0;
}

.section--alt {
    background: var(--bg-alt);
}

.section__head {
    margin-bottom: 36px;
}

.section__head h2 {
    font-size: clamp(28px, 4vw, 36px);
    letter-spacing: -0.03em;
    margin: 0;
    font-weight: 600;
}

/* ---------- About ---------- */
.about-grid {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 24px;
    align-items: start;
}

.about-grid--solo {
    grid-template-columns: 1fr;
}

.about-card,
.about-aside__card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
}

.about-text p {
    margin: 0 0 1.1em;
    font-size: 16px;
    line-height: 1.75;
    color: var(--ink);
}

.about-text p:last-child { margin-bottom: 0; }

.about-text--muted {
    margin: 0;
    font-size: 16px;
    line-height: 1.75;
    color: var(--muted);
}

.about-aside__tagline {
    margin: 0 0 20px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--muted);
}

.about-aside__block + .about-aside__block {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.about-aside__label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
    margin-bottom: 6px;
}

.about-aside__role {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.about-aside__company {
    margin: 4px 0 0;
    font-size: 14px;
    color: var(--muted);
}

.about-aside__meta {
    margin: 0;
    font-size: 15px;
    color: var(--ink);
}

.about-aside__actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.about-aside__social {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.about-aside__social a {
    font-size: 13px;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--accent-soft);
    transition: background .15s ease;
}

.about-aside__social a:hover { background: rgba(61, 43, 255, .14); }

.contact-info,
.contact-form {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
}

.info-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.info-list li {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-list span {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
}

.info-list strong,
.info-list a {
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
}

.info-list a { color: var(--accent); }

/* ---------- Skills ---------- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.skills-grid:has(> .skill-group:only-child) {
    grid-template-columns: 1fr;
}

.skill-group {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
}

.skill-group h3 {
    margin: 0 0 18px;
    font-size: 16px;
}

.skill-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.skill-item__top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

.skill-item__top small {
    color: var(--muted);
    font-size: 12px;
}

.skill-bar {
    height: 7px;
    background: var(--line);
    border-radius: 999px;
    overflow: hidden;
}

.skill-bar span {
    display: block;
    height: 100%;
    background: var(--accent);
    border-radius: 999px;
}

/* ---------- Projects ---------- */
.projects-featured,
.projects-grid {
    display: grid;
    gap: 20px;
}

.projects-featured {
    grid-template-columns: 1fr;
    margin-bottom: 20px;
}

.projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-card--featured {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
}

.project-card__media img,
.project-card__media .project-card__placeholder {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
}

.project-card__placeholder {
    display: grid;
    place-items: center;
    background: var(--ink);
    color: #fff;
    font-weight: 700;
    font-size: 28px;
    min-height: 220px;
}

.project-card__body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.project-card__body h3 {
    margin: 0;
    font-size: 20px;
    letter-spacing: -0.02em;
}

.project-card__body p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.pill {
    align-self: flex-start;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 4px 10px;
    border-radius: 999px;
}

.tag-list {
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-list li {
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
    background: var(--bg);
    padding: 4px 10px;
    border-radius: 999px;
}

.project-card__links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: auto;
    padding-top: 8px;
}

.project-card__links a {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}

.project-card__links a:hover { text-decoration: underline; }

/* ---------- Career ---------- */
.career-timeline {
    list-style: none;
    margin: 0;
    padding: 0 0 0 22px;
    border-left: 2px solid var(--line);
}

.career-item {
    position: relative;
    padding: 0 0 32px 24px;
}

.career-item:last-child { padding-bottom: 0; }

.career-item__dot {
    position: absolute;
    left: -29px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--bg-alt);
    box-shadow: 0 0 0 2px var(--line);
}

.career-item__body {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px 24px;
}

.career-item time {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 8px;
}

.career-item h3 {
    margin: 0;
    font-size: 18px;
}

.career-item__company {
    margin: 4px 0 0;
    font-weight: 500;
}

.career-item__meta,
.career-item__desc {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 14px;
}

/* ---------- Contact ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    gap: 24px;
    align-items: start;
}

.contact-lead {
    margin: 0 0 24px;
    color: var(--muted);
    font-size: 15px;
}

.contact-form .field { margin-bottom: 16px; }

.contact-form label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 7px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    font-family: inherit;
    font-size: 15px;
    color: var(--ink);
    background: #fbfbfa;
    border: 1px solid var(--line);
    border-radius: 11px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.contact-form input {
    height: 46px;
    padding: 0 14px;
}

.contact-form textarea {
    padding: 12px 14px;
    resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
    background: #fff;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(61, 43, 255, .12);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.alert {
    border-radius: 11px;
    padding: 12px 14px;
    font-size: 14px;
    margin-bottom: 16px;
}

.alert--error { background: var(--danger-bg); color: var(--danger); }
.alert--ok { background: var(--ok-bg); color: var(--ok); }

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* ---------- Footer ---------- */
.site-footer {
    padding: 48px 0 56px;
    border-top: 1px solid var(--line);
}

.site-footer__inner {
    display: grid;
    gap: 18px;
    text-align: center;
}

.site-footer__brand p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.site-footer__social {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.site-footer__social a {
    font-size: 14px;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
}

.site-footer__copy {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .hero__grid,
    .contact-grid,
    .about-grid,
    .project-card--featured {
        grid-template-columns: 1fr;
    }

    .hero:not(.hero--no-photo) .hero__visual { order: -1; }

    .hero__photo {
        width: min(100%, 240px);
    }
}

@media (max-width: 720px) {
    .nav-toggle { display: inline-flex; }

    .site-nav {
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--line);
        padding: 12px 20px 16px;
        flex-direction: column;
        align-items: stretch;
        display: none;
    }

    .site-nav.is-open { display: flex; }

    .site-header__inner { position: relative; }

    .form-row { grid-template-columns: 1fr; }

    .section { padding: 64px 0; }
}
