/* ===== IMMERSIVE PIRATE QUEST PORTFOLIO ===== */

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

:root {
  --wood-light: #d2691e;
  --wood-dark: #8b4513;
  --wood-medium: #a0522d;
  --brass: #b8860b;
  --brass-dark: #996f00;
  --ocean-blue: #1e3a8a;
  --ocean-light: #4a90e2;
  --ocean-dark: #0f172a;
  --gold: #ffd700;
  --parchment: #f5e9c9;
  --rope: #8b7355;
  --blood-red: #8b0000;
  --emerald: #50c878;
  --transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ===== MAGICAL OCEAN BACKGROUND ===== */
body {
  font-family: "IM Fell English", serif;
  background: 
        /* Gentle bubbles only */ radial-gradient(
      circle at 20% 30%,
      rgba(255, 255, 255, 0.1) 1px,
      transparent 2px
    ),
    radial-gradient(
      circle at 70% 20%,
      rgba(255, 255, 255, 0.08) 1px,
      transparent 2px
    ),
    radial-gradient(
      circle at 30% 80%,
      rgba(255, 255, 255, 0.06) 1px,
      transparent 2px
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(255, 255, 255, 0.09) 1px,
      transparent 2px
    ),
    /* Deep ocean gradient */
      linear-gradient(
        135deg,
        #2c5aa0 0%,
        #1e3a8a 25%,
        #0f172a 50%,
        #1a237e 75%,
        #2c5aa0 100%
      );
  background-size: 300px 300px, 400px 400px, 250px 250px, 350px 350px, cover;
  animation: gentleBubbles 25s ease-in-out infinite;
  color: #f5e9c9;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

@keyframes gentleBubbles {
  0%,
  100% {
    background-position: 0 0, 100px 0, 200px 0, 300px 0, 0 0;
  }
  50% {
    background-position: 0 -800px, 100px -600px, 200px -900px, 300px -700px, 0 0;
  }
}

/* ===== INNOVATIVE MOBILE-FIRST NAVIGATION ===== */
.quest-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(
    135deg,
    rgba(139, 69, 19, 0.95) 0%,
    rgba(160, 82, 45, 0.9) 50%,
    rgba(139, 69, 19, 0.95) 100%
  );
  backdrop-filter: blur(10px);
  border-bottom: 4px solid var(--brass);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.back-treasure {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1.5rem;
  background: linear-gradient(145deg, var(--brass), var(--gold), var(--brass));
  color: var(--ocean-dark);
  text-decoration: none;
  border-radius: 25px;
  font-family: "MedievalSharp", cursive;
  font-weight: bold;
  font-size: 0.9rem;
  border: 3px solid var(--wood-dark);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4),
    inset 0 2px 8px rgba(255, 255, 255, 0.3);
  transition: var(--transition);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.back-treasure::before {
  content: "⚓";
  font-size: 1.2em;
  animation: anchorSway 3s ease-in-out infinite;
}

@keyframes anchorSway {
  0%,
  100% {
    transform: rotate(-5deg);
  }
  50% {
    transform: rotate(5deg);
  }
}

.back-treasure:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 25px rgba(184, 134, 11, 0.6),
    inset 0 3px 10px rgba(255, 255, 255, 0.4);
}

.quest-title {
  flex: 1;
  text-align: center;
  margin: 0 1rem;
}

.section-emblem {
  width: 50px;
  height: 50px;
  background: radial-gradient(circle, var(--brass) 0%, var(--brass-dark) 70%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--wood-dark);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4),
    inset 0 2px 6px rgba(255, 255, 255, 0.2);
  animation: emblemGlow 4s ease-in-out infinite;
}

@keyframes emblemGlow {
  0%,
  100% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4),
      inset 0 2px 6px rgba(255, 255, 255, 0.2), 0 0 15px rgba(184, 134, 11, 0.3);
  }
  50% {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5),
      inset 0 3px 8px rgba(255, 255, 255, 0.3), 0 0 25px rgba(184, 134, 11, 0.6);
  }
}

.section-emblem::before {
  font-size: 24px;
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
}

