* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background-color: #121212;
    color: #ffffff;
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    -webkit-font-smoothing: antialiased;
}

main {
    overflow-x: hidden;
    min-height: 100vh;
}

.hero {
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.terminal-wrap {
    max-width: 896px;
    width: 100%;
    margin: 0 16px;
    position: relative;
    z-index: 20;
}

.terminal {
    position: relative;
    padding: 24px;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid rgb(31, 41, 55);
    border-radius: 8px;
    backdrop-filter: blur(16px);
    opacity: 0;
    animation: fade-in 0.6s ease-out forwards;
    cursor: grab;
    user-select: none;
    touch-action: none;
    left: 0;
    top: 0;
}

.terminal.dragging {
    cursor: grabbing;
    transition: none;
}

@keyframes fade-in {
    to {
        opacity: 1;
    }
}

.terminal-dots {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 9999px;
}

.dot-red {
    background-color: rgb(239, 68, 68);
}

.dot-red.hovering {
    cursor: none;
}

.cursor-spinner {
    position: fixed;
    width: 32px;
    height: 24px;
    background-image: url('spinner.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transform: translate(-50%, -50%);
}

.cursor-spinner.visible {
    opacity: 1;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.dot-yellow {
    background-color: rgb(234, 179, 8);
}

.dot-green {
    background-color: rgb(34, 197, 94);
}

.terminal-body {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.prompt-line {
    color: rgb(34, 197, 94);
    margin: 0;
    min-height: 1.5em;
}

.cursor {
    display: inline-block;
    width: 0.55ch;
    background-color: rgb(34, 197, 94);
    margin-left: 2px;
    animation: blink 1s step-end infinite;
}

.cursor.hide {
    visibility: hidden;
}

h1.name {
    font-size: clamp(28px, 8vw, 48px);
    line-height: 1.2;
    font-weight: 700;
    margin: 8px 0 16px;
    min-height: 1.2em;
    white-space: nowrap;
}

p.title {
    color: rgb(156, 163, 175);
    margin: 0 0 8px;
    min-height: 1.5em;
}

.links-line {
    color: rgb(34, 197, 94);
    margin: 0;
    min-height: 1.5em;
}

.links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.45, 0, 0.55, 1);
}

.links.visible {
    opacity: 1;
}

.link-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background-color: #121212;
    border: 1px solid rgb(31, 41, 55);
    border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    color: rgb(156, 163, 175);
    text-decoration: none;
}

.link-badge:hover {
    background-color: rgba(17, 17, 17, 0.2);
    color: #ffffff;
}

.link-badge svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    50.01%,
    100% {
        opacity: 0;
    }
}

.scroll-cue {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    font-size: 28px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease-in-out;
}

.scroll-cue.visible {
    opacity: 1;
    animation: scroll-bounce 2s ease-in-out infinite;
}

@keyframes scroll-bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(12px);
    }
}

.easter-egg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-weight: 400;
    font-size: 20px;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    pointer-events: none;
}

.easter-egg.visible {
    opacity: 1;
}

.projects {
    padding: 80px 16px;
    max-width: 1152px;
    margin: 0 auto;
    overflow-x: hidden;
}

.projects-heading {
    position: relative;
    font-size: clamp(16px, 5vw, 28px);
    font-weight: 700;
    margin: 0 0 48px;
    min-height: 1.5em;
}

.projects-heading-inner {
    position: absolute;
    left: 0;
    top: 0;
    white-space: nowrap;
    color: rgb(34, 197, 94);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(280px, 1fr));
    justify-content: start;
    gap: 24px;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.45, 0, 0.55, 1);
}

.project-grid.visible {
    opacity: 1;
}

@media (max-width: 920px) {
    .project-grid {
        grid-template-columns: repeat(2, minmax(280px, 1fr));
    }
}

@media (max-width: 600px) {
    .project-grid {
        grid-template-columns: minmax(280px, 1fr);
    }
}

.project-card {
    padding: 0;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid rgb(31, 41, 55);
    border-radius: 8px;
    backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s ease-out;
}

.project-card:hover {
    transform: translateY(-6px);
}

.project-card.clickable {
    cursor: pointer;
    transition: border-color 0.2s ease-in-out, transform 0.3s ease-out;
}

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
    background-color: #ffffff;
}

.project-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px;
}

.project-desc {
    color: rgb(156, 163, 175);
    margin: 0 0 16px;
    flex-grow: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.project-tag {
    font-size: 12px;
    padding: 4px 10px;
    background-color: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 9999px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    color: rgb(34, 197, 94);
}

.project-links {
    display: flex;
    gap: 16px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgb(156, 163, 175);
    text-decoration: none;
    font-size: 14px;
}

.project-link svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.hide {
    display: none !important;
}

.show-more-btn {
    display: block;
    margin: 32px auto 0;
    width: fit-content;
    background: none;
    border: none;
    padding: 0;
    color: rgb(156, 163, 175);
    font-size: 14px;
    cursor: pointer;
    transition: color 0.2s ease-in-out;
}

.show-more-btn:hover {
    color: #ffffff;
}

.project-link:hover {
    color: #ffffff;
}
