/* ECSOFT homepage */
:root {
  --bg: #ffffff;
  --bg-soft: #f5f7fb;
  --bg-card: #ffffff;
  --text: #0A2540;
  --text-soft: #4a5568;
  --text-mute: #8590a2;
  --line: #e4e8f0;
  --brand: #2F80ED;
  --brand-2: #14b8a6;
  --brand-ink: #ffffff;
  --hero-1: #071a2f;
  --hero-2: #0A2540;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06);
  --radius: 16px;
  --max: 1160px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #06111f;
    --bg-soft: #0b1a2c;
    --bg-card: #0f2136;
    --text: #e8ecf4;
    --text-soft: #b4bdcc;
    --text-mute: #7d889b;
    --line: #1d3350;
    --brand: #5b9bf5;
    --brand-2: #2dd4bf;
    --hero-1: #070b17;
    --hero-2: #0A2540;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: "Sora", "Pretendard Variable", Pretendard, sans-serif; line-height: 1.3; margin: 0 0 .5em; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .container { padding: 0 16px; } }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--text); letter-spacing: -0.03em; }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; display: grid; place-items: center; font-size: 15px; font-weight: 800;
}
.logo small { font-weight: 500; font-size: 13px; color: var(--text-mute); margin-left: 2px; }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--text-soft); padding: 8px 14px; border-radius: 10px; font-weight: 500; font-size: 15px; }
.nav a:hover, .nav a.active { color: var(--text); background: var(--bg-soft); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); font-size: 24px; cursor: pointer; padding: 6px; }
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; padding: 8px 16px 16px; background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .nav.open { display: flex; }
}

/* hero */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(1200px 500px at 85% -10%, rgba(45, 212, 191, .25), transparent 60%),
              radial-gradient(900px 500px at -10% 110%, rgba(108, 140, 255, .35), transparent 60%),
              linear-gradient(160deg, var(--hero-1), var(--hero-2));
  color: #fff;
  padding: 104px 0 96px;
}
.hero .eyebrow { color: #9fb4ff; }
.hero h1 { font-size: clamp(32px, 5.2vw, 56px); font-weight: 800; margin-bottom: 20px; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, #8ea8ff, #5eead4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: clamp(16px, 2vw, 19px); color: #c9d3ee; max-width: 680px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero-apps { display: none; } }
.hero-apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; transform: rotate(-6deg); }
.hero-apps img { border-radius: 22%; box-shadow: 0 12px 30px rgba(0,0,0,.35); background: #fff; aspect-ratio: 1; object-fit: cover; }
.hero-apps img:nth-child(3n+2) { transform: translateY(24px); }

.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); margin-bottom: 12px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 12px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 6px 20px color-mix(in srgb, var(--brand) 35%, transparent); }
.btn-ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.25); }
.btn-ghost:hover { background: rgba(255,255,255,.14); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--line); }
.btn-outline:hover { background: var(--bg-soft); }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 56px; }
.stat { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 18px 20px; }
.stat b { display: block; font-size: 30px; font-weight: 800; line-height: 1.2; }
.stat span { color: #b7c3e3; font-size: 14px; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* sections */
section.block { padding: 88px 0; }
section.block.soft { background: var(--bg-soft); }
.section-head { margin-bottom: 40px; max-width: 720px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; }
.section-head p { color: var(--text-soft); font-size: 17px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.page-hero { padding: 72px 0 48px; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; }
.page-hero p { color: var(--text-soft); font-size: 17px; max-width: 760px; margin: 0; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.card h3 { font-size: 19px; font-weight: 700; }
.card p { color: var(--text-soft); margin: 0; }
.card .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; margin-bottom: 16px;
  background: color-mix(in srgb, var(--brand) 12%, transparent); }

/* app cards */
.app-card { display: flex; flex-direction: column; gap: 14px; color: inherit; transition: transform .2s, border-color .2s; }
.app-card:hover { text-decoration: none; transform: translateY(-3px); border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.app-card .top { display: flex; gap: 16px; align-items: center; }
.app-icon { width: 64px; height: 64px; border-radius: 22%; flex: none; object-fit: cover; background: var(--bg-soft); border: 1px solid var(--line); }
.app-icon.lg { width: 112px; height: 112px; }
.app-card h3 { margin: 0; font-size: 18px; }
.app-card .sub { color: var(--text-mute); font-size: 14px; }
.app-card p { font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--bg-soft); color: var(--text-soft); border: 1px solid var(--line); }
.tag.live { background: color-mix(in srgb, var(--brand-2) 15%, transparent); color: color-mix(in srgb, var(--brand-2) 70%, var(--text)); border-color: transparent; }
.tag.brand { background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); border-color: transparent; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.filters button {
  font: inherit; font-size: 14px; font-weight: 600; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg-card); color: var(--text-soft); cursor: pointer;
}
.filters button.active { background: var(--text); color: var(--bg); border-color: var(--text); }

/* about */
.profile { display: grid; grid-template-columns: 320px 1fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .profile { grid-template-columns: 1fr; } .profile .photo { max-width: 240px; margin: 0 auto; } }
.profile .photo img { border-radius: 20px; box-shadow: var(--shadow); aspect-ratio: 3/4; object-fit: cover; width: 100%; }
.profile .name { font-size: 30px; font-weight: 800; margin: 0; }
.profile .role { color: var(--text-mute); margin-bottom: 20px; }
.quote { font-size: 19px; line-height: 1.75; border-left: 4px solid var(--brand); padding: 4px 0 4px 20px; margin: 0 0 24px; color: var(--text); }
dl.facts { display: grid; grid-template-columns: 120px 1fr; gap: 10px 16px; margin: 24px 0 0; }
dl.facts dt { color: var(--text-mute); font-size: 14px; }
dl.facts dd { margin: 0; font-weight: 600; }

.skill-group h4 { font-size: 15px; color: var(--text-mute); font-weight: 600; margin-bottom: 10px; }

/* timeline / history */
.year-group { display: grid; grid-template-columns: 120px 1fr; gap: 24px; padding: 28px 0; border-top: 1px solid var(--line); }
.year-group:first-child { border-top: 0; }
.year-group .year { font-size: 26px; font-weight: 800; color: var(--brand); position: sticky; top: 80px; align-self: start; }
@media (max-width: 640px) { .year-group { grid-template-columns: 1fr; gap: 8px; } .year-group .year { position: static; } }
.proj { padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-card); margin-bottom: 10px; }
.proj .row1 { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.proj h4 { margin: 0; font-size: 16px; font-weight: 700; }
.proj .period { font-size: 13.5px; color: var(--text-mute); white-space: nowrap; }
.proj .meta { font-size: 14px; color: var(--text-soft); margin-top: 4px; }
.proj .meta b { color: var(--text); font-weight: 600; }

.clients { display: flex; flex-wrap: wrap; gap: 10px; }
.clients span { padding: 10px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-card); font-weight: 600; color: var(--text-soft); font-size: 15px; }

