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

:root {
  --bg:         #a3a3a3;
  --ink:        #1a1a1a;
  --red:        #cc2200;
  --makogreen:  #c7f1c9;
  --teal:       #2a6b6b;
  --paper:      #faf8f2;
  --border:     #1a1a1a;
  --muted:      #666;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
}

a { color: var(--teal); text-decoration: underline; }
a:hover { color: var(--red); }

.site-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px 60px;
}

/* HEADER */
.site-header {
  border-bottom: 3px solid var(--border);
  padding: 28px 16px 16px;
  margin-bottom: 0;
  text-align: center;
  background-image: url('/images/ff7_midgar_key.jpg');
  background-size: cover;
  background-position: center;
  position: relative;
  margin-left: -16px;
  margin-right: -16px;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4); /* darken — adjust 0.4 to taste */
  z-index: 0;
}

.site-header > * {
  position: relative;
  z-index: 1; /* keeps text above the overlay */
}

.site-title {
  font-family: 'VT323', monospace;
  font-size: 3.4rem;
  line-height: 1;
  letter-spacing: 2px;
}

.site-title a {
  color: white;/*var(--ink);*/
  text-decoration: none;
}

.cursor {
  color: var(--red);
  animation: blink 1s step-end infinite;
}

@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.site-subtitle {
  font-family: 'Special Elite', cursive;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 4px;
  letter-spacing: 1px;
}

.site-subtitle:hover {
  -webkit-text-stroke: 0.5px black;
  color: var(--paper);
}

/* NAV */
.site-nav {
  background: var(--ink);
  display: flex;
  margin-left: -16px;
  margin-right: -16px;
  margin-bottom: 32px;
}

.site-nav a {
  color: var(--bg);
  text-decoration: none;
  font-family: 'VT323', monospace;
  font-size: 1.15rem;
  letter-spacing: 1px;
  padding: 7px 18px;
  border-right: 1px solid #444;
  transition: background 0.1s;
}
.site-nav a::before { content: "[ "; }
.site-nav a::after  { content: " ]"; }

.site-nav a:hover { background: var(--makogreen); color: var(--ink); }

/* DIVIDER */
.divider {
  text-align: center;
  color: var(--muted);
  font-family: 'VT323', monospace;
  font-size: 1.1rem;
  letter-spacing: 4px;
  margin: 24px 0;
  user-select: none;
}
.divider::before { content: "< "; }
.divider::after  { content: " >"; }

/* PIXEL BOX */
.pixel-box {
  border: 2px solid var(--border);
  background: var(--paper);
  padding: 20px 24px;
  position: relative;
  box-shadow: 4px 4px 0 var(--border);
  margin-bottom: 28px;
}

.pixel-box-label {
  position: absolute;
  top: -11px;
  left: 14px;
  background: var(--bg);
  padding: 0 8px;
  font-family: 'VT323', monospace;
  font-size: 1rem;
  letter-spacing: 1px;
  color: var(--muted);
}

/* POST CARD (index page) */
.post-card {
  border: 2px solid var(--border);
  background: var(--paper);
  padding: 18px 22px;
  margin-bottom: 20px;
  box-shadow: 4px 4px 0 var(--border);
  transition: transform 0.1s;
  
  position: relative;
}

.post-card:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--border); }

.post-card .post-title { font-family: 'Special Elite', cursive; font-size: 1.2rem; margin-bottom: 4px; }
.post-card .post-title a { color: var(--ink); }
.post-card .post-title a:hover { color: var(--red); text-decoration: none; }
.post-card .post-meta { font-family: 'VT323', monospace; font-size: 0.95rem; color: var(--muted); letter-spacing: 1px; }
.post-card .post-excerpt { margin-top: 8px; font-size: 0.92rem; color: #444; }

.post-card a.card-link {
  position: absolute;
  inset: 0;
}
/* HOME */
.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.post-card-small {
  padding: 10px 14px;
  margin-bottom: 10px;
}

.post-card-small .post-title {
  font-size: 0.95rem;
}

.post-card-small .post-excerpt {
  display: none;
}

.all-posts-link {
  text-align: center;
  font-family: 'VT323', monospace;
  letter-spacing: 2px;
  margin-top: 4px;
}

.home-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.home-gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 2px solid var(--border);
  cursor: zoom-in;
}

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

/* FULL POST */
.post {
  border: 2px solid var(--border);
  background: var(--paper);
  padding: 24px;
  box-shadow: 4px 4px 0 var(--border);
}

.post-header {
  border-bottom: 1px dashed #ccc;
  margin-bottom: 16px;
  padding-bottom: 12px;
}

.post-header .post-title { font-family: 'Special Elite', cursive; font-size: 1.5rem; }
.post-header .post-meta { font-family: 'VT323', monospace; font-size: 0.95rem; color: var(--muted); letter-spacing: 1px; margin-top: 4px; }

.post-body { font-size: 0.97rem; white-space: pre-wrap; }

