:root {
  --bg-top: #eef4fb;
  --bg-mid: #e4edf7;
  --bg-bottom: #dde6f2;
  --bg-spot-1: rgba(128, 169, 220, 0.28);
  --bg-spot-2: rgba(90, 146, 215, 0.22);
  --ink-strong: #1b2432;
  --ink: #2d3b51;
  --ink-soft: #51627d;
  --line: #bed0e3;
  --glass: rgba(255, 255, 255, 0.72);
  --rain-blue: #356fbe;
  --rain-blue-deep: #275292;
  --brand-ink: #1a3050;
  --hero-ink: #11223b;
  --header-bg: rgba(244, 249, 255, 0.72);
  --header-line: rgba(131, 158, 187, 0.35);
  --surface: rgba(255, 255, 255, 0.85);
  --surface-soft: rgba(255, 255, 255, 0.8);
  --surface-highlight: rgba(250, 253, 255, 0.78);
  --stack-track: rgba(255, 255, 255, 0.58);
  --shadow: 0 18px 40px rgba(35, 55, 85, 0.12);
}

body[data-theme="dark"] {
  --bg-top: #0c1320;
  --bg-mid: #111d2f;
  --bg-bottom: #16263e;
  --bg-spot-1: rgba(72, 125, 194, 0.16);
  --bg-spot-2: rgba(85, 161, 209, 0.14);
  --ink-strong: #f2f6fd;
  --ink: #d7e2f4;
  --ink-soft: #9eb2d2;
  --line: #355073;
  --glass: rgba(18, 30, 48, 0.72);
  --rain-blue: #4f94ef;
  --rain-blue-deep: #79aff9;
  --brand-ink: #d9e8ff;
  --hero-ink: #eef5ff;
  --header-bg: rgba(10, 20, 34, 0.72);
  --header-line: rgba(69, 99, 134, 0.48);
  --surface: rgba(15, 27, 44, 0.84);
  --surface-soft: rgba(18, 32, 52, 0.84);
  --surface-highlight: rgba(20, 35, 57, 0.8);
  --stack-track: rgba(14, 26, 42, 0.7);
  --shadow: 0 18px 36px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}

body {
  font-family: "M PLUS 1p", sans-serif;
  margin: 0;
  color: var(--ink);
  line-height: 1.8;
  background:
    radial-gradient(circle at 8% 12%, var(--bg-spot-1) 0%, rgba(128, 169, 220, 0) 36%),
    radial-gradient(circle at 88% 6%, var(--bg-spot-2) 0%, rgba(90, 146, 215, 0) 42%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 45%, var(--bg-bottom) 100%);
  min-height: 100vh;
  transition: background 0.35s ease, color 0.25s ease;
}

a {
  color: var(--rain-blue-deep);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-line);
  backdrop-filter: blur(8px);
}

.header-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 6px 16px rgba(37, 71, 118, 0.22);
}

.logo h1 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--ink-strong);
  letter-spacing: 0.02em;
}

.logo h1 a {
  text-decoration: none;
  color: inherit;
}

nav {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
}

.header-container .header-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

nav a {
  text-decoration: none;
  color: var(--ink-strong);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 0.86;
  transition: opacity 0.2s ease, color 0.2s ease;
}

nav a:hover {
  color: var(--rain-blue-deep);
  opacity: 1;
}

main {
  padding-bottom: 3rem;
}

.section {
  width: min(1080px, calc(100% - 2rem));
  margin: 2.6rem auto;
}

.hero {
  margin-top: 1.2rem;
  padding: 2.3rem 1.6rem;
  border: 1px solid rgba(139, 165, 192, 0.42);
  border-radius: 22px;
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--surface) 92%, white 8%), color-mix(in srgb, var(--surface) 85%, #cfe4ff 15%));
  box-shadow: var(--shadow);
  animation: fade-up 0.65s ease;
}

.article-hero {
  margin-top: 1.2rem;
  padding: 1.5rem 1.3rem;
  border: 1px solid rgba(139, 165, 192, 0.42);
  border-radius: 20px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--surface) 90%, white 10%), color-mix(in srgb, var(--surface) 84%, #c5dbfa 16%));
  box-shadow: var(--shadow);
  animation: fade-up 0.65s ease;
}

.article-hero h2 {
  margin-bottom: 0.5rem;
}

.article-hero .hero-lead {
  margin-top: 0;
}

.eyebrow {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  color: #365a84;
}

.hero h2 {
  margin: 0.85rem 0 0;
  border: 0;
  display: block;
  font-size: clamp(1.6rem, 3.8vw, 2.6rem);
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: var(--hero-ink);
}

