/* =================================================================
   Domen Česnik — personal dossier
   Aesthetic: warm-paper technical spec sheet.
   Display: Fraunces  ·  Meta/labels: JetBrains Mono
   ================================================================= */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --paper:       #e4ddcd;   /* desk / page behind the sheet */
    --sheet:       #f5f1e8;   /* the document itself          */
    --sheet-edge:  #ece6d8;
    --ink:         #1c1b16;
    --ink-soft:    #56524a;
    --ink-faint:   #908b7e;
    --line:        #d6cfbe;
    --line-soft:   #e3ddce;
    --accent:      #0c7a54;   /* Humanfrog green, refined      */
    --accent-deep: #08573b;
    --accent-wash: rgba(12, 122, 84, 0.07);

    --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
    --serif: "Fraunces", Georgia, "Times New Roman", serif;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--serif);
    background-color: var(--paper);
    /* faint blueprint grid on the desk */
    background-image:
        linear-gradient(var(--line-soft) 1px, transparent 1px),
        linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
    background-size: 26px 26px;
    color: var(--ink);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: clamp(20px, 5vw, 70px) 20px;
}

/* film grain over everything */
.grain {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.4;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

/* ============================ SHEET ============================ */
.sheet {
    width: 100%;
    max-width: 720px;
    background: var(--sheet);
    border: 1px solid var(--sheet-edge);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.6) inset,
        0 40px 80px -40px rgba(28, 27, 22, 0.45),
        0 2px 6px rgba(28, 27, 22, 0.08);
    padding: clamp(26px, 5vw, 52px);
    position: relative;
}

/* corner crop marks — datasheet detail */
.sheet::before,
.sheet::after {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    border: 1px solid var(--ink-faint);
    opacity: 0.5;
}
.sheet::before { top: 14px;  left: 14px;  border-right: 0; border-bottom: 0; }
.sheet::after  { bottom: 14px; right: 14px; border-left: 0;  border-top: 0; }

/* ========================== MASTHEAD =========================== */
.masthead {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-faint);
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.lang {
    display: flex;
    gap: 7px;
    align-items: baseline;
}

.lang a {
    color: var(--ink-faint);
    text-decoration: none;
    transition: color 0.25s var(--ease);
}
.lang a:hover { color: var(--ink); }
.lang a.active { color: var(--accent); font-weight: 700; }
.lang span { color: var(--line); }

/* ============================ HERO ============================= */
.hero {
    padding: clamp(30px, 6vw, 52px) 0 clamp(26px, 4vw, 40px);
    position: relative;
}

.eyebrow {
    font-family: var(--mono);
    font-size: 0.74rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: clamp(18px, 3vw, 26px);
    display: flex;
    align-items: center;
    gap: 12px;
}
.eyebrow::before {
    content: "";
    width: 26px;
    height: 1px;
    background: var(--accent);
}

.name {
    font-family: var(--serif);
    font-optical-sizing: auto;
    font-weight: 560;
    font-size: clamp(3.1rem, 13vw, 6.4rem);
    line-height: 0.92;
    letter-spacing: -0.02em;
    color: var(--ink);
}
.name .accent-dot { color: var(--accent); }

.role {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    margin-top: clamp(20px, 3vw, 30px);
    font-family: var(--mono);
    font-size: 0.92rem;
    letter-spacing: 0.02em;
    color: var(--ink-soft);
}
.role .at { color: var(--ink-faint); }
.role .company-logo {
    height: 19px;
    width: auto;
    /* tint the svg logo to ink */
    filter: brightness(0) saturate(100%) invert(11%) sepia(8%) saturate(900%) hue-rotate(5deg) brightness(95%);
    transform: translateY(1px);
}
.role .company-name { color: var(--ink); font-weight: 700; }

.tagline {
    margin-top: clamp(20px, 3vw, 28px);
    font-family: var(--serif);
    font-optical-sizing: auto;
    font-weight: 400;
    font-size: clamp(1.18rem, 2.7vw, 1.45rem);
    line-height: 1.45;
    letter-spacing: -0.005em;
    color: var(--ink-soft);
    max-width: 40ch;
}
.tagline strong { color: var(--ink); font-weight: 560; }

/* experience stat, pinned top-right of hero on wide screens */
.stat {
    position: absolute;
    top: clamp(30px, 6vw, 52px);
    right: 0;
    text-align: right;
    line-height: 1;
}
.stat .num {
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(2.4rem, 6vw, 3.4rem);
    color: var(--ink);
    display: block;
    letter-spacing: -0.02em;
}
.stat .lbl {
    font-family: var(--mono);
    font-size: 0.64rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-faint);
    display: block;
    margin-top: 8px;
    max-width: 130px;
    margin-left: auto;
}

/* ============================ INTRO ============================ */
.intro {
    border-top: 1px solid var(--line);
    padding-top: clamp(26px, 4vw, 38px);
}
.intro p {
    font-family: var(--serif);
    font-optical-sizing: auto;
    font-weight: 380;
    font-size: clamp(1.08rem, 2.4vw, 1.32rem);
    line-height: 1.62;
    color: var(--ink-soft);
    max-width: 56ch;
}
.intro p + p { margin-top: 1.1em; }
.intro strong { color: var(--ink); font-weight: 560; }

/* =========================== BLOCKS ============================ */
.block {
    margin-top: clamp(38px, 6vw, 58px);
}