/* Emblem icons for each section */
#about .section-emblem::before {
  content: "👑";
}
#education .section-emblem::before {
  content: "📜";
}
#skills .section-emblem::before {
  content: "⚔️";
}
#projects .section-emblem::before {
  content: "💎";
}
#interests .section-emblem::before {
  content: "🧭";
}
#contact .section-emblem::before {
  content: "🍾";
}

.quest-title h1 {
  font-family: "MedievalSharp", cursive;
  font-size: 1.4rem;
  color: var(--gold);
  text-shadow: 2px 2px 0px var(--wood-dark), 4px 4px 8px rgba(0, 0, 0, 0.8);
  letter-spacing: 1px;
  margin: 0;
}

/* ===== REVOLUTIONARY SECTION LAYOUTS ===== */
section {
  display: none;
  min-height: 100vh;
  padding-top: 100px;
  position: relative;
}

section:target {
  display: block !important;
}
#home {
  display: flex;
}

/* Hide home when any section is active */
section:target ~ #home {
  display: none !important;
}

.quest-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
}

/* ===== TREASURE MAP LAYOUT SYSTEM ===== */
.treasure-map {
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 200 200"><rect width="200" height="200" fill="%23f5e9c9" opacity="0.95"/><path d="M0,40 Q50,60 100,40 T200,40 M0,80 Q50,100 100,80 T200,80 M0,120 Q50,140 100,120 T200,120 M0,160 Q50,180 100,160 T200,160" stroke="%238b4513" stroke-width="0.8" opacity="0.4" fill="none"/><circle cx="30" cy="50" r="2" fill="%23654321" opacity="0.6"/><circle cx="170" cy="130" r="1.5" fill="%23654321" opacity="0.5"/><path d="M20,20 Q40,30 60,20 Q80,35 100,25" stroke="%23654321" stroke-width="0.5" opacity="0.4" fill="none"/></svg>'),
    linear-gradient(
      145deg,
      rgba(245, 233, 201, 0.98) 0%,
      rgba(235, 220, 180, 0.95) 30%,
      rgba(225, 210, 170, 0.97) 70%,
      rgba(215, 200, 160, 0.92) 100%
    );
  border-radius: 20px;
  border: 6px solid var(--wood-dark);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 10px 30px rgba(139, 69, 19, 0.4),
    inset 0 4px 15px rgba(139, 105, 20, 0.3),
    inset 0 -4px 15px rgba(101, 67, 33, 0.2);
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
  transform: perspective(1000px) rotateX(2deg);
}

.treasure-map::before {
  content: "";
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  background: linear-gradient(45deg, var(--brass), var(--gold), var(--brass));
  border-radius: 25px;
  z-index: -1;
  animation: treasureShimmer 6s ease-in-out infinite;
}

@keyframes treasureShimmer {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 0.9;
  }
}

/* ===== QUEST CONTENT STYLES ===== */
.quest-content {
  padding: 3rem 2.5rem;
  color: var(--wood-dark);
  position: relative;
  z-index: 2;
}

.quest-legend {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.quest-legend h2 {
  font-family: "MedievalSharp", cursive;
  font-size: 2.5rem;
  color: var(--wood-dark);
  text-shadow: 2px 2px 0px var(--brass), 4px 4px 8px rgba(0, 0, 0, 0.6);
  margin-bottom: 1rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.quest-legend::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: linear-gradient(
    to right,
    transparent,
    var(--brass),
    var(--gold),
    var(--brass),
    transparent
  );
  border-radius: 2px;
}

/* ===== CREATIVE LAYOUT PATTERNS ===== */

/* ABOUT - CAPTAIN'S PORTRAIT LAYOUT */
.captain-portrait {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 2rem;
}

.portrait-frame {
  width: 280px;
  height: 350px;
  background: linear-gradient(
    145deg,
    var(--wood-dark),
    var(--wood-medium),
    var(--wood-light)
  );
  border-radius: 20px;
  border: 8px solid var(--brass);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5),
    inset 0 4px 12px rgba(255, 255, 255, 0.2);
  transform: perspective(800px) rotateY(-5deg);
}

.portrait-frame::before {
  content: "🥷🏽";
  font-size: 80px;
  filter: drop-shadow(4px 4px 8px rgba(0, 0, 0, 0.6));
}

