/* =========================================================
   RMS Portfolio — design tokens adapted from SignFlow (eformsign-inspired)
   ========================================================= */
:root {
  --primary: #2b5bfe;
  --primary-dark: #1f44d6;
  --primary-light: #eaefff;
  --primary-soft: #f3f6ff;

  --bg: #f4f5f7;
  --card: #ffffff;
  --text: #1a1d29;
  --muted: #6b7280;
  --muted-2: #9aa1ac;
  --border: #e5e7eb;
  --border-strong: #d1d5db;

  --success: #16a34a;
  --success-bg: #e9f7ef;
  --warning: #d97706;
  --warning-bg: #fdf3e7;
  --danger: #dc2626;
  --danger-bg: #fdeaea;
  --info: #2563eb;

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow: 0 4px 16px rgba(16, 24, 40, .08);
  --shadow-lg: 0 12px 40px rgba(16, 24, 40, .16);

  --font: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;

  --header-h: 64px;
  --maxw: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--card);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; background: var(--primary-soft); color: var(--primary-dark); padding: 1px 6px; border-radius: 5px; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Icons (SVG only — no emoji) ---------- */
.ico { display: inline-block; vertical-align: middle; flex: 0 0 auto; }
.bi { display: inline-flex; align-items: center; }
.about-ic { color: var(--primary); }
.feat-list li .fi { color: var(--primary); display: inline-flex; align-items: center; }
.res-card .r-ic { color: #374151; }
.res-card .arrow { display: inline-flex; align-items: center; color: var(--muted-2); }
.scan-card .grade .ico { stroke-width: 2.4; }
.ft-links a { display: inline-flex; align-items: center; gap: 5px; }

/* ---------- Buttons (from provided system) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-size: 14px; font-weight: 600; cursor: pointer; background: var(--card);
  color: var(--text); transition: .12s; white-space: nowrap;
}
.btn:hover { filter: brightness(.98); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); filter: none; }
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: #f8f9fb; }
.btn-sm { padding: 6px 13px; font-size: 13px; }
.btn-lg { padding: 13px 24px; font-size: 15px; }

/* ---------- Badges / chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 999px; }
.badge-gray { background: #f1f3f5; color: #6b7280; }
.badge-blue { background: var(--primary-light); color: var(--primary-dark); }
.badge-green { background: var(--success-bg); color: var(--success); }
.badge-amber { background: var(--warning-bg); color: var(--warning); }
.badge-red { background: var(--danger-bg); color: var(--danger); }

/* ---------- Card ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: .16s; }
.card-pad { padding: 24px; }

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 800; height: var(--header-h);
  background: rgba(255,255,255,.82); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.site-header.scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }
.hd-inner { max-width: var(--maxw); margin: 0 auto; height: 100%; padding: 0 24px; display: flex; align-items: center; gap: 20px; }
.logo { font-size: 19px; font-weight: 800; letter-spacing: -.5px; color: var(--text); }
.logo span { color: var(--primary); }
.hd-nav { display: flex; gap: 2px; margin-left: 8px; }
.hd-nav a { padding: 8px 13px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--muted); transition: .12s; }
.hd-nav a:hover { color: var(--text); background: #f4f5f7; }
.hd-nav a.active { color: var(--primary-dark); background: var(--primary-soft); }
.hd-right { margin-left: auto; display: flex; gap: 8px; }
.hd-burger { display: none; margin-left: auto; background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text); }

/* =========================================================
   Hero
   ========================================================= */
.hero { position: relative; overflow: hidden; padding: 92px 0 80px; }
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(900px 520px at 85% -10%, rgba(43,91,254,.13), transparent 60%),
    radial-gradient(720px 520px at -8% 115%, rgba(99,102,241,.12), transparent 55%),
    #fbfcfe;
}
.hero-inner { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.hero-eyebrow { margin-bottom: 22px; }
.hero h1 { font-size: clamp(38px, 6vw, 62px); line-height: 1.08; letter-spacing: -1.5px; font-weight: 800; margin: 0 0 22px; color: #11152a; }
.hero-sub { font-size: clamp(15px, 2vw, 18px); color: var(--muted); max-width: 640px; margin: 0 0 34px; line-height: 1.75; }
.hero-sub b { color: #1f2638; font-weight: 700; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 56px; }

.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.hstat { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-sm); }
.hstat .num { font-size: 32px; font-weight: 800; letter-spacing: -1px; color: var(--primary); line-height: 1; }
.hstat .lbl { font-size: 13px; color: var(--muted); margin-top: 8px; }

/* =========================================================
   Section scaffolding
   ========================================================= */
.section { padding: 88px 0; }
.section-alt { background: var(--bg); }
.sec-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.kicker { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--primary); margin-bottom: 12px; }
.sec-head h2 { font-size: clamp(26px, 4vw, 36px); letter-spacing: -1px; margin: 0 0 12px; font-weight: 800; }
.sec-head p { color: var(--muted); margin: 0; font-size: 16px; }
.sub-h { font-size: 19px; font-weight: 700; margin: 56px 0 22px; text-align: center; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.about-grid .card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.about-ic { width: 52px; height: 52px; border-radius: 14px; background: var(--primary-soft); display: grid; place-items: center; font-size: 26px; margin-bottom: 16px; }
.about-grid h3 { margin: 0 0 8px; font-size: 18px; }
.about-grid p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---------- Tech ---------- */
.tech-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.tech-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.tech-card h4 { margin: 0 0 14px; font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted-2); }
.tech-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tech-chip { font-size: 13px; font-weight: 600; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; color: #374151; background: #fff; }

/* ---------- Features ---------- */
.feat-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.feat-col { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-sm); }
.feat-col-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.feat-col-head b { margin-left: auto; font-size: 30px; font-weight: 800; color: var(--primary); letter-spacing: -1px; }
.feat-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.feat-list li { display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 500; padding: 11px 13px; background: #fafbfc; border: 1px solid var(--border); border-radius: 10px; }
.feat-list li .fi { font-size: 17px; }

/* ---------- Security (OWASP) ---------- */
.owasp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.owasp-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); border-left: 3px solid var(--primary); }
.owasp-card .tag { font-size: 12px; font-weight: 700; color: var(--primary); font-family: ui-monospace, monospace; }
.owasp-card h4 { margin: 6px 0 8px; font-size: 16px; }
.owasp-card p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- Security scans ---------- */
.scan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.scan-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; text-align: center; box-shadow: var(--shadow-sm); }
.scan-card .grade { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px; font-size: 26px; font-weight: 800; }
.grade.g-a { background: var(--success-bg); color: var(--success); }
.grade.g-pass { background: var(--primary-light); color: var(--primary-dark); }
.scan-card h4 { margin: 0 0 4px; font-size: 16px; }
.scan-card .tool { font-size: 13px; color: var(--muted); }
.scan-card .who { margin-top: 10px; }

