/* 한국 차세대 반도체 연구센터 — Minimal White Theme */
:root {
  --primary: #1B2A4A;
  --accent: #2563EB;
  --bg: #FFFFFF;
  --bg-alt: #F7F8FA;
  --bg-dark: #0F172A;
  --text: #1A1A1A;
  --text-muted: #64748B;
  --border: #E2E8F0;
  --font: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', '맑은 고딕', sans-serif;
  --max: 1100px;
  --max-narrow: 680px;
  --max-mid: 880px;
  --radius: 4px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  font-size: 16px;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.75; }
h1, h2, h3, h4 { line-height: 1.3; color: var(--primary); font-weight: 700; }
h1 { font-size: 2.25rem; letter-spacing: -0.02em; }
h2 { font-size: 1.5rem; letter-spacing: -0.01em; }
h3 { font-size: 1.125rem; }
p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { padding-left: 1.5em; margin-bottom: 1em; }
table { width: 100%; border-collapse: collapse; margin: 1.5em 0; }
th, td { padding: 0.75em 1em; border: 1px solid var(--border); text-align: left; font-size: 0.9375rem; }
th { background: var(--bg-alt); font-weight: 600; }
blockquote {
  border-left: 3px solid var(--accent);
  padding: 1em 1.5em;
  margin: 1.5em 0;
  background: var(--bg-alt);
  font-style: normal;
}

/* Skip link */
.skip-link {
  position: absolute; top: -100%; left: 1rem;
  background: var(--primary); color: #fff; padding: 0.5em 1em;
  z-index: 9999; border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.header-inner {
  max-width: var(--max); margin: 0 auto;
  padding: 0.875rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 0.625rem; text-decoration: none; }
.logo img { height: 30px; width: auto; }
.logo-text { font-weight: 700; font-size: 0.875rem; color: var(--primary); letter-spacing: -0.01em; }
.main-nav { display: flex; gap: 2rem; align-items: center; }
.main-nav a { color: var(--text); font-size: 0.875rem; font-weight: 500; }
.main-nav a:hover { color: var(--accent); opacity: 1; }
.menu-toggle {
  display: none; background: none; border: none; cursor: pointer; padding: 0.5rem;
  flex-direction: column; gap: 4px;
}
.menu-toggle span {
  display: block; width: 20px; height: 2px; background: var(--primary);
  transition: transform 0.2s;
}

/* Hero */
.hero {
  position: relative; overflow: hidden;
}
.hero-img {
  width: 100%; aspect-ratio: 21/9; object-fit: cover;
  display: block;
}
.hero-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 3rem;
  background: linear-gradient(to top, rgba(15,23,42,0.82) 0%, rgba(15,23,42,0.15) 60%, transparent 100%);
}
.hero-overlay h1 {
  color: #fff; font-size: 2rem; max-width: 600px;
  margin-bottom: 0.5rem;
}
.hero-subtitle {
  color: rgba(255,255,255,0.88); font-size: 0.9375rem;
  max-width: 520px; margin-bottom: 1rem;
}
.hero-entity {
  color: rgba(255,255,255,0.7); font-size: 0.75rem;
  margin-top: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-block; padding: 0.625rem 1.5rem;
  border-radius: var(--radius); font-weight: 600;
  font-size: 0.875rem; transition: all 0.2s;
  text-decoration: none; border: none; cursor: pointer;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { opacity: 0.9; background: var(--accent); }
.btn-outline {
  background: transparent; color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }

/* Container variants */
.container { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: var(--max-narrow); margin: 0 auto; padding: 0 1.5rem; }
.container-mid { max-width: var(--max-mid); margin: 0 auto; padding: 0 1.5rem; }

/* Section */
section { padding: 4rem 0; }
.section-alt { background: var(--bg-alt); }

/* Image wrappers */
.img-wide { width: 100%; overflow: hidden; border-radius: var(--radius); }
.img-wide img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.img-banner { width: 100%; overflow: hidden; }
.img-banner img { width: 100%; aspect-ratio: 21/9; object-fit: cover; }
.img-article { width: 100%; overflow: hidden; border-radius: var(--radius); }
.img-article img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.img-portrait { overflow: hidden; border-radius: var(--radius); }
.img-portrait img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }

