:root {
  --ink: #212121;
  --ink-mid: #363636;
  --ink-soft: #888;
  --line: #e5e5e5;
  --bg: #ffffff;
  --bg-gray: #f7f7f7;
  --bg-dark: #1e2126;
  --font: "Apple SD Gothic Neo", "Malgun Gothic", "Nanum Gothic", "Noto Sans KR", sans-serif;
  --max-w: 1200px;
  --gutter: 30px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink-mid);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ============ Header ============ */
.header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 84px;
}
.brand img { height: 40px; width: auto; }

.nav { display: flex; gap: 8px; align-items: center; height: 100%; }
.nav-item { position: relative; height: 100%; display: flex; align-items: center; }
.nav-item > a, .nav > a {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-mid);
  padding: 10px 22px;
  transition: color .15s;
  display: block;
}
.nav-item > a:hover, .nav > a:hover { color: #000; }
.nav-item > a.active, .nav > a.active { color: #000; border-bottom: 2px solid var(--ink); }
.nav-sub {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  min-width: 160px;
  padding: 6px 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s, transform .15s;
}
.nav-item:hover .nav-sub {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-sub a {
  display: block;
  padding: 10px 18px;
  font-size: 14px;
  color: var(--ink-mid);
  text-align: center;
}
.nav-sub a:hover { background: var(--bg-gray); color: #000; }
.nav-sub a.active { background: var(--bg-gray); color: #000; font-weight: 700; }
.menu-toggle { display: none; }

/* ============ Section base ============ */
.section-title-en {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
  line-height: 1.2;
}
.section-sub {
  font-size: 14px;
  color: var(--ink-soft);
  margin-top: 10px;
}
.btn-outline {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-mid);
  border: 1px solid var(--ink-mid);
  padding: 10px 26px;
  transition: all .15s;
}
.btn-outline:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ============ Sub page banner ============ */
.page-banner {
  position: relative;
  height: 280px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.32);
}
.page-banner h1 {
  position: relative;
  color: #fff;
  font-size: clamp(30px, 3.6vw, 42px);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 10px rgba(0,0,0,0.35);
}

/* ============ Sub nav tabs ============ */
.sub-nav {
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.sub-nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  gap: 4px;
  overflow-x: auto;
}
.sub-nav a {
  padding: 17px 26px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.sub-nav a:hover { color: var(--ink); }
.sub-nav a.active {
  color: var(--ink);
  font-weight: 700;
  border-bottom-color: var(--ink);
}

/* ============ Page content ============ */
.page-content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 70px var(--gutter) 100px;
}
.page-head-row {
  display: flex;
  align-items: baseline;
  gap: 24px;
  padding-bottom: 26px;
  margin-bottom: 50px;
  border-bottom: 1px solid var(--line);
}
.page-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
}
.page-slogan {
  font-size: 14px;
  color: var(--ink-soft);
}

.content-heading {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 18px;
  word-break: keep-all;
}
.content-body {
  font-size: 15.5px;
  line-height: 1.9;
  color: var(--ink-mid);
  word-break: keep-all;
}
.content-body p + p { margin-top: 18px; }
.content-body strong { color: var(--ink); font-weight: 700; }

/* ============ Info table ============ */
.info-rows { border-top: 2px solid var(--ink); }
.info-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  border-bottom: 1px solid var(--line);
}
.info-row dt {
  padding: 16px 18px;
  background: var(--bg-gray);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
}
.info-row dd {
  padding: 16px 22px;
  font-size: 14.5px;
  color: var(--ink-mid);
  line-height: 1.8;
}

/* ============ Data table ============ */
.data-table-wrap { overflow-x: auto; border-top: 2px solid var(--ink); }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 640px;
}
.data-table th, .data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.data-table thead th {
  background: var(--bg-gray);
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}
.data-table tbody tr:hover td { background: #fbfbfb; }

/* ============ History timeline ============ */
.history-list { border-top: 2px solid var(--ink); }
.history-item {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 30px;
  padding: 22px 6px;
  border-bottom: 1px solid var(--line);
}
.history-date {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}
.history-title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}
.history-desc {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.8;
  word-break: keep-all;
}

