@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700&family=Space+Grotesk:wght@400;500;700&display=swap');

/* --- DESIGN TOKENS --- */
:root {
  --bg-dark: #000000;
  --bg-obsidian: #0c0c0e;
  --bg-card: #141416;
  --bg-card-hover: #1c1c1f;
  
  --text-pure: #ffffff;
  --text-muted: #8e8e93;
  --text-dark: #5c5c61;
  
  --border-light: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.2);
  --border-focus: #ffffff;

  --font-heading: 'Space Grotesk', 'Noto Sans JP', sans-serif;
  --font-body: 'Noto Sans JP', sans-serif;
  
  --transition-smooth: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  --transition-fast: all 0.15s ease-out;
  
  --container-width: 1200px;
}

/* --- RESET & BASE STYLES --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-dark);
  color: var(--text-pure);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-dark);
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
  padding-bottom: 80px;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
}

p {
  color: var(--text-muted);
  font-weight: 300;
  font-size: 0.95rem;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

button {
  color: inherit;
  font: inherit;
  border: none;
  appearance: none;
}

/* --- LAYOUT CONTAINERS --- */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 40px;
}

@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }
}

/* --- HEADER / HERO --- */
.hero {
  padding: 100px 0 48px 0;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.hero-meta .tag {
  background: var(--text-pure);
  color: var(--bg-dark);
  padding: 2px 8px;
  font-weight: 700;
  font-size: 0.75rem;
}

.hero-title {
  font-size: 4rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 24px;
  word-break: keep-all;
}

.hero-description {
  font-size: 1.2rem;
  max-width: 700px;
  line-height: 1.7;
}

.hero-details-link {
  color: var(--text-pure);
  text-decoration: underline;
  text-underline-offset: 4px;
  font-weight: 500;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.hero-details-link:hover {
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .hero {
    padding: 60px 0 40px 0;
  }
  .hero-title {
    font-size: 2.5rem;
  }
  .hero-description {
    font-size: 1rem;
  }
}

/* --- SECTION GENERAL --- */
.section {
  padding: 68px 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 48px;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 500;
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
}

.section-title::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--text-pure);
}

.section-subtitle {
  font-family: var(--font-heading);
  color: var(--text-muted);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

@media (max-width: 768px) {
  .section {
    padding: 50px 0;
  }
  .section-header {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
  }
}

/* --- CORNER ARTICLES GRID (3 columns) --- */
.corner-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.corner-card {
  background-color: var(--bg-obsidian);
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 320px;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.corner-card-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  filter: grayscale(80%) contrast(1.1);
  transition: var(--transition-smooth);
}

.corner-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.88));
  z-index: 1;
}

.corner-card::after {
  content: '→';
  position: absolute;
  bottom: 40px;
  right: 40px;
  font-size: 1.5rem;
  opacity: 0.3;
  transition: var(--transition-smooth);
  font-family: var(--font-heading);
  z-index: 2;
}

.corner-tag {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  position: relative;
  z-index: 2;
}

.corner-card-title {
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.3;
  position: relative;
  z-index: 2;
}

/* Hover effects */
.corner-card:hover {
  background-color: var(--bg-card);
  transform: translateY(-4px);
}

.corner-card:hover .corner-card-image {
  opacity: 0.85;
  filter: grayscale(0%) contrast(1.15);
  transform: scale(1.04);
}

.corner-card:hover::after {
  opacity: 1;
  transform: translateX(6px);
}

@media (max-width: 992px) {
  .corner-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .corner-card {
    height: 220px;
    padding: 30px;
  }
  .corner-card::after {
    bottom: 30px;
    right: 30px;
  }
}

/* --- ARTICLES GRID (2 columns) --- */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.article-card {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding-bottom: 8px;
  transition: var(--transition-smooth);
}

.article-thumb {
  width: 112px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  flex: 0 0 112px;
  background-color: var(--bg-obsidian);
  transition: var(--transition-smooth);
}

.article-card:hover .article-thumb {
  filter: brightness(1.15);
  transform: scale(1.03);
}

.article-card-body {
  min-width: 0;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-family: var(--font-heading);
}

.article-author {
  color: var(--text-pure);
}

.article-card-title {
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 8px;
  transition: var(--transition-fast);
}

.article-card:hover .article-card-title {
  color: var(--text-pure);
}

@media (max-width: 768px) {
  .articles-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .article-thumb {
    width: 96px;
    flex-basis: 96px;
  }
  .article-card-title {
    font-size: 1.05rem;
  }
}

@media (max-width: 576px) {
  .article-card {
    gap: 14px;
  }
  .article-thumb {
    width: 84px;
    flex-basis: 84px;
  }
}

