/* ============================================================
   AdamBytes — style.css
   Base stylesheet. All pages link here.
   index_1 inline styles have been absorbed and extended.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,400;0,600;1,400&family=Lora:ital,wght@0,400;0,600;0,700;1,400&family=Source+Serif+4:ital,wght@0,300;0,400;0,600;1,300;1,400&display=swap');

/* --- Variables --- */
:root {
  --bg:        #0d0b12;
  --bg2:       #110f1a;
  --surface:   #19162200;
  --surface2:  #1e1a2c;
  --border:    #2a2540;
  --border2:   #3d3858;
  --text:      #e8e4f0;
  --muted:     #9d98b0;
  --muted2:    #625d78;
  --white:     #f5f2ff;
  --amber:     #dda030;
  --amber2:    #f0b840;
  --amber-bg:  rgba(221,160,48,0.08);
  --teal:      #38c4a8;
  --teal-bg:   rgba(56,196,168,0.08);
  --red:       #e05c6e;
  --heading:   #f5f2ff;
  /* legacy compat */
  --bg-color:  #0d0b12;
  --card-bg:   #19162280;
  --text-main: #e8e4f0;
  --text-dim:  #9d98b0;
  --accent:    #dda030;
  --border:    #2a2540;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Source Serif 4', Georgia, serif;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(221,160,48,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 50% 30% at 85% 80%, rgba(56,196,168,0.04) 0%, transparent 50%);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: 'Lora', Georgia, serif;
  color: var(--heading);
  line-height: 1.2;
  margin-top: 0;
}

p { margin-bottom: 1.1rem; color: var(--text); }
p:last-child { margin-bottom: 0; }

a {
  color: var(--amber);
  text-decoration: none;
  transition: color 0.15s;
}
a:hover { color: var(--amber2); text-decoration: underline; }

code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85em;
  background: rgba(221,160,48,0.1);
  color: var(--amber2);
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid rgba(221,160,48,0.2);
}

blockquote {
  border-left: 3px solid var(--amber);
  padding: 12px 20px;
  margin: 1.5rem 0;
  background: var(--amber-bg);
  border-radius: 0 6px 6px 0;
}
blockquote p { color: var(--muted); font-style: italic; margin: 0; }

ul, ol {
  padding-left: 1.4rem;
  margin-bottom: 1.1rem;
}
li { margin-bottom: 0.4rem; }

/* --- Header --- */
header {
  text-align: center;
  padding: 2rem 1rem 1.8rem;
  background: linear-gradient(180deg, rgba(25,22,34,0.95) 0%, rgba(13,11,18,0.8) 100%);
  border-bottom: 1px solid var(--border);
  position: relative;
}
header::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  opacity: 0.4;
}



header h1 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.2rem;
}
header h1 span { color: var(--amber); }

nav { margin-top: 0; }
nav a {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 14px;
  font-weight: 600;
  transition: color 0.15s;
  text-decoration: none;
}
nav a:hover { color: var(--white); text-decoration: none; }
nav a.active-nav-link {
  color: var(--amber);
  border-bottom: 1px solid var(--amber);
  padding-bottom: 3px;
}

/* --- Main Layout --- */
main {
  max-width: 780px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

/* --- Section labels (mono eyebrow text) --- */
.section-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted2);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* --- Post cards (index & lab pages) --- */
.post-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  background: rgba(25,22,34,0.6);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px 26px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  text-decoration: none !important;
  transition: border-color 0.2s, transform 0.18s, background 0.2s;
  animation: fadeUp 0.6s ease both;
  opacity: 0;
}
.post-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--amber), transparent 60%);
}
.post-card:hover {
  border-color: var(--border2);
  background: rgba(30,26,44,0.8);
  transform: translateY(-2px);
  text-decoration: none;
}
.post-card:hover .card-title { color: var(--amber); }

.card-meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--amber);
  text-transform: uppercase;
  margin-bottom: 5px;
  opacity: 0.8;
}
.card-title {
  font-family: 'Lora', serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--white);
  line-height: 1.3;
  margin-bottom: 5px;
  transition: color 0.15s;
}
.card-desc {
  font-family: 'Source Serif 4', serif;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}

