@import url('https://fonts.googleapis.com/css2?family=Doto:wght@100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap');

html, body {
    background-color: #0a0a0a;
    background-image: url('https://cdn.goq.lol/noisy-texture-100x100-o2-d10-c-0a0a0a-t1.png');
    background-repeat: repeat;
    color: #b3d6c6;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: 'Doto', sans-serif;
    margin: 0;
    padding: 0 20px;
    box-sizing: border-box;
}

li {
    list-style: none;
}

.main {
    font-size: 6rem;
    font-weight: 500;
    color: black;
    background-color: #b3d6c6;
    text-align: center;
    padding: 10px 20px;
    box-sizing: border-box;
}

.sec {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2dvh;
    font-weight: 400;
    color: #474747;
    padding: 8px;
    text-align: center;
    max-width: 1200px;
    box-sizing: border-box;
}

.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-top: 20px;
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
    box-sizing: border-box;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    font-family: doto, sans-serif;
    font-size: 2.5dvh;
    font-weight: 900;
    color: #b3d6c6;
    border: 1px solid #474747;
    background-color: transparent;
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    width: 100%;
    min-height: 20px;
    box-sizing: border-box;
}

.btn svg {
    width: 1.2em;
    height: 1.2em;
    vertical-align: middle;
    fill: currentColor;
}

.btn:hover {
    font-weight: 600;
    background-color: #b3d6c6;
    border: 1px solid #b3d6c6;
    color: black;
}

.btn:focus {
    outline: none;
}

.btn::-moz-focus-inner {
    border: 0;
}

.weather-info svg {
    width: 1.4em;
    height: 1.4em;
    vertical-align: middle;
}

#bg-canvas {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.projects-section {
    margin-top: 32px;
    width: 100%;
    max-width: 1200px;
    text-align: left;
}

.projects-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.6dvh;
    color: #474747;
    margin-bottom: 14px;
    padding: 0 20px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 0 20px;
    box-sizing: border-box;
}

.project-card {
    display: block;
    text-decoration: none;
    border: 1px solid #474747;
    padding: 16px;
    box-sizing: border-box;
    transition: all 0.2s ease-in-out;
    color: #b3d6c6;
}

.project-card:hover {
    background-color: #111;
    border-color: #b3d6c6;
}

.project-card:hover .project-url {
    color: #b3d6c6;
}

.project-card:hover .project-arrow {
    transform: translate(2px, -2px);
}

.project-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.project-favicon {
    width: 16px;
    height: 16px;
    min-width: 16px;
    max-width: 16px;
    min-height: 16px;
    max-height: 16px;
    object-fit: contain;
    flex-shrink: 0;
}

.project-url {
    font-family: 'Doto', sans-serif;
    font-size: 2dvh;
    font-weight: 900;
    color: #769b89;
    flex: 1;
    transition: color 0.2s ease-in-out;
}

.project-arrow {
    width: 14px;
    height: 14px;
    stroke: #474747;
    stroke-width: 2;
    fill: none;
    flex-shrink: 0;
    transition: transform 0.2s ease-in-out;
}

.project-desc {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.4dvh;
    color: #474747;
    line-height: 1.6;
    margin-bottom: 12px;
}

.project-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.project-stack span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2dvh;
    color: #474747;
    border: 1px solid #2a2a2a;
    padding: 2px 8px;
    transition: color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.project-card:hover .project-stack span {
    color: #5a7a6a;
    border-color: #3a4a44;
}

.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.65);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease-in-out;
    padding: 20px;
    box-sizing: border-box;
    z-index: 50;
}

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

.modal-content {
    background: #0f0f0f;
    border: 1px solid #303030;
    color: #b3d6c6;
    padding: 24px 20px;
    max-width: 420px;
    width: 100%;
    position: relative;
    box-shadow: 0 12px 45px rgba(0, 0, 0, 0.6);
}

.modal-title {
    font-family: 'Doto', sans-serif;
    font-size: 2.6dvh;
    margin-bottom: 6px;
}

.modal-subtitle {
    font-family: 'JetBrains Mono', monospace;
    color: #769b89;
    font-size: 1.8dvh;
    margin-bottom: 18px;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    color: #b3d6c6;
    cursor: pointer;
    padding: 4px;
}

.modal-close:hover {
    color: #b3d6c6;
}

.modal-close svg {
    width: 20px;
    height: 20px;
    color: #b3d6c6;
}

.donate-links {
    display: grid;
    gap: 12px;
}

.donate-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Doto', sans-serif;
    font-weight: 800;
    color: #b3d6c6;
    text-decoration: none;
    background: transparent;
    padding: 12px 14px;
    border: 1px solid #474747;
    transition: all 0.2s ease-in-out;
}

.donate-link:hover {
    background: #b3d6c6;
    border-color: #b3d6c6;
    color: #0a0a0a;
    font-weight: 600;
}

.donate-link .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
}

.donate-link svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

.modal-open {
    overflow: hidden;
}

.donate-item {
    grid-column: 1 / -1;
}

@media screen and (max-width: 1440px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    .main {
        font-size: 5.2rem;
    }
    .twitch-item,
    .telegram-item,
    .donate-item {
        grid-column: 1 / -1;
    }
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 1313px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
    }
    .twitch-item,
    .donate-item {
        grid-column: 1 / -1;
    }
}

@media screen and (max-width: 1024px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    .main {
        font-size: 4.8rem;
    }
    .twitch-item,
    .donate-item {
        grid-column: 1 / -1;
    }
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 1000px) {
    .telegram-item {
        grid-column: 1 / -1;
    }
}

@media screen and (max-width: 768px) {
    .main {
        font-size: 4.2rem;
    }
    .sec {
        font-size: 1.8dvh;
    }
    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .btn {
        font-size: 2.2dvh;
        padding: 8px 12px;
    }
    .weather-info svg {
        width: 1.9em;
        height: 1.9em;
    }
    .projects-grid {
        grid-template-columns: 1fr;
        padding: 0;
    }
    .projects-label {
        padding: 0;
    }
}

@media screen and (max-width: 540px) {
    .main {
        font-size: 3.6rem;
    }
    .grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .btn {
        font-size: 2.1dvh;
        padding: 8px 10px;
    }
}

@media screen and (max-width: 420px) {
    .main {
        font-size: 3rem;
    }
    .sec {
        font-size: 1.5dvh;
    }
    .btn {
        font-size: 1.9dvh;
        padding: 6px 10px;
    }
    .weather-info svg {
        width: 1.8em;
        height: 1.8em;
    }
}

@media screen and (max-width: 340px) {
    .main {
        font-size: 2.4rem;
        padding: 8px 12px;
    }
    .btn {
        font-size: 1.7dvh;
        padding: 5px 8px;
    }
}
