/* ===== shadcn-inspired design tokens ===== */
:root,
[data-theme="light"] {
    --background: 0 0% 96%;
    --foreground: 240 10% 3.9%;
    --card: 0 0% 100%;
    --card-foreground: 240 10% 3.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 240 10% 3.9%;
    --primary: 240 5.9% 10%;
    --primary-foreground: 0 0% 98%;
    --secondary: 240 4.8% 95.9%;
    --secondary-foreground: 240 5.9% 10%;
    --muted: 240 4.8% 95.9%;
    --muted-foreground: 240 3.8% 46.1%;
    --accent: 240 4.8% 95.9%;
    --accent-foreground: 240 5.9% 10%;
    --destructive: 0 84.2% 60.2%;
    --border: 240 5.9% 90%;
    --input: 240 5.9% 90%;
    --ring: 240 5.9% 10%;
    --radius: 0.5rem;
    --radius-sm: 0.375rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
    --title-hero-accent: 220 55% 38%;
}

[data-theme="dark"] {
    --background: 240 10% 3.9%;
    --foreground: 0 0% 98%;
    --card: 240 10% 3.9%;
    --card-foreground: 0 0% 98%;
    --popover: 240 10% 3.9%;
    --popover-foreground: 0 0% 98%;
    --primary: 0 0% 98%;
    --primary-foreground: 240 5.9% 10%;
    --secondary: 240 3.7% 15.9%;
    --secondary-foreground: 0 0% 98%;
    --muted: 240 3.7% 15.9%;
    --muted-foreground: 240 5% 64.9%;
    --accent: 240 3.7% 15.9%;
    --accent-foreground: 0 0% 98%;
    --border: 240 3.7% 15.9%;
    --input: 240 3.7% 15.9%;
    --ring: 240 4.9% 83.9%;
    --title-hero-accent: 210 60% 72%;
}

/* ===== base ===== */
html {
    height: 100%;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    scroll-behavior: smooth;
    scroll-padding-top: 1rem;
}

body {
    font-family: var(--font-sans);
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    max-width: 672px;
    margin: 0 auto;
    padding: 0 1.5rem 2rem;
    padding-top: max(0px, env(safe-area-inset-top));
    padding-bottom: max(2rem, env(safe-area-inset-bottom));
    padding-left: max(1.5rem, env(safe-area-inset-left));
    padding-right: max(1.5rem, env(safe-area-inset-right));
    line-height: 1.6;
    min-height: 100%;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

[data-theme="light"] body {
    background: hsl(var(--background));
}

[data-theme="dark"] body {
    background: #000;
}

main {
    flex: 1;
}

img {
    user-select: none;
}

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

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -3rem;
    left: 0.75rem;
    padding: 0.5rem 1rem;
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius);
    z-index: 100;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 0.75rem;
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}

/* ===== container ===== */
.container {
    width: 100%;
    max-width: 672px;
    margin: 0 auto;
}

/* ===== header & nav (shadcn card-style) ===== */
header {
    padding: 1rem 0;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: center;
    position: sticky;
    top: 0;
    z-index: 50;
}

.navbar {
    display: inline-flex;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    align-items: center;
    margin: 0;
    position: relative;
    box-shadow: 0 1px 2px 0 hsl(0 0% 0% / 0.05);
    transition: box-shadow 0.2s;
}

header.scrolled .navbar {
    box-shadow: 0 4px 16px -4px hsl(0 0% 0% / 0.12);
}

.navbar-toggle {
    display: none;
    background: transparent;
    border: none;
    color: hsl(var(--foreground));
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.navbar-toggle:hover {
    background: hsl(var(--accent));
}

.navbar-toggle:focus-visible {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}

.navbar-links {
    display: inline-flex;
    gap: 0.25rem;
    align-items: center;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
}

.tooltip-container {
    position: relative;
    display: inline-block;
    line-height: 0;
}

.tooltip-text {
    visibility: hidden;
    background: hsl(var(--popover));
    color: hsl(var(--popover-foreground));
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    position: absolute;
    bottom: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
    border: 1px solid hsl(var(--border));
    box-shadow: 0 4px 6px -1px hsl(0 0% 0% / 0.1), 0 2px 4px -2px hsl(0 0% 0% / 0.1);
}

.tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.tooltip-container a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius-sm);
    color: hsl(var(--foreground));
    transition: background 0.15s, color 0.15s;
}

