/* ============================================================
   NOWICK LAYOUT — Liquid Glass White Portfolio
   Version: 1.2 | 2026 UI Trend (수직 중앙 정렬 및 버튼 통일성 수술본)
   
   [수정 가이드 - Gemini 협업용]
   - 액센트 컬러: :root의 --accent, --accent-secondary
   - 헤더 글래스 효과: .nw-header 의 backdrop-filter, background
   - 헤더 블러 강도: --glass-blur 변수 (기본 20px)
   - 헤더 투명도: --glass-opacity 변수 (기본 0.75)
   - 모바일 브레이크포인트: @media 쿼리 (768px, 1024px, 1280px)
   - 오프캔버스 너비: .nw-offcanvas (--offcanvas-width)
   - 사이드바 너비: .nw-sidebar (--sidebar-width)
   ============================================================ */

/* ── 0. CSS VARIABLES ───────────────────────────────────────── */
:root {
  /* Color Palette */
  --accent: #1a1a2e;
  --accent-secondary: #6c63ff;
  --accent-rgb: 26, 26, 46;
  --accent-secondary-rgb: 108, 99, 255;
  --white: #ffffff;
  --off-white: #f8f8fc;
  --surface: #f2f2f8;
  --border: rgba(0, 0, 0, 0.08);
  --text-primary: #1a1a2e;
  --text-secondary: #5a5a7a;
  --text-muted: #9090b0;
  --shadow-sm: 0 2px 8px rgba(26,26,46,0.06);
  --shadow-md: 0 8px 32px rgba(26,26,46,0.10);
  --shadow-lg: 0 24px 64px rgba(26,26,46,0.14);

  /* Glass Effect */
  --glass-blur: 20px;
  --glass-opacity: 0.75;
  --glass-bg: rgba(255, 255, 255, var(--glass-opacity));
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-shadow: 0 8px 32px rgba(26, 26, 46, 0.10), inset 0 1px 0 rgba(255,255,255,0.8);
  --glass-shine: linear-gradient(135deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.1) 50%, transparent 100%);

  /* Typography */
  --font-display: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', monospace;

  /* Spacing */
  --container-max: 1280px;
  --container-pad: clamp(1rem, 4vw, 3rem);
  --header-height: 70px;
  --sidebar-width: 280px;
  --offcanvas-width: 320px;

  /* Animation */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 180ms;
  --dur-normal: 300ms;
  --dur-slow: 500ms;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
}

/* ── 1. RESET & BASE ────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-display);
  background-color: var(--off-white);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Skip navigation */
.nw-skip-nav {
  position: fixed;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 10000;
  transition: top var(--dur-fast);
  text-decoration: none;
}
.nw-skip-nav:focus {
  top: 0;
  outline: 2px solid var(--accent-secondary);
  outline-offset: 2px;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ── 2. LAYOUT SCAFFOLD ─────────────────────────────────────── */
.nw-wrap {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  /* When sidebar is active: */
  transition: transform var(--dur-normal) var(--ease-out);
}

.nw-container {
  width: 100%;
  height: 100%; /* [수술 부위 1] 부모 높이를 상속받아 수직 중앙 정렬 활성화 */
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

/* Main + Sidebar flex row */
.nw-body {
  display: flex;
  flex: 1;
  gap: 2rem;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 2rem var(--container-pad) 3rem;
}

.nw-main {
  flex: 1;
  min-width: 0;
}

/* ── 3. LIQUID GLASS HEADER ─────────────────────────────────── */
.nw-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 1000;
  
  /* Liquid Glass Core */
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(180%) brightness(1.05);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%) brightness(1.05);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.nw-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--glass-shine);
  pointer-events: none;
  border-radius: inherit;
  opacity: 0.5;
}

.nw-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1.5rem;
}

/* Logo */
.nw-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.nw-logo a {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  color: var(--accent);
  transition: opacity var(--dur-fast);
}

.nw-logo a:hover { opacity: 0.75; }

.nw-logo img {
  max-height: 38px;
  width: auto;
}

.nw-logo-dot {
  display: none;
}

/* GNB Navigation */
.nw-gnb {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nw-gnb > ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nw-gnb > ul > li {
  position: relative;
}

.nw-gnb > ul > li > a {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.875rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: color var(--dur-fast), background var(--dur-fast);
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.nw-gnb > ul > li > a:hover,
.nw-gnb > ul > li.active > a {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.06);
}

.nw-gnb > ul > li.active > a {
  font-weight: 700;
}

/* GNB Dropdown (2nd level) */
.nw-gnb > ul > li > ul {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 180px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out), visibility var(--dur-fast);
  z-index: 100;
}

.nw-gnb > ul > li:hover > ul {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nw-gnb > ul > li > ul > li > a {
  display: block;
  padding: 0.5rem 0.875rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: color var(--dur-fast), background var(--dur-fast);
  white-space: nowrap;
}

.nw-gnb > ul > li > ul > li > a:hover,
.nw-gnb > ul > li > ul > li.active > a {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.06);
  font-weight: 600;
}