.card-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: 3px;
  border: 1px solid;
  white-space: nowrap;
  align-self: start;
  margin-top: 2px;
  text-transform: uppercase;
}
.ct-blog  { color: var(--amber); border-color: rgba(221,160,48,0.3); background: var(--amber-bg); }
.ct-htb   { color: var(--teal);  border-color: rgba(56,196,168,0.3); background: var(--teal-bg); }
.ct-otw   { color: var(--muted); border-color: var(--border2); background: rgba(255,255,255,0.02); }
.ct-lab   { color: #a78bfa; border-color: rgba(167,139,250,0.3); background: rgba(167,139,250,0.06); }
.ct-new   { color: var(--teal); border-color: rgba(56,196,168,0.3); background: var(--teal-bg); }

/* stagger */
.post-card:nth-child(1) { animation-delay: 0.10s; }
.post-card:nth-child(2) { animation-delay: 0.18s; }
.post-card:nth-child(3) { animation-delay: 0.26s; }
.post-card:nth-child(4) { animation-delay: 0.34s; }
.post-card:nth-child(5) { animation-delay: 0.42s; }
.post-card:nth-child(6) { animation-delay: 0.50s; }

/* --- Status strip --- */
.status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
  padding: 12px 18px;
  background: rgba(25,22,34,0.7);
  border: 1px solid var(--border);
  border-radius: 8px;
  animation: fadeUp 0.6s 0.12s ease both;
  opacity: 0;
}
.status-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.5px;
  color: var(--muted);
}
.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%; flex-shrink: 0;
}
.sd-on   { background: var(--teal);  box-shadow: 0 0 5px rgba(56,196,168,0.6); }
.sd-prog { background: var(--amber); box-shadow: 0 0 5px rgba(221,160,48,0.5); }
.status-div { width: 1px; background: var(--border2); align-self: stretch; }

/* --- Hero (index page) --- */
.hero {
  padding: 52px 0 36px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
  animation: fadeUp 0.6s ease both;
}
.hero-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 16px;
  opacity: 0.85;
}
.hero-name {
  font-family: 'Lora', serif;
  font-size: clamp(30px, 6vw, 52px);
  font-weight: 700;
  color: var(--white);
  line-height: 1.05;
  letter-spacing: -1px;
  margin-bottom: 20px;
}
.hero-name em { font-style: italic; color: var(--amber); }
.hero-bio {
  font-family: 'Source Serif 4', serif;
  font-size: 15px;
  color: var(--muted);
  max-width: 540px;
  line-height: 1.8;
  margin-bottom: 14px;
}
.hero-bio strong { color: var(--text); font-weight: 600; }
.hero-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 22px 0 26px;
}
.htag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid;
}
.ht-amber { color: var(--amber); border-color: rgba(221,160,48,0.3); background: var(--amber-bg); }
.ht-teal  { color: var(--teal);  border-color: rgba(56,196,168,0.3); background: var(--teal-bg); }
.ht-dim   { color: var(--muted); border-color: var(--border2); background: rgba(255,255,255,0.02); }
.hero-links { display: flex; flex-wrap: wrap; gap: 10px; }
.hlink {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: 5px;
  border: 1.5px solid;
  text-decoration: none;
  display: inline-block;
  transition: all 0.15s;
}
.hlink-solid { background: var(--amber); color: #0d0b12; border-color: var(--amber); font-weight: 600; }
.hlink-solid:hover { background: var(--amber2); border-color: var(--amber2); color: #0d0b12; text-decoration: none; transform: translateY(-1px); }
.hlink-ghost { background: transparent; color: var(--muted); border-color: var(--border2); }
.hlink-ghost:hover { color: var(--white); background: rgba(255,255,255,0.04); text-decoration: none; transform: translateY(-1px); }

/* --- Series header (lab.html) --- */
.series-header {
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
  animation: fadeUp 0.5s ease both;
}
.series-header .eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--teal); margin-bottom: 12px; opacity: 0.9;
}
.series-header h1 {
  font-family: 'Lora', serif;
  font-size: clamp(26px, 5vw, 42px);
  font-weight: 700; color: var(--white); margin-bottom: 14px;
}
.series-header p {
  font-size: 15px; color: var(--muted);
  max-width: 520px; line-height: 1.8; margin-bottom: 0;
}
.phase-badge {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px; letter-spacing: 2px; text-transform: uppercase;
  padding: 4px 12px; border-radius: 20px;
  margin-top: 16px;
  color: var(--teal); border: 1px solid rgba(56,196,168,0.3); background: var(--teal-bg);
}

