/* ===============================================================
   특이점 스튜디오 — Animated Nexus Interface (Light theme)
   =============================================================== */

:root {
  --bg-0: #ffffff;
  --bg-1: #f7f9fc;
  --bg-2: #eef2f8;
  --surface: rgba(255, 255, 255, 0.7);
  --surface-strong: rgba(255, 255, 255, 0.95);
  --border: rgba(15, 30, 60, 0.08);
  --border-strong: rgba(15, 30, 60, 0.16);

  --text: #0b1220;
  --text-dim: #4a5568;
  --text-mute: #8a94a6;

  --accent: #2666E8;      /* blue from logo */
  --accent-2: #1FCC94;    /* green from logo */
  --accent-3: #1FB9BF;    /* teal from logo middle */
  --accent-ink: #2F55D9;  /* deep blue dot */

  --font-body: 'Noto Sans KR', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-head: 'Outfit', 'Noto Sans KR', system-ui, sans-serif;

  --radius: 18px;
  --radius-sm: 12px;
  --container: 1200px;
  --ease: cubic-bezier(.2,.65,.2,1);
  --shadow-sm: 0 1px 2px rgba(15, 30, 60, 0.05), 0 2px 8px rgba(15, 30, 60, 0.04);
  --shadow-md: 0 10px 30px -12px rgba(15, 30, 60, 0.15);
  --shadow-lg: 0 24px 60px -24px rgba(38, 102, 232, 0.25);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }  /* 모바일/태블릿에서 데코 레이어가 가로로 스크롤 유발하지 않도록 */
body {
  background:
    radial-gradient(1000px 700px at 10% -10%, rgba(38,102,232,.07) 0%, transparent 60%),
    radial-gradient(900px 700px at 100% 10%, rgba(31,204,148,.08) 0%, transparent 55%),
    var(--bg-0);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;         /* body::before 격자 레이어의 기준점 */
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }

/* -------- Canvas background -------- */
#nexus {
  position: fixed; inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .55;
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 40%, transparent 85%);
  mask-image: radial-gradient(ellipse at 50% 30%, #000 40%, transparent 85%);
}
.site-header, main, .site-footer { position: relative; z-index: 1; }

/* =============== Header =============== */
.site-header {
  position: fixed; inset: 0 0 auto 0;
  z-index: 50;
  padding: 14px 0;
  transition: background .35s var(--ease), backdrop-filter .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}

/* Logo */
.logo { display: inline-flex; align-items: center; gap: 12px; }
.logo-img {
  width: 40px; height: 40px; border-radius: 10px;
  box-shadow: 0 4px 12px -4px rgba(38,102,232,.35);
  flex-shrink: 0;
}
.logo-text {
  display: flex; flex-direction: column;
  line-height: 1;
}
.logo-text strong {
  font-family: 'Noto Sans KR', var(--font-head);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -.01em;
  color: var(--text);
  line-height: 1.1;
}
.logo-text em {
  font-family: var(--font-head);
  font-style: normal;
  font-weight: 500;
  color: var(--text-mute);
  font-size: 10.5px;
  letter-spacing: .11em;
  margin-top: 5px;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Nav */
.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  color: var(--text-dim); font-size: 14px; font-weight: 500;
  padding: 8px 2px; position: relative; transition: color .2s;
}
.nav a:hover, .nav a.active { color: var(--text); }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px;
  height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: right center;
  transition: transform .3s var(--ease);
}
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); transform-origin: left center; }
.nav .nav-cta {
  padding: 9px 16px; border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-weight: 700;
  box-shadow: 0 8px 20px -8px rgba(38,102,232,.45);
}
.nav .nav-cta::after { display: none; }
.nav .nav-cta:hover, .nav .nav-cta.active { filter: brightness(1.05); color: #fff; transform: translateY(-1px); }

.nav-toggle {
  display: none; width: 40px; height: 40px; background: #fff; border: 1px solid var(--border);
  border-radius: 10px; cursor: pointer; position: relative;
}
.nav-toggle span {
  position: absolute; left: 10px; right: 10px; height: 2px; background: var(--text);
  transition: transform .3s var(--ease), opacity .2s, top .3s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 13px; }
.nav-toggle span:nth-child(2) { top: 19px; }
.nav-toggle span:nth-child(3) { top: 25px; }
.nav-toggle.open span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

/* =============== Hero =============== */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex; align-items: center;
  padding-top: 80px;
  position: relative;
  overflow: visible;          /* 데코 레이어가 아래 섹션으로 자연스럽게 흘러내리도록 */
  isolation: isolate;
}

/* ============================================================
 * Ambient grid — 페이지 전체에 연속된 격자 레이어.
 * body::before 로 올려서 hero/services 경계의 seam을 원천 제거.
 * 화면 상단 0~180vh 범위만 보이도록 linear mask로 부드럽게 fade.
 * ============================================================ */