.captain-story {
  background: rgba(255, 255, 255, 0.6);
  padding: 2rem;
  border-radius: 15px;
  border: 3px solid rgba(139, 105, 20, 0.4);
  box-shadow: inset 0 2px 10px rgba(139, 105, 20, 0.2);
}

.captain-story h3 {
  font-family: "MedievalSharp", cursive;
  font-size: 1.8rem;
  color: var(--wood-dark);
  margin-bottom: 1.5rem;
  text-align: center;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  border-bottom: 3px solid var(--brass);
  padding-bottom: 0.8rem;
}

.captain-story p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  text-align: justify;
  color: var(--ocean-dark);
}

.captain-story p:first-of-type {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--wood-dark);
  border-left: 4px solid var(--brass);
  padding-left: 1rem;
  background: rgba(184, 134, 11, 0.1);
  padding: 1rem;
  border-radius: 8px;
}

.captain-story p:last-of-type {
  font-style: italic;
  border: 2px dashed var(--brass);
  padding: 1rem;
  border-radius: 10px;
  background: rgba(255, 215, 0, 0.1);
}

/* EDUCATION - SCROLL TIMELINE */
.scroll-timeline {
  position: relative;
  padding: 2rem 0;
  max-width: 900px;
  margin: 0 auto;
}

.timeline-scroll {
  position: relative;
  margin: 0 auto;
  max-width: 800px;
}

.timeline-scroll::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 6px;
  background: linear-gradient(
    to bottom,
    var(--brass),
    var(--gold),
    var(--brass)
  );
  margin-left: -3px;
  border-radius: 3px;
  box-shadow: 0 0 15px rgba(184, 134, 11, 0.6);
}

.timeline-quest {
  position: relative;
  margin-bottom: 4rem;
  width: 45%;
}

.timeline-quest:nth-child(odd) {
  float: left;
  text-align: right;
  padding-right: 4rem;
}

.timeline-quest:nth-child(even) {
  float: right;
  text-align: left;
  padding-left: 4rem;
}

.timeline-treasure {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.9),
    rgba(245, 233, 201, 0.8)
  );
  padding: 2rem;
  border-radius: 15px;
  border: 4px solid var(--brass);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3),
    inset 0 2px 8px rgba(139, 105, 20, 0.2);
  position: relative;
  transform: perspective(600px) rotateY(3deg);
}

.timeline-quest:nth-child(even) .timeline-treasure {
  transform: perspective(600px) rotateY(-3deg);
}

.timeline-treasure::before {
  content: "💎";
  position: absolute;
  top: -15px;
  font-size: 30px;
  background: var(--brass);
  padding: 8px;
  border-radius: 50%;
  border: 3px solid var(--wood-dark);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.timeline-quest:nth-child(odd) .timeline-treasure::before {
  right: -50px;
}

.timeline-quest:nth-child(even) .timeline-treasure::before {
  left: -50px;
}

.quest-date {
  font-family: "MedievalSharp", cursive;
  font-size: 1rem;
  color: var(--brass);
  font-weight: bold;
  margin-bottom: 0.8rem;
}

.quest-title-item {
  font-family: "MedievalSharp", cursive;
  font-size: 1.3rem;
  color: var(--wood-dark);
  margin-bottom: 0.5rem;
}

.quest-description {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ocean-dark);
}

/* SKILLS - WEAPON ARSENAL */
.weapon-arsenal {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.weapon-category {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.8),
    rgba(245, 233, 201, 0.9)
  );
  border-radius: 20px;
  border: 4px solid var(--wood-dark);
  padding: 2rem;
  position: relative;
  transform: perspective(800px) rotateX(5deg);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4),
    inset 0 3px 10px rgba(139, 105, 20, 0.2);
}

.weapon-category::before {
  content: attr(data-weapon);
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 40px;
  background: var(--brass);
  padding: 10px;
  border-radius: 50%;
  border: 4px solid var(--wood-dark);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5);
}

