/* ── Reset ───────────────────────────────────── */

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

body {
    margin: 0;
    padding: 3rem;
    background: #0e100f;
    min-height: 100vh;
    font-family: sans-serif;
    }

body:not(.landing) {
    display: flex;
    align-items: center;
    justify-content: center;
    }

/* ── Gallery layout ──────────────────────────── */

.gallery {
    max-width: 1100px;
    width: 100%;
    }

.gallery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    }

.gallery-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fffce1;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    }

.brace {
    color: #fffce1;
    font-size: 24px;
    line-height: 1;
    opacity: 0.5;
    }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
    list-style: none;
    padding: 0;
    margin: 0;
    }

.gallery-card {
    background: #191919;
    border-radius: 16px;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    aspect-ratio: 1;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
    overflow: hidden;
    }

.gallery-card:hover {
    background: #242424;
    }

.card-label {
    color: #fffce1;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    }

.card-desc {
    color: #7c7c6f;
    font-size: 11px;
    text-align: center;
    margin-top: -0.25rem;
    }

/* ── Box colors ──────────────────────────────── */

.box {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    will-change: transform;
    background-blend-mode: color-dodge;
    }

.box.green {
    background: linear-gradient(114.41deg, #0ae448 20.74%, #abff84 65.5%), url("https://assets.codepen.io/16327/noise-e82662fe.png");
    }

.box.orange {
    background: linear-gradient(111.45deg, #ff8709 19.42%, #f7bdf8 73.08%), url("https://assets.codepen.io/16327/noise.png");
    }

.box.purple {
    background: linear-gradient(153.58deg, #f7bdf8 32.25%, #2f3cc0 92.68%), url("https://assets.codepen.io/16327/noise.png");
    }

.box.pink {
    background: linear-gradient(317.42deg, #ffe9fe 10.4%, #ff96f9 83.03%), url("https://assets.codepen.io/16327/noise.png");
    }

/* ── Dots & groups ────────────────────────────── */

.stagger-group {
    display: flex;
    gap: 10px;
    }

.dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    will-change: transform;
    background-blend-mode: color-dodge;
    }

.dot.purple {
    background: linear-gradient(153.58deg, #f7bdf8 32.25%, #2f3cc0 92.68%), url("https://assets.codepen.io/16327/noise.png");
    }

.easing-group {
    display: flex;
    gap: 8px;
    }

.easing-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    will-change: transform;
    }

/* ── Badges ──────────────────────────────────── */

.counter-badge {
    background: #0e100f;
    color: #abff84;
    font-size: 22px;
    font-weight: 700;
    padding: 0.25rem 0.8rem;
    border-radius: 8px;
    font-family: "Courier New", monospace;
    min-width: 60px;
    text-align: center;
    }

.rand-num {
    background: #0e100f;
    color: #00bae2;
    font-size: 22px;
    font-weight: 700;
    padding: 0.25rem 0.8rem;
    border-radius: 8px;
    font-family: "Courier New", monospace;
    min-width: 60px;
    text-align: center;
    }

/* ── Draggable ───────────────────────────────── */

.drag-me {
    cursor: grab;
    touch-action: none;
    }

.drag-me:active {
    cursor: grabbing;
    }

/* ── Modal / Popup ───────────────────────────── */

.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    z-index: 100;
    }

.overlay.open {
    display: flex;
    }

.modal {
    background: #191919;
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 520px;
    width: 90%;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
    }

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #7c7c6f;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    }

.modal-close:hover {
    color: #fffce1;
    background: #242424;
    }

.modal-title {
    color: #fffce1;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 0.25rem;
    }

.modal-desc {
    color: #7c7c6f;
    font-size: 13px;
    margin: 0 0 1.5rem;
    }

.modal code {
    display: block;
    background: #242424;
    color: #0ae448;
    padding: 1.25rem;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.7;
    white-space: pre;
    overflow-x: auto;
    font-family: "Courier New", monospace;
    border: 1px solid #2a2a2a;
    }

/* ── Landing page ────────────────────────────── */

body.landing {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 0;
    position: relative;
    overflow-x: hidden;
    }

.bg-floats {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    }

.bg-floats span {
    position: absolute;
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    opacity: 0.4;
    user-select: none;
    will-change: transform;
    }

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 3rem;
    position: relative;
    z-index: 1;
    }

.nav-logo {
    color: #fffce1;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    }

.nav-links {
    display: flex;
    gap: 2rem;
    }

.nav-link {
    color: #7c7c6f;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.2s;
    }

.nav-link:hover {
    color: #fffce1;
    }

.hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
    min-height: 70vh;
    }

.hero-greeting {
    color: #7c7c6f;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin: 0;
    }

.hero-name {
    color: #fffce1;
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 700;
    margin: 0.5rem 0;
    letter-spacing: -1px;
    }

.hero-tagline {
    color: #7c7c6f;
    font-size: 16px;
    margin: 0 0 2.5rem;
    }

.hero-cta {
    display: inline-block;
    color: #0e100f;
    background: #0ae448;
    padding: 12px 28px;
    border-radius: 99px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: transform 0.2s;
    }

.hero-cta:hover {
    transform: scale(1.05);
    }

/* ── Projects ─────────────────────────────────── */

.projects {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 3rem 4rem;
    }

.projects-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    }

.projects-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fffce1;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
    }

