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

:root {
  --bg: #050505;
  --text: #e9eaee;
  --muted: #99a0b0;
  --accent: #f5f5f7;
  --button-border: #6c737c;
  --mail: #ff3b30;
  --linkedin: #0a66c2;
}

html, body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Space Grotesk", system-ui, -apple-system, sans-serif;
}

body {
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
}

.muted {
  color: var(--muted);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 22px 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(5, 5, 5, 0.6);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid #ffffff;
  z-index: 3;
}

.brand {
  color: var(--text);
  font-family: "Space Grotesk", "Inter", system-ui, -apple-system, sans-serif;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-decoration: none;
  font-size: 18px;
}

.nav-links {
  display: flex;
  gap: 16px;
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  font-weight: 600;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.hero-section {
  position: relative;
  min-height: 100vh;
  background: #050505;
  overflow: visible;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
}

.sky {
  position: relative;
  height: 85vh;
  min-height: 85vh;
  max-height: 85vh;
  flex: 0 0 85vh;
  overflow: hidden;
}

.stars,
.gradient-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.stars {
  background-color: #030304;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}

.gradient-overlay {
  z-index: 0;
  background: radial-gradient(circle at 60% 60%, rgba(16, 19, 32, 0.18), transparent 38%),
              linear-gradient(180deg, rgba(7, 8, 12, 0.32) 0%, rgba(3, 3, 4, 0.24) 50%, rgba(3, 3, 4, 0.34) 100%);
}

.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 85vh;
  padding: 140px 5vw 120px;
  z-index: 1;
}

.hero-content {
  max-width: 820px;
}

h1 {
  font-family: "Space Grotesk", "Inter", system-ui, -apple-system, sans-serif;
  font-size: clamp(48px, 8vw, 82px);
  margin: 0 0 24px;
  letter-spacing: 0.2px;
}

.subtitle {
  margin: 0 0 48px;
  font-size: clamp(18px, 2.8vw, 28px);
  line-height: 1.5;
  color: var(--muted);
  max-width: 960px;
}

.cta-row {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  padding: 0 26px;
  border-radius: 12px;
  border: 2px solid var(--button-border);
  color: var(--text);
  text-decoration: none;
  font-size: 20px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.02);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  border-color: #aeb5c0;
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
  background: rgba(255, 255, 255, 0.06);
}

.social {
  display: inline-flex;
  align-items: center;
  gap: 18px;
}

.icon {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #d3d7e0;
  transition: transform 0.2s ease, color 0.2s ease, filter 0.2s ease;
}

.icon svg {
  width: 40px;
  height: 40px;
}

.icon.linkedin { color: var(--linkedin); }
.icon.github { color: #f5f7fb; }
.icon.mail { color: var(--mail); }

.icon.photo {
  padding: 4px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 14px;
}

.icon.photo img {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

.icon.linkedin.photo img {
  width: 54px;
  height: 54px;
}

.icon.github.photo img {
  width: 42px;
  height: 42px;
}

.icon.github.photo {
  position: relative;
  top: -4px;
}

.icon:hover {
  transform: translateY(-3px) scale(1.03);
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.4));
}

@keyframes stars-drift {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-220px, -150px, 0); }
}

.divider {
  height: 2px;
  background: #ffffff;
  flex: 0 0 2px;
}

.about-banner {
  height: 15vh;
  min-height: 140px;
  background: #000;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 0 0 auto;
}

.about-banner h2 {
  margin: 0;
  font-family: "Space Grotesk", "Inter", system-ui, -apple-system, sans-serif;
  letter-spacing: 2px;
}

body.simple-page {
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  background: #000;
  padding-top: 120px;
}

.simple-page-content {
  display: flex;
  flex: 1;
  width: 100%;
  justify-content: center;
  align-items: center;
  padding: 40px 20px 80px;
}

.blog-page {
  background: var(--bg);
  color: var(--text);
}

.blog-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 24px;
  padding: 140px 5vw 80px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.blog-list h1 {
  margin: 0 0 16px;
  font-family: "Space Grotesk", "Inter", system-ui, -apple-system, sans-serif;
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.post-card {
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.post-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-1px);
}

.post-card.active {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.12);
}

.blog-content {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  padding: 24px;
  min-height: 60vh;
  line-height: 1.6;
}

.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4 {
  font-family: "Space Grotesk", "Inter", system-ui, -apple-system, sans-serif;
  margin-top: 18px;
  margin-bottom: 12px;
}

.blog-content p {
  margin: 0 0 14px;
}

.blog-content ul {
  padding-left: 20px;
}

.blog-content pre {
  background: rgba(255, 255, 255, 0.08);
  padding: 12px;
  border-radius: 10px;
  overflow: auto;
}

@media (max-width: 900px) {
  .site-header {
    padding: 18px 20px;
  }

  .nav-links {
    gap: 10px;
  }

  .nav-link {
    padding: 9px 12px;
  }

  .hero {
    padding: 100px 24px 80px;
  }

  .ufo { left: 50px; top: 80px; }
  .satellite { left: 160px; top: 90px; }
  .planet { right: 80px; bottom: 90px; }

  .blog-layout {
    grid-template-columns: 1fr;
    padding: 120px 20px 70px;
  }
}

@media (max-width: 640px) {
  h1 {
    font-size: clamp(42px, 11vw, 56px);
  }

  .subtitle {
    font-size: 18px;
  }

  .cta-row {
    gap: 16px;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}