/* product detail */
.product-hero { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.product-hero h1 { margin: 0 0 6px; }
.store-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.store-btn { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 12px; background: var(--text); color: var(--bg); font-weight: 600; font-size: 15px; }
.store-btn:hover { text-decoration: none; opacity: .9; }
.store-btn svg { width: 20px; height: 20px; fill: currentColor; }
.store-btn.alt { background: var(--bg-card); color: var(--text); border: 1px solid var(--line); }
.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.feature-list li { padding: 14px 18px 14px 46px; position: relative; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-card); }
.feature-list li::before { content: "✓"; position: absolute; left: 16px; top: 13px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; background: var(--brand-2); }
.shots { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.shots img { height: 420px; width: auto; border-radius: 16px; border: 1px solid var(--line); scroll-snap-align: start; flex: none; }
@media (max-width: 640px) { .shots img { height: 340px; } }
.detail-grid { display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: start; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }
.side-card dl { margin: 0; display: grid; gap: 12px; }
.side-card dt { font-size: 13px; color: var(--text-mute); }
.side-card dd { margin: 0; font-weight: 600; }
.link-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.link-list a { display: flex; justify-content: space-between; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: var(--bg-card); font-weight: 500; }
.link-list a:hover { text-decoration: none; border-color: var(--brand); }
.link-list a::after { content: "↗"; color: var(--text-mute); }
.prose h2 { font-size: 22px; margin-top: 40px; }
.prose p { color: var(--text-soft); font-size: 16.5px; }
.breadcrumb { font-size: 14px; color: var(--text-mute); margin-bottom: 16px; }
.breadcrumb a { color: var(--text-mute); }

/* CTA */
.cta { border-radius: 24px; padding: 48px; color: #fff; background: linear-gradient(135deg, var(--hero-2), #0f766e); display: flex; justify-content: space-between; gap: 24px; align-items: center; flex-wrap: wrap; }
.cta h2 { margin: 0 0 6px; font-size: 28px; }
.cta p { margin: 0; color: #d6e0f5; }
@media (max-width: 640px) { .cta { padding: 32px 24px; } }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 40px; background: var(--bg-soft); font-size: 14px; color: var(--text-soft); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { font-size: 14px; color: var(--text); margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--text-soft); }
.biz-info { line-height: 1.9; }
.biz-info > div { display: flex; flex-wrap: wrap; column-gap: 16px; }
.biz-info span { white-space: nowrap; }

.copyright { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--text-mute); font-size: 13px; }

.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }
.hidden { display: none !important; }

/* brand logo light/dark */
.logo img { height: 30px; width: auto; }
.site-footer img.logo-light, .site-footer img.logo-dark { height: 28px; width: auto; }
.logo-dark { display: none !important; }
@media (prefers-color-scheme: dark) {
  .logo-light { display: none !important; }
  .logo-dark { display: block !important; }
}

