:root {
    --bg: #0b0d0c;
    --surface: #111512;
    --surface-2: #151a17;
    --text: #e8e8e8;
    --muted: #929292;
    --green: #00ff41;
    --green-soft: #8dffa7;
    --green-dark: #0a9d2d;
    --red: #ff3b30;
    --border: #273029;
    --border-strong: #3b473e;
    --max-width: 1050px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}


.ambient-background {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: -2;
}

.cursor-glow {
    position: fixed;
    left: -90px;
    top: -90px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 255, 65, 0.13) 0%, rgba(0, 255, 65, 0.055) 28%, transparent 70%);
    transform: translate3d(50vw, 50vh, 0);
    will-change: transform;
}

.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.08;
}

.ambient-orb-one {
    width: 420px;
    height: 420px;
    top: -180px;
    right: -120px;
    background: #00ff41;
    animation: drift-one 18s ease-in-out infinite alternate;
}

.ambient-orb-two {
    width: 360px;
    height: 360px;
    bottom: -190px;
    left: -120px;
    background: #ff3b30;
    opacity: 0.035;
    animation: drift-two 22s ease-in-out infinite alternate;
}

.particle-layer {
    position: absolute;
    inset: 0;
}

.particle {
    position: absolute;
    width: var(--particle-size);
    height: var(--particle-size);
    border-radius: 50%;
    background: rgba(0, 255, 65, 0.7);
    box-shadow: 0 0 7px rgba(0, 255, 65, 0.35);
    animation: float-particle linear infinite;
}

@keyframes float-particle {
    0% { transform: translate3d(0, 12vh, 0); opacity: 0; }
    12% { opacity: 0.75; }
    50% { transform: translate3d(28px, -24vh, 0); opacity: 0.4; }
    88% { opacity: 0.65; }
    100% { transform: translate3d(-22px, -55vh, 0); opacity: 0; }
}

@keyframes drift-one {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(-90px, 80px, 0) scale(1.08); }
}

@keyframes drift-two {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(80px, -60px, 0) scale(1.12); }
}

.hero-title {
    position: relative;
    display: inline-block;
    color: var(--text);
    isolation: isolate;
}

.hero-title::before,
.hero-title::after {
    position: absolute;
    inset: 0;
    content: attr(data-text);
    pointer-events: none;
    opacity: 0;
}

.hero-title::before { color: var(--green); transform: translate(6px, 0); text-shadow: 3px 0 var(--green); }
.hero-title::after { color: var(--red); transform: translate(-6px, 0); text-shadow: -3px 0 var(--red); }
.hero-title-active { animation: title-breathe 4s ease-in-out infinite; }
.hero-title-active::before { animation: title-glitch-green 4.2s steps(1, end) infinite; }
.hero-title-active::after { animation: title-glitch-red 5.1s steps(1, end) infinite; }

@keyframes title-breathe {
    0%, 100% { text-shadow: 0 0 0 rgba(0, 255, 65, 0); }
    50% { text-shadow: 0 0 22px rgba(0, 255, 65, 0.13), 0 0 55px rgba(0, 255, 65, 0.06); }
}

@keyframes title-glitch-green {
    0%, 72%, 100% { opacity: 0; }
    73% { opacity: 0.72; clip-path: inset(7% 0 70% 0); transform: translate(10px, -2px); }
    74% { opacity: 0.34; clip-path: inset(42% 0 36% 0); transform: translate(-7px, 2px); }
    75% { opacity: 0.58; clip-path: inset(70% 0 8% 0); transform: translate(8px, 1px); }
    76% { opacity: 0; }
}

@keyframes title-glitch-red {
    0%, 79%, 100% { opacity: 0; }
    80% { opacity: 0.58; clip-path: inset(57% 0 12% 0); transform: translate(-11px, 2px); }
    81% { opacity: 0.28; clip-path: inset(18% 0 63% 0); transform: translate(7px, -2px); }
    82% { opacity: 0.48; clip-path: inset(79% 0 4% 0); transform: translate(-8px, 1px); }
    83% { opacity: 0; }
}

body {
    margin: 0;
    min-height: 100vh;
    background-color: var(--bg);
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.014) 50%, transparent 50%);
    background-size: 100% 4px;
    color: var(--text);
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    line-height: 1.65;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% -10%, rgba(0, 255, 65, 0.07), transparent 32rem),
        linear-gradient(90deg, rgba(255, 0, 0, 0.018), transparent 16%, transparent 84%, rgba(0, 255, 65, 0.018));
    z-index: -1;
}