/* --- Single post pages --- */
.post-header {
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
  animation: fadeUp 0.5s ease both;
}
.post-header .eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--amber); margin-bottom: 12px; opacity: 0.85;
}
.post-header h1 {
  font-family: 'Lora', serif;
  font-size: clamp(24px, 5vw, 38px);
  font-weight: 700; line-height: 1.15;
  color: var(--white); margin-bottom: 16px;
}
.post-header .post-date {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px; letter-spacing: 1px;
  color: var(--muted2);
}

.post-body { animation: fadeUp 0.5s 0.1s ease both; opacity: 0; }
.post-body h2 {
  font-size: 1.4rem; margin: 2.2rem 0 0.8rem;
  padding-top: 1rem; border-top: 1px solid var(--border);
  color: var(--white);
}
.post-body h3 {
  font-size: 1.15rem; margin: 1.8rem 0 0.6rem;
  color: var(--amber);
}
.post-body p { line-height: 1.8; font-size: 15.5px; }
.post-body ul, .post-body ol { font-size: 15.5px; line-height: 1.8; }
.post-body li { margin-bottom: 0.5rem; }

.post-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 3rem; padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px; letter-spacing: 1px;
}
.post-nav a { color: var(--muted); }
.post-nav a:hover { color: var(--amber); text-decoration: none; }

/* --- About page --- */
.about-body { animation: fadeUp 0.5s 0.1s ease both; opacity: 0; }
.about-body h2 { font-size: 1.35rem; margin: 2rem 0 0.7rem; color: var(--white); }
.about-body h3 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; color: var(--amber); }
.about-body p { font-size: 15.5px; line-height: 1.8; }
.about-divider {
  border: none; border-top: 1px solid var(--border); margin: 2rem 0;
}

/* --- Legacy .post-summary (for HTB/OtW pages not yet updated) --- */
.post-summary {
  display: flex; flex-direction: column; gap: 8px;
  background: rgba(25,22,34,0.6);
  padding: 1.5rem; margin-bottom: 1.5rem;
  border-radius: 8px; border: 1px solid var(--border);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.post-summary a {
  display: block !important;
  margin-top: 12px; font-weight: bold; width: fit-content;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
}
.post-summary p { margin: 4px 0; font-size: 14px; }
.single-post { max-width: 780px; }
.single-post h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.single-post h3 { font-size: 1.15rem; margin: 1.5rem 0 0.5rem; color: var(--amber); }
.single-post p { font-size: 15px; line-height: 1.8; }

/* --- Callout box (used in posts) --- */
.callout {
  border-left: 3px solid var(--teal);
  padding: 14px 20px; margin: 1.5rem 0;
  background: var(--teal-bg); border-radius: 0 6px 6px 0;
}
.callout p { color: var(--muted); margin: 0; font-size: 14px; }
.callout strong { color: var(--teal); }

/* --- Animations --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Responsive --- */
@media (max-width: 600px) {
  nav a { margin: 0 8px; font-size: 9px; }
  .post-card { grid-template-columns: 1fr; }
  .card-tag { justify-self: start; }
  .status-strip { flex-direction: column; gap: 8px; }
  .status-div { display: none; }
  .hero-links { flex-direction: column; }
  main { padding: 2rem 1rem 4rem; }
}
