body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #e6edf3;
  background: linear-gradient(-45deg, #0d1117, #1a1f3a, #1b2a4a, #0f1b2d);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  min-height: 100vh;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* HOME PAGE BACKGROUND */
.home-page {
  animation: none;
}

.video-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.video-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(13, 17, 23, 0.2);
  z-index: 1;
  pointer-events: none;
}

.home-page > *:not(.video-bg):not(.video-overlay) {
  position: relative;
  z-index: 2;
}

/* HERO */
.hero {
  text-align: center;
  padding: 80px 20px;
  background: transparent;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 10px;
}

.hero p {
  color: #9da5b4;
}

/* POSTS GRID */
.posts {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  padding: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

/* CARD */
.card {
  background: rgba(22,27,34,0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(48,54,61,0.5);
  border-radius: 10px;
  width: 300px;
  padding: 15px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(88,166,255,0.15);
}

.card img {
  width: 100%;
  border-radius: 8px;
}

.card h2 {
  margin-top: 10px;
}

.card p {
  color: #9da5b4;
}

/* ARTICLE HERO IMAGE */
.article-hero {
  width: 100%;
  max-height: 350px;
  object-fit: cover;
  border-radius: 10px;
  margin: 20px 0;
}

/* INLINE FIGURE */
.figure {
  margin: 30px 0;
  text-align: center;
}

.figure img {
  width: 100%;
  max-width: 700px;
  border-radius: 8px;
}

.figure figcaption {
  color: #9da5b4;
  font-size: 0.9rem;
  margin-top: 8px;
  font-style: italic;
}

/* ARTICLE BODY */
article {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
}

article h1 {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

article a {
  color: #58a6ff;
}

/* THERMAL STACK */
.stack-section {
  text-align: center;
  padding: 60px 20px 40px;
  position: relative;
  z-index: 2;
}

.stack-title {
  font-size: 2rem;
  margin-bottom: 5px;
  letter-spacing: 1px;
}

.stack-subtitle {
  color: #9da5b4;
  font-size: 0.95rem;
  margin-bottom: 35px;
}

.stack-container {
  display: flex;
  align-items: stretch;
  justify-content: center;
  max-width: 700px;
  margin: 0 auto;
  gap: 18px;
}

.stack-arrow {
  position: relative;
  width: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.arrow-label {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  font-weight: bold;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.arrow-label-top {
  top: -22px;
  color: #4fc3f7;
}

.arrow-label-bottom {
  bottom: -22px;
  color: #e74c3c;
}

.stack-layers {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
}

.stack-layer {
  display: flex;
  align-items: center;
  padding: 22px 24px;
  text-decoration: none;
  color: #e6edf3;
  border: 1px solid rgba(48,54,61,0.6);
  transition: transform 0.2s, box-shadow 0.25s, border-color 0.25s;
  cursor: pointer;
}

.stack-layer:first-child {
  border-radius: 14px 14px 0 0;
}

.stack-layer:last-child {
  border-radius: 0 0 14px 14px;
}

.stack-layer + .stack-layer {
  border-top: none;
}

.stack-layer:hover {
  transform: translateX(6px);
  box-shadow: 0 4px 20px rgba(88,166,255,0.2);
  border-color: rgba(88,166,255,0.5);
  z-index: 1;
}

.layer-coldplate {
  background: linear-gradient(135deg, rgba(25,118,210,0.35), rgba(21,101,192,0.2));
}

.layer-tim {
  background: linear-gradient(135deg, rgba(56,142,60,0.3), rgba(46,125,50,0.18));
}

.layer-chip {
  background: linear-gradient(135deg, rgba(230,74,25,0.35), rgba(191,54,12,0.2));
}

.layer-smt {
  background: linear-gradient(135deg, rgba(142,36,170,0.3), rgba(106,27,154,0.18));
}

.layer-fans {
  background: linear-gradient(135deg, rgba(76,175,80,0.3), rgba(56,142,60,0.18));
}

.layer-icon {
  font-size: 1.8rem;
  margin-right: 18px;
  flex-shrink: 0;
}

.layer-content {
  text-align: left;
  flex: 1;
}

.layer-content h3 {
  margin: 0 0 4px;
  font-size: 1.1rem;
}

.layer-content p {
  margin: 0;
  color: #9da5b4;
  font-size: 0.85rem;
}

.layer-arrow {
  font-size: 1.4rem;
  color: #58a6ff;
  margin-left: 14px;
  opacity: 0;
  transform: translateX(-5px);
  transition: opacity 0.2s, transform 0.2s;
}

.stack-layer:hover .layer-arrow {
  opacity: 1;
  transform: translateX(0);
}

@media (max-width: 600px) {
  .stack-container {
    flex-direction: column;
    align-items: center;
  }
  .stack-arrow {
    display: none;
  }
  .stack-layer {
    padding: 16px;
  }
}

/* COOLANT SIMULATOR CALL-TO-ACTION (tab-style, attention glow) */
.sim-cta {
  display: inline-block;
  margin-top: 14px;
  padding: 12px 24px;
  font-size: 1.05rem;
  font-weight: bold;
  letter-spacing: 0.3px;
  color: #e6edf3;
  text-decoration: none;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(22,27,34,0.92), rgba(13,40,66,0.92));
  border: 1px solid #4fc3f7;
  box-shadow: 0 0 16px rgba(79, 195, 247, 0.45);
  animation: simGlow 2.2s ease-in-out infinite;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.sim-cta:hover {
  transform: translateY(-2px);
  border-color: #7fdcff;
  box-shadow: 0 0 26px rgba(79, 195, 247, 0.85);
}

@keyframes simGlow {
  0%, 100% { box-shadow: 0 0 12px rgba(79, 195, 247, 0.4); }
  50% { box-shadow: 0 0 24px rgba(79, 195, 247, 0.8); }
}

/* ABOUT ME CALL-TO-ACTION (tab-style, calmer) */
.about-cta {
  display: inline-block;
  margin-top: 14px;
  margin-right: 12px;
  padding: 12px 24px;
  font-size: 1.05rem;
  font-weight: bold;
  letter-spacing: 0.3px;
  color: #e6edf3;
  text-decoration: none;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(22,27,34,0.92), rgba(30,40,70,0.92));
  border: 1px solid rgba(124, 156, 255, 0.7);
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.about-cta:hover {
  transform: translateY(-2px);
  border-color: #9db4ff;
  box-shadow: 0 0 18px rgba(124, 156, 255, 0.6);
}

@media (prefers-reduced-motion: reduce) {
  .sim-cta { animation: none; }
}
