/* Google Fonts - Inconsolata */
@import url('https://fonts.googleapis.com/css2?family=Inconsolata:wght@400;700&display=swap');

/* ===========================================
   Grid Layout
   =========================================== */
.grid-container {
  display: grid;
  grid-template-columns: auto auto auto;
}

.grid-item {
  padding: 20px;
  text-align: center;
}

.full-width {
  grid-column-start: 1;
  grid-column-end: 12;
}

.left-third {
  grid-column-start: 1;
  grid-column-end: 4;
}

.center-third {
  grid-column-start: 5;
  grid-column-end: 8;
}

.right-third {
  grid-column-start: 9;
  grid-column-end: 12;
}

/* ===========================================
   Base CRT Terminal Styling
   =========================================== */
body {
  background-color: black;
  background-image: radial-gradient(rgba(0, 150, 0, 0.75), black 120%);
  min-height: 100vh;
  margin: 0;
  padding: 2rem;
  color: white;
  font: 1.3rem Inconsolata, monospace;
  text-shadow: 0 0 5px #C8C8C8;
  overflow-x: hidden;
}

/* Scanlines overlay */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: repeating-linear-gradient(0deg,
      rgba(0, 0, 0, 0.15),
      rgba(0, 0, 0, 0.15) 1px,
      transparent 1px,
      transparent 2px);
  pointer-events: none;
  z-index: 9999;
}

/* CRT screen curvature effect */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    ellipse at center,
    transparent 0%,
    transparent 70%,
    rgba(0, 0, 0, 0.4) 100%
  );
  pointer-events: none;
  z-index: 9998;
}

::selection {
  background: #0080FF;
  text-shadow: none;
}

pre {
  margin: 0;
}

/* ===========================================
   Links
   =========================================== */
a:link,
a:visited {
  text-decoration: none;
  color: limegreen;
  position: relative;
  transition: all 0.2s ease;
}

a:hover {
  text-decoration: none;
  color: gainsboro;
  text-shadow: 0 0 10px limegreen;
}

/* Underline animation on hover */
a:not(.nav-link)::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: limegreen;
  box-shadow: 0 0 5px limegreen;
  transition: width 0.2s ease;
}

a:not(.nav-link):hover::after {
  width: 100%;
}

/* ===========================================
   Navigation
   =========================================== */
.nav-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  margin: 0 0.25rem;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.nav-link:hover {
  border-color: limegreen;
  box-shadow: 0 0 10px rgba(50, 205, 50, 0.3);
}

.nav-link.active {
  border-color: limegreen;
  background: rgba(50, 205, 50, 0.1);
}

/* ===========================================
   Lists
   =========================================== */
.list-unstyled {
  list-style: none;
  margin-left: 0;
  padding-left: 0;
}

/* Terminal-style list items */
.terminal-list {
  list-style: none;
  padding-left: 0;
}

.terminal-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(50, 205, 50, 0.2);
}

.terminal-list li::before {
  content: "> ";
  color: limegreen;
  opacity: 0.7;
}

.terminal-list li:hover {
  background: rgba(50, 205, 50, 0.1);
  padding-left: 0.5rem;
  transition: padding-left 0.2s ease;
}

/* ===========================================
   Images
   =========================================== */
img {
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(50, 205, 50, 0.3);
  transition: all 0.3s ease;
}

img:hover {
  box-shadow: 0 0 30px rgba(50, 205, 50, 0.5);
}

/* ===========================================
   Details/Summary (Collapsible sections)
   =========================================== */
details {
  margin: 1rem 0;
  padding: 0.5rem;
  border: 1px solid rgba(50, 205, 50, 0.3);
  background: rgba(0, 20, 0, 0.5);
}

