/* --- BIẾN MÀU SẮC (CSS Variables) --- */
:root {
  --notion-text: #37352f;
  --notion-gray: #787774;
  --notion-bg: #ffffff;
  --notion-border: #ededed;
  --border-radius: 12px;
}

/* --- BỐ CỤC CHUNG --- */
.project-single-main {
  background-color: var(--notion-bg);
  color: var(--notion-text);
  font-family:
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Helvetica,
    Arial,
    sans-serif;
  padding: 150px 0 100px;
}

/* Container cho Header (rộng vừa phải) */
.project-header-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Container cho Nội dung (hẹp hơn header để dễ đọc) */
.project-content-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- 1. BACK LINK --- */
.project-back-link {
  color: var(--notion-gray);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 30px;
  display: inline-block;
  transition: color 0.2s ease;
}
.project-back-link:hover {
  color: var(--notion-text);
}

/* --- 2. HEADER & META --- */
.project-header {
  margin-bottom: 40px;
}
.project-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}
.project-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--notion-gray);
  font-size: 14px;
}
.project-author {
  display: flex;
  align-items: center;
  gap: 8px;
}
.project-author img {
  border-radius: 50%;
}
.project-author-infor {
  display: flex;
  flex-direction: column;
}
.project-author-name {
  text-transform: uppercase;
  font-family: 'Itim';
  font-weight: 700;
}
/* --- 3. FEATURED IMAGE (90VW STYLE) --- */
.project-featured-wrapper {
  /* Đẩy chiều rộng ra 90% màn hình, bất chấp container */
  width: 90vw;
  max-width: 1400px;
  margin: 0 auto 40px auto;
}
.project-cover-image {
  width: 100%;
  height: auto;
  max-height: 70vh; /* Giới hạn chiều cao để không bị quá lố trên màn hình to */
  object-fit: cover;
  border-radius: 16px; /* Bo góc mượt giống Notion */
  background-color: #f7f7f5;
  display: block;
}

/* --- 4. SHARE TOOLS --- */
.project-share-tools {
  display: flex;
  gap: 12px;
  margin-bottom: 30px;
}
.project-share-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--notion-border);
}
.share-btn {
  background: none;
  border: none;
  color: var(--notion-gray);
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background-color 0.2s,
    color 0.2s;
}
.share-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--notion-text);
}

/* --- 5. CONTENT STYLING --- */
.project-content {
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--notion-text);
}
.project-content p {
  margin-bottom: 1.5em;
}

/* --- 6. POST NAVIGATION --- */
.project-navigation {
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1px solid var(--notion-border);
}
.nav-links {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.nav-previous,
.nav-next {
  flex: 1;
}
.nav-next {
  text-align: right;
}
.project-navigation a {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-label {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--notion-gray);
  letter-spacing: 0.05em;
}
.nav-title {
  font-weight: 600;
  color: var(--notion-text);
  font-size: 16px;
  transition: color 0.2s;
}
.project-navigation a:hover .nav-title {
  color: #000;
}

.project-cover-container {
  position: relative;
  width: 100%;
}

.project-corner-badge {
  position: absolute;
  top: 50px;
  left: -20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.badge-content {
  background-color: #fcebc4;
  border-radius: var(--border-radius);
  border-bottom-left-radius: 0;
  position: relative;
  z-index: 10;

  padding: 8px 8px 8px 28px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-cover-image {
  position: relative;
  z-index: 5;

  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: cover;
  border-radius: 16px;
  background-color: #f7f7f5;
  display: block;
}

.project-corner-badge::before {
  box-sizing: border-box;
  content: '';
  position: absolute;
  width: 35px;
  height: 25px;
  bottom: 0;
  top: 100%;
  background-color: #ebd7aa;
  border-bottom-left-radius: var(--border-radius);
  border-top-left-radius: var(--border-radius);
  z-index: 2;
}

.project-corner-badge::after {
  content: '';
  position: absolute;
  top: 100%;
  width: 35px;
  height: 15px;
  background-color: #fcebc4;
  border-bottom-left-radius: var(--border-radius);
  z-index: 1;
}

.badge-mini-avatar {
  width: auto;
  height: 55px;
  object-fit: contain;
  z-index: 11;
  display: block;
  position: absolute;
  left: 10%;
  bottom: 80%;
}

/* Style chữ hiển thị Level */
.badge-level {
  font-size: 13px;
  font-weight: 700;
  color: #684c12; /* Màu chữ nâu đậm phù hợp với nền vàng */
}

/* Khu vực chứa các icon phần mềm */
.badge-software-icons {
  display: flex;
  align-items: center;
  gap: 4px;
}
.cds-pj-software {
  width: 36px;
  aspect-ratio: 1;
  display: grid;
  place-content: center;
  background-color: #dfcca0;
  border-radius: 50%;
  box-shadow:
    inset 5px 5px 10px #f5e0b0d4,
    inset -5px -5px 10px #fff5de;
}
/* Icon phần mềm nhỏ bên trong nhãn */
.software-mini-icon {
  width: 20px;
  aspect-ratio: 1;
  object-fit: contain;
}
