/* CREDA Systems — Institutional A/B Hybrid (quiet authority) */

:root{
  --bg: #111418;          /* deep charcoal */
  --surface: #161b22;     /* lifted panels */
  --text: #e7ebf0;        /* primary text */
  --muted: #aeb6c2;       /* secondary text */
  --line: rgba(255,255,255,0.08);
  --line-2: rgba(255,255,255,0.12);
  --accent: #8fa3bf;      /* restrained steel */
  --max: 980px;
  --radius: 10px;
}

*{ box-sizing: border-box; }

html, body{ height:100%; }

body{
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.55;
}

/* Optional swirl watermark layer */
body.swirl::before{
  content:"";
  position: fixed;
  inset:0;
  pointer-events:none;
  opacity: 0.06; /* 5–8% */
  background-image: url("/assets/img/swirl.png");
  background-repeat: no-repeat;
  background-position: 85% 20%;
  background-size: 720px auto;
  filter: grayscale(100%);
  z-index: 0;
}

/* Ensure content layers above swirl */
.site-header,
main,
.site-footer{
  position: relative;
  z-index: 1;
}

a{
  color: var(--text);
  text-decoration: none;
}
a:hover{ color: #fff; }
a:focus{
  outline: 2px solid var(--line-2);
  outline-offset: 2px;
}

.container{
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

hr.sep{
  border:0;
  border-top: 1px solid var(--line);
  margin: 28px 0;
}

/* Header */
.site-header{
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(17,20,24,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.navbar{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 18px;
}

.brand{
  display:flex;
  align-items: baseline;
  gap: 10px;
  letter-spacing: 0.02em;
}
.brand a{
  font-weight: 600;
  color: #fff;
}
.brand small{
  color: var(--muted);
  font-weight: 500;
}

.nav{
  display:flex;
  align-items:center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav a{
  color: var(--muted);
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 8px;
}
.nav a:hover{
  color:#fff;
  background: rgba(255,255,255,0.04);
}
.nav a.active{
  color:#fff;
  background: rgba(143,163,191,0.12);
  border: 1px solid rgba(143,163,191,0.22);
}

/* Main */
main{
  padding: 34px 0 56px;
}

.hero h1{
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0 0 10px;
  font-size: clamp(32px, 4vw, 44px);
}

.hero p{
  margin: 0;
  color: var(--muted);
  max-width: 72ch;
  font-size: 16px;
}

.section{
  margin-top: 34px;
}

.section h2{
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-weight: 600;
  font-size: 18px;
  margin: 0 0 10px;
}

.section p{
  margin: 0 0 12px;
  color: var(--muted);
  max-width: 80ch;
}

/* Prevent layout break from long strings */
.content{
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Grid Cards */
.grid-3{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 14px;
}

.card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.card h3{
  margin: 0 0 6px;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-transform: none;
  color:#fff;
  font-family: ui-serif, Georgia, "Times New Roman", serif;
}

.card p{
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* ASCII blocks */
pre{
  margin: 14px 0 0;
  padding: 14px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow:auto;
  color: #dfe6ef;
  font-size: 13px;
  line-height: 1.45;
}

/* Links inside content */
.content a{
  color: var(--accent);
  border-bottom: 1px solid rgba(143,163,191,0.28);
}
.content a:hover{
  color:#fff;
  border-bottom-color: rgba(255,255,255,0.22);
}

/* Footer */
.site-footer{
  border-top: 1px solid var(--line);
  padding: 18px 0 26px;
  color: var(--muted);
  font-size: 13px;
}

.footer-row{
  display:flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-row a{
  color: var(--muted);
}
.footer-row a:hover{
  color:#fff;
}

/* Responsive */
@media (max-width: 860px){
  .grid-3{
    grid-template-columns: 1fr;
  }
  .nav{
    gap: 8px;
  }
  .nav a.active{
    border: 0;
  }
}