/* Observation section — differentiator */
.observation { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }
.observation-img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); }
.observation-text { font-size: 1rem; line-height: 1.85; }

/* Method section — asymmetric */
.method-block { margin-bottom: 3rem; }
.method-block:last-child { margin-bottom: 0; }
.method-grid { display: grid; grid-template-columns: 2fr 3fr; gap: 2rem; align-items: start; }
.method-grid.reverse { grid-template-columns: 3fr 2fr; }
.method-grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); }

/* Service flow */
.service-item {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem;
  padding: 3rem 0; border-bottom: 1px solid var(--border);
  align-items: start;
}
.service-item:first-child { padding-top: 0; }
.service-item:last-child { border-bottom: none; }
.service-item.reverse { direction: rtl; }
.service-item.reverse > * { direction: ltr; }
.service-item img {
  width: 100%; aspect-ratio: 16/10; object-fit: cover;
  border-radius: var(--radius);
}
.service-meta { font-size: 0.8125rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.not-applicable {
  background: var(--bg-alt); padding: 0.75em 1em;
  border-radius: var(--radius); font-size: 0.875rem;
  margin-top: 1em;
}
.not-applicable strong { color: var(--primary); }

/* Articles grid — asymmetric */
.articles-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  grid-template-rows: auto auto;
  gap: 1.5rem;
}
.article-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.article-card:hover { box-shadow: var(--shadow-md); }
.article-card img { width: 100%; object-fit: cover; }
.article-card.featured {
  grid-row: 1 / 3;
}
.article-card.featured img { aspect-ratio: 4/3; }
.article-card:not(.featured) img { aspect-ratio: 16/9; }
.article-card-body { padding: 1.25rem; }
.article-card-body h3 { margin-bottom: 0.5rem; font-size: 1rem; }
.article-card-body p { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.article-meta {
  font-size: 0.75rem; color: var(--text-muted);
  display: flex; gap: 0.75rem; flex-wrap: wrap;
}

/* FAQ */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question {
  width: 100%; background: none; border: none; cursor: pointer;
  padding: 1.25rem 0; text-align: left;
  font-size: 1rem; font-weight: 600; color: var(--primary);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font);
}
.faq-question::after {
  content: '+'; font-size: 1.25rem; font-weight: 400;
  transition: transform 0.2s;
}
.faq-item[open] .faq-question::after { content: '−'; }
.faq-answer {
  padding: 0 0 1.25rem; font-size: 0.9375rem;
  line-height: 1.75; color: var(--text);
}

/* Article page */
.article-header { padding: 3rem 0 2rem; }
.article-header h1 { font-size: 1.875rem; margin-bottom: 1rem; }
.article-meta-full {
  display: flex; gap: 1rem; flex-wrap: wrap;
  font-size: 0.8125rem; color: var(--text-muted);
  padding-bottom: 1.5rem; border-bottom: 1px solid var(--border);
}
.article-summary {
  background: var(--bg-alt); padding: 1.5rem;
  border-radius: var(--radius); margin: 1.5rem 0;
  font-size: 0.9375rem; line-height: 1.75;
}
.article-body { max-width: var(--max-narrow); margin: 0 auto; padding: 0 1.5rem; }
.article-body h2 { margin: 2.5rem 0 1rem; font-size: 1.375rem; }
.article-body h3 { margin: 2rem 0 0.75rem; font-size: 1.125rem; }
.article-body p { font-size: 1rem; line-height: 1.85; }
.article-body img {
  width: 100%; aspect-ratio: 16/9; object-fit: cover;
  border-radius: var(--radius); margin: 2rem 0;
}
.article-body ul, .article-body ol { margin: 1em 0; }
.article-body li { margin-bottom: 0.5em; line-height: 1.75; }

