/* ==========================================
   CHARACTER PROFILE STYLES
   ========================================== */

a { color: #ffa928; text-decoration: underline; transition: color 0.2s ease; }
a:hover { color: #fffca8; }

.navigation-header { margin-bottom: 25px; padding-bottom: 15px; border-bottom: 3px dashed #de8921; }
.back-btn { display: inline-flex; align-items: center; gap: 8px; background-color: #d14900; color: #fffca8; border: 2px solid #de8921; box-shadow: 3px 3px 0px #3d1a04; padding: 10px 20px; font-family: 'Fascinate', cursive, Georgia, serif; font-size: 16px; letter-spacing: 0.08em; text-transform: uppercase; border-radius: 6px; text-decoration: none; text-shadow: 1px 1px 0px #3d1a04; transition: all 0.2s ease; }
.back-btn:hover { background-color: #de8921; color: #3d1a04; transform: translateX(-3px) rotate(-1deg); box-shadow: 5px 5px 0px #3d1a04; }

.passport-container { display: block; background-color: #3d1a04; border: 2px solid #f5ae07; border-radius: 12px; box-shadow: 0 0 0 2px #de8921, 0 0 0 4px #d14900, 6px 10px 20px rgba(0,0,0,0.5); padding: 30px; color: #fffca8; }
.passport-header { display: grid; grid-template-columns: 240px 1fr; gap: 25px; margin-bottom: 25px; padding-bottom: 25px; border-bottom: 2px dashed #de8921; }
.portrait-box { position: relative; }
.portrait-box img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 6px; border: 2px solid #de8921; box-shadow: 3px 3px 0px #d14900; display: block; }

.dossier-info h1 { margin: 0 0 8px 0; font-family: 'Fascinate', cursive, sans-serif; font-size: 36px; color: #ffa928; text-shadow: 2px 2px 0px #3d1a04; }
.world-container { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 16px; }
.world-label { font-family: 'Fascinate', cursive, sans-serif; font-size: 14px; color: #ffa928; text-transform: uppercase; letter-spacing: 0.05em; }
.world-badge { display: inline-block; margin-bottom: 0; background-color: #d14900; color: #fffca8; border: 1px solid #de8921; box-shadow: 2px 2px 0px #3d1a04; padding: 4px 12px; font-family: 'Fascinate', cursive, sans-serif; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; border-radius: 4px; text-decoration: none; transition: all 0.2s ease; }
.world-badge:hover { background-color: #de8921; color: #3d1a04; transform: translateY(-2px); box-shadow: 3px 3px 0px #3d1a04; }

.fact-table { width: 100%; border-collapse: collapse; font-family: 'Courier New', Courier, monospace; }
.fact-table td { padding: 6px 0; border-bottom: 1px dotted #d14900; }
.fact-label { color: #de8921; font-weight: bold; width: 130px; text-transform: uppercase; }

.more-info-drawer { margin-top: 15px; grid-column: 1 / -1; width: 100%; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; }
.more-info-drawer summary::-webkit-details-marker { display: none; }
.more-info-drawer summary { list-style: none; }
.more-info-btn { display: inline-block; margin: 0 auto; background-color: #d14900; color: #fffca8; border: 2px solid #de8921; box-shadow: 3px 3px 0px #3d1a04; padding: 4px 16px; font-family: 'Fascinate', cursive, Georgia, serif; font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; border-radius: 4px; cursor: pointer; user-select: none; transition: all 0.2s ease; text-shadow: 1px 1px 0px #3d1a04; }
.extra-facts-container { width: 100%; box-sizing: border-box; margin-top: 15px; padding: 15px 20px; border-radius: 8px; animation: fadeIn 0.25s ease; }
.extra-facts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 30px; }

.overview-summary { background-color: rgba(209, 73, 0, 0.15); border-left: 4px solid #de8921; padding: 15px 20px; margin-bottom: 25px; border-radius: 0 6px 6px 0; }
.overview-summary h2 { font-family: 'Fascinate', cursive, sans-serif; font-size: 22px; color: #ffa928; margin: 0 0 8px 0; }
.overview-summary p { margin: 0; line-height: 1.6; font-size: 16px; }

.profile-nav-container { margin-bottom: 25px; border-bottom: 2px solid #de8921; }
.profile-nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; padding-bottom: 10px; }
.profile-nav .tab-btn { background-color: #d14900; color: #fffca8; border: 2px solid #de8921; border-bottom: none; box-shadow: 2px 2px 0px #3d1a04; padding: 8px 16px; font-family: 'Fascinate', cursive, Georgia, serif; font-size: 14px; letter-spacing: 0.05em; text-transform: uppercase; border-radius: 6px 6px 0 0; text-decoration: none; text-shadow: 1px 1px 0px #3d1a04; transition: all 0.2s ease; white-space: nowrap; }
.profile-nav .tab-btn:hover { background-color: #de8921; color: #3d1a04; transform: translateY(-2px); }

body:not(:has(:target)) .profile-nav .btn-bio,
body:has(#tab-bio:target) .profile-nav .btn-bio,
body:has(#tab-abilities:target) .profile-nav .btn-abilities,
body:has(#tab-relations:target) .profile-nav .btn-relations,
body:has(#tab-gallery:target) .profile-nav .btn-gallery,
body:has(#tab-writing:target) .profile-nav .btn-writing,
body:has(#tab-finches:target) .profile-nav .btn-finches { background-color: #f5ae07; color: #3d1a04; border-color: #fffca8; text-shadow: none; }

.info-bubble { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 10px; height: 10px; margin-left: 6px; background-color: #fffca8; color: #3d1a04; border-radius: 50%; font-family: sans-serif; font-size: 10px; font-weight: bold; text-transform: none; cursor: help; text-shadow: none; }
.info-bubble::after { content: "Finches are characters that started off as AU versions of an original character and have since evolved to stand on their own."; position: absolute; bottom: 130%; left: 50%; transform: translateX(-50%); width: 200px; padding: 5px 5px; background-color: #3d1a04; color: #fffca8; border: 1px solid #de8921; border-radius: 6px; box-shadow: 2px 4px 10px rgba(0,0,0,0.5); font-family: sans-serif; font-size: 11px; font-weight: normal; line-height: 1.4; text-transform: none; white-space: normal; text-align: center; visibility: hidden; opacity: 0; transition: opacity 0.2s ease, transform 0.2s ease; pointer-events: none; z-index: 100; }
.info-bubble::before { content: ""; position: absolute; bottom: 110%; left: 50%; transform: translateX(-50%); border-width: 5px; border-style: solid; border-color: #de8921 transparent transparent transparent; visibility: hidden; opacity: 0; transition: opacity 0.2s ease; z-index: 101; }
.info-bubble:hover::after, .info-bubble:hover::before { visibility: visible; opacity: 1; }

.tab-content { display: none; animation: fadeIn 0.3s ease; }
body:not(:has(:target)) #tab-bio,
body:has(#tab-bio:target) #tab-bio,
body:has(#tab-abilities:target) #tab-abilities,
body:has(#tab-relations:target) #tab-relations,
body:has(#tab-gallery:target) #tab-gallery,
body:has(#tab-writing:target) #tab-writing,
body:has(#tab-finches:target) #tab-finches { display: block; }
body:has(#tab-abilities:target) #tab-bio,
body:has(#tab-relations:target) #tab-bio,
body:has(#tab-gallery:target) #tab-bio,
body:has(#tab-writing:target) #tab-bio,
body:has(#tab-finches:target) #tab-bio { display: none; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.tab-content h3 { font-family: 'Fascinate', cursive, sans-serif; font-size: 22px; color: #ffa928; margin-top: 0; }
.tab-content p { line-height: 1.6; font-size: 15px; margin-top: 0; }

.bio-folder { margin-bottom: 12px; border: 1px solid #de8921; border-radius: 6px; background-color: rgba(209, 73, 0, 0.1); overflow: hidden; }
.bio-folder summary { background-color: #d14900; color: #fffca8; padding: 10px 15px; font-family: 'Fascinate', cursive, sans-serif; font-size: 16px; cursor: pointer; user-select: none; list-style: none; display: flex; justify-content: space-between; align-items: center; transition: background-color 0.2s ease; }
.bio-folder summary::-webkit-details-marker { display: none; }
.bio-folder summary:hover { background-color: #de8921; color: #3d1a04; }
.bio-folder summary::after { content: "[OPEN]"; font-family: 'Courier New', Courier, monospace; font-size: 12px; }
.bio-folder[open] summary::after { content: "[CLOSE]"; }
.bio-folder-content { padding: 15px; border-top: 1px dashed #de8921; animation: fadeIn 0.2s ease; }

.ability-section { margin-bottom: 25px; background-color: rgba(209, 73, 0, 0.08); border: 1px solid #de8921; border-radius: 8px; padding: 20px; box-shadow: 2px 2px 0px #3d1a04; }
.ability-section-title { font-family: 'Fascinate', cursive, sans-serif; font-size: 20px; color: #ffa928; border-bottom: 2px dashed #de8921; padding-bottom: 8px; margin: 0 0 15px 0; display: flex; align-items: center; gap: 10px; }
.ability-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 15px; }
.ability-card { background-color: rgba(61, 26, 4, 0.6); border: 1px solid #de8921; border-left: 4px solid #f5ae07; border-radius: 6px; padding: 12px 15px; }
.ability-card h5 { font-family: 'Fascinate', cursive, sans-serif; font-size: 16px; color: #fffca8; margin: 0 0 6px 0; }
.ability-card p { font-size: 13.5px; line-height: 1.5; margin: 0; color: #ffd89b; }

.tag-group { margin-bottom: 12px; }
.tag-group-label { font-family: 'Courier New', Courier, monospace; font-weight: bold; color: #de8921; text-transform: uppercase; font-size: 13px; margin-bottom: 6px; display: block; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.badge-tag { background-color: #d14900; color: #fffca8; border: 1px solid #de8921; padding: 4px 10px; font-family: 'Courier New', Courier, monospace; font-size: 12px; font-weight: bold; border-radius: 4px; box-shadow: 1px 1px 0px #3d1a04; }

.relations-list { display: flex; flex-direction: column; gap: 20px; }
.relation-card { display: grid; grid-template-columns: 140px 1fr; gap: 20px; background-color: rgba(209, 73, 0, 0.1); border: 1px solid #de8921; border-radius: 8px; padding: 15px; box-shadow: 2px 2px 0px #3d1a04; }
.relation-portrait-container { display: flex; flex-direction: column; align-items: center; text-align: center; }
.relation-portrait-container img { width: 120px; height: 120px; object-fit: cover; border-radius: 6px; border: 2px solid #de8921; box-shadow: 2px 2px 0px #d14900; background-color: #3d1a04; }
.relation-name { margin-top: 8px; font-family: 'Fascinate', cursive, sans-serif; font-size: 16px; color: #ffa928; }
.relation-details { display: flex; flex-direction: column; gap: 8px; font-family: 'Courier New', Courier, monospace; }
.relation-field { border-bottom: 1px dotted rgba(222, 137, 33, 0.4); padding-bottom: 4px; }
.relation-label { color: #de8921; font-weight: bold; text-transform: uppercase; font-size: 13px; }

.mini-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 15px; margin-top: 15px; }
.mini-gallery img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border: 2px solid #de8921; border-radius: 4px; box-shadow: 2px 2px 5px rgba(0,0,0,0.4); }

.writing-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; margin-top: 15px; }
.writing-card { background-color: rgba(209, 73, 0, 0.15); border: 2px solid #de8921; border-radius: 6px; padding: 15px; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 3px 3px 0px #3d1a04; transition: transform 0.2s ease; }
.writing-card:hover { transform: translateY(-3px); border-color: #f5ae07; }
.writing-card h4 { font-family: 'Fascinate', cursive, sans-serif; font-size: 16px; color: #ffa928; margin: 0 0 8px 0; }
.writing-card p { font-size: 13px; line-height: 1.4; color: #fffca8; margin-bottom: 12px; }
.writing-card .read-link { font-family: 'Fascinate', cursive, sans-serif; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; align-self: flex-start; }

.finches-gallery { display: grid; grid-template-columns: repeat(5, 1fr); gap: 15px; margin-top: 20px; }
.finch-card { display: flex; flex-direction: column; align-items: center; text-align: center; background-color: rgba(209, 73, 0, 0.1); border: 1px solid #de8921; border-radius: 6px; padding: 10px; box-shadow: 2px 2px 0px #3d1a04; transition: transform 0.2s ease, border-color 0.2s ease; text-decoration: none; }
.finch-card:hover { transform: translateY(-3px); border-color: #f5ae07; }
.finch-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 4px; border: 2px solid #de8921; box-shadow: 2px 2px 0px #d14900; background-color: #3d1a04; }
.finch-name { margin-top: 8px; font-family: 'Fascinate', cursive, sans-serif; font-size: 14px; color: #ffa928; word-break: break-word; }

@media (max-width: 900px) { .finches-gallery { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) {
  .passport-header { grid-template-columns: 1fr; }
  .portrait-box { max-width: 240px; margin: 0 auto; }
  .extra-facts-grid { grid-template-columns: 1fr; }
  .relation-card { grid-template-columns: 1fr; }
  .relation-portrait-container { margin-bottom: 10px; }
}
@media (max-width: 480px) { .finches-gallery { grid-template-columns: repeat(2, 1fr); } }