.tooltip-container a:hover {
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

/* theme toggle button */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: hsl(var(--foreground));
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.theme-toggle:hover {
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

.theme-toggle:focus-visible {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}

.theme-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

[data-theme="light"] .theme-icon.moon {
    display: none;
}

[data-theme="dark"] .theme-icon.sun {
    display: none;
}


/* ===== typography ===== */
h1, h2, h3, h4, h5, h6, p {
    margin: 0;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    margin: 2rem 0 1rem;
    color: hsl(var(--foreground));
}

.hero-tagline {
    text-align: center;
    font-size: 0.9375rem;
    color: hsl(var(--muted-foreground));
    margin: 1rem 0 0;
    font-weight: 500;
}

.hero-stats {
    text-align: center;
    font-size: 0.8125rem;
    color: hsl(var(--muted-foreground) / 0.9);
    margin: 0.5rem 0 0;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* Hero cards: globe + connect (horizontal) */
.hero-cards {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1.5rem 0 2rem;
}

/* Globe */
.globe-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    padding: 1rem 1.25rem;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius-lg);
    cursor: default;
}

.globe-icon {
    width: 36px;
    height: 36px;
    color: hsl(var(--muted-foreground));
    transition: color 0.2s, filter 0.2s;
}

.globe-container:hover .globe-icon {
    color: hsl(var(--foreground));
    filter: blur(3px);
}

.globe-container::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: hsl(0 0% 100%);
    background: hsl(0 0% 9%);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

[data-theme="dark"] .globe-container::after {
    background: hsl(0 0% 98%);
    color: hsl(0 0% 9%);
}

.globe-container:hover::after {
    opacity: 1;
}

/* Connect section */
.connect-section {
    flex: 1;
    min-width: 220px;
    max-width: 360px;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
}

.connect-section.reveal {
    transition-delay: 0.12s;
}

.connect-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: hsl(var(--muted-foreground));
    margin: 0 0 0.75rem;
}

.connect-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.connect-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    background: hsl(var(--secondary));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    transition: all 0.15s;
}

.connect-link:hover {
    background: hsl(var(--accent));
    border-color: hsl(var(--ring) / 0.3);
}

.connect-link:focus-visible {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}

.connect-link svg {
    flex-shrink: 0;
}

.cta-section {
    text-align: center;
    margin: 2rem auto;
    padding: 1rem 1.25rem;
    max-width: 380px;
    background: hsl(var(--muted) / 0.6);
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius-lg);
    animation: sectionRevealIn 2.5s ease-out forwards;
    opacity: 0;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: hsl(142 76% 28%);
    margin-bottom: 0.75rem;
}

[data-theme="dark"] .status-pill {
    color: hsl(142 70% 42%);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: status-pulse 2s ease-in-out infinite;
}

@keyframes status-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.cta-text {
    font-size: 0.9375rem;
    color: hsl(var(--foreground));
    margin: 0 0 0.75rem;
    font-weight: 500;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border-radius: var(--radius);
    transition: opacity 0.15s, transform 0.15s;
}

.cta-button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.cta-button:focus-visible {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .cta-section {
        animation: none;
        opacity: 1;
    }
}

