:root {
    --bg: #050505;
    --panel: #0c0c0c;
    --panel-2: #121212;
    --line: rgba(255, 255, 255, 0.13);
    --text: #f5f5f5;
    --muted: #a1a1a1;
    --soft: #d8d8d8;
    --green: #39ff88;
    --cyan: #57d9ff;
    --pink: #ff4fd8;
    --yellow: #ffe66d;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
    --mono: "JetBrains Mono", Consolas, monospace;
    --display: "Space Grotesk", Arial, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        radial-gradient(circle at 15% 10%, rgba(57, 255, 136, 0.11), transparent 28rem),
        radial-gradient(circle at 88% 25%, rgba(87, 217, 255, 0.09), transparent 26rem),
        var(--bg);
    background-size: 48px 48px, 48px 48px, auto, auto, auto;
    color: var(--text);
    font-family: var(--mono);
    line-height: 1.65;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 50;
    background: linear-gradient(rgba(255, 255, 255, 0.025) 50%, rgba(0, 0, 0, 0.04) 50%);
    background-size: 100% 4px;
    mix-blend-mode: screen;
    opacity: 0.45;
}

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

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

button,
input,
textarea {
    font: inherit;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.noise {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.12;
    background-image:
        repeating-radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.5) 0 1px, transparent 1px 4px);
}

.matrix-layer {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.08);
    font-size: 0.78rem;
}

.matrix-layer span {
    position: absolute;
    animation: drift 16s linear infinite;
}

.matrix-layer span:nth-child(1) { left: 8%; animation-delay: -2s; }
.matrix-layer span:nth-child(2) { left: 18%; animation-delay: -8s; }
.matrix-layer span:nth-child(3) { left: 33%; animation-delay: -4s; }
.matrix-layer span:nth-child(4) { left: 48%; animation-delay: -12s; }
.matrix-layer span:nth-child(5) { left: 63%; animation-delay: -6s; }
.matrix-layer span:nth-child(6) { left: 76%; animation-delay: -10s; }
.matrix-layer span:nth-child(7) { left: 86%; animation-delay: -1s; }
.matrix-layer span:nth-child(8) { left: 94%; animation-delay: -14s; }

@keyframes drift {
    from { transform: translateY(-10vh); }
    to { transform: translateY(112vh); }
}

.site-nav {
    position: fixed;
    inset: 0 0 auto;
    z-index: 20;
    border-bottom: 1px solid var(--line);
    background: rgba(5, 5, 5, 0.78);
    backdrop-filter: blur(18px);
}

.nav-container {
    width: min(1180px, calc(100% - 32px));
    min-height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    font-weight: 800;
    letter-spacing: -0.02em;
}

.prompt,
.eyebrow,
.tag,
.project-link,
.contact-form span {
    color: var(--green);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-links a {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    padding: 0 14px;
    border: 1px solid transparent;
    color: var(--muted);
    font-size: 0.9rem;
    transition: 0.25s ease;
}

.nav-links a:hover {
    border-color: var(--line);
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.menu-btn {
    display: none;
    width: 42px;
    height: 42px;
    position: relative;
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(255, 255, 255, 0.035);
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.menu-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent, rgba(57, 255, 136, 0.18), transparent);
    transform: translateX(-120%);
    transition: transform 0.45s ease;
}

.menu-btn span {
    position: absolute;
    left: 10px;
    width: 20px;
    height: 2px;
    background: var(--text);
    box-shadow: 0 0 12px rgba(57, 255, 136, 0.35);
    transform-origin: center;
    transition: top 0.24s ease, transform 0.24s ease, opacity 0.18s ease, background 0.24s ease;
}

.menu-btn span:nth-child(1) {
    top: 13px;
}

.menu-btn span:nth-child(2) {
    top: 20px;
    width: 14px;
    left: 16px;
}

.menu-btn span:nth-child(3) {
    top: 27px;
}

.menu-btn:hover,
.menu-btn.active {
    border-color: rgba(57, 255, 136, 0.7);
    background: rgba(57, 255, 136, 0.08);
    box-shadow: 0 0 0 3px rgba(57, 255, 136, 0.08);
}

.menu-btn:hover::before {
    transform: translateX(120%);
}

.menu-btn.active span {
    background: var(--green);
}

.menu-btn.active span:nth-child(1) {
    top: 20px;
    transform: rotate(45deg);
}

.menu-btn.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(10px);
}

.menu-btn.active span:nth-child(3) {
    top: 20px;
    transform: rotate(-45deg);
}

.section-panel {
    position: relative;
    padding: 110px 0;
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 150px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.72fr);
    align-items: center;
    gap: 58px;
}

