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

:root {
  --bg: #0f172a;
  --bg-card: #1e293b;
  --bg-card-hover: #273449;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --accent-hover: #7dd3fc;
  --tag-bg: #334155;
  --radius: 12px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--accent-hover);
}

/* ========== Hero ========== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  background: linear-gradient(135deg, #0f172a 0%, #1a1a3e 50%, #0f172a 100%);
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  color: var(--text-muted);
  font-weight: 300;
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  font-size: 1.5rem;
  color: var(--text-muted);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

/* ========== Projects Section ========== */
.projects-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 3rem;
  text-align: center;
  color: var(--text);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

/* ========== Project Card ========== */
.project-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 2rem;
  transition: transform 0.3s ease, background 0.3s ease;
  opacity: 0;
  transform: translateY(30px);
}

.project-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease, background 0.3s ease;
}

.project-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
}

.project-card.visible:hover {
  transform: translateY(-4px);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.card-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
  line-height: 1.5;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tag {
  background: var(--tag-bg);
  color: var(--text-muted);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 500;
}

.card-links {
  display: flex;
  gap: 1rem;
}

.card-links a {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 8px;
  transition: all 0.2s;
}

.card-links a:hover {
  background: var(--accent);
  color: var(--bg);
}

/* ========== Footer ========== */
.footer {
  text-align: center;
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--tag-bg);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.footer-links a {
  font-weight: 600;
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ========== Responsive ========== */
@media (max-width: 480px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    padding: 1.5rem;
  }
}