summary {
  cursor: pointer;
  color: limegreen;
  padding: 0.5rem;
  transition: all 0.2s ease;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::marker {
  display: none;
  content: "";
}

summary:hover {
  background: rgba(50, 205, 50, 0.1);
  text-shadow: 0 0 10px limegreen;
}

summary::before {
  content: "[ ";
  opacity: 0.7;
}

summary::after {
  content: " ]";
  opacity: 0.7;
}

details[open] summary {
  border-bottom: 1px solid rgba(50, 205, 50, 0.3);
  margin-bottom: 0.5rem;
}

details p {
  padding: 0.5rem;
}

/* ===========================================
   Headings
   =========================================== */
h1, h2, h3, h4, h5, h6 {
  color: #33ff33;
  text-shadow: 0 0 10px #33ff33;
}

h1::before, h2::before {
  content: "> ";
  opacity: 0.7;
}

/* ===========================================
   Footer
   =========================================== */
.footer {
  margin-top: 2rem;
}

.footer hr {
  border: none;
  border-top: 1px solid rgba(50, 205, 50, 0.4);
  box-shadow: 0 0 5px rgba(50, 205, 50, 0.3);
}

/* ===========================================
   Terminal Window
   =========================================== */
.terminal-window {
  border: 2px solid limegreen;
  box-shadow: 0 0 10px rgba(50, 205, 50, 0.3),
              inset 0 0 50px rgba(0, 0, 0, 0.5);
  background: rgba(0, 10, 0, 0.95);
  padding: 1rem;
  margin: 1rem 0;
}

/* ===========================================
   Terminal Status Bar
   =========================================== */
.terminal-status-bar {
  background: rgba(50, 205, 50, 0.2);
  border-top: 1px solid rgba(50, 205, 50, 0.4);
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  color: limegreen;
  margin-top: 2rem;
}

/* ===========================================
   VT320 Terminal Interaction Effects
   =========================================== */

/* Blinking cursor */
.terminal-cursor {
  animation: cursor-blink 1s step-end infinite;
  color: limegreen;
  text-shadow: 0 0 10px limegreen;
}

@keyframes cursor-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Elements waiting for typing animation */
[data-terminal-type] {
  visibility: hidden;
}

/* Screen flash effects */
.screen-flash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10000;
  animation: flash-fade 0.15s ease-out forwards;
}

.screen-flash-navigate {
  background: rgba(50, 205, 50, 0.15);
}

.screen-flash-error {
  background: rgba(255, 0, 0, 0.2);
}

@keyframes flash-fade {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

/* Screen flicker effect */
.screen-flicker {
  animation: flicker 0.1s ease-in-out;
}

@keyframes flicker {
  0% { opacity: 1; }
  25% { opacity: 0.8; }
  50% { opacity: 0.9; }
  75% { opacity: 0.85; }
  100% { opacity: 1; }
}

/* Terminal beep visual feedback */
.terminal-beep {
  box-shadow: inset 0 0 100px rgba(255, 0, 0, 0.3);
}

/* Key click flash */
.key-click-flash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(50, 205, 50, 0.03);
  pointer-events: none;
  z-index: 10000;
}

/* Boot sequence styling */
.boot-line {
  font-family: 'Inconsolata', monospace;
  margin-bottom: 0.25rem;
  color: limegreen;
}

.boot-line::before {
  content: "> ";
  opacity: 0.7;
}

/* Terminal prompt styling */
.terminal-prompt {
  color: limegreen;
  font-family: 'Inconsolata', monospace;
}

.terminal-prompt::before {
  content: "$ ";
  opacity: 0.7;
}

/* VT320 green phosphor */
.phosphor-green {
  color: #33ff33 !important;
  text-shadow: 0 0 5px #33ff33, 0 0 10px #33ff33;
}

/* Page reveal animation */
.page-content {
  animation: page-reveal 0.5s ease-out;
}

@keyframes page-reveal {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scrollbar styling (webkit browsers) */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #000000;
}

::-webkit-scrollbar-thumb {
  background: rgba(50, 205, 50, 0.5);
  border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(50, 205, 50, 0.7);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(50, 205, 50, 0.5) #000000;
}

/* ===========================================
   Responsive
   =========================================== */
@media (max-width: 768px) {
  .grid-container {
    grid-template-columns: 1fr;
  }

  .left-third,
  .center-third,
  .right-third,
  .full-width {
    grid-column: 1 / -1;
  }

  .terminal-status-bar {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}
