/* ==========================================================================
   Đề cương đồ án tốt nghiệp / Project Proposals — stylesheet
   Industrial palette: near-black, steel grey, signature red.
   Dùng chung cho index.html, project1…18.html và en/*
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Oswald:wght@500;600;700&display=swap');

:root {
  /* Màu */
  --ink:        #151a1f;
  --ink-soft:   #3a444d;
  --muted:      #6f7a84;
  --line:       #dee3e8;
  --line-soft:  #eaeef1;
  --surface:    #ffffff;
  --panel:      #f4f6f8;

  --dark:       #0e1418;
  --dark-2:     #182028;

  --red:        #d0212c;
  --red-dark:   #a81a23;
  --red-soft:   #fdecee;

  /* Hình khối — công nghiệp, góc vuông */
  --r:          2px;
  --shadow-1:   0 1px 2px rgba(14, 20, 24, .06);
  --shadow-2:   0 10px 26px rgba(14, 20, 24, .13);

  /* Bố cục & chữ */
  --maxw:       800px;
  --font-body:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  --font-head:  'Oswald', 'Inter', 'Segoe UI', Arial, sans-serif;
}

/* ------------------------------- Nền tảng -------------------------------- */

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

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
}

a {
  color: var(--red);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--red-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

/* ------------------------------- Hero ------------------------------------ */

.site-header {
  position: relative;
  background: var(--dark);
  color: #fff;
  padding: clamp(40px, 7vw, 68px) 0 clamp(32px, 5vw, 52px);
  border-bottom: 4px solid var(--red);
}

.site-header .eyebrow {
  margin: 0 0 14px;
  font-family: var(--font-head);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--red);
}

.site-header h1 {
  margin: 0 0 14px;
  font-family: var(--font-head);
  font-size: clamp(2rem, 5.4vw, 3.1rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: .002em;
  text-transform: uppercase;
}

/* Chuyển ngôn ngữ VI / EN */

.site-header .container {
  position: relative;
}

.site-header .lang {
  position: absolute;
  top: 0;
  right: 20px;
  padding: 4px 11px;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: var(--r);
  font-family: var(--font-head);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  color: rgba(255, 255, 255, .85);
}

.site-header .lang:hover,
.site-header .lang:focus-visible {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  text-decoration: none;
}

/* Header gọn dùng cho các trang đề tài */

.site-header--compact {
  padding: 14px 0;
  border-bottom-width: 3px;
}

.site-header--compact .eyebrow {
  margin: 0;
  font-size: .74rem;
}

/* ------------------------------- Bố cục ---------------------------------- */

main {
  padding: clamp(30px, 5vw, 52px) 0 clamp(44px, 7vw, 76px);
}

/* ----------------------------- Tiêu đề mục -------------------------------- */

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
}

.section-head h2 {
  margin: 0;
  padding-left: 12px;
  border-left: 5px solid var(--red);
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink);
}

.section-head .count {
  margin: 0;
  font-family: var(--font-head);
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

/* --------------------------- Danh sách đề tài ----------------------------- */

.project-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.project-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-1);
  color: inherit;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.project-card:hover,
.project-card:focus-visible {
  border-color: var(--line);
  border-left-color: var(--red);
  box-shadow: var(--shadow-2);
  transform: translateY(-2px);
  text-decoration: none;
}

.project-card .num {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .06em;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.project-card:hover .num {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.card-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: var(--r);
  background: #eef1f4;
  color: #46515a;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.more {
  margin-top: 2px;
  font-family: var(--font-head);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--red);
}

.project-card:hover .more {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ------------------------------- Footer ---------------------------------- */

.site-footer {
  background: var(--dark);
  border-top: 3px solid var(--red);
  padding: 24px 0;
}

.site-footer p {
  margin: 0;
  font-size: .78rem;
  color: #98a3ac;
  text-align: center;
}

.site-footer p + p {
  margin-top: 6px;
}

.site-footer .author {
  color: #d6dce1;
}

.site-footer a {
  color: #fff;
}

.site-footer a:hover {
  color: var(--red);
}

/* ==========================================================================
   Trang đề tài (project1.html … project18.html, en/*)
   ========================================================================== */

.breadcrumb {
  margin: 0 0 18px;
  font-family: var(--font-head);
  font-size: .76rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

.breadcrumb a {
  font-weight: 600;
  color: var(--red);
}

.proposal {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-1);
  padding: clamp(22px, 4vw, 40px);
}

.proposal-header {
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 2px solid var(--ink);
}

.proposal-header .label {
  display: inline-block;
  margin-bottom: 12px;
  padding: 3px 10px;
  border-radius: var(--r);
  background: var(--red);
  color: #fff;
  font-family: var(--font-head);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.proposal-header h1 {
  margin: 0;
  font-family: var(--font-head);
  font-size: clamp(1.45rem, 3.4vw, 2rem);
  font-weight: 600;
  line-height: 1.24;
  color: var(--ink);
}

.proposal-header .tags {
  margin-top: 12px;
}

.proposal h2 {
  margin: 1.9rem 0 .6rem;
  padding: 0 0 .45rem 12px;
  border-left: 5px solid var(--red);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink);
}

.proposal h2:first-of-type {
  margin-top: 0;
}

.proposal p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.7;
}

