/* ==========================================================================
   Smart System Software Lab — base styles
   Palette: achromatic (grayscale) by design. Do not introduce hue accents.
   ========================================================================== */

:root {
  --bg: #f8f8f6;
  --ink: #161615;
  --ink-soft: #4c4b44;
  --muted: #8a8880;
  --muted-2: #9c9a8f;
  --line: #e7e5df;
  --card-bg: #ffffff;
  --dark: #1c1c1b;
  --dark-2: #2c2b28;

  --font-display: 'Fraunces', serif;
  --font-body: "Times New Roman", Times, serif;
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', monospace;

  --max-width: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
  font-family: var(--font-mono); font-size: 13px;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hero-photo {
  position: absolute;
  inset: 0;

  background-image: url('/images/smwu-summer_3.jpg');
  background-size: cover;
  background-position: center 46%;
  background-repeat: no-repeat;

  filter: saturate(0.9) contrast(1) brightness(0.95);
  transform: scale(1.02);
}

/* Once a real photo is added: replace .hero-photo background above with
   background-image: url('/images/hero-campus.jpg'); background-size: cover;
   background-position: center; and drop the filter/gradient rules. */

.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(248,248,246,.84) 0%,
      rgba(248,248,246,.72) 34%,
      rgba(248,248,246,.38) 64%,
      rgba(248,248,246,.16) 100%
    ),
    linear-gradient(
      180deg,
      rgba(248,248,246,.10) 0%,
      rgba(248,248,246,.18) 62%,
      rgba(248,248,246,.78) 100%
    );
}

.topbar {
  position: relative;
  z-index: 3;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 18px 28px;
  margin: 18px 24px 0;

  background: rgba(248, 248, 246, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 16px;

  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.site-nav a {
  color: rgba(22, 22, 21, 0.82);
}

.site-nav a.current {
  color: #111;
  font-weight: 600;
}

.brand {
  color: #111;
  font-weight: 600;
}

.brand {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink);
}

.site-nav {
  display: flex;
  gap: clamp(14px, 2.4vw, 26px);
  font-size: 13px;
  color: var(--ink-soft);
}

.site-nav a.current {
  color: var(--ink);
  font-weight: 500;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.hero-text {
  position: relative;
  z-index: 2;
  padding: 8px clamp(20px, 5vw, 44px) 0;
  max-width: 640px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 20px;
  letter-spacing: .1em;
  color: var(--ink-soft);
  margin: 0 0 18px;
}

.hero-text h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(34px, 5.5vw, 52px);
  line-height: 1.1;
  letter-spacing: -.015em;
  margin: 0 0 20px;
}

.hero-text h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--muted);
}

.lead {
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
  max-width: 100%;
  margin: 0 0 26px;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--ink);
  color: var(--bg);
  padding: 11px 18px;
  border-radius: 999px;
  transition: transform .15s ease;
}
.cta:hover { transform: translateY(-1px); }

/* ==========================================================================
   Quick links (floating card)
   ========================================================================== */

.quick-links {
  position: relative;
  z-index: 3;
  max-width: var(--max-width);
  margin: -64px auto 0;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 30px 60px -24px rgba(0,0,0,.18);
  padding: 10px 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.quick-links a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 10px;
  border-radius: 12px;
  transition: background .15s ease;
}
.quick-links a:hover,
.quick-links a:focus-visible { background: var(--bg); }

.quick-links .ic {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #f1f0eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink);
  flex-shrink: 0;
}

.quick-links .t { display: block; font-size: 13.5px; font-weight: 600; }
.quick-links .d { display: block; font-size: 11px; color: var(--muted); }

/* ==========================================================================
   Sections
   ========================================================================== */

.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px clamp(20px, 5vw, 44px) 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 20px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 24px;
  margin: 0;
}

.section-head a {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}
.section-head a:hover { color: var(--ink); }

.cards {
  display: grid;
  gap: 14px;
}

.research-cards {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 20px;
  box-shadow: 0 10px 30px -20px rgba(0,0,0,.12);
}

.card .n {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: #b3b0a3;
  margin-bottom: 22px;
}

.card h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  margin: 0 0 6px;
}

