/* ==========================================================================
   Vitalii Bokhin — Software Engineer — home page stylesheet
   Design language: technical / systems-architecture, inspired by the subject's
   own domain (APIs, schemas, microservices). Ink-navy surface, amber signal
   accent, teal secondary accent for tech tags, monospace used where it is
   earned (dates, tags, structural labels) rather than decoratively.
   ========================================================================== */

/* -------------------------------------------------------------------------
   1. Tokens
   ------------------------------------------------------------------------- */
:root {
    /* Surfaces */
    --bg: #0b1220;
    --bg-raised: #101b2d;
    --bg-raised-2: #131f34;
    --bg-card: #0e1826;

    /* Text */
    --ink: #edeef0;
    --ink-dim: #c7cbd6;
    --ink-muted: #8b93a7;
    --ink-faint: #5b6376;

    /* Accents */
    --amber: #f5a623;
    --amber-dim: #b97e1c;
    --amber-ink: #241804;
    --teal: #4fd1c5;
    --teal-dim: #2f9a90;
    --teal-ink: #062421;

    /* Borders */
    --line: rgba(237, 238, 240, 0.09);
    --line-strong: rgba(237, 238, 240, 0.16);
    --line-amber: rgba(245, 166, 35, 0.35);

    /* Type */
    --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;

    /* Layout */
    --container-w: 1080px;
    --radius: 10px;
    --radius-sm: 6px;
}

/* -------------------------------------------------------------------------
   2. Reset & base
   ------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    margin: 0;
    color: var(--ink);
    letter-spacing: -0.01em;
}

p {
    margin: 0;
}

.container {
    max-width: var(--container-w);
    margin: 0 auto;
    padding: 0 32px;
}

@media (max-width: 640px) {
    .container {
        padding: 0 20px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* -------------------------------------------------------------------------
   3. Eyebrow — code-comment style structural label
   ------------------------------------------------------------------------- */
.eyebrow {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    color: var(--amber);
    margin-bottom: 16px;
    letter-spacing: 0.01em;
}

/* -------------------------------------------------------------------------
   4. Buttons
   ------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 15px;
    padding: 13px 24px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
    background: var(--amber);
    color: var(--amber-ink);
}

.btn-primary:hover {
    background: #ffb63d;
    transform: translateY(-1px);
}

.btn-arrow {
    transition: transform 0.15s ease;
}

.btn-primary:hover .btn-arrow {
    transform: translateX(3px);
}

/* -------------------------------------------------------------------------
   5. Hero
   ------------------------------------------------------------------------- */
.hero {
    position: relative;
    padding: 120px 0 0;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle at 6px 6px, rgba(237, 238, 240, 0.06) 1px, transparent 1.5px);
    background-size: 32px 32px;
    -webkit-mask-image: linear-gradient(to bottom, black, transparent 85%);
    mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 48px;
    padding-bottom: 88px;
}

.hero-copy h1 {
    font-size: clamp(34px, 5vw, 52px);
    font-weight: 600;
    line-height: 1.12;
    max-width: 16ch;
}

.hero-subtitle {
    margin-top: 20px;
    font-size: 18px;
    line-height: 1.6;
    color: var(--ink-dim);
    max-width: 52ch;
}

.hero-copy .btn {
    margin-top: 32px;
}

.hero-portrait {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid var(--line-amber);
    flex-shrink: 0;
    background: var(--bg-raised);
}

.hero-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 760px) {
    .hero {
        padding-top: 80px;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        padding-bottom: 56px;
    }

    .hero-portrait {
        order: -1;
        width: 120px;
        height: 120px;
    }
}

.hero-properties {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--line);
}

.hero-property-item {
    padding: 28px 32px;
    border-right: 1px solid var(--line);
}

.hero-property-item:last-child {
    border-right: none;
}

.hero-property-item .icon {
    font-size: 20px;
    margin-bottom: 12px;
}

.hero-property-item h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 6px;
}

.hero-property-item p {
    font-size: 14px;
    color: var(--ink-muted);
    line-height: 1.55;
}

@media (max-width: 760px) {
    .hero-properties {
        grid-template-columns: 1fr;
    }

    .hero-property-item {
        border-right: none;
        border-bottom: 1px solid var(--line);
    }

    .hero-property-item:last-child {
        border-bottom: none;
    }
}

/* -------------------------------------------------------------------------
   6. About
   ------------------------------------------------------------------------- */
.about {
    padding: 96px 0;
    border-bottom: 1px solid var(--line);
}

.about-inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 64px;
    align-items: start;
}

