/* ============================================================
   FONTS — two families only: JetBrains Mono (display/utility)
   and IBM Plex Sans (body). Kept deliberately narrow so the
   type system reads as one voice, not a font sampler.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

/* ============================================================
   TOKENS
   ============================================================ */
:root{
    /* surfaces */
    --void: #05060a;
    --panel: #0d1017;
    --panel-2: #10141f;
    --line: #1c2230;
    --line-bright: #2a3244;

    /* text */
    --text-primary: #f3f5f8;
    --text-secondary: #a6aec1;
    --text-tertiary: #5b6478;

    /* signal accents — used with a fixed role each, never interchangeably */
    --cyan: #6ee7d8;      /* primary interactive: links, primary buttons, focus */
    --cyan-dim: rgba(110, 231, 216, .12);
    --violet: #9b8cff;    /* secondary: hover depth, one heading highlight */
    --violet-dim: rgba(155, 140, 255, .12);
    --amber: #ffb454;     /* tags / small indicators only */
    --amber-dim: rgba(255, 180, 84, .12);

    --font-display: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;
    --font-body: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;

    --container: 1180px;

    --radius-s: 10px;
    --radius-m: 18px;
    --radius-l: 28px;
    --radius-full: 999px;

    --glow-cyan: 0 0 32px rgba(110, 231, 216, .18);
    --glow-violet: 0 0 32px rgba(155, 140, 255, .18);

    --ease: cubic-bezier(.4, 0, .2, 1);

    --space-1: .5rem;
    --space-2: 1rem;
    --space-3: 1.5rem;
    --space-4: 2rem;
    --space-5: 3rem;
    --space-6: 4rem;
    --space-7: 6rem;

    --section-pad: clamp(4.5rem, 9vw, 8rem);

    --hero-image-size: clamp(220px, 28vw, 420px);

    --step-hero: clamp(2.75rem, 4vw + 1.5rem, 5.25rem);
    --step-h1: clamp(1.9rem, 1.6vw + 1.3rem, 2.6rem);
    --step-h2: clamp(1.05rem, .3vw + .95rem, 1.2rem);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*{ margin: 0; padding: 0; box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
    background-color: var(--void);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

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

a{ color: inherit; }

ul{ list-style: none; }

h1, h2, h3{
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -.01em;
}

h1:hover, h2:hover, h3:hover, p:hover{ cursor: default; }

:focus-visible{
    outline: 2px solid var(--cyan);
    outline-offset: 3px;
    border-radius: 4px;
}

.skip-link{
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--cyan);
    color: var(--void);
    padding: .75rem 1.25rem;
    border-radius: 0 0 var(--radius-s) 0;
    font-family: var(--font-display);
    font-weight: 600;
    z-index: 10000;
}
.skip-link:focus{ left: 0; }

main{ display: block; }

.section{
    padding-block: var(--section-pad);
    padding-inline: max(6vw, calc((100vw - var(--container)) / 2));
}

.section-header{ margin-bottom: var(--space-5); }

.section-header__row{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3) var(--space-4);
    margin-top: var(--space-2);
}

.section-title{
    font-size: var(--step-h1);
    color: var(--text-primary);
    max-width: 20ch;
}

.body-copy{
    font-family: var(--font-body);
    color: var(--text-tertiary);
    font-size: .95rem;
    max-width: 62ch;
    margin-top: var(--space-2);
}

.body-copy:first-of-type{ margin-top: var(--space-3); }

.muted{ color: var(--text-tertiary); font-size: .85rem; }

.text-green{ color: var(--cyan); }
.text-purple{ color: var(--violet); }

/* ============================================================
   TERMINAL EYEBROW — the site's recurring signature motif.
   Every section is introduced like a command being run,
   a nod to the fact the person building it is a developer.
   ============================================================ */
.eyebrow{
    display: inline-flex;
    align-items: center;
    gap: .6em;
    font-family: var(--font-display);
    font-size: .8rem;
    letter-spacing: .04em;
    color: var(--cyan);
    background: var(--cyan-dim);
    border: 1px solid rgba(110, 231, 216, .25);
    border-radius: var(--radius-full);
    padding: .4em 1em;
}

