/* ═══════════════════════════════════════════
   PESCIMORO.COM - MAIN STYLESHEET
   ═══════════════════════════════════════════ */

:root {
  --bg: #050505;
  --text: #e0e0e0;
  --muted: #555;
  --accent: #00ffc8;
  --rebel: #ff6b35;
  --dim: #444;
  --dimmer: #333;
  --subtle: #777;
  --body: #999;
  --border: #1a1a1a;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  position: relative;
  overflow-x: hidden;
}

/* ═══════════════════════════════════════════
   CANVAS LAYERS
   ═══════════════════════════════════════════ */
#system-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

#rebel-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

/* ═══════════════════════════════════════════
   CONTENT - Sinistra
   ═══════════════════════════════════════════ */
.content {
  width: 55%;
  min-height: 100vh;
  padding: 10vh 4rem 6vh 3rem;
  background: var(--bg);
  overflow-y: auto;
  position: relative;
  z-index: 5;
}

.content-404 {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ═══════════════════════════════════════════
   VISUAL - Destra
   ═══════════════════════════════════════════ */
.visual {
  width: 45%;
  position: fixed;
  right: 0;
  top: 0;
  height: 100vh;
  background: var(--bg);
}

/* ═══════════════════════════════════════════
   LINKS
   ═══════════════════════════════════════════ */
a {
  color: #fff;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent);
}

/* ═══════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════ */
.back-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  display: inline-block;
  margin-bottom: 2.5rem;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--accent);
}

.back-link .arrow {
  display: inline-block;
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1);
}

.back-link:hover .arrow {
  transform: translateX(-3px);
}

.nav-bottom {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.nav-bottom .back-link {
  margin-bottom: 0;
}

/* ═══════════════════════════════════════════
   PAGE HEADER
   ═══════════════════════════════════════════ */
.page-title {
  font-family: var(--font-mono);
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.page-description {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
}

/* ═══════════════════════════════════════════
   HEADER (Home)
   ═══════════════════════════════════════════ */
header {
  margin-bottom: 3.5rem;
}

.name {
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 4vw, 1.9rem);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.tagline {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.5;
}

.cycle-word {
  color: var(--text);
}

.cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent);
  margin-left: 1px;
  animation: blink 0.7s step-end infinite;
  vertical-align: text-bottom;
  font-weight: 500;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ═══════════════════════════════════════════
   SECTIONS
   ═══════════════════════════════════════════ */
section {
  margin-bottom: 2.5rem;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.5rem;
}

.section-content {
  font-size: 0.9rem;
  color: var(--body);
  line-height: 1.65;
}

.section-content p {
  margin-bottom: 0.35rem;
}

.dim {
  color: var(--dim);
}

.uncertain {
  color: var(--dim);
  font-style: italic;
}

/* ═══════════════════════════════════════════
   LOG LIST (Home)
   ═══════════════════════════════════════════ */
.log-list {
  list-style: none;
}

.log-list li {
  margin-bottom: 0.25rem;
}

.log-list a {
  color: var(--subtle);
  font-size: 0.9rem;
  transition: color 0.2s ease;
  position: relative;
  display: inline-block;
  padding-left: 0;
}

.log-list a::before {
  content: '› ';
  padding-right: 0.4rem;
  color: var(--muted);
  display: inline-block;
  transform: translateX(0);
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1), color 0.2s ease;
}

.log-list a:hover {
  color: var(--text);
}

.log-list a:hover::before {
  transform: translateX(2px);
  color: var(--accent);
}

.log-more {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.5rem;
  display: inline-block;
  opacity: 0.7;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.log-more:hover {
  color: var(--accent);
  opacity: 1;
}

.log-more .arrow {
  display: inline-block;
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1);
}

.log-more:hover .arrow {
  transform: translateX(3px);
}

/* ═══════════════════════════════════════════
   LOG LIST (Archive)
   ═══════════════════════════════════════════ */
.archive-list {
  list-style: none;
}

.archive-list li {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.archive-list li:last-child {
  border-bottom: none;
}

.archive-list a {
  color: var(--text);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s ease;
  display: block;
}

.archive-list a:hover {
  color: var(--accent);
}

.log-date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--dim);
  margin-top: 0.25rem;
}

