*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --header-height: 36px;
  --sidebar-width: 150px;
  --black: #000;
  --text: #1a1a1a;
  --text-secondary: #444;
  --text-tertiary: #666;
  --bg: #fff;
  --border: #e8e8e8;
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.55);
  --glass-blur: blur(12px) saturate(1.5);
}

html {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  background: #f0ece6;
  color: var(--text);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===== Fixed Full-page Background ===== */
.bg-fixed {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: center / cover no-repeat;
  transition: background-image 0.5s ease;
}

body.bg--main .bg-fixed {
  background-image: url('./png/page1.png');
}

body.bg--clb .bg-fixed {
  background-image: url('./png/page2.png');
}

body.bg--life .bg-fixed {
  background-image: url('./png/page3.png');
}

/* ===== Header (frosted glass) ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
  z-index: 100;
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
}

.header-logo {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--black);
  letter-spacing: -0.02em;
}

.header-nav {
  display: flex;
  gap: 10px;
}

.nav-link {
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 500;
  transition: color 0.15s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--black);
}

/* ===== Layout ===== */
.layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ===== Sidebar (frosted glass) ===== */
.sidebar {
  width: var(--sidebar-width);
  min-width: 70px;
  max-width: 180px;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  padding: 24px 14px 16px;
  user-select: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-right: 1px solid rgba(255, 255, 255, 0.4);
}

.sidebar-logo {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-size: 15px;
  font-weight: 900;
  color: var(--black);
  letter-spacing: -0.02em;
  line-height: 1.15;
  padding: 0 7px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
  white-space: nowrap;
  text-align: center;
  align-self: center;
}

.sidebar-nav {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.sidebar-item {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  opacity: 0.6;
  padding: 7px 7px;
  border-radius: 3px;
  transition: all 0.3s ease;
  cursor: pointer;
  white-space: nowrap;
}

.sidebar-item:hover {
  color: var(--text);
  opacity: 0.7;
}

.sidebar-item.active {
  font-size: 15px;
  font-weight: 800;
  color: var(--black);
  opacity: 1;
  letter-spacing: -0.01em;
}

/* ===== Main Content ===== */
.main-content {
  margin-left: var(--sidebar-width);
  padding: 0 0 60px;
  width: calc(100% - var(--sidebar-width));
  max-width: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

/* ===== Page Title ===== */
.page-title {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-size: 23px;
  font-weight: 800;
  color: var(--black);
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
}

/* ===== Hero Banner (transparent, content only) ===== */
.hero-banner {
  position: relative;
  width: 100%;
  min-height: 210px;
  padding: 40px 40px 32px;
  overflow: hidden;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.hero-banner--fullpage {
  min-height: 100vh;
  margin-bottom: 0;
  padding: 0;
}

.hero-banner--fullpage .hero-content {
  max-width: 80%;
  width: 100%;
}

.hero-banner::after,
.hero-banner::before {
  display: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 90%;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  padding: 28px 28px 24px;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.06),
    0 1px 2px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

/* ===== Combined Page Panel (title + content in one card) ===== */
.page-panel-wrap {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 0;
}

#section-life.page-panel-wrap {
  min-height: 115vh;
}

.page-panel {
  width: 100%;
  max-width: 80%;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.06),
    0 1px 2px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  overflow: hidden;
}

.panel-header {
  padding: 24px 28px 16px;
}

.panel-header .hero-title {
  margin-bottom: 12px;
}

.panel-body {
  padding: 0 28px 28px;
}

.hero-mesh {
  display: none;
}

/* Remove per-banner backgrounds — now handled by .bg-fixed */
.hero-banner--main,
.hero-banner--clb,
.hero-banner--life {
  background: transparent;
  border-bottom: none;
}

/* ===== Liquid Glass Tag ===== */
.hero-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-tertiary);
  padding: 3px 9px;
  border-radius: 12px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.8),
    inset 0 -0.5px 1px rgba(0,0,0,0.04),
    0 1px 6px rgba(0,0,0,0.06),
    0 0.5px 1px rgba(0,0,0,0.04);
}

.hero-title {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-size: 26px;
  font-weight: 900;
  color: var(--black);
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 20px;
}

/* ===== Footer ===== */
.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 16px 12px;
  margin-left: var(--sidebar-width);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.02em;
}

/* ===== Mobile Navigation ===== */
.mobile-nav {
  display: none;
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
  .page {
    max-width: min(90vw, 1100px);
  }
}

@media (max-width: 768px) {
  :root {
    --mobile-content-gutter: 12px;
  }

  .sidebar {
    display: none;
  }

  .mobile-nav {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 44px;
    z-index: 100;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px) saturate(1.5);
    -webkit-backdrop-filter: blur(16px) saturate(1.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  }

  .mobile-nav-item {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-tertiary);
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
  }

  .mobile-nav-item.active {
    font-weight: 700;
    color: var(--black);
    background: rgba(0, 0, 0, 0.05);
  }

  .main-content {
    margin-left: 0;
    padding: 56px 0 40px;
    width: 100%;
  }

  .site-footer {
    margin-left: 0;
  }

  .hero-banner {
    min-height: auto;
    padding: 12px var(--mobile-content-gutter);
  }

  .hero-content {
    max-width: 100%;
    padding: 16px 12px;
    border-radius: 8px;
  }

  .hero-banner--fullpage .hero-content {
    max-width: 100%;
    width: 100%;
  }

  .page-panel-wrap {
    min-height: auto;
    padding: 12px 0;
  }

  .page-panel {
    max-width: 100%;
    width: calc(100% - (var(--mobile-content-gutter) * 2));
    margin: 0 var(--mobile-content-gutter);
    border-radius: 8px;
  }

  .panel-header {
    padding: 16px 12px 10px;
  }

  .panel-body {
    padding: 0 12px 16px;
  }

  .hero-title {
    font-size: 16px;
  }

  .hero-banner--fullpage {
    padding: 12px var(--mobile-content-gutter) 0;
  }

  .hero-title--landing {
    font-size: 18px !important;
  }

  .hero-projects {
    flex-direction: column;
  }
}
