:root {
  color-scheme: light;
  --bg: #fff0f6;
  --surface: rgba(255, 255, 255, 0.96);
  --text: #2b0c2c;
  --muted: #6b4660;
  --accent: #d63384;
  --accent-soft: #ffd6ec;
  --border: rgba(214, 51, 132, 0.18);
  --shadow: 0 24px 80px rgba(218, 63, 121, 0.12);
}

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

html, body {
  margin: 0;
  min-height: 100%;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, rgba(255, 214, 236, 0.7), transparent 30%),
              radial-gradient(circle at bottom right, rgba(214, 51, 132, 0.12), transparent 20%),
              var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
}

body {
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  appearance: none;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.click-card {
  width: 100%;
}

.wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 2rem;
}

.profile-panel,
.content-panel {
  display: grid;
  gap: 1.5rem;
}

.profile-card,
.info-card,
.about-section,
.experience-section,
.research-section,
.education-section,
.projects-section {
  background: var(--surface);
  border-radius: 32px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 2rem;
  overflow: hidden;
}

.profile-card {
  display: grid;
  gap: 1.2rem;
  position: relative;
  grid-auto-rows: min-content;
}

.profile-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(255, 214, 236, 0.4), transparent 30%);
  pointer-events: none;
}

.profile-image {
  width: 100%;
  aspect-ratio: 3 / 4;
  min-height: 200px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 214, 236, 0.2) 100%),
              url("tải xuống (98).jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid rgba(214, 51, 132, 0.12);
  position: relative;
  overflow: hidden;
}

.profile-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(214, 51, 132, 0.25) 0%, transparent 45%);
}

.profile-intro {
  display: grid;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
}

.hello {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--accent);
}

.profile-intro h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
}

.subtitle {
  margin: 0;
  color: var(--muted);
}

.info-card h2,
.about-section h2,
.experience-section h2,
.research-section h2,
.projects-section h2,
.education-section h2 {
  margin: 0 0 1.25rem;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
}

.info-card {
  padding: 1.25rem !important;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 214, 236, 0.4) 100%),
              url("tải xuống (87).jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.info-card h2 {
  margin-bottom: 0.85rem;
  font-size: 1.1rem;
}

.info-card ul {
  gap: 0.6rem;
}

.info-card li {
  font-size: 0.9rem;
}

.info-card ul,
.profile-card ul,
.projects-section ul,
.research-grid ul,
.education-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.85rem;
}

.info-card li,
.research-grid li,
.education-grid li {
  font-size: 0.95rem;
  color: var(--text);
}

.info-card strong {
  color: var(--accent);
}

.software-card {
  padding: 1.25rem !important;
  padding-top: 1.25rem !important;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 214, 236, 0.4) 100%),
              url("tải xuống (87).jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.software-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.software-grid span {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 0;
  border-radius: 18px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
}

..about-section p,
.experience-section p,
.projects-section p,
.research-section p,
.education-section p {
  margin: 0;
  color: var(--muted);
}

.about-section {
  display: grid;
  gap: 1.5rem;
}

.about-row {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  align-items: start;
}

.about-intro h2,
.about-summary h3 {
  margin-top: 0;
}

.about-intro p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.about-summary {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(214, 51, 132, 0.12);
  border-radius: 28px;
  padding: 1.25rem;
}

.about-summary h3 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

.about-summary ul {
  padding: 0;
  margin: 0;
  list-style: none;
  display: grid;
  gap: 0.6rem;
}

.about-summary li {
  color: var(--text);
  font-size: 0.9rem;
}

@media (max-width: 820px) {
  .about-row {
    grid-template-columns: 1fr;
  }
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section-title h2 {
  margin: 0;
  font-size: 1.5rem;
}

.section-title span {
  color: var(--accent);
  font-weight: 700;
}

.timeline {
  display: grid;
  gap: 1rem;
}

.timeline-item {
  display: grid;
  gap: 0.85rem;
  padding: 1rem 1rem 1rem 0;
  border-left: 3px solid var(--accent);
}

.timeline-date {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
}

.timeline-item h3 {
  margin: 0;
  font-size: 1.05rem;
}

.timeline-item p {
  margin: 0;
  color: var(--muted);
}

.education-grid {
  display: grid;
  gap: 1rem;
}

.edu-frame,
.research-card,
.project-card {
  display: block;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(214, 51, 132, 0.14);
  padding: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.edu-frame:hover,
.research-card:hover,
.project-card:hover,
.timeline-link:hover,
.link-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(214, 51, 132, 0.12);
  border-color: rgba(214, 51, 132, 0.28);
}

.edu-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  margin-bottom: 1rem;
}

.edu-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.edu-header p {
  margin: 0;
  color: var(--muted);
}

.edu-frame ul,
.research-grid ul {
  gap: 0.75rem;
}

.research-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.research-grid h3 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

.research-grid li::before {
  content: "•";
  margin-right: 0.65rem;
  color: var(--accent);
}

.page-title {
  margin-bottom: 1.75rem;
}

.page-title h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
}

.page-title p {
  margin: 0.75rem 0 0;
  color: var(--muted);
  max-width: 720px;
}

.detail-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  align-items: start;
}

.detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.info-compact h3 {
  margin-top: 1.4rem;
}

.info-block {
  margin-top: 1.5rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 28px;
  border: 1px solid rgba(214, 51, 132, 0.12);
  padding: 1.75rem;
}

.info-block-item {
  margin-bottom: 1rem;
  color: var(--text);
}

.skill-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-image {
  width: 100%;
  height: 180px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 214, 236, 0.9), rgba(214, 51, 132, 0.12));
  margin-bottom: 1rem;
}