.hero-lead {
  max-width: 58ch;
  margin: 1rem 0 0;
  color: var(--ink-soft);
}

.hero-actions {
  margin-top: 1.4rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.62rem 1.18rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(130deg, var(--rain-blue), #4c8ee4);
  box-shadow: 0 10px 24px rgba(53, 111, 190, 0.32);
}

.btn-ghost {
  color: var(--rain-blue-deep);
  border: 1px solid rgba(53, 111, 190, 0.4);
  background: rgba(255, 255, 255, 0.68);
}

h2 {
  margin: 0 0 0.9rem;
  border-bottom: 2px solid color-mix(in srgb, var(--rain-blue) 62%, transparent);
  color: var(--brand-ink);
  display: inline-block;
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
}

.section-lead {
  margin: 0 0 1.25rem;
  color: var(--ink-soft);
}

.about-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portal-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portal-card {
  border: 1px solid rgba(135, 164, 195, 0.42);
  border-radius: 16px;
  padding: 1.05rem;
  background: var(--glass);
  box-shadow: 0 8px 22px rgba(56, 82, 120, 0.08);
  display: flex;
  flex-direction: column;
}

.portal-card h3 {
  margin: 0;
  color: var(--brand-ink);
  font-size: 1.02rem;
  font-family: "Space Grotesk", sans-serif;
}

.portal-card p {
  margin: 0.55rem 0 0.85rem;
  color: var(--ink-soft);
}

.portal-link {
  margin-top: auto;
  text-decoration: none;
  color: var(--rain-blue-deep);
  font-weight: 700;
}

.section-action {
  margin-top: 1.2rem;
}

.info-card {
  border: 1px solid rgba(135, 164, 195, 0.42);
  border-radius: 16px;
  padding: 1rem;
  background: var(--glass);
  box-shadow: 0 8px 22px rgba(56, 82, 120, 0.08);
}

.info-card h3 {
  margin: 0;
  color: #20385c;
  font-size: 1rem;
  font-family: "Space Grotesk", sans-serif;
}

.info-card p {
  margin: 0.55rem 0 0;
  color: var(--ink-soft);
}

.history-timeline {
  position: relative;
  display: grid;
  gap: 0.9rem;
  margin-top: 0.2rem;
  padding-left: 1rem;
}

.history-timeline::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.2rem;
  bottom: 0.2rem;
  width: 2px;
  background: linear-gradient(180deg, rgba(63, 120, 193, 0.65), rgba(63, 120, 193, 0.12));
}

.history-item {
  position: relative;
  border: 1px solid rgba(135, 164, 195, 0.42);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  background: var(--glass);
  box-shadow: 0 8px 22px rgba(56, 82, 120, 0.08);
}

.history-item::before {
  content: "";
  position: absolute;
  left: -0.95rem;
  top: 1.1rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--rain-blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--surface) 70%, white 30%);
}

.history-date {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: color-mix(in srgb, var(--rain-blue-deep) 76%, var(--ink-soft) 24%);
}

.history-item h3 {
  margin: 0.24rem 0 0;
  color: var(--ink-strong);
  font-size: 1rem;
}

.history-item p {
  margin: 0.45rem 0 0;
  color: var(--ink-soft);
}

.history-item--placeholder {
  border-style: dashed;
}

.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 1rem;
}

#blog-list {
  grid-template-columns: repeat(auto-fit, minmax(245px, 320px));
  justify-content: center;
}

#latest-blog-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid rgba(132, 161, 192, 0.35);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(40, 62, 93, 0.12);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(43, 69, 105, 0.2);
}

.card img {
  width: 100%;
  height: 165px;
  object-fit: cover;
}

.card h3 {
  margin: 0.8rem 0.8rem 0.3rem;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--ink-strong);
}