/* --- COMMENTS SECTION --- */
.comments-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.comment-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chief-card {
  background-color: var(--bg-obsidian);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  gap: 20px;
  color: var(--text-pure);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.chief-card:hover {
  background-color: var(--bg-card);
}

.chief-role {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.chief-name {
  font-size: 1.3rem;
  font-weight: 500;
  margin-bottom: 4px;
}

.comment-person {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.comment-person-photo {
  width: 84px;
  height: 84px;
  object-fit: cover;
  flex: 0 0 84px;
  border-radius: 50%;
  background-color: var(--bg-dark);
}

.chief-link-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.student-list-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.faculty-comment-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 8px;
}

.faculty-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.faculty-card {
  padding: 24px;
}

.faculty-card .comment-person {
  flex-direction: column;
}

.faculty-card .comment-person-photo {
  width: 72px;
  height: 72px;
  flex-basis: 72px;
}

.student-list-title {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-muted);
  font-family: var(--font-heading);
}

.student-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.student-card {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: var(--bg-dark);
  color: var(--text-pure);
  text-align: left;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.student-avatar {
  width: 44px;
  height: 44px;
  object-fit: cover;
  flex: 0 0 44px;
  border-radius: 50%;
  background-color: var(--bg-obsidian);
}

.student-name {
  font-size: 1rem;
  font-weight: 400;
  min-width: 0;
  flex: 1;
}

.student-arrow {
  opacity: 0.55;
  transform: scale(1);
  transition: var(--transition-smooth);
  font-family: var(--font-heading);
  font-size: 1.25rem;
  line-height: 1;
  margin-left: auto;
}

.student-card:hover {
  background-color: var(--bg-obsidian);
}

.student-card:hover .student-arrow {
  opacity: 1;
  transform: scale(1.12);
}

.comment-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}

.comment-modal[aria-hidden="false"] {
  display: flex;
}

.comment-modal-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

.comment-modal-panel {
  position: relative;
  width: min(620px, 100%);
  max-height: min(80vh, 620px);
  overflow-y: auto;
  background-color: var(--bg-card);
  padding: 32px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.comment-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  border: none;
  background-color: var(--bg-dark);
  color: var(--text-muted);
  padding: 8px 12px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.comment-modal-close:hover {
  color: var(--text-pure);
}

.comment-modal-title {
  font-size: 1.7rem;
  font-weight: 500;
  margin: 10px 0 20px;
  padding-right: 80px;
}

.comment-modal-text {
  color: var(--text-pure);
  font-size: 1.05rem;
  line-height: 1.85;
}

.modal-open {
  overflow: hidden;
}

@media (max-width: 992px) {
  .faculty-grid {
    grid-template-columns: 1fr;
  }
  .student-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .comment-person {
    gap: 14px;
  }
  .comment-person-photo {
    width: 64px;
    height: 64px;
    flex-basis: 64px;
  }
  .student-grid {
    grid-template-columns: 1fr;
  }
}

/* --- OTHER LINKS & FOOTER --- */
.links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.link-item {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 124px;
  transition: var(--transition-smooth);
}

.link-item-title {
  font-size: 1.1rem;
  font-weight: 400;
}

.link-item-url {
  font-size: 0.8rem;
  color: var(--text-dark);
  font-family: var(--font-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-item:hover {
  background-color: var(--bg-obsidian);
}

@media (max-width: 768px) {
  .links-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .link-item {
    height: 120px;
  }
}

/* --- FOOTER & ABOUT --- */
.footer {
  padding: 40px 0 0 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
}

.about-link {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--text-pure);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  transition: var(--transition-smooth);
}

.about-link:hover {
  color: var(--text-muted);
}

@media (max-width: 576px) {
  .footer-inner {
    flex-direction: column;
    gap: 24px;
    align-items: flex-start;
  }
}

/* --- ARTICLE PAGES LAYOUT --- */
.article-header {
  padding: 80px 0 32px 0;
}

.article-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px;
}

.article-title {
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .article-title {
    font-size: 2rem;
  }
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-family: var(--font-heading);
}

.article-meta span strong {
  color: var(--text-pure);
  font-weight: 500;
}

.article-body {
  padding: 60px 0 100px 0;
}

.article-body p {
  font-size: 1.05rem;
  color: var(--text-pure);
  line-height: 1.85;
  margin-bottom: 32px;
  text-align: justify;
}

.article-body h2 {
  font-size: 1.8rem;
  font-weight: 500;
  margin: 56px 0 24px 0;
  padding-bottom: 4px;
}

.article-body h3 {
  font-size: 1.4rem;
  font-weight: 500;
  margin: 40px 0 20px 0;
}

/* Figure images style */
.article-figure {
  margin: 40px 0;
  background-color: var(--bg-obsidian);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article-figure img {
  width: 100%;
  height: auto;
  display: block;
  transition: var(--transition-smooth);
}

.article-figure img:hover {
  filter: brightness(1.12);
}

.article-figcaption {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  padding-left: 0;
}

/* Interview Q&A Layout */
.interview-block {
  margin: 40px 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.interview-qa {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 16px;
  margin-bottom: 8px;
}

.interview-qa.question {
  flex-direction: row;
  align-items: baseline;
  gap: 0.45em;
}

.interview-qa.question .interview-text {
  margin: 0;
}

.interview-label {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.interview-qa.question .interview-label {
  color: var(--text-pure);
  flex: 0 0 auto;
  font-size: 1.05rem;
  letter-spacing: 0;
}

.interview-qa.answer .interview-label {
  color: var(--text-muted);
}

.interview-text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-pure);
}

/* Back navigation button */
.nav-back {
  padding: 32px 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.back-link:hover {
  color: var(--text-pure);
  transform: translateX(-4px);
}

/* Social links button grid in articles */
.article-links {
  margin: 40px 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.article-link-btn {
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-obsidian);
  transition: var(--transition-smooth);
  font-size: 0.95rem;
}

.article-link-btn span:first-child {
  font-weight: 500;
}

.article-link-btn span:last-child {
  font-family: var(--font-heading);
  color: var(--text-muted);
}

.article-link-btn:hover {
  background-color: var(--bg-card);
}
