/* ================================================
   yu2Rin Portfolio — style.css v2.2 (Mobile & Bot Fixed)
================================================ */

:root {
  --bg:        #0c0d10;
  --bg2:       #111318;
  --bg3:       #16181f;
  --border:    rgba(255,255,255,0.07);
  --border-h:  rgba(255,255,255,0.15);
  --text:      #e8eaf0;
  --sub:       #8b90a0;
  --accent:    #5b8dee;
  --accent2:   #7b6ff0;
  --sidebar-w: 240px;
  --radius:    16px;
  --radius-sm: 10px;
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  line-height: 1.7;
  overflow-x: hidden;
}

body.menu-open { overflow: hidden; }

/* ===== 배경 ===== */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 60% -10%, rgba(91,141,238,0.09) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 5%  90%, rgba(123,111,240,0.07) 0%, transparent 55%),
    radial-gradient(ellipse 40% 40% at 90% 80%, rgba(91,141,238,0.05) 0%, transparent 50%);
}

.bg-dot {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* ===== 모바일 사이드바 오버레이 ===== */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 98;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

/* ===== 타이포그래피 공통 ===== */
.mono { font-family: 'JetBrains Mono', monospace; }
a { text-decoration: none; color: inherit; }

/* ===== 사이드바 ===== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  z-index: 99;
  display: flex;
  flex-direction: column;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 32px 20px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin-bottom: 40px;
  padding: 0 8px;
}

.brand-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
}

.brand-dot {
  font-size: 26px;
  font-weight: 800;
  color: var(--accent);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--sub);
  transition: color 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.nav-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  opacity: 0.7;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255,255,255,0.04);
}

.nav-link.active {
  color: #fff;
  background: rgba(91,141,238,0.15);
  font-weight: 600;
}

.nav-link.active .nav-icon {
  opacity: 1;
  color: var(--accent);
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg3);
  border: 1px solid var(--border);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px rgba(52,211,153,0.5);
  animation: pulse 2.5s infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.status-text {
  font-size: 12px;
  color: var(--sub);
  font-weight: 500;
}

/* ===== 모바일 헤더 ===== */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(17,19,24,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  align-items: center;
  justify-content: space-between;
  z-index: 97;
}

.menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  -webkit-tap-highlight-color: transparent;
}

.menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; }
.menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== 메인 컨텐츠 영역 ===== */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  max-width: 900px;
  padding: 80px 48px;
  position: relative;
  z-index: 1;
}

/* ===== HERO 섹션 ===== */
.hero {
  min-height: calc(100vh - 160px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 80px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 100px;
  background: rgba(91,141,238,0.1);
  border: 1px solid rgba(91,141,238,0.25);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 28px;
  width: fit-content;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-title {
  font-size: clamp(34px, 5.5vw, 54px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -1.5px;
  margin-bottom: 24px;
  color: #fff;
  word-break: keep-all;
}

.accent-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  transition: opacity 0.5s ease;
}

.fade-out { opacity: 0; }
.fade-in  { opacity: 1; }

.hero-desc {
  font-size: 17px;
  color: var(--sub);
  line-height: 1.8;
  max-width: 640px;
  margin-bottom: 36px;
  word-break: keep-all;
}

.hero-desc strong { color: var(--text); }

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* 버튼 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s;
  cursor: pointer;
  border: none;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #4a7ddf;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(91,141,238,0.35);
}

.btn-ghost {
  background: var(--bg2);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--bg3);
  border-color: var(--border-h);
  transform: translateY(-2px);
}

/* ===== 섹션 공통 ===== */
.section {
  padding: 96px 0;
  border-top: 1px solid var(--border);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.section.show {
  opacity: 1;
  transform: translateY(0);
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 12px;
}

.section-num {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
}

.section-header h2 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.8px;
  color: #fff;
}

.section-desc {
  font-size: 15px;
  color: var(--sub);
  margin-bottom: 40px;
  line-height: 1.7;
  word-break: keep-all;
}

/* ===== ABOUT 그리드 ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.about-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.about-highlight {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  line-height: 1.6;
  margin-bottom: 16px;
  word-break: keep-all;
}

.about-text {
  font-size: 14px;
  color: var(--sub);
  line-height: 1.8;
  word-break: keep-all;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: border-color 0.25s, transform 0.25s;
}

.stat-card:hover {
  border-color: var(--border-h);
  transform: translateY(-2px);
}

.stat-num {
  font-size: 32px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 13px;
  color: var(--sub);
  font-weight: 500;
}

/* ===== SKILLS 그리드 ===== */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.skill-group {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.25s, transform 0.25s;
}

.skill-group:hover {
  border-color: var(--border-h);
  transform: translateY(-2px);
}

.skill-group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.skill-cat-icon { font-size: 18px; }

.skill-group-title h3 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 100px;
  background: var(--bg3);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
}

.skill-badge:hover {
  border-color: var(--border-h);
  background: rgba(255,255,255,0.06);
}

.skill-badge.sm {
  font-size: 11px;
  padding: 4px 10px;
}