.card p {
  margin: 0 0.8rem 0.8rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.card .card-date {
  margin: 0 0.8rem 0.25rem;
  color: #4a658b;
  font-size: 0.79rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.tag {
  display: inline-block;
  margin: 0 0.8rem 0.9rem;
  padding: 0.24rem 0.6rem;
  border-radius: 999px;
  background: rgba(56, 104, 165, 0.14);
  color: #234f84;
  border: 1px solid rgba(54, 100, 161, 0.25);
  font-size: 0.78rem;
  font-weight: 700;
}

.tag-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.tag-filter-btn {
  border: 1px solid rgba(54, 100, 161, 0.28);
  background: var(--surface-soft);
  color: var(--ink-strong);
  border-radius: 999px;
  padding: 0.3rem 0.72rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.2s ease, background 0.2s ease;
}

.tag-filter-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(52, 100, 160, 0.5);
}

.tag-filter-btn.active {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(130deg, #3a74c1, #2f5e9e);
}

.pagination {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pagination button {
  border: 1px solid rgba(52, 100, 160, 0.36);
  background: var(--surface-soft);
  color: color-mix(in srgb, var(--rain-blue-deep) 80%, var(--ink-strong) 20%);
  border-radius: 10px;
  padding: 0.35rem 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.pagination button.active {
  background: linear-gradient(130deg, #3a74c1, #2f5e9e);
  color: #fff;
  border-color: transparent;
}

.recommend {
  margin-top: 3.2rem;
  padding-top: 0.4rem;
}

.recommend h3 {
  margin: 0 0 0.95rem;
  padding-left: 0.58rem;
  border-left: 4px solid rgba(47, 95, 157, 0.82);
  color: var(--brand-ink);
}

.recommend .card-container {
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.contact-item {
  display: block;
  text-decoration: none;
  border-radius: 14px;
  padding: 0.95rem;
  border: 1px solid rgba(127, 156, 189, 0.44);
  background: var(--surface-highlight);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.contact-item:hover {
  transform: translateY(-2px);
  border-color: rgba(48, 90, 148, 0.55);
}

.contact-item .label {
  display: block;
  font-size: 0.73rem;
  letter-spacing: 0.08em;
  color: #3c5f8b;
  text-transform: uppercase;
}

.contact-item .value {
  display: block;
  margin-top: 0.26rem;
  font-weight: 700;
  color: var(--ink-strong);
  word-break: break-word;
}

.theme-toggle {
  border: 1px solid rgba(52, 100, 160, 0.4);
  background: var(--surface-soft);
  color: var(--ink-strong);
  border-radius: 999px;
  padding: 0.42rem 0.9rem;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--rain-blue) 60%, var(--line) 40%);
}

.stack-section {
  position: relative;
}

.stack-marquee {
  overflow: hidden;
  width: 100%;
  display: flex;
  gap: 0.9rem;
  padding: 0.6rem 0;
  mask-image: linear-gradient(to right, transparent 0%, black 7%, black 93%, transparent 100%);
}

.stack-track {
  flex-shrink: 0;
  display: flex;
  gap: 0.9rem;
  animation: stack-flow 26s linear infinite;
}

.stack-marquee:hover .stack-track {
  animation-play-state: paused;
}

.stack-card {
  width: clamp(128px, 15vw, 168px);
  border-radius: 16px;
  border: 1px solid rgba(128, 160, 196, 0.44);
  background: linear-gradient(160deg, var(--stack-track), color-mix(in srgb, var(--surface) 86%, transparent));
  box-shadow: 0 10px 24px rgba(56, 83, 122, 0.12);
  padding: 0.85rem 0.7rem;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.stack-card img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.stack-card p {
  margin: 0.7rem 0 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--ink-strong);
  text-align: center;
}

body[data-theme="dark"] .stack-logo--mono {
  filter: brightness(0) invert(1) contrast(1.08);
}

main.section article {
  border: 1px solid rgba(130, 157, 186, 0.4);
  border-radius: 16px;
  padding: 1.2rem;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(50, 77, 114, 0.1);
}

main.section article h1 {
  margin-top: 0;
  line-height: 1.4;
  color: var(--ink-strong);
}

.date {
  margin-top: -0.4rem;
  color: #5c6f8f;
  font-size: 0.9rem;
}

.article-img {
  width: 100%;
  height: clamp(190px, 34vw, 360px);
  max-width: 900px;
  display: block;
  margin: 0 auto 1.4rem;
  border-radius: 14px;
  object-fit: cover;
  object-position: center;
}

.site-footer,
footer {
  padding: 1.3rem 1rem 2rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes stack-flow {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-100% - 0.9rem));
  }
}

@media (max-width: 980px) {
  .about-grid,
  .portal-grid,
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }

  #latest-blog-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 740px) {
  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }

  nav {
    gap: 0.95rem;
  }

  .header-container .header-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .hero {
    padding: 1.6rem 1.1rem;
    border-radius: 18px;
  }

  .article-hero {
    padding: 1.2rem 1rem;
    border-radius: 16px;
  }

  .about-grid,
  .portal-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  #latest-blog-list {
    grid-template-columns: 1fr;
  }

  .card img {
    height: 180px;
  }

  .stack-card {
    width: 132px;
    min-height: 124px;
  }

  .stack-card img {
    width: 50px;
    height: 50px;
  }

  main.section article {
    padding: 1rem;
  }
}

