@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/space-grotesk-var-latin.woff2') format('woff2');
}

:root {
  --ritan-red: #C01421;
  --ritan-blue: #197DC8;
  --navy-950: #060e1f;
  --navy-900: #0d1a33;
  --navy-800: #162647;
  --navy-600: #2d4a7a;
  --navy-400: #5976a7;
  --navy-200: #9eaecc;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --font-display: "Space Grotesk", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "BIZ UDPGothic", "Yu Gothic", "Noto Sans CJK JP", system-ui, sans-serif;
  --font-body: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "BIZ UDPGothic", "Yu Gothic", "Noto Sans CJK JP", system-ui, sans-serif;
  --font-mono: "Space Grotesk", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "BIZ UDPGothic", "Yu Gothic", "Noto Sans CJK JP", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  color: var(--navy-800);
  background-color: var(--slate-100);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
}

::selection {
  background: rgba(192, 20, 33, 0.15);
  color: var(--navy-900);
}

.seminar-shell {
  min-height: 100vh;
  background-color: var(--slate-100);
  background-image:
    linear-gradient(to right, rgba(13, 26, 51, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(13, 26, 51, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  padding: 0 16px 40px;
}

/* Top Web-Only Navigation Strip */
.web-nav {
  max-width: 210mm;
  margin: 0 auto;
  padding: 16px 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.web-nav-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: #ffffff;
  border: 1px solid var(--navy-900);
  border-radius: 0;
  color: var(--navy-900);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.web-nav-back:hover {
  background: var(--navy-900);
  color: #ffffff;
}

.web-nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.web-nav-ext {
  color: var(--navy-600);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.web-nav-ext:hover {
  color: var(--ritan-red);
  border-bottom-color: var(--ritan-red);
}

/* Main Sheet Container */
.sheet-stage {
  width: 100%;
}

.a4-sheet {
  position: relative;
  width: 100%;
  max-width: 210mm;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid var(--slate-300);
  border-radius: 0;
  box-shadow: 0 18px 45px rgba(6, 14, 31, 0.1);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: hidden;
}

.sheet-bg-geo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.sheet-accent-bar,
.sheet-header,
.sheet-section,
.sheet-footer {
  position: relative;
  z-index: 1;
}

@media (min-width: 840px) {
  .a4-sheet {
    width: 210mm;
    min-height: 297mm;
    padding: 11.5mm 14mm 10mm;
    justify-content: space-between;
    gap: 12px;
  }
}

.sheet-accent-bar {
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--ritan-red) 0%, var(--ritan-red) 42%, var(--ritan-blue) 100%);
  flex-shrink: 0;
}

/* Sheet Header */
.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--slate-200);
}

.sheet-header-text {
  min-width: 0;
}

.sheet-kicker {
  margin: 0 0 4px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ritan-red);
}

.sheet-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.8vw, 2.35rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--navy-950);
}

.sheet-subtitle {
  margin: 5px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--navy-600);
}

.sheet-logo-wrap {
  flex-shrink: 0;
}

.sheet-logo {
  display: block;
  width: 215px;
  height: auto;
}

/* Section Headers */
.sheet-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sec-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(158, 174, 204, 0.45);
}

.sec-kicker {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ritan-red);
  white-space: nowrap;
}

.sec-slash {
  color: var(--navy-200);
}

.sec-ja {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--navy-950);
  letter-spacing: 0.02em;
}

/* 01 Basic Info + Frameless 2x Portrait */
.profile-grid {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 16px;
  align-items: center;
}

.portrait-frame {
  position: relative;
  width: 210px;
  height: 210px;
  background: transparent;
  border: none;
  padding: 0;
  overflow: visible;
}

.portrait-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.info-dl {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.info-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 6px;
  padding-bottom: 4px;
  border-bottom: 1px dashed var(--slate-200);
  align-items: baseline;
}

.info-row:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.info-dt {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--navy-900);
  white-space: nowrap;
}

.info-dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--navy-800);
}

/* 02 What We Do */
.capability-grid {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.capability-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid var(--slate-300);
  border-radius: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy-900);
  line-height: 1.25;
}

.cap-dot {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
}

.cap-dot-blue {
  background-color: var(--ritan-blue);
}

.cap-dot-red {
  background-color: var(--ritan-red);
}

