/* ============================================================
   Xander Meyen - portfolio
   Thema: donker, terminal-achtig, met een knipoog
   Geen Bootstrap meer, alles custom.
   ============================================================ */

:root {
    --bg: #0d1117;
    --bg-soft: #161b22;
    --bg-card: #1b2129;
    --border: #2d333b;
    --text: #d8dee6;
    --text-dim: #8b949e;
    --accent: #4ade80;          /* groen, terminal vibes */
    --accent-soft: rgba(74, 222, 128, 0.12);
    --amber: #fbbf24;
    --red: #f87171;
    --blue: #60a5fa;
    --purple: #c084fc;
    --mono: 'JetBrains Mono', 'Consolas', monospace;
    --sans: 'Inter', system-ui, sans-serif;
    --radius: 10px;
    --nav-h: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    line-height: 1.65;
    overflow-x: hidden;
}

::selection { background: var(--accent); color: var(--bg); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-soft); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.prompt { color: var(--accent); font-family: var(--mono); }
.accent { color: var(--accent); }

/* Heel subtiele scanlines over de hele site */
.scanlines {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 3px,
        rgba(0, 0, 0, 0.06) 4px
    );
    opacity: 0.5;
}

/* ============ NAV ============ */
.site-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(16px, 4vw, 48px);
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.nav-logo {
    font-family: var(--mono);
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--text);
}
.nav-logo:hover { text-decoration: none; }
.logo-prompt { color: var(--accent); }
.logo-cursor {
    color: var(--accent);
    animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.nav-links {
    display: flex;
    align-items: center;
    gap: clamp(12px, 2.5vw, 32px);
}
.nav-links a {
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--text-dim);
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); text-decoration: none; }
.nav-num { color: var(--accent); font-size: 0.7rem; margin-right: 2px; }

.nav-cta {
    border: 1px solid var(--accent);
    border-radius: 6px;
    padding: 6px 16px;
    color: var(--accent) !important;
}
.nav-cta:hover { background: var(--accent-soft); }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.nav-toggle span {
    width: 24px; height: 2px;
    background: var(--text);
    transition: 0.3s;
}

/* ============ HERO ============ */
.hero {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding: calc(var(--nav-h) + 40px) clamp(16px, 5vw, 64px) 48px;
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 48px 48px;
    opacity: 0.18;
    mask-image: radial-gradient(ellipse at 30% 40%, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 30% 40%, black 30%, transparent 75%);
}

.hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: clamp(32px, 5vw, 80px);
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.hero-pre {
    font-family: var(--mono);
    color: var(--accent);
    margin-bottom: 12px;
}

.hero-name {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 900;
    line-height: 1.02;
    letter-spacing: -0.03em;
    color: #fff;
}

.hero-role {
    font-family: var(--mono);
    font-size: clamp(1rem, 2.2vw, 1.3rem);
    color: var(--amber);
    margin: 18px 0 20px;
}
.type-cursor {
    color: var(--accent);
    animation: blink 0.9s steps(1) infinite;
}

.hero-intro {
    max-width: 520px;
    color: var(--text-dim);
    margin-bottom: 28px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 12px 26px;
    border-radius: 8px;
    border: 1px solid var(--accent);
    transition: transform 0.15s, background 0.2s, box-shadow 0.2s;
    cursor: pointer;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }

.btn-solid {
    background: var(--accent);
    color: var(--bg) !important;
}
.btn-solid:hover { box-shadow: 0 6px 24px rgba(74, 222, 128, 0.35); }

.btn-ghost { color: var(--accent); background: transparent; }
.btn-ghost:hover { background: var(--accent-soft); }

.hero-hint {
    margin-top: 26px;
    font-size: 0.8rem;
    color: var(--text-dim);
    opacity: 0.75;
}
.hero-hint code {
    font-family: var(--mono);
    background: var(--bg-soft);
    border: 1px solid var(--border);
    padding: 1px 6px;
    border-radius: 4px;
    color: var(--accent);
}

/* Code window in de hero */
.hero-visual { position: relative; }