.author-box {
  display: flex; gap: 1.25rem; align-items: start;
  padding: 1.5rem; background: var(--bg-alt);
  border-radius: var(--radius); margin: 2.5rem 0;
}
.author-box img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-box h4 { font-size: 0.9375rem; margin-bottom: 0.25rem; }
.author-box p { font-size: 0.8125rem; color: var(--text-muted); margin-bottom: 0; }

.references { margin: 2rem 0; }
.references h3 { font-size: 1rem; margin-bottom: 0.75rem; }
.references ol { font-size: 0.875rem; color: var(--text-muted); }
.references li { margin-bottom: 0.5em; }

.related-links { margin: 2rem 0 3rem; }
.related-links h3 { font-size: 1rem; margin-bottom: 0.75rem; }
.related-links ul { list-style: none; padding: 0; }
.related-links li { padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.related-links a { font-size: 0.9375rem; }

/* Sensitive disclaimer */
.content-disclaimer {
  background: #FEF3C7; border: 1px solid #F59E0B;
  padding: 0.75rem 1rem; border-radius: var(--radius);
  font-size: 0.8125rem; margin-bottom: 1.5rem;
}

/* About page */
.about-hero-img { width: 100%; aspect-ratio: 21/9; object-fit: cover; border-radius: var(--radius); margin-bottom: 2rem; }
.team-member { display: flex; gap: 1.5rem; margin-bottom: 2rem; align-items: start; }
.team-member img { width: 120px; height: 160px; object-fit: cover; border-radius: var(--radius); flex-shrink: 0; }

/* Contact page */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.375rem; font-size: 0.875rem; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 0.625rem 0.875rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-family: var(--font); font-size: 0.9375rem;
  transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.form-group textarea { min-height: 140px; resize: vertical; }
.form-note { font-size: 0.8125rem; color: var(--text-muted); margin-top: 0.375rem; }
.contact-info { font-size: 0.9375rem; }
.contact-info dt { font-weight: 600; margin-top: 1.25rem; color: var(--primary); }
.contact-info dt:first-child { margin-top: 0; }
.contact-info dd { margin-left: 0; margin-top: 0.25rem; }

/* Footer */
.site-footer {
  background: var(--bg-dark); color: rgba(255,255,255,0.7);
  padding: 3rem 0 2rem; font-size: 0.8125rem;
}
.footer-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 1.5rem;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem;
}
.footer-inner h4 { color: #fff; font-size: 0.8125rem; margin-bottom: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.footer-inner a { color: rgba(255,255,255,0.7); font-size: 0.8125rem; }
.footer-inner a:hover { color: #fff; opacity: 1; }
.footer-inner ul { list-style: none; padding: 0; }
.footer-inner li { margin-bottom: 0.375rem; }
.footer-bottom {
  max-width: var(--max); margin: 2rem auto 0; padding: 1.5rem 1.5rem 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  font-size: 0.75rem;
}

/* Breadcrumb */
.breadcrumb {
  padding: 1rem 0; font-size: 0.8125rem;
  color: var(--text-muted);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb span { margin: 0 0.5rem; }

/* Utility */
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.8125rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.fw-600 { font-weight: 600; }

/* Responsive */
@media (max-width: 768px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  .hero-overlay { padding: 1.5rem; }
  .hero-overlay h1 { font-size: 1.375rem; }
  .observation { grid-template-columns: 1fr; }
  .method-grid, .method-grid.reverse { grid-template-columns: 1fr; }
  .service-item, .service-item.reverse { grid-template-columns: 1fr; direction: ltr; }
  .articles-grid { grid-template-columns: 1fr; }
  .article-card.featured { grid-row: auto; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .main-nav {
    display: none; position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--bg); flex-direction: column;
    padding: 1rem 1.5rem; gap: 0.75rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .main-nav.active { display: flex; }
  .menu-toggle { display: flex; }
  .team-member { flex-direction: column; }
  .team-member img { width: 100%; height: auto; aspect-ratio: 3/4; }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .container { padding: 0 2rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