body.modal-open {
    overflow: hidden;
}

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

a:hover {
    color: var(--green-soft);
    text-decoration: underline;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.site-header {
    width: min(calc(100% - 32px), var(--max-width));
    margin: 22px auto 0;
    padding: 16px 18px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.site-name {
    color: var(--text);
    font-family: "Courier New", Courier, monospace;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.site-name:hover {
    color: var(--green);
    text-decoration: none;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 16px;
    font-family: "Courier New", Courier, monospace;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.site-nav a {
    color: var(--muted);
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--green);
    text-decoration: none;
}

.page-shell {
    width: min(calc(100% - 32px), var(--max-width));
    margin: 0 auto;
    padding: 64px 0 80px;
}

.hero,
.page-intro {
    max-width: 820px;
    padding: 38px 0 74px;
}

.hero h1,
.page-intro h1 {
    margin: 0;
    color: var(--text);
    font-family: "Arial Black", Impact, sans-serif;
    font-size: clamp(3.4rem, 10vw, 7rem);
    line-height: 0.95;
    letter-spacing: -0.045em;
}

.hero h1 {
    text-shadow: 2px 2px 0 rgba(0, 255, 65, 0.14);
}

.page-intro h1 {
    font-size: clamp(2.4rem, 7vw, 5.2rem);
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--green);
    font-family: "Courier New", Courier, monospace;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    line-height: 1.2;
    text-transform: uppercase;
}

.subheading {
    margin: 16px 0 0;
    color: var(--green-soft);
    font-family: "Courier New", Courier, monospace;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.5;
}

.hero-copy {
    max-width: 700px;
    margin: 22px 0 0;
    color: var(--text);
    font-size: 1rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 10px 18px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    font-family: "Courier New", Courier, monospace;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
    transition: border-color 120ms linear, color 120ms linear, background 120ms linear;
}

.button:hover {
    border-color: var(--green);
    background: #131a15;
    color: var(--green);
    text-decoration: none;
}

.button-primary {
    border-color: var(--green-dark);
    color: var(--green);
}

.button:focus-visible,
.social-icon:focus-visible,
.site-nav a:focus-visible,
.text-link:focus-visible,
.modal-close:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 4px;
}

.section {
    padding: 30px 0 72px;
}

.section-heading {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.section-heading.centered {
    justify-content: center;
}

.section-heading h2 {
    margin: 0;
    font-family: "Arial Black", Impact, sans-serif;
    font-size: clamp(1.3rem, 3vw, 2rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.section-rule {
    height: 1px;
    margin: 14px 0 26px;
    background: linear-gradient(to right, var(--green-dark), var(--border) 45%, transparent);
}

.simple-copy,
.article-section,
.article-body {
    max-width: 820px;
}

.simple-copy p,
.article-section p,
.article-body p {
    margin: 0 0 16px;
}

.text-link {
    display: inline-block;
    margin-top: 4px;
    font-family: "Courier New", Courier, monospace;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.4;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 34px 44px;
}

.skill h3 {
    margin: 0 0 8px;
    color: var(--green);
    font-family: "Courier New", Courier, monospace;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.35;
}

.skill h3::after {
    content: "";
    display: block;
    width: 100%;
    height: 1px;
    margin-top: 8px;
    background: var(--border);
}

.skill p {
    margin: 0;
    color: #d1d1d1;
    font-size: 0.93rem;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.work-card {
    display: flex;
    flex-direction: column;
    min-height: 190px;
    gap: 10px;
    padding: 24px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(17, 21, 18, 0.96), rgba(12, 15, 13, 0.96));
    transition: border-color 120ms linear, transform 120ms linear;
}

.work-card:hover {
    border-color: var(--green-dark);
    text-decoration: none;
    transform: translateY(-2px);
}

.work-card-title {
    color: var(--green);
    font-family: "Courier New", Courier, monospace;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.work-card-copy {
    max-width: 430px;
    color: var(--text);
    font-size: 0.94rem;
}

.work-card-link {
    margin-top: auto;
    color: var(--muted);
    font-family: "Courier New", Courier, monospace;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
}

.work-card:hover .work-card-link {
    color: var(--green);
}

.social-section {
    text-align: center;
}

.social-icons-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
}

.social-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    opacity: 0.88;
    transition: opacity 100ms linear, transform 100ms linear, filter 100ms linear;
}

.social-icon img {
    display: block;
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.social-icon:hover {
    opacity: 1;
    transform: translateY(-2px);
    filter: drop-shadow(0 0 7px rgba(0, 255, 65, 0.32));
}

.social-button {
    color: inherit;
    font: inherit;
}

.site-footer {
    width: min(calc(100% - 32px), var(--max-width));
    margin: 0 auto 28px;
    padding: 20px 0 0;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: var(--muted);
    font-family: "Courier New", Courier, monospace;
    font-size: 0.78rem;
    line-height: 1.5;
}

.site-footer a {
    color: var(--muted);
}

.site-footer a:hover {
    color: var(--green);
}

.entry-list {
    display: grid;
    gap: 16px;
}

.entry-card {
    padding: 22px 24px;
    border: 1px solid var(--border);
    background: rgba(17, 21, 18, 0.75);
}

.entry-card:hover {
    border-color: var(--green-dark);
}

.entry-topline {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 8px;
}

.entry-date {
    color: var(--muted);
    font-family: "Courier New", Courier, monospace;
    font-size: 0.76rem;
    line-height: 1.2;
}

.entry-badge {
    color: var(--red);
    font-family: "Courier New", Courier, monospace;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
}

.entry-card h3 {
    margin: 0;
    color: var(--text);
    font-family: "Courier New", Courier, monospace;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
}

.entry-card h3 a {
    color: var(--text);
}

.entry-card h3 a:hover {
    color: var(--green);
    text-decoration: none;
}

.entry-card p {
    margin: 10px 0 14px;
    color: #c2c2c2;
    font-size: 0.92rem;
}

.entry-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-family: "Courier New", Courier, monospace;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.3;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 26px;
}

.pagination a {
    min-width: 48px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    color: var(--muted);
    text-align: center;
    font-family: "Courier New", Courier, monospace;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.2;
}

.pagination a:hover {
    border-color: var(--green);
    color: var(--green);
    text-decoration: none;
}

.page-count {
    color: var(--muted);
    font-family: "Courier New", Courier, monospace;
    font-size: 0.75rem;
    line-height: 1;
}

.article-page h1 {
    max-width: 900px;
    margin: 0;
    font-family: "Arial Black", Impact, sans-serif;
    font-size: clamp(2rem, 6vw, 4rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.article-body {
    margin-top: 40px;
}

.article-body h2 {
    margin: 36px 0 10px;
    color: var(--green);
    font-family: "Courier New", Courier, monospace;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.4;
}

.article-body code,
.article-body pre {
    font-family: "Courier New", Courier, monospace;
}

.article-body pre {
    overflow-x: auto;
    padding: 18px;
    border-left: 2px solid var(--green-dark);
    background: #060806;
    color: #bfffc9;
}

.blog-image {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 24px auto;
    border: 1px solid var(--border);
    background: rgba(17, 21, 18, 0.75);
}

@media (min-width: 640px) {
    .blog-image {
        max-width: 640px;
    }
}

.modal-backdrop[hidden] {
    display: none;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.78);
    z-index: 1000;
}

.modal {
    position: relative;
    width: min(100%, 560px);
    padding: 28px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.07);
}

.modal h2 {
    margin: 0;
    font-family: "Arial Black", Impact, sans-serif;
    font-size: 1.25rem;
    line-height: 1.25;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    border: 0;
    padding: 2px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-family: "Courier New", Courier, monospace;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
}

.modal-close:hover {
    color: var(--red);
}

@media (max-width: 760px) {
    .site-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-nav {
        justify-content: flex-start;
    }

    .skills-grid,
    .work-grid {
        grid-template-columns: 1fr;
    }

    .hero,
    .page-intro {
        padding-top: 22px;
    }

    .entry-topline {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-footer {
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}

.section,
.hero,
.page-intro,
.site-header,
.site-footer { position: relative; }

.entry-card,
.work-card { box-shadow: 0 10px 35px rgba(0, 0, 0, 0.14); }

.work-card:hover { box-shadow: 0 14px 40px rgba(0, 255, 65, 0.07); }

@media (max-width: 760px) {
    .cursor-glow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .cursor-glow,
    .ambient-orb,
    .particle,
    .hero-title-active,
    .hero-title-active::before,
    .hero-title-active::after { animation: none !important; }
}


/* Entire tool/write-up cards are the clickable surface. */
.entry-card {
    display: block;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.entry-card h3 {
    transition: color 0.25s ease;
}

.entry-card:hover {
    border-color: var(--green);
    text-decoration: none;
    box-shadow: 0 0 18px rgba(0, 255, 65, 0.08), inset 0 0 18px rgba(0, 255, 65, 0.025);
    transform: translateY(-2px);
}

.entry-card:hover h3 {
    color: var(--green);
}