/* ═══════════════════════════════════════════
   TRASMISSIONE
   ═══════════════════════════════════════════ */
.trasmissione {
  margin-top: 3rem;
  padding-top: 2rem;
}

.trasmissione-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.35rem;
}

.trasmissione-year {
  font-family: var(--font-mono);
  font-size: 2.4rem;
  color: var(--dim);
  margin-bottom: 1rem;
}

.trasmissione-form {
  display: flex;
  gap: 0.35rem;
  max-width: 280px;
  margin-bottom: 0.5rem;
}

.trasmissione-form input {
  flex: 1;
  background: rgba(0, 255, 200, 0.02);
  border: 1px solid var(--border);
  padding: 0.55rem 0.85rem;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  transition: all 0.2s ease;
}

.trasmissione-form input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(0, 255, 200, 0.05);
}

.trasmissione-form input::placeholder {
  color: var(--dimmer);
}

.trasmissione-form button {
  background: var(--accent);
  border: none;
  color: #000;
  padding: 0.55rem 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.trasmissione-form button:hover {
  background: var(--rebel);
  animation: syncGlitch 0.3s ease;
}

@keyframes syncGlitch {
  0% { 
    transform: translate(0); 
    background: var(--accent);
  }
  20% { 
    transform: translate(-2px, 1px); 
    background: var(--rebel);
  }
  40% { 
    transform: translate(2px, -1px); 
    background: var(--accent);
  }
  60% { 
    transform: translate(-1px, -1px); 
    background: var(--rebel);
  }
  80% { 
    transform: translate(1px, 1px); 
    background: var(--accent);
  }
  100% { 
    transform: translate(0); 
    background: var(--rebel);
  }
}

.trasmissione-note {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--dimmer);
}

/* ═══════════════════════════════════════════
   ARTICLE
   ═══════════════════════════════════════════ */
article {
  margin-bottom: 2rem;
}

.article-header {
  margin-bottom: 2rem;
}

.article-title {
  font-family: var(--font-mono);
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.article-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--dim);
}

.article-content {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.75;
}

.article-content p {
  margin-bottom: 1.25rem;
}

.article-content p:last-child {
  margin-bottom: 0;
}

.article-content a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.article-content a:hover {
  opacity: 0.8;
}

.article-content code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: rgba(0, 255, 200, 0.08);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

.article-content pre {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: rgba(0, 255, 200, 0.05);
  border: 1px solid var(--border);
  padding: 1rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  line-height: 1.5;
}

.article-content pre code {
  background: none;
  padding: 0;
}

.article-content blockquote {
  border-left: 2px solid var(--dim);
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: var(--body);
  font-style: italic;
}

.article-content ul, .article-content ol {
  margin: 1rem 0 1.25rem 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

/* ═══════════════════════════════════════════
   404 PAGE
   ═══════════════════════════════════════════ */
.error-code {
  font-family: var(--font-mono);
  font-size: clamp(4rem, 15vw, 8rem);
  font-weight: 500;
  color: var(--dim);
  line-height: 1;
  margin-bottom: 1rem;
}

.error-message {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--body);
  margin-bottom: 2rem;
}

.error-detail {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--dim);
  margin-bottom: 2.5rem;
  padding: 1rem;
  border: 1px solid var(--border);
}

.error-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - 16vh);
}

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--dim);
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-links a {
  color: var(--dim);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.25rem;
}

.status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--dimmer);
}

.dot-status {
  width: 4px;
  height: 4px;
  background: var(--accent);
  opacity: 0.5;
  animation: pulse 2s ease-in-out infinite;
}

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

.fish-status {
  cursor: default;
  color: var(--dimmer);
  transition: all 0.2s ease;
}

.fish-status:hover {
  opacity: 1;
  color: var(--accent);
}

.time-status {
  color: var(--dimmer);
}

.fish-status.swimming {
  animation: swimAway 0.6s ease-out forwards;
}

@keyframes swimAway {
  0% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(-30px); opacity: 0; }
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 900px) {
  .content {
    width: 100%;
    padding: 8vh 2rem 4vh;
  }
  .visual {
    display: none;
  }
  #system-canvas {
    opacity: 0.3;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .cursor { animation: none; opacity: 1; }
  .dot-status { animation: none; opacity: 0.5; }
}