/* Header Actions (Search + Login) */
.nw-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  margin-left: auto;
}

/* Search toggle button */
.nw-search-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: color var(--dur-fast), background var(--dur-fast);
  position: relative;
}
.nw-search-toggle:hover {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.06);
}

/* Search popup */
.nw-search-popup {
  position: absolute;
  top: calc(var(--header-height) + 8px);
  right: var(--container-pad);
  width: min(480px, calc(100vw - 2rem));
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--dur-normal) var(--ease-out), transform var(--dur-normal) var(--ease-out), visibility var(--dur-normal);
  z-index: 999;
}

.nw-search-popup.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nw-search-form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(var(--accent-rgb), 0.04);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.625rem 1rem;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.nw-search-form:focus-within {
  border-color: var(--accent-secondary);
  box-shadow: 0 0 0 3px rgba(var(--accent-secondary-rgb), 0.15);
}

.nw-search-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.nw-search-input {
  flex: 1;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--text-primary);
  outline: none;
}
.nw-search-input::placeholder { color: var(--text-muted); }

.nw-search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: var(--white);
  border-radius: var(--radius-sm);
  transition: background var(--dur-fast), transform var(--dur-fast);
  flex-shrink: 0;
}
.nw-search-btn:hover { background: var(--accent-secondary); transform: scale(1.05); }

/* ── Login area [수술 부위 2] 디자인 통일성 ── */
.nw-login-area {
  position: relative;
}

.nw-login-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  border: none; /* 캡슐 테두리 제거 */
  background: transparent; /* 배경색 제거 */
  border-radius: var(--radius-sm);
  transition: color var(--dur-fast), background var(--dur-fast);
  white-space: nowrap;
}
.nw-login-btn:hover {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.06); /* 일반 메뉴와 동일한 호버 효과 */
}

/* Logged-in user avatar button */
.nw-user-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.5rem;
  border: none; /* 캡슐 테두리 제거 */
  background: transparent; /* 배경색 제거 */
  border-radius: var(--radius-sm);
  transition: color var(--dur-fast), background var(--dur-fast);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.nw-user-btn:hover { 
  color: var(--accent); 
  background: rgba(var(--accent-rgb), 0.06); /* 일반 메뉴와 동일한 호버 효과 */
}

.nw-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-secondary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}
.nw-user-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* User dropdown */
.nw-user-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 200px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all var(--dur-fast) var(--ease-out);
  z-index: 200;
}

.nw-login-area:hover .nw-user-dropdown,
.nw-login-area:focus-within .nw-user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nw-user-dropdown a {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: color var(--dur-fast), background var(--dur-fast);
}
.nw-user-dropdown a:hover { color: var(--accent); background: rgba(var(--accent-rgb), 0.06); }

.nw-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 0.375rem 0;
}

/* Hamburger button (mobile) */
.nw-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  gap: 5px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary); /* 다른 요소와 통일 */
  transition: background var(--dur-fast), color var(--dur-fast);
}
.nw-hamburger:hover { 
  background: rgba(var(--accent-rgb), 0.06); 
  color: var(--accent);
}

.nw-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--dur-normal) var(--ease-spring), opacity var(--dur-fast), width var(--dur-normal);
  transform-origin: center;
}

.nw-hamburger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nw-hamburger.is-active span:nth-child(2) { opacity: 0; width: 0; }
.nw-hamburger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── 4. OFF-CANVAS MOBILE MENU ──────────────────────────────── */
.nw-overlay {
  position: fixed;
  inset: 0;
  background: rgba(var(--accent-rgb), 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1500;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-normal), visibility var(--dur-normal);
}
.nw-overlay.is-open { opacity: 1; visibility: visible; }

.nw-offcanvas {
  position: fixed;
  top: 0;
  right: 0;
  width: var(--offcanvas-width);
  height: 100%;
  max-width: 90vw;
  background: var(--white);
  z-index: 1600;
  transform: translateX(100%);
  transition: transform var(--dur-slow) var(--ease-spring);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: var(--shadow-lg);
}

.nw-offcanvas.is-open { transform: translateX(0); }

.nw-offcanvas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.nw-offcanvas-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: color var(--dur-fast), background var(--dur-fast);
}
.nw-offcanvas-close:hover { color: var(--accent); background: rgba(var(--accent-rgb), 0.06); }

.nw-offcanvas-body {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
}

/* Mobile search */
.nw-offcanvas-search {
  margin-bottom: 1.5rem;
}

.nw-offcanvas-search .nw-search-form {
  width: 100%;
}

/* Mobile nav */
.nw-mobile-nav > ul > li > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  transition: color var(--dur-fast);
}

