/* Robots Drinking Tea — terminal aesthetic */

:root {
  --bg: #0a0e0a;
  --bg-darker: #050705;
  --fg: #c8f7c5;
  --accent: #00ff88;
  --accent-dim: #00b35e;
  --muted: #5a8a5a;
  --error: #ff5c5c;
  --warn: #ffcb6b;
  --border: #1a3a1a;
  --shadow: 0 0 24px rgba(0, 255, 136, 0.08);
  --mono: "Courier New", Courier, "Lucida Console", Monaco, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  text-rendering: geometricPrecision;
  overflow-wrap: break-word;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }

/* CRT scanlines + subtle vignette */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(0, 255, 136, 0.025) 0px,
      rgba(0, 255, 136, 0.025) 1px,
      transparent 1px,
      transparent 3px
    ),
    radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, 0.6) 100%);
  z-index: 1000;
  mix-blend-mode: overlay;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(transparent 50%, rgba(0, 0, 0, 0.15) 50%);
  background-size: 100% 4px;
  z-index: 1001;
  opacity: 0.25;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dashed var(--accent-dim);
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
a:hover, a:focus {
  color: var(--bg);
  background: var(--accent);
  outline: none;
}

::selection { background: var(--accent); color: var(--bg); }

/* Layout */
.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
  position: relative;
  z-index: 2;
}