.eyebrow--center{ display: flex; width: fit-content; margin-inline: auto; margin-bottom: var(--space-4); }

.eyebrow__dot{
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 0 3px var(--cyan-dim);
    animation: pulse-dot 2.4s ease-in-out infinite;
    flex-shrink: 0;
}

/* ============================================================
   BUTTONS & TAGS
   ============================================================ */
.btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6em;
    height: 48px;
    padding-inline: 1.6em;
    border-radius: var(--radius-full);
    font-family: var(--font-display);
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .02em;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease), color .3s var(--ease);
}

.btn:hover{ transform: translateY(-3px); }

.btn--primary{
    background: var(--cyan);
    color: var(--void);
}
.btn--primary:hover{ box-shadow: var(--glow-cyan); background: #86f0e2; }

.btn--ghost{
    background: var(--panel-2);
    border-color: var(--line-bright);
    color: var(--text-primary);
}
.btn--ghost:hover{ border-color: var(--violet); box-shadow: var(--glow-violet); }
.btn--ghost img{ height: 16px; }

.btn--outline{
    background: transparent;
    border-color: var(--line-bright);
    color: var(--text-secondary);
    height: 42px;
}
.btn--outline:hover{ border-color: var(--cyan); color: var(--cyan); }

.pill-link{
    display: inline-flex;
    align-items: center;
    height: 38px;
    padding-inline: 1.1em;
    border-radius: var(--radius-full);
    background: var(--panel-2);
    border: 1px solid var(--line);
    color: var(--text-secondary);
    font-family: var(--font-display);
    font-size: .78rem;
    text-decoration: none;
    transition: border-color .3s var(--ease), color .3s var(--ease), transform .3s var(--ease);
}
.pill-link:hover{ border-color: var(--violet); color: var(--text-primary); transform: translateY(-2px); }

.tag{
    display: inline-block;
    font-family: var(--font-display);
    font-size: .72rem;
    letter-spacing: .02em;
    padding: .5em .9em;
    border-radius: var(--radius-full);
    background: var(--panel-2);
    border: 1px solid var(--line);
    color: var(--text-secondary);
}
.tag--violet{ color: var(--violet); border-color: rgba(155,140,255,.3); background: var(--violet-dim); }
.tag--cyan{ color: var(--cyan); border-color: rgba(110,231,216,.3); background: var(--cyan-dim); }
.tag--amber{ color: var(--amber); border-color: rgba(255,180,84,.3); background: var(--amber-dim); }

.tag-list{
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: var(--space-2);
}
.tag-list li{
    font-family: var(--font-body);
    font-size: .8rem;
    color: var(--text-secondary);
    background: var(--void);
    border: 1px solid var(--line);
    border-radius: var(--radius-full);
    padding: .45em .9em;
}

/* ============================================================
   REVEAL ANIMATION — progressive enhancement.
   Only hides content once JS has confirmed it can run;
   without JS the page renders fully visible.
   ============================================================ */
html.js .jsanimate{
    opacity: 0;
    transform: translateY(40px) scale(.98);
    transition: opacity .9s var(--ease), transform .9s var(--ease);
    will-change: opacity, transform;
}
html.js .jsanimate.is-visible{ opacity: 1; transform: translateY(0) scale(1); }

html.js .heading-animate.is-visible{ animation: pop .8s var(--ease); }
html.js .btn.is-visible{ animation: bounce 1s var(--ease); }
html.js .card.is-visible{ animation: bounce 1s var(--ease); }

/* ============================================================
   BACKGROUND FX
   ============================================================ */
.bg-fx{ position: fixed; inset: 0; z-index: -1000; pointer-events: none; }

.bg-fx__lights img{
    height: 100vh; width: 100vw;
    object-fit: cover;
    opacity: .18;
}

.bg-fx__cursor img{
    height: 560px;
    position: fixed;
    opacity: .25;
}

#cursorLightPng{
    position: fixed;
    pointer-events: none;
    transform: translate(-50%, -50%);
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
#site-header{
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 9999;
    background: rgba(5, 6, 10, .55);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}

.site-header__inner{
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 6vw;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
}

.brand{ flex-shrink: 0; }
.brand img{ height: 34px; }