.projects-count {
    color: #0ae448;
    font-size: 12px;
    font-family: "Courier New", monospace;
    border: 1px solid #2a2a2a;
    border-radius: 99px;
    padding: 0.15rem 0.7rem;
    }

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
    }

.project-card {
    --accent: #0ae448;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: #141514;
    border: 1px solid #232323;
    border-radius: 18px;
    padding: 1.75rem;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.25s ease, border-color 0.25s ease;
    }

.project-card[data-accent="pink"]   { --accent: #ff96f9; }
.project-card[data-accent="purple"] { --accent: #9d95ff; }
.project-card[data-accent="orange"] { --accent: #ff8709; }

.project-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, var(--accent), transparent 55%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
    }

.project-card:hover {
    transform: translateY(-4px);
    border-color: #2f2f2f;
    }

.project-card:hover::before {
    opacity: 1;
    }

.project-glow {
    position: absolute;
    top: -60px;
    right: -60px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: var(--accent);
    filter: blur(70px);
    opacity: 0.08;
    transition: opacity 0.3s ease;
    pointer-events: none;
    }

.project-card:hover .project-glow {
    opacity: 0.18;
    }

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

.project-tag {
    color: #7c7c6f;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    }

.project-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    }

.project-name {
    color: #fffce1;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    }

.project-desc {
    color: #9a9a8c;
    font-size: 13px;
    line-height: 1.6;
    flex: 1;
    }

.project-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    }

.project-stack em {
    font-style: normal;
    color: #cfcfc0;
    font-size: 11px;
    font-family: "Courier New", monospace;
    background: #0e100f;
    border: 1px solid #262626;
    border-radius: 6px;
    padding: 0.2rem 0.55rem;
    }

.project-cta {
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.25rem;
    opacity: 0.75;
    transition: opacity 0.25s ease, transform 0.25s ease;
    }

.project-card:hover .project-cta {
    opacity: 1;
    transform: translateX(3px);
    }

/* ── Showcase / tech-stack page ──────────────── */

.showcase-intro {
    color: #7c7c6f;
    font-size: 15px;
    line-height: 1.7;
    max-width: 640px;
    margin: 0 0 2.5rem;
    }

.showcase-intro a {
    color: #0ae448;
    text-decoration: none;
    font-weight: 600;
    }

.showcase-intro a:hover {
    text-decoration: underline;
    }

.stack-card {
    aspect-ratio: auto;
    min-height: 120px;
    justify-content: center;
    }

.showcase-notes {
    margin-top: 3rem;
    max-width: 720px;
    }

.showcase-h2 {
    color: #fffce1;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 2.5rem 0 1rem;
    }

.showcase-list {
    list-style: none;
    padding: 0;
    margin: 0;
    }

.showcase-list li {
    color: #9a9a8c;
    font-size: 14px;
    line-height: 1.7;
    padding: 0.6rem 0 0.6rem 1.25rem;
    position: relative;
    border-bottom: 1px solid #1c1c1c;
    }

.showcase-list li::before {
    content: "\2192";
    position: absolute;
    left: 0;
    color: #0ae448;
    }

.showcase-list strong {
    color: #fffce1;
    }

.showcase-list code {
    background: #242424;
    color: #abff84;
    padding: 0.1rem 0.4rem;
    border-radius: 5px;
    font-size: 12px;
    font-family: "Courier New", monospace;
    }

.showcase-list.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    }

.showcase-list.tags li {
    border: 1px solid #2a2a2a;
    border-radius: 99px;
    padding: 0.4rem 1rem;
    font-size: 12px;
    color: #fffce1;
    }

.showcase-list.tags li::before {
    content: none;
    }

/* ── Notes page back link ────────────────────── */

.back-link {
    color: #7c7c6f;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.2s;
    }

.back-link:hover {
    color: #fffce1;
    }

/* ── Footer ───────────────────────────────────── */
.footer {
    padding: 1.5rem 3rem;
    text-align: center;
    color: #fffce1;
    font-size: 10px;
    position: relative;
    z-index: 1;
    background: #0e100f;
    }