body::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 180vh;                /* hero + services 상단까지 한 레이어로 커버 */
  z-index: -3;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(11,27,52,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11,27,52,.045) 1px, transparent 1px);
  background-size: 56px 56px, 56px 56px;
  -webkit-mask-image:
    radial-gradient(ellipse 70% 50% at 50% 30%, #000 30%, transparent 85%),
    linear-gradient(to bottom, #000 0%, #000 62%, transparent 100%);
          mask-image:
    radial-gradient(ellipse 70% 50% at 50% 30%, #000 30%, transparent 85%),
    linear-gradient(to bottom, #000 0%, #000 62%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-composite: intersect;
}

/* ============================================================
 * Ambient orbs — hero 전용 브랜드 컬러 블롭.
 * overflow:visible 이므로 하단을 넉넉히 bleed 시켜서 services 상단에
 * 잔향처럼 녹아들도록 함. 끝단은 vertical fade 로 완전 소거.
 * ============================================================ */
.hero::before {
  content: "";
  position: absolute;
  left: -10%; right: -10%;
  top: -10%;
  bottom: -35%;                 /* hero 아래로 35% 만큼 연장 */
  background:
    radial-gradient(520px 420px at 12% 22%, rgba(38,102,232,.18), transparent 65%),
    radial-gradient(620px 480px at 88% 78%, rgba(31,204,148,.14), transparent 65%),
    radial-gradient(460px 360px at 75% 18%, rgba(147,116,255,.12), transparent 65%);
  filter: blur(20px);
  z-index: -2;
  pointer-events: none;
  animation: heroOrbs 16s ease-in-out infinite alternate;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 95%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 95%);
}

/* hero::after 는 사용하지 않음 (격자는 body::before 로 이동) */
.hero::after { display: none; }
@keyframes heroOrbs {
  0%   { transform: translate3d(0,0,0) scale(1); }
  50%  { transform: translate3d(-2%,1.5%,0) scale(1.05); }
  100% { transform: translate3d(2%,-1.5%,0) scale(1.02); }
}

/* ------------------------------------------------------------
 * 반응형 — 태블릿/모바일에서 hero::before (오브) 가 뷰포트 바깥으로
 * 삐져나와 오른쪽이 잘리거나 좌우가 치우쳐 보이는 문제 방지.
 * 1024px 이하: 오브를 뷰포트 안쪽에 재배치 + 좌우 bleed 제거
 * 640px 이하: 블롭 크기 축소 + animation scale 보수적으로
 * ------------------------------------------------------------ */
@media (max-width: 1024px) {
  .hero::before {
    left: 0; right: 0;                        /* -10% bleed 제거 → viewport 안으로 */
    background:
      radial-gradient(60vw 48vw at 20% 22%, rgba(38,102,232,.18), transparent 65%),
      radial-gradient(70vw 56vw at 80% 72%, rgba(31,204,148,.14), transparent 65%),
      radial-gradient(52vw 42vw at 70% 16%, rgba(147,116,255,.12), transparent 65%);
  }
  body {
    /* edge-anchored radial 을 약하게 재배치해서 오른쪽 clip 눈에 안 띄게 */
    background:
      radial-gradient(70vw 60vh at 15% -5%, rgba(38,102,232,.06) 0%, transparent 60%),
      radial-gradient(70vw 60vh at 95% 8%, rgba(31,204,148,.07) 0%, transparent 55%),
      var(--bg-0);
  }
  body::before {
    /* 모바일/태블릿은 격자 mask를 더 빠르게 fade-out 시켜 어색한 꼬리 제거 */
    -webkit-mask-image:
      radial-gradient(ellipse 85% 45% at 50% 28%, #000 25%, transparent 85%),
      linear-gradient(to bottom, #000 0%, #000 55%, transparent 95%);
            mask-image:
      radial-gradient(ellipse 85% 45% at 50% 28%, #000 25%, transparent 85%),
      linear-gradient(to bottom, #000 0%, #000 55%, transparent 95%);
  }
}
@media (max-width: 640px) {
  .hero::before {
    animation: none;                          /* 모바일에선 scale 애니메이션 off → 가로 밀림 방지 */
    background:
      radial-gradient(72vw 56vw at 25% 20%, rgba(38,102,232,.18), transparent 65%),
      radial-gradient(80vw 62vw at 78% 70%, rgba(31,204,148,.14), transparent 65%),
      radial-gradient(56vw 46vw at 72% 14%, rgba(147,116,255,.12), transparent 65%);
    filter: blur(16px);
  }
}
.hero-inner { width: min(100% - 40px, var(--container)); margin-inline: auto; position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-size: 13px; letter-spacing: .18em;
  color: var(--text-dim); padding: 9px 18px;
  border: 1px solid var(--border); border-radius: 999px;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
  margin-bottom: 40px;
}
.pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-2); box-shadow: 0 0 0 0 rgba(31,204,148,.5);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(31,204,148,.5); }
  70%  { box-shadow: 0 0 0 12px rgba(31,204,148,0); }
  100% { box-shadow: 0 0 0 0 rgba(31,204,148,0); }
}
.hero-title {
  font-family: 'Noto Sans KR', var(--font-head);
  font-weight: 900;
  font-size: clamp(42px, 7.8vw, 108px);
  line-height: 1.08; letter-spacing: -.025em; margin: 0 0 32px;
  color: var(--text);
  word-break: keep-all;
}
.hero-sub {
  max-width: 720px;
  font-size: clamp(17px, 1.6vw, 22px);
  line-height: 1.7;
  color: var(--text-dim);
  margin: 0 0 48px;
  word-break: keep-all;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 16px; }
.hero-cta .btn { padding: 16px 28px; font-size: 16px; }

.gradient-text {
  background: linear-gradient(120deg, var(--accent), var(--accent-3) 45%, var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 14px 24px; border-radius: 999px; font-weight: 700;
  font-family: var(--font-head); letter-spacing: .01em; font-size: 15px;
  transition: transform .2s var(--ease), background .2s, border-color .2s, box-shadow .2s;
  border: 1px solid transparent; cursor: pointer;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 14px 30px -10px rgba(38,102,232,.45);
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.05); color: #fff; }

/* XL button variant — ~30% larger than the default .btn (padding + font-size + radius) */
.btn.btn-xl {
  padding: 18px 32px;
  font-size: 19.5px;
  gap: 8px;
  border-radius: 999px;
}
@media (max-width: 720px) {
  .btn.btn-xl { padding: 16px 26px; font-size: 18px; }
}
.btn-ghost { border-color: var(--border-strong); color: var(--text); background: #fff; }
.btn-ghost:hover { background: var(--bg-1); border-color: var(--accent); color: var(--accent); }
.btn-block { width: 100%; }

.scroll-indicator {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--font-head); font-size: 11px; letter-spacing: .3em;
  color: var(--accent);                 /* 텍스트 색도 좀 더 진하게 */
  opacity: .85;
  z-index: 2;                          /* hero 내부 컨텐츠와 동일 평면 */
  pointer-events: none;                /* 혹여 버튼 클릭을 가리더라도 통과 */
}
/* 세로가 매우 짧은 디바이스(갤럭시 S8 address bar 포함, 가로모드 모바일 등)
 * 에서는 scroll-indicator 가 hero 컨텐츠와 겹칠 수 밖에 없으므로 아예 숨김. */
@media (max-height: 720px) and (max-width: 720px) {
  .scroll-indicator { display: none; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .scroll-indicator { display: none; }
}
/* 두께 있는 세로 트랙 + 위→아래로 흐르는 밝은 점(dot) 효과.
 * span 하나로 트랙을 그리고, ::before 로 움직이는 dot 을 표현한다. */
.scroll-indicator span {
  position: relative;
  width: 2px;
  height: 44px;
  border-radius: 2px;
  background: linear-gradient(
    to bottom,
    rgba(38,102,232,0) 0%,
    rgba(38,102,232,.35) 25%,
    rgba(38,102,232,.55) 75%,
    rgba(38,102,232,0) 100%
  );
  overflow: visible;
}
.scroll-indicator span::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow:
    0 0 0 2px rgba(38,102,232,.18),
    0 0 12px rgba(38,102,232,.55);
  transform: translate(-50%, -50%);
  animation: scrollDot 1.8s cubic-bezier(0.55, 0.055, 0.675, 0.19) infinite;
}
@keyframes scrollDot {
  0%   { top: 0;    opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
  20%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  80%  { opacity: 1; }
  100% { top: 100%; opacity: 0; transform: translate(-50%, 50%) scale(0.7); }
}

/* =============== Sections =============== */
.section {
  padding: clamp(64px, 9vw, 130px) 0;
  position: relative;
}

/* hero → services 경계 안착: 격자는 body::before 로 page-level 연속 레이어로
 * 처리하므로 services 섹션에는 별도 데코 pseudo 를 두지 않는다.  (seam 제거)
 */
.section-head { margin-bottom: 56px; }
.section-head.center { text-align: center; margin-inline: auto; max-width: 760px; }
.section-tag {
  display: inline-block; font-family: var(--font-head); font-size: 12px;
  letter-spacing: .3em; color: var(--accent); margin-bottom: 14px; font-weight: 600;
}
.section-head h2, .about-content h2 {
  font-family: 'Noto Sans KR', var(--font-head); font-weight: 800;
  font-size: clamp(28px, 3.8vw, 50px);
  letter-spacing: -.01em; line-height: 1.2; margin: 0; color: var(--text);
}
.section-desc { color: var(--text-dim); margin-top: 14px; }

/* =============== Services =============== */
.services-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px;
}
.service-card {
  padding: 32px 28px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
}
.service-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease);
}
.service-card:hover { transform: translateY(-6px); border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.service-card:hover::before { transform: scaleX(1); }
.service-icon {
  width: 56px; height: 56px; border-radius: 14px; margin-bottom: 22px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(38,102,232,.12), rgba(31,204,148,.14));
  border: 1px solid var(--border-strong);
}
.service-icon svg { width: 30px; height: 30px; stroke: var(--accent); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.service-card h3 { font-family: var(--font-head); font-size: 19px; margin: 0 0 10px; color: var(--text); font-weight: 700; }
.service-card > p { color: var(--text-dim); font-size: 14.5px; margin: 0 0 18px; flex: 1; }
.service-link {
  font-family: var(--font-head); font-weight: 600; font-size: 13px;
  color: var(--accent); transition: gap .2s;
}
.service-link:hover { color: var(--accent-2); }

/* =============== About =============== */
.about-grid {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 80px; align-items: stretch;
}
.about-content { display: flex; flex-direction: column; }
.about-content h2 { margin: 10px 0 20px; }
.about-content .section-desc { margin: 0 0 32px; }
.about-features {
  display: flex; flex-direction: column; gap: 18px; flex: 1;
}
.about-feature {
  display: grid; grid-template-columns: 56px 1fr; gap: 18px; align-items: center;
  padding: 22px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #fff;
  flex: 1;
}
.about-feature-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(38,102,232,.45);
}
.about-feature-icon svg {
  stroke: #fff; fill: none; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.about-feature h4 { font-family: var(--font-head); font-size: 17px; margin: 4px 0 6px; color: var(--text); }
.about-feature p { color: var(--text-dim); font-size: 14.5px; margin: 0; }

/* Process visual */
.process-visual {
  padding: 36px 32px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, var(--bg-1));
  box-shadow: var(--shadow-md);
  position: sticky; top: 100px;
  display: flex; flex-direction: column;
}
.process-head { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.process-head h3 { font-family: var(--font-head); font-size: 22px; margin: 0; color: var(--text); }
.process-rocket { font-size: 26px; }
.process-steps {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
  position: relative; flex: 1;
}
.process-steps::before {
  content: ""; position: absolute; left: 22px; top: 14px; bottom: 14px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  opacity: .2;
}
.process-steps li {
  display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center;
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,.6);
  border: 1px solid var(--border);
  transition: background .25s, transform .25s;
  position: relative;
  flex: 1;
  min-height: 52px;
}
.process-steps li:hover { background: #fff; transform: translateX(4px); }
.process-step-num {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 800; font-size: 11px;
  color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2));
  margin-left: 4px;
  box-shadow: 0 0 0 4px #fff;
  z-index: 1;
}
.process-step-text { font-size: 14.5px; font-weight: 500; color: var(--text); }

/* =============== Strengths =============== */
.strengths-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px;
}
.strength-card {
  padding: 32px 28px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: #fff; box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
  position: relative; overflow: hidden;
}
.strength-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.strength-card.featured {
  background: linear-gradient(160deg, var(--accent), var(--accent-3) 55%, var(--accent-2));
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.strength-card.featured h3,
.strength-card.featured p,
.strength-card.featured li { color: #fff; }
.strength-card.featured li::before { background: #fff; }
.strength-badge {
  display: inline-block; font-family: var(--font-head); font-size: 10.5px;
  letter-spacing: .22em; padding: 4px 10px; border-radius: 999px;
  background: rgba(255,255,255,.22); color: #fff; margin-bottom: 14px;
  text-transform: uppercase;
}
.strength-card h3 {
  font-family: var(--font-head); font-size: 19px; margin: 0 0 12px; color: var(--text); font-weight: 700;
}
.strength-card > p { color: var(--text-dim); font-size: 14.5px; margin: 0 0 16px; }
.strength-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.strength-list li {
  font-size: 13.5px; color: var(--text-dim); padding-left: 20px; position: relative; line-height: 1.5;
}
.strength-list li::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 10px; height: 2px; background: var(--accent); border-radius: 2px;
}

/* =============== Works / Portfolio =============== */
.works-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px;
}
.work-card {
  display: block; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform .4s var(--ease), border-color .3s, box-shadow .3s;
}
.work-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}
.work-thumb { aspect-ratio: 16/10; overflow: hidden; background: var(--bg-2); }
.work-thumb img {
  width: 100%; height: 100%; object-fit: cover; object-position: center top;
  transition: transform .8s var(--ease);
}
.work-card:hover .work-thumb img { transform: scale(1.05); }
.work-meta { padding: 22px 24px 26px; }
.work-kind {
  display: inline-block; font-family: var(--font-head); font-size: 11px;
  letter-spacing: .22em; color: var(--accent); margin-bottom: 8px; font-weight: 600;
}
.work-meta h3 { font-family: var(--font-head); font-size: 20px; margin: 0 0 8px; color: var(--text); }
.work-meta > p { color: var(--text-dim); font-size: 14.5px; margin: 0 0 14px; }
.work-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.work-tags span {
  font-family: var(--font-head); font-size: 11.5px; font-weight: 500;
  padding: 4px 10px; border-radius: 999px;
  background: var(--bg-1); color: var(--text-dim);
  border: 1px solid var(--border);
}