.capability-extra-item {
  display: inline-flex;
  align-items: center;
  padding: 4px 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy-600);
  line-height: 1.25;
}

.welcome-banner {
  padding: 11px 16px;
  background: rgba(254, 240, 241, 0.94);
  border: 1.5px solid rgba(192, 20, 33, 0.34);
  border-left: 4px solid var(--ritan-red);
  border-right: 4px solid var(--ritan-red);
  border-radius: 0;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--navy-950);
  line-height: 1.45;
  text-align: center;
}

/* 03 Seminar Activities */
.activity-box {
  padding: 8px 13px;
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid var(--slate-200);
  border-left: 3px solid var(--navy-800);
  border-radius: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.activity-para {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--navy-800);
}

.activity-lead {
  font-family: var(--font-display);
  font-weight: 700;
}

.activity-lead::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 5px;
  vertical-align: 1px;
}

.activity-lead-blue {
  color: var(--ritan-blue);
}

.activity-lead-blue::before {
  background: var(--ritan-blue);
}

.activity-lead-red {
  color: var(--ritan-red);
}

.activity-lead-red::before {
  background: var(--ritan-red);
}

/* 04 Graduation Research Examples */
.thesis-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 10px;
}

.thesis-item {
  position: relative;
  padding: 6px 12px 6px 24px;
  background: rgba(248, 250, 252, 0.88);
  border-left: 2px solid var(--navy-800);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--navy-900);
  line-height: 1.42;
}

.thesis-item::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 13px;
  width: 5px;
  height: 5px;
  background: var(--ritan-red);
}

/* 04 Recommended For */
.recommended-box {
  margin: 0;
  padding: 10px 14px;
  background: rgba(25, 125, 200, 0.06);
  border: 1px solid rgba(25, 125, 200, 0.22);
  border-left: 4px solid var(--ritan-blue);
  border-radius: 0;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--navy-900);
  line-height: 1.6;
}

/* 04 Message Quote Card */
.message-card {
  position: relative;
  background: linear-gradient(135deg, rgba(232, 236, 242, 0.94) 0%, rgba(241, 245, 249, 0.96) 100%);
  color: var(--navy-900);
  border: 1px solid rgba(158, 174, 204, 0.6);
  border-left: 4px solid var(--ritan-red);
  border-radius: 0;
  padding: 14px 18px 15px;
  overflow: hidden;
}

.message-geo-line {
  position: absolute;
  top: 0;
  right: 0;
  width: 96px;
  height: 2px;
  background: var(--ritan-blue);
}

.message-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.message-num {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ritan-red);
}

.message-divider {
  color: var(--navy-200);
  font-size: 12px;
}

.message-ja {
  margin: 0;
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--navy-900);
}

.message-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--navy-900);
}

.message-line {
  margin: 0;
}

.message-line-cta {
  font-weight: 700;
  color: var(--navy-950);
}

/* Footer with QR Code & Bottom Credit */
.sheet-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--slate-200);
}

.sheet-footer-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sheet-footer-url {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--navy-800);
  text-decoration: none;
  align-self: flex-start;
}

.sheet-footer-url:hover {
  color: var(--ritan-red);
}

.sheet-built-note {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: var(--navy-400);
}

.sheet-qr-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.sheet-qr-caption {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.25;
}

.sheet-qr-caption span {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--ritan-red);
}

.sheet-qr-caption strong {
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--navy-900);
}

.sheet-qr-img {
  display: block;
  width: 76px;
  height: 76px;
  background: #ffffff;
  border: 1px solid var(--slate-300);
  border-radius: 0;
}

/* Mobile Layout (< 600px) */
@media (max-width: 599px) {
  .seminar-shell {
    padding: 0 8px 28px;
  }

  .a4-sheet {
    padding: 18px 14px;
  }

  .sheet-header {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 10px;
  }

  .sheet-logo {
    width: 150px;
  }

  .sec-head {
    flex-wrap: wrap;
    gap: 2px 8px;
  }

  .profile-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .portrait-frame {
    margin: 0 auto;
    width: 200px;
    height: 200px;
  }

  .info-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .welcome-banner {
    font-size: 15.5px;
    padding: 10px 12px;
  }

  .thesis-list {
    grid-template-columns: 1fr;
  }

  .message-card {
    padding: 12px 14px;
  }

  .sheet-footer {
    flex-wrap: wrap;
    align-items: flex-end;
  }
}

