:root {
  --red: #a30f1c;
  --deep-red: #6f0615;
  --ink: #1d2329;
  --muted: #68737d;
  --line: #e8ebee;
  --paper: #f5f5f5;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", Arial, sans-serif;
  color: var(--ink);
  background: #fff;
}
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: auto; }
button, select { font: inherit; }
.inner { width: min(100% - 48px, 1200px); margin: 0 auto; }

.topbar {
  height: 26px;
  color: #fff;
  background: #5f0610;
  font-size: 12px;
}
.topbar .inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar a { margin-left: 16px; opacity: .86; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(14px);
}
.header-inner {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 250px;
}
.brand img { width: 44px; height: 44px; }
.brand strong { display: block; font-size: 18px; line-height: 1.1; }
.brand em { display: block; margin-top: 3px; color: #777; font-size: 12px; font-style: normal; }

.gnb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(42px, 5vw, 86px);
  flex: 1;
  font-size: 15px;
  font-weight: 700;
}
.gnb a { white-space: nowrap; }
.gnb-item {
  height: 70px;
  display: flex;
  align-items: center;
}
.gnb-link {
  height: 100%;
  display: flex;
  align-items: center;
  font-size: 16px;
  font-weight: 800;
}
.gnb-link:hover,
.gnb-item:focus-within .gnb-link,
.gnb-item.is-current .gnb-link { color: var(--red); }

.mega-panel {
  position: absolute;
  top: 70px;
  left: 0;
  right: 0;
  z-index: 25;
  color: #080808;
  background: #fff;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #e8e8e8;
  box-shadow: 0 22px 45px rgba(0,0,0,.08);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}