/* =============== History =============== */
.history-timeline {
  list-style: none; padding: 0; margin: 0;
  max-width: 780px; margin-inline: auto;
  position: relative;
}
.history-timeline::before {
  content: ""; position: absolute; left: 80px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-2) 100%);
  opacity: .25;
}
.history-item {
  display: grid; grid-template-columns: 80px 24px 1fr; gap: 24px;
  align-items: start; padding: 18px 0; position: relative;
}
.history-item::after {
  content: ""; position: absolute; left: 76px; top: 26px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #fff; border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(38,102,232,.12);
}
.history-item.milestone::after { background: var(--accent); box-shadow: 0 0 0 4px rgba(31,204,148,.2); }
.history-year {
  font-family: var(--font-head); font-size: 22px; font-weight: 800;
  color: var(--accent); text-align: right; padding-right: 20px;
}
.history-item.milestone .history-year { color: var(--accent-2); }
.history-body { grid-column: 3; }
.history-body h4 { font-family: 'Noto Sans KR', var(--font-head); font-size: 16px; margin: 0 0 4px; color: var(--text); font-weight: 700; }
.history-body p { font-size: 13.5px; color: var(--text-mute); margin: 0; }
.history-stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.history-stack span {
  display: inline-block;
  padding: 3px 10px;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  background: rgba(38, 102, 232, 0.08);
  border: 1px solid rgba(38, 102, 232, 0.18);
  border-radius: 999px;
  letter-spacing: .02em;
}

