/* ============================================================
   Stephen Dev — Minimal Typewriter Theme
   Black & white only. No gradients. Monospace throughout.
   ============================================================ */

:root {
  --ink: #111111;        /* near-black ink */
  --ink-soft: #444444;   /* faded ink */
  --ink-faint: #777777;  /* very faded */
  --paper: #f4f1ea;      /* off-white paper */
  --paper-pure: #ffffff; /* white card */
  --line: #111111;       /* rule lines */
  --line-soft: #cfc9bd;  /* soft divider */
  --select: #111111;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Courier Prime", "Courier New", monospace;
  background-color: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  font-size: 17px;
  letter-spacing: 0.2px;
  /* faint ruled-paper texture via solid SVG lines — no gradients, no blends */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Crect width='32' height='32' fill='%23f4f1ea'/%3E%3Crect y='31' width='32' height='1' fill='%23111111' fill-opacity='0.05'/%3E%3C/svg%3E");
  background-size: 32px 32px;
  min-height: 100vh;
  overflow-x: hidden;
}

::selection {
  background: var(--select);
  color: var(--paper);
}

a {
  color: var(--ink);
  text-decoration: none;
}

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

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: "Special Elite", "Courier Prime", monospace;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 1px;
}

.mono {
  font-family: "Courier Prime", monospace;
}

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: 940px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 88px 0;
  border-bottom: 1px dashed var(--line-soft);
}

.eyebrow {
  font-family: "Courier Prime", monospace;
  text-transform: uppercase;
  letter-spacing: 4px;
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--ink);
  display: inline-block;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 2px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  font-family: "Special Elite", monospace;
  font-size: 20px;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand .blink {
  color: var(--ink);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--ink-soft);
  position: relative;
  padding-bottom: 3px;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--ink);
  transition: width 0.2s ease;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--line);
  color: var(--ink);
  width: 42px;
  height: 42px;
  font-size: 18px;
  cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Courier Prime", monospace;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 14px 26px;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.btn:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn:active {
  transform: translateY(1px);
}

.btn-solid {
  background: var(--ink);
  color: var(--paper);
}

.btn-solid:hover {
  background: var(--paper);
  color: var(--ink);
}

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 88px;
  border-bottom: 2px solid var(--line);
}

.hero .type-line {
  font-family: "Courier Prime", monospace;
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 26px;
}

.hero h1 {
  font-size: clamp(40px, 8vw, 80px);
  line-height: 1.05;
  margin-bottom: 24px;
}

.hero h1 .cursor {
  display: inline-block;
  width: 0.6ch;
  background: var(--ink);
  color: transparent;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.blink {
  animation: blink 1s steps(1) infinite;
}

.hero p.lead {
  font-size: 19px;
  max-width: 620px;
  color: var(--ink-soft);
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 44px;
}

.hero-meta {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  padding-top: 32px;
  border-top: 1px dashed var(--line-soft);
}

.hero-meta .stat {
  display: flex;
  flex-direction: column;
}

.hero-meta .stat b {
  font-family: "Special Elite", monospace;
  font-size: 30px;
  font-weight: 400;
}

.hero-meta .stat span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--ink-faint);
}

/* ---------- Section heading ---------- */
.section-head {
  margin-bottom: 52px;
}

.section-head h2 {
  font-size: clamp(28px, 5vw, 44px);
}

.section-head p {
  color: var(--ink-soft);
  max-width: 640px;
  margin-top: 14px;
}

/* ---------- Services grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0;
  border: 2px solid var(--line);
}

.card {
  padding: 34px 30px;
  border-right: 1px dashed var(--line-soft);
  border-bottom: 1px dashed var(--line-soft);
  background: var(--paper);
  transition: background 0.2s ease, color 0.2s ease;
}

.card:hover {
  background: var(--ink);
  color: var(--paper);
}

.card:hover .card-num,
.card:hover p,
.card:hover .card-icon {
  color: var(--paper);
}

.card-icon {
  font-size: 28px;
  margin-bottom: 20px;
  color: var(--ink);
}

.card-num {
  font-family: "Courier Prime", monospace;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--ink-faint);
  margin-bottom: 10px;
}

.card h3 {
  font-size: 21px;
  margin-bottom: 12px;
}

.card p {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.65;
}

/* ---------- Tech / stack list ---------- */
.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.stack .chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 2px solid var(--line);
  padding: 10px 16px;
  font-size: 14px;
  letter-spacing: 1px;
  transition: background 0.15s ease, color 0.15s ease;
}

