:root {
    --bg: #07111f;
    --panel: rgba(9, 20, 35, 0.78);
    --panel-strong: rgba(12, 25, 43, 0.9);
    --line: rgba(189, 214, 255, 0.18);
    --text: #eef5ff;
    --muted: #a9b8ca;
    --accent: #7dd3fc;
    --accent-strong: #38bdf8;
    --shadow: rgba(0, 0, 0, 0.34);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background:
        linear-gradient(180deg, rgba(4, 8, 18, 0.35), rgba(4, 8, 18, 0.76)),
        url("assets/deep-space-bg.png") center / cover fixed no-repeat,
        var(--bg);
}

body.welcome-active {
    overflow: hidden;
}

a {
    color: inherit;
}

.welcome-screen {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 32px;
    cursor: pointer;
    background:
        linear-gradient(180deg, rgba(4, 8, 18, 0.16), rgba(4, 8, 18, 0.62)),
        url("assets/deep-space-bg.png") center / cover no-repeat,
        var(--bg);
    transition: opacity 420ms ease, visibility 420ms ease;
}

.homepage-entered .welcome-screen {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.welcome-inner {
    display: grid;
    grid-template-columns: minmax(180px, 260px) minmax(260px, 520px);
    align-items: center;
    justify-content: center;
    gap: clamp(34px, 8vw, 96px);
    width: min(920px, 100%);
}

.welcome-profile {
    display: grid;
    justify-items: center;
    gap: 18px;
}

.welcome-profile img {
    width: clamp(150px, 20vw, 220px);
    height: clamp(150px, 20vw, 220px);
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
}

.welcome-screen .welcome-avatar {
    display: block;
    width: clamp(150px, 16vw, 190px) !important;
    height: clamp(150px, 16vw, 190px) !important;
    max-width: 190px;
    max-height: 190px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50% !important;
}

.welcome-profile h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1;
    text-align: center;
}

.welcome-greeting {
    display: grid;
    justify-items: start;
    gap: 16px;
}

.welcome-greeting p {
    margin: 0;
    font-family: "Brush Script MT", "Segoe Script", "Lucida Handwriting", cursive;
    font-size: clamp(52px, 9vw, 104px);
    line-height: 0.95;
    color: #f6fbff;
    text-shadow: 0 16px 44px rgba(0, 0, 0, 0.5);
}

.welcome-greeting span {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 16px;
    color: #d7e7f8;
    font-size: 14px;
    font-weight: 700;
    border: 1px solid rgba(215, 231, 248, 0.3);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.welcome-active .site-header,
.welcome-active .page-shell,
.welcome-active .site-footer {
    display: none;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    padding: 0 32px;
    border-bottom: 1px solid var(--line);
    background: rgba(4, 10, 20, 0.72);
    backdrop-filter: blur(18px);
}

.brand {
    font-size: 18px;
    font-weight: 750;
    text-decoration: none;
    letter-spacing: 0;
}

.top-nav {
    display: flex;
    gap: 8px;
}

.top-nav a {
    padding: 8px 12px;
    color: var(--muted);
    font-size: 14px;
    text-decoration: none;
    border-radius: 8px;
}

.top-nav a:hover,
.top-nav a:focus-visible {
    color: var(--text);
    background: rgba(125, 211, 252, 0.1);
    outline: none;
}

.page-shell {
    display: grid;
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
    gap: 28px;
    width: min(1180px, calc(100% - 48px));
    margin: 48px auto 34px;
    align-items: start;
}

.profile-card,
.hero-panel,
.section-block,
.project-card {
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: 0 24px 70px var(--shadow);
    backdrop-filter: blur(16px);
}

.profile-card {
    position: sticky;
    top: 88px;
    padding: 28px;
    border-radius: 8px;
}

.avatar {
    width: 116px;
    height: 116px;
    margin-bottom: 20px;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.86);
    border-radius: 50%;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.profile-card h1 {
    margin-bottom: 4px;
    font-size: 30px;
    line-height: 1.1;
}

.role {
    margin-bottom: 14px;
    color: var(--accent);
    font-weight: 700;
}

.bio {
    margin-bottom: 22px;
    color: var(--muted);
}

.social-links {
    display: grid;
    gap: 10px;
    margin-bottom: 24px;
}

.social-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 12px;
    color: var(--text);
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}

.social-links a:hover,
.social-links a:focus-visible {
    border-color: rgba(125, 211, 252, 0.65);
    background: rgba(125, 211, 252, 0.12);
    outline: none;
}

.mini-stats {
    display: grid;
    gap: 12px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.mini-stats span,
.eyebrow,
.muted {
    color: var(--muted);
}

.mini-stats span,
.eyebrow {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.mini-stats strong {
    display: block;
    margin-top: 2px;
    font-size: 15px;
}

.content-column {
    display: grid;
    gap: 22px;
}

.hero-panel,
.section-block {
    border-radius: 8px;
}

.hero-panel {
    min-height: 270px;
    padding: clamp(28px, 5vw, 54px);
    background:
        linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(11, 22, 38, 0.8)),
        var(--panel-strong);
}

.eyebrow {
    margin-bottom: 12px;
    color: var(--accent);
    font-weight: 800;
}

.hero-panel h2 {
    max-width: 760px;
    margin-bottom: 18px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.05;
}

.hero-panel p {
    max-width: 720px;
    margin-bottom: 0;
    color: #c7d6e8;
    font-size: 17px;
}

.section-block {
    padding: 30px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--line);
}

.section-heading h2 {
    margin-bottom: 12px;
    font-size: 28px;
}

.timeline-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
}

.timeline-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.timeline-item h3 {
    margin-bottom: 4px;
    font-size: 20px;
}

.timeline-item p {
    margin-bottom: 6px;
}

.timeline-item time {
    color: var(--accent);
    font-size: 14px;
    font-weight: 750;
    white-space: nowrap;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.project-card {
    min-height: 210px;
    padding: 22px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.055);
}

.project-card h3 {
    margin-bottom: 12px;
    font-size: 19px;
}

.project-card p {
    margin-bottom: 18px;
    color: var(--muted);
}

.project-card span {
    display: inline-flex;
    padding: 5px 9px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 760;
    border: 1px solid rgba(125, 211, 252, 0.28);
    border-radius: 999px;
    background: rgba(125, 211, 252, 0.08);
}

.site-footer {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto 34px;
    color: var(--muted);
    font-size: 14px;
}

.site-footer p {
    margin: 0;
}

@media (max-width: 860px) {
    .welcome-inner {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .welcome-greeting {
        justify-items: center;
    }

    .site-header {
        padding: 0 18px;
    }

    .top-nav {
        gap: 2px;
    }

    .top-nav a {
        padding: 7px 8px;
    }

    .page-shell {
        grid-template-columns: 1fr;
        width: min(100% - 28px, 640px);
        margin-top: 28px;
    }

    .profile-card {
        position: static;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .timeline-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .site-footer {
        width: min(100% - 28px, 640px);
    }
}

@media (max-width: 560px) {
    .welcome-screen {
        padding: 22px;
    }

    .welcome-profile img {
        width: 148px;
        height: 148px;
    }

    .welcome-greeting p {
        font-size: 56px;
    }

    .site-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        padding: 12px 16px;
    }

    .top-nav {
        width: 100%;
        justify-content: space-between;
    }

    .hero-panel,
    .section-block,
    .profile-card {
        padding: 22px;
    }

    .hero-panel h2 {
        font-size: 34px;
    }
}
