/* Patrick Somerville - BBS-Style Author Homepage */
/* Main Styles */

:root {
  --main-bg-color: #0c0c0c;
  --text-color: #33ff33;
  --text-color-dim: #1a8c1a;
  --text-color-bright: #5fff5f;
  --link-color: #33ff33;
  --link-hover-color: #ffffff;
  --header-color: #5fff5f;
  --border-color: #33ff33;
  --terminal-bg: #0c0c0c;
  --selection-bg: #33ff33;
  --selection-text: #000000;
}

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

@font-face {
  font-family: 'VT323';
  src: url('https://fonts.googleapis.com/css2?family=VT323&display=swap');
}

body {
  background-color: var(--main-bg-color);
  color: var(--text-color);
  font-family: 'VT323', 'Courier New', monospace;
  font-size: 18px;
  line-height: 1.5;
  padding: 20px;
  max-width: 1000px;
  margin: 0 auto;
  overflow-x: hidden;
}

/* Terminal effect */
.terminal {
  position: relative;
  padding: 20px;
  background-color: var(--terminal-bg);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  margin-bottom: 30px;
  overflow: hidden;
}

.terminal::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 25px;
  background-color: var(--border-color);
  opacity: 0.2;
}

.terminal::after {
  content: "Patrick Somerville - Terminal";
  position: absolute;
  top: 5px;
  left: 10px;
  font-size: 14px;
  color: var(--main-bg-color);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--header-color);
  margin-bottom: 15px;
  font-weight: normal;
}

h1 {
  font-size: 2.5em;
  text-align: center;
  margin: 30px 0;
  text-transform: uppercase;
  letter-spacing: 2px;
}

h2 {
  font-size: 1.8em;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 5px;
  margin-top: 40px;
}

h3 {
  font-size: 1.5em;
  margin-top: 25px;
}

p {
  margin-bottom: 20px;
}

a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.3s ease;
  position: relative;
}

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

a::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 1px;
  bottom: -2px;
  left: 0;
  background-color: var(--link-hover-color);
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.3s ease;
}

a:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* Selection styling */
::selection {
  background-color: var(--selection-bg);
  color: var(--selection-text);
}

/* Navigation */
.nav {
  margin: 30px 0;
  text-align: center;
}

.nav a {
  display: inline-block;
  margin: 0 15px;
  padding: 5px 10px;
  border: 1px solid var(--border-color);
  border-radius: 3px;
}

.nav a:hover {
  background-color: var(--border-color);
  color: var(--main-bg-color);
}

/* Command prompt styling */
.prompt {
  color: var(--text-color-bright);
  font-weight: bold;
}

.command {
  position: relative;
  padding-left: 20px;
  margin-bottom: 15px;
}

.command::before {
  content: ">";
  position: absolute;
  left: 0;
  color: var(--text-color-bright);
}

/* ASCII Art */
.ascii-art {
  font-family: monospace;
  white-space: pre;
  line-height: 1.2;
  margin: 20px 0;
  color: var(--text-color-bright);
  text-align: center;
}

/* Project cards */
.project-card {
  border: 1px solid var(--border-color);
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 3px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(51, 255, 51, 0.2);
}

.project-title {
  font-size: 1.3em;
  color: var(--text-color-bright);
  margin-bottom: 10px;
}

.project-details {
  font-size: 0.9em;
  color: var(--text-color-dim);
  margin-bottom: 10px;
}

/* Footer */
footer {
  margin-top: 50px;
  text-align: center;
  padding: 20px;
  border-top: 1px solid var(--border-color);
  font-size: 0.9em;
}

/* Blinking cursor effect */
.cursor {
  display: inline-block;
  width: 10px;
  height: 20px;
  background-color: var(--text-color);
  animation: blink 1s step-end infinite;
  vertical-align: middle;
  margin-left: 5px;
}

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

/* Typing effect */
.typing {
  overflow: hidden;
  white-space: nowrap;
  border-right: 3px solid var(--text-color);
  animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: var(--text-color) }
}

/* Responsive design */
@media (max-width: 768px) {
  body {
    font-size: 16px;
    padding: 15px;
  }
  
  .terminal {
    padding: 15px;
  }
  
  h1 {
    font-size: 2em;
  }
  
  h2 {
    font-size: 1.5em;
  }
  
  .nav a {
    margin: 5px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 14px;
    padding: 10px;
  }
  
  .terminal {
    padding: 10px;
  }
  
  h1 {
    font-size: 1.8em;
  }
  
  h2 {
    font-size: 1.3em;
  }
  
  .nav {
    display: flex;
    flex-direction: column;
  }
  
  .nav a {
    margin: 5px 0;
  }
}

/* Scanlines effect */
.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 50%,
    rgba(0, 0, 0, 0.1) 50%
  );
  background-size: 100% 4px;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.15;
}

/* CRT effect */
.crt-effect {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    ellipse at center,
    transparent 0%,
    rgba(0, 0, 0, 0.2) 100%
  );
  pointer-events: none;
  z-index: 9998;
}

/* Hidden content (Easter eggs) */
.hidden {
  display: none;
}

.easter-egg:hover .hidden {
  display: block;
  color: var(--text-color-bright);
  font-style: italic;
  margin-top: 10px;
}

/* Book/Work styling */
.book {
  margin-bottom: 30px;
}

.book-title {
  font-size: 1.2em;
  color: var(--text-color-bright);
}

.book-year {
  color: var(--text-color-dim);
  font-size: 0.9em;
}

.book-description {
  margin-top: 10px;
}

/* Quote styling */
blockquote {
  border-left: 3px solid var(--border-color);
  padding-left: 20px;
  margin: 20px 0;
  font-style: italic;
  color: var(--text-color-dim);
}

/* Section dividers */
.divider {
  text-align: center;
  margin: 30px 0;
  color: var(--text-color-dim);
}

/* Loading animation */
.loading {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 20px;
}

.loading::after {
  content: " ";
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-color);
  animation: loading 1.2s linear infinite;
}

@keyframes loading {
  0% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(70px);
  }
  100% {
    transform: translateX(0);
  }
}