/* ===== Màu & chữ: đổi --accent để đổi màu nhấn ===== */
:root {
  /* Nền xám xanh dịu, chữ trắng ngà, điểm nhấn màu san hô */
  --bg: #262B31;
  --bg-alt: #2E343B;
  --card: #363D45;
  --ph: #3A414A;
  --line: #3A4149;
  --line2: #4C545E;
  --text: #F1EDE6;
  --text2: #D6D1C9;
  --muted: #B0B5BA;
  --muted2: #9AA0A6;
  --accent: #EE9A7C;
  --serif: 'Newsreader', Georgia, serif;
  --pad: clamp(20px, 4vw, 40px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Be Vietnam Pro', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--accent); }
h1, h2, h3 { margin: 0; }
img { max-width: 100%; display: block; }

/* ===== Thanh đầu trang ===== */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px var(--pad);
  background: rgba(38, 43, 49, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.logo { font-weight: 700; letter-spacing: 0.2em; font-size: 14px; }
.nav { display: flex; gap: 28px; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; }
.menu-btn { display: none; background: none; border: 0; color: var(--text); width: 44px; height: 44px; cursor: pointer; }

/* ===== Ảnh lớn đầu trang — thay url bằng ảnh của bạn, ví dụ: url('../images/hero.jpg') ===== */
.hero {
  min-height: 82vh;
  display: flex; align-items: flex-end;
  background:
    linear-gradient(to top, rgba(0,0,0,0.75), rgba(0,0,0,0.1) 60%),
    var(--ph) center / cover no-repeat;
}
.hero-inner { padding: 0 var(--pad) 64px; max-width: 820px; }
.eyebrow { margin: 0 0 12px; font-size: 13px; letter-spacing: 0.2em; color: var(--accent); }
.hero h1 { font-size: clamp(38px, 6vw, 68px); line-height: 1.05; font-weight: 300; margin-bottom: 20px; }
.hero-sub { margin: 0; font-size: 18px; color: var(--text2); }

/* ===== Khối nội dung chung ===== */
.section { padding: 88px var(--pad); }
.section.alt { background: var(--bg-alt); }
.section h2 { font-size: clamp(28px, 3.5vw, 38px); font-weight: 300; margin-bottom: 8px; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 32px; }
.lead { margin: 0 0 40px; color: var(--muted); max-width: 640px; }

/* ===== Nút lọc ảnh ===== */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 14px;
  background: transparent; color: var(--text); border: 1px solid var(--line2);
}
.chip:hover { border-color: var(--accent); }
.chip.is-active { background: var(--accent); color: var(--bg); border-color: var(--accent); }

/* ===== Lưới ảnh so le ===== */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  grid-auto-rows: 200px;
  gap: 8px;
}
.gallery .photo {
  position: relative; overflow: hidden; padding: 0; border: 0; cursor: zoom-in;
  background: var(--card); color: var(--muted); font: inherit; text-align: left;
}
.gallery .photo.tall { grid-row: span 2; }
.gallery .photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery .photo:hover img { transform: scale(1.04); }
.gallery .photo .cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 16px;
  font-size: 13px; color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,.7), transparent);
}
.gallery .photo[hidden] { display: none; }
.hint { margin: 16px 0 0; font-size: 13px; color: var(--muted2); }

/* Khung giữ chỗ khi chưa có ảnh */
.thumb, .placeholder {
  background: var(--ph); display: flex; align-items: center; justify-content: center;
  color: var(--muted2); font-size: 13px;
}
.thumb::after { content: attr(data-label); }
.thumb { aspect-ratio: 3 / 2; margin-bottom: 18px; }
.placeholder { width: 100%; height: 100%; }

/* ===== Thẻ địa điểm & bài viết ===== */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px; }
.place .kind { margin: 0 0 6px; font-size: 12px; letter-spacing: 0.08em; color: var(--accent); }
.place h3, .post h3 { font-size: 21px; font-weight: 500; margin-bottom: 8px; }
.place p { margin: 0; color: var(--muted); font-size: 15px; }
.post { display: block; }
.post .meta { margin: 0 0 4px; font-size: 13px; color: var(--muted2); }

/* ===== Hồ sơ ===== */
.profile { display: flex; flex-wrap: wrap; gap: 56px; }
.profile-intro { flex: 1 1 280px; }
.profile-grid { flex: 999 1 520px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 40px 32px; }
.label { font-size: 13px; letter-spacing: 0.08em; color: var(--muted2); font-weight: 500; margin-bottom: 14px; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.timeline strong { display: block; font-weight: 500; }
.timeline span { color: var(--muted); font-size: 14px; }
.btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px;
  border: 1px solid var(--accent); color: var(--accent);
}
.btn:hover { background: var(--accent); color: var(--bg); }

