/* Remco van Wijk | Data Scientist & Developer */

:root {
  --bg: #fafbfc;
  --ink: #111111;
  --ink-secondary: #374151;
  --muted: #64748b;
  --line: #e2e8f0;
  --card: #ffffff;
  --card-hover: #f8fafc;
  --yellow: #ffe24a;
  --yellow-hover: #ffd60a;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.07);
  --radius: 14px;
  --page: 540px;
  --wide: 760px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --modal-bg: rgba(255, 255, 255, 0.96);
  --backdrop: rgba(0, 0, 0, 0.35);
}

/* 🌙 Dark Mode with Atmospheric Midnight Blue Radial Glow */
[data-theme="dark"] {
  --bg: #090c12;
  --ink: #f9fafb;
  --ink-secondary: #d1d5db;
  --muted: #94a3b8;
  --line: #1c2436;
  --card: #121724;
  --card-hover: #182032;
  --yellow: #facc15;
  --yellow-hover: #eab308;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
  --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.65);
  --modal-bg: rgba(18, 23, 36, 0.96);
  --backdrop: rgba(0, 0, 0, 0.75);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  overflow-x: hidden;
  max-width: 100%;
  background-color: var(--bg);
  background-image: 
    radial-gradient(circle at 50% -12%, #ebf1f8 0%, rgba(250, 251, 252, 0) 70%),
    radial-gradient(circle at 85% 10%, rgba(254, 240, 138, 0.22) 0%, transparent 40%),
    radial-gradient(circle at 15% 15%, rgba(219, 234, 254, 0.35) 0%, transparent 45%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 200ms ease, color 200ms ease;
}

[data-theme="dark"] body {
  background-color: #090c12;
  background-image: radial-gradient(circle at 50% -10%, #182338 0%, #090c12 75%);
  background-attachment: fixed;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 100;
  background: var(--ink);
  color: var(--bg);
  padding: 8px 12px;
  border-radius: 8px;
}

.skip-link:focus {
  top: 12px;
}

.page {
  width: min(var(--page), calc(100% - 36px));
  margin: 0 auto;
  padding: 36px 0 64px;
}

.page-wide {
  width: min(var(--wide), calc(100% - 36px));
}

/* Header & Nav */

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 36px;
}

.brand {
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-links {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

.top-links a {
  text-decoration: none;
  transition: color 150ms ease;
}

.top-links a:hover {
  color: var(--ink);
}

/* Header Buttons (Theme Toggle & Cmd+K) */

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn,
.cmd-btn,
.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink-secondary);
  border-radius: 8px;
  cursor: pointer;
  transition: all 150ms ease;
  font-family: inherit;
  text-decoration: none;
}

.icon-btn {
  width: 34px;
  height: 34px;
  padding: 0;
}

.icon-btn svg {
  width: 17px;
  height: 17px;
}

.cmd-btn {
  height: 34px;
  padding: 0 9px;
  font-size: 0.75rem;
  font-weight: 700;
  gap: 4px;
  color: var(--muted);
}

.cmd-btn kbd {
  font-family: inherit;
  font-size: 0.75rem;
}

.lang-switch {
  height: 34px;
  padding: 0 9px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.icon-btn:hover,
.cmd-btn:hover,
.lang-switch:hover {
  background: var(--card-hover);
  color: var(--ink);
  border-color: var(--ink-secondary);
}

/* Profile */

.profile {
  text-align: center;
}

.avatar {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  margin: 0 auto 16px;
  object-fit: cover;
  box-shadow: var(--shadow);
  border: 3px solid var(--bg);
  outline: 1px solid var(--line);
  transition: transform 180ms ease, box-shadow 180ms ease;
  user-select: none;
}

.avatar:hover {
  box-shadow: var(--shadow-hover);
}

.profile h1 {
  font-size: 1.95rem;
  letter-spacing: -0.035em;
  line-height: 1.15;
  font-weight: 800;
}

.where {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}

/* Live Status Badge */

.now-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 16px auto 0;
  padding: 5px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.83rem;
  color: var(--ink-secondary);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse 2s infinite;
  display: inline-block;
  flex-shrink: 0;
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 5px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.bio {
  margin: 18px auto 0;
  max-width: 28rem;
  color: var(--ink-secondary);
  font-size: 1.05rem;
  line-height: 1.55;
}

/* Social */

.social {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.social a {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink-secondary);
  text-decoration: none;
  transition: all 150ms ease;
}

.social a:hover {
  background: var(--yellow);
  border-color: var(--yellow);
  color: #111111;
  transform: translateY(-1px);
}

.social svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

/* Sections */

.section {
  text-align: left;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-sub {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
}

/* USPs */

.usp-list {
  display: grid;
  gap: 10px;
}

.usp-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 15px;
  transition: background 150ms ease, border-color 150ms ease;
}

.usp-item:hover {
  background: var(--card-hover);
}

.usp-item h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.usp-item p {
  font-size: 0.89rem;
  color: var(--ink-secondary);
  line-height: 1.45;
}

/* Products */

.products {
  display: grid;
  gap: 14px;
}

.product {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.product:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--muted);
}

.product-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.product-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.product-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  background: #111;
  flex-shrink: 0;
}