.hero .eyebrow { color: #8fbaf7; }
.hero h1 em { background: linear-gradient(90deg, #6aa8ff, #5eead4); -webkit-background-clip: text; background-clip: text; }

.app-icon-ph { display: grid; place-items: center; font-weight: 800; font-size: 26px; color: #fff; background: linear-gradient(135deg, #0A2540, #2F80ED); border: 0; }
.app-icon.lg.app-icon-ph { font-size: 44px; }

.profile-teaser { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: center; }
.profile-teaser img { border-radius: 18px; box-shadow: var(--shadow); aspect-ratio: 3/4; object-fit: cover; width: 100%; }
.profile-teaser h2 { font-size: 30px; }
@media (max-width: 700px) { .profile-teaser { grid-template-columns: 1fr; } .profile-teaser img { max-width: 200px; } }

.eras { display: grid; gap: 16px; }
.era { display: grid; grid-template-columns: 160px 1fr; gap: 24px; padding: 24px; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); }
.era-year { font-family: "Sora", sans-serif; font-weight: 700; color: var(--brand); font-size: 18px; }
.era h3 { font-size: 18px; margin-bottom: 6px; }
.era p { margin: 0; color: var(--text-soft); }
@media (max-width: 640px) { .era { grid-template-columns: 1fr; gap: 6px; } }

.group-title { font-size: 24px; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.group-title small { font-size: 14px; font-weight: 700; color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent); padding: 2px 10px; border-radius: 999px; }

.product-banner { width: 100%; border-radius: 18px; border: 1px solid var(--line); margin-bottom: 28px; }
.lead-text { font-size: 19px !important; color: var(--text) !important; font-weight: 500; }
.note { color: var(--text-mute); font-size: 14px; margin-top: 10px; }
.shots.landscape img { height: 300px; }
@media (max-width: 640px) { .shots.landscape img { height: 200px; } }
.proj .stack { font-size: 13px; color: var(--text-mute); }
.filters button span { opacity: .6; margin-left: 4px; }
.infra .tag { vertical-align: middle; }

.profile .photo { display: grid; gap: 16px; }
.profile .photo img.photo-wide { aspect-ratio: 4/3; }
.profile .photo img, .profile-teaser img { height: auto; object-position: 25% center; }

/* AI 바이브코딩 생각 */
.thoughts { background: linear-gradient(160deg, var(--hero-1), var(--hero-2)); color: #e8ecf4; }
.thoughts .section-head h2 { color: #fff; }
.thoughts .eyebrow { color: #8fbaf7; }
.thought-lead { font-size: clamp(20px, 2.6vw, 28px); font-weight: 700; line-height: 1.6; color: #fff; border-left: 4px solid #5eead4; padding-left: 22px; margin: 0 0 32px; max-width: 860px; }
.thought-body { max-width: 860px; }
.thought-body p { color: #c9d3ee; font-size: 17px; line-height: 1.85; }
.thought-cards { margin: 36px 0; }
.thoughts .card { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12); box-shadow: none; }
.thoughts .card h3 { color: #fff; }
.thoughts .card p { color: #b7c3e3; }
.thoughts .card .icon { background: rgba(94,234,212,.12); }
.thought-sign { text-align: right; color: #8fbaf7 !important; font-weight: 600; }

/* 방문 카운터 (레트로 감성) */
.copyright { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.visit-counter { font-family: "Sora", ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; letter-spacing: .08em; color: var(--text-mute);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; background: var(--bg-card); white-space: nowrap; }
.visit-counter b { color: var(--brand); font-weight: 700; margin-left: 4px; font-variant-numeric: tabular-nums; }
.visit-counter i { font-style: normal; color: var(--line); margin: 0 8px; }
.profile-teaser img.ceo-portrait { object-position: center top; }

/* 대표 소개 — 컴퓨터와 함께 자란 이야기 */
.story { display: grid; grid-template-columns: 1fr 340px; gap: 56px; align-items: center; }
.story-text p { color: var(--text-soft); font-size: 17px; line-height: 1.9; max-width: 720px; }
.story-photo img { width: 100%; height: auto; aspect-ratio: 3/4; object-fit: cover; border-radius: 20px; box-shadow: var(--shadow); }
@media (max-width: 860px) { .story { grid-template-columns: 1fr; gap: 24px; } .story-photo { max-width: 280px; } }

/* 성장 이야기 — 단락마다 삽화 한 컷 (짝수 번째는 좌우 반전) */
.episodes { display: grid; gap: 40px; }
.episode { display: grid; grid-template-columns: 420px 1fr; gap: 36px; align-items: center; }
.episode:nth-child(even) { grid-template-columns: 1fr 420px; }
.episode:nth-child(even) .episode-art { order: 2; }
.episode p { color: var(--text-soft); font-size: 17px; line-height: 1.9; margin: 0; }
.episode-art svg { width: 100%; height: auto; display: block; border-radius: 18px; box-shadow: var(--shadow); }
@media (max-width: 860px) {
  .episode, .episode:nth-child(even) { grid-template-columns: 1fr; gap: 16px; }
  .episode:nth-child(even) .episode-art { order: 0; }
}
.profile .photo img.ceo-portrait { object-position: center top; }
.tag.hot { background: #f28c28; color: #fff; border-color: transparent; }
.episode-text p + p { margin-top: 14px; }
