/* env8.com — shared styles */

:root {
  --bg: #07101a;
  --panel: rgba(10,16,24,.55);
  --panel2: rgba(10,16,24,.35);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.70);
  --muted2: rgba(255,255,255,.55);
  --line: rgba(255,255,255,.12);
  --glow: rgba(120, 220, 255, .35);
  --accent: #7fe2ff;
  --accent2: #ffb86b;
  --shadow: 0 24px 80px rgba(0,0,0,.55);
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
  overflow: auto;
}

body.page-home {
  overflow: hidden;
}
body.page-home .wrap {
  height: 100%;
}

.bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 420px at 50% 55%, rgba(127,226,255,.20), transparent 60%),
    radial-gradient(700px 340px at 85% 50%, rgba(255,184,107,.14), transparent 60%),
    linear-gradient(to bottom, rgba(7,16,26,.72), rgba(7,16,26,.88)),
    url("background.png");
  background-size: cover;
  background-position: center;
  filter: saturate(1.1) contrast(1.05);
  transform: scale(1.02);
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: -40%;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='260' height='260' filter='url(%23n)' opacity='.25'/%3E%3C/svg%3E");
  opacity: .10;
  mix-blend-mode: overlay;
  transform: rotate(8deg);
}

.wrap {
  position: relative;
  min-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: clamp(18px, 3vw, 40px);
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  letter-spacing: -0.02em;
  user-select: none;
  text-decoration: none;
  color: inherit;
}
.brand .name {
  font-weight: 800;
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1;
}
.brand .dotcom {
  font-weight: 700;
  font-size: clamp(14px, 2vw, 18px);
  opacity: .8;
  transform: translateY(-2px);
}
.brand .eight {
  color: var(--accent);
  text-shadow: 0 0 24px rgba(127,226,255,.45);
}

.toplinks {
  display: flex;
  gap: 10px;
  align-items: center;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0,0,0,.20);
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.chip:hover { border-color: rgba(127,226,255,.35); color: rgba(255,255,255,.85); }
.chip svg { opacity: .9; }

main {
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 20px 0;
}
body.page-home main { padding: 0; }

.hero {
  width: min(640px, 100%);
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(to bottom, var(--panel), var(--panel2));
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: clamp(28px, 4vw, 48px);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: radial-gradient(500px 140px at 50% 0%, rgba(127,226,255,.20), transparent 60%);
  pointer-events: none;
}
.hero.hero--wide {
  width: min(980px, 100%);
  padding: clamp(18px, 3vw, 34px);
}
.hero.hero--narrow {
  width: min(480px, 100%);
}
.hero.hero--thanks {
  width: min(420px, 100%);
  text-align: center;
}

.hero-inner {
  position: relative;
  display: grid;
  gap: 18px;
  text-align: center;
  align-items: center;
}

h1 {
  margin: 0;
  font-size: clamp(26px, 4vw, 46px);
  line-height: 1.10;
  letter-spacing: -0.03em;
}
p.sub {
  margin: 0 auto;
  max-width: 42ch;
  color: var(--muted);
  font-size: clamp(14px, 1.6vw, 17px);
  line-height: 1.5;
}
.subdomain { color: var(--accent); font-weight: 600; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.18);
  color: rgba(255,255,255,.88);
  text-decoration: none;
  font-weight: 650;
  font-size: 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn:hover { border-color: rgba(127,226,255,.35); box-shadow: 0 0 0 4px rgba(127,226,255,.08); }
.btn.primary {
  border-color: rgba(127,226,255,.45);
  background: linear-gradient(180deg, rgba(127,226,255,.20), rgba(0,0,0,.18));
}
.btn.primary:hover { border-color: rgba(127,226,255,.70); }

