/* =========================================================
   joebull.org — portfolio styles
   Design: dark, modern, high-contrast, fast (no framework)
   ========================================================= */

:root {
  --bg:        #0b0e14;
  --bg-alt:    #11151f;
  --surface:   #161b27;
  --surface-2: #1c2230;
  --border:    #28303f;
  --text:      #e7ecf3;
  --text-dim:  #9aa6b8;
  --text-mute: #6b7585;
  --accent:    #5eead4;   /* teal */
  --accent-2:  #7c9cff;   /* indigo */
  --accent-grad: linear-gradient(120deg, #5eead4 0%, #7c9cff 100%);
  --radius:    16px;
  --radius-sm: 10px;
  --maxw:      1080px;
  --shadow:    0 18px 48px -20px rgba(0,0,0,.7);
  --font:      'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --mono:      'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

a { color: var(--accent); text-decoration: none; transition: color .15s ease; }
a:hover { color: #fff; }

h1, h2, h3, h4 { line-height: 1.15; margin: 0; letter-spacing: -.02em; }

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

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--accent); color: #0b0e14; padding: 10px 16px; border-radius: 0 0 8px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,14,20,.72);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 10px;
  font-family: var(--mono); font-weight: 700; font-size: .9rem; color: #0b0e14;
  background: var(--accent-grad);
}
.brand-name { font-size: 1.02rem; letter-spacing: -.01em; }

.nav-menu { display: flex; align-items: center; gap: 8px; list-style: none; margin: 0; padding: 0; }
.nav-menu a { color: var(--text-dim); font-weight: 500; font-size: .95rem; padding: 8px 14px; border-radius: 8px; }
.nav-menu a:hover { color: var(--text); background: var(--surface); }
.nav-cta {
  color: #0b0e14 !important; background: var(--accent); font-weight: 600 !important;
}
.nav-cta:hover { background: #fff; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .2s; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: .95rem; padding: 12px 22px; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer; transition: transform .12s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #0b0e14; }
.btn-primary:hover { background: #fff; color: #0b0e14; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { color: var(--text); border-color: var(--accent); }
.btn-small { padding: 9px 16px; font-size: .9rem; }
.btn-lg { padding: 15px 28px; font-size: 1.02rem; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; border-top: 1px solid var(--border); }
.section-alt { background: var(--bg-alt); }
.section-kicker { font-family: var(--mono); color: var(--accent); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 12px; }
.section-title { font-size: clamp(1.7rem, 3.5vw, 2.5rem); margin-bottom: 40px; font-weight: 800; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 104px 0 88px;
  background:
    radial-gradient(900px 500px at 78% -10%, rgba(124,156,255,.16), transparent 60%),
    radial-gradient(700px 480px at 5% 12%, rgba(94,234,212,.12), transparent 55%);
}
.eyebrow {
  display: inline-block; max-width: 100%; font-family: var(--mono); font-size: .82rem; color: var(--accent);
  background: rgba(94,234,212,.08); border: 1px solid rgba(94,234,212,.25);
  padding: 6px 14px; border-radius: 999px; margin: 0 0 26px; line-height: 1.5;
}
.hero h1 { font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 800; letter-spacing: -.03em; }
.hero h1 .accent {
  background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { font-size: clamp(1.05rem, 1.8vw, 1.28rem); color: var(--text-dim); max-width: 660px; margin: 26px 0 34px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 56px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 48px; list-style: none; padding: 0; margin: 0; }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; }
.hero-stats span { color: var(--text-mute); font-size: .9rem; }

/* ---------- Companies strip ---------- */
.companies { padding: 36px 0; border-top: 1px solid var(--border); background: var(--bg-alt); }
.companies-label { text-align: center; font-family: var(--mono); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-mute); margin: 0 0 18px; }
.companies-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 40px; list-style: none; margin: 0; padding: 0; }
.companies-list li { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em; color: var(--text-dim); opacity: .85; transition: color .2s ease, opacity .2s ease; }
.companies-list li:hover { color: var(--text); opacity: 1; }
.company-logo { width: 22px; height: 22px; border-radius: 5px; background: #fff; padding: 2px; object-fit: contain; box-shadow: 0 1px 3px rgba(0,0,0,.4); flex: none; }
.companies-disclaimer { text-align: center; color: var(--text-mute); font-size: .72rem; line-height: 1.5; max-width: 640px; margin: 20px auto 0; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 48px; align-items: start; }
.about-lead p { color: var(--text-dim); font-size: 1.08rem; margin: 0 0 18px; }
.about-lead p:last-child { margin-bottom: 0; }
.about-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; background: var(--border); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.about-facts li { background: var(--surface); padding: 18px 22px; display: flex; flex-direction: column; gap: 4px; }
.about-facts span { font-size: .78rem; color: var(--text-mute); text-transform: uppercase; letter-spacing: .06em; }
.about-facts strong { font-weight: 600; }

/* ---------- Skills ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.skill-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; transition: border-color .2s ease, transform .2s ease;
}
.skill-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.skill-card h3 { font-size: 1.05rem; margin-bottom: 16px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.tag-list li {
  font-family: var(--mono); font-size: .8rem; color: var(--text-dim);
  background: var(--surface-2); border: 1px solid var(--border); padding: 5px 11px; border-radius: 8px;
}
.tag-list.small li { font-size: .76rem; }

/* ---------- Projects ---------- */
.project-feature {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 36px; margin-bottom: 22px; position: relative; overflow: hidden;
  transition: border-color .2s ease;
}
.project-feature::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--accent-grad);
}
.project-feature:hover { border-color: var(--accent); }
.project-tag { font-family: var(--mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin: 0 0 10px; }
.project-body h3 { font-size: 1.55rem; margin-bottom: 12px; }
.project-desc { color: var(--text-dim); max-width: 760px; margin: 0 0 18px; }
.project-links { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 12px; }

.subhead { font-size: 1.15rem; color: var(--text-dim); margin: 56px 0 22px; font-weight: 600; }
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.mini-card {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 22px; color: var(--text); transition: border-color .2s ease, transform .2s ease;
}
.mini-card:hover { border-color: var(--accent); transform: translateY(-3px); color: var(--text); }
.mini-card h4 { font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.mini-card p { color: var(--text-dim); font-size: .92rem; margin: 0; flex: 1; }
.star { font-size: .78rem; color: #f5c451; font-family: var(--mono); }
.mini-lang { font-family: var(--mono); font-size: .76rem; color: var(--text-mute); }
.archive-link { margin-top: 28px; font-family: var(--mono); font-size: .92rem; }

/* ---------- Timeline ---------- */
.timeline { display: grid; gap: 0; border-left: 2px solid var(--border); margin-left: 6px; }
.timeline-item { display: grid; grid-template-columns: 120px 1fr; gap: 24px; padding: 0 0 32px 28px; position: relative; }
.timeline-item::before {
  content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg-alt);
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-when { font-family: var(--mono); font-size: .82rem; color: var(--text-mute); padding-top: 2px; }
.timeline-body h3 { font-size: 1.12rem; margin-bottom: 6px; }
.timeline-body p { color: var(--text-dim); margin: 0; font-size: .96rem; }
.tl-co { color: var(--accent); font-weight: 600; }
.resume-note { margin-top: 34px; color: var(--text-dim); }

/* ---------- Credentials ---------- */
.cred-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cred-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.cred-card h3 { font-size: 1.05rem; margin-bottom: 18px; }
.cred-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.cred-list li { display: flex; flex-direction: column; gap: 2px; padding-left: 18px; position: relative; }
.cred-list li::before { content: ""; position: absolute; left: 0; top: 9px; width: 7px; height: 7px; border-radius: 2px; background: var(--accent-grad); }
.cred-list strong { font-weight: 600; }
.cred-list span { color: var(--text-mute); font-size: .88rem; }
.cred-card-feature { border-color: var(--accent); }
.hl { color: var(--accent); font-weight: 600; }

/* ---------- Contact ---------- */
.contact {
  background:
    radial-gradient(700px 400px at 80% 0%, rgba(124,156,255,.14), transparent 60%),
    radial-gradient(600px 360px at 10% 100%, rgba(94,234,212,.10), transparent 60%),
    var(--bg);
  text-align: center;
}
.contact-inner { max-width: 720px; }
.contact .section-title { margin-bottom: 18px; }
.contact-lede { color: var(--text-dim); font-size: 1.1rem; margin: 0 auto 34px; max-width: 580px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.contact-writing { margin-top: 60px; text-align: left; }
.contact-writing-label { font-family: var(--mono); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-mute); text-align: center; margin: 0 0 22px; }
.writing-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; list-style: none; margin: 0; padding: 0; }
.writing-list a {
  display: flex; flex-direction: column; gap: 10px; height: 100%;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 18px 20px; color: var(--text);
  transition: border-color .2s ease, transform .2s ease;
}
.writing-list a:hover { border-color: var(--accent); transform: translateY(-3px); color: var(--text); }
.writing-title { font-weight: 600; font-size: .98rem; line-height: 1.35; }
.writing-meta { font-family: var(--mono); font-size: .74rem; color: var(--text-mute); margin-top: auto; }
.writing-more { text-align: center; font-family: var(--mono); font-size: .92rem; margin: 24px 0 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-alt); padding: 44px 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-name { margin: 0; font-weight: 700; }
.footer-tag { margin: 0; color: var(--text-mute); font-size: .88rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: var(--text-dim); font-size: .92rem; }
.footer-links a:hover { color: var(--accent); }
.footer-copy { width: 100%; color: var(--text-mute); font-size: .84rem; margin: 8px 0 0; border-top: 1px solid var(--border); padding-top: 22px; }

/* ---------- Doc page (BurnItDown) ---------- */
code {
  font-family: var(--mono); font-size: .88em; color: var(--accent);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 1px 6px; border-radius: 6px;
}
.doc-hero {
  position: relative; overflow: hidden; padding: 76px 0 64px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(900px 500px at 78% -10%, rgba(124,156,255,.16), transparent 60%),
    radial-gradient(700px 480px at 5% 12%, rgba(94,234,212,.12), transparent 55%);
}
.doc-hero-inner { max-width: 820px; }
.doc-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; letter-spacing: -.03em; }
.doc-hero h1 .accent { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.doc-hero .lede code { background: rgba(94,234,212,.08); }
.crumb { font-family: var(--mono); font-size: .82rem; color: var(--text-mute); margin: 0 0 18px; }
.crumb a { color: var(--text-dim); }
.crumb span { margin: 0 8px; }
.doc-quote {
  margin: 26px 0 32px; padding: 16px 22px; max-width: 660px;
  border-left: 3px solid var(--accent); background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text); font-size: 1.08rem; font-style: italic;
}
.doc-lead { color: var(--text-dim); font-size: 1.08rem; max-width: 740px; margin: 0 0 28px; }
.doc-note { color: var(--text-dim); font-size: .98rem; max-width: 740px; margin: 16px 0 0; }
.doc-subhead { font-size: 1.18rem; margin: 38px 0 16px; font-weight: 700; }
.doc-card-p { color: var(--text-dim); font-size: .95rem; margin: 0; }

/* code blocks */
.codeblock {
  background: #0d111a; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 18px 20px; margin: 0 0 10px; overflow-x: auto;
  font-family: var(--mono); font-size: .9rem; line-height: 1.7;
}
.codeblock code { background: none; border: 0; padding: 0; color: var(--text); font-size: inherit; white-space: pre; }
.codeblock .c { color: var(--text-mute); }

/* ordered steps */
.steps { margin: 0; padding-left: 22px; color: var(--text-dim); display: grid; gap: 10px; }
.steps strong { color: var(--text); }

/* spec / reference tables */
.spec-table { width: 100%; border-collapse: collapse; margin: 4px 0 0; font-size: .94rem; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.spec-table th, .spec-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.spec-table thead th { background: var(--surface-2); color: var(--text); font-weight: 600; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; }
.spec-table tbody tr { background: var(--surface); }
.spec-table tbody tr:last-child td { border-bottom: 0; }
.spec-table td { color: var(--text-dim); }
.spec-table td:first-child { color: var(--text); font-weight: 500; }
.spec-table code { font-size: .85em; }

/* screenshots */
.shots { display: grid; gap: 22px; }
.shots-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.shot { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.shot-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.shot-bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--border); flex: none; }
.shot-bar span:nth-child(1) { background: #ff5f57; }
.shot-bar span:nth-child(2) { background: #febc2e; }
.shot-bar span:nth-child(3) { background: #28c840; }
.shot-bar em { font-style: normal; font-family: var(--mono); font-size: .76rem; color: var(--text-mute); margin-left: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shot-view { background: var(--bg); }
.shot-view img { display: block; width: 100%; height: auto; }
.shot-view-tall { max-height: 560px; overflow-y: auto; }
.shot figcaption { padding: 14px 18px; color: var(--text-dim); font-size: .9rem; border-top: 1px solid var(--border); }
.shot-hint { color: var(--text-mute); }

/* FAQ / troubleshooting */
.faq { display: grid; gap: 12px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 2px 20px; }
.faq-item summary { cursor: pointer; padding: 15px 0; font-weight: 600; color: var(--text); list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "+"; display: inline-block; width: 20px; color: var(--accent); font-family: var(--mono); }
.faq-item[open] summary::before { content: "\2013"; }
.faq-item > p { color: var(--text-dim); margin: 0 0 14px; }
.faq-item .codeblock { margin: 0 0 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .skills-grid, .cards-grid, .cred-grid { grid-template-columns: repeat(2, 1fr); }
  .shots-row { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--bg-alt); border-bottom: 1px solid var(--border);
    padding: 14px 24px 22px; display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { padding: 12px 14px; }
  .section { padding: 72px 0; }
  .hero { padding: 72px 0 64px; }
  .hero-stats { gap: 28px; }
  .skills-grid, .cards-grid, .cred-grid { grid-template-columns: 1fr; }
  .writing-list { grid-template-columns: 1fr; }
  .timeline-item { grid-template-columns: 78px 1fr; gap: 14px; }
  .project-feature { padding: 26px; }
}
