@font-face {
    font-family: 'HeaderFont';
    src: url('NewspaperCutoutWhiteOnBlac-Rg.woff2');
    font-weight: normal;
    font-style: normal;
    font-synthesis: none;
}

@font-face {
    font-family: 'Lato';
    src: url('Lato-Regular.woff2');
    font-weight: normal;
    font-style: normal;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

:root {
    --bg: #1f1f1f;
    --surface: #111111;
    --surface-a: #111111aa;
    --text: #f7f5eb;
    --muted: #adadad;
    --border: #444444;
    --accent: #fc709e;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    letter-spacing: 0.3px;
    font-family: 'Arial', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("https://www.transparenttextures.com/patterns/asfalt-light.png");
    opacity: 0.75;
    pointer-events: none;
    z-index: 0;
}

footer a {
    color: var(--muted);
}

body > * {
    position: relative;
    z-index: 1;
}

.display-font {
    font-family: 'HeaderFont', sans-serif;
    letter-spacing: 2px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    flex: 1;
    width: 100%;
}

footer {
    padding: 2rem;
    background: var(--surface-a);
    border-top: 2px solid var(--border);
    margin-top: 2rem;
    text-align: center;
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.social-links a {
    color: var(--text);
    display: inline-flex;
    border: 2px solid var(--border);
    padding: 0.4rem;
    box-shadow: 2px 2px 0 var(--border);
    transition: color 0.15s ease, transform 0.15s ease;
}

.social-links a:hover {
    color: var(--accent);
    border-color: var(--accent);
    box-shadow: 3px 3px 0 var(--accent);
    transform: translateY(-2px);
    outline: none;
}

.hero {
    padding: 0 2rem 0;
    border-bottom: 2px solid var(--border);
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    background: var(--bg);
    padding-bottom: 0.5rem;
}

.hero-top {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.hero-title {
    display: flex;
    align-items: flex-end;
    min-width: 0;
}

.hero-title p {
    margin: 0;
}

.hero-top h1 {
    font-size: clamp(2rem, 5vw, 5rem);
    line-height: 1.1;
    margin: 0;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    margin-left: 1rem;
    gap: 0.5rem;
    justify-content: flex-start;
    align-content: flex-end;
    align-self: flex-end;
    min-width: 0;
    max-width: 100%;
}

.hero-nav {
    margin-left: auto;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-self: flex-end;
    align-content: flex-end;
}

.blog-btn {
    background: var(--muted);
}

.hero-nav button,
.hero-nav .cv-btn {
    background: var(--text);
}

.hero-nav button,
.hero-nav .cv-btn,
.hero-nav .blog-btn {
    font-family: "Arial";
    display: inline-block;
    padding: 0.5rem 0.5rem;
    font-size: clamp(0.6rem, 1.1vw, 1rem);
    text-transform: uppercase;
    color: var(--surface);
    font-weight: 800;
    letter-spacing: 1px;
    line-height: 1;
    text-decoration: none;
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    cursor: pointer;
    white-space: nowrap;
    border: none;
    outline: none;
}

.hero-nav button:hover,
.hero-nav .cv-btn:hover,
.hero-nav .blog-btn:hover {
    background: var(--accent);
    transform: translateY(-3px);
    box-shadow: 3px 3px 0 var(--accent);
}

#name-header span {
    display: inline-flex;
    cursor: pointer;
    letter-spacing: 5px;
    transition: color 0.15s ease, transform 0.15s ease;
}

.mute {
    color: var(--muted);
}

.subtitle {
    font-size: clamp(0.5rem, 1.1vw, 1rem);
    color: var(--surface);
    font-weight: 800;
    margin: 0;
    padding: 0.2rem 0.4rem;
    position: relative;
    white-space: nowrap;
}

.subtitle-wrap {
    display: inline-block;
}

.subtitle::before {
    content: "";
    position: absolute;
    background: var(--text);
    inset: 0;
    z-index: -1;
    transform-origin: center;
    animation: jitter-low 2s steps(1) infinite;
}

.subtitle:nth-child(1)::before { animation-duration: 4.6s; }
.subtitle:nth-child(2)::before { animation-duration: 6.2s; }
.subtitle:nth-child(3)::before { animation-duration: 5.4s; }

.about-me {
    background-color: var(--surface-a);
    border: 2px solid var(--border);
    font-size: 0.95rem;
    padding: 0.5rem;
    font-family: 'Lato', sans-serif;
}

.skills-section {
    margin-top: 0.5rem;
    padding: 0 2rem;
    background: var(--surface-a);
    border: 2px solid var(--border);
}

.skills-section h3 {
    display: inline-block;
    color: var(--surface);
    font-weight: 800;
    font-size: 1.3rem;
    margin: 0;
    padding: 0.1rem 0.4rem;
    position: relative;
    z-index: 1;
}

.skills-section h3::before {
    content: "";
    position: absolute;
    background: var(--text);
    inset: 0;
    z-index: -1;
    transform-origin: center;
}

.skills-lists {
    display: flex;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.skills-category {
    flex: 1;
    min-width: 180px;
}

.skills-category h4 {
    display: inline-block;
    color: var(--surface);
    font-weight: 800;
    font-size: 1.3rem;
    margin: 0;
    padding: 0.05rem 0.4rem;
    position: relative;
    z-index: 1;
}

.skills-category h4::before {
    content: "";
    position: absolute;
    background: var(--text);
    inset: 0;
    z-index: -1;
    transform-origin: center;
}

.skills-category ul {
    list-style: none;
    padding: 0;
    line-height: 1.5rem;
    margin-top: 0.25rem;
}

.skills-category ul li {
    font-family: 'Lato', sans-serif;
    font-size: 0.9rem;
    color: var(--text);
    position: relative;
    padding-left: 1rem;
}

.skills-category ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent);
}


.contact-info {
    font-family: 'Lato', sans-serif;
    margin-top: -2rem;
    line-height: 1rem;
}

.section-title {
    font-size: 4rem;
    margin: 0;
}

.project-link {
    text-decoration: none;
    color: inherit;
    display: flex;
}

.project-page {
    background-color: var(--surface-a);
    border: 2px solid var(--border);
}

.project-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
}