.code-window {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.code-window-bar, .terminal-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 14px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-r { background: #ff5f57; }
.dot-y { background: #febc2e; }
.dot-g { background: #28c840; }
.code-window-title {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-left: 8px;
}

.code-body {
    padding: 20px;
    font-family: var(--mono);
    font-size: clamp(0.7rem, 1.4vw, 0.85rem);
    line-height: 1.7;
    overflow-x: auto;
    color: var(--text);
}
.c-kw { color: var(--purple); }
.c-type { color: var(--amber); }
.c-str { color: var(--accent); }
.c-var { color: var(--blue); }
.c-fn { color: var(--amber); }
.c-com { color: var(--text-dim); font-style: italic; }

.hero-photo {
    position: absolute;
    width: 110px; height: 110px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--accent);
    bottom: -24px; right: -12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s;
}
.hero-photo:hover { transform: scale(1.08) rotate(3deg); }

.scroll-down {
    position: absolute;
    bottom: 22px; left: 50%;
    transform: translateX(-50%);
    color: var(--text-dim);
    font-size: 0.8rem;
    animation: bob 2s ease-in-out infinite;
}
.scroll-down:hover { color: var(--accent); text-decoration: none; }
@keyframes bob {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, 8px); }
}

/* ============ SECTIES ALGEMEEN ============ */
.section {
    max-width: 1100px;
    margin: 0 auto;
    padding: clamp(64px, 10vw, 120px) clamp(16px, 5vw, 48px);
}

.section-head { margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 {
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.02em;
}
.section-num {
    font-family: var(--mono);
    color: var(--accent);
    font-weight: 600;
    font-size: 0.7em;
    vertical-align: middle;
    margin-right: 6px;
}
.section-sub {
    font-family: var(--mono);
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-top: 6px;
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ============ PROJECTEN ============ */
.projects { display: flex; flex-direction: column; gap: clamp(28px, 4vw, 48px); }

.project {
    display: grid;
    grid-template-columns: 5fr 6fr;
    gap: 0;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.project:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.4);
}
.project:nth-child(even) { grid-template-columns: 6fr 5fr; }
.project:nth-child(even) .project-img { order: 2; }

.project-img {
    position: relative;
    min-height: 240px;
}
.project-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    filter: saturate(0.85);
    transition: filter 0.3s, transform 0.4s;
}
.project:hover .project-img img { filter: saturate(1.05); transform: scale(1.03); }

.project-status {
    position: absolute;
    top: 12px; left: 12px;
    font-family: var(--mono);
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(6px);
    border: 1px solid var(--border);
}
.status-live { color: var(--accent); }
.status-wip { color: var(--amber); }
.status-client { color: var(--blue); }
.status-done { color: var(--purple); }

.project-info { padding: clamp(20px, 3vw, 36px); }
.project-kicker {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--accent);
    text-transform: lowercase;
    margin-bottom: 4px;
}
.project-info h3 {
    font-size: 1.45rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 10px;
}
.project-info > p { color: var(--text-dim); font-size: 0.95rem; }

.tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}
.tags li {
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid rgba(74, 222, 128, 0.25);
    padding: 3px 10px;
    border-radius: 999px;
}

.project-links { display: flex; gap: 18px; flex-wrap: wrap; }
.project-links a {
    font-family: var(--mono);
    font-size: 0.85rem;
    font-weight: 600;
}
.project-note {
    font-size: 0.78rem !important;
    color: var(--text-dim);
    font-style: italic;
}

/* ============ SKILLS ============ */
.skills-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(24px, 4vw, 48px);
}

.skill-block {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: clamp(20px, 3vw, 32px);
}

.skill-block-title {
    font-family: var(--mono);
    font-size: 0.95rem;
    color: var(--text-dim);
    margin-bottom: 20px;
}

