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

body {
  font-family: Arial, sans-serif;
  color: #293651;
  background: #fff;
}

/* IMPORTANT: don’t apply negative margins to ALL images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== Layout ===== */
.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.section {
  padding: 0;
}

.section-title {
  font-size: 32px;
  margin-bottom: 12px;
}

.section-text {
  color: #646f87;
  line-height: 1.5;
}

/* ===== Header / Hero ===== */
.site-header {
  position: relative;
  background: #f9f9f9;
  overflow: hidden;
  padding: 0;
}

.header-bg {
  position: absolute;
  top: 0;
  right: calc((100vw - min(1100px, 92vw)) / 2);
  width: 600px;
  height: 100%;
  background: #1600a7;
  z-index: 0;
  clip-path: polygon(12% 0, 100% 0, 100% 100%, 0 100%);
}

.header-bg::before {
  content: "";
  position: absolute;
  top: 0;
  left: -120px;
  width: 140px;
  height: 100%;
  background: #1600a7;
  transform: skewX(40deg);
  transform-origin: right center;
}

.header-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 120px;
  padding: 0;
}

.brand {
  display: flex;
  align-items: center;
  line-height: 0;
}

/* Header logo ONLY */
header .brand-logo {
  height: 220px;
  width: auto;
  transform: translateX(-80px);
}

/* nav */
.nav {
  display: flex;
  gap: 18px;
  margin-right: 30px;
}

.nav a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
}

.nav a:hover {
  text-decoration: underline;
}

/* ===== Mouse Mascot ===== */
.mouse-mascot {
  width: 40px;
  height: 40px;
  pointer-events: none;
}

.mouse-head {
  width: 100%;
  height: 100%;
  background: #1600a7;
  border-radius: 999px;
  display: grid;
  place-items: center;
}

.mouse-eyes {
  display: flex;
  gap: 3px;
}

.mouse-eye {
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 999px;
  position: relative;
  overflow: hidden;
}

.mouse-pupil {
  width: 7px;
  height: 7px;
  background: #000;
  border-radius: 999px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: transform 120ms ease-out;
}

.work-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* ===========================
   ABOUT + SKILLS
=========================== */
.about_area {
  background-color: #ffffff;
  margin-top: -45px;
}

.about_area .about_skills {
  padding-top: 2px !important; /*To reduce space between Why You Hire Me and Skills sections*/
}

.about_area .about_skills .skill_item:first-child {
  margin-top: 2px !important; /*To reduce space between Why You Hire Me and Skills sections*/
}

.skill_item .skill_header {
  position: relative;
}
.skill_item .skill_header .skill_title {
  font-size: 14px;
  font-weight: 500;
}
.skill_item .skill_header .skill_percentage {
  position: absolute;
  top: -3px;
  right: 0;
}
.skill_item .skill_header .skill_percentage p {
  font-size: 14px;
  font-weight: 400;
}
.skill_item .skill_bar {
  margin-top: 15px;
}
.skill_item .skill_bar .bar_inner {
  background: #eef0f2;
  height: 8px;
  border-radius: 6px;
  overflow: hidden;
}
.skill_item .skill_bar .bar_inner .progress_line {
  width: 0%;
  height: 100%;
  background: var(--primary, #007bff);
  border-radius: 6px;
  transition: width 1s ease;
  will-change: width;
}

/* 06. PORTFOLIO */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 15px;
  margin-bottom: 0px;
}

@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.card {
  border: 0;
  padding: 0;
  background: #fff;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s ease;
}

.card:hover {
  transform: translateY(-1px);
}

.card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
/* Inline carousel inside the portfolio card */
.portfolio-carousel {
  position: relative;
}

.portfolio-carousel .carousel-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

/* arrows */
.portfolio-carousel .carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  cursor: pointer;
  font-size: 28px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  z-index: 2;
}

.portfolio-carousel .carousel-arrow.left {
  left: 10px;
}

.portfolio-carousel .carousel-arrow.right {
  right: 10px;
}

.portfolio-carousel .carousel-arrow:hover {
  background: rgba(0, 0, 0, 0.8);
}

/* Hide arrows automatically when only 1 image */
.portfolio-carousel[data-count="1"] .carousel-arrow {
  display: none;
}

