:root {
  --bg: #0a0a0a;
  --surface: #151515;
  --surface-border: #272727;
  --surface-border-hover: #3a3a3a;
  --text-primary: #f3f3f3;
  --text-secondary: #adadad;
  --text-muted: #6f6f6f;
  --accent: #4ade80;
  --icon-color: #989898;
  --mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  --hano: 'Sreda';
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--mono);
  min-height: 100vh;
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---------- Hero ---------- */

.hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(40px, 15vw, 250px);
  padding: 64px 24px;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
}

.hero-left {
  max-width: 420px;
  flex-shrink: 0;
}

.title {
  font-size: clamp(30px, 3.6vw, 42px);
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.15;
  margin: 0 0 20px;
  color: var(--text-primary);
}

.subtitle {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0 0 40px;
  max-width: 400px;
}

.arrow {
  color: var(--accent);
  cursor: pointer;
}

/* ---------- Code block ---------- */

.code-line {
  margin: 0 0 32px;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.7;
  color: #cfcfcf;
  overflow-x: auto;
}

.code-line code {
  font-family: inherit;
}

.code-line .k { color: #c792ea; }  /* const */
.code-line .v { color: #82aaff; }  /* secrets */
.code-line .n { color: var(--accent); }  /* zeros, match the arrow */
.code-line .c { color: var(--text-muted); }  /* comments */

/* ---------- Poop effect ---------- */

.poop-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
  transition: opacity 0.6s ease;
}

.poop-layer.fade {
  opacity: 0;
}

.poop {
  position: absolute;
  transform: translate(-50%, -50%) scale(0) rotate(var(--rot));
  animation: poop-pop 0.35s cubic-bezier(0.2, 1.6, 0.4, 1) forwards;
  user-select: none;
}

@keyframes poop-pop {
  to { transform: translate(-50%, -50%) scale(1) rotate(var(--rot)); }
}

/* ---------- Project card ---------- */

.project-card {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  width: fit-content;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 13px 22px 13px 18px;
  text-decoration: none;
  color: var(--text-primary);
  margin-bottom: 30px;
  transition: border-color 0.2s ease, transform 0.15s ease, background 0.2s ease;
}

.project-card:hover {
  border-color: var(--accent);
  background: #181818;
  transform: translateY(-2px);
}

.project-icon {
  display: flex;
  flex-shrink: 0;
}

.project-icon svg {
  width: 40px;
  height: 40px;
  display: block;
}

.project-name {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.2px;
}

/* ---------- Social row ---------- */

.social-row {
  display: flex;
  gap: 10px;
}

.social-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  color: var(--icon-color);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.social-btn svg {
  width: 18px;
  height: 18px;
}

.social-btn:hover {
  color: var(--text-primary);
  border-color: var(--surface-border-hover);
  transform: translateY(-2px);
}

/* ---------- Visual box ---------- */

.hero-right {
    position: relative;
}

.video-container {
    position: relative;
    width: fit-content;
}

.visual-box {
    display: block;
    width: clamp(260px, 33vw, 449px);
    aspect-ratio: 449 / 489;
    object-fit: cover;
    border-radius: 16px;
}

.sound-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;

    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;

    background: rgba(0,0,0,.6);
    color: white;
    cursor: pointer;

    z-index: 10;
}



/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid #1a1a1a;
  padding: 14px 24px;
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* ---------- Focus states ---------- */

.project-card:focus-visible,
.social-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hero {
    flex-direction: column;
    padding: 56px 24px;
    gap: 44px;
  }

  .hero-left {
    max-width: 100%;
  }

  .visual-box {
    width: min(80vw, 420px);
  }
}

@media (max-width: 420px) {
  .social-row {
    gap: 8px;
  }

  .social-btn {
    width: 40px;
    height: 40px;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .project-card,
  .social-btn {
    transition: none;
  }

  .poop {
    animation-duration: 0.01s;
  }
}

.s { color: #a5d6a7; }
