:root {
  --bg: #f5f7fb;                 /* 전체 배경 (밝음) */
  --panel: rgba(255, 255, 255, 0.9);
  --panel-border: rgba(148, 163, 184, 0.35);
  --text: #0f172a;
  --sub: #475569;
  --accent: #2563eb;
  --glow: rgba(37, 99, 235, 0.25);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  display: flex;
  font-family: system-ui, -apple-system, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(37,99,235,0.08), transparent 40%),
    radial-gradient(700px 400px at 10% 110%, rgba(37,99,235,0.06), transparent 45%),
    linear-gradient(180deg, #f8fafc, #eef2ff 60%, #f8fafc);
}

/* ===== Sidebar ===== */
.sidebar {
  width: 220px;
  height: 100vh;
  padding: 34px 20px;
  position: fixed;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-right: 1px solid var(--panel-border);
}

.brand {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 44px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.nav a {
  color: var(--sub);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.04em;
  position: relative;
  transition: color 0.3s ease;
}

.nav a::before {
  content: "▸";
  position: absolute;
  left: -18px;
  opacity: 0;
  color: var(--accent);
  transition: opacity 0.3s ease;
}

.nav a:hover {
  color: var(--accent);
}

.nav a:hover::before {
  opacity: 1;
}

/* ===== Main ===== */
.main {
  margin-left: 220px;
  width: calc(100% - 220px);
}

/* ===== Section ===== */
.section {
  padding: 150px 90px;
  max-width: 1100px;
  margin: 0 auto;

  opacity: 0;
  transform:
    perspective(1200px)
    translateY(80px)
    rotateX(8deg);

  transition:
    opacity 1.4s cubic-bezier(0.22, 1, 0.36, 1),
    transform 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.section.show {
  opacity: 1;
  transform:
    perspective(1200px)
    translateY(0)
    rotateX(0);
}

/* ===== HERO ===== */
.hero-title {
  font-size: 52px;
  line-height: 1.35;
  margin-bottom: 26px;
}

.hero-sub {
  font-size: 19px;
  line-height: 1.9;
  color: var(--sub);
}

/* ===== Rotating Text ===== */
#rotate-text {
  display: inline-block;
  color: var(--accent);
  text-shadow: 0 0 18px var(--glow);
  will-change: opacity, transform, filter;
  transition:
    opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1),
    transform 1.2s cubic-bezier(0.22, 1, 0.36, 1),
    filter 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

#rotate-text.fade-out {
  opacity: 0;
  transform: translateY(-20px) scale(0.94);
  filter: blur(8px);
}

#rotate-text.fade-in {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

/* ===== Headings ===== */
h2 {
  font-size: 26px;
  margin-bottom: 34px;
  position: relative;
}

h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 72px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

/* ===== Cards ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 26px;
}

.card {
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.95),
    rgba(248,250,252,0.98)
  );
  border: 1px solid var(--panel-border);
  border-radius: 22px;
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.45s ease,
    border-color 0.45s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(37,99,235,0.18),
    transparent
  );
  opacity: 0;
  transition: opacity 0.4s ease;
}

.card:hover {
  transform: translateY(-14px) scale(1.02);
  border-color: var(--accent);
  box-shadow: 0 30px 80px rgba(37,99,235,0.25);
}

.card:hover::before {
  opacity: 1;
}

/* ===== Flow ===== */
.flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 26px;
}

.flow-item {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 22px;
  padding: 30px;
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.45s ease;
}

.flow-item:hover {
  transform: translateY(-14px);
  box-shadow: 0 26px 70px rgba(37,99,235,0.2);
}

.flow-item span {
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.06em;
}

/* ===== Table ===== */
.server-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
}

.server-table th,
.server-table td {
  padding: 14px;
  border-bottom: 1px solid var(--panel-border);
}

.server-table th {
  color: var(--accent);
}

/* ===== Text ===== */
.section-desc,
.about-text {
  color: var(--sub);
  max-width: 780px;
  line-height: 1.95;
  margin-bottom: 28px;
}

.list li {
  margin-bottom: 8px;
  color: var(--sub);
}

/* ===== Links ===== */
a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ================================
   📱 Mobile Layout FIX (강제)
================================ */
@media (max-width: 768px) {

  /* body flex 제거 */
  body {
    display: block !important;
  }

  /* Sidebar 완전 해제 */
  .sidebar {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
  }

  .brand {
    margin: 0;
    font-size: 18px;
  }

  .nav {
    display: flex !important;
    flex-direction: row !important;
    gap: 12px;
    overflow-x: auto;
  }

  .nav a {
    font-size: 14px;
    white-space: nowrap;
  }

  /* Main 영역 밀림 제거 */
  .main {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .section {
    padding: 72px 20px;
  }

  .hero-title {
    font-size: 30px;
    line-height: 1.3;
  }

  .hero-sub {
    font-size: 15px;
  }
}

/* ===============================
   🔥 링크 클릭 강제 활성화
================================ */
a, a * {
  pointer-events: auto !important;
  position: relative;
  z-index: 9999;
}


