 /* ========= PALETTE =========
       Grigio tastiera:    #C2C2B5
       Grigio scuro:       #73746B
       Verde terminale:    #4A6642
       Nero:               #000000
    ============================ */

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

    body {
    font-family: "Press Start 2P", monospace;
    background-color: #0D0F0D;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
  }


  .crt-frame {
  width: 100%;
  min-height: 100vh;
  background-color: #C2C2B5;
  border: 4px solid #73746B;
  padding: 0; /* togli padding per evitare spazi strani */
  display: flex;
}




    /* Effetto bordo interno tipo finestra vecchio OS */
    .inner-frame {
      display: flex;
      flex-direction: column;
      flex: 1;
      padding: 16px;
    } 

    main {
      flex: 1;
    }


    /* HEADER */

    header {
      background-color: #4A6642;
      border: 2px solid #000000;
      padding: 14px 100px 10px 16px;
      margin-bottom: 12px;
      position: relative;
      overflow: visible;
    }

    /* social icons in header */
    .header-social-container {
      position: absolute;
      top: 10px;
      right: 12px;
      display: flex;
      gap: 8px;
      flex-direction: row;
      flex-wrap: nowrap;
      z-index: 10;
      width: auto;
    }
    .header-social {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 36px;
      height: 36px;
      background: #C2C2B5;
      border: 2px solid #73746B;
      box-shadow: 2px 2px 0 #000000;
      text-decoration: none;
    }
    .header-social svg { fill: #4A6642; width:20px; height:20px; }
    .header-social:hover { background: #4A6642; }
    .header-social:hover svg { fill: #C2C2B5; }

    .site-title {
      font-family: "Press Start 2P", monospace;
      font-size: 50px;
      color: #000000;
      text-align: center;
      letter-spacing: 2px;
      margin-bottom: 10px;
    }

    .site-subtitle {
      font-family: "Press Start 2P", monospace;
      font-size: 11px;
      text-align: center;
      color: #C2C2B5;
    }

    #whoami{
      font-family: "Press Start 2P", monospace;
      font-size: 13px;
      line-height: 1.4;
      color: #000000;
    }

    /* MENU */

    nav {
      margin-top: 10px;
      display: flex;
      justify-content: center;
      gap: 8px;
      flex-wrap: wrap;
    }

    nav a {
      font-family: "Press Start 2P", monospace;
      font-size: 10px;
      text-decoration: none;
      color: #000000;
      background-color: #C2C2B5;
      border: 2px solid #73746B;
      padding: 6px 10px;
      text-transform: uppercase;
      box-shadow: 2px 2px 0 #000000;
    }

    nav a:hover {
      background-color: #4A6642;
      color: #C2C2B5;
    }

    /* LAYOUT PRINCIPALE */

    main {
      margin-top: 14px;
      display: grid;
      grid-template-columns: 2fr 1fr;
      gap: 14px;
    }

    @media (max-width: 800px) {
      main {
        grid-template-columns: 1fr;
      }
    }

    /* Responsive tweaks */
    @media (max-width: 800px) {
      .site-title { font-size: 28px; }
      nav a { font-size: 11px; padding: 6px 8px; }
      .panel-title { font-size: 14px; }
      .panel-text { font-size: 14px; }
      .logo-box img { width: 150px; }
      .header-social {
        position: static;
        margin: 8px auto 0 auto;
        width: 36px;
        height: 36px;
      }
      .header-social svg { width:18px; height:18px; }
    }

    @media (max-width: 480px) {
      .site-title { font-size: 24px; }
      nav a { font-size: 10px; padding: 6px 6px; }
      .panel-title { font-size: 13px; }
      .panel-text { font-size: 13px; }
      .header-social { width: 40px; height: 40px; }
      .header-social svg { width:20px; height:20px; }
    }

    /* BOX GENERICO */

    .panel {
      display: flex;
      flex-direction: column;
      border: 2px solid #73746B;
      background-color: #C2C2B5;
      padding: 10px;
    }

    .panel-header {
      font-family: "Press Start 2P", monospace;
      font-size: 11px;
      color: #4A6642;
      border-bottom: 2px solid #73746B;
      padding-bottom: 6px;
      margin-bottom: 8px;
      text-transform: uppercase;
    }

    .panel-title {
      font-weight: bold;
      margin-bottom: 6px;
      font-size: 15px;
    }

    .panel-meta {
      font-size: 11px;
      color: #4A6642;
      margin-bottom: 8px;
      
    }

    .panel-text {
      font-size: 13px;
      line-height: 1.4;
      color: #000000;
    }
    /* Markdown preview inside homepage cards */
    .panel-text p { margin-bottom: 10px; }
    .panel-text h1, .panel-text h2, .panel-text h3, .panel-text h4, .panel-text h5, .panel-text h6 {
      font-family: "Press Start 2P", monospace;
      color: #000000;
      margin-top: 12px;
      margin-bottom: 8px;
    }
    .panel-text h1 { font-size: 16px; }
    .panel-text h2 { font-size: 14px; }
    .panel-text h3 { font-size: 13px; }
    .panel-text h4 { font-size: 12px; }
    .panel-text h5 { font-size: 11px; }
    .panel-text h6 { font-size: 11px; }
    .panel-text ul, .panel-text ol { margin-left: 20px; margin-bottom: 10px; }
    .panel-text li { margin-bottom: 6px; }
    .panel-text em { font-style: italic; color: #000000; }
    .panel-text strong { font-weight: bold; color: #4A6642; }
    .panel-text code {
      display: inline;
      background-color: #e6e6d9;
      padding: 1px 3px;
      border: 1px solid #b6b6a8;
      border-radius: 2px;
      font-family: monospace;
      font-size: 11px;
    }
    .panel-text pre {
      background-color: #dcdcd0;
      border: 2px solid #73746B;
      padding: 8px;
      overflow-x: auto;
      margin-bottom: 12px;
    }

    /* IMMAGINE PLACEHOLDER */

    .postContainer{
      border: 2px solid #73746B;
      background-color: #C2C2B5;
      padding: 10px;
      margin-top: 10px;
      flex: 1 1 auto;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }

    .post-image {
      width: 100%;
      height: 190px;
      border: 2px solid #73746B;
      background: repeating-linear-gradient(
        45deg,
        #C2C2B5,
        #C2C2B5 6px,
        #A5A59A 6px,
        #A5A59A 12px
      );
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 10px;
      position: relative;
      overflow: hidden;
    }

    .post-image-label {
      font-family: "Press Start 2P", monospace;
      font-size: 10px;
      background-color: rgba(0,0,0,0.6);
      color: #C2C2B5;
      padding: 4px 6px;
    }

    /* BOTTONE RETRO */

    .btn-retro {
      display: inline-block;
      margin-top: 10px;
      margin-bottom: 10px;
      font-family: "Press Start 2P", monospace;
      font-size: 10px;
      text-decoration: none;
      color: #4A6642;
      border: 2px solid #73746B;
      padding: 6px 12px;
      background-color: #C2C2B5;
      box-shadow: 3px 3px 0 #000000;
      text-transform: uppercase;
    }

    .btn-retro:hover {
      background-color: #4A6642;
      color: #C2C2B5;
    }

    /* COLONNA DESTRA */

    .sidebar-panel {
      margin-bottom: 12px;
    }

    /* FOOTER */

    footer {
      margin-top: auto;
      border-top: 2px solid #73746B;
      padding-top: 8px;
      font-size: 11px;
      text-align: center;
      color: #000000;
    }

    footer span {
      color: #4A6642;
    }

   .menu-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    }

  .menu-link {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 12px;
    font-family: 'Press Start 2P', monospace;
    font-size: 12px;
    background-color: #C2C2B5;
    border: 2px solid #73746B;
    color: #000000;
    text-decoration: none;
    box-shadow: 2px 2px 0 #000000;
  }

  .menu-link:hover {
    background-color: #4A6642;
    color: #C2C2B5;
  }

  /*Logo MRobot*/
  .logo-box {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 100px;
  }

  .logo-box img {
    width: 200px; /* dimensione media */
    height: auto;
    border: 1px solid #73746B;
    background-color: #C2C2B5;
    box-shadow: 2px 2px 0 #000000;
    opacity: 0.95;
  }

/* -----------------------------
   Comprehensive responsive rules
   Breakpoints: 1200, 992, 800, 640, 480, 360
   ----------------------------- */

:root{
  --container-max: 1200px;
  --gutter: 14px;
}

/* Center the outer frame and limit width */
.crt-frame{
  /* keep full-width on desktop - do not constrain with max-width */
  max-width: none;
  margin: 0;
  box-sizing: border-box;
  width: 100%;
}

/* Header layout: title centered, nav below; instagram top-right on desktop */
header{
  position: relative;
  display: block;
  width: 100%;
}
.site-title{
  text-align: center;
  display: block;
}
.header-social{
  position: absolute;
  top: 12px;
  right: 16px;
}

/* Make nav horizontal up to medium screens */
nav{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; }

/* Ensure panels use full width inside columns */
.panel, .sidebar-panel { box-sizing: border-box; }

/* Touch targets: increase clickable size on small screens */
.btn-retro, nav a, .menu-link { min-height:40px; padding:10px 12px; }

/* Breakpoint: large tablets / small desktops */
@media (max-width: 1200px){
  :root{ --container-max: 1000px; }
  .site-title{ font-size:44px; }
}

/* Breakpoint: medium screens */
@media (max-width: 992px){
  :root{ --container-max: 860px; }
  .site-title{ font-size:40px; }
  .logo-box img{ width:180px; }
}

/* Breakpoint: tablets and small laptops */
@media (max-width: 800px){
  main{ grid-template-columns: 1fr; }
  /* keep header stacked on small screens */
  header{ display: flex; flex-direction: column; align-items: center; }
  .site-title{ text-align: center; font-size: 28px; }
  nav{ width: 100%; justify-content: center; order: 2; margin-top: 6px; }
  /* make social icon part of the flow on mobile */
  .header-social{ position: static; order: 3; margin-top: 8px; }
  .panel{ width: 100%; }
  .post-image{ height: 150px; }
  .logo-box{ padding: 48px 12px; }
}

/* Breakpoint: phones */
@media (max-width: 640px){
  .site-title{ font-size:24px; }
  nav{ flex-direction:column; gap:6px; }
  nav a{ width:100%; text-align:center; }
  .menu-link{ width:100%; }
  .post-image{ height:120px; }
  .logo-box{ padding:32px 8px; }
  .panel-header{ font-size:12px; }
}

/* Breakpoint: small phones */
@media (max-width: 480px){
  .site-title{ font-size:20px; }
  nav a{ font-size:12px; padding:10px; }
  .btn-retro{ padding:10px 14px; }
  .post-image{ height:100px; }
  .logo-box{ padding:20px 6px; }
}

/* Very small screens (older phones) */
@media (max-width: 360px){
  .site-title{ font-size:18px; }
  nav a{ font-size:11px; padding:8px; }
  .panel-text{ font-size:12px; }
  .post-image{ height:90px; }
}

/* Utility: make images responsive inside post-image */
.post-image img{ max-width:100%; height:auto; display:block; }