@font-face {
    font-family: 'Basement Grotesque';
    src: url('./fonts/BasementGrotesque-Black_v1.202.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --black: #000000;
    --white: #ffffff;
    --gray: #666666;
    --text-primary: rgb(230, 230, 230);
    --font-display: 'Basement Grotesque', 'Arial Black', sans-serif;
    --font-body: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
    --h0-size: 46px;
    --h1-size: 35px;
    --h2-size: 24px;
    --h3-size: 18px;
    --body-size: 12px;
    --ls-h0: -0.04em;
    --ls-h1: -0.04em;
    --ls-h2: -0.03em;
    --ls-h3: -0.02em;
    --ls-body: 0em;
    --lh-heading: 0.9;
    --lh-body: 1.5rem;
    --weight-heading: 600;
    --weight-body: 500;
}

@media (min-width: 1024px) {
    :root {
        --h0-size: 98px;
        --h1-size: 76px;
        --h2-size: 38px;
        --h3-size: 24px;
        --body-size: 13px;
    }
}

@media (min-width: 1920px) {
    :root {
        --h0-size: 120px;
        --h1-size: 90px;
        --h2-size: 48px;
    }
}

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

::selection {
    background: var(--white);
    color: var(--black);
}

html {
    scroll-behavior: smooth;
    font-feature-settings: "ss01";
}

    body {
    background-color: var(--black);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: var(--weight-body);
    line-height: var(--lh-body);
    text-rendering: optimizelegibility;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

p {
    text-wrap: balance;
}

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

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.7);
}

.nav::before {
    content: '';
    position: absolute;
    inset: 0;
    height: 48px;
    background: 
        repeating-linear-gradient(
            0deg,
            var(--black) 0px,
            var(--black) 1px,
            transparent 1px,
            transparent 2px
        ),
        repeating-linear-gradient(
            90deg,
            var(--black) 0px,
            var(--black) 1px,
            transparent 1px,
            transparent 2px
        );
    background-size: 2px 2px;
    pointer-events: none;
}

.nav-logo {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
    margin-top: 8px;
}

.nav-logo img {
    height: 32px;
    width: auto;
    object-fit: contain;
    margin-left: 48px;
}

.nav-links {
    display: flex;
    gap: 48px;
    position: relative;
    z-index: 1;
    margin-right: 48px;
}

.nav-links a {
    font-family: var(--font-body);
    font-size: var(--body-size);
    font-weight: var(--weight-body);
    text-transform: uppercase;
    letter-spacing: var(--ls-body);
    line-height: 48px;
    height: 48px;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.5;
}

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 144px 48px 96px;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 48px 48px;
    background-position: 48px 48px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: var(--h0-size);
    font-weight: 900;
    letter-spacing: var(--ls-h0);
    text-transform: uppercase;
}

.hero-title .line {
    display: flex;
    align-items: center;
    height: 96px;
}

.hero-hook {
    font-family: var(--font-body);
    font-weight: var(--weight-heading);
    margin-top: 48px;
    font-size: var(--h2-size);
    line-height: 48px;
    letter-spacing: var(--ls-h2);
    max-width: 600px;
    color: var(--gray);
}

.hero-hook em {
    font-style: normal;
    color: var(--text-primary);
}

.hero-available {
    font-family: var(--font-body);
    font-size: var(--body-size);
    font-weight: var(--weight-heading);
    color: var(--text-primary);
    margin-top: 48px;
    padding: 12px 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
}

.hero-available::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: 
        radial-gradient(circle, var(--text-primary) 1px, transparent 1px) top left,
        radial-gradient(circle, var(--text-primary) 1px, transparent 1px) top right,
        radial-gradient(circle, var(--text-primary) 1px, transparent 1px) bottom left,
        radial-gradient(circle, var(--text-primary) 1px, transparent 1px) bottom right;
    background-size: 2px 2px;
    background-repeat: no-repeat;
    pointer-events: none;
}

.github-graph {
    position: absolute;
    right: 48px;
    bottom: 245px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
}

.github-squares {
    display: grid;
    grid-template-rows: repeat(7, 12px);
    grid-auto-flow: column;
    gap: 2px;
    background: var(--black);
    padding: 2px;
}

.github-square {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
}

.github-square[data-level="1"] { background: rgba(255, 255, 255, 0.25); }
.github-square[data-level="2"] { background: rgba(255, 255, 255, 0.5); }
.github-square[data-level="3"] { background: rgba(255, 255, 255, 0.75); }
.github-square[data-level="4"] { background: rgba(255, 255, 255, 1); }