.weapon-title {
  font-family: "MedievalSharp", cursive;
  font-size: 1.4rem;
  color: var(--wood-dark);
  text-align: center;
  margin: 1.5rem 0 1rem 0;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.skill-rune {
  display: flex;
  align-items: center;
  margin-bottom: 0.8rem;
  padding: 0.5rem;
  background: rgba(184, 134, 11, 0.1);
  border-radius: 8px;
  border-left: 4px solid var(--brass);
}

.skill-rune::before {
  content: "⚔️";
  margin-right: 0.8rem;
  font-size: 1.2rem;
}

.skill-rune span {
  font-weight: 600;
  color: var(--ocean-dark);
}

/* PROJECTS - TREASURE VAULT */
.treasure-vault {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.treasure-chest {
  background: linear-gradient(145deg, var(--wood-dark), var(--wood-medium));
  border-radius: 20px;
  overflow: hidden;
  border: 6px solid var(--brass);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 5px 20px rgba(184, 134, 11, 0.3);
  position: relative;
  transform: perspective(1000px) rotateY(-3deg);
  transition: var(--transition);
}

.treasure-chest:hover {
  transform: perspective(1000px) rotateY(-3deg) translateY(-10px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6),
    0 10px 30px rgba(184, 134, 11, 0.5);
}

.treasure-lid {
  height: 200px;
  background: linear-gradient(135deg, var(--brass), var(--gold), var(--brass));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.treasure-lid::before {
  font-size: 60px;
  filter: drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.5));
}
#makao::before {
  content: "🏠";
}
#audiophile::before {
  content: "🎧";
}
#acf::before {
  content: "⛪️";
}

.treasure-details {
  padding: 2rem;
  background: var(--parchment);
  color: var(--wood-dark);
}

.treasure-name {
  font-family: "MedievalSharp", cursive;
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--wood-dark);
}

.treasure-story {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  color: var(--ocean-dark);
}

.treasure-links {
  display: flex;
  gap: 1rem;
}

.treasure-link {
  flex: 1;
  padding: 0.8rem;
  background: linear-gradient(145deg, var(--brass), var(--gold));
  color: var(--wood-dark);
  text-decoration: none;
  border-radius: 10px;
  text-align: center;
  font-family: "MedievalSharp", cursive;
  font-weight: bold;
  border: 2px solid var(--wood-dark);
  transition: var(--transition);
}

.treasure-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(184, 134, 11, 0.5);
}

/* INTERESTS - COMPASS ROSE */
.compass-rose {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
  position: relative;
}

.compass-point {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.9),
    rgba(245, 233, 201, 0.8)
  );
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  border: 4px solid var(--brass);
  position: relative;
  transform: perspective(800px) rotateX(5deg);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3),
    inset 0 2px 8px rgba(139, 105, 20, 0.2);
  transition: var(--transition);
}

.compass-point:hover {
  transform: perspective(800px) rotateX(5deg) translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4),
    inset 0 3px 12px rgba(139, 105, 20, 0.3);
}

.compass-icon {
  width: 80px;
  height: 80px;
  background: var(--brass);
  border-radius: 50%;
  margin: 0 auto 1.5rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  border: 4px solid var(--wood-dark);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4),
    inset 0 2px 6px rgba(255, 255, 255, 0.3);
}

.compass-label {
  font-family: "MedievalSharp", cursive;
  font-size: 1.2rem;
  color: var(--wood-dark);
  margin-bottom: 0.8rem;
}

.compass-description {
  font-size: 0.95rem;
  color: var(--ocean-dark);
  line-height: 1.5;
}

/* CONTACT - TREASURE MAP */
.contact-map {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin: 2rem 0;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.message-bottle {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.9),
    rgba(245, 233, 201, 0.8)
  );
  border-radius: 20px;
  padding: 2.5rem;
  border: 4px solid var(--wood-dark);
  position: relative;
  transform: perspective(800px) rotateY(5deg);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4),
    inset 0 3px 10px rgba(139, 105, 20, 0.2);
}

.bottle-label {
  font-family: "MedievalSharp", cursive;
  font-size: 1.4rem;
  color: var(--wood-dark);
  text-align: center;
  margin-bottom: 2rem;
}

.contact-rune {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(184, 134, 11, 0.1);
  border-radius: 10px;
  border-left: 4px solid var(--brass);
}

.contact-rune::before {
  content: attr(data-icon);
  font-size: 24px;
  margin-right: 1rem;
  width: 30px;
  text-align: center;
}