.eyebrow {
    margin-bottom: 18px;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.16em;
}

h1,
h2,
h3 {
    font-family: var(--display);
    line-height: 1;
}

h1 {
    max-width: 850px;
    font-size: clamp(3rem, 8vw, 7.5rem);
    letter-spacing: -0.05em;
}

.glitch {
    position: relative;
    display: block;
    color: transparent;
    -webkit-text-stroke: 1px var(--text);
    text-shadow: 3px 0 rgba(57, 255, 136, 0.9), -3px 0 rgba(255, 79, 216, 0.68);
    animation: glitchPulse 3.8s steps(2, end) infinite;
}

@keyframes glitchPulse {
    0%, 84%, 100% { transform: translate(0); filter: none; }
    86% { transform: translate(3px, -2px); filter: contrast(1.8); }
    88% { transform: translate(-2px, 1px); }
    90% { transform: translate(1px, 0); }
}

.role {
    margin-top: 28px;
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--soft);
}

.description {
    max-width: 720px;
    margin-top: 20px;
    color: var(--muted);
    font-size: 1.02rem;
}

.terminal-card,
.skill-card,
.featured-card,
.archive-grid article,
.contact-form,
.info-grid article {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
    box-shadow: var(--shadow);
}

.terminal-card {
    max-width: 640px;
    margin-top: 32px;
    overflow: hidden;
}

.terminal-top {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
}

.terminal-top span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--pink);
}

.terminal-top span:nth-child(2) { background: var(--yellow); }
.terminal-top span:nth-child(3) { background: var(--green); }
.terminal-top strong {
    margin-left: 8px;
    color: var(--muted);
    font-size: 0.8rem;
}

.terminal-card p {
    padding: 0 18px 14px;
    color: var(--soft);
}

.terminal-card p:first-of-type {
    padding-top: 18px;
}

.terminal-card p span {
    color: var(--green);
}

.cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
}

.btn {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 18px;
    border: 1px solid var(--line);
    cursor: pointer;
    transition: 0.25s ease;
}

.btn-primary {
    color: #050505;
    border-color: var(--green);
    background: var(--green);
}

.btn-secondary {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

.btn:hover,
.project-link:hover,
.show-more-btn:hover,
.social-links a:hover {
    transform: translateY(-3px);
}

.hero-visual {
    position: relative;
    justify-self: center;
}

.profile-shell {
    position: relative;
    width: min(360px, 78vw);
    aspect-ratio: 0.78;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #000;
    box-shadow: 20px 20px 0 rgba(255, 255, 255, 0.06), var(--shadow);
}

.profile-shell::before {
    content: "";
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(57, 255, 136, 0.5);
    z-index: 2;
    pointer-events: none;
}

.profile-shell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) contrast(1.1);
}

.scan {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(57, 255, 136, 0.16), transparent);
    animation: scanMove 3.2s linear infinite;
}

@keyframes scanMove {
    from { transform: translateY(-100%); }
    to { transform: translateY(100%); }
}

.floating-chip {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    background: rgba(5, 5, 5, 0.85);
    color: var(--text);
    box-shadow: var(--shadow);
    animation: float 4s ease-in-out infinite;
}

.chip-one { top: 12%; right: -28px; }
.chip-two { bottom: 13%; left: -36px; animation-delay: -1.6s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.split-grid {
    display: grid;
    grid-template-columns: 0.35fr 0.65fr;
    gap: 52px;
}

.section-heading h2,
.contact h2 {
    font-size: clamp(2rem, 5vw, 4.8rem);
    letter-spacing: -0.05em;
}

.about-content > p,
.projects-head > p,
.contact-grid > div > p {
    color: var(--muted);
    font-size: 1.02rem;
}

.about-content strong {
    color: var(--text);
}

.info-grid {
    display: grid;
    gap: 14px;
    margin-top: 30px;
}

.info-grid article {
    padding: 22px;
}

.info-grid span,
.archive-title span {
    color: var(--green);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.info-grid h3 {
    margin: 10px 0 8px;
    font-size: 1.35rem;
}

.info-grid p,
.skill-card p,
.project-body p,
.archive-grid p {
    color: var(--muted);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 34px;
}

.skill-card {
    min-height: 250px;
    padding: 24px;
    transition: 0.25s ease;
}

.skill-card:hover,
.featured-card:hover {
    border-color: rgba(57, 255, 136, 0.75);
    transform: translateY(-8px);
}

.skill-card svg {
    width: 34px;
    height: 34px;
    color: var(--green);
}

.skill-card h3 {
    margin: 38px 0 12px;
    font-size: 1.45rem;
}

.projects-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
}

.projects-head > p {
    max-width: 430px;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 38px;
}

.featured-card {
    position: relative;
    overflow: hidden;
    transition: 0.25s ease;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.featured-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    border: 1px solid rgba(255, 255, 255, 0.22);
    pointer-events: none;
}

.project-image {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    margin: 12px 12px 0;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #050505;
}

.project-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 72%, rgba(0, 0, 0, 0.28));
    pointer-events: none;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: grayscale(0.35) contrast(1.05);
    transition: 0.35s ease;
}

