
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
}

:root{
    /* ---- color tokens ---- */
    --bg: #0a0e14;
    --bg-panel: #0e131b;
    --bg-elevated: #131a25;
    --line: rgba(255,255,255,0.08);
    --line-strong: rgba(255,255,255,0.14);

    --accent: #00ffa3;
    --accent-dim: #00b377;
    --accent-soft: rgba(0,255,163,0.10);

    --amber: #ffb454;
    --amber-soft: rgba(255,180,84,0.12);

    --blue: #6fb7ff;
    --blue-soft: rgba(111,183,255,0.12);

    --text: #e8ecf1;
    --text-dim: #94a0b8;
    --text-faint: #4d5566;

    /* ---- type ---- */
    --font-display: 'JetBrains Mono', 'Courier New', monospace;
    --font-body: 'Manrope', sans-serif;
}

html{
    font-size: 62.5%;
    overflow-x: hidden;
}

body{
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    background-image:
        radial-gradient(circle at 1px 1px, rgba(255,255,255,0.045) 1px, transparent 0);
    background-size: 28px 28px;
}

a{ color: inherit; }

::selection{
    background: var(--accent-soft);
    color: var(--accent);
}

/* visible keyboard focus everywhere */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible{
    outline: .2rem solid var(--accent);
    outline-offset: .3rem;
    border-radius: .3rem;
}

@media (prefers-reduced-motion: reduce){
    *{
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   Header / Nav
   ========================================================================== */

.header{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 9%;
    background: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    transition: background .3s ease, border-color .3s ease;
    border-bottom: .1rem solid transparent;
}

.header.sticky{
    background: rgba(10, 14, 20, 0.85);
    backdrop-filter: blur(1rem);
    -webkit-backdrop-filter: blur(1rem);
    border-bottom: .1rem solid var(--line);
}

.logo{
    font-family: var(--font-display);
    font-size: 2.1rem;
    color: var(--text);
    font-weight: 700;
    letter-spacing: -.02rem;
}

.logo-suffix{
    color: var(--accent);
}

.navbar{
    display: flex;
    align-items: center;
}

.navbar a {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--text-dim);
    font-weight: 500;
    margin-left: 3rem;
    transition: color .25s;
    position: relative;
}

.navbar a:hover,
.navbar a.active{
    color: var(--accent);
}

.navbar a.active::before{
    content: '';
    position: absolute;
    left: 50%;
    bottom: -.8rem;
    transform: translateX(-50%);
    width: .5rem;
    height: .5rem;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 .8rem var(--accent);
}

#menu-icon{
    font-size: 3.2rem;
    color: var(--text);
    cursor: pointer;
    display: none;
}

/* ==========================================================================
   Shared section scaffolding
   ========================================================================== */

section{
    padding: 10rem 9% 8rem;
}

.eyebrow{
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: .15rem;
    color: var(--accent);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: .8rem;
    margin-bottom: 1.6rem;
}

.eyebrow.center{
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
}