.skill-bars { display: flex; flex-direction: column; gap: 14px; }
.skill-bar {
    display: grid;
    grid-template-columns: 110px 1fr;
    align-items: center;
    gap: 12px;
}
.skill-name {
    font-family: var(--mono);
    font-size: 0.82rem;
}
.bar {
    height: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
    display: block;
}
.bar-fill {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--accent), #22d3ee);
    border-radius: 999px;
    transition: width 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.skill-chips {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.skill-chips li {
    font-family: var(--mono);
    font-size: 0.8rem;
    padding: 6px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: border-color 0.2s, color 0.2s, transform 0.15s;
    cursor: default;
}
.skill-chips li:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.skill-loading {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px dashed var(--border);
}
.skill-loading-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    font-style: italic;
}
.skill-loading-item {
    font-family: var(--mono);
    font-size: 0.85rem;
    margin-top: 6px;
}
.loading-dots { color: var(--accent); letter-spacing: 2px; }

/* ============ ERVARING (git log) ============ */
.log-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(24px, 4vw, 48px);
    align-items: start;
}

.log-title {
    font-family: var(--mono);
    font-size: 1rem;
    color: var(--amber);
    margin-bottom: 20px;
}

.log {
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.log-item {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    padding: 14px 0 14px 16px;
    position: relative;
}
.log-item::before {
    content: '';
    position: absolute;
    left: -5px; top: 22px;
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--border);
    border: 2px solid var(--bg);
    transition: background 0.2s;
}
.log-item:hover::before { background: var(--accent); }
.log-current::before { background: var(--accent); box-shadow: 0 0 10px rgba(74, 222, 128, 0.6); }

.log-hash {
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--amber);
    padding-top: 4px;
}
.log-current .log-hash { color: var(--accent); font-weight: 600; }

.log-item h4 {
    font-size: 0.98rem;
    font-weight: 700;
    color: #fff;
}
.log-where {
    font-weight: 400;
    color: var(--text-dim);
    font-size: 0.85rem;
}
.log-date {
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--accent);
    margin: 2px 0 4px;
}
.log-item p:not(.log-date) {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.btn-cv { margin-top: 24px; }

/* ============ OVER MIJ ============ */
.about-intro {
    max-width: 720px;
    font-size: 1.05rem;
    color: var(--text);
    margin-bottom: clamp(32px, 5vw, 48px);
}

.hobby-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(20px, 3vw, 32px);
    margin-bottom: clamp(32px, 5vw, 48px);
}

.hobby-card {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.25s, transform 0.25s;
}
.hobby-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.hobby-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}
.hobby-body { padding: 22px 24px 26px; }
.hobby-tag {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--amber);
    border: 1px solid rgba(251, 191, 36, 0.35);
    background: rgba(251, 191, 36, 0.08);
    padding: 2px 10px;
    border-radius: 999px;
}
.hobby-body h3 {
    margin: 10px 0 8px;
    color: #fff;
    font-size: 1.25rem;
}
.hobby-body p { color: var(--text-dim); font-size: 0.92rem; }