.github-link-btn {
    font-family: var(--font-body);
    font-size: var(--body-size);
    font-weight: var(--weight-heading);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    padding-bottom: 4px;
    border-bottom: 1px solid var(--text-primary);
    transition: opacity 0.3s;
}

.github-link-btn:hover {
    opacity: 0.5;
}

.hero-footer {
    position: absolute;
    bottom: 0;
    left: 48px;
    right: 48px;
    height: 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-body);
    font-weight: var(--weight-heading);
    font-size: var(--h3-size);
    letter-spacing: var(--ls-h3);
    line-height: 1;
    color: var(--gray);
}

.hero-footer span {
    height: 48px;
    display: flex;
    align-items: center;
}

.section {
    padding: 96px 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.section-header {
    display: flex;
    align-items: baseline;
    gap: 24px;
    margin-bottom: 48px;
}

.section-number {
    font-family: var(--font-body);
    font-weight: var(--weight-body);
    font-size: var(--body-size);
    color: var(--gray);
    letter-spacing: var(--ls-body);
}

.section-title {
    font-family: var(--font-display);
    font-size: var(--h1-size);
    font-weight: 900;
    line-height: var(--lh-heading);
    letter-spacing: var(--ls-h1);
}

#about {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.about-layout {
    display: flex;
    flex-direction: column;
    gap: 64px;
}

.about-headline {
    font-family: var(--font-display);
    font-size: clamp(36px, 6vw, 96px);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -0.03em;
    text-transform: uppercase;
}

.about-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
}

.about-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.about-text {
    font-family: var(--font-body);
    font-size: var(--h3-size);
    line-height: 1.6;
    letter-spacing: var(--ls-h3);
    font-weight: var(--weight-body);
    color: var(--gray);
}

.about-text em {
    font-style: normal;
    color: var(--text-primary);
}

.about-link {
    color: var(--text-primary);
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: opacity 0.3s;
}

.about-link:hover {
    opacity: 0.5;
}

.about-eye {
    display: flex;
    align-items: center;
    gap: 32px;
}

.about-eye img {
    width: 120px;
    height: 120px;
    object-fit: cover;
}

.eye-label {
    font-family: var(--font-display);
    font-size: clamp(32px, 4vw, 56px);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -0.03em;
    text-transform: uppercase;
}

.about-tagline {
    font-family: var(--font-display);
    font-size: clamp(24px, 3vw, 42px);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    margin-top: auto;
}

@media (max-width: 768px) {
    .github-graph {
        display: none;
    }
    
    .about-details {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .about-tagline {
        margin-top: 24px;
    }
}

.projects {
    display: flex;
    flex-direction: column;
}

.project-card {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: background 0.3s ease;
    scroll-margin-top: 72px;
}

.project-card:first-child {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.project-card.active {
    background: rgba(255, 255, 255, 0.02);
}

.project-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 48px 0;
    background: none;
    border: none;
    cursor: pointer;
    transition: padding 0.3s;
}

.project-header:hover {
    padding-left: 24px;
}

.project-name {
    font-family: var(--font-display);
    font-size: clamp(32px, 5vw, 64px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    text-transform: uppercase;
    transition: opacity 0.3s;
}

.project-header:hover .project-name {
    opacity: 0.5;
}

.project-toggle {
    font-family: var(--font-heading);
    font-size: 48px;
    font-weight: 900;
    color: var(--text-primary);
    transition: transform 0.3s;
}

.project-card.active .project-toggle {
    transform: rotate(45deg);
}

.project-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                padding 0.3s ease,
                opacity 0.3s ease;
    padding: 0 0;
    opacity: 0;
}

.project-card.active .project-content {
    max-height: 1000px;
    padding: 0 0 48px 0;
    opacity: 1;
}

.project-grid {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 48px;
}

.project-icon {
    width: 120px;
    height: 120px;
}

.icon-placeholder {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--gray);
}