.featured-card:hover img {
    transform: scale(1.02);
    filter: grayscale(0) contrast(1.05);
}

.app-card {
    cursor: pointer;
}

.app-preview-btn {
    display: flex;
    width: 100%;
    height: 100%;
    flex-direction: column;
    padding: 0;
    border: 0;
    appearance: none;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.app-logo-image {
    display: grid;
    place-items: center;
    background: #050505;
}

.app-logo-image::after {
    display: none;
}

.app-logo-image img {
    width: 72%;
    height: 72%;
    object-fit: contain;
    filter: none;
}

.featured-card:hover .app-logo-image img {
    transform: scale(1.04);
    filter: none;
}

.app-hint {
    display: inline-flex;
    width: fit-content;
    margin-top: 8px;
    color: var(--green);
    font-size: 0.86rem;
}

.project-body {
    display: grid;
    gap: 18px;
    padding: 22px;
    flex: 1;
    min-width: 0;
}

.project-body h3 {
    margin-top: 8px;
    font-size: 1.8rem;
    line-height: 1.12;
    overflow-wrap: anywhere;
}

.tag {
    display: inline-flex;
    width: fit-content;
    border: 1px solid rgba(57, 255, 136, 0.45);
    padding: 4px 8px;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.accent-green { color: var(--yellow); border-color: rgba(255, 230, 109, 0.45); }
.accent-blue { color: var(--cyan); border-color: rgba(87, 217, 255, 0.45); }

.project-link {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 6px;
    transition: 0.25s ease;
}

.more-projects {
    margin-top: 28px;
}

.show-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    cursor: pointer;
    transition: 0.25s ease;
}

.github-projects {
    max-width: 100%;
    flex-wrap: wrap;
}

.archive-grid {
    display: block;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: 0.45s ease;
}

.archive-grid.active {
    max-height: 9000px;
    margin-top: 18px;
    opacity: 1;
    transform: translateY(0);
}

.archive-section {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.archive-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
}

.archive-title span {
    color: var(--green);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.archive-title h3 {
    font-size: 1.35rem;
}

.archive-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    min-width: 0;
}

.archive-grid .github-projects {
    margin-top: 24px;
}

.modal-open {
    overflow: hidden;
}

.app-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: 0.25s ease;
}

.app-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.app-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(10px);
}

.app-modal-panel {
    position: relative;
    z-index: 1;
    width: min(760px, 100%);
    max-height: min(88vh, 820px);
    overflow: auto;
    border: 1px solid var(--line);
    background: #050505;
    box-shadow: var(--shadow);
    transform: translateY(18px) scale(0.98);
    transition: 0.25s ease;
}

.app-modal.active .app-modal-panel {
    transform: translateY(0) scale(1);
}

.app-modal-panel img {
    width: 100%;
    max-height: 470px;
    object-fit: contain;
    background: #000;
    border-bottom: 1px solid var(--line);
}

.app-modal-content {
    display: grid;
    gap: 12px;
    padding: 24px;
}

.app-modal-content h3 {
    font-size: clamp(1.8rem, 4vw, 3rem);
}

.app-modal-content p {
    color: var(--muted);
}

.app-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid var(--line);
    background: rgba(5, 5, 5, 0.92);
    color: var(--text);
    cursor: pointer;
}

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(320px, 0.68fr);
    gap: 44px;
    align-items: start;
    padding: 44px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.035);
}

.contact-list {
    display: grid;
    gap: 14px;
    margin: 30px 0;
    list-style: none;
}

.contact-list li,
.contact-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--soft);
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.social-links a {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 1px solid var(--line);
    background: #050505;
    color: var(--text);
    font-size: 1.25rem;
    transition: 0.25s ease;
}

.social-links a:nth-child(2) { color: var(--cyan); }
.social-links a:nth-child(3) { color: var(--yellow); }
.social-links a:nth-child(4) { color: var(--pink); }
.social-links a:nth-child(5) { color: var(--green); }

.contact-form {
    display: grid;
    gap: 16px;
    padding: 22px;
}