.card p {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

.card.hi {
  background: linear-gradient(155deg, var(--dark), var(--dark-2));
  color: #f2f1ec;
  border-color: var(--dark);
}
.card.hi .n { color: #77766e; }
.card.hi p { color: #a19f95; }

.news-cards { grid-template-columns: repeat(3, 1fr); }

.news-card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 20px 22px;
  box-shadow: 0 10px 30px -20px rgba(0,0,0,.12);
  position: relative;
}

.news-card .date {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted-2);
  margin: 0 0 14px;
}

.news-card h3 {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.5;
  margin: 0 0 8px;
}

.news-card p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 16px;
}

.news-card .arrow {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink);
}

/* ==========================================================================
   Terminal widget
   ========================================================================== */

.term-section { padding-bottom: 80px; }

.term-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
}

.eyebrow2 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--muted);
  margin: 0 0 12px;
  text-transform: uppercase;
}

.term-row h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 26px;
  margin: 0 0 12px;
}

.lead2 { font-size: 14px; line-height: 1.8; color: var(--ink-soft); margin: 0; }

.termwin {
  background: #111113;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 48px -18px rgba(0,0,0,.5);
  border: 1px solid #2a2a2c;
}

.termwin .chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 15px;
  border-bottom: 1px solid #232325;
}