.contact-text {
  font-weight: 600;
  color: var(--ocean-dark);
}

.message-scroll {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.9),
    rgba(245, 233, 201, 0.8)
  );
  border-radius: 20px;
  padding: 2.5rem;
  border: 4px solid var(--wood-dark);
  transform: perspective(800px) rotateY(-5deg);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4),
    inset 0 3px 10px rgba(139, 105, 20, 0.2);
}

.scroll-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.scroll-field {
  position: relative;
}

.scroll-field label {
  font-family: "MedievalSharp", cursive;
  font-weight: bold;
  color: var(--wood-dark);
  margin-bottom: 0.5rem;
  display: block;
}

.scroll-field input,
.scroll-field textarea {
  width: 100%;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.8);
  border: 3px solid var(--brass);
  border-radius: 10px;
  font-family: "IM Fell English", serif;
  font-size: 1rem;
  color: var(--ocean-dark);
  transition: var(--transition);
}

.scroll-field input:focus,
.scroll-field textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 15px rgba(184, 134, 11, 0.4);
}

.send-bottle {
  padding: 1.2rem 2rem;
  background: linear-gradient(145deg, var(--brass), var(--gold), var(--brass));
  color: var(--wood-dark);
  border: 3px solid var(--wood-dark);
  border-radius: 15px;
  font-family: "MedievalSharp", cursive;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.send-bottle:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(184, 134, 11, 0.5);
  background: linear-gradient(145deg, var(--gold), var(--brass), var(--gold));
}

/* ===== SHIP'S WHEEL HOME ===== */
#home {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

/* Portal Entrance */
.wheel-container {
  position: relative;
  width: 400px;
  height: 400px;
  margin: 0 auto;
  z-index: 10;
  animation: portal-pulse 6s ease-in-out infinite;
}

@keyframes portal-pulse {
  0%,
  100% {
    transform: scale(1.05);
  }
  50% {
    transform: scale(1.1);
  }
}

.portal-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      circle at center,
      rgba(30, 58, 138, 0.8) 0%,
      rgba(0, 0, 0, 0.9) 80%,
      transparent 100%
    ),
    repeating-conic-gradient(
      from 0deg at center,
      green 0deg 5deg,
      transparent 5deg 20deg
    );
  border-radius: 50%;
  box-shadow: 0 0 60px rgba(255, 215, 0, 0.7),
    inset 0 0 100px rgba(0, 0, 0, 0.8);
  z-index: 1;
  animation: portal-glow-anim 4s ease-in-out infinite;
}

@keyframes portal-glow-anim {
  0%,
  100% {
    box-shadow: 0 0 60px rgba(255, 215, 0, 0.7),
      inset 0 0 100px rgba(0, 0, 0, 0.8);
  }
  50% {
    box-shadow: 0 0 80px rgba(255, 215, 0, 0.9),
      inset 0 0 120px rgba(0, 0, 0, 0.9);
  }
}

.portal-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 320px;
  height: 320px;
  background: radial-gradient(
    circle at center,
    transparent 45%,
    rgba(0, 0, 0, 0.5) 47%,
    rgba(30, 58, 138, 0.8) 50%,
    rgba(0, 0, 0, 0.5) 53%,
    transparent 55%
  );
  border-radius: 50%;
  z-index: 2;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
  animation: portal-spin 20s linear infinite;
}

@keyframes portal-spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.compass-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  background: radial-gradient(
    circle,
    var(--brass) 0%,
    var(--brass-dark) 60%,
    #ffd700 80%,
    var(--brass-dark) 100%
  );
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px rgba(184, 134, 11, 0.6),
    inset 0 0 20px rgba(0, 0, 0, 0.2), inset 0 0 40px rgba(255, 215, 0, 0.3);
  z-index: 15;
  animation: compass-glow 4s ease-in-out infinite;
  border: 3px solid var(--brass-dark);
  position: relative;
  overflow: hidden;
}

@keyframes compass-glow {
  0%,
  100% {
    box-shadow: 0 0 30px rgba(184, 134, 11, 0.6),
      inset 0 0 20px rgba(0, 0, 0, 0.2), inset 0 0 40px rgba(255, 215, 0, 0.3);
  }
  50% {
    box-shadow: 0 0 50px rgba(184, 134, 11, 0.8),
      inset 0 0 20px rgba(0, 0, 0, 0.2), inset 0 0 40px rgba(255, 215, 0, 0.5);
  }
}

