/* ---------- Colors & fonts (edit here to restyle the whole site) ---------- */
:root {
  --teal: #009999;
  --bar: #fafafa;        /* header, footer, article cards */
  --cover-bg: #eeeeee;   /* behind home-page covers */
  --text: rgba(0, 0, 0, 0.87);
  --text-soft: rgba(0, 0, 0, 0.6);
  --header-height: 90px;
  --gap: 24px;
  --font: 'Hiragino Mincho ProN W6', 'Hiragino Mincho ProN', 'Times New Roman', Times, serif;
}

/* ---------- Page ---------- */
* { box-sizing: border-box; }
html { overflow-y: scroll; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
}
main {
  flex: 1;
  width: 100%;
  padding: calc(var(--header-height) + var(--gap)) var(--gap) var(--gap);
  overflow-x: hidden;
}
a { color: var(--teal); text-decoration: none; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  height: var(--header-height);
  background: var(--bar);
  display: flex;
  align-items: center;
  padding: 0 16px;
}
.logo img { height: 70px; width: auto; }

.nav-desktop {
  display: flex;
  align-items: stretch;
  height: 100%;
  padding-left: 32px;
}
.nav-desktop > a,
.dropdown > a {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 16px;
  color: var(--teal);
  font-weight: bold;
  font-size: 0.875rem;
  letter-spacing: 0.0892em;
  text-transform: uppercase;
}
.nav-desktop > a:hover,
.dropdown > a:hover { background: rgba(0, 153, 153, 0.08); }
.nav-desktop a.active { background: rgba(0, 153, 153, 0.2); }
.icon-small { width: 16px; height: 16px; fill: currentColor; }

.dropdown { position: relative; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% - 14px);
  left: 0;
  min-width: 260px;
  background: #fff;
  border-radius: 4px;
  padding: 8px 0;
  box-shadow: 0 5px 5px -3px rgba(0,0,0,.2), 0 8px 10px 1px rgba(0,0,0,.14), 0 3px 14px 2px rgba(0,0,0,.12);
}
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu { display: block; }
.dropdown-menu a {
  display: block;
  padding: 13px 16px;
  color: var(--text);
  font-size: 1rem;
}
.dropdown-menu a:hover { background: rgba(0, 0, 0, 0.04); }

/* Mobile menu (hidden on wide screens) */
.nav-mobile { display: none; margin-left: auto; }
.nav-mobile summary {
  list-style: none;
  cursor: pointer;
  padding: 8px;
}
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile summary svg { width: 36px; height: 36px; fill: #000; display: block; }
.nav-mobile-menu {
  position: fixed;
  top: var(--header-height);
  right: 0;
  width: 256px;
  max-width: 100vw;
  background: #fff;
  padding: 8px 0;
  box-shadow: 0 8px 10px -5px rgba(0,0,0,.2), 0 16px 24px 2px rgba(0,0,0,.14), 0 6px 30px 5px rgba(0,0,0,.12);
}
.nav-mobile-menu a {
  display: block;
  padding: 13px 16px;
  color: var(--text);
}
.nav-mobile-menu a.sub {
  padding: 10px 16px;
  font-size: 0.875rem;
  color: var(--text-soft);
}

/* ---------- Home: grid of covers ---------- */
.cover-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
}
.cover { background: var(--cover-bg); }
.cover img { width: 100%; max-height: 400px; object-fit: contain; }
.cover:hover img { opacity: 0.9; }

/* ---------- Articles ---------- */
.article-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  /* Cards in a column touch, forming one continuous off-white strip (like the original) */
  column-gap: var(--gap);
  row-gap: 0;
  margin-top: -12px;
}
.article-card {
  background: var(--bar);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 12px;
}
.article-cover img {
  width: 100%;
  height: 250px;
  object-fit: contain;
}
.article-info {
  font-size: 0.875rem;
  line-height: 1.375rem;
  color: var(--text);
}
.article-info > div { padding-bottom: 8px; }

/* ---------- About ---------- */
.about {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  align-items: center;
  gap: var(--gap);
  max-width: 1100px;
  margin: 0 auto;
}
.about-photo { flex: 0 1 380px; }
.about-photo img { max-height: 400px; margin: 0 auto; object-fit: contain; }
.about-text {
  flex: 0 1 560px;
  background: var(--bar);
  padding: 16px;
  font-size: 0.875rem;
  line-height: 1.375rem;
  color: #000;
}
.about-text p { margin: 0 0 1em; }
.about-text p:last-child { margin-bottom: 0; }

.not-found { text-align: center; padding: 48px 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bar);
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 12px;
}
.site-footer a {
  display: flex;
  padding: 6px;
  border-radius: 50%;
}
.site-footer a:hover { background: rgba(0, 0, 0, 0.06); }
.site-footer svg { width: 24px; height: 24px; fill: #000; }

/* ---------- Smaller screens ---------- */
@media (max-width: 959px) {
  .cover-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .article-cover img { height: 200px; }
}
@media (max-width: 599px) {
  :root { --gap: 16px; }
  .logo img { height: 40px; }
  .nav-desktop { display: none; }
  .nav-mobile { display: block; }
  .cover-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-grid { grid-template-columns: minmax(0, 1fr); }
  .article-cover img { height: 150px; }
  .about-photo, .about-text { flex-basis: 100%; }
}
