/* ============================================================
   Thomas Wijnands — portfolio
   Laravel-inspired design: dark, red accents, artisan details
   ============================================================ */

:root {
    --bg: #0a0a0a;
    --bg-soft: #111113;
    --panel: #141416;
    --panel-2: #18181b;
    --border: #27272a;
    --border-hover: #3f3f46;
    --text: #fafafa;
    --text-soft: #a1a1aa;
    --text-dim: #8d8d96;       /* >=5.3:1 on bg and panels (WCAG AA) */
    --red: #ff2d20;            /* Laravel brand red — accents only */
    --red-btn: #c81e10;        /* darker red: 5.8:1 with white text */
    --red-soft: #ff5d52;
    --orange: #ff9b73;
    --green: #4ade80;
    --yellow: #facc15;
    --blue: #7dd3fc;
    --gradient: linear-gradient(120deg, var(--red) 0%, var(--red-soft) 55%, var(--orange) 100%);
    --radius: 14px;
    --nav-h: 72px;
    --font-sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.mono { font-family: var(--font-mono); }
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }

::selection { background: rgba(255, 45, 32, 0.35); color: #fff; }

/* ---------- background decor ---------- */
.bg-grid {
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image:
        radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9), rgba(0,0,0,0.25) 60%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9), rgba(0,0,0,0.25) 60%, transparent);
}

.bg-glow {
    position: fixed;
    z-index: -1;
    top: -300px;
    left: 50%;
    transform: translateX(-50%);
    width: 1000px;
    height: 640px;
    background: radial-gradient(ellipse at center, rgba(255, 45, 32, 0.16), transparent 65%);
    pointer-events: none;
}

/* ---------- a11y helpers ---------- */
.skip-link {
    position: absolute;
    top: -48px;
    left: 16px;
    z-index: 100;
    padding: 10px 16px;
    background: var(--red-btn);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }

a:focus-visible, button:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ============================================================
   NAV
   ============================================================ */
.nav-wrap {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    height: var(--nav-h);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: rgba(10, 10, 10, 0.78);
    border-bottom: 1px solid var(--border);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-logo {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    color: var(--text);
    letter-spacing: -0.02em;
    white-space: nowrap;
    flex-shrink: 0;
}
.prompt-char { color: var(--red); }

.cursor {
    display: inline-block;
    width: 9px;
    height: 1.05em;
    margin-left: 3px;
    background: var(--red);
    vertical-align: text-bottom;
    animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.nav-menu {
    display: flex;
    gap: 6px;
    list-style: none;
}

.nav-link {
    display: block;
    padding: 8px 12px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-soft);
    text-decoration: none;
    border-radius: 8px;
    white-space: nowrap;
    transition: color 0.18s ease, background 0.18s ease;
}
/* the Route::get( ... ) decoration only fits on wide screens;
   default to clean '/path' labels and reveal it at >=1280px */
.nav-fn { display: none; color: var(--text-dim); transition: color 0.18s ease; }
.nav-link:hover, .nav-link.active { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-link:hover .nav-fn, .nav-link.active .nav-fn { color: var(--red); }
.nav-link--cta .nav-fn { color: var(--red); }

@media (min-width: 1280px) {
    .nav { max-width: 1280px; }
    .nav-fn { display: inline; }
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 10px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
}
.nav-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 56px;
    min-height: 100vh;
    padding-top: calc(var(--nav-h) + 40px);
    padding-bottom: 64px;
}

/* ---------- floating framework icons (site-wide background) ---------- */
.float-icons {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}

.float-icon {
    position: absolute;
    width: 52px;
    height: 52px;
    opacity: 0.16;
    filter: drop-shadow(0 0 16px currentColor);
    animation: floaty 7s ease-in-out infinite alternate;
}
.float-icon path { fill: currentColor; }

.float-icon--laravel {
    color: var(--red);
    width: 64px;
    height: 64px;
    top: 16%;
    right: 5%;
    animation-duration: 8s;
}
.float-icon--livewire {
    color: #fb70a9;          /* Livewire pink */
    width: 58px;
    height: 58px;
    bottom: 12%;
    left: 4%;
    animation-duration: 9s;
    animation-delay: -3s;
}
.float-icon--vue {
    color: #41b883;          /* Vue green */
    top: 11%;
    left: 4%;
    animation-duration: 10s;
    animation-delay: -5s;
}
.float-icon--react {
    color: #61dafb;          /* React cyan */
    bottom: 7%;
    right: 7%;
    animation-duration: 11s;
    animation-delay: -7s;
}

@keyframes floaty {
    from { transform: translateY(10px) rotate(-3deg); }
    to   { transform: translateY(-14px) rotate(4deg); }
}

.hero-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 22px;
    border: 2px solid var(--border-hover);
    box-shadow:
        0 0 0 4px rgba(255, 45, 32, 0.25),
        0 8px 32px rgba(0, 0, 0, 0.45);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    margin-bottom: 22px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-soft);
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 45, 32, 0.06);
}
.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 10px rgba(255, 45, 32, 0.9);
    animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.45; } }

