/* ── WIDGET ── */
.widget {
    background: var(--panel);
    border: 1px solid var(--border);
    box-shadow:
        0 0 12px rgba(0, 0, 0, 0.6),
        inset 0 0 18px rgba(0, 0, 0, 0.5);
    position: relative;
}

.widget-title {
    display: flex;
    align-items: center;
    padding: 0;
    background: var(--titlebar);
    border-bottom: 1px solid var(--border);
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--dim);
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.widget-title::before {
    content: "";
    display: block;
    flex-shrink: 0;
    width: 4px;
    align-self: stretch;
    background: var(--red-dark);
    margin-right: 8px;
}

.widget-title::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 28px;
    background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.4));
    clip-path: polygon(12px 0, 100% 0, 100% 100%, 0 100%);
}

.widget-title-text {
    padding: 5px 8px 5px 0;
    position: relative;
    z-index: 1;
    font-family: "Orbitron", monospace;
    font-size: 12px;
    letter-spacing: 3px;
}

.widget-title-text::after {
    content: "›";
    margin-left: 6px;
    opacity: 0.4;
    font-size: 12px;
}

.widget-body {
    padding: 8px;
}

/* ── SIDEBAR LEFT ── */
.sidebar-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-box {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--panel2);
    border: 1px solid var(--border);
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.6);
    padding: 8px;
    position: relative;
    clip-path: polygon(
        0 0,
        calc(100% - 14px) 0,
        100% 14px,
        100% 100%,
        14px 100%,
        0 calc(100% - 14px)
    );
}

#japanese {
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-family: "DotGothic16", sans-serif;
    font-size: 14px;
    letter-spacing: 4px;
    height: 110px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 4px;
    border-right: 1px solid var(--border-lt);
    background: rgba(0, 0, 0, 0.35);
    color: var(--dim);
    margin-right: 8px;
}

.profile-img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border: 1px solid var(--border-lt);
    display: block;
}

/* ── STATUS ── */
.status-row {
    display: flex;
    gap: 6px;
    align-items: flex-start;
    padding: 4px 0;
    border-bottom: 1px solid var(--border);
    line-height: 1.3;
}

.status-row:last-child {
    border-bottom: none;
}

.status-icon {
    color: var(--dimmer);
    font-size: 12px;
    flex-shrink: 0;
    margin-top: 1px;
}

.status-label {
    display: block;
    font-size: 9px;
    letter-spacing: 1px;
    color: var(--dimmer);
    text-transform: uppercase;
}

.status-value {
    font-size: 11px;
    color: var(--white);
}

/* ── 88x31 BUTTONS ── */
.buttons-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}

.btn88 {
    width: 88px;
    height: 31px;
    border: 1px solid var(--border-lt);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    letter-spacing: 1px;
    color: var(--dim);
    background: var(--panel2);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
    font-family: "Orbitron", monospace;
    text-align: center;
}

.btn88:hover {
    border-color: var(--white);
    color: var(--white);
    text-decoration: none;
}

.btn88.red {
    border-color: var(--red-dark);
    color: var(--red);
}

/* ── NOW PLAYING ── */
.sidebar-right {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.visualizer {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    height: 70px;
    padding: 10px 8px;
    background: var(--panel2);
    border-bottom: 1px solid var(--border);
    justify-content: center;
}

.visualizer span {
    width: 6px;
    background: var(--red);
    border-radius: 1px;
    animation-name: bounce;
    animation-duration: 1s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
    animation-play-state: paused;
}

.visualizer.playing span {
    animation-play-state: running;
}

.visualizer span:nth-child(1) {
    animation-delay: 0s;
}
.visualizer span:nth-child(2) {
    animation-delay: 0.15s;
}
.visualizer span:nth-child(3) {
    animation-delay: 0.3s;
}
.visualizer span:nth-child(4) {
    animation-delay: 0.45s;
}
.visualizer span:nth-child(5) {
    animation-delay: 0.2s;
}
.visualizer span:nth-child(6) {
    animation-delay: 0.35s;
}
.visualizer span:nth-child(7) {
    animation-delay: 0.1s;
}
.visualizer span:nth-child(8) {
    animation-delay: 0.25s;
}

.now-playing-info {
    padding: 6px 8px 4px;
}

.now-playing-track {
    font-size: 11px;
    color: var(--white);
    line-height: 1.3;
    margin-bottom: 2px;
}

.now-playing-artist {
    font-size: 10px;
    color: var(--dim);
    margin-bottom: 6px;
}

.now-playing-progress {
    height: 3px;
    background: var(--border);
    margin-bottom: 4px;
    position: relative;
}

.now-playing-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 47%;
    background: var(--red);
    box-shadow: 0 0 6px rgba(224, 53, 53, 0.5);
}