/* =============== Tech Stack =============== */
.tech-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px;
}
.tech-item {
  padding: 26px 22px; text-align: center;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #fff;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.tech-item:hover {
  transform: translateY(-4px); border-color: var(--accent);
  box-shadow: var(--shadow-md);
}
.tech-ic { font-size: 32px; margin-bottom: 10px; line-height: 1; }
.tech-item h4 {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 14px;
  padding-bottom: 10px;
  color: var(--text);
  letter-spacing: -.01em;
  position: relative;
}
.tech-item h4::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 36px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), #1fcc94);
  border-radius: 2px;
}
.tech-item p { font-size: 13px; color: var(--text-dim); margin: 0; font-family: var(--font-head); font-weight: 500; }

/* Stack list with inline brand icons (Simple Icons CDN) — 1.3x size */
.tech-item .stack-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  font-size: 16.9px;
  line-height: 1.3;
}
.tech-item .stack {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.tech-item .stack img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

/* =============== CTA =============== */
.cta { padding-bottom: clamp(48px, 8vw, 100px); }
.cta-box {
  padding: clamp(44px, 6vw, 80px) clamp(28px, 5vw, 72px);
  border-radius: var(--radius);
  background:
    radial-gradient(600px 300px at 15% 20%, rgba(38,102,232,.25), transparent 60%),
    radial-gradient(600px 300px at 85% 80%, rgba(31,204,148,.22), transparent 60%),
    linear-gradient(140deg, #0b1b34 0%, #0a2544 100%);
  text-align: center; color: #fff;
  box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden;
}
.cta-box::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.06) 1px, transparent 1.5px),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,.06) 1px, transparent 1.5px),
    radial-gradient(circle at 60% 20%, rgba(255,255,255,.04) 1px, transparent 1.5px);
  background-size: 80px 80px, 120px 120px, 160px 160px;
  pointer-events: none;
}
.cta-box > * { position: relative; }
.cta-box h2 {
  font-family: 'Noto Sans KR', var(--font-head); font-weight: 900;
  font-size: clamp(28px, 4vw, 48px); line-height: 1.2;
  margin: 0 0 18px; color: #fff;
  word-break: keep-all; overflow-wrap: break-word; line-break: strict;
}
.cta-box .gradient-text {
  background: linear-gradient(120deg, #a9d0ff, #aef4d4);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cta-box p { color: rgba(255,255,255,.85); margin: 0 0 28px; font-size: clamp(15px, 1.4vw, 17px); word-break: keep-all; overflow-wrap: break-word; line-break: strict; }
.br-mobile { display: none; }
.br-mob { display: none; }
@media (max-width: 720px) {
  .br-mobile { display: inline; }
}
.cta-box .btn-primary {
  background: #fff; color: var(--accent);
  box-shadow: 0 18px 40px -14px rgba(0,0,0,.35);
}
.cta-box .btn-primary:hover { background: var(--bg-1); color: var(--accent); }
.cta-contact { margin-top: 22px; font-family: var(--font-head); }
.cta-contact a { color: rgba(255,255,255,.85); font-size: 14px; letter-spacing: .04em; }
.cta-contact a:hover { color: #fff; }

/* ============ CTA Mesh Gradient Shader (@paper-design/shaders-react) ============
 * <MeshGradient /> 컴포넌트가 canvas를 .cta-shader-canvas 안에 마운트함.
 * 파스텔 mesh 배경 위에 dark 텍스트 조합 → 시선을 사로잡는 CTA.
 */
.cta-box.cta-shader {
  background: #f5f1ea; /* warm base behind mesh */
  overflow: hidden;
  isolation: isolate;
}
/* Hide the original cta-box::before dotted pattern on shader variant */
.cta-box.cta-shader::before { display: none; }

.cta-shader-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.cta-shader-canvas > canvas,
.cta-shader-canvas > div,
.cta-shader-canvas > div > canvas {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* Veil — veilOpacity="bg-white/20" 대응 */
.cta-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(255, 255, 255, 0.20);
  pointer-events: none;
}

/* Make sure all text/buttons sit above the shader */
.cta-box.cta-shader > h2,
.cta-box.cta-shader > p,
.cta-box.cta-shader > .btn,
.cta-box.cta-shader > .cta-contact { position: relative; z-index: 2; }

/* Text color stays readable on the pastel mesh: switch to dark text */
.cta-box.cta-shader h2 { color: #0b1b34; }
.cta-box.cta-shader .gradient-text {
  background: linear-gradient(120deg, #1b6ae8, #0e8f7a);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cta-box.cta-shader p { color: rgba(11, 27, 52, 0.82); }
.cta-box.cta-shader .cta-contact a { color: rgba(11, 27, 52, 0.75); }
.cta-box.cta-shader .cta-contact a:hover { color: #0b1b34; }
.cta-box.cta-shader .btn-primary {
  background: #0b1b34; color: #fff;
  box-shadow: 0 18px 40px -14px rgba(0, 0, 0, 0.35);
}
.cta-box.cta-shader .btn-primary:hover { background: #12274a; color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .cta-shader-canvas { opacity: 0.7; }
}

/* =============== Footer =============== */
.site-footer {
  padding: 72px 0 32px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
  background: linear-gradient(180deg, transparent, var(--bg-1));
}
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 48px;
  padding-bottom: 40px; border-bottom: 1px solid var(--border);
}
.footer-brand-col .logo { margin-bottom: 18px; }
.footer-desc { color: var(--text-dim); font-size: 14px; margin: 0 0 16px; }
.footer-contact-info { font-size: 14px; color: var(--text-dim); }
.footer-contact-info a { color: var(--accent); font-weight: 600; }
.footer-col h4 {
  font-family: var(--font-head); font-size: 13px;
  letter-spacing: .16em; text-transform: uppercase;
  margin: 0 0 16px; color: var(--text);
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 14px; color: var(--text-dim); transition: color .2s; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap;
  padding: 24px 0 12px;
}
.footer-copyright { font-size: 13px; color: var(--text-mute); }
.footer-legal { display: flex; gap: 20px; }
.footer-legal a { font-size: 13px; color: var(--text-mute); transition: color .2s; }
.footer-legal a:hover { color: var(--accent); }
.footer-company-info {
  font-size: 12.5px; color: var(--text-mute); line-height: 1.7;
  padding-top: 16px; border-top: 1px solid var(--border);
}

/* =============== Contact Modal =============== */
.modal {
  position: fixed; inset: 0;
  z-index: 1000;
  display: none;
  align-items: flex-start; justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal.open { display: flex; animation: modalFade .25s var(--ease); }
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }

.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(6, 14, 30, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-dialog {
  position: relative; z-index: 1;
  width: 100%; max-width: 560px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 40px 120px -30px rgba(15, 30, 60, 0.45), 0 0 0 1px var(--border);
  padding: 32px 32px 28px;
  margin: auto;
  animation: modalRise .35s var(--ease);
}
@keyframes modalRise {
  from { opacity: 0; transform: translateY(24px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

.modal-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  margin-bottom: 24px; padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.modal-head .section-tag { margin-bottom: 6px; }
.modal-head h3 {
  font-family: 'Noto Sans KR', var(--font-head);
  font-size: 22px; font-weight: 800; margin: 0; color: var(--text);
}
.modal-close {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-1); border: 1px solid var(--border);
  color: var(--text-dim); cursor: pointer;
  display: grid; place-items: center;
  transition: background .2s, color .2s, transform .2s;
  flex-shrink: 0;
}
.modal-close:hover { background: var(--text); color: #fff; transform: rotate(90deg); }

/* Form */
.modal-form { display: grid; gap: 18px; }
.form-row { display: grid; gap: 8px; }
.form-row label,
.label-row label {
  font-family: var(--font-head); font-weight: 600;
  font-size: 13px; color: var(--text);
  letter-spacing: .01em;
}
.label-row {
  display: flex; justify-content: space-between; align-items: baseline;
}
.char-count {
  font-family: var(--font-head); font-size: 12px;
  color: var(--text-mute); font-weight: 500;
}
.char-count #charCount { color: var(--accent); font-weight: 700; }
.required { color: var(--accent); margin-left: 2px; }

.modal-form input,
.modal-form select,
.modal-form textarea {
  width: 100%;
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--bg-1); border: 1px solid var(--border);
  color: var(--text); font-family: var(--font-body); font-size: 15px;
  transition: border-color .2s, background .2s, box-shadow .2s;
  appearance: none; -webkit-appearance: none;
}
.modal-form select {
  background-image: linear-gradient(45deg, transparent 50%, var(--text-mute) 50%),
                    linear-gradient(135deg, var(--text-mute) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 40px;
  cursor: pointer;
}
.modal-form textarea { resize: vertical; min-height: 120px; line-height: 1.6; }
.modal-form input:focus,
.modal-form select:focus,
.modal-form textarea:focus {
  outline: none; border-color: var(--accent); background: #fff;
  box-shadow: 0 0 0 4px rgba(38,102,232,.12);
}
.modal-form input::placeholder,
.modal-form textarea::placeholder { color: var(--text-mute); }

.recaptcha-note {
  font-size: 11.5px; color: var(--text-mute); text-align: center;
  margin: 2px 0 0; line-height: 1.55;
}
.recaptcha-note a { color: var(--accent); text-decoration: none; }
.recaptcha-note a:hover { text-decoration: underline; }
/* reCAPTCHA v3 badge 숨김 (ToS: 폼에 recaptcha-note 문구를 표시하면 허용됨)
   visibility: hidden 으로 공간은 유지하되 보이지 않게 처리 */
.grecaptcha-badge {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.form-status {
  font-size: 13.5px; padding: 4px 2px; min-height: 20px;
  font-weight: 500; line-height: 1.5;
}
.form-status.success { color: #0f9d6b; }
.form-status.error { color: #e24747; }

.modal-foot {
  display: flex; gap: 10px; justify-content: flex-end;
  padding-top: 12px; border-top: 1px solid var(--border);
}
.modal-foot .btn { padding: 12px 22px; font-size: 14.5px; min-width: 110px; }

#submitBtn { position: relative; }
#submitBtn .btn-spinner {
  position: absolute;
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
  animation: spin .8s linear infinite;
  opacity: 0;
}
#submitBtn.loading .btn-label { opacity: 0; }
#submitBtn.loading .btn-spinner { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Restyle button for service-link since we switched <a> to <button> */
button.service-link {
  background: transparent; border: 0; padding: 0; margin: 0;
  font-family: var(--font-head); font-weight: 600; font-size: 13px;
  color: var(--accent); cursor: pointer; text-align: left;
  transition: color .2s, transform .2s;
}
button.service-link:hover { color: var(--accent-2); transform: translateX(2px); }

@media (max-width: 560px) {
  .modal { padding: 20px 14px; }
  .modal-dialog { padding: 24px 20px 20px; border-radius: 16px; }
  .modal-head h3 { font-size: 19px; }
  .modal-foot { flex-direction: column-reverse; }
  .modal-foot .btn { width: 100%; }
}

/* =============== Reveal =============== */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .pulse, .scroll-indicator span, .scroll-indicator span::before { animation: none; }
}

/* =============== Responsive =============== */
@media (max-width: 1100px) {
  .services-grid  { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .strengths-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .tech-grid      { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .about-grid     { grid-template-columns: 1fr; gap: 40px; align-items: start; }
  .process-visual { position: static; }
  .process-steps li { flex: 0 1 auto; min-height: 0; }
  .about-feature { flex: 0 1 auto; }
  .about-features { flex: 0 1 auto; }
  .footer-grid    { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: 64px 0 auto 0;
    flex-direction: column; align-items: stretch;
    background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(16px);
    padding: 20px; gap: 4px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity .25s, transform .25s;
  }
  .nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav a {
    padding: 14px 8px; font-size: 16px;
    border-bottom: 1px solid var(--border);
  }
  .nav a::after { display: none; }
  .nav .nav-cta { text-align: center; margin-top: 12px; border-bottom: 0; }

  .hero {
    padding-top: 110px;
    padding-bottom: 130px;        /* 모바일: 버튼 스택 + scroll indicator 겹침 방지 */
  }
  .br-mob { display: inline; }
  .hero-title {
    font-size: clamp(40px, 16vw, 72px);
    line-height: 1.12;
    letter-spacing: -.03em;
    margin-bottom: 24px;
  }
  .hero-sub { font-size: 16px; margin-bottom: 32px; line-height: 1.65; }
  .hero-eyebrow { margin-bottom: 28px; }
  .hero-cta { width: 100%; }
  .btn { width: 100%; }

  /* scroll-indicator 가 CTA 버튼과 겹치지 않도록 하단 여백 확보 */
  .scroll-indicator {
    bottom: 18px;
    font-size: 10px;
  }
  .scroll-indicator span { height: 28px; }

  .works-grid     { grid-template-columns: 1fr; }
  .services-grid  { grid-template-columns: 1fr; }
  .strengths-grid { grid-template-columns: 1fr; }
  .tech-grid      { grid-template-columns: repeat(2, minmax(0,1fr)); }

  .about-feature { grid-template-columns: 48px 1fr; gap: 14px; padding: 16px; flex: 0 1 auto; }
  .about-feature-icon { width: 40px; height: 40px; }
  .about-feature-icon svg { width: 18px; height: 18px; }

  .history-timeline::before { left: 54px; }
  .history-item { grid-template-columns: 54px 20px 1fr; gap: 14px; }
  .history-item::after { left: 50px; }
  .history-year { font-size: 18px; padding-right: 14px; }

  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  .tech-grid { grid-template-columns: 1fr; }
  .hero-eyebrow { font-size: 11px; letter-spacing: .15em; padding: 7px 13px; }
}

/* =============== Image treatments (Hero / Services / About / Why Us / Tech Stack) =============== */

/* Service cards — top banner image */
.service-thumb {
  margin: -32px -28px 22px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, rgba(38,102,232,.08), rgba(31,204,148,.10));
}
.service-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .8s var(--ease), filter .5s var(--ease);
  filter: saturate(.95);
}
.service-card:hover .service-thumb img {
  transform: scale(1.06);
  filter: saturate(1.1);
}
.service-thumb::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(255,255,255,.75) 100%);
  pointer-events: none;
}

/* About hero banner image */
.about-hero {
  position: relative;
  aspect-ratio: 21 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 64px;
  box-shadow: var(--shadow-md);
  isolation: isolate;
}
.about-hero img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.about-hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(11,27,52,.72) 0%, rgba(38,102,232,.35) 55%, rgba(31,204,148,.15) 100%);
}
.about-hero-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: clamp(24px, 4vw, 44px);
  color: #fff;
}
.about-hero-tag {
  font-family: var(--font-head);
  font-size: 11.5px; letter-spacing: .22em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,.18); backdrop-filter: blur(6px);
  align-self: flex-start; margin-bottom: 14px;
}
.about-hero-overlay p {
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 600; line-height: 1.45;
  margin: 0; max-width: 680px;
  text-shadow: 0 2px 12px rgba(0,0,0,.25);
}

/* Strength (Why Us) non-featured cards — top banner image */
.strength-thumb {
  margin: -32px -28px 22px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, rgba(38,102,232,.08), rgba(31,204,148,.10));
}
.strength-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .8s var(--ease), filter .5s var(--ease);
  filter: saturate(.95);
}
.strength-card:hover .strength-thumb img {
  transform: scale(1.06);
  filter: saturate(1.1);
}
.strength-thumb::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(255,255,255,.75) 100%);
  pointer-events: none;
}

/* Tech Stack — subtle watermark image on the section */
.tech-stack { position: relative; isolation: isolate; overflow: hidden; }
.tech-stack::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url('imgs/photos/bg-pattern.webp');
  background-size: cover;
  background-position: center;
  opacity: .06;
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 30%, transparent 80%);
          mask-image: radial-gradient(ellipse at 50% 50%, #000 30%, transparent 80%);
  z-index: -1;
}
.tech-stack > * { position: relative; z-index: 1; }
.tech-item {
  position: relative; overflow: hidden;
}
.tech-item::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(38,102,232,.05), rgba(31,204,148,.06));
  opacity: 0; transition: opacity .35s var(--ease);
  z-index: 0;
}
.tech-item:hover::before { opacity: 1; }
.tech-item > * { position: relative; z-index: 1; }

