/* ==========================================================================
   MISL refresh — readability & mobile layer
   Loaded AFTER files/main_style.css on every page. It keeps the original
   Weebly "Cento" layout, red palette and content, and only improves fonts,
   sizes, contrast and small-screen behaviour. Delete this <link> to revert.
   ========================================================================== */

:root {
  --misl-red:       #b52f2f;  /* headings, accents      (orig. #c23b3b) */
  --misl-red-dark:  #8d2424;  /* labels, links          (orig. #8d2424) */
  --misl-ink:       #1f1f1f;  /* titles                                 */
  --misl-text:      #2e2e2e;  /* body text              (orig. #3e3e3e) */
  --misl-muted:     #555555;  /* menu, captions         (orig. #b9b9b9) */
  --misl-rule:      #e6e2de;
  --misl-tint:      #faf6f5;
  --misl-sans:    "Open Sans", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --misl-display: "Montserrat", "Noto Sans KR", "Open Sans", system-ui, sans-serif;  /* replaces Komika Axis */
}

/* ---------- Base type ---------------------------------------------------- */
html { font-size: 17px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  color: var(--misl-text);
  font-family: var(--misl-sans);
  font-size: 1rem;
  line-height: 1.65;
  word-break: keep-all;          /* keep Korean words together */
  overflow-wrap: break-word;     /* but never overflow the screen */
}
p, div.paragraph { line-height: 1.7; margin-bottom: 14px; }

/* Old inline <font size=…> tags: map to a calm, consistent scale */
font[size="1"] { font-size: 0.82rem; }
font[size="2"] { font-size: 0.9rem; }
font[size="3"] { font-size: 1rem; }
font[size="4"] { font-size: 1.06rem; }
font[size="5"] { font-size: 1.5rem; }
font[size="6"] { font-size: 1.9rem; }

/* Old inline <font color=…> tags: same hues, better contrast */
font[color="#c23b3b"], font[color="#C23B3B"] { color: var(--misl-red) !important; }
font[color="#da4444"], font[color="#DA4444"],
font[color="#a82e2e"], font[color="#A82E2E"] { color: var(--misl-red) !important; }
font[color="#8d2424"], font[color="#8D2424"] { color: var(--misl-red-dark) !important; }
font[color="#2a2a2a"] { color: var(--misl-text) !important; }

/* ---------- Headings ----------------------------------------------------- */
h2, h2.wsite-content-title {
  color: var(--misl-ink);
  font-family: var(--misl-display);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 8px 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--misl-rule);
}
h2 font[size] { font-size: inherit; }

/* Beat the per-page Weebly <style> block (it uses !important) */
html body #wsite-title {
  font-family: var(--misl-display) !important;
  font-size: 2rem !important;          /* orig. 28px Komika Axis */
  font-weight: 800 !important;
  color: var(--misl-red-dark) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  line-height: 1.15 !important;
}
html body #wsite-content h2,
html body .wsite-elements.wsite-not-footer h2 {
  font-family: var(--misl-display) !important;
  font-size: 1.45rem !important;       /* orig. 21px Komika Axis */
  font-weight: 700 !important;
  letter-spacing: 0.01em !important;
  color: var(--misl-red) !important;
}
html body .nav .wsite-menu-default a,
html body #wsite-menus .wsite-menu a {
  font-family: var(--misl-sans) !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;        /* orig. 16px light grey */
}

/* ---------- Links -------------------------------------------------------- */
a { color: var(--misl-red-dark); }
.content-wrap a[href] {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.content-wrap a[href]:hover { color: var(--misl-red); }
.content-wrap a:not([href]) { color: inherit; }  /* image wrappers / empty links */
a:focus-visible { outline: 2px solid var(--misl-red); outline-offset: 2px; }

/* ---------- Header & menu ------------------------------------------------ */
.cento-header { padding-top: 34px; }
.cento-header .logo, .cento-header .logo a { color: var(--misl-red-dark); }
.cento-header .logo #wsite-title { max-width: none; }
.cento-header .logo { margin-bottom: 14px; }

.cento-header .nav-wrap {
  border-top: 1px solid var(--misl-rule);
  border-bottom: 1px solid var(--misl-rule);
  padding: 4px 0;
}
.nav ul li { padding: 0 2px; }
.nav ul li a,
.nav ul li a.wsite-menu-item {
  color: var(--misl-muted);
  font-family: var(--misl-sans);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 10px 14px;
  border-bottom: 2px solid transparent;
}
.nav ul li#active > a.wsite-menu-item,
.nav ul li > a.wsite-menu-item:hover {
  color: var(--misl-red);
  border-bottom-color: var(--misl-red);
}

/* Desktop drop-down built by Weebly */
#wsite-menus .wsite-menu { border-color: var(--misl-rule); box-shadow: 0 6px 18px rgba(0,0,0,.08); }
#wsite-menus .wsite-menu li a {
  color: var(--misl-muted); font-family: var(--misl-sans); font-size: 0.9rem;
  font-weight: 600; padding: 10px 16px; border-bottom-color: var(--misl-rule);
}
#wsite-menus .wsite-menu li a:hover { color: var(--misl-red); background: var(--misl-tint); }

/* Keep the menu in view while scrolling on desktop */
@media screen and (min-width: 768px) {
  .cento-header .nav-wrap { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.97); }
  .cento-header { overflow: visible; }
  .wrapper { overflow: visible; }
}

/* ---------- Content area ------------------------------------------------- */
.container { max-width: 1040px; }
.content-wrap .container { padding: 44px 28px; }

hr.styled-hr { border: 0; border-top: 1px solid var(--misl-rule); height: 0; background: none; }

