/* ===========================================================
   Portfolio Kỹ thuật số — Bùi Lê Đình Yên Ái
   Học phần: Nhập môn Công nghệ số và Ứng dụng Trí tuệ nhân tạo
   Nguyên tắc: nội dung LUÔN hiển thị. Không có animation nào
   điều khiển opacity/visibility. Hiệu ứng chỉ ở mức hover.
   =========================================================== */

:root {
  --cream:      #FDF7F3;
  --cream-alt:  #F8EDE6;
  --card:       #FFFFFF;
  --rose:       #D4718A;
  --rose-deep:  #A63E5C;
  --rose-soft:  #F6DDE3;
  --apricot:    #E8A87C;
  --apricot-soft:#FBEADD;
  --sage:       #8FAE9B;
  --sage-soft:  #E3EDE6;
  --ink:        #3A2A32;
  --muted:      #7C6672;
  --line:       #EEDDE3;

  --serif: "Playfair Display", Georgia, serif;
  --sans:  "Be Vietnam Pro", -apple-system, "Segoe UI", sans-serif;

  --shadow-sm: 0 2px 8px rgba(166, 62, 92, .06);
  --shadow:    0 8px 28px rgba(166, 62, 92, .10);
  --shadow-lg: 0 18px 50px rgba(166, 62, 92, .16);
  --radius: 18px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.75;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--rose-deep); }

/* ---------- Layout ---------- */
.wrap { width: min(1080px, 92vw); margin: 0 auto; }
.narrow { width: min(820px, 92vw); margin: 0 auto; }
section { padding: 68px 0; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(253, 247, 243, .93);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-in {
  width: min(1080px, 92vw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 0; flex-wrap: wrap;
}
.brand {
  font-family: var(--serif); font-size: 1.16rem; font-weight: 700;
  color: var(--rose-deep); text-decoration: none; letter-spacing: .2px;
  display: flex; align-items: center; gap: 10px;
}
.brand-mark {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--rose) 0%, var(--apricot) 100%);
  color: #fff; font-size: .8rem; font-weight: 700;
  display: grid; place-items: center; font-family: var(--sans);
}
.nav-links { display: flex; gap: 6px; flex-wrap: wrap; }
.nav-links a {
  padding: 7px 15px; border-radius: 999px; text-decoration: none;
  color: var(--muted); font-size: .93rem; font-weight: 500;
  transition: background .18s ease, color .18s ease;
}
.nav-links a:hover { background: var(--rose-soft); color: var(--rose-deep); }
.nav-links a.active { background: var(--rose-deep); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1100px 460px at 82% -8%, var(--apricot-soft) 0%, transparent 62%),
    radial-gradient(900px 420px at 8% 6%, var(--rose-soft) 0%, transparent 60%),
    var(--cream);
  padding: 84px 0 76px;
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid; grid-template-columns: 1.35fr .85fr;
  gap: 54px; align-items: center;
}
.eyebrow {
  display: inline-block; font-size: .74rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--rose-deep); background: var(--rose-soft);
  padding: 7px 16px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(2.3rem, 5.2vw, 3.9rem);
  line-height: 1.13; letter-spacing: -.6px; margin-bottom: 18px;
}
.hero h1 em { font-style: italic; color: var(--rose-deep); }
.hero-sub { font-size: 1.09rem; color: var(--muted); max-width: 52ch; margin-bottom: 30px; }

