@import url('https://fonts.googleapis.com/css2?family=Boogaloo&family=Nunito:wght@400;700;900&family=Space+Mono:wght@400;700&display=swap');

:root {
  --yellow: #FFD600;
  --red: #FF3D57;
  --blue: #1A73E8;
  --green: #00C853;
  --orange: #FF6D00;
  --purple: #7C4DFF;
  --pink: #FF4081;
  --dark: #1a1a2e;
  --white: #FFFDF0;
  --card-bg: #ffffff;
  --shadow: 4px 4px 0px #1a1a2e;
  --shadow-lg: 6px 6px 0px #1a1a2e;
  --border: 3px solid #1a1a2e;
  --radius: 16px;
}

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

html, body {
  width: 100%;
  min-height: 100vh;
  font-family: 'Nunito', sans-serif;
  background: var(--white);
  color: var(--dark);
  overflow-x: hidden;
}

/* ========== NOISE TEXTURE OVERLAY ========== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

/* ========== BUTTONS ========== */
.btn {
  font-family: 'Boogaloo', cursive;
  font-size: 1.2rem;
  letter-spacing: 1px;
  padding: 14px 32px;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.1s ease;
  text-decoration: none;
  display: inline-block;
  position: relative;
  background: var(--yellow);
  color: var(--dark);
}
.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px #1a1a2e;
}
.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px #1a1a2e;
}
.btn-blue { background: var(--blue); color: white; }
.btn-red { background: var(--red); color: white; }
.btn-green { background: var(--green); color: white; }
.btn-purple { background: var(--purple); color: white; }
.btn-orange { background: var(--orange); color: white; }

/* ========== POPUP OVERLAY ========== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 46, 0.7);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}
.overlay.hidden {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.popup-card {
  background: var(--white);
  border: var(--border);
  border-width: 3px;
  border-radius: 24px;
  box-shadow: 8px 8px 0px #1a1a2e;
  padding: 40px 36px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

@keyframes popIn {
  from { transform: scale(0.7) rotate(-3deg); opacity: 0; }
  to { transform: scale(1) rotate(0deg); opacity: 1; }
}

.popup-card .accent-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 8px;
  background: linear-gradient(90deg, var(--yellow), var(--red), var(--blue), var(--green));
}

.popup-card h2 {
  font-family: 'Boogaloo', cursive;
  font-size: 2rem;
  margin: 12px 0 8px;
  line-height: 1.1;
}

.popup-card p {
  font-size: 1rem;
  line-height: 1.6;
  color: #444;
  margin-bottom: 8px;
}

.popup-emoji {
  font-size: 3rem;
  margin-bottom: 4px;
  display: block;
}

/* ========== PROGRESS DOTS ========== */
.progress-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 20px 0 8px;
}
.progress-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid var(--dark);
  background: var(--white);
  transition: all 0.3s ease;
}
.progress-dot.done { background: var(--green); }
.progress-dot.active { background: var(--yellow); transform: scale(1.3); }
.progress-line {
  width: 32px; height: 3px;
  background: var(--dark);
  opacity: 0.2;
}

/* ========== GAME HEADER ========== */
.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 3px solid var(--dark);
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
}
.game-header .logo {
  font-family: 'Boogaloo', cursive;
  font-size: 1.3rem;
  color: var(--dark);
  text-decoration: none;
}
.game-header .logo span {
  display: inline-block;
  background: var(--yellow);
  border: 2px solid var(--dark);
  border-radius: 8px;
  padding: 2px 8px;
  margin-right: 4px;
}
.game-title-header {
  font-family: 'Boogaloo', cursive;
  font-size: 1.1rem;
  background: var(--blue);
  color: white;
  border: 2px solid var(--dark);
  border-radius: 10px;
  padding: 4px 14px;
}

/* ========== GAME CONTAINER ========== */
.game-area {
  max-width: 700px;
  margin: 0 auto;
  padding: 24px 16px;
}

/* ========== SCORE / INFO CHIPS ========== */
.info-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  justify-content: center;
}
.chip {
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 16px;
  border: 2px solid var(--dark);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--dark);
  background: var(--white);
}
.chip-yellow { background: var(--yellow); }
.chip-blue { background: var(--blue); color: white; }
.chip-green { background: var(--green); }
.chip-red { background: var(--red); color: white; }