/* Scroll-in reveal (respects prefers-reduced-motion in JS) */
.reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.project-container.reveal .card,
.grid-container.reveal .grid-item {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.project-container.reveal.revealed .card,
.grid-container.reveal.revealed .grid-item {
    opacity: 1;
    transform: translateY(0);
}

.project-container.reveal.revealed .card { transition-delay: calc(0.08s * var(--i, 0)); }
.project-container .card { --i: 0; }
.project-container .card:nth-child(1) { --i: 1; }
.project-container .card:nth-child(2) { --i: 2; }
.project-container .card:nth-child(3) { --i: 3; }
.project-container .card:nth-child(4) { --i: 4; }

.grid-container.reveal.revealed .grid-item { transition-delay: calc(0.03s * var(--j, 0)); }
.grid-container .grid-item { --j: 0; }
.grid-container .grid-item:nth-child(1) { --j: 1; }
.grid-container .grid-item:nth-child(2) { --j: 2; }
.grid-container .grid-item:nth-child(3) { --j: 3; }
.grid-container .grid-item:nth-child(4) { --j: 4; }
.grid-container .grid-item:nth-child(5) { --j: 5; }
.grid-container .grid-item:nth-child(6) { --j: 6; }
.grid-container .grid-item:nth-child(7) { --j: 7; }
.grid-container .grid-item:nth-child(8) { --j: 8; }
.grid-container .grid-item:nth-child(9) { --j: 9; }
.grid-container .grid-item:nth-child(10) { --j: 10; }
.grid-container .grid-item:nth-child(11) { --j: 11; }
.grid-container .grid-item:nth-child(12) { --j: 12; }
.grid-container .grid-item:nth-child(13) { --j: 13; }
.grid-container .grid-item:nth-child(14) { --j: 14; }
.grid-container .grid-item:nth-child(15) { --j: 15; }
.grid-container .grid-item:nth-child(16) { --j: 16; }
.grid-container .grid-item:nth-child(17) { --j: 17; }
.grid-container .grid-item:nth-child(18) { --j: 18; }
.grid-container .grid-item:nth-child(n+19) { --j: 19; }

.section-title {
    margin-top: 2.5rem;
}

.section-desc {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    margin: -0.25rem 0 1rem;
}

.lead {
    font-size: 1rem;
    color: hsl(var(--muted-foreground));
    margin: 1rem 0 0;
    line-height: 1.7;
}

.lead b {
    font-weight: 600;
    color: hsl(var(--foreground));
}

/* ===== hero / title ===== */
@keyframes heroTitleWordIn {
    from {
        opacity: 0;
        transform: translateY(0.25em);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.title-hero {
    margin: 1rem auto 0;
    text-align: center;
    position: relative;
}

.title-hero-text {
    font-family: "Dela Gothic One", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: clamp(2.5rem, 10vw, 4.5rem);
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin: 0;
}

.title-hero-word-1 {
    color: red;
    animation: heroTitleWordIn 0.6s ease-out forwards;
    opacity: 0;
}

.title-hero-sep {
    color: yellow;
    margin: 0 0.05em;
    animation: heroTitleWordIn 0.5s ease-out 0.15s forwards;
    opacity: 0;
}

.title-hero-word-2 {
    color: hsl(var(--title-hero-accent));
    animation: heroTitleWordIn 0.6s ease-out 0.25s forwards;
    opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
    .title-hero-word-1,
    .title-hero-sep,
    .title-hero-word-2 {
        animation: none;
        opacity: 1;
    }
}

/* ===== hero pills + spotify ===== */
@keyframes heroPillIn {
    from {
        opacity: 0;
        transform: translateY(0.35em) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.hero-pills {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 0.75rem;
    margin-top: 1rem;
}

.hero-pills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.hero-pill {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    border: 1px solid transparent;
    transition: opacity 0.15s;
    animation: heroPillIn 0.45s ease-out forwards;
    opacity: 0;
}

.hero-pill:nth-child(1) { animation-delay: 0.35s; }
.hero-pill:nth-child(2) { animation-delay: 0.45s; }
.hero-pill:nth-child(3) { animation-delay: 0.55s; }

.hero-spotify-pill {
    animation: heroPillIn 0.45s ease-out 0.65s forwards;
    opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
    .hero-pill,
    .hero-spotify-pill {
        animation: none;
        opacity: 1;
    }
}

@keyframes sectionRevealIn {
    from {
        opacity: 0;
        transform: translateY(0.5em);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-pill:hover {
    opacity: 0.9;
}

.hero-pill--gamer {
    background: hsl(270 70% 50% / 0.15);
    color: hsl(270 70% 45%);
    border-color: hsl(270 70% 50% / 0.3);
}

[data-theme="dark"] .hero-pill--gamer {
    background: hsl(270 65% 55% / 0.2);
    color: hsl(270 70% 70%);
    border-color: hsl(270 65% 55% / 0.4);
}

.hero-pill--anime {
    background: hsl(330 70% 55% / 0.15);
    color: hsl(330 75% 45%);
    border-color: hsl(330 70% 55% / 0.3);
}

[data-theme="dark"] .hero-pill--anime {
    background: hsl(330 65% 60% / 0.2);
    color: hsl(330 75% 75%);
    border-color: hsl(330 65% 60% / 0.4);
}

.hero-pill--jordan {
    background: hsl(175 60% 40% / 0.15);
    color: hsl(175 65% 32%);
    border-color: hsl(175 60% 40% / 0.3);
}

[data-theme="dark"] .hero-pill--jordan {
    background: hsl(175 55% 45% / 0.2);
    color: hsl(175 60% 65%);
    border-color: hsl(175 55% 45% / 0.4);
}

.hero-spotify-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 9999px;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    box-shadow: 0 1px 2px 0 hsl(0 0% 0% / 0.05);
}

.hero-spotify-pill:hover {
    background: hsl(var(--accent));
    border-color: hsl(var(--ring) / 0.3);
}

.hero-spotify-pill:focus-visible {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}

.hero-spotify-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: hsl(142 72% 42%);
}

.hero-spotify-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

/* ===== terminal intro ===== */
.terminal {
    margin-top: 1.5rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid hsl(var(--border));
    background: hsl(220 18% 12%);
    box-shadow: 0 4px 6px -1px hsl(0 0% 0% / 0.15), 0 2px 4px -2px hsl(0 0% 0% / 0.1);
    opacity: 0;
    transform: translateY(-100px) scale(0.96);
    animation: terminal-snap-in 2.65s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
}

@keyframes terminal-snap-in {
    0% {
        opacity: 0;
        transform: translateY(-100px) scale(0.96);
    }
    70% {
        opacity: 1;
        transform: translateY(6px) scale(1);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.terminal-titlebar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem 0.5rem 1rem;
    background: hsl(220 14% 18%);
    border-bottom: 1px solid hsl(220 14% 14%);
}

.terminal-dots {
    display: flex;
    gap: 0.375rem;
}

.terminal-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
}

.terminal-dot.close { background: hsl(0 72% 51%); }
.terminal-dot.min { background: hsl(45 93% 47%); }
.terminal-dot.max { background: hsl(142 71% 45%); }

.terminal-title {
    font-size: 0.75rem;
    color: hsl(220 9% 58%);
    font-family: var(--font-sans);
}

.terminal-body {
    padding: 1rem 1.25rem 1.25rem;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', 'Consolas', monospace;
    font-size: 0.8125rem;
    line-height: 1.7;
    min-height: 12rem;
    color: hsl(220 9% 88%);
}

.terminal-line {
    opacity: 0;
    animation: terminal-line-in 0.35s ease forwards;
    animation-delay: calc(0.7s + var(--i, 0) * 0.25s);
    overflow: hidden;
}

.terminal-line .prompt {
    color: hsl(142 71% 45%);
    margin-right: 0.5rem;
    user-select: none;
}

.terminal-output {
    color: hsl(110, 79%, 49%);
    padding-left: 1.25rem;
    border-left: 2px solid hsl(220 14% 22%);
    margin-left: 0.25rem;
    margin-top: 0.15rem;
    margin-bottom: 0.15rem;
}

.terminal-line .cursor {
    display: inline-block;
    width: 0.6em;
    height: 1.1em;
    margin-left: 0.15em;
    background: hsl(220 9% 75%);
    vertical-align: text-bottom;
    animation: terminal-blink 1s step-end infinite;
    animation-delay: calc(0.7s + var(--i, 0) * 0.25s + 0.5s);
}

@keyframes terminal-line-in {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* ===== cards (projects) – shadcn card ===== */
.project-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    color: hsl(var(--card-foreground));
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -6px hsl(0 0% 0% / 0.1), 0 4px 10px -4px hsl(0 0% 0% / 0.06);
    border-color: hsl(var(--ring) / 0.3);
}

[data-theme="dark"] .card:hover {
    box-shadow: 0 8px 24px -6px hsl(0 0% 0% / 0.4);
}

.card h2 {
    margin-top: 0;
    font-size: 1.125rem;
}

.card p {
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.project-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: hsl(var(--foreground));
}

.project-framework {
    font-size: 0.8125rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 0.75rem;
    line-height: 1.45;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 1rem;
}

.tag {
    font-size: 0.6875rem;
    font-weight: 500;
    padding: 0.2rem 0.5rem;
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.project-post {
    text-decoration: none;
    color: inherit;
}

.image-placeholder {
    width: 100%;
    height: 140px;
    background: hsl(var(--muted));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    margin-bottom: 1rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.card:hover .image-placeholder img {
    transform: scale(1.03);
}

/* shadcn secondary button */
.btn-github {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    background: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    transition: background 0.15s, color 0.15s;
}

.btn-github:hover {
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

/* ===== stack grid ===== */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.grid-item {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    padding: 1.25rem 1rem;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.grid-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px -4px hsl(0 0% 0% / 0.08);
    border-color: hsl(var(--ring) / 0.2);
}

[data-theme="dark"] .grid-item:hover {
    box-shadow: 0 6px 20px -4px hsl(0 0% 0% / 0.35);
}

.grid-item p {
    font-size: 0.8125rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    margin-top: 0.5rem;
}

.grid-item svg {
    width: 48px;
    height: 48px;
    margin: 0 auto;
    display: block;
}

/* ===== experience timeline ===== */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 0.5rem;
    position: relative;
}

/* Vertical connecting line */
.experience-list::before {
    content: '';
    position: absolute;
    left: 0.6rem;
    top: 0.75rem;
    bottom: 0.75rem;
    width: 1px;
    background: hsl(var(--border));
}

.experience-item {
    position: relative;
    padding: 1.125rem 1.25rem 1.125rem 2.25rem;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius-lg);
    margin-bottom: 0.75rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    opacity: 0;
    transform: scale(0.95) translateY(10px);
    animation: experienceItemIn 0.45s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
}

.experience-item:nth-child(1) { animation-delay: 0.1s; }
.experience-item:nth-child(2) { animation-delay: 0.22s; }
.experience-item:nth-child(3) { animation-delay: 0.34s; }

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

.experience-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -6px hsl(0 0% 0% / 0.1), 0 4px 10px -4px hsl(0 0% 0% / 0.06);
    border-color: hsl(var(--ring) / 0.3);
}

[data-theme="dark"] .experience-item:hover {
    box-shadow: 0 8px 24px -6px hsl(0 0% 0% / 0.4);
}

/* Timeline dot */
.experience-item::before {
    display: none;
    content: '';
    position: absolute;
    left: -1.67rem;
    top: 1.35rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: hsl(var(--foreground));
    border: 2px solid hsl(var(--background));
    box-shadow: 0 0 0 1px hsl(var(--border));
}

.experience-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.experience-meta {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.experience-role {
    font-size: 0.9375rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    line-height: 1.3;
}

.experience-company {
    font-size: 0.8125rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
}

.experience-period {
    font-size: 0.75rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    white-space: nowrap;
    padding: 0.2rem 0.55rem;
    background: hsl(var(--muted));
    border-radius: var(--radius-sm);
    align-self: flex-start;
    flex-shrink: 0;
}

.experience-desc {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.65;
    margin-bottom: 0.75rem;
}

.experience-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .experience-item {
        transition: none;
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* ===== footer ===== */
.section-divider {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2.5rem 0 0;
    min-height: 20px;
}

.section-divider::before {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: hsl(var(--border));
    --divider-dot: hsl(var(--border));
    box-shadow:
        /* top row (y = -6px) */
        -96px -6px 0 var(--divider-dot),
        -88px -6px 0 var(--divider-dot),
        -80px -6px 0 var(--divider-dot),
        -72px -6px 0 var(--divider-dot),
        -64px -6px 0 var(--divider-dot),
        -56px -6px 0 var(--divider-dot),
        -48px -6px 0 var(--divider-dot),
        -40px -6px 0 var(--divider-dot),
        -32px -6px 0 var(--divider-dot),
        -24px -6px 0 var(--divider-dot),
        -16px -6px 0 var(--divider-dot),
        -8px -6px 0 var(--divider-dot),
        8px -6px 0 var(--divider-dot),
        16px -6px 0 var(--divider-dot),
        24px -6px 0 var(--divider-dot),
        32px -6px 0 var(--divider-dot),
        40px -6px 0 var(--divider-dot),
        48px -6px 0 var(--divider-dot),
        56px -6px 0 var(--divider-dot),
        64px -6px 0 var(--divider-dot),
        72px -6px 0 var(--divider-dot),
        80px -6px 0 var(--divider-dot),
        88px -6px 0 var(--divider-dot),
        96px -6px 0 var(--divider-dot),
        /* middle row (y = 0) */
        -96px 0 0 var(--divider-dot),
        -88px 0 0 var(--divider-dot),
        -80px 0 0 var(--divider-dot),
        -72px 0 0 var(--divider-dot),
        -64px 0 0 var(--divider-dot),
        -56px 0 0 var(--divider-dot),
        -48px 0 0 var(--divider-dot),
        -40px 0 0 var(--divider-dot),
        -32px 0 0 var(--divider-dot),
        -24px 0 0 var(--divider-dot),
        -16px 0 0 var(--divider-dot),
        -8px 0 0 var(--divider-dot),
        8px 0 0 var(--divider-dot),
        16px 0 0 var(--divider-dot),
        24px 0 0 var(--divider-dot),
        32px 0 0 var(--divider-dot),
        40px 0 0 var(--divider-dot),
        48px 0 0 var(--divider-dot),
        56px 0 0 var(--divider-dot),
        64px 0 0 var(--divider-dot),
        72px 0 0 var(--divider-dot),
        80px 0 0 var(--divider-dot),
        88px 0 0 var(--divider-dot),
        96px 0 0 var(--divider-dot),
        /* bottom row (y = 6px) */
        -96px 6px 0 var(--divider-dot),
        -88px 6px 0 var(--divider-dot),
        -80px 6px 0 var(--divider-dot),
        -72px 6px 0 var(--divider-dot),
        -64px 6px 0 var(--divider-dot),
        -56px 6px 0 var(--divider-dot),
        -48px 6px 0 var(--divider-dot),
        -40px 6px 0 var(--divider-dot),
        -32px 6px 0 var(--divider-dot),
        -24px 6px 0 var(--divider-dot),
        -16px 6px 0 var(--divider-dot),
        -8px 6px 0 var(--divider-dot),
        8px 6px 0 var(--divider-dot),
        16px 6px 0 var(--divider-dot),
        24px 6px 0 var(--divider-dot),
        32px 6px 0 var(--divider-dot),
        40px 6px 0 var(--divider-dot),
        48px 6px 0 var(--divider-dot),
        56px 6px 0 var(--divider-dot),
        64px 6px 0 var(--divider-dot),
        72px 6px 0 var(--divider-dot),
        80px 6px 0 var(--divider-dot),
        88px 6px 0 var(--divider-dot),
        96px 6px 0 var(--divider-dot);
    animation: section-divider-fade 2.5s ease-in-out infinite;
}

@keyframes section-divider-fade {
    0%, 100% { opacity: 0.35; }
    50% { opacity: 1; }
}

.site-footer {
    font-size: 0.875rem;
    padding: 1.5rem 0;
    color: hsl(var(--muted-foreground));
    scroll-margin-top: 2rem;
}

.footer-content {
    max-width: 672px;
    margin: 0 auto;
    text-align: center;
}

.footer-content > p {
    margin: 0;
}

.footer-cta {
    font-weight: 500;
    color: hsl(var(--foreground));
    margin-bottom: 0.75rem !important;
}


.footer-copy {
    font-size: 0.8125rem;
    margin-bottom: 0.25rem !important;
}

.footer-built {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground) / 0.9);
    margin-bottom: 0.75rem !important;
}

.back-to-top {
    font-size: 0.8125rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    transition: color 0.15s;
}

.back-to-top:hover {
    color: hsl(var(--foreground));
}

.back-to-top:focus-visible {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}

/* ===== reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
    .card,
    .grid-item,
    .image-placeholder img {
        transition: none;
    }
    .card:hover,
    .grid-item:hover {
        transform: none;
    }
    .card:hover .image-placeholder img {
        transform: none;
    }
    .terminal {
        animation: none;
        opacity: 1;
        transform: none;
    }
    .terminal-line {
        animation: none;
        opacity: 1;
        transform: none;
    }
    .terminal-line .cursor {
        animation: none;
    }
    .status-dot {
        animation: none;
    }
    .section-divider::before {
        animation: none;
        opacity: 1;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
    .project-container.reveal .card,
    .grid-container.reveal .grid-item {
        opacity: 1;
        transform: none;
    }
}

/* ===== utilities ===== */
.back-link {
    font-size: 0.875rem;
    display: block;
    margin-bottom: 1.5rem;
    text-align: center;
}

.back-link a {
    color: hsl(var(--muted-foreground));
}

#giphy {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 70%;
    height: auto;
    border-radius: var(--radius);
}

/* ===== certifications ===== */
.cert-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cert-item {
    padding: 1rem 1.25rem;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius-lg);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.cert-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -6px hsl(0 0% 0% / 0.1), 0 4px 10px -4px hsl(0 0% 0% / 0.06);
    border-color: hsl(var(--ring) / 0.3);
}

[data-theme="dark"] .cert-item:hover {
    box-shadow: 0 8px 24px -6px hsl(0 0% 0% / 0.4);
}

.cert-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cert-meta {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.cert-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    line-height: 1.3;
}

.cert-issuer {
    font-size: 0.8125rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
}

.cert-right {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex-shrink: 0;
}

.cert-date {
    font-size: 0.75rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    white-space: nowrap;
    padding: 0.2rem 0.55rem;
    background: hsl(var(--muted));
    border-radius: var(--radius-sm);
}

.cert-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: hsl(var(--primary-foreground));
    background: hsl(var(--primary));
    border-radius: var(--radius-sm);
    transition: opacity 0.15s, transform 0.15s;
    white-space: nowrap;
}

.cert-view-btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.cert-view-btn:focus-visible {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}
