/* ===========================
   Reading Progress Bar
   =========================== */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #67a2c9, #a8d8ea);
  z-index: 9999;
  transition: width 0.1s linear;
}

body.dark .reading-progress {
  background: linear-gradient(90deg, #67a2c9, #4a90b8);
}

/* ===========================
   Terminal-style Code Blocks
   =========================== */
.post-content .highlight {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}

.post-content .highlight::before {
  content: "";
  display: block;
  background: #2d2d2d;
  padding: 8px 12px;
  border-bottom: 1px solid #444;
  position: relative;
}

body.dark .post-content .highlight::before {
  background: #1a1a2e;
  border-bottom-color: #333;
}

.post-content .highlight::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 12px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff5f56;
  box-shadow: 20px 0 0 #ffbd2e, 40px 0 0 #27c93f;
}

.post-content .highlight pre {
  margin-top: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

/* ===========================
   Typing Animation
   =========================== */
.typing-container {
  display: inline-block;
  font-size: inherit;
}

.typing-text {
  display: inline;
  border-right: 2px solid currentColor;
  animation: blink-caret 0.75s step-end infinite;
}

.typing-text.done {
  border-right-color: transparent;
  animation: blink-caret-fade 0.75s step-end infinite;
}

@keyframes blink-caret {
  from, to { border-color: currentColor; }
  50% { border-color: transparent; }
}

@keyframes blink-caret-fade {
  from, to { border-color: currentColor; }
  50% { border-color: transparent; }
}

/* ===========================
   Terminal Window (shared)
   =========================== */
.terminal-window {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.terminal-header {
  background: #2d2d2d;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27c93f; }

.terminal-title {
  color: #999;
  font-size: 0.8rem;
  margin-left: 8px;
}

.terminal-body {
  background: #1a1a2e;
  color: #e0e0e0;
  padding: 1.5rem;
  line-height: 1.8;
  font-size: 0.9rem;
}

body:not(.dark) .terminal-body {
  background: #2d2d2d;
}

.terminal-body .prompt {
  color: #27c93f;
}

.terminal-body .error {
  color: #ff5f56;
}

.terminal-body .info {
  color: #67a2c9;
}

.terminal-body .output {
  color: #ccc;
  padding-left: 1rem;
}

.terminal-body a {
  color: #a8d8ea;
  text-decoration: underline;
}

.terminal-body a:hover {
  color: #67a2c9;
}

.cursor-blink {
  animation: blink-caret 0.75s step-end infinite;
  border-right: 2px solid #27c93f;
  padding-right: 2px;
}

/* ===========================
   Custom 404 Page
   =========================== */
.terminal-404 {
  font-family: 'Fira Code', 'Courier New', monospace;
  max-width: 600px;
  margin: 2rem auto;
  padding: 2rem;
}

/* ===========================
   About Page
   =========================== */
.about-terminal {
  font-family: 'Fira Code', 'Courier New', monospace;
  margin-bottom: 2.5rem;
}

.about-terminal .terminal-body p {
  margin: 0.2rem 0;
}

/* Tech Stack Grid */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0 2.5rem;
}

.tech-card {
  border-radius: 8px;
  padding: 1.5rem;
  background: #1a1a2e;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tech-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

body:not(.dark) .tech-card {
  background: #2d2d2d;
}

.tech-card h4 {
  margin: 0 0 1rem;
  color: #27c93f;
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 0.9rem;
}

.tech-card h4::before {
  content: "# ";
  opacity: 0.5;
}

.tech-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.tech-icons img {
  height: 36px;
  width: auto;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease;
  filter: brightness(0.9);
}

body:not(.dark) .tech-icons img {
  filter: brightness(1.2);
}

.tech-icons img:hover {
  opacity: 1;
  transform: scale(1.15);
}

/* Contact CTA */
.contact-cta {
  font-family: 'Fira Code', 'Courier New', monospace;
  margin-top: 2.5rem;
}

.contact-cta .cta-text {
  color: #ccc;
  padding-left: 1rem;
}

.cta-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding-left: 1rem;
}

.cta-links a {
  color: #a8d8ea;
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  border: 1px solid #444;
  border-radius: 4px;
  font-size: 0.85rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.cta-links a:hover {
  border-color: #67a2c9;
  background: rgba(103, 162, 201, 0.1);
}