.nav-toggle{
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--line-bright);
    border-radius: var(--radius-s);
}
.nav-toggle span{
    display: block;
    height: 2px;
    width: 18px;
    margin-inline: auto;
    background: var(--text-primary);
    transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav-toggle.is-active span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2){ opacity: 0; }
.nav-toggle.is-active span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

.nav__panel{
    display: flex;
    align-items: center;
    gap: var(--space-5);
}

.nav__links{ display: flex; gap: 2vw; }

.nav__links a{
    flex-shrink: 0;
    font-size: .8rem;
    font-family: var(--font-display);
    text-decoration: none;
    color: var(--text-tertiary);
    letter-spacing: .02em;
    transition: color .3s var(--ease);
    position: relative;
}
.nav__links a::after{
    content: '';
    position: absolute;
    left: 0; bottom: -6px;
    width: 0; height: 1px;
    background: var(--cyan);
    transition: width .3s var(--ease);
}
.nav__links a:hover{ color: var(--text-primary); }
.nav__links a:hover::after, .nav__links a.is-active::after{ width: 100%; }
.nav__links a.is-active{ color: var(--cyan); }

.nav__socials{ display: flex; gap: .6vw; }

.nav__socials a{ flex-shrink: 0; }

.nav__socials img{
    height: 30px;
    width: 30px;
    flex-shrink: 0;
    object-fit: contain;
    border-radius: 50%;
    padding: 6px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.nav__socials a:hover img{ transform: translateY(-2px); border-color: var(--violet); }

@media (max-width: 1080px){
    .nav-toggle{ display: flex; }

    .nav__panel{
        position: fixed;
        top: 76px; left: 0; right: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-4);
        background: var(--panel);
        border-bottom: 1px solid var(--line);
        padding: var(--space-4) 6vw var(--space-5);
        transform: translateY(-8px);
        opacity: 0;
        pointer-events: none;
        transition: transform .35s var(--ease), opacity .3s var(--ease);
    }
    .nav__panel.is-open{ transform: translateY(0); opacity: 1; pointer-events: auto; }

    .nav__links{ flex-direction: column; gap: var(--space-2); }
}

/* ============================================================
   HERO
   ============================================================ */
.hero{ padding-top: calc(76px + var(--section-pad)); }

.hero__grid{
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    align-items: center;
    gap: var(--space-6);
}

.hero__content{ display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); }

.hero__tags{ display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .25rem; }

.hero__lead{
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-top: var(--space-3);
}

.hero__name{
    font-size: var(--step-hero);
    color: var(--text-primary);
    letter-spacing: -.02em;
    background: linear-gradient(100deg, var(--text-primary) 40%, var(--cyan) 75%, var(--violet) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cursor-blink{
    display: inline-block;
    color: var(--cyan);
    -webkit-text-fill-color: var(--cyan);
    animation: blink 1.1s step-end infinite;
}

.hero__desc{
    color: var(--text-tertiary);
    max-width: 46ch;
    margin-top: var(--space-1);
}

.hero__actions{ display: flex; flex-wrap: wrap; gap: 1rem; margin-top: var(--space-3); }

.hero__contacts{ display: flex; flex-wrap: wrap; gap: .6rem; margin-top: var(--space-4); }

.hero-image{ display: flex; justify-content: center; }
.hero-image img{
    height: var(--hero-image-size);
    width: auto;
    max-width: 100%;
    object-fit: contain;
    transition: transform .5s var(--ease);
}
.hero-image img:hover{ transform: scale(1.04); }

/* ============================================================
   ABOUT
   ============================================================ */
.about__layout{
    display: grid;
    grid-template-columns: auto 1px 1fr;
    align-items: center;
    gap: var(--space-6);
}

.vrline{ border: none; width: 1px; height: 100%; min-height: 260px; background: var(--line-bright); }

.about__content{ display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-1); }
.about__content .section-title{ max-width: 22ch; margin-top: var(--space-2); }

/* ============================================================
   CARD GRID (skills / certifications)
   ============================================================ */
.card-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-3);
}

.card{
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: .5rem;
    transition: transform .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease);
}

.card:hover{
    transform: translateY(-4px);
    border-color: rgba(110, 231, 216, .35);
    box-shadow: var(--glow-cyan);
}

.card h3{ font-size: 1.05rem; color: var(--text-primary); }

