@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Inter:wght@300;400;500&display=swap');

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

:root {
    --bg: #050505;
    --bg-soft: #0a0a0a;
    --green: #3DFFA0;
    --text: #d6d6d6;
    --dim: #7d7d7d;
    --faint: #1f1f1f;
    --card: #0d0d0d;
    --card-border: #202020;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
    line-height: 1.5;
    background-image: radial-gradient(circle at 15% 10%, #101010 0%, var(--bg) 40%);
}

/* Subtle film grain */
.noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 100;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.mono {
    font-family: 'JetBrains Mono', monospace;
}

.dim {
    color: var(--dim);
}

main {
    max-width: 620px;
    margin: 0 auto;
    padding: 0 24px 88px;
    padding-top: min(20vh, 150px);
}


/* ---- Intro ---- */

.intro {
    margin-bottom: 6px;
}

.intro .mono {
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--green);
    margin-bottom: 18px;
    text-transform: uppercase;
}

.name {
    font-size: clamp(30px, 7vw, 52px);
    font-weight: 500;
    letter-spacing: -1.1px;
    line-height: 1.08;
    margin-bottom: 10px;
    color: #f4f4f4;
}

.role {
    font-size: clamp(14px, 2.8vw, 18px);
    font-weight: 400;
    color: #b5b5b5;
}

/* ---- Divider ---- */

.divider {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--faint), transparent);
    margin: 34px 0 30px;
}

/* ---- Work ---- */

.label {
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--dim);
    margin-bottom: 14px;
}

.project {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    margin-bottom: 10px;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    background: linear-gradient(180deg, #101010, var(--card));
    text-decoration: none;
    color: inherit;
    transition: color 0.2s, transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

a.project:hover,
button.project:hover {
    color: var(--green);
    transform: translateY(-1px);
    border-color: #29553f;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

a.project:hover .project-status,
button.project:hover .project-status {
    box-shadow: 0 0 10px var(--green);
}

a.project:hover .project-arrow,
button.project:hover .project-arrow {
    opacity: 1;
    transform: translateX(0);
}

button.project {
    width: 100%;
    font: inherit;
    text-align: left;
    cursor: pointer;
    appearance: none;
}

.project-status {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 6px var(--green);
    flex-shrink: 0;
    animation: pulse 3s ease-in-out infinite;
}

.project-status.off {
    background: var(--dim);
    box-shadow: none;
    animation: none;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.project-name {
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
}

.project-badge {
    flex-shrink: 0;
    font-size: 9px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--green);
    border: 1px solid #29553f;
    padding: 3px 8px;
    border-radius: 999px;
    opacity: 0.9;
}

.project-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    margin-left: auto;
    color: #8a8a8a;
}

.project-arrow {
    font-size: 14px;
    color: var(--green);
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.2s, transform 0.2s;
}

.ghost {
    opacity: 0.45;
}

/* ---- Footer ---- */

.foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--green);
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: text-shadow 0.3s;
}

.contact:hover {
    text-shadow: 0 0 12px var(--green);
}

.foot .mono {
    font-size: 11px;
}

/* ---- Typing caret ---- */

.caret {
    color: var(--green);
    animation: blink 0.6s step-end infinite;
    font-weight: 300;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ---- Fade-in animations ---- */

.fade-in {
    opacity: 0;
    transform: translateY(10px);
    animation: appear 0.6s ease forwards;
}

.d1 { animation-delay: 0.1s; }
.d2 { animation-delay: 0.2s; }
.d3 { animation-delay: 0.35s; }
.d4 { animation-delay: 0.5s; }
.d5 { animation-delay: 0.65s; }
.d6 { animation-delay: 0.8s; }
.d7 { animation-delay: 0.95s; }

@keyframes appear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Keep ghost items at lower opacity after animation */
.ghost.fade-in {
    animation: appear-ghost 0.6s ease forwards;
}

@keyframes appear-ghost {
    to {
        opacity: 0.45;
        transform: translateY(0);
    }
}

/* ---- Project modal ---- */

.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal[hidden] {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(4px);
}

.modal-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    padding: 28px 24px 24px;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    background: linear-gradient(180deg, #121212, var(--card));
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--dim);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}

.modal-close:hover {
    color: var(--text);
    background: var(--faint);
}

.modal-kicker {
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--green);
    margin-bottom: 8px;
}

.modal-title {
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.3px;
    color: #f4f4f4;
    margin-bottom: 16px;
}

.modal-card {
    border: 1px solid var(--card-border);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.25);
    padding: 14px 16px 12px;
    margin-bottom: 12px;
}

.modal-card:last-child {
    margin-bottom: 0;
}

.modal-card--secondary {
    background: rgba(61, 255, 160, 0.04);
    border-color: #24352c;
}

.modal-card-title {
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--dim);
    margin: 0 0 10px;
}

.modal-link-block {
    display: inline-block;
    font-size: 14px;
}

.modal-details {
    margin: 0;
}

.modal-row {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 12px 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--faint);
    font-size: 13px;
}

.modal-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.modal-card .modal-row:first-child {
    padding-top: 0;
}

.modal-row dt {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--dim);
    margin: 0;
}

.modal-row dd {
    margin: 0;
    color: var(--text);
}

.modal-link {
    color: var(--green);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s, text-shadow 0.2s;
}

.modal-link:hover {
    border-bottom-color: var(--green);
    text-shadow: 0 0 12px rgba(61, 255, 160, 0.35);
}

@media (max-width: 640px) {
    main {
        padding-top: 80px;
    }

    .project {
        gap: 10px;
        padding: 14px 14px;
    }

    .project-meta {
        display: none;
    }

    .project-arrow {
        margin-left: auto;
    }

    .modal-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}
