* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, sans-serif;
  background: linear-gradient(to bottom, #f1f5f9, #e2e8f0);
  color: #1e293b;
  line-height: 1.7;
}

/* ===== logo ===== */
.logo {
  font-size: 46px;
  font-weight: 800;
  letter-spacing: 3px;
}

.logo span {
  color: #38bdf8;
}

header p {
  opacity: 0.85;
  margin-top: 8px;
}

/* ===== header ===== */
header {
  background: linear-gradient(135deg, #020617, #1e293b);
  color: white;
  text-align: center;
  padding: 50px 20px;
}

/* ===== nav ===== */
nav {
  background: #020617;
  display: flex;
  justify-content: center;
  gap: 25px;
  padding: 15px;
  position: sticky;
  top: 0;
}

nav a {
  color: #e5e7eb;
  text-decoration: none;
  font-weight: 600;
}

nav a:hover {
  color: #38bdf8;
}

/* ===== sections ===== */
section {
  background: white;
  max-width: 1000px;
  margin: 50px auto;
  padding: 40px;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}

h2 {
  font-size: 32px;
  margin-bottom: 15px;
  border-left: 6px solid #38bdf8;
  padding-left: 15px;
}

/* ===== animated diagram ===== */
.diagram {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 40px;
  text-align: center;
}

.box {
  padding: 30px;
  color: white;
  border-radius: 14px;
  font-weight: bold;
}

.solid { background: #2563eb; }
.liquid { background: #0ea5e9; }
.gas { background: #22c55e; }
.plasma { background: #a855f7; }

.arrow {
  font-size: 30px;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { opacity: 0.3; }
  50% { opacity: 1; }
  100% { opacity: 0.3; }
}

/* ===== footer ===== */
footer {
  background: #020617;
  color: #cbd5f5;
  text-align: center;
  padding: 18px;
  font-size: 14px;
}