.tagline {
  margin: 0;
  color: var(--muted2);
  font-size: clamp(13px, 1.4vw, 15px);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* ——— Home: contribution heatmap ——— */
.activity-heatmap-wrap {
  margin-top: 28px;
  width: 100%;
  min-width: 0;
}
.activity-heatmap-scroll {
  width: 100%;
  overflow-x: visible;
  overflow-y: hidden;
  min-width: 0;
}
.activity-heatmap-grid {
  display: grid;
  grid-template-columns: repeat(52, 1fr);
  grid-template-rows: repeat(7, 1fr);
  gap: 3px;
  width: 100%;
  aspect-ratio: 52 / 7;
  max-height: 120px;
}

@media (max-width: 780px) {
  .activity-heatmap-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .activity-heatmap-scroll::-webkit-scrollbar {
    display: none;
  }
  .activity-heatmap-grid {
    min-width: 720px;
    width: 720px;
    max-height: none;
  }
}
.activity-heatmap-cell {
  border-radius: 3px;
  min-width: 0;
  min-height: 0;
  background: #0d1117;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.activity-heatmap-cell[data-count] {
  background: var(--cell-color, #40c463);
}
.activity-heatmap-cell.today {
  animation: heatmap-pulse 2s ease-in-out infinite;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.2);
}
.activity-heatmap-grid:hover .activity-heatmap-cell {
  opacity: 0.5;
}
.activity-heatmap-grid .activity-heatmap-cell:hover,
.activity-heatmap-grid.column-hover .activity-heatmap-cell.column-hover {
  opacity: 1;
}
.activity-heatmap-cell:hover {
  transform: scale(1.08);
}
@keyframes heatmap-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}
.activity-heatmap-label {
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.activity-heatmap-tooltip {
  position: fixed;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(10,16,24,0.95);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--text);
  pointer-events: none;
  z-index: 100;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.activity-heatmap-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ——— About page ——— */
.about-tagline {
  margin: 0 0 12px;
  font-size: clamp(11px, 1.2vw, 13px);
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.about h1 {
  margin: 0 0 24px;
  font-size: clamp(24px, 3.5vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.about-list {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  text-align: left;
  max-width: 36ch;
  margin-left: auto;
  margin-right: auto;
}
.about-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: clamp(14px, 1.5vw, 16px);
  line-height: 1.5;
}
.about-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.8;
}
.cta-row { margin-top: 8px; }

/* ——— Contact page ——— */
.contact .hero-inner { text-align: left; align-items: stretch; }
.contact h1 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3.5vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}
.contact .intro {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: clamp(14px, 1.5vw, 16px);
  line-height: 1.5;
}
.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.25);
  color: var(--text);
  font: inherit;
  font-size: 15px;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--muted2);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: rgba(127,226,255,.5);
  box-shadow: 0 0 0 3px rgba(127,226,255,.12);
}
.form-group textarea {
  min-height: 120px;
  resize: vertical;
}
.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 28px;
  margin-top: 8px;
  border-radius: 12px;
  border: 1px solid rgba(127,226,255,.45);
  background: linear-gradient(180deg, rgba(127,226,255,.20), rgba(0,0,0,.18));
  color: rgba(255,255,255,.92);
  font-weight: 650;
  font-size: 16px;
  cursor: pointer;
  font-family: inherit;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn-submit:hover { border-color: rgba(127,226,255,.70); box-shadow: 0 0 0 4px rgba(127,226,255,.08); }

/* ——— Contact thanks page ——— */
.hero--thanks .hero-inner { text-align: center; }
.hero--thanks h1 {
  margin: 0 0 12px;
  font-size: clamp(22px, 3vw, 28px);
  letter-spacing: -0.03em;
}
.hero--thanks p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}
.hero--thanks .btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border-radius: 12px;
  border: 1px solid rgba(127,226,255,.45);
  background: linear-gradient(180deg, rgba(127,226,255,.20), rgba(0,0,0,.18));
  color: rgba(255,255,255,.92);
  text-decoration: none;
  font-weight: 650;
  font-size: 15px;
}
.hero--thanks .btn-cta:hover { border-color: rgba(127,226,255,.70); }

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255,255,255,.55);
  font-size: 12px;
}
.footer-links {
  display: flex;
  gap: 12px;
}
.footer-links a {
  color: rgba(255,255,255,.55);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.footer-links a:hover {
  color: rgba(255,255,255,.82);
  border-bottom-color: rgba(127,226,255,.35);
}

@media (max-width: 780px) {
  .toplinks { display: none; }
  footer { flex-direction: column; justify-content: center; text-align: center; }
}
