/* Smart Factory Lab look (umjumy.github.io) — ISO 26787 project page */
:root {
  --navy: #0a1628;
  --blue: #1a3a6b;
  --accent: #2563eb;
  --accent-light: #60a5fa;
  --teal: #1fadcc;
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-400: #94a3b8;
  --gray-600: #475569;
  --gray-800: #1e293b;
  --text: #0f172a;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: "Sora", "Pretendard", "Malgun Gothic", sans-serif; color: var(--text); background: var(--gray-50); overflow-x: hidden; line-height: 1.6; }
a { color: inherit; }
img { display: block; max-width: 100%; }

/* NAV */
nav.top { position: fixed; top: 0; left: 0; right: 0; z-index: 100; display: flex; align-items: center; justify-content: space-between; padding: 0 3rem; height: 64px; background: rgba(10, 22, 40, 0.97); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.nav-logo { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.nav-logo img { height: 40px; width: auto; object-fit: contain; }
.nav-logo .tag { font-family: "JetBrains Mono", monospace; font-size: 0.72rem; color: var(--accent-light); border: 1px solid rgba(96, 165, 250, 0.4); padding: 2px 8px; border-radius: 999px; }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { color: rgba(255, 255, 255, 0.7); text-decoration: none; font-size: 0.82rem; font-weight: 500; letter-spacing: 0.04em; transition: color 0.2s; }
.nav-links a:hover { color: #fff; }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; }
.hamburger span { display: block; width: 24px; height: 2px; background: #fff; }

/* PAGE HEADER */
.page-header { margin-top: 64px; background: var(--navy); padding: 4.5rem 0 3.5rem; position: relative; overflow: hidden; color: #fff; }
.page-header::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 80% at 70% 50%, rgba(37, 99, 235, 0.22) 0%, transparent 70%), radial-gradient(ellipse 40% 60% at 10% 80%, rgba(96, 165, 250, 0.1) 0%, transparent 60%); }
.page-header::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px); background-size: 50px 50px; }
.inner { position: relative; z-index: 1; max-width: 1140px; margin: 0 auto; padding: 0 2rem; }
.breadcrumb { display: flex; gap: 0.5rem; font-size: 0.75rem; color: rgba(255, 255, 255, 0.45); margin-bottom: 0.9rem; font-family: "JetBrains Mono", monospace; }
.breadcrumb a { color: rgba(255, 255, 255, 0.45); text-decoration: none; }
.page-header h1 { font-family: "DM Serif Display", serif; font-weight: 400; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.15; }
.page-header h1 em { font-style: normal; color: var(--accent-light); }
.page-header .lead { margin-top: 1rem; max-width: 760px; color: rgba(255, 255, 255, 0.72); font-size: 0.98rem; }
.stats { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
.stat { min-width: 190px; padding: 1rem 1.2rem; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 12px; background: rgba(255, 255, 255, 0.04); }
.stat b { display: block; font-family: "JetBrains Mono", monospace; font-size: 1.5rem; color: var(--accent-light); }
.stat span { font-size: 0.8rem; color: rgba(255, 255, 255, 0.65); }

/* SECTIONS */
.main { max-width: 1140px; margin: 0 auto; padding: 4rem 2rem 5rem; }
.block { margin-bottom: 4.5rem; }
.section-label { font-family: "JetBrains Mono", monospace; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.5rem; }
.section-title { font-family: "DM Serif Display", serif; font-weight: 400; font-size: 2rem; line-height: 1.2; margin-bottom: 1rem; }
.section-desc { color: var(--gray-600); max-width: 820px; font-size: 0.95rem; }

.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; margin-top: 1.8rem; }
.card { background: #fff; border-radius: 14px; border: 1px solid var(--gray-200); padding: 1.6rem; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04); }
.card h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.card p { color: var(--gray-600); font-size: 0.9rem; }
.card .mono { font-family: "JetBrains Mono", monospace; font-size: 0.75rem; color: var(--gray-400); }
.badge { display: inline-block; margin-top: 0.9rem; font-family: "JetBrains Mono", monospace; font-size: 0.72rem; padding: 3px 10px; border-radius: 999px; }
.badge.done { background: #e0ecff; color: var(--accent); }
.badge.plan { background: var(--gray-100); color: var(--gray-600); }

/* TIMELINE */
.timeline { list-style: none; margin-top: 1.8rem; border-left: 2px solid var(--gray-200); padding-left: 1.6rem; }
.timeline li { position: relative; padding: 0 0 1.4rem; }
.timeline li::before { content: ""; position: absolute; left: -2.1rem; top: 0.35rem; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px #dbe7ff; }
.timeline li.plan::before { background: var(--gray-400); box-shadow: 0 0 0 4px var(--gray-100); }
.timeline .when { font-family: "JetBrains Mono", monospace; font-size: 0.75rem; color: var(--accent); }
.timeline li.plan .when { color: var(--gray-400); }
.timeline h3 { font-size: 1rem; margin: 0.1rem 0 0.2rem; }
.timeline p { color: var(--gray-600); font-size: 0.88rem; }

/* NEWS CARDS (same as Lab News) */
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; margin-top: 1.8rem; }
.news-card { background: #fff; border-radius: 14px; overflow: hidden; border: 1px solid var(--gray-200); box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04); transition: transform 0.2s, box-shadow 0.2s; }
.news-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1); }
.card-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card-body { padding: 1rem 1.2rem 1.3rem; }
.card-date { font-family: "JetBrains Mono", monospace; font-size: 0.72rem; color: var(--gray-400); margin-bottom: 0.3rem; }
.card-text { font-size: 0.92rem; font-weight: 600; }
.card-sub { font-size: 0.82rem; color: var(--gray-600); margin-top: 0.25rem; }

.meeting-list { list-style: none; margin-top: 1.5rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.meeting-list li { background: #fff; border: 1px solid var(--gray-200); border-radius: 10px; padding: 0.8rem 1rem; font-size: 0.86rem; }
.meeting-list li span { font-family: "JetBrains Mono", monospace; font-size: 0.72rem; color: var(--gray-400); display: block; }

/* PROJECT INFO */
.info { margin-top: 1.8rem; background: #fff; border: 1px solid var(--gray-200); border-radius: 14px; overflow: hidden; }
.info div { display: grid; grid-template-columns: 180px 1fr; border-top: 1px solid var(--gray-100); font-size: 0.9rem; }
.info div:first-child { border-top: 0; }
.info dt { padding: 0.75rem 1.2rem; background: var(--gray-50); font-family: "JetBrains Mono", monospace; font-size: 0.75rem; color: var(--gray-600); }
.info dd { padding: 0.75rem 1.2rem; }

/* GOALS */
.goals { list-style: none; counter-reset: g; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; margin-top: 1.8rem; }
.goals li { counter-increment: g; background: #fff; border: 1px solid var(--gray-200); border-radius: 14px; padding: 1.4rem; font-size: 0.9rem; color: var(--gray-600); }
.goals li::before { content: "0" counter(g); display: block; font-family: "JetBrains Mono", monospace; font-size: 0.8rem; color: var(--accent); margin-bottom: 0.5rem; }
.goals b { display: block; color: var(--text); font-size: 1rem; margin-bottom: 0.3rem; }

/* NEWS ENTRIES */
.entries { margin-top: 1.8rem; }
.entry { display: grid; grid-template-columns: 150px 1fr; gap: 2rem; padding: 2rem 0; border-top: 1px solid var(--gray-200); }
.entry:first-child { border-top: 0; padding-top: 0.5rem; }
.entry .when { font-family: "JetBrains Mono", monospace; font-size: 0.78rem; color: var(--accent); }
.entry .where { font-family: "JetBrains Mono", monospace; font-size: 0.72rem; color: var(--gray-400); margin-top: 0.2rem; }
.entry h3 { font-size: 1.08rem; font-weight: 600; line-height: 1.45; margin-bottom: 0.6rem; }
.entry p.body { color: var(--gray-600); font-size: 0.92rem; }
.entry figure { margin-top: 1.2rem; background: #fff; border: 1px solid var(--gray-200); border-radius: 10px; padding: 1rem; }
.entry figure img { margin: 0 auto; max-height: 420px; width: auto; }
.entry figure.photo { padding: 0; overflow: hidden; max-width: 640px; }
.entry figure.photo img { width: 100%; max-height: none; aspect-ratio: 16 / 9; object-fit: cover; }
.entry figcaption { text-align: center; font-size: 0.8rem; color: var(--gray-600); margin-top: 0.7rem; }
.entry figure.photo figcaption { padding: 0 1rem 0.8rem; }

/* FLOW */
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; gap: 1rem; margin: 1.8rem 0 1.4rem; }
.flow-step { background: #fff; border: 1px solid var(--gray-200); border-radius: 14px; padding: 1.5rem; }
.flow-step span { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff; font-family: "JetBrains Mono", monospace; font-size: 0.8rem; }
.flow-step b { display: block; font-size: 1.15rem; margin: 0.7rem 0 0.3rem; }
.flow-step p { color: var(--gray-600); font-size: 0.9rem; }
.flow-arrow { align-self: center; font-size: 1.5rem; color: var(--gray-400); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1rem 0 0.4rem; }
.chips li { background: #fff; border: 1px solid var(--gray-200); border-radius: 999px; padding: 0.35rem 1rem; font-size: 0.86rem; }
.photo-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; margin-top: 1rem; }
.photo-row img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.photo-row figcaption { text-align: center; font-size: 0.8rem; color: var(--gray-600); margin-top: 0.4rem; }

/* HOW IT WORKS */
.figure-box { margin-top: 1.8rem; background: #fff; border: 1px solid var(--gray-200); border-radius: 14px; padding: 1.2rem; }
.figure-box img { margin: 0 auto; max-height: 440px; width: auto; }
.figure-box figcaption { text-align: center; font-size: 0.82rem; color: var(--gray-600); margin-top: 0.7rem; }
.sub-title { font-size: 1rem; font-weight: 600; margin: 2.2rem 0 0.2rem; }
.target-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-top: 0.8rem; }
.target-grid div { background: #fff; border: 1px solid var(--gray-200); border-radius: 10px; padding: 1rem 1.1rem; font-size: 0.86rem; color: var(--gray-600); }
.target-grid b { display: block; color: var(--text); font-size: 0.95rem; margin-bottom: 0.3rem; }
.scope-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
.scope-grid ul { padding-left: 1.1rem; margin-top: 0.6rem; font-size: 0.9rem; color: var(--gray-600); }
.scope-grid li { margin-bottom: 0.3rem; }
.steps { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; margin-top: 0.8rem; }
.steps li { counter-increment: s; border-top: 2px solid var(--accent); padding-top: 0.7rem; font-size: 0.88rem; color: var(--gray-600); }
.steps li::before { content: "Step " counter(s); display: block; font-family: "JetBrains Mono", monospace; font-size: 0.72rem; color: var(--accent); }
.steps b { display: block; color: var(--text); font-size: 0.95rem; }

/* GLOSSARY */
.glossary { margin-top: 1.5rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2.5rem; }
.glossary div { padding: 0.8rem 0; border-top: 1px solid var(--gray-200); font-size: 0.88rem; }
.glossary dt { font-family: "JetBrains Mono", monospace; font-size: 0.8rem; color: var(--accent); }
.glossary dd { color: var(--gray-600); }

/* DOCUMENTS (collapsed) */
details.docs-box { margin-top: 2rem; }
details.docs-box summary { cursor: pointer; font-size: 0.88rem; color: var(--gray-600); }

/* DOCUMENTS */
.doc-table { margin-top: 1.5rem; background: #fff; border: 1px solid var(--gray-200); border-radius: 14px; overflow: hidden; }
.doc-row { display: grid; grid-template-columns: 110px 1fr 120px; gap: 1rem; padding: 0.75rem 1.2rem; border-top: 1px solid var(--gray-100); font-size: 0.86rem; }
.doc-row:first-child { border-top: 0; background: var(--navy); color: #fff; font-family: "JetBrains Mono", monospace; font-size: 0.75rem; }
.doc-row span:first-child { font-family: "JetBrains Mono", monospace; color: var(--accent); }
.doc-row:first-child span:first-child { color: #fff; }
.doc-row span:last-child { color: var(--gray-600); }

/* FOOTER */
footer { background: var(--navy); color: rgba(255, 255, 255, 0.5); text-align: center; font-size: 0.78rem; padding: 2rem 1rem; }
footer a { color: rgba(255, 255, 255, 0.75); }

@media (max-width: 900px) {
  nav.top { padding: 0 1.2rem; }
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--navy); }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 0.9rem 1.5rem; }
  .hamburger { display: flex; }
  .card-grid, .meeting-list { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .goals, .glossary { grid-template-columns: 1fr; }
  .steps, .target-grid { grid-template-columns: 1fr 1fr; }
  .scope-grid { grid-template-columns: 1fr; gap: 0; }
  .flow { grid-template-columns: 1fr; }
  .flow-arrow { transform: rotate(90deg); justify-self: center; }
  .photo-row { grid-template-columns: 1fr; }
  .info div { grid-template-columns: 110px 1fr; }
  .entry { grid-template-columns: 1fr; gap: 0.6rem; }
  .doc-row { grid-template-columns: 70px 1fr; }
  .doc-row span:last-child { display: none; }
}