.post-body img {
  max-width: 300px;
  width: 100%;
  cursor: zoom-in;
  transition: transform 0.3s ease;
  display: block;
  margin: 16px 0;
}

.post-body img:hover {
  transform: scale(1.5);
}

/* FOOTER */
.site-footer {
  text-align: center;
  font-family: 'VT323', monospace;
  font-size: 1rem;
  letter-spacing: 2px;
  color: var(--muted);
  border-top: 2px solid var(--border);
  padding-top: 20px;
  margin-top: 40px;
}

/* ABOUT*/
.about-two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 500px) {
  .site-title { font-size: 2.4rem; }
  .post, .post-card { padding: 16px; }
  .site-nav a { padding: 7px 12px; }
}

/* LINKS */
.links-section {
  margin-bottom: 28px;
}

.links-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.link-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.link-info{
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--paper);
  border: 2px solid var(--border);
  box-shadow: 3px 3px 0 var(--border);
  padding: 8px 10px;
  white-space: nowrap;
  z-index: 10;
  flex-direction: column;
  gap: 4px;
  min-width: 160px;
}

.link-banner{
  position: relative;
  display: inline-block;
}

.link-banner img {
  width: 88px;
  height: 31px;
  display: block;
  image-rendering: pixelated;
  border: 1px solid var(--border);
}

.link-banner:hover .link-info{
  display: flex;
}

.link-banner-empty {
  width: 88px;
  height: 31px;
  flex-shrink: 0;
}

.link-name {
  font-family: 'Special Elite', cursive;
  font-size: 1rem;
  color: var(--ink);
}

.link-name:hover { color: var(--red); }

.link-desc {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 2px;
}
/* IMG CAROUSEL*/
.carousel {
  display: flex;
  align-items: center;
  gap: 6px;
}

.carousel-track-wrap {
  overflow: hidden;
  flex: 1;
  border: 2px solid var(--border);
}

.carousel-track {
  display: flex;
  transition: transform 0.3s ease;
}

.carousel-track img {
  min-width: 100%;
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  cursor: zoom-in;
  margin: 0;
  border: none;
}

.carousel-btn {
  font-family: 'VT323', monospace;
  font-size: 1.8rem;
  background: var(--ink);
  color: var(--bg);
  border: none;
  padding: 4px 8px;
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
}

.carousel-btn:hover { background: var(--red); } 
/* LIGHTBOX */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 999;
  cursor: zoom-out;
  align-items: center;
  justify-content: center;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  border: 3px solid white;
  box-shadow: 0 0 40px rgba(0,0,0,0.8);
}
/* MUSIC PLAYER */
.music-player {
  font-family: 'VT323', monospace;
  font-size: 1rem;
  letter-spacing: 1px;
  color: var(--ink);
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  padding: 4px 10px;
}

.music-label {
  cursor: default;
}

.music-label::before{
  content: "{ "
}
.music-label::after{
  content: " }"
}

.music-controls {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--paper);
  border: 2px solid var(--border);
  box-shadow: 3px 3px 0 var(--border);
  padding: 10px 14px;
  white-space: nowrap;
  z-index: 10;
  flex-direction: column;
  gap: 8px;
}

.music-player:hover .music-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.music-btn {
  font-family: 'VT323', monospace;
  font-size: 1.1rem;
  background: none;
  border: 1px solid var(--border);
  padding: 1px 8px;
  cursor: pointer;
  color: var(--ink);
}

.music-btn:hover { background: var(--ink); color: var(--bg); }

.music-track {
  color: var(--teal);
  min-width: 80px;
}

.music-tracks {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-left: 1px solid #ccc;
  padding-left: 10px;
}

.music-tracks button {
  font-family: 'VT323', monospace;
  font-size: 0.95rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 0;
  letter-spacing: 1px;
}

.music-tracks button:hover { color: var(--red); }
.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 70px;
  height: 3px;
  background: var(--border);
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  background: var(--ink);
  cursor: pointer;
}

.volume-slider::-moz-range-thumb {
  width: 10px;
  height: 10px;
  background: var(--ink);
  border: none;
  cursor: pointer;
}

.music-top-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-bar {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  background: #ccc;
  outline: none;
  cursor: pointer;
}

.progress-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  background: var(--teal);
  cursor: pointer;
}

.progress-bar::-moz-range-thumb {
  width: 10px;
  height: 10px;
  background: var(--teal);
  border: none;
  cursor: pointer;
}

.oguri {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 50px; /*how much is shown by default*/
  /*overflow: hidden;*/
  transition: width 0.4s ease, height 0.4s ease;
  cursor: default;
}

.oguri img {
  display: block;
  width: 150px;
  max-width: none;
  transform: translate(40%, 30%); /*how much is it hidden*/
  transition: transform 0.4s ease;
}

.oguri:hover img {
  transform: translate(-40%, 10%); /*how much revealed on hover*/
}