@charset "UTF-8";

:root {
  --tdu-color: #2d56a0;
  --text-color: #222;
  --background-color: #fafafa;
  --serif-font: "Noto Serif JP", "Noto Serif CJK JP", "Hiragino Mincho ProN", "Yu Mincho", "Source Han Serif JP", serif;
  --sans-serif-font: "Noto Sans JP", "Noto Sans CJK JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", sans-serif;
}

body,
html {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  width: 100%;
  display: flex;
  justify-content: center;
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: var(--sans-serif-font);
}

#container {
  display: grid;
  grid-template-columns: 60px auto;
  grid-template-rows: 180px 1fr auto;
  max-width: 1200px;
  width: 80%;
}

#sidebar {
  grid-column: 1;
  grid-row: 1 / span 3;

  display: flex;
  flex-direction: column;
  justify-content: center;

  background-color: var(--tdu-color);
  box-shadow:
    inset 5px 0 0 0 var(--tdu-color),
    inset 7px 0 0 0 white,
    inset -5px 0 0 0 var(--tdu-color),
    inset -7px 0 0 0 white;

  writing-mode: vertical-rl;
  text-orientation: sideways;

  button {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    padding-inline-start: 250px;

    width: 100%;
    height: auto;

    #tdu-logo {
      display: block;

      width: 450%;
      height: auto;

      transform: rotate(90deg);

      border: none;
      pointer-events: none;
    }
  }
}

header {
  grid-column: 2;
  grid-row: 1;
  padding: 20px;

  display: flex;
  flex-direction: column;
  justify-content: flex-end;

  background-image: linear-gradient(135deg, transparent 25%, var(--background-color)), url("img/clab.jpg");
  background-size: cover;
  background-position: center;

  text-align: right;
  color: var(--text-color);

  h1 {
    border: none;
    margin: 0;
    padding: 0;
    font-size: 2em;
    color: var(--text-color);
    font-family: var(--serif-font);
  }

  h2 {
    border: none;
    margin: 0;
    padding: 0;
    font-size: 1.3em;
    color: var(--text-color);
    font-family: var(--serif-font);
  }
}

/* --- Typography --- */
.section-title {
  padding-bottom: 5px;
  margin-bottom: 15px;
  border-bottom: 2px solid var(--tdu-color);
  font-size: 1.8rem;

  font-family: var(--serif-font);
  color: var(--text-color);
}

main {
  grid-column: 2;
  grid-row: 2;

  padding-top: 10px;
  padding-inline: 20px;
  padding-bottom: 15px;

  display: flex;
  flex-direction: column;

  font-size: 1.1rem;
  color: var(--text-color);

  >div {
    margin-bottom: 20px;
  }
}

footer {
  grid-column: 2;
  grid-row: 3;
  padding-block: 0.7em;
  background-color: #efefef;
  color: var(--text-color);

  p {
    text-align: center;
  }
}

/* --- Components --- */

/* Subject Links */
.subject-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.subject-link {
  padding: 10px;
  border-radius: 6px;

  width: 100%;

  text-decoration: none;
  text-align: left;
  color: var(--text-color);
  border: 1px solid #ddd;

  transition: ease 0.08s;

  &:hover {
    box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.3);
    color: var(--tdu-color);
  }
}

/* Card & Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.card {
  padding: 20px;

  border: 1px solid #ddd;
  border-radius: 8px;

  background: white;
}

.card-title {
  font-size: 1.2rem;
  padding-left: 10px;
  margin-bottom: 10px;
  border-left: 4px solid var(--tdu-color);
  font-family: var(--sans-serif-font);
  color: var(--tdu-color);
}

/* スマホ用のデザイン */
@media (max-width: 768px) {

  body,
  html {
    height: auto;
    min-height: 100vh;
  }

  #container {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr;
    width: 100%;
  }

  #sidebar {
    display: none;
  }

  header {
    grid-column: 1;
    grid-row: 2;
    padding-bottom: 10px;

    background-image: none;
    background: #fafafa;

    overflow: visible;
    text-align: center;
    font-size: 0.9rem;
  }

  main {
    grid-column: 1;
    grid-row: 3;
    width: 100%;
    box-sizing: border-box;
    padding-inline: 20px;
    padding-block: 0px;
    font-size: 1rem;
  }

  footer {
    grid-column: 1;
    grid-row: 4;
    padding: 10px;
    font-size: 0.8rem;
  }

  .card {
    padding: 10px;
  }
}