.about-text h2 {
    font-size: 30px;
    font-weight: 600;
    margin-bottom: 20px;
}

.about-text p {
    font-size: 16px;
    color: var(--ink-dim);
    line-height: 1.75;
}

.about-facts {
    display: grid;
    gap: 24px;
    padding-left: 32px;
    border-left: 1px solid var(--line);
}

.about-fact-item {
    display: flex;
    flex-direction: column;
}

.about-fact-item .value {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    color: var(--teal);
    line-height: 1.1;
}

.about-fact-item .label {
    margin-top: 4px;
    font-size: 13px;
    color: var(--ink-muted);
}

@media (max-width: 760px) {
    .about {
        padding: 64px 0;
    }

    .about-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-facts {
        border-left: none;
        border-top: 1px solid var(--line);
        padding-left: 0;
        padding-top: 28px;
        grid-auto-flow: column;
        grid-template-columns: repeat(3, 1fr);
    }
}

/* -------------------------------------------------------------------------
   7. Tech stack
   ------------------------------------------------------------------------- */
.tech-stack {
    padding: 96px 0;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--line);
}

.tech-stack h2 {
    font-size: 30px;
    font-weight: 600;
    margin-bottom: 40px;
}

.tech-stack-groups {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.tech-stack-group {
    background: var(--bg-raised);
    padding: 24px;
}

.tech-stack-group h3 {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    text-transform: lowercase;
    color: var(--teal);
    margin-bottom: 10px;
}

.tech-stack-group p {
    font-size: 14px;
    color: var(--ink-dim);
    line-height: 1.6;
}

@media (max-width: 900px) {
    .tech-stack-groups {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .tech-stack {
        padding: 64px 0;
    }

    .tech-stack-groups {
        grid-template-columns: 1fr;
    }
}

/* -------------------------------------------------------------------------
   8. Experience — commit-log style
   ------------------------------------------------------------------------- */
.experience {
    padding: 96px 0;
    border-bottom: 1px solid var(--line);
}

.experience h2 {
    font-size: 30px;
    font-weight: 600;
    margin-bottom: 40px;
}

.experience-list {
    display: grid;
    gap: 0;
}

.experience-item {
    position: relative;
    padding: 28px 0 28px 32px;
    border-left: 2px solid var(--line-strong);
}

.experience-item::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 34px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--amber);
    border: 3px solid var(--bg);
}

.experience-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px 16px;
    margin-bottom: 10px;
}

.experience-header h3 {
    font-size: 19px;
    font-weight: 600;
}

.experience-header .company {
    font-size: 14px;
    color: var(--ink-muted);
}

.experience-header .period {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--teal);
    margin-left: auto;
    white-space: nowrap;
}

.experience-item p {
    font-size: 15px;
    color: var(--ink-dim);
    line-height: 1.7;
    max-width: 68ch;
}

/* -------------------------------------------------------------------------
   9. Projects
   ------------------------------------------------------------------------- */
.projects {
    padding: 96px 0;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--line);
}

.projects h2 {
    font-size: 30px;
    font-weight: 600;
    margin-bottom: 40px;
}

.projects-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.project-item {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
    transition: border-color 0.15s ease, transform 0.15s ease;
    position: relative;
}

.project-item:hover {
    border-color: var(--line-amber);
    transform: translateY(-2px);
}

.project-item .icon {
    font-size: 22px;
    margin-bottom: 16px;
}

.project-item h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.35;
}

.project-item p {
    font-size: 14px;
    color: var(--ink-muted);
    line-height: 1.65;
}

.project-item__link {
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

@media (max-width: 900px) {
    .projects-list {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 620px) {
    .projects {
        padding: 64px 0;
    }

    .projects-list {
        grid-template-columns: 1fr;
    }
}

/* -------------------------------------------------------------------------
   10. Contact
   ------------------------------------------------------------------------- */
.contact {
    padding: 120px 0;
    text-align: center;
}

.contact-inner {
    max-width: 640px;
}

.contact .eyebrow {
    display: block;
}

.contact h2 {
    font-size: 36px;
    font-weight: 600;
    margin-bottom: 16px;
}

.contact-subtitle {
    font-size: 17px;
    color: var(--ink-dim);
    margin-bottom: 40px;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-dim);
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.contact-link:hover {
    border-color: var(--teal);
    color: var(--teal);
    background: rgba(79, 209, 197, 0.06);
}

@media (max-width: 640px) {
    .contact {
        padding: 72px 0;
    }

    .contact h2 {
        font-size: 28px;
    }
}