*{
    box-sizing:border-box;
}

html {
    scroll-behavior: smooth;
    background-color:black;
}

body {
    position: relative;
    color: white;
    margin: 0;
    isolation: isolate;
    background-color: black;
    font-family: 'micro 5 charted', monospace ;
    font-size: 30px;
    line-height: 1.5;
}

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

svg {
    display: block;
}
::selection {
    background-color: white;
    color: black;
}
:focus-visible {
    outline: 1px solid white;
    outline-offset: 5px;
}

.dot-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(
    circle,
    #ffffff66 0.6px,
    transparent 0.95px
    );
    background-size: 25px 25px;

}

#hover-dots {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

main {
    position: relative;
    z-index: 1;
}

.site-nav {
    position: fixed;
    z-index: 10;
    top: 0;
    left: 0;
    width: 100%;
    height: 66px;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: white;
    color: black;
    border-bottom: 1px solid black;
}

.nav-identity {
    display: flex;
    align-items: center;
    gap: 13px;
    white-space: nowrap;
}

.brand-mark {
    font-family: 'micro 5 charted', monospace;
    font-size: 40px;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1;
}

.brand-divider {
    width: 1px;
    height: 20px;
    background-color: black;
    opacity: 0.4;
}

.brand-name {
    font-family: 'bitcount prop single', monospace;
    font-size:17px;
    font-weight: 500;
    letter-spacing: 0;
}

.desktop-nav {
    font-family: 'bitcount prop single', monospace;
    display: flex;
    align-items: center;
    gap : 30px;
}

.desktop-nav a {
    font-size: 17px;
    transition: opacity 0.2s;
}

.desktop-nav a:not(.github-button):hover {
    opacity: 0.5;
}

.github-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    border: 1px solid black;
    border-radius: 3px;
    font-weight: 500;
}

.github-button:hover{
    color: white;
    background-color: black;
}

.menu-toggle {
    display: none;
}

.mobile-nav {
    position: relative;
    z-index: 1;
    display: none;
    font-family: 'bitcount prop single', monospace;
}

.landing {
    position: relative;
    z-index: 1;
    height: 100svh;
    padding: 66px 40px 0;
    display: flex;
    align-items: center;
}

.landing-inner {
    position: relative;
    width: 100%;
    margin: auto;
    padding: 32px 0;
}

.landing h1 {
    font-family: 'bitcount prop single', monospace;
    margin: 0;
    font-size: 15vw;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.05em;
}

.landing h1 span {
    display: block;
    width: max-content;
    white-space: nowrap;
}

.hero-portrait {
    position: absolute;
    top: 70%;
    left: 85%;
    width: 18%;
    height: auto;
    transform: translate(-50%, -50%) rotate(9deg);
    image-rendering: pixelated;
}

.content-section {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100svh - 66px);
    padding: 90px 40px;
    scroll-margin-top: 66px;
}

.aboutme-section h2 {
    font-family: 'bitcount prop single', monospace;
    margin: 0;
    font-size: 80px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.03em;
}

.aboutme-copy {
    font-family: 'pixelify sans', monospace;
    font-size: 30px;
    max-width: 65ch;
    margin-top: 32px;
}

.aboutme-copy p {
    margin: 0;
    font-size: inherit;
    line-height: 1.6;
    letter-spacing: 0;
}
.aboutme-copy p + p {
    margin-top: 20px;
}
.aboutme-copy a {
    text-underline-offset: 5px;
    text-decoration: underline;
    font-size: inherit;
    font-family: 'micro 5 charted', monospace;
}
.aboutme-copy a:hover {
    text-decoration-thickness: 2px;
}

.work-section h2 {
    font-family: 'bitcount prop single', monospace;
    margin: 0;
    font-size: 80px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.03em;
}

.work-section {
    padding-block: 40px;
}

.work-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px 24px;
    margin-top: 28px;
}

.project {
    min-width: 0;
}
.project a {
    display: block;
}
.project img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 8/5;
    object-fit: contain;
    background-color: black;
}

.project h3 {
    font-family: 'micro 5 charted', monospace;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin: 16px 0 8px;
    font-size: 36px;
    font-weight: 500;
    line-height: 1.3;
    overflow-wrap: anywhere;
}
.project a:hover h3,.project a:focus-visible h3 {
    text-decoration: underline;
    text-underline-offset: 6px;
}
.project p {
    font-family: 'pixelify sans', monospace;
    margin: 0;
    font-size: 20px;
    line-height: 1.5;
}