/* ===== Công việc chuyên môn ===== */
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 72px; }
.skill-group { background: var(--card); padding: 22px; border-radius: 4px; }
.skill-group h4 { margin: 0 0 14px; font-size: 16px; font-weight: 500; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { padding: 5px 12px; border: 1px solid var(--line2); border-radius: 999px; font-size: 14px; color: var(--text2); }
.tags.small li { font-size: 12px; padding: 3px 10px; color: var(--muted); }
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.project { border: 1px solid var(--line); background: var(--bg); padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.project[hidden] { display: none; }
.project .kind { margin: 0; font-size: 12px; letter-spacing: 0.08em; color: var(--accent); }
.project h3 { font-size: 21px; font-weight: 500; }
.project dl { margin: 0; display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 8px 14px; font-size: 15px; }
.project dt { color: var(--muted2); }
.project dd { margin: 0; color: var(--text2); }
.project .tags { margin-top: auto; }

/* ===== Chân trang ===== */
.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding: 32px var(--pad); font-size: 13px; color: var(--muted2); border-top: 1px solid var(--line);
}
.site-footer a { color: var(--muted2); }
.site-footer a:hover { color: var(--accent); }

/* ===== Xem ảnh lớn ===== */
.lightbox {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,.94);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 1100px; width: 100%; }
.lb-img { width: 100%; height: 72vh; display: flex; align-items: center; justify-content: center; background: var(--ph); color: var(--muted2); }
.lb-img img { max-width: 100%; max-height: 72vh; object-fit: contain; }
.lightbox figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 14px; font-size: 14px; }
.lightbox figcaption span { color: var(--muted); }
.lb-close { position: absolute; top: 16px; right: 16px; width: 48px; height: 48px; background: none; border: 0; color: #fff; cursor: pointer; }

/* ===== Điện thoại ===== */
@media (max-width: 760px) {
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .nav.open { display: flex; }
  .nav a { padding: 16px var(--pad); border-top: 1px solid var(--line); }
  .gallery { grid-auto-rows: 160px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section { padding: 64px var(--pad); }
}

/* ===== Chữ tiêu đề có chân, mềm mại kiểu tạp chí ảnh ===== */
.hero h1, .section h2, .project h3, .place h3, .post h3, .lightbox figcaption strong {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
}
.hero h1 { font-size: clamp(40px, 6.4vw, 72px); line-height: 1.04; }
.hero h1 em { font-style: italic; color: var(--accent); }
.section h2 { font-size: clamp(32px, 4vw, 44px); line-height: 1.1; }
.project h3, .place h3, .post h3 { font-size: 24px; line-height: 1.25; }
.eyebrow { letter-spacing: 0.12em; }
.nav a { color: var(--text2); }
.nav a:hover { color: var(--accent); }
::selection { background: var(--accent); color: var(--bg); }

/* ===== Họa tiết nền: đường đồng mức cong nhẹ ===== */
body {
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600' fill='none' stroke='%23ffffff' stroke-opacity='0.055' stroke-width='1.2'%3E%3Cpath d='M0 20 C150 -14 450 54 600 20'/%3E%3Cpath d='M0 95 C200 117 400 73 600 95'/%3E%3Cpath d='M0 170 C150 130 450 210 600 170'/%3E%3Cpath d='M0 245 C200 263 400 227 600 245'/%3E%3Cpath d='M0 320 C150 290 450 350 600 320'/%3E%3Cpath d='M0 395 C200 421 400 369 600 395'/%3E%3Cpath d='M0 470 C150 432 450 508 600 470'/%3E%3Cpath d='M0 545 C200 565 400 525 600 545'/%3E%3C/svg%3E");
  background-size: 600px 600px;
}
.section { position: relative; }
/* Khối nền xen kẽ có mép trên/dưới uốn cong */
.section.alt { background: var(--bg-alt); }
.section.alt::before, .section.alt::after {
  content: ''; position: absolute; left: 0; right: 0; height: 48px; pointer-events: none;
  background-repeat: no-repeat; background-size: 100% 100%;
}
.section.alt::before { top: -47px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 48' preserveAspectRatio='none'%3E%3Cpath fill='%232E343B' d='M0 48 C360 0 1080 0 1440 40 L1440 48 Z'/%3E%3C/svg%3E"); }
.section.alt::after { bottom: -47px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 48' preserveAspectRatio='none'%3E%3Cpath fill='%232E343B' d='M0 0 L1440 0 L1440 8 C1080 48 360 48 0 4 Z'/%3E%3C/svg%3E"); z-index: 1; }
/* Ảnh đầu trang (khi chưa có ảnh): chuyển màu nhẹ thay vì khối xám */
.hero {
  background-image: linear-gradient(160deg, #3A414A 0%, #2A3036 55%, #262B31 100%);
  /* Khi có ảnh, thay dòng trên bằng:
  background-image: linear-gradient(to top, rgba(0,0,0,.65), rgba(0,0,0,.05) 60%), url('../images/hero.jpg'); */
}
.skill-group, .project { border-radius: 14px; }
.thumb, .gallery .photo { border-radius: 10px; }
.btn { border-radius: 999px; }
