/* --- nova's room --- */
/* teal + amber + eb garamond */
/* light edition */

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

body {
  background: #f5efe6 url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" opacity="0.12"><line x1="0" y1="0" x2="12" y2="12" stroke="%235a8a7a" stroke-width="0.7"/><line x1="12" y1="0" x2="0" y2="12" stroke="%235a8a7a" stroke-width="0.7"/></svg>') repeat;
  color: #1a3330;
  font-family: 'EB Garamond', Georgia, 'Times New Roman', Times, serif;
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 10px;
}

/* --- main container --- */
table {
  max-width: 640px;
  width: 100%;
  border-collapse: collapse;
}

/* --- responsive --- */
@media (max-width: 600px) {
  body {
    padding: 15px 6px;
    font-size: 17px;
  }

  h1 {
    font-size: 24px;
    letter-spacing: 2px;
  }

  h1 span {
    font-size: 20px;
  }

  .section-box {
    padding: 14px;
  }

  .nav li {
    margin: 0 3px;
  }

  .nav li a {
    font-size: 14px;
    padding: 5px 10px;
  }

  .np-text {
    font-size: 14px;
  }

  .section-box p {
    font-size: 16px;
  }

  .post-body {
    font-size: 16px;
  }

  .post-summary {
    font-size: 15px;
  }

  .album-info {
    font-size: 15px;
  }
}

/* --- large screens --- */
@media (min-width: 1200px) {
  body {
    font-size: 18px;
    padding: 40px 20px;
  }

  table {
    max-width: 800px;
  }

  h1 {
    font-size: 34px;
  }

  .section-box {
    padding: 20px 24px;
  }

  .nav li a {
    font-size: 15px;
    padding: 6px 14px;
  }

  .post-body {
    font-size: 17px;
  }

  .np-text {
    font-size: 17px;
  }
}

/* --- header row --- */
.header-row td {
  text-align: center;
  padding-bottom: 20px;
}

h1 {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 30px;
  font-weight: 500;
  letter-spacing: 4px;
  color: #b8860b;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.05);
  font-style: italic;
}

h1 span {
  color: #5a8a7a;
  font-size: 24px;
  font-weight: 400;
}

.subtitle {
  color: #6b9a8a;
  font-size: 12px;
  letter-spacing: 3px;
  margin-top: 4px;
  font-style: italic;
}

/* --- section box --- */
.section-box {
  background: #faf6ef;
  border: 1px solid #dae3db;
  padding: 16px 18px;
  margin-bottom: 12px;
}

.section-box h2 {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 14px;
  font-weight: 600;
  color: #b8860b;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
  border-bottom: 1px solid #dae3db;
  padding-bottom: 6px;
}

.section-box p {
  margin-bottom: 8px;
}

.section-box p:last-child {
  margin-bottom: 0;
}

/* --- album list (weekly top) --- */
.album-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.album-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  background: #f2ece2;
  border: 1px solid #dae3db;
}

.album-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid #dae3db;
}

.album-thumb--empty {
  display: inline-block;
  background: #dae3db;
}

.album-info {
  font-size: 14px;
  line-height: 1.4;
}

.album-info strong {
  font-weight: 600;
}

.album-info em {
  font-style: italic;
}

.album-plays {
  color: #8aad9e;
  font-size: 12px;
  font-style: italic;
}

/* --- now playing --- */
.now-playing {
  padding: 8px 10px;
  background: #f2ece2;
  border: 1px inset #dae3db;
}

.np-inner {
  display: flex;
  align-items: center;
  gap: 8px;
}

.np-dot {
  width: 7px;
  height: 7px;
  background: #b8860b;
  display: inline-block;
  flex-shrink: 0;
}

.np-dot.playing {
  width: 14px;
  height: 14px;
  background: transparent;
  display: flex;
  align-items: end;
  gap: 2px;
}

.np-dot.playing::before,
.np-dot.playing::after {
  content: '';
  width: 3px;
  background: #b8860b;
  display: block;
}

.np-dot.playing::before {
  height: 10px;
  animation: eq1 0.6s ease-in-out infinite alternate;
}

.np-dot.playing::after {
  height: 14px;
  animation: eq3 0.45s ease-in-out infinite alternate;
}

.np-dot.playing .eq-bar {
  width: 3px;
  height: 6px;
  background: #b8860b;
  display: block;
  animation: eq2 0.5s ease-in-out infinite alternate;
}

@keyframes eq1 {
  0%   { height: 4px; }
  100% { height: 12px; }
}

@keyframes eq2 {
  0%   { height: 2px; }
  100% { height: 10px; }
}

@keyframes eq3 {
  0%   { height: 6px; }
  100% { height: 14px; }
}

.np-cover {
  width: 40px;
  height: 40px;
  border: 1px solid #dae3db;
  display: none;
  object-fit: cover;
  flex-shrink: 0;
}

.np-cover.show {
  display: block;
}

.blink {
  animation: pulse 1.2s step-end infinite;
}

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

.np-text {
  font-size: 15px;
  color: #5a8a7a;
  font-style: italic;
}

.np-text strong {
  color: #1a3330;
  font-weight: 600;
  font-style: normal;
}