.compass-center::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 20px solid #ff4444;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  animation: compass-needle-spin 12s linear infinite;
  z-index: 3;
}

.compass-center::after {
  content: "JaymmyX";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: "MedievalSharp", cursive;
  font-size: 12px;
  font-weight: bold;
  color: var(--ocean-dark);
  text-shadow: 1px 1px 2px rgba(255, 215, 0, 0.8),
    0 0 5px rgba(255, 215, 0, 0.6);
  letter-spacing: 0.5px;
  z-index: 4;
  text-align: center;
  line-height: 1;
}

@keyframes compass-needle-spin {
  0% {
    transform: translateX(-50%) rotate(0deg);
  }
  100% {
    transform: translateX(-50%) rotate(360deg);
  }
}

.spokes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
}

.spoke {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 160px;
  height: 20px;
  transform-origin: 20px center;
}

.spoke:nth-child(1) {
  transform: translate(-20px, -10px) rotate(0deg);
}
.spoke:nth-child(2) {
  transform: translate(-20px, -10px) rotate(60deg);
}
.spoke:nth-child(3) {
  transform: translate(-20px, -10px) rotate(120deg);
}
.spoke:nth-child(4) {
  transform: translate(-20px, -10px) rotate(180deg);
}
.spoke:nth-child(5) {
  transform: translate(-20px, -10px) rotate(240deg);
}
.spoke:nth-child(6) {
  transform: translate(-20px, -10px) rotate(300deg);
}

.spoke-handle {
  display: block;
  position: absolute;
  left: 80px;
  top: 50%;
  transform: translateY(-50%);
  width: 80px;
  height: 16px;
  background: linear-gradient(
    45deg,
    var(--wood-light) 0%,
    var(--wood-medium) 25%,
    var(--wood-dark) 50%,
    var(--wood-medium) 75%,
    var(--wood-light) 100%
  );
  border-radius: 8px;
  text-decoration: none;
  color: #f8fafc;
  font-weight: 600;
  font-size: 11px;
  text-align: center;
  line-height: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 2px rgba(255, 255, 255, 0.2),
    inset 0 -1px 2px rgba(0, 0, 0, 0.3);
  transition: var(--transition);
  border: 1px solid var(--wood-dark);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  font-family: "MedievalSharp", cursive;
}