.contact-form label {
    display: grid;
    gap: 8px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 0;
    outline: none;
    background: #050505;
    color: var(--text);
    padding: 14px;
    resize: vertical;
    transition: 0.25s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(57, 255, 136, 0.12);
}

footer {
    padding: 34px 0 46px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.9rem;
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1040px) {
    .hero-grid,
    .split-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        order: -1;
    }

    .skills-grid,
    .featured-grid,
    .archive-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .contact-grid {
        gap: 28px;
    }
}

@media (max-width: 760px) {
    .nav-links {
        position: absolute;
        inset: 76px 16px auto;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 14px;
        border: 1px solid var(--line);
        background:
            linear-gradient(rgba(57, 255, 136, 0.055) 1px, transparent 1px),
            rgba(5, 5, 5, 0.96);
        background-size: 100% 12px, auto;
        box-shadow: 0 28px 70px rgba(0, 0, 0, 0.62);
        opacity: 0;
        pointer-events: none;
        transform: translateY(-12px) scale(0.98);
        transform-origin: top right;
        transition: opacity 0.24s ease, transform 0.24s ease;
    }

    .nav-links::before {
        content: "nav.exe";
        display: block;
        margin-bottom: 6px;
        padding: 2px 0 10px;
        border-bottom: 1px solid var(--line);
        color: var(--green);
        font-size: 0.72rem;
        letter-spacing: 0.16em;
        text-transform: uppercase;
    }

    .nav-links li {
        transform: translateX(10px);
        opacity: 0;
        transition: transform 0.24s ease, opacity 0.24s ease;
    }

    .nav-links a {
        min-height: 46px;
        justify-content: space-between;
        border-color: rgba(255, 255, 255, 0.08);
        background: rgba(255, 255, 255, 0.035);
        color: var(--text);
    }

    .nav-links a::before {
        content: "$";
        color: var(--green);
        margin-right: 10px;
    }

    .nav-links a::after {
        content: ">";
        color: var(--muted);
        font-size: 0.82rem;
    }

    .nav-links.active {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0) scale(1);
    }

    .nav-links.active li {
        opacity: 1;
        transform: translateX(0);
    }

    .nav-links.active li:nth-child(2) {
        transition-delay: 0.04s;
    }

    .nav-links.active li:nth-child(3) {
        transition-delay: 0.08s;
    }

    .nav-links.active li:nth-child(4) {
        transition-delay: 0.12s;
    }

    .menu-btn {
        display: grid;
    }

    .section-panel {
        padding: 76px 0;
    }

    .hero {
        min-height: auto;
        padding-top: 118px;
    }

    .hero-grid {
        gap: 36px;
    }

    .terminal-card p {
        font-size: 0.86rem;
    }

    .cta-group,
    .btn {
        width: 100%;
    }

    .projects-head {
        display: block;
    }

    .projects-head > p {
        margin-top: 18px;
    }

    .skills-grid,
    .featured-grid,
    .archive-list {
        grid-template-columns: 1fr;
    }

    .featured-grid {
        gap: 18px;
        margin-top: 28px;
    }

    .archive-title {
        display: grid;
        align-items: start;
        gap: 6px;
    }

    .project-body {
        gap: 14px;
        padding: 18px;
    }

    .project-body h3 {
        font-size: 1.45rem;
    }

    .project-image {
        aspect-ratio: 16 / 11;
    }

    .app-logo-image img {
        width: 64%;
        height: 64%;
    }

    .show-more-btn,
    .github-projects {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .skill-card {
        min-height: auto;
    }

    .profile-shell {
        width: min(310px, 86vw);
    }

    .floating-chip {
        position: static;
        margin-top: 12px;
        width: fit-content;
    }

    .contact-grid {
        padding: 22px;
    }

    .contact-list a,
    .contact-list li {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .app-modal {
        align-items: end;
        padding: 12px;
    }

    .app-modal-panel {
        width: 100%;
        max-height: 86vh;
    }

    .app-modal-panel img {
        max-height: 46vh;
    }

    .app-modal-content {
        padding: 18px;
    }
}

@media (max-width: 420px) {
    .container,
    .nav-container {
        width: min(100% - 22px, 1180px);
    }

    .section-panel {
        padding: 62px 0;
    }

    .hero {
        padding-top: 106px;
    }

    .hero-copy h1 {
        font-size: clamp(2.35rem, 16vw, 3.4rem);
    }

    .terminal-card p,
    .project-body p,
    .contact-grid > div > p {
        font-size: 0.9rem;
    }

    .tag {
        max-width: 100%;
        white-space: normal;
    }

    .contact-grid,
    .contact-form {
        padding: 16px;
    }

    .app-modal-panel img {
        max-height: 42vh;
    }
}

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