.status-dot{
    width: .8rem;
    height: .8rem;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 0 var(--accent-soft);
    animation: pulse 2.4s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes pulse{
    0%   { box-shadow: 0 0 0 0 rgba(0,255,163,.45); }
    70%  { box-shadow: 0 0 0 .9rem rgba(0,255,163,0); }
    100% { box-shadow: 0 0 0 0 rgba(0,255,163,0); }
}

.heading {
    font-family: var(--font-display);
    font-size: 4.2rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 4rem;
    letter-spacing: -.05rem;
}

section:not(.home) .heading{
    text-align: center;
}

.heading span{
    color: var(--accent);
}

/* scroll-reveal */
[data-reveal]{
    opacity: 0;
    transform: translateY(2.4rem);
    transition: opacity .7s ease, transform .7s ease;
}
[data-reveal].is-visible{
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn-box{
    position: relative;
    display: flex;
    gap: 1.6rem;
    flex-wrap: wrap;
}

.btn {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: .7rem;
    padding: 1.4rem 2.6rem;
    background: var(--accent);
    border: .15rem solid var(--accent);
    border-radius: .6rem;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: .03rem;
    color: var(--bg);
    z-index: 1;
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease, color .25s ease, background .25s ease;
}

.btn:hover{
    transform: translateY(-.2rem);
    box-shadow: 0 .8rem 2rem rgba(0,255,163,.18);
}

.btn-outline{
    background: transparent;
    color: var(--accent);
}

.btn-outline:hover{
    background: var(--accent-soft);
}

.btn-disabled{
    background: transparent;
    color: var(--text-dim);
    border-color: var(--line-strong);
    cursor: default;
}
.btn-disabled:hover{
    transform: none;
    box-shadow: none;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.home{
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 12rem 9% 6rem;
}

.home-grid{
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 5rem;
    align-items: center;
    width: 100%;
}

.home-content h1 {
    font-family: var(--font-display);
    font-size: 4.6rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -.07rem;
}

.home-content h1 span {
    color: var(--text);
}

.role-line{
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 600;
    color: var(--accent);
    margin: 1.4rem 0 2rem;
}

.role-line .prompt{
    color: var(--text-faint);
    margin-right: .8rem;
}

.role-cursor{
    display: inline-block;
    margin-left: .2rem;
    animation: blink 1.1s steps(1) infinite;
}

@keyframes blink{
    50%{ opacity: 0; }
}

.home-desc {
    font-size: 1.6rem;
    line-height: 1.7;
    color: var(--text-dim);
    max-width: 50rem;
    margin: 0 0 3.6rem;
}

.home-sci{
    display: flex;
    gap: 1.4rem;
    margin-top: 3.6rem;
}

.home-sci a {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4.2rem;
    height: 4.2rem;
    background: var(--bg-elevated);
    border: .15rem solid var(--line-strong);
    border-radius: 50%;
    font-size: 1.9rem;
    color: var(--text-dim);
    transition: .3s;
}

.home-sci a:hover{
    color: var(--bg);
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-.2rem);
}

/* ---- terminal panel (signature element) ---- */

.terminal-panel{
    background: var(--bg-panel);
    border: .1rem solid var(--line-strong);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 2rem 5rem rgba(0,0,0,.4);
}

.terminal-head{
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: 1.2rem 1.6rem;
    background: var(--bg-elevated);
    border-bottom: .1rem solid var(--line);
}

.t-dot{
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
}
.t-dot.red{ background: #ff5f57; }
.t-dot.yellow{ background: #febc2e; }
.t-dot.green{ background: #28c840; }

.terminal-title{
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--text-faint);
    margin-left: .8rem;
}

.terminal-body{
    padding: 2.2rem 2rem;
    min-height: 26rem;
}

.terminal-lines{
    font-family: var(--font-display);
    font-size: 1.3rem;
    line-height: 1.9;
    color: var(--text-dim);
    white-space: pre-wrap;
    word-break: break-word;
    min-height: 11rem;
}

.terminal-lines .ln-prompt{ color: var(--accent); }
.terminal-lines .ln-ok{ color: var(--text); }

.status-grid{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    margin-top: 1.6rem;
    opacity: 0;
    transform: translateY(1rem);
    transition: opacity .6s ease, transform .6s ease;
}

.status-grid.is-visible{
    opacity: 1;
    transform: translateY(0);
}

.stat-card{
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: 1.4rem 1.4rem;
    background: var(--bg-elevated);
    border: .1rem solid var(--line);
    border-radius: .7rem;
}

.stat-value{
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label{
    font-size: 1.15rem;
    color: var(--text-faint);
    letter-spacing: .02rem;
}

/* ==========================================================================
   About
   ========================================================================== */

.about{
    background: var(--bg-panel);
}

.about-row{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6rem;
    flex-wrap: wrap;
}

.about-img{
    position: relative;
    width: 25rem;
    height: 25rem;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.about-img img{
    width: 90%;
    border-radius: 50%;
    border: .2rem solid var(--accent);
    object-fit: cover;
    aspect-ratio: 1 / 1;
}

.about-img .circle-spin{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(0);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border-top: .2rem solid var(--bg-panel);
    border-bottom: .2rem solid var(--bg-panel);
    border-left: .2rem solid var(--accent-dim);
    border-right: .2rem solid var(--accent-dim);
    animation: spin 9s linear infinite;
}

@keyframes spin{
    to{ transform: translate(-50%, -50%) rotate(360deg); }
}

.about-content{
    max-width: 50rem;
}

.about-content h3{
    font-family: var(--font-display);
    font-size: 2.4rem;
    margin-bottom: 1.6rem;
}

.about-content p{
    font-size: 1.55rem;
    line-height: 1.75;
    color: var(--text-dim);
    margin: 0 0 3rem;
}

/* ==========================================================================
   Experience — changelog
   ========================================================================== */

.experience{
    max-width: 90rem;
    margin: 0 auto;
}

.changelog{
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.release{
    background: var(--bg-elevated);
    border: .1rem solid var(--line);
    border-left: .3rem solid var(--accent);
    border-radius: .8rem;
    padding: 2.6rem 3rem;
}

.release-meta{
    display: flex;
    align-items: center;
    gap: 1.6rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.version{
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--bg);
    background: var(--accent);
    padding: .3rem .9rem;
    border-radius: .4rem;
}

.date{
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--text-faint);
    display: flex;
    align-items: center;
    gap: .5rem;
}

.release h3{
    font-size: 2.1rem;
    margin-bottom: 1.6rem;
}

.release h3 .at{
    color: var(--text-dim);
    font-weight: 400;
    font-size: 1.7rem;
}

.changelist{
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.changelist li{
    font-size: 1.5rem;
    line-height: 1.65;
    color: var(--text-dim);
    display: flex;
    gap: 1.2rem;
    align-items: baseline;
}

.tag{
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    padding: .25rem .7rem;
    border-radius: .4rem;
    flex-shrink: 0;
    text-transform: uppercase;
}

.tag.perf{ color: var(--accent); background: var(--accent-soft); }
.tag.feat{ color: var(--amber); background: var(--amber-soft); }
.tag.ops{ color: var(--blue); background: var(--blue-soft); }

/* ==========================================================================
   Projects
   ========================================================================== */

.projects{
    background: var(--bg-panel);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(32rem, 1fr));
    gap: 2.4rem;
    max-width: 130rem;
    margin: 0 auto;
}

.project-card {
    background: var(--bg-elevated);
    border: .1rem solid var(--line);
    border-radius: .9rem;
    padding: 2.8rem 2.4rem;
    text-align: left;
    transition: border-color .3s, transform .3s;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-.4rem);
    border-color: var(--accent-dim);
}

.card-top{
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.8rem;
}

.project-icon {
    font-size: 3rem;
    color: var(--accent);
}

.status-badge{
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: .03rem;
    padding: .4rem .9rem;
    border-radius: .4rem;
    white-space: nowrap;
}

.status-badge.green{ color: var(--accent); background: var(--accent-soft); border: .1rem solid rgba(0,255,163,.25); }
.status-badge.amber{ color: var(--amber); background: var(--amber-soft); border: .1rem solid rgba(255,180,84,.25); }

.project-card h3 {
    font-family: var(--font-display);
    font-size: 1.9rem;
    margin-bottom: 1.2rem;
    color: var(--text);
}

.project-card p {
    font-size: 1.4rem;
    color: var(--text-dim);
    margin-bottom: 2rem;
    line-height: 1.65;
    flex-grow: 1;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    margin-bottom: 2.2rem;
}

.tech-stack span {
    background: transparent;
    border: .1rem solid var(--line-strong);
    color: var(--text-dim);
    padding: .4rem 1rem;
    font-family: var(--font-display);
    font-size: 1.1rem;
    border-radius: .4rem;
}

.card-links{
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.project-card .btn {
    padding: .9rem 1.6rem;
    font-size: 1.3rem;
}

.more-builds{
    max-width: 130rem;
    margin: 5rem auto 0;
    text-align: center;
}

.more-label{
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--text-faint);
    margin-bottom: 1.6rem;
}

.more-list{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.2rem;
    margin-bottom: 3rem;
}

.more-list a{
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--text-dim);
    border: .1rem solid var(--line-strong);
    border-radius: .6rem;
    padding: 1rem 1.6rem;
    transition: .25s;
}

.more-list a:hover{
    color: var(--accent);
    border-color: var(--accent-dim);
}

.view-all{
    display: inline-flex;
}

/* ==========================================================================
   Skills
   ========================================================================== */

.skills{
    background: var(--bg);
}

.stack-groups{
    max-width: 100rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2.8rem;
}

.stack-group{
    display: flex;
    gap: 2.4rem;
    align-items: flex-start;
    flex-wrap: wrap;
    padding-bottom: 2.8rem;
    border-bottom: .1rem solid var(--line);
}

.stack-group:last-child{
    border-bottom: none;
}

.group-label{
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: .1rem;
    text-transform: uppercase;
    width: 11rem;
    flex-shrink: 0;
    padding-top: 1rem;
}

.skills-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    flex: 1;
}

.skill-badge {
    display: flex;
    align-items: center;
    gap: .9rem;
    background: var(--bg-elevated);
    border: .1rem solid var(--line-strong);
    padding: 1rem 1.8rem;
    border-radius: .7rem;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text);
    transition: .3s ease;
    cursor: default;
}

.skill-badge i {
    font-size: 2rem;
    color: var(--accent);
    transition: .3s ease;
}

.skill-badge:hover {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
}

.skill-badge:hover i {
    color: var(--bg);
}

/* ==========================================================================
   Connect
   ========================================================================== */

.connect{
    background: var(--bg-panel);
    text-align: center;
}

.connect-desc{
    max-width: 56rem;
    margin: 0 auto 3.6rem;
    font-size: 1.6rem;
    line-height: 1.7;
    color: var(--text-dim);
}

.connect-actions{
    justify-content: center;
}

.connect-sci{
    justify-content: center;
    margin-top: 4rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.4rem;
    padding: 3rem 9%;
    background: var(--bg-panel);
    border-top: .1rem solid var(--line);
}

.footer-text p{
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--text-faint);
}

.footer-iconTop a{
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4.2rem;
    height: 4.2rem;
    background: var(--accent);
    border-radius: .7rem;
    transition: .3s;
}

.footer-iconTop a:hover{
    transform: translateY(-.3rem);
    box-shadow: 0 .6rem 1.6rem rgba(0,255,163,.25);
}

.footer-iconTop a i {
    font-size: 2.2rem;
    color: var(--bg);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1200px) {
    html { font-size: 56%; }
}

@media (max-width: 991px) {
    .header{ padding: 2rem 4%; }
    section{ padding: 9rem 4% 6rem; }
    .home{ padding: 11rem 4% 5rem; }
    .footer{ padding: 2.4rem 4%; }

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

    .terminal-panel{
        order: 2;
    }

    .about-row{
        flex-direction: column;
        text-align: center;
        gap: 3.6rem;
    }

    .stack-group{
        flex-direction: column;
        gap: 1.4rem;
    }

    .group-label{
        padding-top: 0;
    }
}

@media (max-width: 768px){
    .header{
        background: rgba(10,14,20,.92);
        backdrop-filter: blur(1rem);
    }

    #menu-icon{ display: block; }

    .navbar {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem 4% 2rem;
        background: var(--bg-panel);
        border-bottom: .1rem solid var(--line);
        max-height: 0;
        overflow: hidden;
        visibility: hidden;
        transition: max-height .3s ease, visibility 0s linear .3s;
    }

    .navbar.active{
        max-height: 40rem;
        visibility: visible;
        transition: max-height .3s ease, visibility 0s linear 0s;
    }

    .navbar a{
        display: block;
        font-size: 1.8rem;
        margin: 1.4rem 0;
    }

    .navbar a.active::before{
        left: -1.4rem;
        bottom: 50%;
        transform: translateY(50%);
    }

    .home{ min-height: auto; }

    .home-content h1{ font-size: 3.6rem; }

    .heading{ font-size: 3.2rem; }
}

@media (max-width: 480px){
    .status-grid{ grid-template-columns: 1fr 1fr; }
    .btn-box{ width: 100%; }
    .btn{ flex: 1 1 auto; }
}