.spoke-handle:hover {
  background: linear-gradient(
    45deg,
    #ffd700 0%,
    var(--brass) 25%,
    var(--brass-dark) 50%,
    var(--brass) 75%,
    #ffd700 100%
  );
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 16px rgba(255, 215, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 2px rgba(255, 255, 255, 0.3),
    inset 0 -1px 2px rgba(0, 0, 0, 0.2);
  color: var(--ocean-dark);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

/* Counter-rotate text to keep it readable */
.spoke:nth-child(1) .spoke-handle {
  transform: translateY(-50%) rotate(0deg);
}
.spoke:nth-child(2) .spoke-handle {
  transform: translateY(-50%) rotate(-60deg);
}
.spoke:nth-child(3) .spoke-handle {
  transform: translateY(-50%) rotate(-120deg);
}
.spoke:nth-child(4) .spoke-handle {
  transform: translateY(-50%) rotate(-180deg);
}
.spoke:nth-child(5) .spoke-handle {
  transform: translateY(-50%) rotate(-240deg);
}
.spoke:nth-child(6) .spoke-handle {
  transform: translateY(-50%) rotate(-300deg);
}

@media (max-width: 992px) {
  .timeline-quest {
    width: 90% !important;
    float: none !important;
    text-align: left !important;
    padding: 0 0 0 2.8rem !important;
    margin: 0 auto 3rem auto;
  }

  .timeline-scroll::before {
    left: 18px;
  }

  /* .timeline-treasure::before {
    left: -38px !important;
  }

  .timeline-treasure {
    transform: none !important;
  } */
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .quest-header {
    height: 70px;
    padding: 0 1rem;
  }

  .back-treasure {
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
  }

  .quest-title h1 {
    font-size: 1.1rem;
  }

  .section-emblem {
    width: 40px;
    height: 40px;
  }

  .section-emblem::before {
    font-size: 18px;
  }

  section {
    padding-top: 85px;
  }

  .quest-container {
    padding: 0.5rem;
    max-width: 100%;
  }

  .quest-legend h2 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
  }

  .quest-content {
    padding: 1.5rem 1rem;
  }

  /* Mobile layouts */
  .captain-portrait {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
    max-width: 95%;
    margin: 0 auto;
  }

  .portrait-frame {
    width: 220px;
    height: 280px;
    margin: 0 auto;
    transform: none;
  }

  .captain-story {
    padding: 1.5rem 1rem;
    max-width: 100%;
  }

  .timeline-quest {
    width: 100% !important;
    float: none !important;
    text-align: left !important;
    padding: 0 0 0 2rem !important;
    max-width: 95%;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 3rem;
  }

  .timeline-scroll::before {
    left: 12px;
  }

  .timeline-treasure::before {
    left: -32px !important;
    right: auto !important;
  }

  .timeline-treasure {
    transform: none !important;
    padding: 1.8rem;
  }

  .weapon-arsenal,
  .treasure-vault,
  .compass-rose {
    grid-template-columns: 1fr;
    gap: 2rem;
    width: 95%;
    margin: 0;
  }

  .weapon-category {
    padding: 3rem 0.8rem 2rem 0.8rem;
    margin: 0 1rem;
  }

  .weapon-title {
    margin: 1rem 0 0.8rem 0;
    font-size: 1.2rem;
  }

  .skill-rune {
    margin-bottom: 0.6rem;
    padding: 0.6rem 0.4rem;
  }

  .skill-rune span {
    font-size: 0.95rem;
  }

  .treasure-chest {
    max-width: 100%;
    margin: 0 auto;
  }

  .treasure-details {
    padding: 1rem 0.8rem;
  }

  .treasure-links {
    gap: 0.5rem;
  }

  .treasure-link {
    padding: 1rem 0.5rem;
    font-size: 0.9rem;
  }

  .contact-map {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 95%;
    margin: 0 auto;
    padding: 0 0.5rem;
  }

  .message-bottle,
  .message-scroll {
    transform: none;
    width: 100%;
    margin: 0 auto;
    text-align: left;
    padding: 1.5rem 1rem;
  }

  .bottle-label {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
  }

  .contact-rune {
    margin-bottom: 1rem;
    padding: 0.8rem 0.6rem;
  }

  .scroll-field {
    margin-bottom: 1rem;
  }

  .scroll-field input,
  .scroll-field textarea {
    padding: 0.8rem;
  }

  .send-bottle {
    padding: 1rem 1.5rem;
    font-size: 1rem;
  }

  .wheel-container {
    width: 380px;
    height: 380px;
  }

  .portal-inner {
    width: 300px;
    height: 300px;
  }

  .compass-center {
    width: 110px;
    height: 110px;
  }

  .spoke-handle {
    width: 85px;
    height: 18px;
    line-height: 18px;
    font-size: 0.9rem;
    left: 75px;
  }
}

@media (max-width: 480px) {
  .quest-header {
    height: 60px;
    padding: 0 0.5rem;
  }

  .back-treasure {
    padding: 0.5rem 0.8rem;
    font-size: 0.7rem;
  }

  .quest-title h1 {
    font-size: 0.9rem;
  }

  .section-emblem {
    width: 35px;
    height: 35px;
  }

  .section-emblem::before {
    font-size: 14px;
  }

  .quest-legend h2 {
    font-size: 1.2rem;
  }

  .quest-container {
    padding: 0.3rem;
  }

  .quest-content {
    padding: 1rem 0.5rem;
  }

  .wheel-container {
    width: 340px;
    height: 340px;
  }

  .portal-inner {
    width: 280px;
    height: 280px;
  }

  .compass-center {
    width: 90px;
    height: 90px;
  }

  .compass-center::after {
    font-size: 10px;
  }

  .spoke-handle {
    width: 75px;
    height: 16px;
    line-height: 16px;
    font-size: 0.8rem;
    left: 65px;
  }
}
