@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

:root {
  --color-bg: #000;
  --color-fg: #0f0;
  --color-dim: #0a0;
  --color-accent: #0fff0f;
  --color-bg-alt: #010;
  --color-border: rgba(0, 102, 0, 0.6);
  --color-border-dark: rgba(0, 51, 0, 0.8);

  --font-main: 'Share Tech Mono', monospace;
  --font-size-base: clamp(10px, 1vw + 0.4rem, 14.4px);
  --font-size-header: clamp(14px, 1.5vw, 18px);

  --max-width: 1024px;
  --section-spacing: 2rem;
}

html {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--color-bg);
  color: var(--color-fg);
  font-family: var(--font-main);
  font-size: var(--font-size-base);
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  align-items: stretch;
}

header,
footer {
  background: var(--color-bg-alt);
  color: var(--color-fg);
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  box-sizing: border-box;
  padding: 6px 10px;
  user-select: none;
  flex-shrink: 0;
  text-align: center;
  font-size: var(--font-size-header);
  border-right: 1px solid var(--color-border);
}

header {
  font-family: 'Courier New', Courier, monospace;
  font-size: calc(var(--font-size-header) * 0.8);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 1rem;
}

header h1 {
  margin: 0;
  font-weight: normal;
  font-size: inherit;
}

footer {
  margin-top: auto;
  border-top: 1px solid var(--color-border);
  border-bottom: none;
  font-size: 12px;
  padding: 4px 10px;
  display: flex;
  justify-content: center;
  gap: 1rem;
  text-align: center;
}

footer a {
  color: var(--color-fg);
  text-decoration: none;
  font-size: 12px;
  transition: color 0.25s ease-in-out;
}

footer a:hover,
footer a:focus-visible {
  color: var(--color-accent);
  text-shadow: 0 0 5px var(--color-fg);
  outline: none;
}

main {
  flex: 1 0 auto;
  width: 100%;
  margin: 0;
  padding: 0 0 1rem 1rem;
  box-sizing: border-box;
}

section {
  margin-bottom: var(--section-spacing);
  width: 100%;
}

.line {
  margin: 0.15em 0;
  word-break: break-word;
  opacity: 0;
  transform: translateX(-5px);
  animation: typeIn 0.6s forwards;
}

.line:nth-child(1) { animation-delay: 0.1s; }
.line:nth-child(2) { animation-delay: 0.3s; }
.line:nth-child(3) { animation-delay: 0.5s; }

a {
  color: var(--color-fg);
  text-decoration: none;
  transition: color 0.25s ease-in-out;
}

a:hover,
a:focus-visible {
  text-decoration: none;
  color: var(--color-accent);
  text-shadow: 0 0 5px var(--color-fg);
  outline: none;
}

.status-block a {
  animation: none !important;
  position: static;
  color: var(--color-fg);
  text-shadow: none;
}

.status-block a:hover,
.status-block a:focus-visible {
  color: var(--color-fg);
  text-shadow: 0 0 3px var(--color-fg);
  outline: none;
}

.cursor {
  display: inline-block;
  background-color: var(--color-fg);
  width: 0.5ex;
  height: 1em;
  margin-left: 8px;
  animation: blink 1s ease-in-out infinite;
  vertical-align: bottom;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.dim {
  color: var(--color-dim);
}

.status-block {
  margin-top: 0.8em;
  padding: 0.8em 1em;
  border: 1px solid var(--color-border-dark);
  background: var(--color-bg-alt);
  word-break: break-word;
}

.tips-list {
  list-style-type: none;
  padding-left: 1em;
  margin: 0;
  color: var(--color-dim);
}

.tips-list li::before {
  content: "• ";
  color: var(--color-dim);
  margin-right: 0.3em;
}

.blog-block {
  margin-top: 0.8em;
  padding: 0.8em 1em;
  border: 1px solid var(--color-border-dark);
  background: var(--color-bg-alt);
  font-size: 0.9em;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.blog-entry {
  margin-bottom: 0.8em;
  transition: transform 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
  cursor: default;
}

.blog-entry:last-child {
  margin-bottom: 0;
}

.blog-entry:hover,
.blog-entry:focus-within {
  transform: scale(1.01);
  border-color: var(--color-fg);
  background-color: #020;
  outline: none;
}

.blog-title {
  font-weight: bold;
  color: var(--color-accent);
  margin-bottom: 0.15em;
  font-size: 1.1em;
}

.blog-description {
  color: var(--color-dim);
  font-style: italic;
  margin-left: 1em;
  font-size: 0.9em;
}

@media (max-width: 850px) {
  .container {
    max-width: 100%;
  }

  main {
    padding: 0 0.5rem 0.5rem 0.5rem;
  }

  header, footer {
    padding: 5px;
    font-size: clamp(13px, 3.5vw, 16px);
  }

  .blog-description {
    margin-left: 0.5em;
  }
}

@media (max-width: 600px) {
  .cursor {
    width: 6px;
    height: 0.9em;
  }

  .blog-description {
    font-size: 0.8em;
  }

  .blog-title {
    font-size: 1em;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

@keyframes fadeSlideIn {
  0% {
    opacity: 0;
    transform: translateY(15px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

section,
.status-block,
.blog-block {
  animation: fadeSlideIn 0.7s ease-out both;
}

a,
.blog-entry,
header,
footer,
.status-block,
.blog-description {
  transition: all 0.25s ease-in-out;
}

@keyframes typeIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

#terminal {
  font-family: var(--font-main);
  font-size: clamp(10px, 0.7vw + 0.3rem, 12px);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border-dark);
  padding: 1rem;
  max-height: 300px;
  overflow-y: auto;
}

#input-line {
  display: flex;
  align-items: center;
  margin-top: 0.5rem;
}

#terminal-input {
  flex-grow: 1;
  background: transparent;
  border: none;
  color: var(--color-fg);
  font-family: inherit;
  font-size: inherit;
  outline: none;
  padding-left: 0.6em;
  transition: background-color 0.3s ease, color 0.3s ease;
}

#terminal-input::selection {
  background: var(--color-fg);
  color: var(--color-bg);
}

#terminal-input:focus-visible {
  outline-offset: 2px;
}