.now-playing-time {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: var(--dimmer);
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.now-playing-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 4px 0 2px;
}

.ctrl-btn {
    background: none;
    border: none;
    color: var(--dim);
    font-size: 12px;
    cursor: pointer;
    padding: 3px 5px;
    font-family: "Oxanium", monospace;
    transition: color 0.15s;
    line-height: 1;
}

.ctrl-btn:hover {
    color: var(--white);
}

.ctrl-btn.play {
    color: var(--white);
    font-size: 16px;
    border: 1px solid var(--border-lt);
    padding: 4px 8px;
    background: var(--panel2);
}

.ctrl-btn.play:hover {
    border-color: var(--red);
    color: var(--red);
    box-shadow: 0 0 8px rgba(224, 53, 53, 0.3);
}

/* ── ELSEWHERE / EXT LINKS ── */
.ext-link {
    display: block;
    padding: 4px 0;
    font-size: 12px;
    color: var(--dim);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: all 0.15s;
}

.ext-link:last-child {
    border-bottom: none;
}

.ext-link:hover {
    color: var(--red);
    padding-left: 4px;
}

.ext-link::before {
    content: "→ ";
    color: var(--dimmer);
}

/* ── WEBRING ── */
.webring {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 11px;
}

.webring a {
    color: var(--dim);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.15s;
}

.webring a:hover {
    color: var(--red);
}

.webring-label {
    font-size: 10px;
    color: var(--dimmer);
    text-align: center;
}

.sign-btn {
    display: block;
    width: 100%;
    padding: 5px;
    background: var(--panel2);
    border: 1px solid var(--border-lt);
    color: var(--dim);
    font-family: "Oxanium", monospace;
    font-size: 11px;
    letter-spacing: 1px;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
    margin-top: 6px;
}

.sign-btn:hover {
    border-color: var(--red);
    color: var(--red);
}