.skills-section h2 {
    font-family: 'bitcount prop single', monospace;
    margin: 0;
    font-size: 80px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.03em;
}

.skills-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 40px;
}

.skills-column {
    position: relative;
    padding: 28px;
}
.skills-column:first-child {
    padding-left: 0;
}

.skills-column h3 {
    font-family: 'micro 5 charted', monospace;
    margin: 0 0 40px;
    font-size: 38px;
    font-weight: 500;
    letter-spacing: -0.01em;
    text-transform: uppercase;
}

.skills-column ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.skills-column li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'pixelify sans', monospace;
    margin-bottom: 13px;
    font-size: 20px;
    letter-spacing:0;
}
.skill-logos {
    display: inline-flex;
    flex-shrink: 0;
}

.skill-logos img {
    display: block;
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.content-section::before,.skills-grid::before, .skills-grid::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    z-index: 2;
    height: 1px;
    background-color: white;
    box-shadow: 0 0 0 5px black;
    pointer-events: none;
}

.content-section::before,.skills-grid::before {
    top: 0;
}
.skills-grid::after {
    bottom: 0;
}
.skills-column:not(:last-child)::after {
    content:'';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    background-color: white;
    width: 1px;
    box-shadow: 0 0 0 5px black;
    pointer-events: none;
}

@media (max-width: 1100px) {
    .work-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .project img {
        height: 140px;
    }
}

@media (max-width: 950px) {
    .skills-column:last-child {
        grid-column: 1 / -1;
        padding-left: 0;
    }
    .skills-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .skills-column:nth-child(2)::after {
        display: none;
    }
    .skills-column:nth-child(-n + 2)::before {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 2;
        height: 1px;
        background-color: white;
        box-shadow: 0 0 0 5px black;
  }
}

@media (max-width: 780px) {
    .site-nav {
        padding-inline: 20px;
    }
    .desktop-nav {
        display: none;
     }
    .menu-toggle {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        width: 40px;
        height: 40px;
        padding: 0;
        border: 0;
        background-color: white;
        cursor: pointer;
    }
    .menu-toggle span {
        width: 24px;
        height: 1px;
        background-color: black;
        transition: transform 0.2s;
    }
    .menu-toggle[aria-expanded='true'] span:first-child {
        transform: translateY(3.5px) rotate(45deg);
    }
    .menu-toggle[aria-expanded='true'] span:last-child {
        transform: translateY(-3.5px) rotate(-45deg);
    }

    .mobile-nav {
        position: fixed;
        inset: 66px 0 0;
        z-index: 9;
        display: flex;
        flex-direction: column;
        gap: 28px;
        padding: 60px 20px;
        background-color: white;
        color: black;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.2s, visibility 0.2s;
    }
    .mobile-nav.open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    .mobile-nav a {
        font-size: 26px;
        font-weight: 400;
    }
    .mobile-nav .mobile-github {
        align-self: flex-start;
        margin-top: 15px;
        padding: 12px 18px;
        border: 1px solid black;
        border-radius: 3px;
        font-size: 22px;
    }
    .landing {
        padding: 66px 20px 0;
    }
    .content-section {
        padding: 70px 20px;
        scroll-margin-top: 66px;
    }
    .work-section {
        padding-block: 32px;
    }
    .aboutme-section h2,
    .work-section h2,
    .skills-section h2 {
        font-size: 52px;
    }
    .aboutme-copy {
        font-size: 24px;
    }
    .project h3 {
        font-size: 28px;
    }
    .skills-column {
        padding: 24px 15px;
    }
    .skills-column:first-child, .skills-column:nth-child(3) {
        padding-left: 0;
    }

}

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

@media (max-width: 400px) {
    .work-list {
        grid-template-columns: 1fr;
    }
    .brand-name {
        font-size: 14px;
    }
    .nav-identity {
        gap: 9px;
    }
    .skills-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .skills-column {
        padding: 24px 0;
    }
    .skills-column::after, .skills-column::before {
        display: none;
    }
}

.site-nav :focus-visible,.mobile-nav :focus-visible {
    outline-color: black;
}

.mobile-nav .mobile-github {
    background-color: black;
    color: white;
}

/* :) */
