:root {
    --bg: #0e0e0e;
    --bg-soft: #12161C;
    --card: #161B22;
    --border: #232A34;
    --text: #EDEFF2;
    --text-dim: #8B96A5;
    --accent: #f64949;
    --accent-soft: #2f2727;
    --steel: #5ef447;
    --white: rgb(222, 222, 222);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;

    /* if you want to make nav sticky use this  */
    /* padding-top: 78px; */
}

h1,
h2,
h3 {
    font-family: 'Space Grotesk', sans-serif;
}

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

.mono {
    font-family: 'JetBrains Mono', monospace;
}

.wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 32px;
}

/* NAV */


nav {

    display: flex;

    color: var(--color-white);

    justify-content: space-between;
    align-items: center;

    margin-top: 0;
    padding: 10px;

    /* if you want to make nav sticky use this  */
    /* 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100; */

    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

nav a {
    color: var(--bg);
    text-decoration: none;
}

.available-for-work {

    margin-left: 20px;

}

nav .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}


.badge {

    display: flex;
    align-items: center;
    gap: 8px;

    font-family: var(--nav-font);
    font-size: 20px;
    font-weight: 400;

    color: white;
    background: transparent;

    border: 1px solid var(--accent-soft);
    border-radius: 100px;

    padding: 8px 20px;
    transition: transform 420ms cubic-bezier(0.34, 1.56, 0.64, 1),
        background-color 260ms ease, border-color 260ms ease, box-shadow 260ms ease;
}

.badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--steel);
    animation: pulse 2s infinite;
}

.badge:hover {

    transform: translateY(-2px) scale(1.06);

    background-color: rgb(2, 2, 2);

    border: 1px solid black;
    border-radius: 100px;

    text-shadow: 0 0 15px rgb(255, 255, 255);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    color: var(--white);
}

.links {

    display: inline-block;

    background: transparent;

    border: 1px solid var(--accent-soft);
    border-radius: 100px;

    padding: 10px 20px;

    font-family: var(--nav-font);
    font-size: 25px;
    font-weight: 500;

}

.links a {

    display: inline-block;
    position: relative;
    padding: 0 20px;
    color: white;
    transform-origin: left center;
    background-color: transparent;
    transition: 300ms ease-in;
}

.links a:hover {

    transform: scaleX(1.1);
    color: black;
    background-color: var(--white);
    border-radius: 100px;

    text-shadow: 0 0 15px rgb(255, 255, 255);
    box-shadow: 0 7px 18px rgba(0, 0, 0, 0.24);
}

.email a {
    color: var(--white);
}

.email {

    background: transparent;
    border: 1px solid var(--accent-soft);
    border-radius: 100px;
    padding: 8px 20px;

    margin-right: 20px;
    font-family: var(--nav-font);
    font-weight: 400;
    font-size: 20px;

    transition: transform 420ms cubic-bezier(0.34, 1.56, 0.64, 1),
        background-color 260ms ease, border-color 260ms ease, box-shadow 260ms ease;
}

.email:hover {

    transform: translateY(-2px) scale(1.06);

    background-color: rgb(2, 2, 2);

    border: 1px solid black;
    border-radius: 100px;

    text-shadow: 0 0 15px rgb(255, 255, 255);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.email:hover a {
    color: var(--white);
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* HERO */
.hero {
    padding: 120px 0 100px;
}

.hero-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--steel);
    margin-bottom: 20px;
    letter-spacing: 0.02em;
}

.hero h1 {
    font-size: clamp(2rem, 5vw + 1rem, 4.6rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

.hero h1 .fade {
    color: var(--text-dim);
    font-weight: 500;
}

.hero h1 .accent {
    color: var(--accent);
}

.hero p.lede {
    font-size: 1.15rem;
    color: var(--text-dim);
    max-width: 520px;
    margin-bottom: 36px;
}

.cta-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 56px;
}

.btn {
    padding: 13px 26px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all .2s;
    display: inline-block;
}

.btn-primary {
    background: white;
    color: #1A1206;
    font-weight: 400;

    transition: 300ms ease;
}

.btn-ghost {
    border: 1px solid var(--border);
    color: black;
    font-weight: 400;
    background: rgb(255, 132, 0);
    transition: 300ms ease;
}

.meta-row {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    font-size: 0.88rem;
    color: var(--text-dim);
}

.meta-row span {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* TERMINAL SIGNATURE */
.terminal {
    margin-top: 60px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    max-width: 640px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-soft);
}

.terminal-bar .tdot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.t1 {
    background: #FF5F56;
}

.t2 {
    background: #FFBD2E;
}

.t3 {
    background: #27C93F;
}

.terminal-bar span {
    margin-left: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.terminal-body {
    padding: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    overflow-x: auto;
}

.terminal-body .line {
    margin-bottom: 8px;
    word-break: break-word;
}

.prompt {
    color: var(--steel);
}

.cmd {
    color: var(--text);
}

.resp-key {
    color: var(--accent);
}

.resp-str {
    color: #7FCDA8;
}

.cursor {
    display: inline-block;
    width: 7px;
    height: 14px;
    background: var(--accent);
    animation: blink 1s infinite;
    vertical-align: middle;
}

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

/* SECTION HEADERS */
.section {
    padding: 100px 0;
    border-top: 1px solid var(--border);
}

.section-head {
    margin-bottom: 56px;
    text-align: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent);
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.section-head h2 {
    font-size: clamp(1.5rem, 3vw + 1rem, 2.6rem);
    letter-spacing: -0.02em;
}

/* ABOUT */
.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 60px;
    align-items: start;
}

.about-grid p {
    color: var(--text-dim);
    margin-bottom: 18px;
    font-size: 1.02rem;
}

.fact-warp {
    display: flex;
}

.fact-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.fact {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px 20px;
}

.fact-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--steel);
    margin-bottom: 6px;
}