.block-head {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 6px;
}
.block-head .idx {
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--accent);
    letter-spacing: 0.1em;
    padding-top: 2px;
}
.block-head h2 {
    font-family: var(--mono);
    font-size: 0.76rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

/* ----------------------- generic rows ------------------------- */
.rows { list-style: none; }

.row {
    position: relative;
    display: grid;
    align-items: center;
    text-decoration: none;
    color: inherit;
    border-top: 1px solid var(--line);
    transition: padding 0.4s var(--ease), background 0.4s var(--ease);
}
.rows > *:last-child { border-bottom: 1px solid var(--line); }

/* growing accent bar on the left */
.row::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.4s var(--ease);
}
a.row:hover {
    background: var(--accent-wash);
    padding-left: 16px;
}
a.row:hover::before { transform: scaleY(1); }

/* -------------------------- CTA block ------------------------- */
.cta { padding-top: 6px; }

.cta-lead {
    font-family: var(--serif);
    font-optical-sizing: auto;
    font-weight: 380;
    font-size: clamp(1.4rem, 3.4vw, 1.9rem);
    line-height: 1.4;
    letter-spacing: -0.01em;
    color: var(--ink-soft);
    max-width: 30ch;
}
.cta-lead strong { color: var(--ink); font-weight: 560; }

.cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: clamp(22px, 3vw, 30px);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 15px 24px;
    border: 1px solid var(--ink);
    transition: background 0.35s var(--ease), color 0.35s var(--ease),
                border-color 0.35s var(--ease), transform 0.35s var(--ease);
}
.btn svg { width: 16px; height: 16px; display: block; }

.btn-primary { background: var(--ink); color: var(--sheet); }
.btn-primary:hover {
    background: var(--accent-deep);
    border-color: var(--accent-deep);
    transform: translateY(-2px);
}

.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover {
    background: var(--accent-wash);
    border-color: var(--accent);
    color: var(--accent-deep);
    transform: translateY(-2px);
}

.cta-meta {
    margin-top: clamp(24px, 4vw, 34px);
    padding-top: 18px;
    border-top: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 0.74rem;
    letter-spacing: 0.06em;
    color: var(--ink-faint);
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}
.cta-meta svg { width: 15px; height: 15px; flex-shrink: 0; }
.cta-meta .dot { color: var(--line); }
.cta-meta a {
    color: var(--ink-soft);
    text-decoration: none;
    border-bottom: 1px solid var(--line);
    transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.cta-meta a:hover { color: var(--accent-deep); border-color: var(--accent); }

/* ---- venture rows ---- */
.venture {
    grid-template-columns: 40px 1fr auto;
    gap: 20px;
    padding: 26px 4px;
    align-items: start;
}
.venture .vidx {
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--ink-faint);
    padding-top: 6px;
    letter-spacing: 0.05em;
}
.venture .vbody { display: flex; flex-direction: column; gap: 8px; }
.venture .vname {
    font-family: var(--serif);
    font-size: clamp(1.4rem, 3.5vw, 1.75rem);
    font-weight: 540;
    letter-spacing: -0.01em;
    color: var(--ink);
    line-height: 1.1;
    transition: color 0.3s var(--ease);
}
.venture .vdesc {
    font-family: var(--serif);
    font-weight: 360;
    font-size: 0.98rem;
    line-height: 1.6;
    color: var(--ink-soft);
    max-width: 58ch;
}
.venture .vhost {
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    color: var(--ink-faint);
    margin-top: 2px;
}
.venture .arr {
    color: var(--ink-faint);
    padding-top: 6px;
    transition: transform 0.4s var(--ease), color 0.4s var(--ease);
}
.venture .arr svg { width: 16px; height: 16px; display: block; }
a.venture:hover .vname { color: var(--accent-deep); }
a.venture:hover .arr { color: var(--accent); transform: translate(3px, -3px); }

/* ============================ FOOTER =========================== */
.colophon {
    margin-top: clamp(40px, 6vw, 60px);
    padding-top: 18px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-faint);
}
.colophon .sig { color: var(--accent); }

/* ========================== ENTRANCE =========================== */
@keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: no-preference) {
    .masthead,
    .eyebrow,
    .name,
    .role,
    .tagline,
    .stat,
    .intro,
    .block,
    .colophon {
        opacity: 0;
        animation: rise 0.9s var(--ease) forwards;
    }
    .masthead { animation-delay: 0.05s; }
    .eyebrow  { animation-delay: 0.18s; }
    .name     { animation-delay: 0.28s; }
    .role     { animation-delay: 0.42s; }
    .tagline  { animation-delay: 0.52s; }
    .stat     { animation-delay: 0.52s; }
    .intro    { animation-delay: 0.64s; }
    .block:nth-of-type(1) { animation-delay: 0.76s; }
    .block:nth-of-type(2) { animation-delay: 0.88s; }
    .colophon { animation-delay: 1.00s; }
}

/* ========================= RESPONSIVE ========================== */
@media (max-width: 600px) {
    body {
        background-size: 22px 22px;
        align-items: stretch;
    }
    .stat {
        position: static;
        text-align: left;
        margin-top: 26px;
        display: flex;
        align-items: baseline;
        gap: 12px;
    }
    .stat .lbl { margin-left: 0; margin-top: 0; max-width: none; align-self: center; }

    .cta-actions { gap: 10px; }
    .btn { flex: 1 1 auto; justify-content: center; padding: 15px 18px; }

    .venture {
        grid-template-columns: 28px 1fr auto;
        gap: 12px;
        padding: 22px 2px;
    }
    a.row:hover { padding-left: 10px; }
}