/* ── CONTENT: HOME ── */
.featured-img {
    display: block;
    width: 100%;
    border: 1px solid var(--border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

.about-text {
    font-family: "Inter", sans-serif;
    font-size: 13px;
    line-height: 1.7;
    color: rgba(210, 210, 210, 0.9);
    text-align: justify;
}

.update-entry {
    display: flex;
    gap: 10px;
    padding: 5px 0;
    border-bottom: 1px solid var(--border);
    align-items: baseline;
    font-size: 12px;
}

.update-entry:last-child {
    border-bottom: none;
}

.update-date {
    color: var(--red);
    font-size: 10px;
    flex-shrink: 0;
    letter-spacing: 1px;
    width: 80px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.update-date::before {
    content: "▸";
    color: var(--red-dark);
    font-size: 9px;
    flex-shrink: 0;
}

.update-text {
    color: rgba(210, 210, 210, 0.9);
}
.update-text a {
    color: var(--red);
}
.update-text a:hover {
    color: var(--white);
}

/* Quote widget image */
.widget-body img {
    width: 100%;
    display: block;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

/* ── WRITING INDEX ── */
.writing-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.writing-entry {
    display: grid;
    grid-template-columns: 200px 1fr;
    background: var(--panel);
    border: 1px solid var(--border);
    box-shadow:
        0 0 12px rgba(0, 0, 0, 0.6),
        inset 0 0 18px rgba(0, 0, 0, 0.5);
    position: relative;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s;
}

.writing-entry:hover {
    border-color: var(--border-lt);
}
.writing-entry:hover .writing-title {
    color: var(--red);
}

.writing-thumb {
    width: 200px;
    height: 100%;
    min-height: 140px;
    object-fit: cover;
    display: block;
    border-right: 1px solid var(--border);
}

.writing-thumb-wrap {
    position: relative;
    flex-shrink: 0;
    width: 200px;
}

.writing-thumb-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    background-image:
        linear-gradient(var(--border-lt), var(--border-lt)),
        linear-gradient(var(--border-lt), var(--border-lt)),
        linear-gradient(var(--border-lt), var(--border-lt)),
        linear-gradient(var(--border-lt), var(--border-lt)),
        linear-gradient(var(--border-lt), var(--border-lt)),
        linear-gradient(var(--border-lt), var(--border-lt)),
        linear-gradient(var(--border-lt), var(--border-lt)),
        linear-gradient(var(--border-lt), var(--border-lt));
    background-size:
        2px 14px,
        14px 2px,
        2px 14px,
        14px 2px,
        2px 14px,
        14px 2px,
        2px 14px,
        14px 2px;
    background-position:
        0 0,
        0 0,
        100% 0,
        100% 0,
        0 100%,
        0 100%,
        100% 100%,
        100% 100%;
    background-repeat: no-repeat;
}

.writing-info {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
}

.writing-meta {
    display: flex;
    gap: 10px;
    align-items: center;
}

.writing-tag {
    font-family: "Orbitron", monospace;
    font-size: 8px;
    letter-spacing: 2px;
    padding: 2px 6px;
    border: 1px solid var(--red-dark);
    color: var(--red);
    text-transform: uppercase;
}

.writing-date {
    font-size: 10px;
    color: var(--dimmer);
    letter-spacing: 1px;
}

.writing-readtime {
    font-size: 10px;
    color: var(--dimmer);
    margin-left: auto;
}

.writing-title {
    font-family: "Orbitron", monospace;
    font-size: 13px;
    font-weight: 700;
    color: var(--white);
    line-height: 1.4;
    transition: color 0.15s;
}

.writing-excerpt {
    font-family: "DotGothic16", monospace;
    font-size: 12px;
    line-height: 1.6;
    color: var(--dim);
}

.writing-readmore {
    font-family: "Orbitron", monospace;
    font-size: 9px;
    letter-spacing: 2px;
    color: var(--red);
    margin-top: auto;
}

/* ── PHOTOGRAPHY INDEX ── */
.photo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.photo-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: var(--panel);
    border: 1px solid var(--border);
    box-shadow:
        0 0 12px rgba(0, 0, 0, 0.6),
        inset 0 0 18px rgba(0, 0, 0, 0.5);
    position: relative;
    clip-path: polygon(
        0 0,
        100% 0,
        100% calc(100% - 10px),
        calc(100% - 10px) 100%,
        0 100%
    );
    transition: border-color 0.15s;
    font-size: 0;
}

.photo-card:hover {
    border-color: var(--border-lt);
}
.photo-card:hover .photo-card-title {
    color: var(--red);
}

.photo-card-thumb {
    width: 100%;
    object-fit: contain;
    display: block;
}

.photo-card-thumb-placeholder {
    width: 100%;
    height: 180px;
    background: var(--panel2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dimmer);
    font-size: 32px;
}

.photo-card-bar {
    display: flex;
    align-items: stretch;
    background: var(--titlebar);
    border-top: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    padding: 0;
    font-size: 13px;
}

.photo-card-bar::before {
    content: "";
    display: block;
    flex-shrink: 0;
    width: 4px;
    align-self: stretch;
    background: var(--red-dark);
    margin-right: 8px;
}

.photo-card-info {
    padding: 5px 8px 5px 0;
    flex-direction: column;
    gap: 2px;
    display: flex;
}

.photo-card-title {
    font-family: "Orbitron", monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--white);
    transition: color 0.15s;
}

.photo-card-meta {
    font-family: "DotGothic16", monospace;
    font-size: 10px;
    color: var(--dimmer);
    display: flex;
    gap: 8px;
}

.photo-card-count {
    margin-left: auto;
    font-family: "Orbitron", monospace;
    font-size: 9px;
    color: var(--red);
    padding-right: 8px;
    align-self: center;
}

/* ── PHOTO SET PAGE ── */
.photo-set-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 4px;
}