.skeleton {
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-tag {
    display: inline-block;
    width: 80px;
    height: 52px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

@keyframes skeleton-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.project-icon img {
    width: 100%;
    height: 100%;
    border-radius: 24px;
    object-fit: cover;
}

.loading {
    padding: 48px 0;
    font-family: var(--font-body);
    font-size: var(--body-size);
    color: var(--gray);
}

.project-info {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.project-desc {
    font-family: var(--font-body);
    font-size: var(--h3-size);
    font-weight: var(--weight-heading);
    line-height: 1.4;
    letter-spacing: var(--ls-h3);
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: center;
}

.project-rating {
    font-family: var(--font-body);
    font-size: var(--h3-size);
    font-weight: var(--weight-heading);
    color: var(--text-primary);
    padding: 16px 28px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
}

.project-rating::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: 
        radial-gradient(circle, var(--text-primary) 1px, transparent 1px) top left,
        radial-gradient(circle, var(--text-primary) 1px, transparent 1px) top right,
        radial-gradient(circle, var(--text-primary) 1px, transparent 1px) bottom left,
        radial-gradient(circle, var(--text-primary) 1px, transparent 1px) bottom right;
    background-size: 2px 2px;
    background-repeat: no-repeat;
    pointer-events: none;
}

.project-tag {
    font-family: var(--font-body);
    font-size: var(--h3-size);
    font-weight: var(--weight-heading);
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 16px 28px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.project-detail {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-label {
    font-family: var(--font-display);
    font-size: var(--h3-size);
    font-weight: 900;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.detail-value {
    font-family: var(--font-body);
    font-size: var(--h3-size);
    font-weight: var(--weight-heading);
    line-height: 1.4;
    letter-spacing: var(--ls-h3);
    color: var(--gray);
}

.detail-value em {
    font-style: normal;
    color: var(--text-primary);
}

.detail-stack {
    color: var(--gray);
}

.project-layout {
    display: grid;
    grid-template-columns: 65% 35%;
    gap: 48px;
}

.project-left {
    display: flex;
    flex-direction: column;
    gap: 32px;
    justify-content: space-between;
    min-height: 100%;
}

.project-right {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.screenshot-carousel {
    position: relative;
    width: 240px;
    aspect-ratio: 460 / 996;
    overflow: hidden;
}

.screenshot-carousel .screenshot-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.screenshot-carousel .screenshot-img.active {
    opacity: 1;
}

.screenshot-placeholder {
    width: 240px;
    aspect-ratio: 460 / 996;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--gray);
}

.project-appstore {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: auto;
    font-family: var(--font-body);
    font-size: var(--body-size);
    font-weight: var(--weight-heading);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    padding-bottom: 4px;
    border-bottom: 1px solid var(--text-primary);
    transition: opacity 0.3s;
}

.project-appstore:hover {
    opacity: 0.5;
}

@media (max-width: 768px) {
    .project-name {
        text-align: left;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .project-icon {
        width: 72px;
        height: 72px;
    }
    
    .project-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .project-right {
        order: -1;
    }
    
    .screenshot-carousel {
        width: 120px;
    }
    
    .screenshot-placeholder {
        width: 120px;
    }
}

.contact-tagline {
    font-family: var(--font-body);
    font-size: var(--h2-size);
    font-weight: var(--weight-heading);
    color: var(--gray);
    margin-bottom: 32px;
}

.contact-content {
    margin-bottom: 64px;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    font-family: var(--font-body);
    font-size: var(--h3-size);
    font-weight: var(--weight-heading);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    padding-bottom: 4px;
    border-bottom: 1px solid var(--text-primary);
    transition: opacity 0.3s;
}

.contact-link:hover {
    opacity: 0.5;
}

.socials {
    display: flex;
    gap: 48px;
}

.social-link {
    font-family: var(--font-body);
    font-weight: var(--weight-heading);
    font-size: var(--h3-size);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray);
    transition: color 0.3s;
}

.social-link:hover {
    color: var(--text-primary);
}

.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 48px;
    font-family: var(--font-body);
    font-weight: var(--weight-body);
    font-size: var(--body-size);
    letter-spacing: var(--ls-body);
    color: var(--gray);
}

@media (max-width: 1024px) {
    .nav {
        padding: 0 24px;
    }
    
    .nav-links {
        gap: 24px;
    }
    
    .hero {
        padding: 96px 24px 72px;
    }
    
    .hero-hook {
        margin-top: 24px;
    }
    
    .hero-footer {
        left: 24px;
        right: 24px;
        bottom: 24px;
    }
    
    .section {
        padding: 72px 24px;
    }
    
    .section-header {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 48px;
    }
    
    .project {
        padding: 24px 0;
    }
    
    .project:hover {
        padding-left: 12px;
    }
    
    .socials {
        flex-wrap: wrap;
        gap: 24px;
    }
    
    .footer {
        flex-direction: column;
        gap: 24px;
        text-align: center;
        padding: 48px 24px;
    }
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--black);
}

::-webkit-scrollbar-thumb {
    background: var(--white);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray);
}