/* ===== Mario Visit Section ===== */
.visit-section {
  padding: 10px 0;
}

.mario-visit {
  display: grid;
  gap: 16px;
  align-items: center;
}

.mario-scene {
  position: relative;
  height: 160px;
  border-radius: 12px;
  overflow: hidden;
  background: #eaf3ff;
  border: 1px solid #e6e8ee;
}

.ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 36px;
  background: #2e7d32;
}

.block {
  position: absolute;
  top: 20px;
  left: 50%;
  width: 30px;
  height: 30px;
  transform: translateX(-50%);
}

.coin {
  position: absolute;
  left: 50%;
  top: 14px;
  width: 10px;
  height: auto;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
}

.mario {
  position: absolute;
  left: 50.3%;
  bottom: 36px;
  width: 60px;
  height: auto;
  transform: translateX(-50%);
}

.visit-ui {
  display: grid;
  gap: 6px;
}

.visit-btn {
  width: fit-content;
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  background: #1600a7;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.visit-btn:active {
  transform: translateY(1px);
}

.visit-count {
  font-weight: 700;
  padding-left: 5px;
  color: #293651;
}

/* animations */
@keyframes marioJump {
  0% {
    transform: translateX(-50%) translateY(0);
  }
  45% {
    transform: translateX(-50%) translateY(-25px);
  }
  100% {
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes blockBump {
  0% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-8px);
  }
  100% {
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes coinPop {
  0% {
    transform: translateX(-50%) translateY(14px) scale(1);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  60% {
    transform: translateX(-50%) translateY(-28px) scale(1.05);
    opacity: 1;
  }
  100% {
    transform: translateX(-50%) translateY(-48px) scale(0.95);
    opacity: 0;
  }
}

.mario.jump {
  animation: marioJump 520ms ease-out;
}
.block.bump {
  animation: blockBump 260ms ease-out;
}
.coin.pop {
  animation: coinPop 520ms ease-out;
}

/* ===== Footer ===== */
.site-footer {
  padding: 10px 0;
  background: #f3f4f7;
}

.footer-inner {
  display: grid;
  gap: 0;
  justify-items: center;
}

/* Footer logo ONLY (so header scaling never affects it) */
.site-footer .brand-logo {
  height: 200px;
  width: auto;
  display: block;
  margin-top: -60px;
  margin-bottom: -20px;
  transform: none;
}

.footer-text {
  color: #646f87;
  margin-top: -35px;
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
  .header-bg {
    right: 0;
    width: 65%;
    clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%);
  }

  .about_area .about_image {
    margin-top: 30px !important;
  }

  .about_area .about_content {
    margin-top: 12px !important;
  }

  .about_area .about_skills {
    padding-top: 45px !important;
  }

  #work {
    margin-top: 32px;
  }

  .header-inner {
    height: 120px;
    padding: 10px 12px;
    gap: 10px;
  }

  /* header logo: bigger visually without affecting layout */
  header .brand-logo {
    height: 110px;
    margin-left: -60px;
    transform: scale(1.85);
    transform-origin: left center;
  }

  .nav {
    flex: 1 1 auto;
    margin-left: auto;
    margin-right: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
  }

  .nav a {
    font-size: 13px;
    white-space: nowrap;
  }

  /* footer: hard center on mobile */
  .site-footer .brand-logo {
    margin-left: auto;
    margin-right: auto;
    height: 180px;
    justify-self: center;
    transform: none;
  }
}

@media (max-width: 420px) {
  header .brand-logo {
    height: 100px;
    margin-left: -60px;
    transform: scale(1.8);
    transform-origin: left center;
  }

  .nav {
    gap: 8px;
  }

  .nav a {
    font-size: 13px;
  }

  .site-footer .brand-logo {
    height: 160px;
  }
}

.card-wrap {
  display: grid;
  gap: 10px;
}

.visit-link {
  text-align: center;
  padding: 5px 7px;
  border-radius: 10px;
  background: #1600a7;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  width: 100%;
}

.visit-link:hover {
  opacity: 0.9;
}

.visit-link.is-disabled {
  color: rgb(189, 185, 185);
  cursor: not-allowed;
  pointer-events: none;
}

.card-wrap_2 {
  display: grid;
  gap: 10px;
}