.hero h1 {
    font-size: clamp(2.1rem, 4.6vw, 3.4rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-sub {
    max-width: 50ch;
    color: var(--text-soft);
    margin-bottom: 14px;
}
.hero-sub a {
    color: var(--text);
    text-decoration-color: var(--red);
    text-underline-offset: 3px;
}
.hero-sub a:hover { color: var(--red-soft); }
.hero-sub strong { color: var(--text); }

.hero-comment {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 30px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 10px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.btn--primary {
    background: var(--red-btn);
    color: #fff;
    box-shadow: 0 4px 24px rgba(255, 45, 32, 0.35);
}
.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(255, 45, 32, 0.5);
}
.btn--ghost {
    border: 1px solid var(--border);
    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.02);
}
.btn--ghost:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
    color: var(--text);
}

/* ---------- terminal ---------- */
.terminal {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(17, 17, 19, 0.92);
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.55),
        0 0 60px rgba(255, 45, 32, 0.07);
    overflow: hidden;
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--panel-2);
    border-bottom: 1px solid var(--border);
}
.t-dot { width: 12px; height: 12px; border-radius: 50%; }
.t-dot--red { background: #ff5f57; }
.t-dot--yellow { background: #febc2e; }
.t-dot--green { background: #28c840; }
.terminal-title {
    margin-left: 10px;
    font-size: 0.74rem;
    color: var(--text-dim);
}

.terminal-body {
    padding: 20px;
    min-height: 320px;
    font-size: 0.82rem;
    line-height: 1.9;
    word-break: break-word;
}

.t-prompt { color: var(--red); font-weight: 700; }
.t-line { display: block; }
.t-cmd { color: var(--text); }
.t-muted { color: var(--text-dim); }
.t-ok { color: var(--green); }
.t-info {
    display: inline-block;
    padding: 0 8px;
    margin-right: 8px;
    background: rgba(125, 211, 252, 0.15);
    color: var(--blue);
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
}
.t-dots { color: var(--text-dim); letter-spacing: 1px; }
.t-cursor {
    display: inline-block;
    width: 8px;
    height: 1em;
    background: var(--text);
    vertical-align: text-bottom;
    animation: blink 1s steps(1) infinite;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 96px 24px; }

.section-title {
    font-size: clamp(1.3rem, 2.6vw, 1.7rem);
    font-weight: 700;
    margin-bottom: 40px;
}
.blade { color: var(--red); }
.blade-str { color: var(--orange); }

.section-end {
    margin-top: 40px;
    font-size: 0.95rem;
    opacity: 0.8;
}

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

.card-cmd {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 16px;
}

.comment { color: var(--text-dim); }
.accent { color: var(--red-soft); }
.ok { color: var(--green); }

/* ---------- about ---------- */
.about-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 40px;
    align-items: start;
}

.about-text p { color: var(--text-soft); margin-bottom: 18px; }
.about-text strong { color: var(--text); }

.about-list { display: flex; flex-direction: column; gap: 2px; font-size: 0.82rem; }
.about-list > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 7px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.07);
}
.about-list > div:last-child { border-bottom: none; }
.about-list dt { color: var(--text-dim); }
.about-list dd { text-align: right; color: var(--text); }

/* ---------- skills ---------- */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

/* grid items default to min-width:auto, which lets wide <pre> blocks
   blow out the viewport on narrow screens — let them shrink instead */
.skills-grid > *, .contact-grid > *, .about-grid > * { min-width: 0; }

.code-block {
    font-size: 0.82rem;
    line-height: 1.85;
    color: var(--text-soft);
    overflow-x: auto;
}
.j-key { color: var(--blue); }
.j-str { color: var(--orange); }

.skills-chips { display: flex; flex-direction: column; gap: 28px; }
.chip-title {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 12px;
    font-weight: 500;
}
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
}
.chips li {
    padding: 7px 15px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-soft);
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 999px;
    transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.chips li:hover {
    border-color: rgba(255, 45, 32, 0.55);
    color: var(--text);
    transform: translateY(-2px);
}

/* ---------- experience / timeline ---------- */
.migrate-cmd {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 28px;
}

.timeline {
    list-style: none;
    position: relative;
    padding-left: 28px;
}
.timeline::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(to bottom, var(--red), rgba(255, 45, 32, 0.05));
}