.fact-value {
    font-size: 0.98rem;
    word-break: break-word;
}

.sv-icon {
    position: relative;
    bottom: 5px;
    margin-right: 5px;
    height: 23px;
}

/* SKILLS MARQUEE */
.marquee-wrap {
    overflow: hidden;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 28px 0;
    background: var(--bg-soft);
}

.marquee {
    display: flex;
    gap: 48px;
    width: max-content;
    animation: scroll 28s linear infinite;
}

.marquee span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    color: var(--text-dim);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 10px;
}

.marquee span::before {
    content: '/';
    color: var(--accent);
}

@keyframes scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* TECH STACK GRID */
.stack-grid {
    background-color: black;
    margin: 0 30px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--border);
    border-left: 1px solid var(--border);
}


.stack-grid-2 {
    background-color: black;
    margin: 0 30px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--border);
    border-left: 1px solid var(--border);
}

.stack-cell {
    position: relative;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 36px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
    transition: 300ms ease-in;
}

.stack-cell:hover {
    background: #fff;
}

.stack-cell.is-active {
    background: #fff;
}

.stack-icon {
    width: 60px;
    height: 400px;
    border-radius: 10px;

    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    flex-shrink: 0;
}

.stack-icon img {
    transition: filter .2s ease;
}

.stack-cell:hover .stack-icon img {
    filter: brightness(0);
}

.stack-cell.is-active .stack-icon img {
    filter: brightness(0);
}

.stack-cell::after {
    content: attr(data-stack-name);
    position: absolute;
    left: 50%;
    top: 305px;
    transform: translateX(-50%);
    color: #000;
    z-index: 2;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.3rem;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .3s ease-out;
    transition-delay: 0s;
}

.stack-cell:hover::after {
    opacity: 1;
    visibility: visible;
    transition-delay: .3s;
}

.stack-cell.is-active::after {
    opacity: 1;
    visibility: visible;
    transition-delay: .6s;
}

/* PROJECTS */
.case {
    display: grid;
    grid-template-columns: minmax(40px, 80px) minmax(0, 1fr);
    gap: 24px;
    padding: 36px 0;
    border-bottom: 1px solid var(--border);
}

.case:last-child {
    border-bottom: none;
}

.case-num {
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-dim);
    font-size: 0.9rem;
    padding-top: 4px;
}

.case-title {
    font-size: clamp(1.2rem, 2vw + 0.8rem, 1.5rem);
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.case-desc {
    color: var(--text-dim);
    margin-bottom: 16px;
    max-width: 640px;
}

.tag-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    background: var(--card);
    border: 1px solid var(--border);
    padding: 5px 10px;
    border-radius: 6px;
    color: rgb(117, 225, 244);
}

.tag:hover {
    color: rgb(0, 217, 255);
}

.case-link {
    font-size: 0.9rem;
    color: rgb(250, 184, 60);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.case-link:hover {
    text-decoration: underline;
}

/* CONTACT */
.contact-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: clamp(32px, 6vw, 64px) clamp(20px, 5vw, 48px);
    text-align: center;
}

.contact-box h2 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.contact-box p {
    color: var(--text-dim);
    margin-bottom: 32px;
}

.email-link {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(1rem, 2vw + 0.6rem, 1.3rem);
    color: var(--accent);
    border-bottom: 2px solid var(--accent-soft);
    padding-bottom: 4px;
    word-break: break-word;
}

/* ===== BASE RESPONSIVE / ZOOM FIX ===== */

html {
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    min-width: 320px;
}

.wrap {
    width: 100%;
    padding: 0 clamp(16px, 4vw, 32px);
}

img,
svg {
    max-width: 100%;
    height: auto;
}