/* Print / Manual A4 Portrait 1-Page PDF Export */
@page {
  size: A4 portrait;
  margin: 0;
}

@media print {
  html,
  body {
    width: 210mm;
    height: 296.5mm;
    margin: 0;
    padding: 0;
    background: #ffffff !important;
    overflow: hidden;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .screen-only {
    display: none !important;
  }

  .seminar-shell {
    min-height: 0;
    padding: 0;
    margin: 0;
    background: #ffffff !important;
    background-image: none !important;
  }

  .sheet-stage {
    width: 210mm;
    height: 296.5mm;
    margin: 0;
    padding: 0;
  }

  .a4-sheet {
    width: 210mm;
    height: 296.5mm;
    min-height: 296.5mm;
    max-height: 296.5mm;
    margin: 0;
    padding: 9mm 14mm 8mm;
    border: none;
    box-shadow: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0;
    break-inside: avoid;
    page-break-after: avoid;
  }

  .sheet-header {
    padding-bottom: 2mm;
  }

  .sheet-kicker {
    font-size: 8.5pt;
    margin-bottom: 0.8mm;
  }

  .sheet-title {
    font-size: 23pt;
  }

  .sheet-subtitle {
    font-size: 10.8pt;
    margin-top: 1mm;
  }

  .sheet-logo {
    width: 54mm;
  }

  .sheet-section {
    gap: 1.4mm;
  }

  .sec-head {
    padding-bottom: 0.9mm;
  }

  .sec-kicker {
    font-size: 8.5pt;
  }

  .sec-ja {
    font-size: 12.5pt;
  }

  .profile-grid {
    grid-template-columns: 50mm 1fr;
    gap: 4mm;
    align-items: center;
  }

  .portrait-frame {
    width: 50mm;
    height: 50mm;
  }

  .info-dl {
    gap: 1mm;
  }

  .info-row {
    grid-template-columns: 16.5mm 1fr;
    gap: 1.5mm;
    padding-bottom: 0.8mm;
  }

  .info-dt {
    font-size: 9.6pt;
  }

  .info-dd {
    font-size: 9.8pt;
    line-height: 1.38;
  }

  .capability-grid {
    gap: 1.5mm 2.4mm;
  }

  .capability-item {
    padding: 1.3mm 3.3mm;
    font-size: 9.8pt;
  }

  .capability-extra-item {
    font-size: 9.8pt;
    padding: 1.2mm 1.5mm;
  }

  .welcome-banner {
    padding: 2mm 4mm;
    font-size: 11.4pt;
  }

  .activity-box {
    padding: 1.8mm 3mm;
    gap: 1.2mm;
  }

  .activity-para {
    font-size: 8.8pt;
    line-height: 1.42;
  }

  .activity-lead::before {
    width: 1.2mm;
    height: 1.2mm;
    margin-right: 1.3mm;
    vertical-align: 0.3mm;
  }

  .thesis-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.6mm 3mm;
  }

  .thesis-item {
    padding: 1.4mm 3mm 1.4mm 6mm;
    font-size: 10pt;
    line-height: 1.35;
  }

  .thesis-item::before {
    left: 2.4mm;
    top: 3.3mm;
    width: 1.4mm;
    height: 1.4mm;
  }

  .recommended-box {
    padding: 2mm 3.4mm;
    font-size: 9.8pt;
    line-height: 1.48;
  }

  .message-card {
    padding: 3mm 4.6mm 3.4mm;
  }

  .message-head {
    margin-bottom: 1.8mm;
  }

  .message-num {
    font-size: 8.5pt;
  }

  .message-ja {
    font-size: 10.5pt;
  }

  .message-body {
    gap: 1.8mm;
    font-size: 10.3pt;
    line-height: 1.52;
  }

  .sheet-footer {
    padding-top: 2.2mm;
  }

  .sheet-footer-url {
    font-size: 9.5pt;
  }

  .sheet-built-note {
    font-size: 8.2pt;
    margin-top: 0.6mm;
  }

  .sheet-qr-caption span {
    font-size: 7pt;
  }

  .sheet-qr-caption strong {
    font-size: 8.2pt;
  }

  .sheet-qr-img {
    width: 19mm;
    height: 19mm;
  }
}