/* Top bar — terminal window chrome */
.term-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-darker);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}
.term-bar .dots { display: flex; gap: 0.35rem; }
.term-bar .dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: #333; border: 1px solid #222;
}
.term-bar .dot.r { background: #5a2020; border-color: #6a2828; }
.term-bar .dot.y { background: #5a4a20; border-color: #6a5828; }
.term-bar .dot.g { background: #205a28; border-color: #287030; }
.term-bar .title {
  flex: 1;
  min-width: 0;
  text-align: center;
  letter-spacing: 0.05em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.term {
  background: var(--bg-darker);
  border: 1px solid var(--border);
  border-radius: 0 0 6px 6px;
  padding: 1.5rem 1.5rem 2rem;
  box-shadow: var(--shadow);
}

/* Nav */
nav.cmd {
  margin: 1rem 0 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px dashed var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  align-items: baseline;
}
nav.cmd .prompt { color: var(--accent); user-select: none; }
nav.cmd a {
  border-bottom: none;
  padding: 0.1rem 0.4rem;
  border-radius: 2px;
}
nav.cmd a.current {
  background: var(--accent-dim);
  color: var(--bg);
}
nav.cmd a:not(.current)::before { content: "[ "; color: var(--muted); }
nav.cmd a:not(.current)::after  { content: " ]"; color: var(--muted); }

/* Headings */
h1, h2, h3 {
  color: var(--accent);
  margin: 1.5rem 0 1rem;
  letter-spacing: 0.02em;
}
h1 { font-size: 1.35rem; }
h2 { font-size: 1.15rem; margin-top: 2rem; }
h3 { font-size: 1rem; color: var(--fg); }

h1::before, h2::before {
  content: "// ";
  color: var(--muted);
}

p { margin: 0.75rem 0; }

/* ASCII hero */
.ascii {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.05;
  white-space: pre;
  overflow-x: auto;
  margin: 0.5rem 0 1.25rem;
  text-shadow: 0 0 8px rgba(0, 255, 136, 0.35);
}

/* Image hero — replaces ASCII on home */
.hero-img {
  display: block;
  margin: 0.5rem auto 1.25rem;
  width: min(100%, 420px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(0, 255, 136, 0.25));
}

.lede {
  font-size: 1.05rem;
  color: var(--fg);
  border-left: 2px solid var(--accent);
  padding-left: 0.85rem;
  margin: 1rem 0 1.5rem;
}

.tag {
  display: inline-block;
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  padding: 0.1rem 0.5rem;
  margin: 0 0.25rem 0.25rem 0;
  border-radius: 2px;
  font-size: 0.82rem;
}

/* Cursor */
.cursor {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 1s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }

/* Service grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}
.card {
  border: 1px solid var(--border);
  background: rgba(0, 255, 136, 0.02);
  padding: 1rem 1.1rem;
  border-radius: 4px;
  position: relative;
}
.card h3 { margin-top: 0; color: var(--accent); }
.card h3::before { content: "▸ "; color: var(--muted); }
.card p { font-size: 0.93rem; color: var(--fg); }

/* Definition list */
dl.def { margin: 1rem 0; }
dl.def dt { color: var(--accent); margin-top: 0.75rem; }
dl.def dd { margin: 0.1rem 0 0 1.5rem; }
dl.def dt::before { content: "$ "; color: var(--muted); }

/* Lists */
ul.bullets { list-style: none; padding-left: 0; }
ul.bullets li { padding-left: 1.25rem; position: relative; margin: 0.35rem 0; }
ul.bullets li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* Footer */
footer {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}

/* Contact box */
.contact-line {
  background: rgba(0, 255, 136, 0.04);
  border: 1px solid var(--border);
  padding: 0.75rem 1rem;
  margin: 0.5rem 0;
  border-radius: 3px;
}
.contact-line .label { color: var(--muted); }

/* Glitch */
.glitch {
  position: relative;
  display: inline-block;
}
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0; top: 0;
  width: 100%;
  overflow: hidden;
}
.glitch::before {
  color: #ff00aa;
  clip-path: inset(0 0 60% 0);
  transform: translateX(-1px);
  opacity: 0.55;
  animation: glitch1 4s infinite steps(1);
}
.glitch::after {
  color: #00d9ff;
  clip-path: inset(55% 0 0 0);
  transform: translateX(1px);
  opacity: 0.55;
  animation: glitch2 4s infinite steps(1);
}
@keyframes glitch1 {
  0%, 92%, 100% { transform: translateX(-1px); }
  93% { transform: translateX(-3px); }
  94% { transform: translateX(2px); }
  95% { transform: translateX(-1px); }
}
@keyframes glitch2 {
  0%, 92%, 100% { transform: translateX(1px); }
  93% { transform: translateX(3px); }
  94% { transform: translateX(-2px); }
  95% { transform: translateX(1px); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .cursor, .glitch::before, .glitch::after { animation: none; }
  body::before, body::after { display: none; }
}

/* Tablets / small laptops */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  .hero-img { width: min(70%, 360px); }
}

@media (max-width: 720px) {
  .grid { grid-template-columns: 1fr; }
  .hero-img { width: min(75%, 320px); }
  .wrap { padding: 1.1rem 1rem 2.5rem; }
}

/* Phones */
@media (max-width: 600px) {
  html, body { font-size: 15px; }
  .wrap { padding: 0.85rem 0.65rem 2rem; }

  .term { padding: 1rem 0.85rem 1.5rem; }
  .term-bar { padding: 0.4rem 0.55rem; font-size: 0.7rem; gap: 0.4rem; }
  .term-bar .dot { width: 9px; height: 9px; }
  .term-bar > div:last-child { display: none; } /* hide v2026 */

  h1 { font-size: 1.1rem; }
  h2 { font-size: 1.02rem; }
  h3 { font-size: 0.95rem; }
  .lede { font-size: 0.98rem; padding-left: 0.6rem; }

  .ascii { font-size: 0.58rem; }
  .hero-img { width: min(80%, 260px); margin: 0.25rem auto 1rem; }

  nav.cmd { gap: 0.35rem 0.75rem; margin: 0.85rem 0 1.5rem; }
  nav.cmd a { padding: 0.05rem 0.3rem; }

  .card { padding: 0.85rem 0.95rem; }
  .contact-line { padding: 0.6rem 0.75rem; font-size: 0.95rem; }
  .contact-line a { overflow-wrap: anywhere; }

  footer { font-size: 0.78rem; gap: 0.3rem; }
}

/* Very narrow phones (iPhone SE, etc.) */
@media (max-width: 380px) {
  .wrap { padding: 0.75rem 0.5rem 1.5rem; }
  .term { padding: 0.85rem 0.7rem 1.25rem; }
  .term-bar { font-size: 0.62rem; }
  .ascii { font-size: 0.5rem; }
  .hero-img { width: min(85%, 200px); }
  dl.def dd { margin-left: 1rem; }
}