@media (max-width: 992px) {

    nav {
        justify-content: space-between;
        padding: 8px 10px;
        gap: 8px;
    }

    .available-for-work {
        margin-left: 0;
        flex-shrink: 0;
    }

    .badge {
        gap: 6px;
        font-size: 14px;
        padding: 6px 10px;
        white-space: nowrap;
    }

    .links {
        min-width: 0;
        padding: 5px 5px;
        font-size: 15px;
        white-space: nowrap;
    }

    .links a {
        padding: 0 6px;
    }

    .email {
        display: flex;
        padding: 6px 10px;
        margin-right: 0;
        align-items: center;
    }

    .email:hover {
        border: 1px solid black;
        border-radius: 100px;
    }

    .email a {
        font-size: 15px;
    }

    nav .wrap {
        height: 64px;
    }

    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        padding: 64px 0 56px;
    }

    .hero p.lede {
        max-width: 100%;
        font-size: 1.05rem;
    }

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

    .case {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 28px 0;
    }

    .case-num {
        padding-top: 0;
    }

    .stack-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .contact-box {
        border-radius: 12px;
    }

    .section {
        padding: 64px 0;
    }

    .section-head {
        margin-bottom: 40px;
    }

    .terminal {
        margin-top: 44px;
    }

    .terminal-body {
        font-size: 0.8rem;
    }

    .cta-row {
        display: flex;
        justify-content: center;
        gap: 50px;
        margin-bottom: 56px;
    }

    .stack-grid-2 {
        grid-template-columns: repeat(3, 1fr);
    }

    .stack-icon img {
        width: 80px;
        height: 80px;
    }
}

/* ===================================================
   TABLET (portrait) / large phones: ~768px and below
   =================================================== */
@media (max-width: 480px) {
    nav {
        padding: 8px 10px;
        gap: 8px;
    }

    .available-for-work {
        margin-left: 0;
        flex-shrink: 0;
    }

    .badge {
        gap: 6px;
        font-size: 14px;
        padding: 6px 10px;
        white-space: nowrap;
    }

    .links {
        min-width: 0;
        padding: 5px 5px;
        font-size: 10px;
        white-space: nowrap;
    }

    .links a {
        padding: 0 6px;
    }

    .email {
        display: none;
    }

    nav .wrap {
        height: 64px;
    }

    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        padding: 64px 0 56px;
    }

    .hero p.lede {
        max-width: 100%;
        font-size: 1.05rem;
    }

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

    .case {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 28px 0;
    }

    .case-num {
        padding-top: 0;
    }

    .stack-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .contact-box {
        border-radius: 12px;
    }

    .section {
        padding: 64px 0;
    }

    .section-head {
        margin-bottom: 40px;
    }

    .terminal {
        margin-top: 44px;
    }

    .terminal-body {
        font-size: 0.8rem;
    }

    .cta-row {
        display: flex;
        justify-content: center;
        gap: 50px;
        margin-bottom: 56px;
    }

    .stack-grid-2 {
        /* grid-template-columns: repeat(5, 70px); */
        grid-template-columns: repeat(3, 1fr);
    }

    .stack-icon img {
        width: 40px;
        height: 40px;
    }

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

    #devtools-block {
        position: fixed;
        inset: 0;
        z-index: 9999;
        background: rgba(6, 7, 9, 0.97);
        display: none;
        align-items: center;
        justify-content: center;
        padding: 20px;
        animation: fadeIn .3s ease;
    }

    #devtools-block.active {
        display: flex;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    .dt-card {
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: 16px;
        max-width: 420px;
        width: 100%;
        padding: 44px 36px;
        text-align: center;
        animation: popIn .35s cubic-bezier(.2, .9, .3, 1.2);
    }

    @keyframes popIn {
        from {
            transform: scale(.92);
            opacity: 0;
        }

        to {
            transform: scale(1);
            opacity: 1;
        }
    }

    .dt-icon {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        border: 1px solid var(--border);
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 24px;
        color: var(--text-dim);
    }

    .dt-icon svg {
        width: 20px;
        height: 20px;
        stroke: currentColor;
        fill: none;
        stroke-width: 1.8;
    }

    .dt-eyebrow {
        font-family: 'JetBrains Mono', monospace;
        font-size: 0.75rem;
        color: var(--text-dim);
        letter-spacing: 0.1em;
        margin-bottom: 10px;
    }

    .dt-title {
        font-family: 'Space Grotesk', sans-serif;
        font-size: 1.6rem;
        font-weight: 700;
        margin-bottom: 16px;
    }

    .dt-title em {
        color: var(--accent);
        font-style: normal;
    }

    .dt-desc {
        color: var(--text-dim);
        font-size: 0.92rem;
        margin-bottom: 28px;
        line-height: 1.5;
    }

    .dt-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        padding: 13px;
        border-radius: 8px;
        font-size: 0.92rem;
        font-weight: 500;
        margin-bottom: 12px;
        transition: all .2s;
    }

    .dt-btn svg {
        width: 16px;
        height: 16px;
        stroke: currentColor;
        fill: none;
        stroke-width: 1.8;
    }

    .dt-btn-primary {
        background: var(--accent);
        color: #1A1206;
    }

    .dt-btn-primary:hover {
        background: #E8A567;
    }

    .dt-btn-ghost {
        border: 1px solid var(--border);
        color: var(--text);
    }

    .dt-btn-ghost:hover {
        border-color: var(--accent);
    }

    .dt-footer {
        margin-top: 24px;
        font-size: 0.78rem;
        color: var(--text-dim);
        opacity: 0.6;
    }
}
