/* 디자인 설정: 색상, 글꼴, 간격은 이 영역에서 수정합니다. */
:root {
  --color-bg: #f7f8f4;
  --color-surface: #ffffff;
  --color-ink: #202e29;
  --color-muted: #606d65;
  --color-primary: #1e493e;
  --color-accent: #e4efb4;
  --color-line: #dce2da;
  --font-body: "Pretendard", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
  --space-1: .5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 5rem;
  --content-width: 1200px;
  --page-gutter: clamp(1.25rem, 4vw, 3.5rem);
  --radius: 4px;
  /* 헤더 전용 설정: 이미지 비율은 object-fit: contain으로 유지합니다. */
  --header-width: 1440px;
  --header-height: 112px;
  --header-align: center;
  --header-gap: 2rem;
  --logo-school-width: 64px;
  --logo-lab-width: 64px;
  --logo-height: 48px;
  --logo-gap: 14px;
  --logo-align: center;
  --logo-object-position: center;
  --logo-divider-height: 32px;
  /* 제공된 정사각 로고의 원형 문양 영역만 표시합니다. 이미지 파일은 변경하지 않습니다. */
  --logo-symbol-size: 68px;
  --logo-symbol-scale: 133.333333%;
  --logo-symbol-left: -17.708333%;
  --logo-symbol-top: -.520833%;
  --brand-gap: 18px;
  --brand-name-size: 1.15rem;
  --brand-sub-size: .8rem;
  --nav-gap: clamp(.75rem, 1.15vw, 1.2rem);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--color-bg); color: var(--color-ink); font-family: var(--font-body); font-size: 16px; line-height: 1.75; word-break: keep-all; overflow-wrap: anywhere; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