.np-ago {
  color: #8aad9e;
  font-size: 13px;
  white-space: nowrap;
  font-style: italic;
}

/* --- links --- */
.nav-row td {
  text-align: center;
  padding: 15px 0 18px 0;
  border-bottom: 1px solid #dae3db;
}

.nav {
  list-style: none;
  display: inline;
}

.nav li {
  display: inline;
  margin: 0 5px;
}

.nav li a {
  color: #5a8a7a;
  text-decoration: none;
  font-size: 14px;
  padding: 4px 12px;
  border: 1px solid #dae3db;
  background: #faf6ef;
  font-family: 'EB Garamond', Georgia, serif;
  font-style: italic;
}

.nav li a:hover {
  color: #b8860b;
  border-color: #b8860b;
  background: #f5efe6;
}

.nav li a.active {
  color: #b8860b;
  border-color: #b8860b;
  background: #f5efe6;
  cursor: default;
  pointer-events: none;
}

/* --- footer --- */
.footer-row td {
  text-align: center;
  padding: 15px 0 10px 0;
  color: #8aad9e;
  font-size: 12px;
  font-style: italic;
}

/* --- links in content --- */
a {
  color: #5a8a7a;
}

a:hover {
  color: #b8860b;
}

/* --- inline styles --- */
strong {
  color: #1a3330;
  font-weight: 600;
}

em {
  color: #5a8a7a;
}

/* --- journal / blog --- */
.post-index {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-entry {
  border-bottom: 1px solid #dae3db;
  padding: 10px 0;
}

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

.post-header {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 4px 0;
  user-select: none;
}

.post-header:hover .post-title {
  color: #b8860b;
}

.post-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a3330;
  font-style: italic;
  transition: color 0.15s;
}

.post-date {
  font-size: 12px;
  color: #8aad9e;
  white-space: nowrap;
  font-style: italic;
  flex-shrink: 0;
}

.post-summary {
  font-size: 14px;
  color: #5a8a7a;
  font-style: italic;
  margin-top: 2px;
}

.post-body {
  margin-top: 10px;
  padding: 10px 12px;
  background: #f2ece2;
  border: 1px inset #dae3db;
  font-size: 15px;
  line-height: 1.6;
}

.post-body.collapsed {
  display: none;
}

.post-body p {
  margin-bottom: 10px;
}

.post-body p:last-child {
  margin-bottom: 0;
}

.post-body strong {
  font-weight: 600;
}

.post-body em {
  color: #1a3330;
}

.post-body img {
  max-width: 100%;
  height: auto;
  border: 1px solid #dae3db;
  margin: 8px 0;
  display: block;
  cursor: zoom-in;
}

.post-timestamp {
  text-align: right;
  font-size: 12px;
  color: #8aad9e;
  font-style: italic;
  margin-top: 12px;
  padding-top: 6px;
  border-top: 1px solid #dae3db;
}

/* --- photo gallery --- */
.gallery {
  margin: 12px 0;
  border: 1px solid #dae3db;
  background: #faf7f2;
  overflow: hidden;
}

.gallery img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  cursor: zoom-in;
  border: none;
}

.gallery-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 8px;
  border-top: 1px solid #dae3db;
}

.gallery-btn {
  background: #1a3330;
  color: #f2ece2;
  border: none;
  padding: 4px 14px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
  border-radius: 2px;
}

.gallery-btn:hover:not(:disabled) {
  background: #b8860b;
}

.gallery-btn:active:not(:disabled) {
  background: #a0700a;
}

.gallery-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.gallery-btn:focus-visible {
  outline: 2px solid #b8860b;
  outline-offset: 2px;
}

.gallery-counter {
  font-size: 13px;
  color: #5a8a7a;
  font-style: italic;
  min-width: 60px;
  text-align: center;
}

.gallery:focus-visible {
  outline: 2px solid #b8860b;
  outline-offset: 2px;
}

/* --- footnotes --- */
.fn-sep {
  border: none;
  border-top: 1px solid #dae3db;
  margin: 20px 0 10px;
  max-width: 200px;
}

.footnotes {
  margin: 0;
  padding: 0 0 0 24px;
  font-size: 14px;
  color: #5a8a7a;
}

.footnotes li {
  margin-bottom: 6px;
}

.footnotes li:target {
  background: #e8e0d4;
  padding: 2px 6px;
  border-radius: 2px;
}

.fnref {
  color: #b8860b;
  text-decoration: none;
  font-style: italic;
  font-weight: 600;
}

.fnref:hover {
  color: #b8860b;
}

.fn-back {
  color: #8aad9e;
  text-decoration: none;
  font-size: 13px;
}

.fn-back:hover {
  color: #b8860b;
}

/* --- lightbox --- */
.lightbox {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  cursor: zoom-out;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border: 2px solid #dae3db;
}

.lightbox-controls {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(0,0,0,0.6);
  padding: 6px 16px;
  border-radius: 3px;
  pointer-events: auto;
}

.lightbox-counter {
  color: #f2ece2;
  font-family: 'EB Garamond', serif;
  font-size: 14px;
  font-style: italic;
  min-width: 60px;
  text-align: center;
  pointer-events: none;
}
