:root {
  --bg: #f7f8fb;
  --text: #1f2937;
  --muted: #6b7280;
  --card: #ffffff;
  --line: #e5e7eb;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Hiragino Sans",
    "Hiragino Kaku Gothic ProN",
    "Yu Gothic",
    Meiryo,
    sans-serif;
  line-height: 1.7;
}

.hero {
  position: relative;
  height: 320px;
  overflow: hidden;
  background: #dbeafe;
}

.carousel-tracks {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease-in-out;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.78);
  flex-shrink: 0;
}

.carousel-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  cursor: pointer;
  font-size: 1.4rem;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.carousel-button:hover {
  background: rgba(0, 0, 0, 0.7);
}

.carousel-button.prev {
  left: 24px;
}

.carousel-button.next {
  right: 24px;
}

.hero-title {
  position: absolute;
  left: 50%;
  bottom: 38px;
  transform: translateX(-50%);
  width: min(1100px, calc(100% - 32px));
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
  z-index: 2;
  pointer-events: none;
}

.hero-title h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  letter-spacing: 0.04em;
}

.hero-title p {
  margin: 8px 0 0;
  font-size: clamp(0.95rem, 2vw, 1.2rem);
}

.carousel-info {
  position: absolute;
  right: max(16px, calc((100% - 1100px) / 2 + 16px));
  bottom: 16px;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  font-size: 0.9rem;
  z-index: 3;
  display: flex;
  gap: 12px;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 12px;
  border-radius: 999px;
  pointer-events: none;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
  position: relative;
}

.nav-link:hover {
  background: #e0ecff;
  color: var(--accent-dark);
}

.nav-link.active {
  font-weight: 700;
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 14px;
  right: 14px;
  height: 3px;
  background-color: var(--text);
  border-radius: 2px;
}

.language-button {
  margin-left: auto;
  border: 1px solid var(--line);
  background: var(--text);
  color: #ffffff;
  padding: 9px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.language-button:hover {
  background: #111827;
}

.container {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 64px;
}

.section {
  margin-bottom: 48px;
}

.section-header {
  margin-bottom: 18px;
}

.section-header h2 {
  margin: 0;
  font-size: 1.8rem;
}

.section-header p {
  margin: 4px 0 0;
  color: var(--muted);
}

.news-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.news-table {
  width: 100%;
  border-collapse: collapse;
}

.news-row td {
  padding: 16px 0;
  vertical-align: top;
}

.news-row:not(:last-child) td {
  border-bottom: 1px dashed var(--line);
}

.news-date {
  width: 1%;
  white-space: nowrap;
  color: var(--accent-dark);
  font-weight: 700;
}

.news-separator {
  width: 1%;
  white-space: nowrap;
  padding-left: 8px;
  padding-right: 12px;
  color: var(--muted);
}

.news-content {
  white-space: pre-wrap;
}

.news-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.news-link-all {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
}

.news-link-all:hover {
  text-decoration: underline;
  color: var(--accent-dark);
}

.about-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
  min-height: 260px;
}

.profile-image {
  float: right;
  width: 190px;
  height: 190px;
  object-fit: cover;
  margin: 0 0 18px 28px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: #eef2ff;
}

.about-text p {
  margin-top: 0;
  font-size: 1.03rem;
}

.hidden {
  display: none;
}

.footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  padding: 24px 16px;
  background: #ffffff;
}

@media (max-width: 700px) {
  .hero {
    height: 240px;
  }

  .carousel-button.prev {
    left: 8px;
  }

  .carousel-button.next {
    right: 8px;
  }

  .hero-title {
    bottom: 28px;
  }

  .carousel-info {
    right: 16px;
    bottom: 8px;
    font-size: 0.8rem;
    padding: 2px 8px;
  }

  .container {
    padding-top: 30px;
  }

  .nav-inner {
    width: calc(100% - 20px);
  }

  .language-button {
    margin-left: 4px;
  }

  .about-card {
    display: flex;
    flex-direction: column;
    padding: 22px;
  }

  .profile-image {
    float: none;
    order: -1;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    max-width: 280px;
    margin: 0 auto 22px;
    border-radius: 22px;
  }

  .section-header h2 {
    font-size: 1.55rem;
  }
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.card {
  display: block;
  padding: 20px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  text-decoration: none;
  color: #374151;
  transition: all 0.2s ease;
}

.card:hover {
  background-color: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.blog-tag {
  display: inline-block;
  font-size: 0.8em;
  color: #4b5563;
  background-color: #e5e7eb;
  padding: 2px 8px;
  border-radius: 12px;
  margin-left: 8px;
  text-decoration: none;
  vertical-align: middle;
}

.article-tags {
  margin-bottom: 20px;
}

.tag-filter-container {
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-tag {
  font-size: 0.9em;
  color: #4b5563;
  background-color: #f3f4f6;
  padding: 6px 12px;
  border: 1px solid #d1d5db;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-tag:hover {
  background-color: #e5e7eb;
}

.filter-tag.active {
  background-color: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}