/* Info-Matic: dark charcoal with the Info-Matic green from the logo and business card. System fonts only. */

:root {
  --bg: #070a08;
  --bg-alt: #0b0f0c;
  --panel: rgba(20, 26, 22, 0.6);
  --panel-solid: #111612;
  --border: rgba(38, 48, 41, 0.9);
  --text: #e3e8e4;
  --heading: #f6f8f6;
  --muted: #9ba59e;
  --accent: #00b600;       /* old info-matic.net green: links, labels */
  --accent-strong: #008000;/* business card green: buttons (white text) */
  --brand: #008d00;        /* logo green: button hover */
  --accent-light: #6fdc6f;
  --accent-soft: rgba(0, 182, 0, 0.12);
  --radius: 14px;
  --max: 1180px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(0, 182, 0, 0.25); color: #eaffea; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: #4fd34f; }
h1, h2, h3 { color: var(--heading); line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 750; max-width: 22ch; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--accent-strong); color: #fff; padding: 8px 12px; border-radius: 8px; }
.skip-link:focus { left: 8px; z-index: 50; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Placeholders the owner must fill in */
.todo { background: #fde68a; color: #422006; padding: 0.05em 0.4em; border-radius: 4px; font-size: 0.85em; font-weight: 600; }
.todo-note { margin-top: -0.5em; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.4em;
  padding: 0.75em 1.3em; border-radius: 10px;
  background: var(--accent-strong); color: #fff; font-weight: 700;
  border: 1px solid var(--accent-strong);
  transition: background 0.15s, transform 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--brand); border-color: var(--brand); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--heading); border-color: rgba(0, 182, 0, 0.4); }
.btn-sm { padding: 0.45em 0.95em; font-size: 0.92rem; }

/* Labels */
.label, .eyebrow, .tag, .when {
  font-family: var(--mono); font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent);
}
.label { margin-bottom: 0.8em; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6em;
  padding: 0.4em 0.9em; border-radius: 999px;
  border: 1px solid rgba(0, 182, 0, 0.25); background: var(--accent-soft);
  margin-bottom: 1.6em;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(0, 182, 0, 0.6); animation: pulse 2.2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(0, 182, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 182, 0, 0); } }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(7, 10, 8, 0.72);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: var(--heading); letter-spacing: -0.01em; }