.timeline-item { position: relative; padding-bottom: 44px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
    content: "";
    position: absolute;
    left: -28px;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg);
    border: 3px solid var(--red);
    box-shadow: 0 0 12px rgba(255, 45, 32, 0.5);
}

.migration {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 0.76rem;
    color: var(--text-dim);
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.migration-name { color: var(--text-soft); overflow-wrap: anywhere; }
.migration-dots {
    flex: 1;
    min-width: 30px;
    border-bottom: 1px dotted var(--border-hover);
    transform: translateY(-3px);
}
.migration-status { color: var(--green); font-weight: 700; }
.migration-status--running { color: var(--yellow); animation: pulse 2s ease-in-out infinite; }

/* education: same migration-line + card look, no timeline rail */
.seed-item { max-width: 720px; }

.timeline-card:hover {
    border-color: rgba(255, 45, 32, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.timeline-head { margin-bottom: 12px; }
.timeline-head h3 { font-size: 1.15rem; font-weight: 700; }
.timeline-where { color: var(--red-soft); font-weight: 600; font-size: 0.95rem; }
.timeline-when { color: var(--text-dim); font-size: 0.78rem; margin-top: 4px; }
.timeline-card p:last-child { color: var(--text-soft); font-size: 0.95rem; }

/* ---------- open source ---------- */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.package-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-decoration: none;
}
.package-card:hover {
    border-color: rgba(255, 45, 32, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45), 0 0 24px rgba(255, 45, 32, 0.08);
}

.package-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.package-icon { font-size: 1.5rem; }
.package-badge {
    font-size: 0.68rem;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 45, 32, 0.4);
    color: var(--red-soft);
    background: rgba(255, 45, 32, 0.07);
}

.package-card h3 { font-size: 0.95rem; font-weight: 700; color: var(--text); }
.package-card p { font-size: 0.9rem; color: var(--text-soft); flex: 1; }
.package-link {
    font-size: 0.74rem;
    color: var(--text-dim);
    transition: color 0.2s ease;
}
.package-card:hover .package-link { color: var(--red-soft); }

/* ---------- contact ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 48px;
    align-items: center;
}

.contact-text h3 {
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
}
.contact-text p { color: var(--text-soft); margin-bottom: 26px; max-width: 42ch; }

.env-card .code-block { font-size: 0.8rem; }
.env-key { color: var(--blue); }
.env-val { color: var(--orange); }
.env-bool { color: var(--green); }

.copy-btn {
    margin-left: 10px;
    padding: 2px 10px;
    font-size: 0.68rem;
    color: var(--text-soft);
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: color 0.18s ease, border-color 0.18s ease;
}
.copy-btn:hover { color: var(--text); border-color: var(--border-hover); }
.copy-btn.copied { color: var(--green); border-color: rgba(74, 222, 128, 0.4); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    border-top: 1px solid var(--border);
    padding: 48px 0 56px;
    background: rgba(255, 255, 255, 0.012);
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    text-align: center;
}

.inspire {
    background: none;
    border: 1px dashed var(--border);
    border-radius: 10px;
    padding: 14px 22px;
    color: var(--text-dim);
    font-size: 0.8rem;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
    max-width: 640px;
}
.inspire:hover { border-color: rgba(255, 45, 32, 0.4); color: var(--text-soft); }
.inspire-quote {
    display: block;
    margin-top: 8px;
    color: var(--text-soft);
    font-style: italic;
}

.footer-note { color: var(--text-dim); font-size: 0.82rem; }

/* ============================================================
   REVEAL ANIMATIONS
   ============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .cursor, .t-cursor, .badge-dot, .migration-status--running, .float-icon { animation: none; }
    .btn, .card, .chips li, .package-card, .nav-menu { transition: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 920px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 44px;
        min-height: auto;
        padding-top: calc(var(--nav-h) + 56px);
    }
    .terminal-body { min-height: 260px; }
    .about-grid, .skills-grid, .contact-grid { grid-template-columns: 1fr; }
    .packages-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
    .nav-toggle { display: flex; }
    .nav-menu {
        position: fixed;
        top: var(--nav-h);
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 2px;
        padding: 14px 20px 22px;
        background: #0b0b0c;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
        transform: translateY(-12px);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.22s ease, opacity 0.22s ease, visibility 0.22s;
    }
    .nav-menu.open {
        transform: none;
        opacity: 1;
        visibility: visible;
    }
    /* the dropdown has room for the full Route::get( ... ) labels */
    .nav-fn { display: inline; }
    .section { padding: 72px 24px; }
    .packages-grid { grid-template-columns: 1fr; }
    .migration { font-size: 0.68rem; }
    body { font-size: 16px; }
    /* narrow screens: text spans the full width, so tone the icons down */
    .float-icon { opacity: 0.1; }
}