.termwin .dot { width: 9px; height: 9px; border-radius: 50%; background: #4a4a4d; }
.termwin .dot:nth-child(2) { background: #3a3a3d; }
.termwin .dot:nth-child(3) { background: #2c2c2e; }

.termwin .fname {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: #6e6e72;
}

.termwin .out {
  padding: 18px 18px 20px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 2;
  color: #c9c8c3;
}

.termwin .muted { color: #68686c; }
.termwin .ok { color: #e5e4df; }

.termwin .cursor {
  display: inline-block;
  width: 6px;
  height: 12px;
  background: #c9c8c3;
  margin-left: 2px;
  vertical-align: -2px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding: 40px clamp(20px, 5vw, 44px) 28px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  align-items: flex-start;
}

.site-footer .brand { font-size: 13px; margin: 0 0 6px; }
.site-footer .addr { font-size: 12px; color: var(--muted); margin: 0; }

.footer-links { display: flex; gap: 20px; font-size: 12.5px; color: var(--ink-soft); }
.footer-links a:hover { color: var(--ink); }

.copyright {
  max-width: var(--max-width);
  margin: 24px auto 0;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 860px) {
  .quick-links { grid-template-columns: repeat(2, 1fr); margin-top: -40px; }
  .news-cards { grid-template-columns: 1fr; }
  .term-row { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--card-bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 30px -20px rgba(0,0,0,.2);
    max-height: 0;
    overflow: hidden;
    transition: max-height .2s ease;
  }
  .site-nav.open { max-height: 320px; }
  .site-nav a { padding: 14px 24px; border-top: 1px solid var(--line); }
  .nav-toggle { display: flex; }
}

/* ==========================================================================
   Research Areas
   ========================================================================== */

.research-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px clamp(20px, 5vw, 44px);
}

.research-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 22px;
}

.research-head h2 {
  margin: 0;

  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -.02em;

  color: var(--ink);
}

.research-more {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);

  transition: color .15s ease;
}

.research-more:hover {
  color: var(--ink);
}


/* grid */

.research-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}


/* card */

.research-card {
  position: relative;
  display: flex;
  flex-direction: column;

  min-height: 180px;
  padding: 22px 20px;

  background: var(--card-bg);

  border: 1px solid var(--line);
  border-radius: 14px;

  color: inherit;
  text-decoration: none;

  transition:
    background .2s ease,
    border-color .2s ease,
    transform .2s ease;
}

.research-card:hover {
  background: #f2f1ec;
  border-color: #d8d5cc;
  transform: translateY(-2px);
}


/* icon */

.research-icon {
  width: 23px;
  height: 23px;

  margin-bottom: auto;

  color: var(--ink-soft);
}

.research-icon svg {
  width: 100%;
  height: 100%;

  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}


/* title */

.research-card h3 {
  margin: 32px 0 7px;

  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.015em;

  color: var(--ink);
}


/* description */

.research-card p {
  margin: 0;

  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.55;

  color: var(--muted);
}


@media (max-width: 1100px) {
  .research-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}


@media (max-width: 700px) {
  .research-section {
    padding: 48px 20px;
  }

  .research-grid {
    grid-template-columns: 1fr;
  }

  .research-card {
    min-height: 150px;
  }
}

/* 카드 영역 */

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


/* 카드 */

.research-card {
  display: block;

  min-height: 205px;
  padding: 28px 24px;

  background: #fff;

  border: 1px solid #ececec;
  border-radius: 12px;

  color: inherit;
  text-decoration: none;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.research-card:hover {
  transform: translateY(-4px);

  border-color: #d8e1ff;

  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.06);
}


/* 아이콘 */

.research-icon {
  width: 28px;
  height: 28px;

  margin-bottom: 34px;

  color: #356df3;
}

.research-icon svg {
  width: 100%;
  height: 100%;

  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}


/* 제목 */

.research-card h3 {
  margin: 0 0 10px;

  font-family: Arial, "Noto Sans KR", sans-serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;

  color: #161616;
}


/* 설명 */

.research-card p {
  margin: 0;

  font-family: "Noto Sans KR", Arial, sans-serif;
  font-size: 13px;
  font-weight: 400;

  line-height: 1.65;

  color: #858585;
}


/* Tablet */

@media (max-width: 1100px) {

  .research-grid {
    grid-template-columns: repeat(3, 1fr);
  }

}


/* Mobile */

@media (max-width: 700px) {

  .research-section {
    padding: 64px 22px;
  }

  .research-head {
    margin-bottom: 24px;
  }

  .research-head h2 {
    font-size: 26px;
  }

  .research-grid {
    grid-template-columns: 1fr;
  }

  .research-card {
    min-height: auto;
    padding: 24px;
  }

  .research-icon {
    margin-bottom: 28px;
  }

}

.hero {
  position: relative;
  min-height: 530px;
  overflow: hidden;

  display: flex;
  flex-direction: column;
}


.hero-main {
  position: relative;
  z-index: 2;

  flex: 1;

  width: 100%;

  display: grid;
  grid-template-columns:
    minmax(0, .9fr)
    minmax(430px, 1.1fr);

  align-items: center;

  gap: clamp(40px, 7vw, 100px);

  padding:
    20px
    clamp(20px, 5vw, 44px)
    70px;
}


/* 기존 hero-text 속성 덮어쓰기 */

.hero-main .hero-text {
  max-width: 590px;
  padding: 0;

  display: block;
}


/* terminal */

.hero-terminal {
  width: 100%;
  max-width: 620px;

  justify-self: end;
}

.hero-terminal .eyebrow2 {
  margin-bottom: 10px;
}

.hero-terminal .termwin {
  box-shadow:
    0 28px 60px -24px rgba(0,0,0,.48);
}


/* tablet/mobile */

@media (max-width: 900px) {

  .hero-main {
    grid-template-columns: 1fr;

    gap: 34px;

    padding-bottom: 56px;
  }

  .hero-terminal {
    max-width: none;
    justify-self: stretch;
  }

}


@media (max-width: 600px) {

  .hero {
    min-height: auto;
  }

  .hero-main {
    padding-top: 60px;
  }

  .hero-terminal .termwin .out {
    font-size: 10.5px;
  }

}

/* =========================
   Font control
========================= */

/* 기본 본문은 TNR */
body {
  font-family: "Times New Roman", Times, serif;
}

/* 메인 큰 제목은 기존 display 폰트 유지 */
.hero-text h1,
.hero-text h1 em {
  font-family: var(--font-display);
}

/* 터미널은 mono 유지 */
.termwin,
.termwin * {
  font-family: var(--font-mono);
}

/* 터미널 제외, 나머지 주요 텍스트는 TNR */
.brand,
.site-nav,
.eyebrow,
.hero-sub,
.lead,
.cta,
.section-head h2,
.section-head a,
.research-head h2,
.research-more,
.research-card h3,
.research-card p,
.news-card .date,
.news-card h3,
.news-card p,
.site-footer .brand,
.site-footer .addr,
.footer-links,
.copyright {
  font-family: "Times New Roman", Times, serif;
}