.brand:hover { color: var(--heading); }
.brand img { display: block; height: 46px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a:not(.btn) { color: var(--muted); font-size: 0.95rem; font-weight: 500; }
.nav-links a:not(.btn):hover { color: var(--heading); }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: 8px; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 20px; height: 2px; margin: 4px 0; background: var(--text); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 96px 0 56px; border-bottom: 1px solid var(--border); }
.hero-net { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,10,8,0) 40%, var(--bg) 100%); pointer-events: none; }
.net-lines path { fill: none; stroke: rgba(0, 182, 0, 0.16); stroke-width: 1.2; }
.net-nodes circle { fill: #0d260d; stroke: rgba(0, 182, 0, 0.55); stroke-width: 1.2; }
.net-packets circle { fill: var(--accent); filter: drop-shadow(0 0 6px rgba(0, 182, 0, 0.9)); }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.grad { background: linear-gradient(90deg, var(--accent), var(--accent-light)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 56ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.terminal {
  background: rgba(7, 10, 8, 0.85); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 30px 80px -30px rgba(0, 141, 0, 0.35);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
}
.term-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--border); background: rgba(20, 26, 22, 0.7); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2f3a33; }
.term-bar i:first-child { background: var(--accent); }
.term-bar span { margin-left: 8px; font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.terminal pre { margin: 0; padding: 18px 20px 22px; font-family: var(--mono); font-size: 0.82rem; line-height: 1.75; color: var(--text); overflow-x: auto; }
.c-mute { color: #6f7a72; }
.c-ok { color: var(--accent); }
.cursor { display: inline-block; width: 8px; height: 1.05em; margin-left: 4px; vertical-align: text-bottom; background: var(--accent); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 72px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.stats div { background: rgba(7, 10, 8, 0.82); padding: 20px 22px; }
.stats strong { display: block; color: var(--heading); font-size: 1.15rem; }
.stats span { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }

/* Sections */
.section { padding: 96px 0; }
.section.alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

.cards { display: grid; gap: 20px; margin-top: 36px; }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.card:hover { border-color: rgba(0, 182, 0, 0.35); box-shadow: 0 20px 50px -30px rgba(0, 141, 0, 0.5); }
.card p { color: var(--muted); }
.card p:last-child { margin-bottom: 0; }
.icon { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 10px; background: var(--accent-soft); border: 1px solid rgba(0, 182, 0, 0.25); color: var(--accent); font-family: var(--mono); font-weight: 700; }

/* Portfolio */
.project { padding: 0; align-self: start; }
.project summary { list-style: none; cursor: pointer; padding: 26px; }
.project summary::-webkit-details-marker { display: none; }
.project .tag { display: block; margin-bottom: 14px; font-size: 0.7rem; }
.project .more { font-size: 0.9rem; font-weight: 600; color: var(--accent); }
.project .more::after { content: " +"; }
.project[open] .more::after { content: " −"; }
.project-body { padding: 0 26px 26px; border-top: 1px solid var(--border); margin-top: -4px; padding-top: 18px; }
.project-body dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 0; font-size: 0.9rem; }
.project-body dt { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: #6f7a72; padding-top: 3px; }
.project-body dd { margin: 0; color: var(--text); }

/* Featured project */
.featured { display: grid; grid-template-columns: 1.5fr 1fr; gap: 36px; align-items: center; margin-top: 36px; padding: 36px; background: linear-gradient(135deg, rgba(0, 141, 0, 0.14), var(--panel) 55%); border-color: rgba(0, 182, 0, 0.3); }
.featured .tag { display: block; margin-bottom: 14px; font-size: 0.7rem; }
.featured h3 { font-size: 1.8rem; margin-bottom: 0.2em; }
.card .featured-lead { color: var(--accent); font-weight: 600; font-size: 1.1rem; }
.featured-side { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.facts { display: grid; gap: 1px; width: 100%; background: var(--border); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.facts div { background: rgba(7, 10, 8, 0.7); padding: 14px 18px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.facts strong { color: var(--heading); font-size: 1.1rem; }
.facts span { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.featured + .cards { margin-top: 20px; }

/* Skills */
.skills { display: grid; grid-template-columns: 280px 1fr; gap: 20px; margin-top: 28px; }
.skill-list { display: flex; flex-direction: column; gap: 6px; }
.skill-list button {
  text-align: left; font: inherit; font-weight: 600; font-size: 0.98rem;
  padding: 12px 16px; border-radius: 10px; cursor: pointer;
  color: var(--muted); background: transparent; border: 1px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.skill-list button:hover { color: var(--heading); background: rgba(20, 26, 22, 0.6); }
.skill-list button[aria-selected="true"] { color: var(--heading); background: var(--accent-soft); border-color: rgba(0, 182, 0, 0.35); }
.skill-list button[aria-selected="true"]::before { content: "▸ "; color: var(--accent); }
.skill-panel { min-height: 220px; }
.skill-panel[hidden] { display: none; }
.skill-panel h3 { font-size: 1.5rem; }
.chips { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-family: var(--mono); font-size: 0.78rem; padding: 5px 11px; border-radius: 7px; background: var(--panel-solid); border: 1px solid var(--border); color: var(--text); }

/* Timeline */
.timeline { list-style: none; padding: 0; margin: 40px 0 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--accent-strong), rgba(0, 141, 0, 0.1)); }
.timeline li { position: relative; padding-left: 40px; margin-bottom: 34px; max-width: 760px; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.timeline li.now::before { background: var(--accent); box-shadow: 0 0 0 6px var(--accent-soft); }
.timeline h3 { margin: 4px 0 6px; }
.timeline p { color: var(--muted); margin: 0; }

/* Contact */
.contact { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; padding: 44px; background: linear-gradient(135deg, rgba(0, 141, 0, 0.12), rgba(20, 26, 22, 0.6) 55%); }
.contact h2 { margin-bottom: 0.3em; }
.contact-links { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }

/* Text pages (privacy) */
.prose { max-width: 760px; }
.prose h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); }
.prose h2 { font-size: 1.3rem; max-width: none; margin-top: 2em; }

/* Footer */
.footer { padding: 30px 0; font-size: 0.88rem; color: #6f7a72; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.footer p { margin: 0; }
.footer nav { display: flex; gap: 20px; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--accent); }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid, .contact, .skills, .featured { grid-template-columns: 1fr; }
  .cards.three { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .contact-links { justify-content: flex-start; }
  .skill-list { flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 18px;
    background: rgba(7, 10, 8, 0.97); border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-links a:not(.btn) { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav-links .btn { margin-top: 14px; justify-content: center; }
  .hero { padding: 64px 0 40px; }
  .section { padding: 68px 0; }
  .contact, .featured { padding: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .net-packets { display: none; }
}
