/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --bg-hover: #1a1a28;
  --text: #e4e4e7;
  --text-dim: #71717a;
  --accent: #34d399;
  --accent-dim: #059669;
  --border: #27272a;
  --radius: 16px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
}

h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 2rem;
  letter-spacing: -0.03em;
}

a { color: inherit; text-decoration: none; }

/* === Animations === */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].visible {
  opacity: 1;
  transform: translateY(0);
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #0a0a0f;
}
.btn-primary:hover { background: #6ee7b7; transform: translateY(-1px); }

.btn-outline {
  border: 1.5px solid var(--border);
  color: var(--text);
  background: transparent;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-ghost {
  color: var(--text-dim);
  background: transparent;
}
.btn-ghost:hover { color: var(--text); }

.btn-lg {
  padding: 16px 32px;
  font-size: 1rem;
  border-radius: 14px;
}

/* === Hero Logo === */
.hero-logo {
  margin-bottom: 1.5rem;
}

.hero-logo img {
  width: 48px;
  height: 48px;
}

/* === Hero === */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 120px 0 80px;
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
}

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

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 100px;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.2);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-dim);
  max-width: 500px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.hero-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-glow {
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.08) 0%, transparent 70%);
  pointer-events: none;
  animation: glow-pulse 8s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

/* === Sections === */
.section {
  padding: 100px 0;
}

.section-dark {
  background: var(--bg-card);
}

/* === About === */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.about-card {
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: all 0.3s;
}

.about-card:hover {
  border-color: rgba(52, 211, 153, 0.3);
  transform: translateY(-4px);
}

.about-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.about-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.about-card p {
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* === Section Subtitle === */
.section-subtitle {
  color: var(--text-dim);
  font-size: 1rem;
  margin-top: -1rem;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

/* === Stack === */
.stack-group {
  margin-bottom: 1.5rem;
}

.stack-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

.stack-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stack-tag {
  padding: 8px 16px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
}

.stack-tag.stack-primary {
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.15);
  color: var(--accent);
}

.stack-tag:hover {
  background: rgba(52, 211, 153, 0.15);
  border-color: rgba(52, 211, 153, 0.3);
  color: var(--accent);
  transform: translateY(-2px);
}

/* === Projects === */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.project-card {
  display: block;
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: all 0.3s;
  position: relative;
}

.project-card:hover {
  border-color: rgba(52, 211, 153, 0.4);
  background: var(--bg-hover);
  transform: translateY(-4px);
}

.project-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.project-badge.hot {
  background: rgba(52, 211, 153, 0.15);
  color: var(--accent);
}

.project-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.project-card p {
  color: var(--text-dim);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.project-stack span {
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  font-size: 0.75rem;
  font-weight: 500;
}

.project-link {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  transition: color 0.2s;
}

.project-card:hover .project-link {
  color: #6ee7b7;
}

/* === Telegram === */
.tg-block {
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
}

.tg-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 24px;
  background: rgba(52, 211, 153, 0.1);
  color: var(--accent);
  margin-bottom: 24px;
}

.tg-block h2 { text-align: center; }

.tg-block p {
  color: var(--text-dim);
  font-size: 1rem;
  margin-bottom: 2rem;
  line-height: 1.7;
}

/* === Contact === */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: all 0.3s;
  text-align: center;
}

.contact-card:hover {
  border-color: rgba(52, 211, 153, 0.3);
  transform: translateY(-4px);
}

.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(52, 211, 153, 0.08);
  color: var(--accent);
  margin-bottom: 16px;
}

.contact-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.contact-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

/* === Footer === */
footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

footer p {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* === Responsive === */
@media (max-width: 640px) {
  .hero { padding: 80px 0 60px; }
  h2 { font-size: 1.6rem; }
  .section { padding: 60px 0; }
  .hero-links { flex-direction: column; }
  .hero-links .btn { width: 100%; justify-content: center; }
  .projects-grid { grid-template-columns: 1fr; }
}