/* Figures */
.wsite-image img, .content-wrap img { max-width: 100% !important; height: auto !important; }
.wsite-image img { border-radius: 2px; }

/* ---------- Footer block (logo + address table at the end of each page) - */
.wsite-multicol-table { width: 100%; }
.wsite-multicol-col .paragraph { line-height: 1.5; }

/* ==========================================================================
   Tablet
   ========================================================================== */
@media screen and (max-width: 992px) {
  html { font-size: 16.5px; }
  .content-wrap .container { padding: 32px 24px; }
}

/* ==========================================================================
   Phone
   ========================================================================== */
@media screen and (max-width: 767px) {
  html { font-size: 16px; }
  body { font-size: 1rem; }

  /* Fixed top bar: taller, real touch targets */
  .cento-header { height: 56px; padding: 0; background: #fff; border-bottom: 1px solid var(--misl-rule); box-shadow: 0 1px 6px rgba(0,0,0,.05); }
  .cento-header .container { height: 56px; display: flex; align-items: center; justify-content: center; position: relative; }
  .cento-header .logo { height: auto; margin: 0 auto; max-width: calc(100vw - 112px); display: block; }
  .cento-header .logo .wsite-logo { display: block; }
  .cento-header .logo a, .cento-header #wsite-title {
    font-size: 15px !important; line-height: 1.2 !important; letter-spacing: 0.03em;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .cento-header .hamburger {
    top: 50%; left: 6px; transform: translateY(-50%);
    width: 44px; height: 44px; padding: 0; box-sizing: border-box;
    display: flex; align-items: center; justify-content: center;
  }
  .cento-header .hamburger span { top: 0; left: 0; margin: 0; }
  .cento-header .hamburger span:before { top: -7px; }
  .cento-header .hamburger span:after  { bottom: -5px; }
  .cento-header .hamburger span, .cento-header .hamburger span:before, .cento-header .hamburger span:after { background: var(--misl-ink); width: 22px; }
  body.nav-open .cento-header .hamburger span { background: transparent; }

  .cento-header .nav-wrap { display: none !important; }  /* desktop bar; phones use the slide-down menu */
  .content-wrap, .no-header-page .content-wrap { margin-top: 56px; }

  /* Slide-down menu */
  .mobile-nav { top: 56px; background: #fff; box-shadow: 0 8px 16px rgba(0,0,0,.08); }
  body.nav-open .mobile-nav { max-height: calc(100vh - 56px); padding: 6px 0 14px; }
  .mobile-nav ul li { text-align: left; border-bottom: 1px solid var(--misl-rule) !important; }
  .mobile-nav ul li:last-child { border-bottom: 0 !important; }
  .mobile-nav ul li a.wsite-menu-item,
  .mobile-nav ul li a.wsite-menu-subitem {
    display: block; padding: 14px 24px; min-height: 22px;
    font-size: 1rem; letter-spacing: 0.06em; color: var(--misl-text); border: 0;
  }
  .mobile-nav ul li.wsite-menu-item-wrap#active > a.wsite-menu-item { color: var(--misl-red); }
  /* Show the Publication sub-pages directly, indented */
  .mobile-nav ul li .wsite-menu-wrap { max-height: none !important; }
  .mobile-nav .wsite-menu { background: var(--misl-tint); border: 0; }
  .mobile-nav .wsite-menu li { border-bottom: 0 !important; border-top: 1px solid var(--misl-rule) !important; }
  .mobile-nav .wsite-menu li a.wsite-menu-subitem { padding: 11px 24px 11px 44px; font-size: 0.95rem; letter-spacing: 0.03em; text-transform: none; }
  .mobile-nav .icon-caret { display: none !important; }

  /* Content */
  .content-wrap .container, .no-header-page .content-wrap .container { padding: 24px 18px 32px; }
  h2, h2.wsite-content-title { margin-bottom: 14px; }
  html body #wsite-content h2, html body .wsite-elements.wsite-not-footer h2 { font-size: 1.28rem !important; }
  font[size="5"] { font-size: 1.35rem; }
  font[size="4"] { font-size: 1.02rem; }

  /* Justified text makes big gaps on narrow screens */
  .paragraph[style*="justify"], .paragraph, div.paragraph, p { text-align: left !important; }

  /* Multi-column blocks (members, footer, professor) stack */
  .wsite-multicol-table-wrap { margin: 0 !important; }
  .wsite-multicol-table, .wsite-multicol-tbody, .wsite-multicol-tr, .wsite-multicol-col {
    display: block !important; width: 100% !important; box-sizing: border-box;
  }
  .wsite-multicol-col { padding: 0 !important; }
  .wsite-multicol-col .paragraph[style*="right"] { text-align: left !important; }
  .wsite-multicol-col .wsite-image[style*="left"] { text-align: left !important; }

  /* Text-wrapped photos (e.g. professor portrait): put the photo above the text */
  .content-wrap .imgPusher { display: none !important; }
  .content-wrap .wsite-section-elements > span[style*="float"] {
    float: none !important; display: table !important;
    margin: 0 auto 18px !important; clear: both !important;
  }

  /* Images: centre, never overflow */
  .wsite-image { margin-left: 0 !important; margin-right: 0 !important; }
  .wsite-image img { max-width: 100% !important; }

  /* Any wide table (e.g. file download boxes) scrolls instead of breaking layout */
  .content-wrap table:not(.wsite-multicol-table) { display: block; max-width: 100%; overflow-x: auto; }
}

/* ---------- Print -------------------------------------------------------- */
@media print {
  .cento-header .nav-wrap, .mobile-nav, .hamburger { display: none !important; }
  .content-wrap { margin-top: 0 !important; }
  a { color: #000; }
}