.photo-set-title {
    font-family: "Orbitron", monospace;
    font-size: 16px;
    font-weight: 700;
    color: var(--white);
}

.photo-set-meta {
    font-size: 11px;
    color: var(--dimmer);
    letter-spacing: 1px;
}

.photo-set-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4px;
}

.photo-set-grid img {
    width: 100%;
    display: block;
    object-fit: cover;
    aspect-ratio: 1;
    transition:
        opacity 0.15s,
        filter 0.15s;
    cursor: pointer;
    filter: grayscale(20%);
}

.photo-set-grid img:hover {
    opacity: 0.85;
    filter: grayscale(0%);
}

/* ── LIGHTBOX ── */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.lightbox.open {
    display: flex;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    display: block;
    border: 1px solid var(--border-lt);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.9);
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 28px;
    font-family: "Orbitron", monospace;
    font-size: 11px;
    color: var(--dim);
    letter-spacing: 2px;
    cursor: pointer;
}

.lightbox-counter {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-family: "Orbitron", monospace;
    font-size: 10px;
    color: var(--dimmer);
    letter-spacing: 2px;
}

.lightbox-prev,
.lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--dim);
    cursor: pointer;
    padding: 20px;
    user-select: none;
    transition: color 0.15s;
}

.lightbox-prev {
    left: 10px;
}
.lightbox-next {
    right: 10px;
}
.lightbox-prev:hover,
.lightbox-next:hover {
    color: var(--white);
}

/* ── BLOG POST ── */
.post-header {
    margin-bottom: 20px;
    padding: 0 12px;
}

.post-title {
    font-family: "Orbitron", monospace;
    font-size: 28px;
    font-weight: 700;
    color: var(--white);
    line-height: 1.3;
    margin-bottom: 8px;
}

.post-meta {
    font-family: "Oxanium", monospace;
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--dimmer);
    display: flex;
    gap: 12px;
    align-items: center;
}

.post-meta::before {
    content: "";
    display: block;
    width: 20px;
    height: 2px;
    background: var(--red-dark);
    flex-shrink: 0;
}

.post-featured-wrap {
    padding: 0 12px;
    margin-bottom: 24px;
}

.post-featured {
    display: block;
    width: 100%;
    border: 1px solid var(--border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

.post-body {
    padding: 0 12px;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    line-height: 1.8;
    color: rgba(210, 210, 210, 0.9);
    text-align: justify;
}

.post-body p + p {
    margin-top: 1.2em;
}

.post-body h2 {
    font-size: 15px;
    margin-top: 2em;
    margin-bottom: 0.6em;
    letter-spacing: 1px;
}

.post-body h3 {
    font-size: 12px;
    font-weight: 400;
    color: var(--dim);
    margin-top: 1.5em;
    margin-bottom: 0.4em;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.post-body blockquote {
    border-left: 3px solid var(--red-dark);
    padding: 6px 0 6px 16px;
    margin: 1.5em 0;
    color: var(--dim);
    font-style: italic;
}

.post-body a {
    color: var(--red);
    text-decoration: underline;
    text-decoration-color: var(--red-dark);
}

.post-body a:hover {
    color: var(--white);
}

.post-footer {
    margin-top: 32px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-back {
    font-family: "Orbitron", monospace;
    font-size: 9px;
    letter-spacing: 2px;
    color: var(--dim);
    text-decoration: none;
    transition: color 0.15s;
}

.post-back::before {
    content: "← ";
}
.post-back:hover {
    color: var(--red);
}
