@font-face {
    font-family: 'Kyiv Serif';
    src: url('fonts/KyivTypeSerif-VarGX.ttf') format('truetype');
}

@font-face {
    font-family: 'Kyiv Sans';
    src: url('fonts/KyivTypeSans-VarGX.ttf') format('truetype');
}

@font-face {
    font-family: 'Kyiv Titling';
    src: url('fonts/KyivTypeTitling-VarGX.ttf') format('truetype');
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background-color: #141613;
    overflow-x: hidden;
    scroll-behavior: smooth;
    color: #fff;
    font-family: 'Kyiv Sans', sans-serif;
}

::-webkit-scrollbar {
    width: 0px;
}

::selection {
    color: #f5fff7;
    background: #367C4B;
}

/* fog canvas: sit behind hero content but above page bg */
.fog-container {
    z-index: 0;
}

/* ---------- HERO ---------- */
.hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding: 32px clamp(24px, 6vw, 96px) 64px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* green glow rectangle w/ heavy blur */
.glow {
    position: absolute;
    top: 48%;
    left: 58%;
    width: 36vw;
    height: 28vh;
    background: #367C4B;
    opacity: 0.12;
    filter: blur(260px);
    border-radius: 40px;
    pointer-events: none;
    z-index: 0;
}

/* ---------- NAVBAR ---------- */
.navbar {
    position: fixed;
    top: 32px;
    left: 50%;
    z-index: 10;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 10px 16px;
    border-radius: 2vh;
    background: rgba(30, 34, 30, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
}

.brand-logo {
    width: 26px;
    height: 26px;
    border-radius: 6px;
}

.brand-name {
    font-weight: 700;
    font-size: 17px;
    letter-spacing: 0.2px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.72);
    font-size: 15px;
    padding: 6px 14px;
    border-radius: 1vh;
    transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
    color: #fff;
}

.nav-link.active {
    color: #7ee29a;
    background: rgba(54, 124, 75, 0.28);
}

/* ---------- HERO CONTENT ---------- */
.hero-content {
    position: relative;
    z-index: 2;
    margin-top: auto;
    margin-bottom: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    max-width: 900px;
    margin-left: auto;
}

.hero-text {
    font-family: 'Kyiv Titling', sans-serif;
    font-size: clamp(48px, 9vw, 120px);
    line-height: 1;
    margin: 0;
}