/* Mobile responsive tweaks for image elements */
@media (max-width: 720px) {
  .about-hero { aspect-ratio: 16 / 10; margin-bottom: 40px; }
  .about-hero-overlay p { font-size: 15px; }
}

/* ==========================================================
   Back-to-top floating button
   - 페이지 최하단 근처에서만 노출
   - 반투명 + backdrop blur, 우측 하단 고정
   - 클릭 시 부드럽게 맨 위로 이동
   ========================================================== */
.back-to-top {
  position: fixed;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(11, 27, 52, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  backdrop-filter: blur(10px) saturate(1.1);
  color: var(--text, #0b1b34);
  box-shadow:
    0 10px 24px -10px rgba(11, 27, 52, 0.28),
    0 2px 6px -2px rgba(11, 27, 52, 0.12);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;

  /* 기본: 숨김 */
  opacity: 0;
  transform: translateY(12px) scale(0.92);
  pointer-events: none;

  transition:
    opacity 0.35s ease,
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.2s ease,
    box-shadow 0.2s ease;

  z-index: 120;
  -webkit-tap-highlight-color: transparent;
}
.back-to-top svg {
  display: block;
  opacity: 0.82;
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.back-to-top:hover {
  background: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 14px 30px -10px rgba(11, 27, 52, 0.32),
    0 2px 8px -2px rgba(11, 27, 52, 0.16);
}
.back-to-top:active {
  transform: translateY(0) scale(0.96);
}
.back-to-top:focus-visible {
  outline: 2px solid rgba(38, 102, 232, 0.5);
  outline-offset: 3px;
}

/* 데스크탑에서는 살짝 더 크게 + 우측 하단 여백 확대 */
@media (min-width: 900px) {
  .back-to-top {
    width: 52px;
    height: 52px;
    right: 28px;
    bottom: 28px;
  }
  .back-to-top svg { width: 22px; height: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top { transition: opacity 0.2s ease; transform: none; }
  .back-to-top.visible { transform: none; }
}