.proposal ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--ink-soft);
  line-height: 1.7;
}

.proposal ul li {
  margin-bottom: .38rem;
}

.proposal ul li:last-child {
  margin-bottom: 0;
}

.proposal ul li::marker {
  color: var(--red);
}

/* Bảng kế hoạch thực hiện */

.plan-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: .2rem;
  font-size: .9rem;
}

.plan-table caption {
  caption-side: top;
  padding-bottom: .5rem;
  font-size: .76rem;
  text-align: left;
  color: var(--muted);
}

.plan-table th,
.plan-table td {
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line-soft);
}

.plan-table thead th {
  background: var(--dark-2);
  border-bottom: 0;
  font-family: var(--font-head);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fff;
}

.plan-table tbody td:first-child {
  width: 112px;
  font-family: var(--font-head);
  font-size: .84rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
}

.plan-table tbody tr:nth-child(even) {
  background: #fafbfc;
}

.plan-table tbody tr:hover {
  background: var(--red-soft);
}

.plan-table tbody tr:last-child td {
  border-bottom: 0;
}

/* Điều hướng đề tài trước / sau */

.pager {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 26px;
}

.pager a,
.pager span {
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  font-family: var(--font-head);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink);
  transition: border-color .16s ease, color .16s ease, background .16s ease;
}

.pager a:hover {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
  text-decoration: none;
}

.pager span {
  border-style: dashed;
  color: #b3bcc4;
}

/* ------------------------------ Landing page ------------------------------ */

.capability-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.capability-list li {
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: var(--r);
  background: var(--surface);
}

.capability-list strong {
  display: block;
  margin-bottom: 2px;
  font-family: var(--font-head);
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink);
}

.capability-list span {
  font-size: .92rem;
  color: var(--ink-soft);
}

.landing-block {
  margin-top: clamp(32px, 5vw, 48px);
}

.landing-text {
  margin: 0 0 16px;
  color: var(--ink-soft);
}

.actions {
  margin: 0;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--r);
  background: var(--red);
  color: #fff;
  font-family: var(--font-head);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.btn:hover,
.btn:focus-visible {
  background: var(--red-dark);
  color: #fff;
  text-decoration: none;
}

/* ------------------------------ Responsive -------------------------------- */

@media (max-width: 640px) {
  .container {
    padding-inline: 16px;
  }

  .site-header .lang {
    right: 16px;
  }

  .project-card {
    gap: 12px;
    padding: 14px 16px;
  }

  .project-card .num {
    width: 36px;
    height: 36px;
    font-size: .86rem;
  }

  .pager {
    flex-direction: column;
  }

  .pager a,
  .pager span {
    text-align: center;
  }

  .plan-table {
    font-size: .82rem;
  }

  .plan-table th,
  .plan-table td {
    padding: 8px 10px;
  }

  .plan-table tbody td:first-child {
    width: auto;
  }

  .site-footer p {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }

  .project-card:hover {
    transform: none;
  }
}

/* --------------------------------- In ấn --------------------------------- */

@media print {
  body {
    background: #fff;
    color: #000;
    font-size: 11.5pt;
  }

  .site-header {
    background: none;
    color: #000;
    padding: 0 0 10pt;
    border-bottom: 2px solid #000;
  }

  .site-header h1 {
    color: #000;
  }

  .site-header .eyebrow,
  .site-header .lang,
  .breadcrumb,
  .pager,
  .more,
  .site-footer {
    display: none;
  }

  .container {
    max-width: none;
    padding: 0;
  }

  .proposal {
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  .proposal-header {
    border-bottom-color: #000;
  }

  .proposal h2 {
    color: #000;
    border-left-color: #000;
    border-bottom-color: #ccc;
    page-break-after: avoid;
  }

  .plan-table thead th {
    background: none;
    color: #000;
    border-bottom: 1px solid #000;
  }

  a {
    color: #000;
  }
}