/* ---------- Timeline ---------- */
.timeline { position: relative; max-width: 820px; margin: 0 auto; padding-left: 34px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding: 0 0 26px 8px; }
.tl-item::before { content: ""; position: absolute; left: -33px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--primary); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--primary); }
.tl-item.last::before { background: var(--success); box-shadow: 0 0 0 1px var(--success); }
.tl-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 5px; }
.tl-round { font-size: 12px; font-weight: 800; color: var(--primary); }
.tl-date { font-size: 12.5px; color: var(--muted-2); font-family: ui-monospace, monospace; }
.tl-item h4 { margin: 0 0 4px; font-size: 16px; }
.tl-item p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- Team ---------- */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.team-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px 22px; text-align: center; box-shadow: var(--shadow-sm); transition: .16s; }
.team-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.team-card .ava { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px; font-size: 24px; font-weight: 800; color: #fff; }
.team-card h4 { margin: 0 0 3px; font-size: 17px; }
.team-card .role { font-size: 13px; font-weight: 700; color: var(--primary); margin-bottom: 12px; }
.team-card .tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.team-card .tags span { font-size: 11.5px; font-weight: 600; padding: 4px 9px; border-radius: 999px; background: #f4f5f7; color: #4b5563; }

/* ---------- Resources ---------- */
.res-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.res-card { display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); transition: .16s; }
.res-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--primary); }
.res-card .r-ic { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; flex: 0 0 auto; }
.res-card .grow { flex: 1; min-width: 0; }
.res-card b { display: block; font-size: 15px; }
.res-card span { font-size: 13px; color: var(--muted); }
.res-card .arrow { color: var(--muted-2); font-size: 18px; }
.res-card.disabled { opacity: .55; pointer-events: none; }
.res-card.disabled .arrow::after { content: "준비중"; font-size: 11px; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { background: #11152a; color: #cdd2e0; padding: 56px 0 0; }
.ft-inner { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; padding-bottom: 36px; }
.site-footer .logo { color: #fff; font-size: 20px; }
.site-footer .logo span { color: #8ca6ff; }
.ft-desc { color: #8b93a7; font-size: 14px; margin: 12px 0 0; max-width: 380px; }
.ft-links { display: flex; flex-wrap: wrap; gap: 10px 28px; align-content: flex-start; }
.ft-links a { color: #cdd2e0; font-size: 14px; font-weight: 500; transition: .12s; }
.ft-links a:hover { color: #fff; }
.ft-bottom { border-top: 1px solid rgba(255,255,255,.08); text-align: center; padding: 20px; font-size: 13px; color: #6b7280; }

.proto-badge {
  position: fixed; left: 12px; bottom: 12px; z-index: 9000;
  background: #111827; color: #fff; font-size: 11px; font-weight: 600;
  padding: 5px 10px; border-radius: 999px; opacity: .8; letter-spacing: .3px; pointer-events: none;
}

/* =========================================================
   Reveal on scroll
   ========================================================= */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in { opacity: 1; transform: none; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 920px) {
  .hd-nav, .hd-right { display: none; }
  .hd-burger { display: block; }
  .site-header.nav-open { height: auto; }
  .site-header.nav-open .hd-nav { display: flex; flex-direction: column; position: absolute; top: var(--header-h); left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); padding: 10px 16px; gap: 2px; box-shadow: var(--shadow); }
  .about-grid, .tech-grid, .owasp-grid, .scan-grid, .team-grid, .res-grid { grid-template-columns: 1fr 1fr; }
  .feat-cols { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .about-grid, .tech-grid, .owasp-grid, .scan-grid, .team-grid, .res-grid, .feat-list { grid-template-columns: 1fr; }
  .hero { padding: 60px 0 56px; }
  .section { padding: 60px 0; }
}

/* =========================================================
   Screens gallery + lightbox
   ========================================================= */
.shot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.shot {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: .16s;
}
.shot:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.shot img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
  display: block;
  background: #f0f0f0;
  cursor: zoom-in;
  border-bottom: 1px solid var(--border);
}
.shot figcaption { padding: 12px 14px; }
.shot figcaption b { display: block; font-size: .95rem; color: var(--text); }
.shot figcaption span { display: block; font-size: .82rem; color: var(--muted); margin-top: 2px; }

.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.88);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; cursor: zoom-out;
  opacity: 0; visibility: hidden; transition: opacity .2s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img { max-width: 95%; max-height: 95%; object-fit: contain; border-radius: 6px; box-shadow: 0 10px 50px rgba(0,0,0,.5); }

@media (max-width: 560px) {
  .shot-grid { grid-template-columns: 1fr; }
}