.avatar-card {
  background: var(--card); border-radius: 24px; padding: 30px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--line);
}
.avatar-card h3 { font-family: var(--serif); font-size: 1.36rem; text-align: center; margin-bottom: 4px; }
.avatar-card .role { text-align: center; color: var(--rose-deep); font-size: .9rem; font-weight: 600; margin-bottom: 20px; }
.fact { display: flex; gap: 11px; padding: 9px 0; border-top: 1px solid var(--line); font-size: .9rem; }
.fact-k { color: var(--muted); min-width: 74px; flex: none; }
.fact-v { font-weight: 500; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 26px; border-radius: 999px; text-decoration: none;
  font-weight: 600; font-size: .95rem; border: 1.5px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.btn-primary { background: var(--rose-deep); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); background: #8E3350; }
.btn-ghost { border-color: var(--rose); color: var(--rose-deep); background: transparent; }
.btn-ghost:hover { background: var(--rose-soft); transform: translateY(-2px); }
.btn-row { display: flex; gap: 13px; flex-wrap: wrap; }

/* ---------- Headings ---------- */
.sec-head { margin-bottom: 38px; }
.sec-head.center { text-align: center; }
.sec-head h2 {
  font-family: var(--serif); font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  line-height: 1.2; margin-bottom: 10px;
}
.sec-head p { color: var(--muted); max-width: 62ch; }
.sec-head.center p { margin: 0 auto; }
.rule { width: 54px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--rose), var(--apricot)); margin-bottom: 18px; }
.sec-head.center .rule { margin-left: auto; margin-right: auto; }

