/* ============================================================
   Softralis — terminal aurora design system (dark)
   Palette:
     --void    #0B1120  page background (deep navy-black)
     --panel   #101A2E  cards, terminal
     --line    rgba(255,255,255,0.08) hairlines
     --text    #E6EDF7  primary text
     --slate   #8CA0BD  secondary text
     --teal    #2DE0C8  matrix rain, prompts, accents
     --violet  #8B7CF7  keywords, secondary accent
     --amber   #F5C97B  code strings (small doses only)
   ============================================================ */

:root {
  --void: #0B1120;
  --panel: #101A2E;
  --line: rgba(255, 255, 255, 0.08);
  --text: #E6EDF7;
  --slate: #8CA0BD;
  --teal: #2DE0C8;
  --violet: #8B7CF7;
  --amber: #F5C97B;

  --font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", sans-serif;
  --font-body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, monospace;

  --container: 72rem;
  --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: clip;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--void);
  -webkit-font-smoothing: antialiased;
}

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

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

::selection { background: rgba(45, 224, 200, 0.25); }

/* ---------- type roles ---------- */

.mono {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--slate);
  margin: 0 0 1rem;
}

.prompt { color: var(--teal); }

.section-title,
.hero-brand,
.contact-title {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
}

/* ---------- header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11, 17, 32, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.wordmark {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.wordmark-cursor {
  color: var(--teal);
  animation: blink 1.1s steps(1) infinite;
}

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

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  color: var(--slate);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-menu a:hover { color: var(--teal); }

.nav-cta {
  color: var(--text) !important;
  border: 1px solid rgba(45, 224, 200, 0.5);
  border-radius: 8px;
  padding: 0.45rem 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem !important;
}

.nav-cta:hover {
  background: rgba(45, 224, 200, 0.12);
  border-color: var(--teal);
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 1.4rem;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: 6.5rem 0 6rem;
  overflow: hidden;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  border-bottom: 1px solid var(--line);
}

.rain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.4;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 95%);
  mask-image: linear-gradient(to bottom, #000 30%, transparent 95%);
}

.hero-glow {
  position: absolute;
  width: 60%;
  height: 60%;
  top: -20%;
  right: -10%;
  background: radial-gradient(closest-side, rgba(139, 124, 247, 0.22), transparent);
  filter: blur(40px);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-brand {
  font-size: clamp(3.4rem, 8vw, 5.6rem);
  font-weight: 800;
  background: linear-gradient(100deg, var(--teal) 10%, #6FE7FF 45%, var(--violet) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 26px rgba(45, 224, 200, 0.28));
}

.hero-brand-cursor {
  -webkit-text-fill-color: var(--teal);
  animation: blink 1.1s steps(1) infinite;
}

.hero-sub {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0.75rem 0 0;
}

.hero-lede {
  max-width: 32rem;
  font-size: 1.1rem;
  color: var(--slate);
  margin: 1.25rem 0 2.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

/* ---------- terminal window ---------- */