.mega-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--red);
}
.gnb-item:hover .mega-panel,
.gnb-item:focus-within .mega-panel,
.gnb-item.is-open .mega-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.mega-inner {
  min-height: 0;
  width: min(calc(100% - 48px), 1480px);
  max-height: calc(100vh - 128px);
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 30px;
  overflow-y: auto;
  padding: 28px 0 34px;
}
.mega-inner h2 {
  position: relative;
  min-height: 320px;
  margin: 0;
  padding: 48px 30px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(5, 22, 48, .98), rgba(8, 36, 72, .94)),
    linear-gradient(35deg, rgba(255,255,255,.06) 0 1px, transparent 1px 18px);
  font-size: 33px;
  line-height: 1.1;
  font-weight: 900;
  overflow: hidden;
}
.mega-inner h2::before {
  content: "SOGANG";
  display: block;
  margin-bottom: 18px;
  color: rgba(255,255,255,.58);
  font-size: 13px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.mega-inner h2::after {
  content: "주요 메뉴를 한 화면에서 빠르게 확인합니다.";
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 36px;
  color: rgba(255,255,255,.72);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 600;
  word-break: keep-all;
}
.mega-columns {
  display: grid;
  align-content: start;
  gap: 24px;
  min-width: 0;
}
.mega-columns-1 { grid-template-columns: minmax(0, 1fr); }
.mega-columns-2 { grid-template-columns: repeat(2, minmax(260px, 1fr)); }
.mega-columns-3 { grid-template-columns: repeat(3, minmax(220px, 1fr)); }
.mega-columns-4 { grid-template-columns: 1.05fr 1.15fr 1.15fr 1fr; }
.mega-col {
  min-width: 0;
  padding: 28px 30px;
  border: 1px solid #e2e6ea;
  background: #fff;
  box-shadow: 0 18px 35px rgba(16,24,40,.06);
}
.mega-columns-1 .mega-col {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 0;
}
.mega-col > a,
.mega-group {
  display: block;
  min-height: 0;
  padding: 0 0 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid #e7e7e7;
}
.mega-columns-1 .mega-col > a {
  min-height: 112px;
  margin: 0;
  padding: 30px 28px;
  border-right: 1px solid #e7e7e7;
  border-bottom: 0;
}
.mega-columns-1 .mega-col > a:last-child {
  border-right: 0;
}
.mega-col strong,
.mega-group > strong {
  display: block;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 900;
}
.mega-col > a strong {
  position: relative;
  padding-left: 12px;
}
.mega-col > a strong::before {
  content: "";
  position: absolute;
  top: .6em;
  left: 0;
  width: 4px;
  height: 4px;
  background: #b7bec8;
}
.mega-col > a:hover strong,
.mega-group a:hover {
  color: var(--red);
}
.mega-col > a:hover strong::before {
  background: var(--red);
}
.mega-col > a.menu-mark-red strong {
  color: var(--red);
}
.mega-col > a.menu-mark-red strong::before {
  background: var(--red);
}
.mega-group a {
  position: relative;
  display: block;
  margin-top: 8px;
  padding-left: 12px;
  color: #1c1c1c;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
  word-break: keep-all;
}
.mega-group a::before {
  content: "";
  position: absolute;
  top: .65em;
  left: 0;
  width: 4px;
  height: 4px;
  background: #b7bec8;
}
.mega-group a:hover::before {
  background: var(--red);
}
.mega-group a[href$="council.html"],
.mega-group a[href$="admission-guide.html"],
.mega-group a[href*="/undergraduate/convergence-software/"],
.mega-group a[href*="/undergraduate/bigdata-science/"],
.mega-group a[href*="/undergraduate/ai-convergence/"] {
  color: var(--red);
  font-weight: 900;
}
.mega-group a[href$="council.html"]::before,
.mega-group a[href$="admission-guide.html"]::before,
.mega-group a[href*="/undergraduate/convergence-software/"]::before,
.mega-group a[href*="/undergraduate/bigdata-science/"]::before,
.mega-group a[href*="/undergraduate/ai-convergence/"]::before {
  background: var(--red);
}
.mega-col > a:last-child,
.mega-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}
.mega-inner-education {
  width: min(calc(100% - 48px), 1480px);
  max-height: calc(100vh - 128px);
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 30px;
  overflow-y: auto;
  padding: 28px 0 34px;
}
.mega-inner-education > h2 {
  position: relative;
  min-height: 430px;
  padding: 48px 30px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(5, 22, 48, .98), rgba(8, 36, 72, .94)),
    linear-gradient(35deg, rgba(255,255,255,.06) 0 1px, transparent 1px 18px);
  font-size: 33px;
  border-radius: 0;
  overflow: hidden;
}
.mega-inner-education > h2::before {
  content: "Academics";
  display: block;
  margin-bottom: 18px;
  color: rgba(255,255,255,.58);
  font-size: 13px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.mega-inner-education > h2::after {
  content: "학사부터 대학원, 특수대학원까지 한 화면에서 빠르게 이동합니다.";
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 36px;
  color: rgba(255,255,255,.72);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 600;
  word-break: keep-all;
}
.mega-inner-education > .education-mega-layout {
  display: grid !important;
  grid-template-columns: 350px minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
  min-width: 0;
}
.education-primary,
.education-special {
  min-width: 0;
  border: 1px solid #e2e6ea;
  background: #fff;
  box-shadow: 0 18px 35px rgba(16,24,40,.06);
}
.education-primary {
  padding: 28px 30px;
}
.education-goal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 0 20px;
  margin-bottom: 22px;
  border-bottom: 2px solid #111;
}
.education-goal::after {
  content: "바로가기";
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
}
.education-goal[href$="goal.html"] strong {
  color: var(--red);
}
.education-goal[href$="goal.html"] {
  border-bottom-color: var(--red);
}
.education-goal strong,
.education-primary h3,
.education-special h3 {
  color: #111;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 900;
}
.education-primary section {
  padding: 20px 0;
  border-bottom: 1px solid #e7e7e7;
}
.education-primary section:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.education-primary h3,
.education-special h3 {
  margin: 0 0 14px;
}
.education-link-list,
.education-split-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}
.education-link-list.two-items {
  grid-template-columns: 1fr;
}
.education-link-list a,
.education-special a {
  position: relative;
  display: block;
  min-width: 0;
  padding-left: 12px;
  color: #30363d;
  font-size: 14px;
  line-height: 1.38;
  font-weight: 600;
  white-space: normal;
  word-break: keep-all;
}
.education-link-list a::before,
.education-special a::before {
  content: "";
  position: absolute;
  top: .62em;
  left: 0;
  width: 4px;
  height: 4px;
  background: #b7bec8;
}
.education-link-list a:hover,
.education-special a:hover {
  color: var(--red);
  font-weight: 900;
}
.education-link-list a.needs-data,
.education-link-list a.needs-data span {
  color: var(--red);
  font-weight: 900;
}
.education-link-list a[href$="council.html"],
.education-special a[href$="council.html"],
.education-link-list a[href$="admission-guide.html"],
.education-special a[href$="admission-guide.html"],
.education-link-list a[href$="goal.html"],
.education-special a[href$="goal.html"],
.education-link-list a[href*="/undergraduate/convergence-software/"],
.education-link-list a[href*="/undergraduate/bigdata-science/"],
.education-link-list a[href*="/undergraduate/ai-convergence/"],
.education-special a[href*="/undergraduate/convergence-software/"],
.education-special a[href*="/undergraduate/bigdata-science/"],
.education-special a[href*="/undergraduate/ai-convergence/"] {
  color: var(--red);
  font-weight: 900;
}
.education-link-list a:hover::before,
.education-special a:hover::before {
  background: var(--red);
}
.education-link-list a[href$="council.html"]::before,
.education-special a[href$="council.html"]::before,
.education-link-list a.needs-data::before,
.education-link-list a[href$="admission-guide.html"]::before,
.education-special a[href$="admission-guide.html"]::before,
.education-link-list a[href*="/undergraduate/convergence-software/"]::before,
.education-link-list a[href*="/undergraduate/bigdata-science/"]::before,
.education-link-list a[href*="/undergraduate/ai-convergence/"]::before,
.education-special a[href*="/undergraduate/convergence-software/"]::before,
.education-special a[href*="/undergraduate/bigdata-science/"]::before,
.education-special a[href*="/undergraduate/ai-convergence/"]::before {
  background: var(--red);
}
.education-special {
  display: grid !important;
  grid-template-columns: 260px minmax(0, 1fr);
  background: #fafbfc;
}
.education-special-head {
  padding: 34px 28px;
  color: #fff;
  background:
    linear-gradient(145deg, #8f0716, #202832 82%),
    repeating-linear-gradient(45deg, transparent 0 22px, rgba(255,255,255,.08) 23px 24px);
}
.education-special-head strong {
  display: block;
  font-size: 29px;
  line-height: 1.14;
  font-weight: 900;
}
.education-special-head span {
  display: block;
  margin-top: 18px;
  color: rgba(255,255,255,.76);
  font-size: 14px;
  line-height: 1.65;
  word-break: keep-all;
}
.education-special-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}
.education-special-grid section {
  min-width: 0;
  padding: 25px 28px;
  border-left: 1px solid #e2e6ea;
  border-bottom: 1px solid #e2e6ea;
  background: #fff;
}
.education-special-grid .span-2 {
  grid-column: 1 / -1;
}
.education-special-grid section > a,
.education-split-links a {
  margin-top: 8px;
}
.education-split-links.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.education-board-links {
  grid-template-columns: 1fr;
}
.education-menu-group.is-board {
  background: #fbf8f9;
}
.global-program {
  background: #fbf8f9 !important;
}