/* ========== FACT CARD ========== */
.fact-card {
  background: var(--yellow);
  border: var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 28px 24px;
  margin: 16px 0;
  text-align: left;
  position: relative;
  overflow: hidden;
}
.fact-card::before {
  content: '✦';
  position: absolute;
  top: -10px; right: 10px;
  font-size: 5rem;
  opacity: 0.08;
}
.fact-card h3 {
  font-family: 'Boogaloo', cursive;
  font-size: 1.5rem;
  margin-bottom: 8px;
}
.fact-card p {
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ========== CONFETTI ========== */
.confetti-piece {
  position: fixed;
  width: 12px; height: 12px;
  border-radius: 2px;
  animation: confettiFall linear forwards;
  pointer-events: none;
  z-index: 9998;
}
@keyframes confettiFall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 600px) {
  .popup-card { padding: 28px 20px; }
  .popup-card h2 { font-size: 1.5rem; }
  .game-header { padding: 12px 16px; }
  .game-area { padding: 16px 12px; }
  .btn { font-size: 1rem; padding: 12px 24px; }
}

/* ========== PORTFOLIO SECTIONS (ACHIEVEMENTS & EXP) ========== */
.portfolio-section {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 800px;
  margin: 0 auto 60px;
  padding: 0 16px;
}

.section-title {
  font-family: 'Boogaloo', cursive;
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 32px;
  color: var(--dark);
  text-shadow: 2px 2px 0px var(--yellow);
}

/* --- Achievements Grid --- */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.achieve-card {
  background: var(--white);
  border: 3px solid var(--dark);
  border-radius: 20px;
  padding: 24px 20px;
  box-shadow: 6px 6px 0 var(--dark);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.achieve-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 8px 8px 0 var(--dark);
}

.achieve-card h3 {
  font-family: 'Boogaloo', cursive;
  font-size: 1.3rem;
  margin: 12px 0 8px;
  color: var(--dark);
}

.achieve-card p {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.5;
}

.achieve-badge {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  border: 2px solid var(--dark);
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: bold;
  box-shadow: 2px 2px 0 var(--dark);
}

/* --- Experience List --- */
.exp-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.exp-item {
  display: flex;
  gap: 20px;
  background: var(--card-bg);
  border: 3px solid var(--dark);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 6px 6px 0 var(--dark);
  transition: transform 0.2s ease;
}

.exp-item:hover {
  transform: translateX(5px);
}

.exp-year {
  flex-shrink: 0;
  background: var(--blue);
  color: white;
  font-family: 'Boogaloo', cursive;
  font-size: 1.2rem;
  padding: 8px 16px;
  border: 3px solid var(--dark);
  border-radius: 12px;
  height: fit-content;
  transform: rotate(-3deg);
  box-shadow: 3px 3px 0 var(--dark);
}

.exp-content h3 {
  font-family: 'Boogaloo', cursive;
  font-size: 1.4rem;
  margin-bottom: 4px;
  color: var(--dark);
}

.exp-content h4 {
  font-size: 1rem;
  color: var(--dark);
  margin-bottom: 12px;
  font-weight: 800;
  opacity: 0.8;
}

.exp-content p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #444;
}

/* ========== FOOTER / CONTACT ========== */
.site-footer {
  background: var(--dark);
  color: var(--white);
  text-align: center;
  padding: 60px 20px 40px;
  margin-top: 80px;
  border-top: 5px solid var(--dark);
  position: relative;
  z-index: 10;
}

.contact-title {
  font-family: 'Boogaloo', cursive;
  font-size: 2.5rem;
  margin-bottom: 8px;
  color: var(--yellow);
}

.contact-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.contact-btn {
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--dark);
  background: var(--white);
  padding: 12px 24px;
  border: 3px solid var(--dark);
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 4px 4px 0 var(--yellow);
  transition: all 0.15s ease;
}

.contact-btn:hover {
  transform: translate(-3px, -3px);
  box-shadow: 7px 7px 0 var(--red);
}

.contact-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--yellow);
}

/* --- Responsive Adjustments --- */
@media (max-width: 600px) {
  .exp-item {
    flex-direction: column;
    gap: 12px;
    padding: 20px;
  }
  .exp-year {
    align-self: flex-start;
    transform: rotate(0);
  }
}