.terminal {
  background: rgba(13, 21, 38, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow:
    0 0 0 1px rgba(45, 224, 200, 0.06),
    0 24px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
}

.dot-r { background: #FF5F57; }
.dot-y { background: #FEBC2E; }
.dot-g { background: #28C840; }

.terminal-title {
  margin-left: auto;
  color: var(--slate);
  font-size: 0.72rem;
}

.terminal-body {
  margin: 0;
  padding: 1.1rem 1.2rem 1.3rem;
  font-size: 0.8rem;
  line-height: 1.7;
  min-height: 310px;
  white-space: pre;
  overflow: hidden;
  color: var(--text);
}

.t-prompt { color: var(--teal); }
.t-key    { color: var(--violet); }
.t-name   { color: var(--teal); }
.t-str    { color: var(--amber); }
.t-com    { color: #5B6B85; }
.t-ok     { color: var(--teal); }

.t-cursor {
  display: inline-block;
  width: 0.55em;
  height: 1.1em;
  background: var(--teal);
  vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}

/* ---------- aurora rule ---------- */

.aurora-rule {
  height: 1px;
  background: linear-gradient(90deg, var(--teal), var(--violet), transparent 85%);
  opacity: 0.35;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 8px;
  padding: 0.8rem 1.7rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--teal);
  color: #06251F;
  box-shadow: 0 8px 28px rgba(45, 224, 200, 0.25);
}

.btn-primary:hover { background: #4FE9D5; }

.btn-ghost {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-ghost:hover { border-color: var(--teal); }

.btn-aurora {
  background: linear-gradient(100deg, var(--teal), var(--violet));
  color: #0B1120;
  font-family: var(--font-mono);
  font-weight: 600;
  box-shadow: 0 10px 34px rgba(139, 124, 247, 0.3);
}

/* ---------- sections ---------- */

.section { padding: 5.5rem 0; }

.section-title { font-size: clamp(1.9rem, 4.5vw, 2.7rem); }

.section-lede {
  max-width: 36rem;
  color: var(--slate);
  margin: 1.25rem 0 3rem;
}

/* ---------- app cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  border-color: rgba(45, 224, 200, 0.55);
  box-shadow: 0 0 30px rgba(45, 224, 200, 0.1);
  transform: translateY(-3px);
}

.card-tag {
  color: var(--violet);
  font-weight: 500;
  margin: 0;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
}

.card-tag::before { content: "# "; opacity: 0.7; }

.card-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}

.card-desc {
  color: var(--slate);
  margin: 0;
  flex: 1;
}

.card-meta {
  color: var(--slate);
  opacity: 0.7;
  margin: 0.4rem 0 0;
}

.card-invite {
  background: linear-gradient(160deg, var(--panel) 55%, rgba(45, 224, 200, 0.07));
}

.card-link {
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
  margin-top: 0.4rem;
}

.card-link:hover { color: #4FE9D5; }

/* ---------- stack list ---------- */

.stack-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.stack-item {
  display: grid;
  grid-template-columns: 13rem 1fr;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}

.stack-name { font-weight: 500; color: var(--teal); }

.stack-role { color: var(--slate); }

/* ---------- about ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 3rem;
  align-items: start;
}

.about-copy p { color: var(--slate); margin: 0 0 1.2rem; }
.about-copy p:last-child { margin-bottom: 0; }

/* ---------- contact ---------- */

.contact {
  position: relative;
  background: #080D1A;
  border-top: 1px solid var(--line);
  padding: 6.5rem 0;
  overflow: hidden;
}

.contact-glow {
  position: absolute;
  width: 70%;
  height: 90%;
  bottom: -40%;
  left: 15%;
  background: radial-gradient(closest-side, rgba(45, 224, 200, 0.14), transparent);
  filter: blur(30px);
  pointer-events: none;
}

.contact-inner {
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-title { font-size: clamp(2rem, 5vw, 3rem); }

.contact-lede {
  max-width: 32rem;
  color: var(--slate);
  margin: 1.25rem 0 2.25rem;
}

/* ---------- footer ---------- */

.site-footer {
  background: #080D1A;
  color: var(--slate);
  border-top: 1px solid var(--line);
  padding: 1.4rem 0;
}

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

.footer-inner p { margin: 0; }

/* ---------- reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- focus ---------- */

a:focus-visible,
button:focus-visible {
  outline: 2.5px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card { transition: none; }
  .wordmark-cursor, .t-cursor { animation: none; }
  .rain { display: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .terminal-body { min-height: 0; height: 280px; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--void);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 1.5rem 1.25rem;
    display: none;
  }

  .nav-menu.is-open { display: flex; }

  .nav-menu li { width: 100%; }

  .nav-menu a {
    display: block;
    padding: 0.75rem 0;
    font-size: 1.05rem;
  }

  .nav-cta {
    display: inline-block !important;
    margin-top: 0.5rem;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:first-child {
    transform: translateY(3.5px) rotate(45deg);
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:last-child {
    transform: translateY(-3.5px) rotate(-45deg);
  }

  .hero { padding: 4.5rem 0 4rem; }
  .hero-brand { font-size: clamp(2.9rem, 14vw, 4rem); }
  .section { padding: 3.75rem 0; }

  .terminal-body { font-size: 0.72rem; }

  .stack-item {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}
