/* ── Gruvbox palette ── */
:root {
    --bg: #1d2021;
    --bg1: #282828;
    --bg2: #32302f;
    --bg3: #3c3836;
    --fg: #ebdbb2;
    --fg-dim: #a89984;
    --yellow: #fabd2f;
    --orange: #fe8019;
    --red: #fb4934;
    --aqua: #8ec07c;
    --blue: #83a598;
    --purple: #d3869b;
    --accent: #fabd2f;
    --blob-color: 250, 189, 47;
    --blob-x: -100;
    --blob-y: -100;
}

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

html {
    scroll-behavior: smooth;
    cursor: default;
}

body {
    background: var(--bg);
    color: var(--fg);
    font-family: "Inconsolata", monospace;
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
}

/* ── Cursor glow blob ── */
.blob {
    position: fixed;
    transform: translate3d(calc(var(--blob-x) * 1px), calc(var(--blob-y) * 1px), 0);
    width: 15vmin;
    height: 15vmin;
    border-radius: 50%;
    filter: blur(4vmin);
    background: radial-gradient(
        ellipse at center,
        rgba(var(--blob-color), 0.35) 0%,
        rgba(var(--blob-color), 0.25) 100%
    );
    mix-blend-mode: difference;
    pointer-events: none;
    z-index: 0;
}

/* ── Noise texture overlay ── */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: transparent url("../images/noise.png") 0 0;
    background-size: 320px 320px;
    mix-blend-mode: luminosity;
    pointer-events: none;
    z-index: 0;
}

/* ── Nav ── */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 4rem;
    background: rgba(29, 32, 33, 0.85);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--bg3);
}

.nav-brand {
    font-family: "JetBrains Mono", monospace;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: 0.05em;
}

.nav-brand span {
    color: var(--fg-dim);
    font-weight: 300;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

nav a {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.78rem;
    color: var(--fg-dim);
    text-decoration: none;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--accent);
}

/* ── Sections ── */
section {
    position: relative;
    z-index: 1;
    max-width: 860px;
    margin: 0 auto;
    padding: 7rem 2rem 4rem;
}

/* ── Hero ── */
#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 5rem;
}

.hero-prompt {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.8rem;
    color: var(--aqua);
    margin-bottom: 1.2rem;
    opacity: 0;
    animation: fadeUp 0.6s ease forwards 0.2s;
}

.hero-prompt::before {
    content: "$ ";
    color: var(--fg-dim);
}

h1 {
    font-family: "JetBrains Mono", monospace;
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--fg);
    opacity: 0;
    animation: fadeUp 0.6s ease forwards 0.4s;
    white-space: nowrap;
}

h1 em {
    font-style: normal;
    color: var(--accent);
}

.hero-sub {
    margin-top: 1.5rem;
    font-size: 1.05rem;
    color: var(--fg-dim);
    max-width: 700px;
    opacity: 0;
    animation: fadeUp 0.6s ease forwards 0.6s;
}

.hero-highlight {
    color: var(--fg);
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 2rem;
    opacity: 0;
    animation: fadeUp 0.6s ease forwards 0.8s;
}

.tag {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.72rem;
    padding: 0.3rem 0.75rem;
    border: 1px solid var(--bg3);
    border-radius: 2px;
    color: var(--fg-dim);
    letter-spacing: 0.06em;
    background: var(--bg1);
    transition:
        border-color 0.2s,
        color 0.2s;
}

.tag:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-top: 2.5rem;
    opacity: 0;
    animation: fadeUp 0.6s ease forwards 1s;
}

.scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--fg-dim);
    opacity: 0;
    animation: fadeUp 0.6s ease forwards 1.4s, bounce 2s ease-in-out infinite 1.4s;
    transition: color 0.3s;
}

.scroll-hint:hover {
    color: var(--accent);
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%      { transform: translateX(-50%) translateY(6px); }
}

.btn {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 0.65rem 1.5rem;
    border: 1px solid var(--accent);
    color: var(--accent);
    background: transparent;
    border-radius: 2px;
    transition:
        background 0.2s,
        color 0.2s;
    cursor: pointer;
}

.btn:hover {
    background: var(--accent);
    color: var(--bg);
}

.btn-ghost {
    border-color: var(--aqua);
    color: var(--aqua);
}

.btn-ghost:hover {
    background: var(--bg3);
    color: var(--fg);
}

/* ── Section titles ── */
.section-label {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.72rem;
    color: var(--accent);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.section-label::before {
    content: "// ";
    color: var(--fg-dim);
}

.subsection-label {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.65rem;
    color: var(--fg-dim);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 1.5rem 0 0.5rem;
    font-weight: 400;
}

.subsection-label::before {
    content: "— ";
    color: var(--accent);
}

h2 {
    font-family: "JetBrains Mono", monospace;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--fg);
    margin-bottom: 2rem;
}

.divider {
    width: 48px;
    height: 2px;
    background: var(--accent);
    margin-bottom: 2.5rem;
}

/* ── About ── */
#about p {
    color: var(--fg-dim);
    font-size: 1.02rem;
    max-width: 620px;
    margin-bottom: 1rem;
}

#about p strong {
    color: var(--fg);
    font-weight: 600;
}

/* ── Skills ── */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.tech-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    background: var(--bg1);
    border: 1px solid var(--bg3);
    border-radius: 6px;
    padding: 0.9rem 1rem;
    transition: border-color 0.2s, background 0.2s;
}

.tech-card:hover {
    background: var(--bg2);
    border-color: var(--fg-dim);
}

.tech-icon {
    width: 46px;
    height: 46px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.5rem;
}

.tech-icon i {
    font-size: 1.5rem;
    color: var(--fg);
}

.tech-icon-text {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.85rem;
    font-weight: 700;
}

.tech-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.tech-name {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--fg);
}

.tech-desc {
    font-size: 0.75rem;
    color: var(--fg-dim);
}

/* ── Shared card grid ── */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.75rem;
}

.card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    background: var(--bg1);
    border: 1px solid var(--bg3);
    border-radius: 6px;
    padding: 0.9rem 1rem;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}

.card:hover {
    background: var(--bg2);
    border-color: var(--fg-dim);
}

.card-icon {
    width: 46px;
    height: 46px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.card-name {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--fg);
}

.card-desc {
    font-size: 0.75rem;
    color: var(--fg-dim);
}

/* ── Footer ── */
footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2.5rem;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.72rem;
    color: var(--bg3);
    border-top: 1px solid var(--bg2);
}

/* ── Scroll fade-in ── */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition:
        opacity 0.5s ease,
        transform 0.5s ease;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

/* ── Keyframes ── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* ── Cursor blink ── */
.cursor {
    display: inline-block;
    width: 8px;
    height: 0.8em;
    background: var(--accent);
    vertical-align: middle;
    margin-left: 3px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* ── Mobile ── */
@media (max-width: 900px) {
    .tech-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    nav {
        padding: 1rem 1.5rem;
    }
    nav ul {
        gap: 1.4rem;
    }
    section {
        padding: 5.5rem 1.4rem 3rem;
    }
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .card-grid {
        grid-template-columns: 1fr;
    }
}
