* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--page-bg);
    font-family: var(--font-body);
    color: var(--ink);
    font-size: 17px;
    line-height: 1.45;
    padding: 24px 16px;
}

.sheet {
    max-width: 820px;
    margin: 0 auto 30px;
    background: var(--card-bg);
    border: 14px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
}

/* striped awning header */
.awning {
    height: 140px;
    flex: none;
    background: var(--img-banner);
    background-size: cover;
    background-position: center;
    background-repeat: repeat-x;
}

h2 {
    font-family: var(--font-header);
    font-weight: normal;
    font-size: 34px;
    margin: 0 0 8px;
    color: var(--ink);
}
h2.accent {
    color: var(--accent-dark);
}

.box {
    border: 3px solid var(--border);
    border-radius: 16px;
    padding: 14px 16px;
}

ul {
    margin: 0;
    padding-left: 22px;
}
li {
    margin-bottom: 5px;
}

/* ============ TOP SECTION ============ */
.panel1 .body {
    display: flex;
    flex-direction: column;
    padding: 18px 22px 22px;
    border-bottom: 3px solid var(--border);
}

/* portrait + side placeholder boxes */
.top-row {
    position: relative;
    height: 380px;
}
.portrait-frame {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.portrait-img {
    width: 100%;
    height: 100%;
    background: var(--img-portrait) center / contain no-repeat;
}
.side-col {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 150px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.placeholder {
    flex: 1;
    border: 3px solid var(--border);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--accent);
    font-size: 18px;
    padding: 8px;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}
.placeholder.box1 {
    background-image: var(--img-box1);
}
.placeholder.box2 {
    background-image: var(--img-box2);
}
.placeholder.box3 {
    background-image: var(--img-box3);
}

.name {
    font-family: var(--font-header);
    font-size: 36px;
    text-align: center;
    margin: 14px 0 2px;
}
.name-rule {
    height: 4px;
    width: 60%;
    margin: 0 auto 16px;
    background: var(--accent-dark);
    border-radius: 4px;
    opacity: 0.85;
}

/* stats split in two columns with a divider */
.stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.stats .col {
    padding: 0 18px;
}
.stats .col:first-child {
    border-right: 3px solid var(--border);
}
.stat {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 2px dotted var(--border);
    padding: 5px 0;
}
.stat .label {
    color: var(--accent-dark);
}
.stat .val {
    text-align: right;
}

/* ============ BOTTOM SECTION — grid layout ============ */
.panel2 .body {
    padding: 22px;
}
.p2-title {
    margin-bottom: 18px;
}
.p2-title h2 {
    font-size: 44px;
    color: var(--accent-dark);
    margin: 0;
}
.squiggle {
    height: 12px;
    margin-top: 2px;
    background: radial-gradient(
            circle at 10px 6px,
            var(--accent-dark) 2px,
            transparent 2.5px
        )
        0 0/20px 12px repeat-x;
    opacity: 0.8;
}

.grid2 {
    display: flex;
    gap: 20px;
    align-items: stretch;
}
.col-left {
    flex: 1.15;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.col-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* about-me scroll box */
.scrollbox {
    max-height: 540px;
    overflow-y: auto;
    padding-right: 8px;
    scrollbar-color: var(--accent) var(--track-bg);
}
.scrollbox::-webkit-scrollbar {
    width: 10px;
}
.scrollbox::-webkit-scrollbar-track {
    background: var(--track-bg);
    border-radius: 8px;
}
.scrollbox::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 8px;
}
.scrollbox p {
    margin: 0 0 12px;
}

/* sliders */
.slider-row {
    margin-bottom: 12px;
}
.slider-row:last-child {
    margin-bottom: 0;
}
.slider-row .ends {
    display: flex;
    justify-content: space-between;
    text-transform: uppercase;
    font-size: 14px;
}
.track {
    position: relative;
    height: 8px;
    background: var(--track-bg);
    border-radius: 6px;
    margin-top: 3px;
}
.knob {
    position: absolute;
    top: -4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--card-bg);
    box-shadow: 0 0 0 2px var(--accent);
    transform: translateX(-50%);
}

.likes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.likes-grid h2 {
    font-size: 26px;
}

.drawing {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--img-drawing) center / contain no-repeat;
    border-radius: 12px;
    border: 3px solid var(--border);
}

/* big slideshow under About me — fills the leftover space */
.gallery {
	position: relative;
	flex: 1;
	min-height: 240px;
	border: 3px solid var(--border);
	border-radius: 16px;
	overflow: hidden;
}
.gallery .slide {
	position: absolute;
	inset: 0;
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
	opacity: 0;
	transition: opacity .8s ease;
}
.gallery .slide.active { opacity: 1; }

/* arrows */
.gallery-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 36px;
	height: 36px;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, .8);
	color: var(--accent-dark);
	font-family: system-ui, sans-serif;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .15s ease, transform .15s ease;
}
.gallery-arrow:hover { background: #fff; }
.gallery-arrow.prev { left: 10px; }
.gallery-arrow.next { right: 10px; }
.gallery-arrow:active { transform: translateY(-50%) scale(.9); }

/* dots */
.gallery-dots {
	position: absolute;
	bottom: 10px;
	left: 0;
	right: 0;
	display: flex;
	justify-content: center;
	gap: 8px;
}
.gallery-dots .dot {
	width: 10px;
	height: 10px;
	padding: 0;
	border: 2px solid #fff;
	border-radius: 50%;
	background: rgba(255, 255, 255, .4);
	cursor: pointer;
	transition: background .15s ease;
}
.gallery-dots .dot.active { background: var(--accent); }

/* now-playing widget (fixed bottom-right) */
.music-player {
	position: fixed;
	bottom: 16px;
	right: 16px;
	z-index: 100;
	display: flex;
	align-items: center;
	gap: 10px;
	max-width: 260px;
	padding: 8px 14px 8px 8px;
	background: var(--card-bg);
	border: 3px solid var(--border);
	border-radius: 16px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
	font-family: var(--font-body);
}
.music-btn {
	flex: none;
	width: 38px;
	height: 38px;
	border: none;
	border-radius: 50%;
	background: var(--accent);
	color: var(--card-bg);
	font-size: 15px;
	cursor: pointer;
	font-family: system-ui, sans-serif;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform .15s ease, background .15s ease;
}
.music-btn:hover { transform: scale(1.12); }
.music-btn:active { transform: scale(.92); }

/* pulse while a song is playing */
.music-btn.playing { animation: musicPulse 1.1s ease-in-out infinite; }
@keyframes musicPulse {
	0%   { box-shadow: 0 0 0 0 var(--accent); }
	70%  { box-shadow: 0 0 0 10px rgba(0, 0, 0, 0); }
	100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
}

.music-info { line-height: 1.15; overflow: hidden; }
.music-title {
	color: var(--accent-dark);
	font-size: 16px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.music-artist { font-size: 13px; opacity: .75; }

/* hide the YouTube iframe offscreen — it's audio-only here */
#ytplayer { position: fixed; left: -9999px; top: -9999px; width: 0; height: 0; }

@media (max-width: 620px) {
    .grid2 {
        flex-direction: column;
    }
    .col-left,
    .col-right {
        width: 100%;
    }
    .side-col {
        width: 110px;
    }
}