.header-actions { display: flex; align-items: center; gap: 16px; }
.icon-btn, .menu-btn {
  border: 0;
  background: transparent;
  cursor: pointer;
}
.search-icon {
  display: block;
  width: 21px;
  height: 21px;
  border: 2px solid #222;
  border-radius: 50%;
  position: relative;
}
.search-icon::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 2px;
  right: -6px;
  bottom: -2px;
  background: #222;
  transform: rotate(45deg);
}
.menu-btn {
  width: 28px;
  height: 24px;
  display: grid;
  gap: 5px;
}
.menu-btn span { height: 2px; background: #202020; }

.sub-visual {
  color: #fff;
  background:
    linear-gradient(120deg, rgba(65, 0, 29, .92), rgba(159, 15, 28, .88)),
    repeating-linear-gradient(45deg, transparent 0 34px, rgba(255,255,255,.08) 35px 36px);
}
.sub-visual .inner {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.breadcrumb {
  display: flex;
  gap: 9px;
  margin-bottom: 28px;
  color: rgba(255,255,255,.75);
  font-size: 14px;
}
.breadcrumb span + span::before {
  content: "/";
  margin-right: 9px;
  color: rgba(255,255,255,.45);
}
.sub-visual h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 64px);
  line-height: 1;
  font-weight: 900;
}
.sub-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 72px;
  padding: 56px 0 120px;
}
.sub-layout-wide {
  display: block;
}
.lnb h2 {
  margin: 0 0 24px;
  color: var(--red);
  font-size: 28px;
}
.lnb a {
  display: block;
  padding: 17px 2px;
  border-bottom: 1px solid #ddd;
  font-weight: 800;
}
.lnb a.is-active { color: var(--red); }
.content-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 26px;
  border-bottom: 2px solid #111;
}
.content-head h2 {
  margin: 0;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
  font-weight: 900;
}
.content-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.footer {
  padding: 42px 0 48px;
  color: rgba(255,255,255,.68);
  background: #151515;
  font-size: 13px;
}
.footer .inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}
.footer strong { color: #fff; }
.footer select {
  width: 170px;
  height: 34px;
  color: rgba(255,255,255,.75);
  border: 1px solid #444;
  background: #1d1d1d;
}

@media (max-width: 1080px) {
  .gnb {
    position: fixed;
    top: 96px;
    left: 0;
    right: 0;
    display: none;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    padding: 0 24px 28px;
    background: #fff;
    border-bottom: 1px solid var(--line);
  }
  .gnb.is-open { display: block; }
  .gnb-item {
    height: auto;
    display: block;
    border-bottom: 1px solid #eee;
  }
  .gnb-link {
    height: auto;
    padding: 22px 0;
    font-size: 22px;
  }
  .mega-panel {
    position: static;
    display: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    border: 0;
    box-shadow: none;
  }
  .mega-panel::before { display: none; }
  .gnb.is-open .mega-panel,
  .gnb-item.is-open .mega-panel { display: block; }
  .mega-inner {
    width: 100%;
    display: block;
    padding: 0 0 24px;
  }
  .mega-inner h2 { display: none; }
  .mega-columns,
  .mega-columns-1,
  .mega-columns-2,
  .mega-columns-3,
  .mega-columns-4 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 28px;
  }
  .mega-col {
    padding: 20px;
    box-shadow: none;
  }
  .mega-columns-1 .mega-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0;
  }
  .mega-columns-1 .mega-col > a {
    min-height: 88px;
    padding: 22px 20px;
    border-right: 1px solid #ececec;
    border-bottom: 1px solid #ececec;
  }
  .mega-columns-1 .mega-col > a:nth-child(2n) {
    border-right: 0;
  }
  .mega-inner-education {
    width: 100%;
  }
  .education-menu .mega-col {
    padding: 0;
    border: 0;
  }
  .education-menu .mega-group a {
    display: block;
    width: auto;
    min-height: 0;
    margin-right: 0;
  }
  .education-mega-layout,
  .education-special {
    grid-template-columns: 1fr;
  }
  .education-special-head {
    padding: 20px;
  }
  .mega-col > a,
  .mega-group {
    min-height: 0;
    margin-bottom: 0;
    padding: 0 0 14px;
    border-bottom: 1px solid #ececec;
  }
  .mega-col strong,
  .mega-group > strong { font-size: 16px; }
  .mega-group a { margin-top: 10px; font-size: 14px; }
  .sub-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .lnb {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 20px;
  }
  .lnb h2 { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .inner { width: min(100% - 32px, 1200px); }
  .topbar { display: none; }
  .header-inner { height: 64px; }
  .brand { min-width: 0; }
  .brand strong { font-size: 16px; }
  .brand em { display: none; }
  .brand img { width: 38px; height: 38px; }
  .gnb {
    top: 64px;
    max-height: calc(100vh - 64px);
  }
  .mega-columns,
  .mega-columns-1,
  .mega-columns-2,
  .mega-columns-3,
  .mega-columns-4 { grid-template-columns: 1fr; }
  .mega-columns-1 .mega-col {
    grid-template-columns: 1fr;
  }
  .mega-columns-1 .mega-col > a {
    min-height: 0;
    border-right: 0;
  }
  .education-link-list,
  .education-split-links,
  .education-split-links.compact,
  .education-special-grid {
    grid-template-columns: 1fr;
  }
  .education-special-grid .span-2 {
    grid-column: auto;
  }
  .sub-visual .inner { min-height: 210px; }
  .sub-layout { padding: 52px 0 82px; }
  .lnb { grid-template-columns: 1fr; }
  .content-head { display: block; }
  .content-head p { margin-top: 12px; }
  .footer .inner { flex-direction: column; }
}
