* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: linear-gradient(145deg, #f6f9fc 0%, #eef2f5 100%);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  color: #1a2c3e;
  line-height: 1.5;
  scroll-behavior: smooth;
}

/* container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* header */
.hero {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem 1rem 1rem;
  border-bottom: 2px solid rgba(46, 125, 210, 0.2);
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, #0b3b5f, #2c7da0);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.hero .badge {
  display: inline-block;
  background: #2c7da0;
  color: white;
  font-size: 0.8rem;
  padding: 0.3rem 1rem;
  border-radius: 40px;
  font-weight: 500;
  margin-top: 0.5rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.hero p {
  font-size: 1.2rem;
  color: #2c586e;
  max-width: 700px;
  margin: 1rem auto 0;
}

/* keyword cloud */
.keywords {
  background: white;
  border-radius: 2rem;
  padding: 1.2rem 1.8rem;
  margin-bottom: 2.5rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.03), 0 2px 6px rgba(0,0,0,0.05);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 1rem;
  border: 1px solid #e2edf2;
}

.keyword {
  background: #eef3fa;
  color: #1f5e7e;
  padding: 0.3rem 0.9rem;
  border-radius: 40px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s;
  letter-spacing: 0.01em;
}

.keyword:hover {
  background: #cbe0ed;
  transform: scale(1.02);
}

/* grid layout for examples */
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.card {
  background: white;
  border-radius: 2rem;
  padding: 1.5rem;
  box-shadow: 0 12px 28px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s;
  border: 1px solid rgba(70, 147, 187, 0.2);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 30px -12px rgba(0,0,0,0.15);
}

.card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  border-left: 5px solid #2c7da0;
  padding-left: 0.8rem;
  color: #0f3b4f;
}

/* image demo styling */
.img-demo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  margin: 1rem 0;
}

.fg-image {
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: 0.2s;
}

/* specific sizing and border/padding/margin examples */
.styled-img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 24px;
  border: 3px solid #2c7da0;
  padding: 5px;
  background: #f0f6fa;
  margin: 0.5rem;
  transition: all 0.25s;
}

.styled-img:hover {
  transform: scale(1.02);
  border-color: #ffb74d;
}

.border-padding-demo {
  background: #f8fafc;
  border-radius: 1rem;
  padding: 1rem;
  text-align: center;
}

.caption {
  font-size: 0.85rem;
  color: #4b6f86;
  background: #ecf3f8;
  display: inline-block;
  padding: 0.2rem 1rem;
  border-radius: 50px;
  margin-top: 0.5rem;
}

figure {
  margin: 0;
  text-align: center;
}

figcaption {
  margin-top: 0.5rem;
  font-style: italic;
  font-size: 0.8rem;
  color: #2c7da0;
  background: #eef2f5;
  display: inline-block;
  padding: 0.2rem 1rem;
  border-radius: 20px;
}

/* link images demo */
.link-images-demo {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin: 1rem 0;
}

.icon-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  transition: 0.2s;
}

.icon-link img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: #dfeef5;
  padding: 8px;
  transition: all 0.2s;
  border: 1px solid #cbdbe2;
}

.icon-link span {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #1f5e7e;
}

.icon-link:hover img {
  transform: scale(1.1);
  box-shadow: 0 8px 18px rgba(0,0,0,0.1);
  border-color: #2c7da0;
}

/* linked image hover */
.linked-img {
  border-radius: 18px;
  cursor: pointer;
  transition: 0.2s;
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.linked-img:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

.gif-img {
  border-radius: 40px;
}

/* transparency demo */
.transparency-demo {
  background: repeating-linear-gradient(45deg, #ddd 0px, #ddd 2px, #eee 2px, #eee 8px);
  padding: 1rem;
  border-radius: 1rem;
  text-align: center;
}

.transparent-png {
  width: 100px;
  height: auto;
  display: inline-block;
  filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.2));
}

.transparency-label {
  background: #fff8e7;
  margin-top: 8px;
  border-radius: 50px;
  padding: 4px 12px;
  font-size: 0.7rem;
  display: inline-block;
}

/* motion & magic section */
.motion-bg {
  background: url('https://picsum.photos/id/102/400/200') center/cover no-repeat;
  padding: 1.5rem;
  border-radius: 1.5rem;
  color: white;
  text-shadow: 0 1px 2px black;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  margin-bottom: 1rem;
}

.overlay-text {
  background: rgba(0,0,0,0.5);
  padding: 0.3rem 1rem;
  border-radius: 60px;
}

.motion-demo {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.motion-gif {
  border-radius: 20px;
}

.motion-text {
  font-size: 0.85rem;
}

/* size figure */
.size-figure {
  margin: 1rem 0;
}

.size-img {
  border-radius: 24px;
  width: 100%;
  height: auto;
  max-width: 350px;
  border: 1px solid #cbdde6;
}

/* code block */
pre {
  background: #1e2f3a;
  color: #f0f0f0;
  padding: 1rem;
  border-radius: 1rem;
  overflow-x: auto;
  font-size: 0.8rem;
  font-family: 'Fira Code', monospace;
  margin: 1rem 0;
}

.tip {
  background: #e7f0f5;
  border-left: 5px solid #2c7da0;
  padding: 1rem;
  border-radius: 1rem;
  margin: 1rem 0;
  font-size: 0.9rem;
}

/* resource section */
.resource-section {
  background: white;
  border-radius: 2rem;
  padding: 1.8rem;
  margin-top: 1rem;
  box-shadow: 0 5px 15px rgba(0,0,0,0.03);
  border: 1px solid #e2edf2;
}

.resource-title {
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.resource-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
}

.resource-col {
  flex: 1;
  min-width: 200px;
}

.resource-col h4 {
  margin-bottom: 0.5rem;
  color: #1a2c3e;
}

.resource-col ul {
  margin-left: 1.2rem;
  color: #2c586e;
}

.resource-col p {
  color: #2c586e;
}

/* foreground demo section */
.foreground-demo {
  margin: 2rem 0;
  background: #eef3f0;
  border-radius: 2rem;
  padding: 1.5rem;
}

.demo-title {
  margin-bottom: 1rem;
}

.demo-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  align-items: center;
}

.demo-item {
  text-align: center;
}

.demo-img1 {
  border: 5px solid #ffae5a;
  padding: 8px;
  margin: 0;
  background: #fff3e0;
  border-radius: 16px;
}

.demo-img2 {
  border: none;
  padding: 0;
  margin: 20px;
  background: #eff7fa;
  border-radius: 50%;
  box-shadow: 0 8px 12px rgba(0,0,0,0.1);
}

.demo-img3 {
  border: 2px dashed #2c7da0;
  padding: 4px;
  margin: 0.5rem;
  background: white;
}

.demo-pre {
  margin-top: 1.5rem;
}

/* summary tip */
.summary-tip {
  background: #f3e5d8;
  border-left: 5px solid #e67e22;
  padding: 1rem;
  border-radius: 1rem;
  margin: 1rem 0;
}

/* footer */
footer {
  margin-top: 4rem;
  text-align: center;
  font-size: 0.8rem;
  color: #5a7e94;
  border-top: 1px solid #cde3ec;
  padding-top: 2rem;
}

/* responsive */
@media (max-width: 680px) {
  .container {
    padding: 1rem;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .card h3 {
    font-size: 1.3rem;
  }
}