/* ===== BOT 섹션 (코린 봇) ===== */
.bot-card {
  background: var(--bg2);
  border: 1px solid rgba(91,141,238,0.25);
  border-radius: var(--radius);
  padding: 40px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
  margin-bottom: 40px;
}

.bot-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}

.bot-card-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
}

.bot-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(91,141,238,0.35);
  flex-shrink: 0;
  background: var(--bg3);
}

.bot-name {
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text);
}

.bot-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(91,141,238,0.15);
  border: 1px solid rgba(91,141,238,0.3);
  color: var(--accent);
}

.bot-tagline {
  font-size: 13px;
  color: var(--sub);
  margin-top: 2px;
}

.bot-desc {
  font-size: 15px;
  line-height: 1.85;
  color: var(--sub);
  margin-bottom: 28px;
  word-break: keep-all;
}

.bot-desc p { margin-bottom: 14px; }
.bot-catchphrase { font-size: 16px; color: var(--text); }

.bot-features {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bot-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  color: var(--text);
}

.bot-outro {
  color: var(--sub);
  margin-top: 14px;
}

.bot-cta-text {
  margin-top: 12px;
  color: var(--text);
}

/* 봇 기술 스택 태그 + 문구 */
.bot-stack {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

.bot-tech-note {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  padding: 4px 6px;
}

.bot-invite-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background 0.25s, transform 0.25s, box-shadow 0.25s;
  -webkit-tap-highlight-color: transparent;
}

.bot-invite-btn:hover {
  background: #4a7ddf;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(91,141,238,0.35);
}

/* 개발 프로세스 (Flow) */
.flow-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--sub);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 18px;
}

.flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.flow-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.flow-num {
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 8px;
  font-family: 'JetBrains Mono', monospace;
}

.flow-item h4 {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.flow-item p {
  font-size: 12.5px;
  color: var(--sub);
  line-height: 1.6;
  word-break: keep-all;
}

/* ===== SERVER MANAGEMENT 섹션 ===== */
.server-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.server-row {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  transition: border-color 0.25s, transform 0.25s;
}

.server-row:hover {
  border-color: var(--border-h);
  transform: translateY(-2px);
}

.server-main {
  flex: 1;
}

.server-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.server-name {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.server-role-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--sub);
}

.server-role-badge.active {
  background: rgba(91,141,238,0.15);
  border-color: rgba(91,141,238,0.3);
  color: var(--accent);
}

.server-period {
  font-size: 12px;
  color: var(--sub);
  margin-bottom: 8px;
}

.server-detail {
  font-size: 13.5px;
  color: var(--sub);
  line-height: 1.7;
  word-break: keep-all;
}

.server-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.server-members {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
}

.server-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg3);
  border: 1px solid var(--border);
  transition: background 0.2s, border-color 0.2s;
}

.server-link:hover {
  background: rgba(91,141,238,0.15);
  border-color: rgba(91,141,238,0.3);
  color: var(--accent);
}

.server-closed-text {
  font-size: 12px;
  color: #ff6b6b;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255,107,107,0.1);
  border: 1px solid rgba(255,107,107,0.25);
}

/* ===== PROJECTS 섹션 ===== */
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.project-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s, transform 0.25s;
}

.project-card:hover {
  border-color: var(--border-h);
  transform: translateY(-2px);
}

.project-type {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.project-title {
  font-size: 19px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.project-desc {
  font-size: 13.5px;
  color: var(--sub);
  line-height: 1.7;
  margin-bottom: 18px;
  word-break: keep-all;
}

.project-points {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.project-points li {
  font-size: 13px;
  color: var(--sub);
  line-height: 1.6;
  position: relative;
  padding-left: 16px;
  word-break: keep-all;
}

.project-points li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

.project-footer {
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ===== CONTACT 섹션 ===== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.contact-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color 0.25s, transform 0.25s;
}

.contact-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.contact-icon {
  font-size: 26px;
}

.contact-detail {
  display: flex;
  flex-direction: column;
}

.contact-label {
  font-size: 11px;
  color: var(--sub);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.contact-value {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

/* ================================================
   반응형 미디어 쿼리 (Responsive Queries)
================================================ */

@media (max-width: 900px) {
  .flow { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s var(--ease);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 12px 0 48px rgba(0,0,0,0.7);
  }

  .mobile-header { display: flex; }

  .main-content {
    margin-left: 0;
    padding: 84px 20px 48px 20px;
    max-width: 100%;
  }

  .hero {
    min-height: auto;
    padding: 40px 0 60px 0;
  }

  .hero-title {
    font-size: 32px;
    letter-spacing: -1px;
  }

  .about-grid,
  .skills-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .bot-card { padding: 28px 20px; }

  .bot-invite-btn {
    width: 100%;
    justify-content: center;
  }

  .server-row {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
  }

  .server-meta {
    align-items: flex-start;
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    margin-top: 8px;
  }
}

@media (max-width: 480px) {
  .hero-title { font-size: 27px; }
  .about-stats { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; }
  .btn { width: 100%; justify-content: center; }
}