.product-icon.light {
  background: #eef2ff;
  padding: 6px;
}

[data-theme="dark"] .product-icon.light {
  background: #192233;
}

.product-title {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.product-usp {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
}

.product-go {
  color: var(--muted);
  font-weight: 700;
  font-size: 1.15rem;
  transition: transform 150ms ease, color 150ms ease;
}

.product:hover .product-go {
  color: var(--ink);
  transform: translate(2px, -2px);
}

.product-desc {
  color: var(--ink-secondary);
  font-size: 0.91rem;
  line-height: 1.5;
}

.product-features {
  list-style: none;
  display: grid;
  gap: 5px;
  margin: 4px 0 2px;
  padding: 0;
}

.product-feature-item {
  font-size: 0.83rem;
  color: var(--ink-secondary);
  display: flex;
  align-items: center;
  gap: 7px;
  line-height: 1.4;
}

.product-feature-icon {
  font-size: 0.8rem;
  color: #10b981;
  font-weight: 700;
  flex-shrink: 0;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.product-tag {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--muted);
}

.product-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
  margin-top: 4px;
  transition: color 150ms ease, transform 150ms ease;
}

.product:hover .product-cta {
  color: #2563eb;
  transform: translateX(2px);
}

[data-theme="dark"] .product:hover .product-cta {
  color: #60a5fa;
}

.about-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  display: grid;
  gap: 10px;
}

.about-card p {
  font-size: 0.91rem;
  color: var(--ink-secondary);
  line-height: 1.55;
}

/* Stack Pills */

.stack-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.stack-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-secondary);
}

.stack-pill.highlight {
  background: #fefce8;
  border-color: #fef08a;
  color: #854d0e;
}

[data-theme="dark"] .stack-pill.highlight {
  background: #2a2208;
  border-color: #71520e;
  color: #fef08a;
}

/* Footer */

.site-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ink);
}

/* Contact Page specific */

.lede {
  color: var(--ink-secondary);
  font-size: 1.05rem;
}

.contact-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.contact-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  text-decoration: none;
  transition: all 150ms ease;
}

.contact-item:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--muted);
}

.contact-item small {
  color: var(--muted);
}

/* --- 5. COMMAND PALETTE MODAL --- */

.cmd-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
}

.cmd-modal.open {
  display: flex;
}

.cmd-backdrop {
  position: fixed;
  inset: 0;
  background: var(--backdrop);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fadeIn 150ms ease-out;
}

.cmd-card {
  position: relative;
  z-index: 1001;
  width: min(520px, calc(100% - 32px));
  background: var(--modal-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover), 0 20px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  animation: scaleUp 180ms cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.96) translateY(-8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.cmd-header {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  gap: 10px;
}

.cmd-search-icon {
  width: 18px;
  height: 18px;
  color: var(--muted);
  flex-shrink: 0;
}

.cmd-input {
  width: 100%;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  outline: none;
}

.cmd-input::placeholder {
  color: var(--muted);
}

.cmd-list {
  list-style: none;
  max-height: 320px;
  overflow-y: auto;
  padding: 8px;
}

.cmd-group-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding: 8px 10px 4px;
}

.cmd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 120ms ease;
  user-select: none;
}

.cmd-item.selected,
.cmd-item:hover {
  background: var(--card-hover);
}

.cmd-item-icon {
  font-size: 1.1rem;
  width: 24px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.cmd-item-text {
  flex-grow: 1;
}

.cmd-item-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
}

.cmd-item-desc {
  font-size: 0.78rem;
  color: var(--muted);
}

.cmd-item-enter {
  font-size: 0.8rem;
  color: var(--muted);
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--card);
  border: 1px solid var(--line);
}

.cmd-empty {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.cmd-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  background: var(--card);
  font-size: 0.75rem;
  color: var(--muted);
}

.cmd-footer-shortcuts {
  display: flex;
  gap: 12px;
}

.cmd-footer-shortcuts span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cmd-footer-shortcuts kbd {
  font-family: inherit;
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 1px 4px;
  border-radius: 4px;
}

/* --- 6. TOAST FEEDBACK --- */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  background: var(--ink);
  color: var(--bg);
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), opacity 200ms ease;
  z-index: 2000;
  max-width: 90vw;
  text-align: center;
}

.toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .product, .pulse-dot, .cmd-card, .cmd-backdrop, .toast { transition: none; animation: none; }
}
