/* RESET & BASE */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: repeating-linear-gradient(90deg, #dbeafe 0 20px, #bfdbfe 20px 40px),
              repeating-linear-gradient(0deg, #dbeafe 0 20px, #bfdbfe 20px 40px);
  background-blend-mode: overlay;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-align: center;
  padding: 40px 20px 20px;
}

.content {
  position: relative;
  z-index: 2;
  background-color: rgba(255, 255, 255, 0.7);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  max-width: 70vw;
  min-width: 320px;
  overflow: hidden;
}
/* Đường chỉ */
.content::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  border-radius: 10px;
  pointer-events: none;
  background-image: 
    repeating-linear-gradient(to right, 
      transparent 0 5px, #f27b84 5px 25px, transparent 25px 32px),
    repeating-linear-gradient(to bottom, 
      transparent 0 5px, #f27b84 5px 25px, transparent 25px 32px),
    repeating-linear-gradient(to left, 
      transparent 0 5px, #f27b84 5px 25px, transparent 25px 32px),
    repeating-linear-gradient(to top, 
      transparent 0 5px, #f27b84 5px 25px, transparent 25px 32px);
  background-repeat: no-repeat;
  background-position: 
    top left, top right, bottom right, bottom left;
  background-size: 
    calc(100% - 25px) 6px,    /* top */
    6px calc(100% - 25px),    /* right */
    calc(100% - 25px) 6px,    /* bottom */
    6px calc(100% - 25px);    /* left */
  transform: rotateZ(-0.1deg);
  filter: drop-shadow(0 0 0.7px rgba(0, 0, 0, 0.5));
}

/* Nút chế độ sáng tối */
.theme-toggle {
  position: fixed;
  top: 10rem;
  right: 5rem;
  background: none;
  border: none;
  font-size: 3.5rem;
  cursor: pointer;
  z-index: 99;
  color: #fbc944; /* Màu biểu tượng ở chế độ sáng */
  transition: transform 0.3s ease, color 0.3s ease;
}
body.dark-mode .theme-toggle {
  color: #fffae0;
}
.theme-toggle:hover {
  transform: scale(1.2);
  color: #ec591e;
}
body.dark-mode .theme-toggle:hover {
  color: #f8c900;
}
.theme-hint { /* Gợi ý bên cạnh nút chế độ */
  font-family: 'Oswald', sans-serif;
  position: fixed;
  top: 10rem;
  right: calc(5rem + 60px); /* cách nút toggle một đoạn */
  font-size: 1rem;
  color: #0c2f4d;
  opacity: 0.5;
  background: rgba(255, 255, 255, 0.6);
  padding: 6px 12px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  z-index: 98;
  transition: opacity 0.4s ease;
  pointer-events: none;
  white-space: nowrap;
}
body.dark-mode .theme-hint {
  color: #f8c365;
  background: rgba(15, 23, 42, 0.6);
}
.theme-hint.hidden {
  opacity: 0;/* Ẩn khi cuộn */
}
#themeHint {
  transition: opacity 0.3s ease;
}
#themeHint.hidden {
  opacity: 0;
  pointer-events: none;
}


/* Lung la lung linh */
.gold-sparkles {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
  display: none;
}

#gold-sparkles {
  display: none;
}

.sparkle {
  position: absolute;
  width: 30px;
  height: 30px;
  background-color: #f8c365;
  background-blend-mode: overlay;
  border-radius: 50%;
  opacity: 1;
  animation: floatSparkle linear infinite;
  filter: blur(1px);
}
.sparkle.faint {
  opacity: 0.7;
  filter: blur(1.2px) brightness(1.1);
  transform: scale(0.8);
}

@keyframes floatSparkle {
  0%   { transform: translateY(0) translateX(0); opacity: 0.7; }
  50%  { transform: translateY(-50vh) translateX(10px); }
  100% { transform: translateY(-100vh) translateX(-10px); opacity: 0; }
}

h1 {
  font-size: 2em;
  color: #0c2f4d;
  margin-bottom: 0.4em;
  white-space: nowrap;
  overflow: hidden;
  opacity: 0;
  transform: translateX(50px);
  animation: slideIn 0.8s ease-out forwards;
}

h2 {
  font-size: 1.4em;
  color: #f27b84;
  margin-bottom: 1.2em;
  font-weight: normal;
  opacity: 0;
  transform: translateX(-50px);
  animation: slideIn 0.8s ease-out forwards;
  animation-delay: 0.3s;
}

h3 {
  font-size: 1.25rem;
  font-weight: bold;
  color: #0c2f4d;
  margin-top: 60px;
  margin-bottom: 30px;
  line-height: 1.4;
  text-align: left;
  animation: slideIn 0.8s ease-out forwards;
}

p {
  font-size: 1em;
  margin: 0.4em 0;
}

.icons {
  margin-top: 1em;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  animation: slideIn 0.8s ease-out forwards;
}

.icons a {
  color: #0c2f4d;
  font-size: 2.5em;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.icons a:hover {
  transform: scale(1.2);
  color: #f27b84;
}

.portfolio-label {
  font-size: 1.5em;
  margin-top: 10px;
  margin-bottom: 15px;
  color: #0c2f4d;
  letter-spacing: 0.5px;
}

.images {
  transition: margin-top 0.3s ease;
  margin-top: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}

.images img {
  width: 100%;
  max-width: 900px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  cursor: pointer;
}

.PunkgaMerch {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  padding-left: 10px;
}

.PunkgaMerch h3 {
  margin-top: 60px;
}

.PunkgaMerch img {
  width: 100%;
  max-width: 900px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  cursor: pointer;
  position: relative;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.PunkgaMerch img:nth-of-type(1) {
  z-index: 5;
  margin-top: 0;
}

.PunkgaMerch img:nth-of-type(2) {
  z-index: 4;
  margin-top: -240px;
}

.PunkgaMerch img:nth-of-type(3) {
  z-index: 3;
  margin-top: -240px;
}

.PunkgaMerch img:hover {
  transform: scale(1.03);
  filter: brightness(1.05);
  z-index: 6;
}

.upz {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  padding-left: 10px;
}

.upz h3 {
  margin-top: 60px;
}


.upz-wrapper {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}

.upz-main, .upz-hover {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  cursor: pointer;
}

.upz-hover {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
  pointer-events: none;
  z-index: 5;
}

.upz-wrapper:hover .upz-hover {
  opacity: 1;
  pointer-events: auto;
}

.awards, .music-section {
  margin-top: 2em;
  text-align: left;
}

.award-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  background: rgba(255,255,255,0.6);
  padding: 10px 15px;
  border-radius: 8px;
}

.award-item span {
  font-weight: 500;
}

.award-item button {
  background-color: #0c2f4d;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.5em;
  transition: background-color 0.2s ease;
}

.award-item button:hover {
  transform: scale(1.1);  
  background-color: #f27b84;
}

.videos {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 20px;
}

iframe {
  width: 100%;
  height: 400px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.floating-icons {
  position: fixed;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-size: 32px;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.floating-icons.visible {
  opacity: 1;
  pointer-events: auto;
}

.floating-icons a {
  color: #0c2f4d;
  transition: transform 0.2s ease, color 0.2s ease;
}

.floating-icons a:hover {
  transform: scale(1.3);
  color: #f27b84;
}

.gmail-icon {
  position: relative;
}

.copy-note {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: #f8c365;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  white-space: nowrap;
  margin-top: 4px;
}

.gmail-icon.show-note .copy-note {
  opacity: 1;
}

.comic-viewer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  overflow: hidden;
}

.comic-blur-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(10px);
  z-index: 0;
}

.comic-deck {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.comic-deck img {
  position: absolute;
  height: 100%;
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  transition: transform 0.5s ease-in-out, filter 0.6s ease-in-out, opacity 0.6s ease-in-out;
  transition-delay: 0.05s;
  border-radius: 8px;
}

.comic-deck img.active {
  transform: scale(1) translateX(0);
  filter: brightness(1) contrast(1);
  z-index: 2;
}

.comic-deck img.left {
  transform: scale(0.85) translateX(-696px) rotateY(5deg);
  filter: brightness(0.6) contrast(0.8);
  z-index: 1;
}

.comic-deck img.right {
  transform: scale(0.85) translateX(696px) rotateY(-5deg);
  filter: brightness(0.6) contrast(0.8);
  z-index: 1;
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2em;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  z-index: 10;
  transition: transform 0.2s ease;
}

.close-btn:hover {
  transform: scale(1.2);
}

@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ✅ RESPONSIVE - MOBILE FIRST */
@media (max-width: 768px) {
  body {
    padding: 20px 10px;
  }
  
  .theme-toggle {
    top: 0.5rem;
    right: 0.5rem;
    font-size: 1.25rem;
  } 
  #themeHint {
    display: none !important;
  }

  .content {
    padding: 20px;
    max-width: 75vw;
  }

  h1 { font-size: 1.2em; }
  h2 { font-size: 1em; }
  h3 { font-size: 1.1em; text-align: center; }
  p { font-size: 0.95em; }

  .icons a { font-size: 1.3em; }

  .images img,
  .PunkgaMerch img,
  .upz-main,
  .upz-hover {
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .PunkgaMerch img:nth-of-type(2),
  .PunkgaMerch img:nth-of-type(3) {
    margin-top: 20px;
    position: static;
  }

  iframe {
    height: 200px;
  }

  .upz-section h3 {
    text-align: center;
  }

  .floating-icons {
display: flex; /* hoặc block nếu cần */
    position: fixed;
    top: 50%;
    left: 0.5rem;
font-size: 1.3em; 
    transform: translateY(-50%);
    z-index: 1000;
  }

  .award-item button {
    font-size: 0.8em;
    padding: 5px 10px;
  }
    .comic-deck img {
    width: 100%;
    height: auto;
    max-width: 90vw;
    }

}
/* === DARK MODE === */
/* === DARK MODE === */
/* === DARK MODE === */
body.dark-mode {
background:
  linear-gradient(to right, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.9)), /* nền đêm xanh đậm mờ */
  repeating-linear-gradient(90deg, #dbeafe 0 20px, #bfdbfe 20px 40px),
  repeating-linear-gradient(0deg, #dbeafe 0 20px, #bfdbfe 20px 40px);
background-blend-mode: multiply;
  color: #e2e8f0; /* màu chữ sáng */
}
/* Khi dark-mode: hiển thị lại */
body.dark-mode #gold-sparkles {
  display: block;
}

/* content box */
body.dark-mode .content {
  background-color: rgba(15, 23, 42, 0.85); /* xanh đen mờ */
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* Đường chỉ phát sáng hồng cam */
body.dark-mode .content::before {
  background-image: 
    repeating-linear-gradient(to right, transparent 0 5px, #f8c365 5px 25px, transparent 25px 32px),
    repeating-linear-gradient(to bottom, transparent 0 5px, #f8c365 5px 25px, transparent 25px 32px),
    repeating-linear-gradient(to left, transparent 0 5px, #f8c365 5px 25px, transparent 25px 32px),
    repeating-linear-gradient(to top, transparent 0 5px, #f8c365 5px 25px, transparent 25px 32px);
  filter: drop-shadow(0 0 0.7px rgba(255, 255, 255, 0.5));
}

/* Heading */
body.dark-mode h1,
body.dark-mode h3,
body.dark-mode .portfolio-label {
  color: #f8fafc;
}

body.dark-mode h2 {
  color: #f8c365;
}

/* Link icons */
body.dark-mode .icons a,
body.dark-mode .floating-icons a {
  color: #e2e8f0;
}

body.dark-mode .icons a:hover,
body.dark-mode .floating-icons a:hover {
  color: #f8c365;
}

/* Award box */
body.dark-mode .award-item {
  background-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .award-item button {
  background-color: #f8c365;
  color: #1e293b;
}

body.dark-mode .award-item button:hover {
  background-color: #fb923c;
}

/* Nút toggle đã có màu riêng – không cần sửa lại */

/* Ảnh và hover */
body.dark-mode .images img,
body.dark-mode .PunkgaMerch img,
body.dark-mode .upz-main,
body.dark-mode .upz-hover {
  box-shadow: 0 4px 10px rgba(255, 255, 255, 0.05);
}

/* Gmail note */
body.dark-mode .copy-note {
  color: #f8c365;
}

/* Comic viewer nền */
body.dark-mode .comic-viewer {
  background: rgba(0, 0, 0, 0.95);
}