.card--wide{ max-width: 640px; }
.card--wide .btn{ margin-top: var(--space-2); align-self: flex-start; }

.card--cert{ padding: 0 0 var(--space-4); overflow: hidden; align-items: flex-start; }

.card__media{
    width: 100%;
    aspect-ratio: 4 / 3;
    background: var(--void);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}
.card__media img{ height: 100%; width: 100%; object-fit: cover; }

.card--cert > *:not(.card__media){ margin-inline: var(--space-3); }
.card--cert .tag{ margin-top: var(--space-3); width: fit-content; }

.view-cert{
    display: inline-flex;
    align-items: center;
    gap: .4em;
    text-decoration: none;
    font-family: var(--font-display);
    color: var(--cyan);
    font-size: .8rem;
    margin-top: .25rem;
}
.view-cert img{ height: 13px; }
.view-cert:hover{ text-decoration: underline; }

/* ============================================================
   STORY
   ============================================================ */
.story__layout{
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
    text-align: center;
}

.story-col{ display: flex; flex-direction: column; gap: var(--space-3); }
.story-col > h2{ font-size: 1.1rem; color: var(--amber); letter-spacing: .08em; }

.storycard{
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    border-radius: var(--radius-m);
    border: 1px solid transparent;
    text-align: left;
    transition: background .4s var(--ease), border-color .4s var(--ease), transform .4s var(--ease);
}
.storycard:hover{
    background: var(--panel);
    border-color: var(--line-bright);
    transform: translateY(-4px);
}

.storycard__icon{ flex-shrink: 0; }
.storycard__icon img{ height: 32px; width: 32px; opacity: .85; }

.storycard__body h3{ font-size: .95rem; color: var(--text-primary); }
.storycard__body p{ font-size: .85rem; color: var(--text-secondary); margin-top: .2rem; }
.storycard__body .muted{ margin-top: .2rem; }

.story__portrait{
    display: flex;
    align-items: center;
    justify-content: center;
    order: -1;
}
.story__portrait img{
    height: clamp(200px, 24vw, 320px);
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

@media (min-width: 900px){
    .story__layout{
        grid-template-columns: 1fr minmax(220px, 300px) 1fr;
        align-items: center;
        text-align: left;
    }
    .story-col > h2{ text-align: left; }
    #storyright, #storyright .storycard{ text-align: right; }
    #storyright .storycard{ flex-direction: row-reverse; }
    .story__portrait{ order: 0; }
}

/* ============================================================
   CONTACT / FOOTER
   ============================================================ */
.contact{ text-align: center; display: flex; flex-direction: column; align-items: center; }
.contact__title{ max-width: none; }
.contact__lead{ max-width: 46ch; margin-inline: auto; }
.contact__actions{ margin-top: var(--space-4); }
.contact__socials{ margin-top: var(--space-4); justify-content: center; }

.site-footer{
    text-align: center;
    padding: var(--space-4) 6vw var(--space-5);
    border-top: 1px solid var(--line);
}
.site-footer p{
    font-family: var(--font-display);
    font-size: .75rem;
    color: var(--text-tertiary);
    letter-spacing: .04em;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px){
    .hero__grid{ grid-template-columns: 1fr; }
    .hero__portrait{ order: -1; }
    .hero__content{ align-items: center; text-align: center; }
    .hero__tags, .hero__actions, .hero__contacts{ justify-content: center; }

    .about__layout{ grid-template-columns: 1fr; text-align: center; }
    .about__content{ align-items: center; }
    .vrline{ width: 60%; height: 1px; min-height: 0; }
}

@media (max-width: 560px){
    .section-header__row{ flex-direction: column; align-items: flex-start; }
    .hero__actions{ width: 100%; }
    .hero__actions .btn{ flex: 1; }
}

/* ============================================================
   MOTION PREFERENCES
   ============================================================ */
@media (prefers-reduced-motion: reduce){
    html{ scroll-behavior: auto; }
    html.js .jsanimate,
    html.js .heading-animate,
    html.js .btn,
    html.js .card{
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
        transition: none !important;
    }
    .eyebrow__dot, .cursor-blink{ animation: none !important; }
    .bg-fx__cursor{ display: none !important; }
}