/* ============ Image grid ============ */
.img-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}
.img-figure { text-align: center; }
.img-figure img { margin: 0 auto; border: 1px solid var(--line); }
.img-figure figcaption {
  margin-top: 14px;
  font-size: 14.5px;
  color: var(--ink-mid);
  font-weight: 600;
}

/* ============ Portfolio cards ============ */
.pf-section-title {
  font-size: 21px;
  font-weight: 700;
  color: var(--ink);
  padding-bottom: 14px;
  margin: 56px 0 26px;
  border-bottom: 2px solid var(--ink);
}
.pf-section-title:first-child { margin-top: 0; }
.pf-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.pf-card {
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.pf-card:hover {
  box-shadow: 0 10px 28px rgba(0,0,0,0.1);
  transform: translateY(-3px);
}
.pf-thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #eee;
}
.pf-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .35s;
}
.pf-card:hover .pf-thumb img { transform: scale(1.05); }
.pf-body { padding: 20px 22px 22px; }
.pf-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
  word-break: keep-all;
  line-height: 1.4;
}
.pf-spec {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.65;
  word-break: keep-all;
}

/* ============ News list ============ */
.news-list-full { border-top: 2px solid var(--ink); }
.news-row {
  display: grid;
  grid-template-columns: 56px 1fr 100px;
  gap: 20px;
  padding: 18px 8px;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.news-row-no { font-size: 14px; color: var(--ink-soft); text-align: center; }
.news-row-title { font-size: 15.5px; font-weight: 600; color: var(--ink); word-break: keep-all; }
.news-row-date { font-size: 13.5px; color: var(--ink-soft); text-align: right; }
.news-detail {
  padding: 14px 8px 20px 76px;
  border-bottom: 1px solid var(--line);
  background: #fbfbfb;
  font-size: 14px;
  color: var(--ink-mid);
  line-height: 1.9;
}

/* ============ Footer ============ */
.footer {
  background: var(--bg-gray);
  border-top: 1px solid var(--line);
  padding: 34px 0;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
}
.footer-text {
  font-size: 13px;
  color: #777;
  line-height: 1.9;
}
.footer-text b { color: #555; font-weight: 600; }
.footer-logo img { height: 34px; width: auto; opacity: 0.85; }

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .pf-grid { grid-template-columns: repeat(2, 1fr); }
  .img-grid-2 { grid-template-columns: 1fr; }
  .info-row { grid-template-columns: 140px 1fr; }
}
@media (max-width: 720px) {
  :root { --gutter: 20px; }
  .header-inner { height: 66px; }
  .brand img { height: 30px; }
  .nav {
    display: none;
    position: fixed;
    top: 66px; left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    padding: 10px 0;
    height: auto;
    z-index: 99;
    max-height: calc(100vh - 66px);
    overflow-y: auto;
  }
  .nav.open { display: flex; }
  .nav-item { width: 100%; height: auto; flex-direction: column; align-items: stretch; }
  .nav-item > a, .nav > a { padding: 13px 24px; }
  .nav-item > a.active, .nav > a.active { border-bottom: none; }
  .nav-sub {
    position: static;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    border: none;
    box-shadow: none;
    background: var(--bg-gray);
    padding: 0;
  }
  .nav-sub a { text-align: left; padding: 11px 40px; }
  .menu-toggle {
    display: block;
    background: none;
    border: 1px solid var(--line);
    padding: 8px 14px;
    font-size: 13px;
    cursor: pointer;
    color: var(--ink-mid);
    font-weight: 600;
  }
  .page-banner { height: 190px; }
  .page-content { padding: 44px var(--gutter) 64px; }
  .page-head-row { flex-direction: column; gap: 6px; margin-bottom: 34px; }
  .section-title-en { font-size: 26px; }
  .pf-grid { grid-template-columns: 1fr; }
  .info-row { grid-template-columns: 1fr; }
  .info-row dt { padding: 12px 16px; }
  .history-item { grid-template-columns: 1fr; gap: 6px; }
  .news-row { grid-template-columns: 1fr 90px; }
  .news-row-no { display: none; }
  .news-detail { padding-left: 8px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
}