.traits {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.trait {
    font-family: var(--mono);
    font-size: 0.85rem;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    padding: 10px 18px;
    border-radius: 8px;
}
.trait-key { color: var(--blue); }
.trait-val { color: var(--accent); font-weight: 600; }
.trait-false { color: var(--red); }

/* ============ CONTACT ============ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: clamp(28px, 5vw, 64px);
    align-items: start;
}

.contact-side p { color: var(--text-dim); margin-bottom: 20px; }

.contact-mail {
    font-family: var(--mono);
    font-size: clamp(0.85rem, 2vw, 1.05rem);
    font-weight: 600;
    display: inline-block;
    margin-bottom: 20px;
    border-bottom: 1px dashed var(--accent);
}
.contact-mail:hover { text-decoration: none; border-bottom-style: solid; }

.contact-socials { display: flex; gap: 20px; }
.contact-socials a { font-family: var(--mono); font-size: 0.85rem; }

.contact-form {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: clamp(20px, 3vw, 32px);
    display: flex;
    flex-direction: column;
}

.contact-form label {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 6px;
}
.form-prompt { color: var(--accent); }

.contact-form input,
.contact-form textarea {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
    color: var(--text);
    font-family: var(--mono);
    font-size: 0.9rem;
    margin-bottom: 18px;
    transition: border-color 0.2s, box-shadow 0.2s;
    resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.contact-form input.invalid,
.contact-form textarea.invalid { border-color: var(--red); }

.contact-form .btn { align-self: flex-start; }

/* ============ TERMINAL ============ */
.section-terminal { padding-top: 0; }

.terminal {
    background: #0a0e13;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.terminal-body {
    padding: 16px 18px 6px;
    font-family: var(--mono);
    font-size: 0.85rem;
    min-height: 120px;
    max-height: 320px;
    overflow-y: auto;
}
.term-line { margin-bottom: 6px; color: var(--text-dim); white-space: pre-wrap; }
.term-line strong { color: var(--accent); }
.term-cmd { color: var(--text); }
.term-cmd::before { content: 'xander@portfolio:~$ '; color: var(--accent); }
.term-ok { color: var(--accent); }
.term-err { color: var(--red); }

.terminal-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px 16px;
}
.terminal-input-row .prompt { font-size: 0.85rem; white-space: nowrap; }
#terminalInput {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-family: var(--mono);
    font-size: 0.9rem;
    caret-color: var(--accent);
}

/* ============ FOOTER ============ */
.footer {
    border-top: 1px solid var(--border);
    padding: 36px clamp(16px, 5vw, 48px) 48px;
    text-align: center;
}
.footer-line {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--text-dim);
    word-break: break-word;
}
.footer-sub {
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* ============ ACHIEVEMENT TOAST ============ */
.achievement {
    position: fixed;
    bottom: 24px;
    left: 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-card);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    padding: 14px 20px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
    transform: translateY(140%);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 200;
    max-width: 320px;
}
.achievement.show { transform: translateY(0); }
.achievement-icon { font-size: 1.6rem; }
.achievement-title {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.achievement-text { font-size: 0.88rem; color: var(--text); }

/* ============ BACK TO TOP ============ */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px; height: 44px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--accent);
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, border-color 0.2s, transform 0.15s;
    z-index: 150;
}
.back-to-top.show { opacity: 1; pointer-events: auto; }
.back-to-top:hover { border-color: var(--accent); transform: translateY(-2px); }

/* ============ SCARE MODE (konami code) ============ */
body.scare-mode {
    animation: scare-flicker 0.12s steps(2) 10;
}
body.scare-mode .scanlines { opacity: 1; }
@keyframes scare-flicker {
    0% { filter: invert(1) hue-rotate(160deg); }
    50% { filter: none; }
    100% { filter: invert(1) hue-rotate(320deg); }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero-visual { max-width: 540px; }
    .hero-photo { width: 84px; height: 84px; bottom: -18px; right: 8px; }

    .skills-wrap, .log-cols, .hobby-cards, .contact-grid {
        grid-template-columns: 1fr;
    }

    .project, .project:nth-child(even) { grid-template-columns: 1fr; }
    .project:nth-child(even) .project-img { order: 0; }
    .project-img { min-height: 200px; }
    .project-img img { max-height: 260px; }
}

@media (max-width: 760px) {
    .nav-toggle { display: flex; }
    .nav-links {
        position: fixed;
        top: var(--nav-h);
        right: 0;
        flex-direction: column;
        align-items: flex-end;
        gap: 0;
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-right: none;
        border-radius: 0 0 0 var(--radius);
        padding: 8px 0;
        transform: translateX(110%);
        transition: transform 0.3s ease;
        min-width: 220px;
    }
    .nav-links.open { transform: none; }
    .nav-links a {
        padding: 13px 24px;
        width: 100%;
        text-align: right;
        font-size: 0.95rem;
    }
    .nav-cta { border: none; border-radius: 0; }

    .achievement { left: 12px; right: 12px; max-width: none; }
}

/* Minder animatie voor wie dat wil */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .logo-cursor, .type-cursor, .scroll-down { animation: none; }
    body.scare-mode { animation: none; }
}