.project-grid-alt {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
}

.project-card {
    background: var(--surface-a);
    border: 2px solid var(--border);
    width: 100%;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
}

.project-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    filter: grayscale(20%) contrast(110%);
    border-bottom: 2px solid var(--border);
}

.project-info {
    padding: 1rem;
}

.project-info h3 {
    display: inline-block;
    padding: 0.3rem 0.4rem;
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    color: var(--surface);
    font-weight: 800;
    letter-spacing: 1px;
    line-height: 1;
    z-index: 1;
    position: relative;
}

.project-info h3::before {
    content: "";
    position: absolute;
    background: var(--text);
    inset: 0;
    z-index: -1;
    transform-origin: center;
}

.project-info h2 a:hover {
    transform: translateY(-3px);
    background: var(--accent);
    box-shadow: 3px 3px 0 var(--accent);
}

.project-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(min(220px, 100%), 100px), max-content));
    gap: 1rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    justify-content: center;
}

.meta-block {
    position: relative;
    padding: 0.75rem 0.9rem;
    background: var(--text);
    color: var(--surface);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    flex-direction: column;
    max-width: 280px;
    gap: 0.3rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.meta-label {
    font-size: 0.7rem;
    opacity: 0.7;
}

.meta-value {
    font-size: 1rem;
}

.meta-link {
    text-decoration: none;
}

.meta-link:hover {
    background: var(--accent);
    color: var(--surface);
    transform: translateY(-4px);
    box-shadow: 4px 4px 0 var(--accent);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    text-transform: uppercase;
    gap: 0.5rem;
}

.tags span {
    position: relative;
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem;
    font-weight: 800;
    display: inline-block;
    text-transform: uppercase;
    z-index: 1;
}

.tags span::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    transform-origin: center;
    animation: jitter 2s steps(1) infinite;
}

.tags span:nth-child(1)::before { animation-duration: 2.3s; }
.tags span:nth-child(2)::before { animation-duration: 3.1s; }
.tags span:nth-child(3)::before { animation-duration: 2.7s; }

.tag-level::before { background-color: rgb(59, 92, 182); }
.tag-3cs::before { background-color: rgb(197, 136, 21); }
.tag-systems::before { background-color: rgb(109, 45, 106); }
.tag-combat::before { background-color: rgb(231, 6, 6); }
.tag-maint::before { background-color: rgb(20, 133, 5); }

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.close-btn:hover {
    color: var(--accent);
}

.metric {
    border-top: 2px solid var(--border);
    padding-top: 0.25rem;
    margin: 0 1rem 0.5rem 1rem;
    font-family: 'Lato', sans-serif;
    font-size: 0.8rem;
}

.description {
    margin: -0.5rem 1rem 0.5rem 1rem;
    font-family: 'Lato', sans-serif;
}

.project-meta {
    display: inline-block;
    align-items: center;
    gap: 4px;
    font-size: 0.9em;
}

.engine-icon {
    width: 16px;
    height: 16px;
}

@keyframes jitter-low {
    0% { transform: rotate(0deg); }
    20% { transform: rotate(0.75deg); }
    40% { transform: rotate(-1.5deg); }
    60% { transform: rotate(1.5deg); }
    80% { transform: rotate(-0.75deg); }
    100% { transform: rotate(0deg); }
}

@keyframes jitter {
    0% { transform: rotate(0deg); }
    20% { transform: rotate(1.5deg); }
    40% { transform: rotate(-3deg); }
    60% { transform: rotate(3deg); }
    80% { transform: rotate(-1.5deg); }
    100% { transform: rotate(0deg); }
}

@keyframes brutalFade {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1024px) {
    .hero {
        padding: 0.75rem 1rem;
    }

    .hero-top {
        align-items: flex-start;
        gap: 0.75rem;
    }

    .hero-title {
        flex-direction: column;
        align-items: flex-start;
    }

    .hide {
        display: none;
    }

    .hero-tags {
        align-self: flex-start;
        margin: 0;
        gap: 0.3rem;
        max-width: 100%;
    }

    .subtitle::before {
        animation: none;
        transition: none;
    }

    .subtitle {
        padding: 0.15rem 0.35rem;
    }

    .social-links {
        gap: 0.5rem;
    }

    .social-links a {
        width: 32px;
        height: 32px;
        padding: 0rem;
        border-width: 1.5px;
        box-shadow: 1.5px 1.5px 0 var(--border);
    }

    .social-links a svg {
        width: 100%;
        height: 100%;
    }

    .section-title {
        font-size: 3rem;
    }

    .project-info h3::before,
    .tags span::before {
        animation: none !important;
        transition: none !important;
    }

    .project-card img {
        height: 180px;
    }
}
