/* ==========================================================================
   kxvi - Discord Developer portfolio
   ========================================================================== */

:root {
    --bg: #0a0a0a;
    --bg-soft: #121212;
    --card: #151515;
    --card-border: #2a1414;
    --border: #262626;
    --text: #f5f5f5;
    --text-muted: #9ca3af;
    --red: #ff2020;
    --red-dark: #d10000;
    --green: #22c55e;
    --radius: 10px;
    --max-width: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
}

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

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.muted { color: var(--text-muted); }

/* ---- Header / Nav ---- */
.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--red);
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 28px;
    margin: 0;
    padding: 0;
}

.main-nav a {
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: color .15s;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--red);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text);
    display: block;
}

/* ---- Hero / Sections ---- */
.hero,
.section {
    padding: 72px 0;
    position: relative;
}

.hero {
    padding-top: 88px;
    padding-bottom: 88px;
}

.hero::before {
    content: "";
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 640px;
    height: 320px;
    background: radial-gradient(ellipse at center, rgba(255, 32, 32, .16), transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.hero h1 {
    font-size: 2.6rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

/* ---- Homepage hero with photo ---- */
.hero--home {
    min-height: 88vh;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    padding-top: 56px;
    padding-bottom: 56px;
}

.hero--home::before { display: none; }

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10,10,10,.55) 0%, rgba(10,10,10,.75) 55%, var(--bg) 100%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
}

.profile-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
}

.profile-img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--red);
    box-shadow: 0 0 0 6px rgba(255, 32, 32, .12), 0 0 60px rgba(255, 32, 32, .35);
    animation: pulseGlow 3.5s ease-in-out infinite;
}

.hero-brand {
    font-size: 4.5rem;
    letter-spacing: -0.03em;
    background: linear-gradient(90deg, #fff, var(--red));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 6px;
}

.hero-tagline {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.stats-grid {
    max-width: 820px;
    margin: 48px auto 0;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 6px rgba(255, 32, 32, .12), 0 0 40px rgba(255, 32, 32, .3); }
    50%      { box-shadow: 0 0 0 10px rgba(255, 32, 32, .18), 0 0 70px rgba(255, 32, 32, .5); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero-content > * { animation: fadeInUp .7s ease both; }
.hero-content > *:nth-child(2) { animation-delay: .05s; }
.hero-content > *:nth-child(3) { animation-delay: .1s; }
.hero-content > *:nth-child(4) { animation-delay: .15s; }
.hero-content > *:nth-child(5) { animation-delay: .2s; }
.hero-content > *:nth-child(6) { animation-delay: .3s; }

@media (max-width: 640px) {
    .hero-brand { font-size: 3rem; }
    .profile-img { width: 130px; height: 130px; }
    .hero--home { min-height: auto; padding-top: 48px; padding-bottom: 40px; }
}

h1, h2, h3, h4 {
    margin: 0 0 12px;
    font-weight: 700;
}

.text-center { text-align: center; }

.accent { color: var(--red); }

.section-title {
    font-size: 2.1rem;
    text-align: center;
    margin-bottom: 8px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto 40px;
}

/* ---- Cards / Grid ---- */
.grid {
    display: grid;
    gap: 20px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Gestaffelde entrance-animatie voor kaarten in een grid (zoals animate-scale-in / animate-fade-in) */
.grid > .card {
    animation: fadeInUp .55s ease both;
}
.grid > .card:nth-child(1)  { animation-delay: 0s;   }
.grid > .card:nth-child(2)  { animation-delay: .05s; }
.grid > .card:nth-child(3)  { animation-delay: .10s; }
.grid > .card:nth-child(4)  { animation-delay: .15s; }
.grid > .card:nth-child(5)  { animation-delay: .20s; }
.grid > .card:nth-child(6)  { animation-delay: .25s; }
.grid > .card:nth-child(7)  { animation-delay: .30s; }
.grid > .card:nth-child(8)  { animation-delay: .35s; }
.grid > .card:nth-child(9)  { animation-delay: .40s; }
.grid > .card:nth-child(10) { animation-delay: .45s; }
.grid > .card:nth-child(11) { animation-delay: .50s; }
.grid > .card:nth-child(12) { animation-delay: .55s; }

.section-title,
.section-subtitle {
    animation: fadeInUp .55s ease both;
}

@media (prefers-reduced-motion: reduce) {
    .grid > .card,
    .section-title,
    .section-subtitle,
    .hero-content > *,
    .profile-img,
    .skill-bar-fill,
    .card {
        animation: none !important;
        transition: none !important;
    }
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.card--outline {
    border-color: var(--card-border);
}

.project-card {
    display: flex;
    flex-direction: column;
}

.project-card .card-actions { margin-top: auto; padding-top: 18px; }

.card:hover {
    border-color: rgba(255, 32, 32, .45);
    transform: translateY(-4px);
    box-shadow: 0 12px 28px -14px rgba(255, 32, 32, .35), 0 4px 12px rgba(0, 0, 0, .3);
}

.skill-card:hover,
.stat-box:hover { transform: none; box-shadow: none; }

.icon-box {
    color: var(--red);
    margin-bottom: 12px;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: opacity .15s, transform .1s;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
    background: linear-gradient(90deg, var(--red-dark), var(--red));
    color: #fff;
}

.btn-primary:hover { opacity: .9; }

.btn-outline {
    background: transparent;
    border-color: var(--red);
    color: var(--red);
}

.btn-outline:hover { background: rgba(255, 32, 32, .08); }

.btn-block { width: 100%; justify-content: center; }

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
    flex-shrink: 0;
    background: transparent;
    border: 1px solid var(--red);
    color: var(--red);
}

.btn-icon:hover {
    color: #fff;
    background: var(--red);
    box-shadow: 0 4px 14px -4px rgba(255, 32, 32, .6);
}

.btn-disabled {
    opacity: .45;
    cursor: default;
    pointer-events: none;
}

/* ---- Tech pills ---- */
.pill-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.pill {
    border: 1px solid var(--card-border);
    border-radius: 8px;
    text-align: center;
    padding: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
}

.tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 11px;
    border: 1px solid var(--card-border);
    border-radius: 999px;
    color: var(--red);
    background: rgba(255, 32, 32, .06);
    letter-spacing: 0.01em;
    margin: 0 6px 6px 0;
    transition: background .15s ease;
}

.tag:hover { background: rgba(255, 32, 32, .14); }

/* ---- Skills bars ---- */
.skill-row { margin-bottom: 14px; }

.skill-row .skill-top {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.skill-bar {
    background: var(--border);
    border-radius: 4px;
    height: 7px;
    overflow: hidden;
}

.skill-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--red-dark), var(--red));
    border-radius: 4px;
    transition: width .8s ease;
}

.skill-card h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--red);
    margin-bottom: 18px;
}

