/* 1. Biến màu dùng chung: đổi màu chủ đạo tại đây. */
:root {
  color-scheme: dark;
  --bg: #090e19;
  --surface: #101827;
  --text: #edf3ff;
  --muted: #a7b5cc;
  --accent: #60dce9;
  --line: #243047;
  --radius: 12px;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.7;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  cursor: pointer;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 5px;
}
.skip-link {
  position: absolute;
  left: 20px;
  top: -100px;
  z-index: 10;
  background: var(--surface);
  padding: 12px;
}
.skip-link:focus {
  top: 12px;
}
.header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px max(6%, calc((100% - 1120px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(9, 14, 25, 0.93);
  backdrop-filter: blur(16px);
  gap: 24px;
}
.brand {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.2;
}
.brand span {
  color: var(--accent);
}
nav {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
nav a {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  padding: 5px 0;
  border-bottom: 2px solid transparent;
}
nav a:hover,
nav a.active {
  color: var(--accent);
  border-color: var(--accent);
}
.menu-toggle {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 7px;
  padding: 5px 12px;
}
.menu-toggle[hidden] {
  display: none;
}
main,
footer {
  max-width: 1120px;
  margin: auto;
  width: 88%;
}
.section {
  padding: 76px 0;
  border-bottom: 1px solid var(--line);
}
.hero {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  align-items: center;
  gap: 54px;
  padding: 88px 0;
}
.eyebrow,
.meta {
  font-size: 12px;
  letter-spacing: 1.6px;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 20px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(40px, 5.1vw, 64px);
  line-height: 1.13;
  letter-spacing: -2px;
  margin-bottom: 25px;
}
h1 span {
  color: var(--accent);
}
h2 {
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.25;
  letter-spacing: -1px;
  margin-bottom: 16px;
}
h3 {
  font-size: 21px;
  line-height: 1.4;
  margin-bottom: 12px;
}
p {
  color: var(--muted);
}
.intro {
  font-size: 21px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 18px;
}
.bio {
  max-width: 620px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.button {
  display: inline-flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 700;
}
.button:hover {
  border-color: var(--accent);
}
.button.primary {
  background: var(--accent);
  color: #09121e;
  border-color: var(--accent);
}
.primary:hover {
  background: #a0eef5;
}
.profile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.monogram {
  background: #e9efff;
  color: var(--accent);
  font-size: 78px;
  letter-spacing: -5px;
  font-weight: 800;
  min-height: 180px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 10px;
  position: relative;
}
.monogram span {
  position: absolute;
  right: 16px;
  top: 2px;
  font-size: 30px;
  font-weight: 400;
  letter-spacing: 0;
}
.profile-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  margin: 22px 0 5px;
}
dl {
  margin: 0;
}
dl div {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
dl div:last-child {
  border: 0;
  padding-bottom: 0;
}
dt {
  font-size: 13px;
  color: var(--muted);
}
dd {
  margin: 0;
  font-weight: 600;
}
.section-heading {
  margin-bottom: 34px;
}
.section-heading .eyebrow {
  margin-bottom: 12px;
}
.section-heading p:last-child {
  margin-bottom: 0;
}
.timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.timeline article {
  border-left: 2px solid var(--accent);
  padding-left: 22px;
}
.timeline .meta {
  margin-bottom: 12px;
}
.subtitle {
  font-weight: 600;
}
.timeline p:last-child {
  margin-bottom: 0;
}
.skill-grid,
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.skill-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  background: var(--surface);
}
.card-number {
  color: var(--muted);
  font-size: 14px;
  display: block;
  margin-bottom: 22px;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tags span {
  font-size: 14px;
  background: #16243a;
  color: #c1d6ef;
  padding: 5px 10px;
  border-radius: 5px;
}
.project-card {
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.project-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--accent);
  margin-bottom: 28px;
}
.project-card h3 {
  min-height: 59px;
}
.project-card > p {
  font-size: 16px;
}
details {
  border-top: 1px solid var(--line);
  margin-top: 25px;
  padding-top: 15px;
}
summary {
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
details p {
  font-size: 14px;
  margin: 14px 0 0;
}
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 90px;
}
.contact-intro > p:last-child {
  max-width: 460px;
}
.contact-list {
  align-self: center;
  border-top: 1px solid var(--line);
}
.contact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 19px 0;
  border-bottom: 1px solid var(--line);
  transition:
    color 0.2s,
    padding 0.2s;
}
.contact-item:hover {
  padding-right: 6px;
  color: var(--accent);
}
.contact-item[aria-disabled="true"] {
  cursor: default;
}
.contact-item[aria-disabled="true"]:hover {
  padding-right: 0;
  color: inherit;
}
.contact-label {
  font-weight: 600;
}
.contact-value {
  margin-left: auto;
  color: var(--muted);
  overflow-wrap: anywhere;
  text-align: right;
}
.contact-arrow {
  color: var(--accent);
  font-size: 18px;
  line-height: 1;
}
.contact-note {
  font-size: 14px;
  margin-top: 18px;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 25px 0;
  font-size: 14px;
}
footer p {
  margin: 0;
}
footer a {
  color: var(--accent);
}
/* 2. Bố cục cho máy tính bảng và điện thoại. */
@media (max-width: 950px) {
  .hero {
    gap: 30px;
    grid-template-columns: 1.3fr 1fr;
  }
  .timeline {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .skill-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }
  .project-card h3 {
    min-height: 0;
  }
  .contact {
    gap: 35px;
  }
}
@media (max-width: 650px) {
  .header {
    padding: 14px 6%;
    flex-wrap: wrap;
    gap: 12px;
  }
  .menu-toggle:not([hidden]) {
    display: block;
    margin-left: auto;
  }
  nav {
    width: 100%;
    gap: 12px 22px;
  }
  body.js-ready nav:not(.open) {
    display: none;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 35px;
    padding: 48px 0;
  }
  .section {
    padding: 48px 0;
  }
  .profile {
    max-width: 400px;
    width: 100%;
  }
  .monogram {
    min-height: 150px;
  }
  .contact {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .contact-item {
    flex-wrap: wrap;
  }
  footer {
    flex-wrap: wrap;
  }
  .eyebrow {
    letter-spacing: 1px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* 3. Phong cách IT–AI: nền lưới nhẹ, cửa sổ code và màu cú pháp. */
body {
  background-image: radial-gradient(
    ellipse at 85% 8%,
    rgba(106, 73, 204, 0.12),
    transparent 40%
  );
}
main {
  position: relative;
}
main > * {
  position: relative;
}
.hero:before {
  content: "";
  position: absolute;
  inset: 0 -3%;
  z-index: -1;
  background-image:
    linear-gradient(rgba(96, 220, 233, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 220, 233, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(#000, transparent);
}
.brand {
  font-family: Consolas, "Courier New", monospace;
  font-size: 24px;
  letter-spacing: -1px;
  white-space: nowrap;
}
h1 span {
  background: linear-gradient(105deg, #74e6ef 10%, #a4a4ff 95%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}
.eyebrow,
.meta,
.project-top,
.card-number {
  font-family: Consolas, "Courier New", monospace;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 1.3px;
}
.section-heading {
  position: relative;
  padding-left: 20px;
  border-left: 3px solid var(--accent);
}
.profile {
  padding: 0;
  overflow: hidden;
  box-shadow: 0 20px 80px #0004;
  border-color: #36435c;
  transform: rotate(1deg);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  background: #192235;
  border-bottom: 1px solid var(--line);
  font:
    12px/1.5 Consolas,
    "Courier New",
    monospace;
  color: var(--muted);
}
.terminal-dots {
  display: flex;
  gap: 5px;
}
.terminal-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef7979;
}
.terminal-dots i:nth-child(2) {
  background: #e9be69;
}
.terminal-dots i:nth-child(3) {
  background: #72d2b2;
}
.file-type {
  margin-left: auto;
  color: var(--accent);
}
.code-profile {
  padding: 24px 16px 20px;
  background: #0c1321;
}
.code-profile > div {
  display: flex;
  line-height: 1.95;
}
.code-profile code {
  font:
    14px/1.95 Consolas,
    "Courier New",
    monospace;
  white-space: pre;
}
.line-no {
  width: 29px;
  flex-shrink: 0;
  font:
    12px/2.28 Consolas,
    "Courier New",
    monospace;
  color: #687990;
  user-select: none;
}
.syntax-purple {
  color: #c7a3ff;
}
.syntax-cyan {
  color: #80deeb;
}
.syntax-green {
  color: #9ce0b4;
}
.syntax-muted {
  color: #92a3bd;
}
.terminal-prompt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 20px;
  font:
    13px/1.5 Consolas,
    "Courier New",
    monospace;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.terminal-prompt > span:first-child {
  color: var(--accent);
}
.cursor {
  width: 7px;
  height: 15px;
  background: var(--accent);
  animation: blink 1.3s step-end infinite;
}
.profile-label {
  margin: 20px 24px 5px;
  font-size: 12px;
  color: #a6abef;
}
.profile dl {
  margin: 0 24px 23px;
}
.profile dl div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
}
.profile dt {
  font-size: 13px;
}
.profile dd {
  font-size: 14px;
  text-align: right;
}
.skill-card,
.project-card {
  background: linear-gradient(140deg, #121d30, #0e1523);
  transition:
    border-color 0.2s,
    transform 0.2s,
    box-shadow 0.2s;
}
.skill-card:hover,
.project-card:hover {
  border-color: #53778e;
  transform: translateY(-4px);
  box-shadow: 0 12px 28px #0003;
}
.card-number {
  color: #9c94ee;
}
.tags span {
  border: 1px solid #2a3a52;
  background: #152135;
}
.project-top {
  color: #9ce5ee;
}
.timeline article {
  border-left-color: #514f84;
}
.meta {
  color: #b4a6f6;
}
.contact {
  background: radial-gradient(ellipse at 0 100%, #15264188, transparent 70%);
}
.button {
  transition:
    transform 0.2s,
    background 0.2s;
}
.button:hover {
  transform: translateY(-2px);
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
@media (max-width: 950px) {
  .hero {
    gap: 28px;
    grid-template-columns: 1.1fr 1fr;
  }
  .code-profile {
    padding-left: 12px;
    padding-right: 10px;
  }
  .code-profile code {
    font-size: 13px;
  }
  .line-no {
    width: 24px;
    line-height: 2.12;
  }
}
@media (max-width: 650px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 48px 0;
  }
  .profile {
    max-width: none;
    transform: none;
  }
  .code-profile code {
    font-size: 14px;
  }
  .line-no {
    line-height: 2.28;
  }
  .hero h1 {
    letter-spacing: -1.3px;
  }
  .profile dl div {
    flex-wrap: wrap;
  }
  .eyebrow {
    line-height: 1.8;
  }
  .terminal-bar {
    padding: 12px 15px;
  }
  .skill-card,
  .project-card {
    padding: 23px;
  }
  .contact-list {
    min-width: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .skill-card:hover,
  .project-card:hover,
  .button:hover {
    transform: none;
  }
}

/* 4. Logo và ảnh cá nhân — ảnh gốc nằm trong thư mục assets. */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 1px;
}
.brand-mark {
  position: relative;
  display: block;
  flex: none;
  width: 54px;
  height: 54px;
  overflow: hidden;
  border: 1px solid #365875;
  border-radius: 12px;
  background: #062242;
}
.brand-mark img {
  position: absolute;
  width: 350%;
  height: 350%;
  max-width: none;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -45%);
  object-fit: cover;
}
.brand .brand-name {
  color: var(--text);
  font-size: 23px;
}
.brand .brand-caption {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 1.4px;
}
.profile {
  transform: none;
}
.portrait-frame {
  position: relative;
  aspect-ratio: 1.12;
  overflow: hidden;
  background: #c2c3cf;
}
.portrait {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 35%;
}
.portrait-frame:after {
  content: "";
  position: absolute;
  inset: 55% 0 0;
  background: linear-gradient(transparent, rgba(6, 15, 30, 0.92));
  pointer-events: none;
}
.portrait-caption {
  position: absolute;
  z-index: 1;
  left: 24px;
  right: 24px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.portrait-caption span {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
}
.portrait-caption small {
  font:
    11px/1.6 Consolas,
    "Courier New",
    monospace;
  color: #91ebf2;
  letter-spacing: 1.8px;
}
@media (max-width: 650px) {
  .brand-mark {
    width: 46px;
    height: 46px;
  }
  .brand .brand-name {
    font-size: 20px;
  }
  .brand .brand-caption {
    font-size: 8px;
  }
  .portrait-frame {
    aspect-ratio: 1;
  }
  .portrait-caption {
    left: 20px;
  }
}


/* ===== FIX 04 / KẾT NỐI ===== */
.contact {
  align-items: start;
}

.contact-intro {
  max-width: 520px;
}

.contact-list {
  width: 100%;
  min-width: 0;
  border-top: 1px solid var(--line);
}

.contact-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  transition:
    color 0.2s ease,
    padding 0.2s ease,
    border-color 0.2s ease;
}

.contact-item:hover {
  padding-left: 6px;
  padding-right: 6px;
  color: var(--accent);
  border-color: #3b6175;
}

.contact-label {
  font-weight: 700;
  color: var(--text);
}

.contact-value {
  min-width: 0;
  margin-left: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
  text-align: left;
}

.contact-item:hover .contact-value {
  color: #d8f9fc;
}

.contact-arrow {
  justify-self: end;
  color: var(--accent);
  font-size: 19px;
  line-height: 1;
}

.contact-note {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 650px) {
  .contact {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .contact-item {
    grid-template-columns: minmax(0, 1fr) 24px;
    gap: 7px 12px;
  }

  .contact-label {
    grid-column: 1 / -1;
  }

  .contact-value {
    grid-column: 1;
    grid-row: 2;
    text-align: left;
  }

  .contact-arrow {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
  }
}