.nw-mobile-nav > ul > li > a:hover,
.nw-mobile-nav > ul > li.active > a {
  color: var(--accent-secondary);
}

.nw-mobile-nav > ul > li > ul {
  padding: 0.5rem 0 0.5rem 1rem;
}

.nw-mobile-nav > ul > li > ul > li > a {
  display: block;
  padding: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-bottom: 1px solid transparent;
  transition: color var(--dur-fast);
}

.nw-mobile-nav > ul > li > ul > li > a:hover,
.nw-mobile-nav > ul > li > ul > li.active > a {
  color: var(--accent-secondary);
}

/* Mobile login area */
.nw-offcanvas-login {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* ── 5. SIDEBAR ─────────────────────────────────────────────── */
.nw-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Sidebar widget container (Liquid Glass) */
.nw-sidebar-widget {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.nw-sidebar-widget::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--glass-shine);
}

.nw-sidebar-title {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* Sidebar nav links */
.nw-sidebar-nav > ul > li > a {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.75rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: color var(--dur-fast), background var(--dur-fast);
  margin-bottom: 0.125rem;
}

.nw-sidebar-nav > ul > li > a:hover,
.nw-sidebar-nav > ul > li.active > a {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.07);
  font-weight: 600;
}

.nw-sidebar-nav > ul > li > ul > li > a {
  display: block;
  padding: 0.4375rem 0.75rem 0.4375rem 2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: color var(--dur-fast), background var(--dur-fast);
}
.nw-sidebar-nav > ul > li > ul > li > a:hover,
.nw-sidebar-nav > ul > li > ul > li.active > a {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.05);
}

/* ── 6. MAIN CONTENT AREA ──────────────────────────────────── */
.nw-content-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  min-height: 400px;
}

/* ── 7. FOOTER ──────────────────────────────────────────────── */
.nw-footer {
  background: var(--accent);
  color: rgba(255, 255, 255, 0.85);
  margin-top: auto;
}

.nw-footer-inner {
  padding: 3rem var(--container-pad) 2rem;
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 3rem;
}

.nw-footer-brand {}

.nw-footer-logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}
.nw-footer-logo img { max-height: 36px; }

.nw-footer-desc {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

/* SNS Links */
.nw-sns-links {
  display: flex;
  gap: 0.625rem;
}

.nw-sns-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--dur-fast), border-color var(--dur-fast), background var(--dur-fast);
}
.nw-sns-link:hover {
  color: var(--white);
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

/* Footer nav columns */
.nw-footer-nav-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 1rem;
}

.nw-footer-nav ul li a {
  display: block;
  padding: 0.3125rem 0;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.65);
  transition: color var(--dur-fast);
}
.nw-footer-nav ul li a:hover { color: var(--white); }

/* Footer bottom bar */
.nw-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.25rem var(--container-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.nw-copyright {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.4);
}

.nw-powered {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.3);
}

.nw-powered a {
  color: rgba(255, 255, 255, 0.5);
  transition: color var(--dur-fast);
}
.nw-powered a:hover { color: var(--white); }

/* ── 8. BACK TO TOP ─────────────────────────────────────────── */
.nw-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  color: var(--accent);
  z-index: 500;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--dur-normal), visibility var(--dur-normal), transform var(--dur-normal) var(--ease-spring);
}

.nw-top-btn.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nw-top-btn:hover {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* ── 9. UTILITY CLASSES ─────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* SVG icon sizing */
.nw-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.nw-icon-sm { width: 14px; height: 14px; }
.nw-icon-lg { width: 22px; height: 22px; }

/* Page load fade-in */
@keyframes nwFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.nw-main { animation: nwFadeUp var(--dur-slow) var(--ease-out) both; }

/* ── 10. RESPONSIVE — 1024px (Tablet) ──────────────────────── */
@media (max-width: 1024px) {
  :root {
    --sidebar-width: 240px;
  }

  .nw-gnb { display: none; }
  .nw-hamburger { display: flex; }

  .nw-footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .nw-footer-brand { grid-column: 1 / -1; }
}

/* ── 11. RESPONSIVE — 768px (Mobile) ───────────────────────── */
@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }

  .nw-sidebar { display: none; }

  .nw-body {
    padding: 1.25rem var(--container-pad) 2.5rem;
    flex-direction: column;
    gap: 0;
  }

  .nw-search-toggle { display: none; } /* Search in offcanvas */

  .nw-content-box {
    padding: 1.25rem;
    border-radius: var(--radius-md);
  }

  .nw-footer-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
  }

  .nw-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.375rem;
  }

  .nw-top-btn {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 40px;
    height: 40px;
  }
}

/* ── 12. REDUCED MOTION ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .nw-main { animation: none; }
}

/* ── 13. DARK MODE SUPPORT (optional) ──────────────────────── */
@media (prefers-color-scheme: dark) {
  /* Intentionally minimal — this is a white-skin layout.
     Override if needed via body.dark class. */
}