/* WesTek Lab — style.css */
/* ProtIoT-inspired dark theme */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;700&family=IBM+Plex+Sans:wght@300;400;500;600&display=swap');

:root {
  --bg:         #0d0f1a;
  --bg2:        #13162a;
  --bg3:        #1a1e35;
  --border:     #2a2f4a;
  --accent:     #0094ce;
  --accent2:    #00c4ff;
  --green:      #00d4a0;
  --amber:      #f5a623;
  --red:        #e05454;
  --text:       #c8d0e8;
  --text-dim:   #6a7290;
  --text-bright:#eef0f8;
  --mono:       'JetBrains Mono', monospace;
  --sans:       'IBM Plex Sans', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
}

/* ── NAV ─────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,15,26,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-brand {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-bright);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-brand .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  transition: all 0.15s;
  border: 1px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent2);
  border-color: var(--border);
  background: var(--bg2);
}

/* ── HERO ────────────────────────────────── */
.hero {
  padding: 5rem 2rem 4rem;
  max-width: 900px;
  margin: 0 auto;
}

.hero-tag {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-tag::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--accent);
}

h1 {
  font-family: var(--mono);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

h1 span {
  color: var(--accent);
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text);
  max-width: 620px;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.hero-meta {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.hero-meta span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-meta .val {
  color: var(--green);
}

/* ── CARDS ───────────────────────────────── */
.section {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

.section-title {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.2s;
  transform-origin: left;
}

.card:hover {
  border-color: var(--accent);
  background: var(--bg3);
  transform: translateY(-2px);
}

.card:hover::before {
  transform: scaleX(1);
}

.card-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 0.4rem;
}

.card-desc {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.card-arrow {
  position: absolute;
  bottom: 1rem;
  right: 1.25rem;
  color: var(--text-dim);
  font-size: 0.8rem;
  transition: color 0.2s, transform 0.2s;
}

.card:hover .card-arrow {
  color: var(--accent);
  transform: translateX(3px);
}

/* ── LINKS PAGE ──────────────────────────── */
.links-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 640px) {
  .links-grid { grid-template-columns: 1fr; }
}

.link-section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.link-section-header {
  padding: 0.75rem 1.25rem;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.link-section-header .icon {
  font-size: 0.9rem;
}

.link-list {
  list-style: none;
  padding: 0.5rem 0;
}

.link-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.25rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.88rem;
  transition: all 0.15s;
  gap: 1rem;
}

.link-list li a:hover {
  background: var(--bg3);
  color: var(--accent2);
  padding-left: 1.5rem;
}

.link-list li a .link-desc {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-align: right;
  flex-shrink: 0;
}

.link-list li + li {
  border-top: 1px solid var(--border);
}

/* ── NOTES PAGE ──────────────────────────── */
.note-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 2rem 4rem;
}

.note-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.note-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  display: flex;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
}

.note-meta .tag {
  color: var(--accent);
}

.note-content h2 {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-bright);
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.note-content h3 {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--accent);
  margin: 1.5rem 0 0.5rem;
}

.note-content p {
  margin-bottom: 1rem;
  color: var(--text);
}

.note-content ul, 
.note-content ol {
  margin: 0.75rem 0 1rem 1.5rem;
  color: var(--text);
}

.note-content li {
  margin-bottom: 0.3rem;
}

/* Code blocks */
pre {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
  position: relative;
}

pre::before {
  content: attr(data-lang);
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

code {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--green);
}

pre code {
  color: var(--text);
}

/* Inline code */
p code, li code {
  background: var(--bg3);
  padding: 0.1em 0.4em;
  border-radius: 3px;
  border: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--amber);
}

/* Warning/note boxes */
.callout {
  border-left: 3px solid var(--accent);
  background: var(--bg3);
  padding: 0.75rem 1.25rem;
  margin: 1rem 0;
  border-radius: 0 6px 6px 0;
  font-size: 0.88rem;
}

.callout.warn {
  border-color: var(--amber);
}

.callout.critical {
  border-color: var(--red);
}

.callout strong {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 0.3rem;
  color: var(--accent);
}

.callout.warn strong { color: var(--amber); }
.callout.critical strong { color: var(--red); }

/* Wiring table */
.wire-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-family: var(--mono);
  font-size: 0.82rem;
}

.wire-table th {
  text-align: left;
  padding: 0.5rem 1rem;
  background: var(--bg3);
  color: var(--text-dim);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border);
}

.wire-table td {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.wire-table tr:hover td {
  background: var(--bg3);
}

.wire-table td:first-child {
  color: var(--accent2);
}

.wire-table td:last-child {
  color: var(--green);
}

/* Breadcrumb */
.breadcrumb {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  padding: 1rem 2rem;
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb .sep {
  color: var(--border);
}

/* ── FOOTER ──────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}

footer span {
  color: var(--accent);
}

/* ── UTILS ───────────────────────────────── */
.badge {
  display: inline-block;
  padding: 0.15em 0.6em;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge-blue  { background: rgba(0,148,206,0.15); color: var(--accent2); border: 1px solid rgba(0,148,206,0.3); }
.badge-green { background: rgba(0,212,160,0.15); color: var(--green);   border: 1px solid rgba(0,212,160,0.3); }
.badge-amber { background: rgba(245,166,35,0.15); color: var(--amber);  border: 1px solid rgba(245,166,35,0.3); }

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}
