@import url('https://fonts.googleapis.com/css2?family=Schibsted+Grotesk:ital,wght@0,400..900;1,400..900&family=VT323&display=swap');


/* Reset / Base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: linear-gradient(145deg, #f9f9f9, #e0e0e0);
  font-family: "Schibsted Grotesk", sans-serif;
  font-optical-sizing: auto;
  font-weight: normal;
  font-style: normal;
  text-align: center;
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

/* Layout: Header, Nav, Container */
header {
  background: transparent;
  box-shadow: none;
  padding: 20px;
}

nav {
  /*background-color: #c10f0f;*/
  background: transparent;
  box-shadow: none;
  height: 50px;
  box-shadow: 0 8px 8px rgba(0, 0, 0, 0.1);
}

.nav-links {
  list-style: none;
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  padding: 0;
  margin: 0;
  height: 50px;
}

.nav-links li {
  flex: 1;
}

.nav-links li a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: black;
  text-decoration: none;
  font-family: 'VT323', monospace;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.nav-links li a:hover {
  color: #00FF00;
  background-color: #013220;
  animation: crt-flicker 2s infinite;
}

.container {
  background: transparent;
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

main {
  padding: 20px 0;
}

/* Articles Grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 250px));
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

/* Article Cards */
.post-preview {
  background-color: #fefefe;
  border: 0px solid #ddd;
  box-shadow: 8px 8px 0px #a60a0a;
  border-radius: 6px;
  padding: 20px;
  height: 93%;
  margin-bottom: 20px;
  transition: box-shadow 0.3s ease;
  position: relative;
  z-index: 2;
}

.post-preview:hover {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.post-preview h2 {
  margin-top: 0;
  font-size: 1.5em;
}

.post-preview a {
  text-decoration: none;
  color: #333;
}

.post-preview a:hover {
  text-decoration: underline;
}

.post-image {
  width:100%;
  padding: 0px;
  border-radius: 6px;
}

.summary {
  color: #666;
  font-size: 0.95em;
  padding: 10px;
}

.cd-preview {
  background: linear-gradient(145deg, #f9f9f9, #e0e0e0);
  box-shadow: 8px 8px 0px #013220, inset 0 0 5px rgba(0,0,0,0.1);
  border-radius: 6px;
  padding: 20px;
  transition: box-shadow 0.3s ease, background 0.3s ease;
  position: relative;
  min-height: 170px;
  z-index: 1;
}

.cd-wrapper {
  position: relative;
  display: inline-block;
  margin-top: 70px;
}

.cd-wrapper a,
.cd-wrapper a:visited,
.cd-wrapper a:hover,
.cd-wrapper a:active {
  color: inherit;
  text-decoration: none;
}

.cd-wrapper:hover .cd-disc {
  top: 0px;
  transform: translateX(-50%) 'rotate(90deg)';
  transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.26, 1/55), top 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.cd-disc {
  position: absolute;
  top: -43%;
  left: 50%;
  transform: translateX(-50%);
  width: 80%; /* or smaller if you want */
  max-width: 200px; /* just in case */
  transition: transform 0.5s ease, top 0.5s ease;
  z-index: 0;
  pointer-events: none;
}

.cd-preview::before {
  content: "";
  position: absolute;
  top: 8px; /* position near top */
  left: 10%;
  width: 80%;
  height: 4px;
  background: #ccc;
  border-radius: 2px;
  opacity: 0.6;
}


/*.cd-preview::after {
  content: "";
  position:absolute;
  bottom: 10px;
  right: 10px;
  width: 12px;
  height: 12px;
  background-color: grey;
  border-radius: 50%;
  transition: background-color 0.4s ease;
  z-index: 1;
}*/



.cd-preview:hover {
  background: linear-gradient(145deg, #eeeeee, #dcdcdc);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1), inset 0 0 5px rgba(0,0,0,0.15);
}

.cd-preview:hover:after {
  background-color: green;
}

.screw {
  position: absolute;
  width: 50px;
  height: 20px;
  object-fit: contain;
  pointer-events: none;
  z-index: 5;
}

.screw.top-left {
  top: 8px;
  left: -10px;
}

.screw.top-right {
  top: 8px;
  right: -10px;
}

.screw.bottom-left {
  bottom: 8px;
  left: -10px;
}

.screw.bottom-right {
  bottom: 8px;
  right: -10px;
}

.cd-light-button {
  position: absolute;
  bottom: 40px;
  right: 10px;
  width: 14px;
  height: 26px;
  background-color: #013220;
  border-radius: 4px;
  transition: background-color 0.4s ease;
  z-index: 4;
  box-shadow: inset 0px 0px 8px rgba(0, 0, 0, 0.4);
  animation: crt-flicker 2s infinite;;
}

.cd-preview:hover .cd-light-button {
  background-color: #00FF00;
  animation: pulseGlow 1.2s infinite;
}

.cd-loading-screen {
  position: absolute;
  bottom: 20px;
  left: 51%;
  transform: translateX(-50%);
  width: 100px;
  height: 20px;
  background-color: #013220; /* Dark green screen background */
  color: #00FF00;
  font-size: 10px;
  font-family: monospace;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  z-index: 5;
  overflow: hidden;
  animation: crt-flicker 2s infinite;
}

.cd-loading-screen::after {
  content: "Reading Disk...";
  color: #00FF00;
  opacity: 0;
  font-size: 10px;
  font-family: monospace;
  transition: opacity 0.2s ease-in;
}

.cd-preview:hover .cd-loading-screen::after {
  opacity: 1;
  
}

@keyframes crt-flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
    opacity: 1;
  }
  20%, 22%, 24%, 55% {
    opacity: 0.8;
  }
}

@keyframes pulseGlow {
  0% {
    box-shadow: inset 0px 0px 8px rgba(0, 0, 0, 0.4), 0 0 5px limegreen;
  }
  50% {
    box-shadow: inset 0px 0px 8px rgba(0, 0, 0, 0.4), 0 0 15px limegreen;
  }
  100% {
    box-shadow: inset 0px 0px 8px rgba(0, 0, 0, 0.4), 0 0 5px limegreen;
  }
}

/* CRT Logo Style (based on .cd-loading-screen) */
.crt-logo-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 8px 16px;
  font-family: 'VT323', monospace;
  font-weight: 200;
  font-size: 50px;
  color: #00FF00;
  background-color: #013220; /* same dark green as CD screen */
  border-radius: 7px;
  animation: crt-flicker 2s infinite;
  text-transform: uppercase;
  box-shadow: 0 0 15px rgba(0, 255, 0, 0.6), 0 0 25px black;
}

/* Blinking caret for typing feel */
.blinking-caret {
  margin-left: 4px;
  animation: blink 1s step-start infinite;
  color: #00FF00;
}

.crt-container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60vh;
  background: linear-gradient(145deg, #f9f9f9, #e0e0e0);
  /*box-shadow: 0 0 25px rgba(0, 255, 0, 0.2);*/
}

.crt-screen {
  background-color: #000;
  color: #00FF00;
  font-family: 'VT323', monospace;
  font-size: 1.5rem;
  padding: 2rem;
  box-shadow: 0 0 15px rgba(0, 255, 0, 0.6), 0 0 25px black;
  width: 90%;
  max-width: 600px;
  min-height: 300px;
  line-height: 1.5;
  border-radius: 12px;
  word-wrap: break-word; /* Allow words to break if they're too long */
  overflow: hidden; /* Prevent the container from overflowing */
  text-align: left; /* Ensure text is aligned properly */
  overflow-wrap: break-word;
  white-space: normal;
  animation: crt-flicker 2s infinite;
}

.crt-screen p {
  margin: 0.5rem 0;
  white-space: pre-wrap;
}

.blink {
  animation: blink 1s step-start infinite;
}

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

/* Flicker effect */
@keyframes crt-flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
    opacity: 1;
  }
  20%, 22%, 24%, 55% {
    opacity: 0.85;
  }
}

/* Caret blinking animation */
@keyframes blink {
  from, to {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}

/* Article + Sidebar Layout */
.article-layout {
  display: flex;
  gap: 20px;
}

.main-article {
  flex: 2;
  text-align: left;
}

.sidebar {
  flex: 1;
  background-color: #f9f9f9;
  padding: 15px;
  border-left: 1px solid #ddd;
}

.sidebar ul {
  list-style: none;
  padding: 0;
}

.sidebar li {
  margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 768px) {
  .article-layout {
    flex-direction: column;
  }

  .sidebar {
    border-left: none;
    border-top: 1px solid #ddd;
  }
}

footer {
  text-align: center;
  padding: 20px;
  font-family: 'VT323', monospace;
  background-color: #000;
  color: #00FF00;
  box-shadow: 0 -5px 15px rgba(0, 255, 0, 0.2);
}

figure {
  font-size: 12px;
  color: #333;
  font-style: italic;
}