/* ============================================================
   William W. Cobb III — personal brand site
   Dark, technical, modern
   ============================================================ */

:root {
  --bg:        #0a0b0e;
  --bg-2:      #101218;
  --card:      #14171f;
  --card-2:    #1a1e28;
  --line:      #242a36;
  --line-2:    #2f3848;
  --text:      #e8ecf2;
  --muted:     #9aa6b8;
  --faint:     #6b7688;
  --accent:    #2dd4bf;   /* teal */
  --accent-2:  #38bdf8;   /* cyan-blue */
  --accent-3:  #a78bfa;   /* violet */
  --glow:      rgba(45, 212, 191, 0.35);
  --maxw:      1120px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

/* subtle grid + glow background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 600px at 80% -10%, rgba(56,189,248,0.10), transparent 60%),
    radial-gradient(800px 600px at 0% 10%, rgba(45,212,191,0.08), transparent 55%);
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.18;
  mask-image: radial-gradient(ellipse 100% 70% at 50% 0%, #000 30%, transparent 80%);
  pointer-events: none;
}

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

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

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

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(10, 11, 14, 0.72);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: .3px;
  color: var(--text);
  font-size: 16px;
}
.brand:hover { color: var(--text); }
.brand .mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: grid; place-items: center;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
  color: #051014;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 18px var(--glow);
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
}
.nav-links a:hover { color: var(--text); background: var(--card); }
.nav-links a.active { color: var(--accent); }
.nav-cta {
  margin-left: 8px;
  border: 1px solid var(--line-2);
  color: var(--text) !important;
}
.nav-cta:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line-2);
  color: var(--text); border-radius: 8px;
  width: 40px; height: 40px; cursor: pointer; font-size: 18px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 15px;
  padding: 12px 20px; border-radius: 10px;
  cursor: pointer; border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04131a;
  box-shadow: 0 6px 24px -6px var(--glow);
}
.btn-primary:hover { color: #04131a; transform: translateY(-2px); box-shadow: 0 10px 30px -6px var(--glow); }
.btn-ghost {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line-2);
}
.btn-ghost:hover { color: var(--text); border-color: var(--accent); }

/* ---------- Typography helpers ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
  display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow::before {
  content: ""; width: 22px; height: 1px; background: var(--accent); display: inline-block;
}
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 800; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: 1.25rem; font-weight: 700; }
.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted); max-width: 60ch; }
.gradient-text {
  background: linear-gradient(120deg, var(--accent), var(--accent-2) 50%, var(--accent-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Sections ---------- */
section { padding: 84px 0; }
.section-head { max-width: 64ch; margin-bottom: 48px; }
.section-head .lead { margin-top: 12px; }

/* ---------- Hero ---------- */
.hero { padding: 96px 0 72px; position: relative; }
.hero-grid {
  display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 56px; align-items: center;
}
.hero h1 { margin-bottom: 20px; }
.hero .lead { margin-bottom: 32px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-meta {
  margin-top: 36px; display: flex; gap: 28px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 13px; color: var(--faint);
}
.hero-meta b { color: var(--text); font-weight: 600; display: block; font-size: 20px; font-family: var(--sans); }

/* portrait / avatar card */
.portrait {
  position: relative;
  border-radius: 18px;
  padding: 8px;
  background: linear-gradient(160deg, var(--line-2), transparent 60%);
  border: 1px solid var(--line);
}
.portrait-inner {
  border-radius: 12px; overflow: hidden; aspect-ratio: 1/1;
  background: radial-gradient(circle at 50% 30%, #1b2230, #0c0e13);
  display: grid; place-items: center; position: relative;
}
.portrait-inner img { width: 100%; height: 100%; object-fit: cover; }
.portrait .badge {
  position: absolute; bottom: 14px; left: 14px;
  background: rgba(10,11,14,.78); backdrop-filter: blur(6px);
  border: 1px solid var(--line-2); border-radius: 999px;
  padding: 7px 14px; font-family: var(--mono); font-size: 12px; color: var(--accent);
  display: flex; align-items: center; gap: 8px;
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--glow); animation: pulse 2s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 var(--glow);} 70%{box-shadow:0 0 0 10px transparent;} 100%{box-shadow:0 0 0 0 transparent;} }

/* monogram fallback */
.monogram {
  font-family: var(--mono); font-weight: 700; font-size: 4rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: linear-gradient(180deg, var(--card), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.card:hover { border-color: var(--line-2); transform: translateY(-3px); box-shadow: 0 14px 40px -20px rgba(0,0,0,.8); }
.card .ico {
  width: 44px; height: 44px; border-radius: 11px; margin-bottom: 16px;
  display: grid; place-items: center; font-size: 20px;
  background: var(--card-2); border: 1px solid var(--line-2); color: var(--accent);
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); margin: 0; font-size: 15.5px; }

/* ---------- Tag / chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-family: var(--mono); font-size: 12.5px;
  color: var(--muted); background: var(--card);
  border: 1px solid var(--line); border-radius: 7px;
  padding: 6px 11px;
}
.chip.hot { color: var(--accent); border-color: rgba(45,212,191,.4); }

/* ---------- Logo strip ---------- */
.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 28px 0; }
.strip-label { font-family: var(--mono); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); margin-bottom: 16px; text-align:center;}
.strip-row { display: flex; flex-wrap: wrap; gap: 14px 30px; justify-content: center; align-items: center; }
.strip-row span { font-weight: 700; color: var(--muted); font-size: 17px; letter-spacing: .3px; }