/* ---------- Cards ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--rose); }
.card h3 { font-family: var(--serif); font-size: 1.24rem; margin-bottom: 9px; }
.card p { color: var(--muted); font-size: .94rem; }

.icon-badge {
  width: 44px; height: 44px; border-radius: 13px; margin-bottom: 15px;
  display: grid; place-items: center; font-size: 1.3rem;
  background: var(--rose-soft);
}
.icon-badge.apricot { background: var(--apricot-soft); }
.icon-badge.sage { background: var(--sage-soft); }

/* ---------- Goal list ---------- */
.goal-list { list-style: none; display: grid; gap: 14px; }
.goal-list li {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.goal-num {
  width: 27px; height: 27px; border-radius: 50%; flex: none;
  background: var(--rose-deep); color: #fff;
  font-size: .78rem; font-weight: 700; display: grid; place-items: center;
  margin-top: 2px;
}
.goal-list.sage .goal-num { background: var(--sage); }

/* ---------- Project cards ---------- */
.proj-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.proj {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.proj:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.proj-top {
  padding: 22px 24px; color: #fff;
  background: linear-gradient(135deg, var(--rose) 0%, var(--rose-deep) 100%);
}
.proj:nth-child(2) .proj-top { background: linear-gradient(135deg, var(--apricot) 0%, #C97B4A 100%); }
.proj:nth-child(3) .proj-top { background: linear-gradient(135deg, var(--sage) 0%, #5F8271 100%); }
.proj:nth-child(4) .proj-top { background: linear-gradient(135deg, #B58BB4 0%, #7C4E7B 100%); }
.proj:nth-child(5) .proj-top { background: linear-gradient(135deg, #E39BAE 0%, #B85C77 100%); }
.proj:nth-child(6) .proj-top { background: linear-gradient(135deg, #7FA8B8 0%, #4B7186 100%); }
.proj-tag { font-size: .72rem; letter-spacing: .13em; text-transform: uppercase; opacity: .92; font-weight: 600; }
.proj-top h3 { font-family: var(--serif); font-size: 1.3rem; margin-top: 6px; line-height: 1.3; }
.proj-body { padding: 22px 24px 24px; flex: 1; display: flex; flex-direction: column; }
.proj-body p { color: var(--muted); font-size: .93rem; flex: 1; margin-bottom: 16px; }
.chips { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 18px; }
.chip {
  font-size: .74rem; padding: 4px 11px; border-radius: 999px;
  background: var(--cream-alt); color: var(--muted); font-weight: 500;
}
.proj-link {
  text-decoration: none; color: var(--rose-deep); font-weight: 600; font-size: .92rem;
  display: inline-flex; align-items: center; gap: 7px; align-self: flex-start;
}
.proj-link:hover { gap: 12px; }
.proj-link span { transition: transform .18s ease; }

/* ---------- Bài page ---------- */
.page-head {
  background:
    radial-gradient(760px 320px at 88% 0%, var(--apricot-soft) 0%, transparent 60%),
    radial-gradient(620px 300px at 4% 10%, var(--rose-soft) 0%, transparent 58%),
    var(--cream);
  padding: 52px 0 46px; border-bottom: 1px solid var(--line);
}
.crumb { font-size: .85rem; color: var(--muted); margin-bottom: 14px; }
.crumb a { color: var(--rose-deep); text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
.page-head h1 {
  font-family: var(--serif); font-size: clamp(1.9rem, 4vw, 2.9rem);
  line-height: 1.16; margin-bottom: 12px;
}
.page-head .lede { color: var(--muted); font-size: 1.04rem; max-width: 62ch; }

.block { margin-bottom: 44px; }
.block h2 {
  font-family: var(--serif); font-size: 1.55rem; margin-bottom: 8px;
  display: flex; align-items: center; gap: 12px;
}
.block h2::before {
  content: ""; width: 5px; height: 25px; border-radius: 3px; flex: none;
  background: linear-gradient(180deg, var(--rose), var(--apricot));
}
.block h3 { font-family: var(--serif); font-size: 1.16rem; margin: 22px 0 8px; }
.block p { margin-bottom: 13px; }
.block ul, .block ol { margin: 0 0 14px 21px; }
.block li { margin-bottom: 7px; }
.block li::marker { color: var(--rose); }

.callout {
  background: var(--sage-soft); border-left: 4px solid var(--sage);
  border-radius: 0 12px 12px 0; padding: 17px 21px; margin: 20px 0;
  font-size: .95rem;
}
.callout.rose { background: var(--rose-soft); border-left-color: var(--rose-deep); }
.callout.apricot { background: var(--apricot-soft); border-left-color: var(--apricot); }
.callout strong { color: var(--rose-deep); }
.callout.sage strong { color: #4F6E5D; }

/* prompt boxes */
.prompt {
  border: 1px solid var(--line); border-radius: 12px; padding: 15px 18px;
  margin-bottom: 12px; background: var(--card); box-shadow: var(--shadow-sm);
}
.prompt-label {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .11em;
  font-weight: 700; margin-bottom: 7px; display: inline-block;
  padding: 3px 10px; border-radius: 999px;
}
.prompt.v1 .prompt-label { background: #F1E4E8; color: #8A6270; }
.prompt.v2 .prompt-label { background: var(--apricot-soft); color: #A8663B; }
.prompt.v3 .prompt-label { background: var(--sage-soft); color: #4F6E5D; }
.prompt q { font-style: italic; color: var(--ink); display: block; font-size: .94rem; }
.prompt.v3 { border-color: var(--sage); border-width: 1.5px; }

/* tables */
.table-scroll { overflow-x: auto; margin: 18px 0; border-radius: 12px; box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; background: var(--card); font-size: .9rem; min-width: 540px; }
thead th {
  background: var(--rose-deep); color: #fff; text-align: left;
  padding: 12px 15px; font-weight: 600; font-size: .84rem;
}
tbody td { padding: 11px 15px; border-top: 1px solid var(--line); vertical-align: top; }
tbody tr:nth-child(even) { background: #FEFBF9; }
.pill { padding: 2px 10px; border-radius: 999px; font-size: .76rem; font-weight: 600; white-space: nowrap; }
.pill.hi { background: var(--sage-soft); color: #43604F; }
.pill.mid { background: var(--apricot-soft); color: #A8663B; }
.pill.lo { background: #F3E3E7; color: #8A6270; }

/* screenshot gallery */
.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin: 20px 0; }
.shot {
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: var(--card); box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.shot:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.shot img { width: 100%; height: auto; border-bottom: 1px solid var(--line); }
.shot figcaption { padding: 10px 14px; font-size: .82rem; color: var(--muted); }
.shot figcaption b { color: var(--ink); }

/* PDF viewer */
.pdf-box {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); background: var(--card); margin: 20px 0;
}
.pdf-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 13px 18px; background: var(--cream-alt); border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.pdf-name { font-weight: 600; font-size: .92rem; display: flex; align-items: center; gap: 9px; }
.pdf-name .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--rose); flex: none; }
.pdf-frame { width: 100%; height: 640px; border: 0; display: block; background: #F4EEEA; }
.pdf-note { padding: 11px 18px; font-size: .82rem; color: var(--muted); border-top: 1px solid var(--line); background: #FEFBF9; }

/* ---------- Timeline (tổng kết) ---------- */
.tl { list-style: none; position: relative; padding-left: 30px; }
.tl::before {
  content: ""; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(180deg, var(--rose), var(--apricot), var(--sage));
  border-radius: 2px;
}
.tl li { position: relative; margin-bottom: 26px; }
.tl li::before {
  content: ""; position: absolute; left: -27px; top: 8px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--card); border: 3px solid var(--rose);
}
.tl h3 { font-family: var(--serif); font-size: 1.14rem; margin-bottom: 5px; }
.tl p { color: var(--muted); font-size: .94rem; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 22px 18px; text-align: center; box-shadow: var(--shadow-sm);
}
.stat-n { font-family: var(--serif); font-size: 2.1rem; font-weight: 700; color: var(--rose-deep); line-height: 1.1; }
.stat-l { font-size: .82rem; color: var(--muted); margin-top: 5px; }

/* ---------- CTA ---------- */
.cta {
  background: linear-gradient(135deg, var(--rose-deep) 0%, #8E3350 60%, #C97B4A 100%);
  color: #fff; border-radius: 26px; padding: 52px 44px; text-align: center;
  box-shadow: var(--shadow-lg);
}
.cta h2 { font-family: var(--serif); font-size: clamp(1.6rem, 3.2vw, 2.2rem); margin-bottom: 12px; }
.cta p { opacity: .93; max-width: 56ch; margin: 0 auto 26px; }
.cta .btn-primary { background: #fff; color: var(--rose-deep); }
.cta .btn-primary:hover { background: var(--cream); }
.cta .btn-ghost { border-color: rgba(255,255,255,.6); color: #fff; }
.cta .btn-ghost:hover { background: rgba(255,255,255,.14); }

/* ---------- Prev/Next ---------- */
.pager { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding-top: 12px; }
.pager a {
  text-decoration: none; color: var(--rose-deep); font-weight: 600; font-size: .92rem;
  padding: 11px 20px; border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--card); transition: border-color .18s ease, background .18s ease;
}
.pager a:hover { border-color: var(--rose); background: var(--rose-soft); }

/* ---------- Footer ---------- */
.foot {
  background: var(--cream-alt); border-top: 1px solid var(--line);
  padding: 40px 0; margin-top: 20px;
}
.foot-in { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: center; }
.foot p { font-size: .87rem; color: var(--muted); }
.foot .brand { font-size: 1rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .grid-3, .grid-2, .proj-grid, .shots { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .pdf-frame { height: 460px; }
  section { padding: 50px 0; }
  .cta { padding: 40px 24px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .nav-links { gap: 3px; }
  .nav-links a { padding: 6px 11px; font-size: .86rem; }
  .stats { grid-template-columns: 1fr; }
  .pdf-frame { height: 380px; }
}

/* ---------- Member list (Bài 4) ----------
   Đặt ở cuối file: .member cùng độ đặc hiệu với .card và .block h3,
   nên phải khai báo SAU chúng thì mới thắng. */
.card.member { padding: 15px 18px; }
.card.member h3 { font-family: var(--serif); font-size: 1rem; margin: 0; }
.card.member p { font-size: .78rem; color: var(--rose-deep); font-weight: 600; margin: 3px 0 0; }
.card.member.me { border-color: var(--rose); box-shadow: var(--shadow); }

@media print {
  .nav, .pager, .cta, .pdf-frame { display: none; }
  body { background: #fff; }
}