[hidden] { display: none !important; }
a:focus-visible, button:focus-visible { outline: 3px solid #977029; outline-offset: 5px; }
a:hover { text-decoration: underline; text-underline-offset: 5px; }
.container { width: min(var(--content-width), calc(100% - var(--page-gutter) * 2)); margin-inline: auto; }
.skip-link { position: fixed; top: -100px; left: 1rem; z-index: 10; padding: 1rem; background: white; }
.skip-link:focus { top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.site-header { background: var(--color-surface); border-bottom: 1px solid var(--color-line); }
.header-inner { width: min(var(--header-width), calc(100% - var(--page-gutter) * 2)); min-height: var(--header-height); padding-block: 1.25rem; display: flex; align-items: var(--header-align); justify-content: space-between; gap: var(--header-gap); }
.brand { display: flex; align-items: var(--header-align); gap: var(--brand-gap); min-width: 0; flex: 1 1 22rem; line-height: 1.5; }
.brand:hover { text-decoration: none; }
.brand-logos { display: flex; align-items: var(--logo-align); gap: var(--logo-gap); flex-shrink: 0; }
.brand-logo { display: grid; place-items: center; height: var(--logo-height); flex-shrink: 0; }
.brand-logo--school { width: var(--logo-school-width); }
.brand-logo--lab { width: var(--logo-lab-width); }
.brand-logo img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: var(--logo-object-position); }
.brand-logo--symbol { position: relative; width: var(--logo-symbol-size); height: var(--logo-symbol-size); overflow: hidden; }
.brand-logo--symbol img { position: absolute; width: var(--logo-symbol-scale); height: auto; max-width: none; left: var(--logo-symbol-left); top: var(--logo-symbol-top); }
.logo-placeholder { display: grid; place-items: center; width: 100%; height: 100%; padding: .25rem; border: 1px dashed #c5cec8; border-radius: 2px; color: var(--color-muted); font-size: .65rem; font-weight: 400; text-align: center; line-height: 1.5; }
.logo-divider { width: 1px; height: var(--logo-divider-height); background: var(--color-line); flex-shrink: 0; }
.brand-copy { min-width: 0; }
.brand-name { display: block; font-size: var(--brand-name-size); font-weight: 700; letter-spacing: -.025em; }
.brand small { display: block; color: var(--color-muted); font-size: var(--brand-sub-size); font-weight: 400; margin-top: .3rem; }
#main-nav { display: flex; align-items: center; gap: var(--nav-gap); flex-shrink: 0; }
#main-nav a { padding: 1rem 0; font-size: .85rem; white-space: nowrap; position: relative; }
#main-nav a[aria-current="page"] { color: var(--color-primary); font-weight: 700; }
#main-nav a[aria-current="page"]::after { content: ""; position: absolute; bottom: .5rem; left: 0; right: 0; height: 2px; background: var(--color-primary); }
.menu-toggle { border: 1px solid var(--color-line); background: white; padding: .65rem 1rem; min-height: 44px; cursor: pointer; border-radius: var(--radius); white-space: nowrap; }
.menu-toggle span { margin-left: .6rem; }
main { min-height: calc(100vh - 210px); }
.breadcrumb { display: flex; gap: .8rem; padding-block: var(--space-3); font-size: .78rem; color: var(--color-muted); }
.hero { position: relative; overflow: hidden; padding: clamp(2rem, 5vw, 4.5rem); color: white; background: var(--color-primary); border-radius: var(--radius); min-height: 300px; display: flex; align-items: center; }
.hero::after { content: ""; position: absolute; width: 440px; height: 440px; border: 1px solid #ffffff20; border-radius: 50%; right: -80px; top: -60px; box-shadow: 0 0 0 50px #ffffff08, 0 0 0 100px #ffffff05; pointer-events: none; }
.hero-copy { position: relative; z-index: 1; max-width: 720px; }
.eyebrow { margin: 0 0 var(--space-2); color: var(--color-accent); font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 2rem); font-style: italic; }
h1 { margin: 0; font-size: clamp(2.25rem, 5vw, 3.6rem); font-weight: 500; line-height: 1.25; letter-spacing: -.055em; }
.hero-description { color: #e0e9e2; margin: var(--space-3) 0 0; max-width: 58ch; white-space: pre-line; }
.content-section { padding-block: var(--space-5) var(--space-6); }
/* Overview 외 메뉴: Hero 대신 밝은 배경 위 일반 제목 */
.page-heading { padding-top: var(--space-1); }
.page-heading h1 { font-size: clamp(1.75rem, 3.2vw, 2.25rem); font-weight: 600; letter-spacing: -.04em; }
.page-intro { margin: var(--space-2) 0 0; max-width: 58ch; color: var(--color-muted); white-space: pre-line; }
.page-heading + .content-section { padding-top: var(--space-4); }
.empty-state { display: grid; grid-template-columns: auto 1fr; gap: var(--space-3); align-items: center; padding: var(--space-4); border-block: 1px solid var(--color-line); }
.empty-symbol { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--color-line); border-radius: 50%; color: var(--color-primary); font-family: var(--font-display); font-style: italic; }
.empty-state h2 { font-size: 1rem; font-weight: 600; margin: 0 0 .2rem; }
.empty-state p { font-size: .9rem; color: var(--color-muted); margin: 0; }
.section-heading { margin: 0 0 var(--space-4); display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2); }
.section-heading h2 { font-size: 1.35rem; font-weight: 600; margin: 0; }
.section-heading p { font-size: .88rem; color: var(--color-muted); margin: 0; }
.explore { padding-bottom: var(--space-6); }
.menu-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--color-line); border-left: 1px solid var(--color-line); }
.menu-card { padding: var(--space-3); border-right: 1px solid var(--color-line); border-bottom: 1px solid var(--color-line); background: var(--color-surface); min-height: 150px; display: flex; flex-direction: column; align-items: flex-start; }
.menu-card:hover { background: #eef2e8; text-decoration: none; }
.menu-card .index { color: var(--color-muted); font-size: .7rem; margin-bottom: var(--space-3); }
.menu-card strong { font-weight: 500; font-size: 1.1rem; width: 100%; display: flex; justify-content: space-between; }
.menu-card small { font-family: var(--font-display); color: var(--color-muted); font-size: .9rem; }
.content-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.content-grid[data-layout="list"] { grid-template-columns: 1fr; }
.content-card { min-width: 0; border: 1px solid var(--color-line); background: var(--color-surface); padding: var(--space-4); border-radius: var(--radius); }
.content-card img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin-bottom: var(--space-3); }
.content-grid[data-layout="people"] img { aspect-ratio: 3 / 4; }
.content-card h2 { margin: 0 0 .5rem; font-size: 1.25rem; line-height: 1.5; }
.content-card .subtitle { color: var(--color-muted); font-size: .88rem; }
.content-card p { white-space: pre-line; }
.content-card a { display: inline-block; color: var(--color-primary); text-decoration: underline; text-underline-offset: 4px; }
/* Gallery: 카드 전체 링크와 사진 상세 페이지 */
a.content-card { display: block; }
a.content-card:hover { text-decoration: none; border-color: #c5cec8; }
a.content-card:hover h2 { text-decoration: underline; text-underline-offset: 5px; }
.photo-detail { padding-bottom: var(--space-6); }
.photo-figure { margin: var(--space-4) 0 0; padding: var(--space-2); background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius); }
.photo-figure img { display: block; width: auto; height: auto; max-width: 100%; max-height: 80vh; margin: 0 auto; }
.photo-body { max-width: 70ch; margin: var(--space-4) 0 0; white-space: pre-line; }
.photo-body a { color: var(--color-primary); text-decoration: underline; text-underline-offset: 4px; }
.photo-back { margin: var(--space-4) 0 0; }
.photo-back a { display: inline-block; padding: .65rem 1rem; border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface); font-size: .9rem; }
.photo-back a:hover { text-decoration: none; border-color: #c5cec8; }
.site-footer { border-top: 1px solid var(--color-line); }
.footer-inner { min-height: 110px; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); font-size: .82rem; color: var(--color-muted); }
/* main.js의 메뉴 전환 기준도 이 헤더 중단점과 함께 수정합니다. */
@media (max-width: 1200px) {
  .header-inner { flex-wrap: wrap; gap: 1rem; }
  .brand { flex: 1 1 0; }
  #main-nav { flex-basis: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .3rem 1rem; padding-top: .75rem; border-top: 1px solid var(--color-line); }
  #main-nav a { padding: .8rem 0; text-align: center; }
}
@media (max-width: 1100px) {
  .menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  :root { --space-5: 2rem; --space-6: 3rem; }
  .site-header { --logo-school-width: 42px; --logo-lab-width: 44px; --logo-height: 42px; --logo-symbol-size: 52px; --logo-gap: 8px; --brand-name-size: 1rem; --brand-sub-size: .75rem; }
  .header-inner { align-items: flex-start; }
  .brand { flex-basis: 100%; align-items: center; gap: .75rem; }
  .menu-toggle { margin-left: auto; }
  #main-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { min-height: 270px; }
  .hero::after { right: -300px; }
  .empty-state { padding: var(--space-3) 0; gap: 1rem; align-items: start; }
  .photo-figure { padding: .5rem; }
  .section-heading { display: block; }
  .section-heading p { margin-top: .5rem; }
  .menu-card { min-height: 145px; padding: 1.2rem; }
  .content-grid { grid-template-columns: 1fr; }
  .footer-inner { align-items: flex-start; justify-content: center; flex-direction: column; gap: .25rem; padding-block: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