.timeline-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(214, 51, 132, 0.14);
  border-radius: 28px;
  padding: 1.5rem;
}

.back-link {
  margin-top: 1.75rem;
}

.education-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.edu-card h3 {
  margin: 0 0 0.75rem;
}

.project-card {
  padding-left: 0;
}

.project-list article,
.timeline-link,
.link-card {
  text-decoration: none;
}

.project-card:hover,
.timeline-link:hover,
.link-card:hover {
  transform: translateY(-4px);
}

.project-card span {
  margin-top: 0.2rem;
}

.project-card h3 {
  margin-bottom: 0.4rem;
}

.project-card p {
  color: var(--muted);
}

.project-card {
  border-left: 3px solid var(--accent);
  background: rgba(255, 255, 255, 0.98);
}


.project-list {
  display: grid;
  gap: 1rem;
}

.project-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1rem;
  border-left: 3px solid var(--accent);
  background: rgba(255, 255, 255, 0.98);
}

.project-image.project-image-small {
  width: 70px;
  height: 70px;
  min-width: 70px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(214, 51, 132, 0.16), rgba(255, 214, 236, 0.4));
  border: 1px solid rgba(214, 51, 132, 0.14);
}

.project-card h3 {
  margin: 0 0 0.4rem;
}

.project-card p {
  margin: 0;
  color: var(--muted);
}

.link-card {
  display: block;
  text-decoration: none;
  color: inherit;
}

.detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(43, 12, 44, 0.82);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 1000;
}

.detail-overlay.visible {
  display: flex;
}

.detail-panel {
  width: min(980px, 100%);
  max-height: min(90vh, 900px);
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.99);
  border-radius: 32px;
  padding: 2rem;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.18);
  position: relative;
}

.close-button {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid rgba(214, 51, 132, 0.18);
  background: rgba(255, 255, 255, 0.95);
  color: var(--accent);
  font-size: 1.5rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.detail-row {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.detail-row-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-mini-card {
  background: rgba(255, 214, 236, 0.12);
  border: 1px solid rgba(214, 51, 132, 0.14);
  border-radius: 24px;
  padding: 1rem;
}

.detail-mini-card strong {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.detail-mini-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.detail-panel h2 {
  margin-top: 0;
}

.detail-panel p {
  margin: 0.85rem 0;
  color: var(--muted);
  line-height: 1.7;
}

.detail-panel ul {
  margin: 0.8rem 0 0 1.2rem;
  padding: 0;
  color: var(--text);
}

.detail-panel li {
  margin-bottom: 0.55rem;
}

.project-image.small {
  height: 140px;
}

.animate-fade {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeInUp 0.9s ease forwards;
}

.delay-1 {
  animation-delay: 0.1s;
}

.delay-2 {
  animation-delay: 0.2s;
}

.delay-3 {
  animation-delay: 0.3s;
}

.delay-4 {
  animation-delay: 0.4s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .wrapper {
    grid-template-columns: 1fr;
  }

  .research-grid {
    grid-template-columns: 1fr;
  }

  .education-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Experience Vertical Timeline */
.experience-timeline {
  margin-top: 1.5rem;
}

.timeline-vertical {
  display: grid;
  gap: 2rem;
  position: relative;
  padding: 0 0 0 3rem;
}

.timeline-vertical::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  border-radius: 2px;
}

.timeline-card-vertical {
  position: relative;
  display: grid;
  gap: 0.85rem;
}

.timeline-bar {
  position: absolute;
  left: -1.62rem;
  top: 0.5rem;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 3px solid white;
  box-shadow: 0 0 0 3px var(--accent);
}

.timeline-content h3 {
  margin: 0;
  font-size: 1.1rem;
}

.timeline-content p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

/* Education Frame & Columns */
.education-frame {
  background: var(--surface);
  border-radius: 32px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 2rem;
  margin-top: 1.5rem;
}

.education-frame h2 {
  margin: 0 0 1.75rem;
  font-size: 1.3rem;
  color: var(--text);
}

.education-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}

.education-column {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(214, 51, 132, 0.14);
  border-radius: 28px;
  padding: 1.5rem;
  display: grid;
  gap: 0.85rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.education-column:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(214, 51, 132, 0.12);
  border-color: rgba(214, 51, 132, 0.28);
}

.column-year {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
}

.education-column h3 {
  margin: 0.5rem 0 0;
  font-size: 1rem;
}

.education-column p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.more-link {
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.more-link:hover {
  background: rgba(214, 51, 132, 0.2);
  transform: translateX(4px);
}

.detail-content-full {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 2rem;
  align-items: start;
}

.detail-content-full article {
  display: grid;
  gap: 1rem;
}

.detail-content-full h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text);
}

.detail-content-full ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.6rem;
}

.detail-content-full li {
  color: var(--text);
  font-size: 0.9rem;
}

@media (max-width: 820px) {
  .detail-content-full {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .wrapper {
    padding: 1.5rem 1rem 2rem;
  }

  .profile-card,
  .info-card,
  .about-section,
  .experience-section,
  .research-section,
  .education-section,
  .projects-section {
    padding: 1.5rem;
  }

  .software-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .education-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timeline-vertical {
    padding: 0 0 0 2.5rem;
  }

  .timeline-bar {
    left: -1.4rem;
  }
}

@media (max-width: 620px) {
  .profile-card,
  .info-card,
  .about-section,
  .experience-section,
  .research-section,
  .education-section,
  .projects-section {
    border-radius: 24px;
  }

  .section-title {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-image {
    min-height: 280px;
  }

  .education-columns {
    grid-template-columns: 1fr;
  }
}