.stack .chip:hover {
  background: var(--ink);
  color: var(--paper);
}

.stack .chip i {
  font-size: 17px;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.about-grid p {
  margin-bottom: 18px;
  color: var(--ink-soft);
}

.about-grid p strong {
  color: var(--ink);
}

.principles {
  list-style: none;
}

.principles li {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px dashed var(--line-soft);
  align-items: flex-start;
}

.principles li i {
  color: var(--ink);
  margin-top: 4px;
}

.principles li b {
  font-family: "Special Elite", monospace;
  font-weight: 400;
  display: block;
  margin-bottom: 2px;
}

.principles li span {
  font-size: 14px;
  color: var(--ink-soft);
}

/* ---------- Contact ---------- */
.contact {
  text-align: center;
}

.contact h2 {
  font-size: clamp(30px, 6vw, 52px);
  margin-bottom: 20px;
}

.contact p.lead {
  color: var(--ink-soft);
  max-width: 560px;
  margin: 0 auto 36px;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: "Special Elite", monospace;
  font-size: clamp(18px, 4vw, 28px);
  border: 2px solid var(--line);
  padding: 18px 30px;
  margin-bottom: 34px;
  transition: background 0.15s ease, color 0.15s ease;
  word-break: break-all;
}

.contact-email:hover {
  background: var(--ink);
  color: var(--paper);
}

.socials {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 8px;
}

.socials a {
  width: 52px;
  height: 52px;
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.socials a:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-3px);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 2px solid var(--line);
  padding: 46px 0;
  background: var(--paper);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-inner .brand {
  font-size: 18px;
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--ink-soft);
}

.footer-links a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.footer-copy {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px dashed var(--line-soft);
  font-size: 13px;
  color: var(--ink-faint);
  letter-spacing: 1px;
}

/* ---------- Legal / document pages ---------- */
.doc-hero {
  padding: 72px 0 40px;
  border-bottom: 2px solid var(--line);
}

.doc-hero h1 {
  font-size: clamp(34px, 7vw, 58px);
  margin-bottom: 14px;
}

.doc-hero .updated {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--ink-faint);
}

.doc {
  padding: 56px 0 88px;
}

.doc-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 56px;
  align-items: start;
}

.toc {
  position: sticky;
  top: 90px;
  border: 2px solid var(--line);
  padding: 22px;
}

.toc h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
  color: var(--ink);
}

.toc ol {
  list-style: none;
  counter-reset: toc;
}

.toc ol li {
  counter-increment: toc;
  margin-bottom: 11px;
}

.toc ol li a {
  font-size: 13px;
  color: var(--ink-soft);
  display: flex;
  gap: 8px;
}

.toc ol li a::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--ink-faint);
}

.toc ol li a:hover {
  color: var(--ink);
}

.doc-body h2 {
  font-size: 24px;
  margin: 44px 0 16px;
  padding-top: 20px;
  border-top: 1px dashed var(--line-soft);
  scroll-margin-top: 90px;
}

.doc-body h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.doc-body h3 {
  font-size: 18px;
  margin: 26px 0 10px;
}

.doc-body p {
  margin-bottom: 16px;
  color: var(--ink-soft);
}

.doc-body ul {
  margin: 0 0 18px 22px;
  color: var(--ink-soft);
}

.doc-body ul li {
  margin-bottom: 9px;
}

.doc-body a.inline {
  text-decoration: underline;
  color: var(--ink);
}

.doc-body strong {
  color: var(--ink);
}

.callout {
  border: 2px solid var(--line);
  padding: 22px 24px;
  margin: 26px 0;
  background: var(--paper-pure);
  display: flex;
  gap: 16px;
}

.callout i {
  font-size: 20px;
  margin-top: 3px;
}

.callout p {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
}

/* ---------- 404 ---------- */
.notfound {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
}

.notfound h1 {
  font-size: clamp(70px, 20vw, 160px);
  line-height: 1;
  margin-bottom: 18px;
}

.notfound p {
  color: var(--ink-soft);
  margin-bottom: 30px;
  max-width: 460px;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 780px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 2px solid var(--line);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-links.open {
    max-height: 420px;
  }

  .nav-links li {
    width: 100%;
    border-bottom: 1px dashed var(--line-soft);
  }

  .nav-links a {
    display: block;
    padding: 18px 24px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .doc-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .toc {
    position: static;
  }

  section {
    padding: 64px 0;
  }

  .hero-meta {
    gap: 26px;
  }
}