.hero-text span {
    display: block;
    background: linear-gradient(to bottom, #99FFB8 0%, #2F4031 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.hero-subtitle {
    font-size: clamp(20px, 2.6vw, 34px);
    font-weight: 700;
    line-height: 1.15;
    margin: 24px 0 0;
    color: #f2f4f1;
}

/* ---------- BUTTONS ---------- */
.hero-actions {
    display: flex;
    gap: 16px;
    margin-top: 48px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: gap 0.2s ease, padding 0.2s ease, letter-spacing 0.2s ease, filter 0.2s, background 0.2s;
}

.btn:hover {
    gap: 14px;
    padding: 14px 26px;
    letter-spacing: 0.04em;
}

.btn-primary {
    background: #367C4B;
    color: #fff;
    box-shadow: 0 8px 30px rgba(54, 124, 75, 0.4);
}

.btn-primary:hover {
    filter: brightness(1.1);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ---------- ABOUT ---------- */
.about {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    padding: clamp(80px, 12vw, 160px) clamp(24px, 10vw, 160px);
    overflow: hidden;
    display: flex;
    align-items: center;
    background: #141613;
}

.about-cubes {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
}

.about-content {
    position: relative;
    z-index: 1;
    width: min(100%, 640px);
    margin-left: clamp(0px, 28vw, 400px);
}

.about-owner {
    position: absolute;
    z-index: 1;
    left: clamp(140px, 19vw, 280px);
    top: 50%;
    width: min(245px, 18vw);
    min-height: 250px;
    transform: translateY(-50%);
    padding: 22px;
    border: 1px solid rgba(157, 238, 181, 0.18);
    border-radius: 18px;
    background: rgba(20, 27, 21, 0.74);
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
}

.about-owner img { display: block; width: 58px; height: 58px; border-radius: 14px; object-fit: contain; }
.about-owner p { margin: 16px 0 4px; color: #7ee29a; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.about-owner h3 { margin: 0; font-size: clamp(18px, 1.8vw, 24px); }
.about-owner div { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.about-owner a { color: rgba(242,244,241,0.76); font-size: 13px; font-weight: 700; text-decoration: none; }
.about-owner a:hover { color: #99ffb8; }

.section-kicker {
    margin: 0 0 16px;
    color: #7ee29a;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.about h2 {
    margin: 0;
    font-family: 'Kyiv Serif', serif;
    font-size: clamp(54px, 7vw, 108px);
    font-weight: 600;
    line-height: 0.95;
    letter-spacing: -0.045em;
}

.about-content > p:last-child {
    max-width: 510px;
    margin: 32px 0 0;
    color: rgba(242, 244, 241, 0.72);
    font-size: clamp(18px, 2vw, 24px);
    line-height: 1.45;
}

/* ---------- PROJECTS ---------- */
.projects {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(96px, 12vw, 160px) clamp(24px, 10vw, 160px);
    background: #141613;
}

.node-network {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

#node-network-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.projects-content {
    position: relative;
    z-index: 1;
}

.projects h2 {
    max-width: 740px;
    margin: 0;
    font-family: 'Kyiv Serif', serif;
    font-size: clamp(52px, 7vw, 100px);
    font-weight: 600;
    line-height: 0.95;
    letter-spacing: -0.045em;
}

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

.project-card {
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    background: rgba(20, 22, 19, 0.78);
    backdrop-filter: blur(10px);
}

.project-screenshot {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: #20261f;
}

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

.project-heading { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
.project-heading h3 { margin: 0; font-size: 24px; }
.project-logo { display: block; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px; object-fit: contain; }
.project-card > p { min-height: 5.5em; margin: 14px 0 20px; color: rgba(242, 244, 241, 0.68); line-height: 1.45; }
.project-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.project-link { padding: 9px 13px; border: 1px solid rgba(255,255,255,0.24); border-radius: 9px; color: #fff; text-decoration: none; font-weight: 700; font-size: 14px; }
.project-link-primary { border-color: #367c4b; background: #367c4b; }

.preview-sidebar { position: absolute; inset: 0 auto 0 0; width: 21%; border-right: 1px solid rgba(255,255,255,0.09); background: rgba(0,0,0,0.15); }
.preview-chart { position: absolute; right: 11%; bottom: 18%; width: 60%; height: 45%; border-bottom: 2px solid #76d995; transform: skewY(-14deg); box-shadow: 0 20px 32px rgba(86, 214, 127, 0.22); }
.preview-stat { position: absolute; top: 17%; width: 18%; height: 14%; border-radius: 4px; background: rgba(137, 225, 162, 0.28); }
.stat-one { left: 30%; }.stat-two { left: 53%; }
.preview-list { position: absolute; left: 30%; top: 22%; width: 39%; height: 9%; border-radius: 4px; background: rgba(230,255,238,0.25); box-shadow: 0 34px 0 rgba(230,255,238,0.17), 0 68px 0 rgba(230,255,238,0.1); }
.preview-list.short { top: 71%; width: 24%; box-shadow: none; }
.preview-ring { position: absolute; right: 12%; top: 27%; width: 27%; aspect-ratio: 1; border: 10px solid #70d991; border-left-color: rgba(112,217,145,0.18); border-radius: 50%; }
.preview-lock { position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); color: #a1ebba; font-size: 68px; line-height: 1; }
.preview-line { position: absolute; left: 22%; right: 22%; bottom: 24%; height: 7px; border-radius: 999px; background: rgba(231,255,238,0.26); }.preview-line.middle { bottom: 17%; right: 33%; }.preview-line.short { bottom: 10%; right: 47%; }

/* ---------- GITHUB ---------- */
.github-section {
    position: relative;
    isolation: isolate;
    min-height: 82vh;
    overflow: hidden;
    display: grid;
    place-items: center;
    padding: 96px clamp(24px, 10vw, 160px);
    background: #141613;
}

#circuit-canvas { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }
.github-content { position: relative; z-index: 1; width: min(100%, 900px); }
.github-content > h2 { margin: 0; font-family: 'Kyiv Serif', serif; font-size: clamp(52px, 7vw, 100px); font-weight: 600; line-height: 0.95; letter-spacing: -0.045em; }
.github-card { margin-top: 48px; padding: clamp(24px, 4vw, 48px); border: 1px solid rgba(157, 238, 181, 0.23); border-radius: 24px; background: rgba(20, 27, 21, 0.85); box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18); backdrop-filter: blur(14px); }
.github-card-heading { display: flex; align-items: center; gap: 18px; }
.github-mark { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 15px; color: #b4facb; background: rgba(54,124,75,0.42); font-size: 30px; }
.github-card-heading p { margin: 0 0 5px; color: rgba(242,244,241,0.65); font-size: 15px; }
.github-card-heading a { color: #fff; font-size: clamp(18px, 2vw, 24px); font-weight: 700; text-decoration: none; }
.github-card-heading a:hover { color: #99ffb8; }
.github-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 44px 0 0; }
.github-stats > div { padding: 20px; border-radius: 14px; background: rgba(255,255,255,0.045); }
.github-stats dt { color: rgba(242,244,241,0.58); font-size: 14px; }.github-stats dd { margin: 6px 0 0; color: #d9ffe5; font-family: 'Kyiv Serif', serif; font-size: clamp(42px, 6vw, 68px); line-height: 1; }

/* ---------- CONTACT ---------- */
.contact-section { position: relative; isolation: isolate; overflow: hidden; min-height: 78vh; display: grid; place-items: center; padding: 96px clamp(24px, 10vw, 160px); background: #141613; }
.contact-decor { position: absolute; inset: 0; z-index: 0; opacity: 0.75; background: radial-gradient(ellipse 52% 65% at 70% 52%, rgba(54,124,75,0.17), transparent 72%), linear-gradient(rgba(150,230,174,0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(150,230,174,0.045) 1px, transparent 1px); background-size: auto, 42px 42px, 42px 42px; mask-image: linear-gradient(to right, transparent, black 26%, black 78%, transparent); }
.contact-content { position: relative; z-index: 1; width: min(100%, 900px); }
.contact-content h2 { margin: 0; font-family: 'Kyiv Serif', serif; font-size: clamp(54px, 7vw, 102px); font-weight: 600; line-height: 0.94; letter-spacing: -0.045em; }
.contact-intro { max-width: 550px; margin: 28px 0 0; color: rgba(242,244,241,0.68); font-size: clamp(18px, 2vw, 24px); line-height: 1.45; }
.contact-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 48px; }
.contact-card { display: flex; align-items: center; gap: 17px; padding: 22px; border: 1px solid rgba(157,238,181,0.18); border-radius: 16px; color: #fff; background: rgba(20,27,21,0.74); text-decoration: none; backdrop-filter: blur(12px); transition: border-color 0.2s, background 0.2s, transform 0.2s; }
.contact-card:hover { border-color: rgba(157,238,181,0.5); background: rgba(54,124,75,0.2); transform: translateY(-2px); }
.contact-card > svg { width: 29px; height: 29px; flex: 0 0 auto; color: #99ffb8; }.contact-card span { display: grid; gap: 3px; min-width: 0; }.contact-card small { color: rgba(242,244,241,0.58); font-size: 13px; }.contact-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: clamp(15px, 1.7vw, 19px); }.contact-card b { color: #99ffb8; }

@media (max-width: 640px) {
    .navbar {
        flex-direction: column;
        gap: 12px;
        border-radius: 24px;
    }
    .hero-content {
        align-items: flex-start;
        text-align: left;
    }
    .hero-actions {
        flex-wrap: wrap;
    }
    .about-content {
        margin-left: 0;
    }
    .about-owner {
        display: none;
    }
    .project-grid {
        grid-template-columns: 1fr;
    }
    .github-stats {
        grid-template-columns: 1fr;
    }
    .contact-links {
        grid-template-columns: 1fr;
    }
}