.stat-box {
    text-align: center;
    padding: 28px 16px;
}

.stat-box .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--red);
}

/* ---- Project cards / filters ---- */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 36px;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    padding: 9px 20px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .18s ease;
}

.filter-btn.active,
.filter-btn:hover {
    background: linear-gradient(90deg, var(--red-dark), var(--red));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 14px -6px rgba(255, 32, 32, .6);
}

.project-card h3 { color: var(--red); }

.project-card p.desc {
    color: var(--text-muted);
    font-size: 0.92rem;
    min-height: 66px;
}

.project-card .features {
    list-style: none;
    padding: 0;
    margin: 14px 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.project-card .features li::before {
    content: "•";
    color: var(--red);
    margin-right: 6px;
}

.project-card .card-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.project-card[hidden] { display: none; }

/* ---- Contact ---- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 24px;
    align-items: start;
}

.contact-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    margin-bottom: 12px;
}

.contact-item--link {
    transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.contact-item--link:hover {
    border-color: var(--red);
    background: rgba(255, 32, 32, .06);
    transform: translateX(4px);
}

.contact-item strong { display: block; color: var(--text); }
.contact-item span.value { color: var(--text-muted); font-size: 0.9rem; }

.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
}

.form-group textarea { min-height: 130px; resize: vertical; }

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--red);
}

.honeypot-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.alert {
    padding: 14px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.92rem;
}

.alert-success {
    background: rgba(34, 197, 94, .1);
    border: 1px solid rgba(34, 197, 94, .4);
    color: #4ade80;
}

.alert-error {
    background: rgba(255, 32, 32, .1);
    border: 1px solid rgba(255, 32, 32, .4);
    color: #f87171;
}

.availability-dot {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--green);
    font-size: 0.9rem;
    margin-top: 10px;
}

.availability-dot::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    display: inline-block;
}

/* ---- CTA ---- */
.cta {
    text-align: center;
    padding: 80px 0;
}

.cta .btn-row {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 24px;
}

/* ---- Footer ---- */
.site-footer {
    border-top: 1px solid var(--border);
    padding-top: 48px;
    margin-top: 40px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 32px;
    padding-bottom: 32px;
}

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

.footer-links li { margin-bottom: 8px; }
.footer-links a { color: var(--text-muted); font-size: 0.92rem; }
.footer-links a:hover { color: var(--red); }

.social-links {
    display: flex;
    gap: 10px;
}

.social-links a {
    width: 36px;
    height: 36px;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--red);
}

.social-links a:hover { background: rgba(255, 32, 32, .08); }

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; }
    .pill-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .grid-4, .grid-3 { grid-template-columns: 1fr; }
    .nav-toggle { display: flex; }
    .main-nav ul {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg);
        flex-direction: column;
        padding: 16px 24px;
        border-bottom: 1px solid var(--border);
    }
    .main-nav ul.open { display: flex; }
    .section-title { font-size: 1.6rem; }
    .pill-grid { grid-template-columns: 1fr; }
}