.home-page {
  background:
    radial-gradient(circle at top left, rgba(125, 211, 252, 0.18), transparent 26%),
    radial-gradient(circle at bottom right, rgba(196, 181, 253, 0.18), transparent 30%),
    linear-gradient(180deg, #090d1a 0%, #0f172a 100%);
  position: relative;
}

.home-page::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 50%, rgba(125, 211, 252, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(167, 139, 250, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: 1;
}

main {
  position: relative;
  z-index: 2;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 48px;
  align-items: center;
  padding: 70px 0 40px;
}

/* Author chip at the top of the hero: a small photo that links to the About page */
.author-chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  margin-bottom: 20px;
  padding: 6px 8px 6px 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.author-avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px var(--accent-2);
}

.author-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  line-height: 1.2;
}

.author-text strong {
  font-size: 0.95rem;
}

.author-text small {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
}

/* The big title grows with its own column, so long words never break */
.hero-copy {
  container-type: inline-size;
}

.hero-copy h1 {
  font-size: clamp(1.5rem, 8.8cqi, 4.5rem);
}

.hero-copy .subtitle {
  max-width: 620px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.7;
}

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

.hero-visual {
  position: relative;
  min-height: 430px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.65);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.planet {
  width: clamp(150px, 45vw, 270px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fef3c7 0%, #e0f2fe 16%, #7dd3fc 35%, #a78bfa 70%, #1f2937 100%);
  box-shadow: 0 0 0 18px rgba(125, 211, 252, 0.12), 0 0 80px rgba(167, 139, 250, 0.38);
  position: relative;
}

.planet::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  background: rgba(125, 211, 252, 0.7);
  filter: blur(0.5px);
}

.orb-one {
  width: 22px;
  height: 22px;
  top: 20%;
  left: 18%;
}

.orb-two {
  width: 28px;
  height: 28px;
  top: 30%;
  right: 20%;
  background: rgba(249, 168, 212, 0.8);
}

.lab-card {
  position: absolute;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 180px;
  padding: 14px 18px 14px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 16, 30, 0.8);
  border-radius: 18px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.6);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.lab-cover {
  flex-shrink: 0;
  width: 46px;
  height: auto;
  border-radius: 3px 6px 6px 3px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}

.lab-card-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lab-tag {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
}

.lab-card strong {
  font-size: 1.2rem;
}

.featured,
.categories,
.lab-notes {
  padding-top: 44px;
}

.feature-card {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 28px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.feature-content p {
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 18px;
}

.feature-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 0 0 26px;
}

.feature-tags li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.feature-tags li::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.feature-tags li:nth-child(3n + 2)::before {
  background: var(--accent-2);
  box-shadow: 0 0 10px var(--accent-2);
}

.feature-tags li:nth-child(3n)::before {
  background: var(--accent-3);
  box-shadow: 0 0 10px var(--accent-3);
}

/* Sections: 1 column on phones, 2×2 from tablets up ("ստեղծագործություններ" is too long for 4 columns) */
.category-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.category-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 220px;
  padding: 24px 22px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.05) 100%);
  pointer-events: none;
}

.category-card .icon {
  position: absolute;
  right: -6px;
  bottom: -14px;
  font-size: 6rem;
  line-height: 1;
  opacity: 0.22;
  rotate: -12deg;
  pointer-events: none;
}

.category-card .card-status {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.85rem;
}

.category-card .card-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.category-card p {
  color: rgba(237, 246, 255, 0.82);
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

.category-card h3 {
  position: relative;
  z-index: 1;
  margin-top: auto;
  font-size: clamp(1.15rem, 0.9rem + 0.8vw, 1.5rem);
}

.category-card.books {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(168, 85, 247, 0.16));
}

.category-card.experiments {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(59, 130, 246, 0.16));
}

.category-card.d3 {
  background: linear-gradient(135deg, rgba(244, 114, 182, 0.18), rgba(249, 115, 22, 0.18));
}

.category-card.origami {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.18), rgba(34, 197, 94, 0.1));
}

.notes-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 26px;
}

/* The line that connects the orbs: down the side on phones, across on wider screens */
.notes-grid::before {
  content: '';
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 14px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2), var(--accent-3) 75%, transparent);
  opacity: 0.45;
}

.note {
  --orb: var(--accent);
  position: relative;
  padding: 0 4px 0 44px;
  transition: transform 0.2s ease;
}

.note.try {
  --orb: var(--accent-2);
}

.note.create {
  --orb: var(--accent-3);
}

.note-orb {
  position: absolute;
  top: 2px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, var(--orb) 45%, transparent 75%);
  box-shadow: 0 0 18px var(--orb);
}

.motto .learn {
  color: var(--accent);
}

.motto .try {
  color: var(--accent-2);
}

.motto .create {
  color: var(--accent-3);
}

.note p {
  color: var(--muted);
  line-height: 1.7;
}

/* Hover effects only for mouse users; on touch screens they stick after a tap */
@media (hover: hover) {
  .lab-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.28);
  }

  .author-chip:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
  }

  .feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 32px 80px rgba(125, 211, 252, 0.25);
  }

  .category-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 32px 80px rgba(15, 23, 42, 0.8);
  }

  .note:hover {
    transform: translateY(-4px);
  }

}

@media (min-width: 768px) {
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (min-width: 700px) {
  .notes-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
  }

  .notes-grid::before {
    top: 13px;
    bottom: auto;
    left: 15px;
    right: 15px;
    width: auto;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  }

  .note {
    padding: 44px 8px 0 0;
  }
}

@media (min-width: 1000px) {
  .category-grid {
    gap: 22px;
  }
}

/* Tablets and phones: one column, the planet goes under the text */
@media (max-width: 899.98px) {
  .hero,
  .feature-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero {
    gap: 32px;
    padding-top: 48px;
  }

  .hero-visual {
    min-height: 340px;
  }
}

/* Phones */
@media (max-width: 599.98px) {
  .hero {
    gap: 24px;
    padding: 28px 0 16px;
  }

  .hero-copy .subtitle {
    font-size: 1rem;
    margin-bottom: 24px;
  }

  .hero-actions {
    gap: 12px;
  }

  .hero-actions .button {
    flex: 1 1 100%;
  }

  .hero-visual {
    min-height: 280px;
    border-radius: var(--radius);
  }

  .planet {
    box-shadow: 0 0 0 12px rgba(125, 211, 252, 0.12), 0 0 60px rgba(167, 139, 250, 0.38);
  }

  .lab-card {
    right: 14px;
    bottom: 14px;
    min-width: 0;
    gap: 10px;
    padding: 10px 14px 10px 10px;
    border-radius: 14px;
  }

  .lab-cover {
    width: 38px;
  }

  .lab-card strong {
    font-size: 1.05rem;
  }

  .featured,
  .categories,
  .lab-notes {
    padding-top: 32px;
  }

  .feature-card {
    gap: 20px;
    padding: 14px;
  }

  .category-card {
    min-height: 0;
    padding: 20px 18px;
  }

  .category-card h3 {
    font-size: 1.15rem;
  }

}