/* ---------- Timeline (Work) ---------- */
.timeline { position: relative; margin-top: 20px; }
.timeline::before {
  content: ""; position: absolute; left: 13px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(var(--accent), transparent);
}
.tl-item { position: relative; padding: 0 0 36px 48px; }
.tl-item::before {
  content: ""; position: absolute; left: 6px; top: 6px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent); box-shadow: 0 0 12px var(--glow);
}
.tl-item .role { font-size: 1.15rem; font-weight: 700; color: var(--text); }
.tl-item .org { color: var(--accent); font-weight: 600; }
.tl-item .when { font-family: var(--mono); font-size: 12.5px; color: var(--faint); margin: 2px 0 10px; }
.tl-item p { color: var(--muted); margin: 0 0 10px; font-size: 15.5px; }

/* ---------- Stats band ---------- */
.band {
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; text-align: center; }
.stat .num { font-size: clamp(2rem,4vw,2.8rem); font-weight: 800; }
.stat .lbl { color: var(--muted); font-size: 14.5px; }

/* ---------- Blog ---------- */
.post-card { display: flex; flex-direction: column; height: 100%; }
.post-card .kicker { font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: .5px; text-transform: uppercase; }
.post-card h3 { margin: 10px 0; }
.post-card .excerpt { color: var(--muted); font-size: 15px; flex: 1; }
.post-card .more { margin-top: 16px; font-family: var(--mono); font-size: 13px; }

/* article */
.article { max-width: 760px; margin: 0 auto; }
.article .meta { font-family: var(--mono); font-size: 13px; color: var(--faint); margin-bottom: 8px; }
.article h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 16px; }
.article p { color: #cdd5e1; margin: 0 0 20px; }
.article h2 { font-size: 1.6rem; margin: 40px 0 14px; }
.article h3 { margin: 28px 0 10px; }
.article ul, .article ol { color: #cdd5e1; padding-left: 22px; margin: 0 0 20px; }
.article li { margin-bottom: 8px; }
.article blockquote {
  border-left: 3px solid var(--accent); margin: 24px 0; padding: 6px 0 6px 20px;
  color: var(--muted); font-style: italic;
}
.article code {
  font-family: var(--mono); font-size: .9em; background: var(--card);
  border: 1px solid var(--line); border-radius: 5px; padding: 2px 6px; color: var(--accent-2);
}
.article pre {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 18px; overflow-x: auto; margin: 0 0 24px;
}
.article pre code { background: none; border: none; padding: 0; color: #cdd5e1; }

/* ---------- CTA panel ---------- */
.cta-panel {
  background: linear-gradient(135deg, rgba(45,212,191,.10), rgba(56,189,248,.08));
  border: 1px solid var(--line-2); border-radius: 18px;
  padding: 56px 40px; text-align: center;
}
.cta-panel h2 { margin-bottom: 14px; }
.cta-panel .lead { margin: 0 auto 28px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin-bottom: 7px; text-transform: uppercase; letter-spacing: .5px; }
.field input, .field textarea {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line-2);
  border-radius: 10px; padding: 12px 14px; color: var(--text);
  font-family: var(--sans); font-size: 15px;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(45,212,191,.15); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-list .ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line-2); color: var(--accent); flex: none; }
.contact-list .k { font-family: var(--mono); font-size: 12px; color: var(--faint); text-transform: uppercase; }
.contact-list .v { color: var(--text); font-weight: 500; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 48px 0 40px; margin-top: 40px; }
.footer-grid { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; align-items: flex-start; }
.footer .brand { margin-bottom: 12px; }
.footer p { color: var(--faint); font-size: 14.5px; max-width: 38ch; margin: 0; }
.footer-links { display: flex; gap: 40px; flex-wrap: wrap; }
.footer-col h4 { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--faint); margin: 0 0 12px; }
.footer-col a { display: block; color: var(--muted); font-size: 14.5px; padding: 4px 0; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; color: var(--faint); font-size: 13.5px; font-family: var(--mono); }

/* ---------- Reveal animation ---------- */
/* Only hide when JS is active (html.js); otherwise content is always visible. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .portrait { max-width: 360px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2,1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: var(--bg-2); border-bottom: 1px solid var(--line);
    padding: 12px; gap: 4px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; }
  .nav-toggle { display: grid; place-items: center; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  section { padding: 60px 0; }
  .cta-panel { padding: 40px 22px; }
}
