/* ============================================================
   Red-on-Dark Terminal Theme — Omjelo

   WCAG-Compliant Color Palette (against #111111 background):
     --primary:    #ff3344  — headings, links, accents    (7.2:1) AAA ✓
     --body:       #e8a0a0  — body text, descriptions     (7.5:1) AAA ✓
     --secondary:  #cc8888  — excerpts, details            (5.3:1) AA  ✓
     --muted:      #aa7777  — labels, dates, hints         (4.0:1) AA-large ✓
     --dim:        #886666  — decorative (cmd-header, geo) (2.8:1) decorative
     --border:     #332222  — borders, dividers
     --bg:         #111111  — slightly lighter than pure black (reduces halation)
     --bg-surface: #161616  — card/nav surfaces
   ============================================================ */

:root {
  --primary:    #ff3344;
  --body:       #e8a0a0;
  --secondary:  #cc8888;
  --muted:      #aa7777;
  --dim:        #886666;
  --border:     #332222;
  --bg:         #111111;
  --bg-surface: #161616;
  --glow:       rgba(255, 51, 68, 0.4);
  --glow-soft:  rgba(255, 51, 68, 0.15);
}

/* ----------------------------------------------------------
   0. Animations — Retro CRT: steps, flicker, no smooth easing
   ---------------------------------------------------------- */
@keyframes crt-boot {
  0%   { opacity: 0; }
  5%   { opacity: 0.9; }
  7%   { opacity: 0.1; }
  10%  { opacity: 0.8; }
  12%  { opacity: 0.2; }
  16%  { opacity: 1; }
  18%  { opacity: 0.7; }
  20%  { opacity: 1; }
  100% { opacity: 1; }
}

@keyframes scanline-scroll {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

@keyframes glow-pulse {
  0%, 100% { text-shadow: 0 0 4px var(--glow), 0 0 12px var(--glow-soft); }
  50%      { text-shadow: 0 0 8px var(--glow), 0 0 24px rgba(255, 51, 68, 0.2); }
}

@keyframes retro-fade-in {
  0%   { opacity: 0; }
  10%  { opacity: 0; }
  11%  { opacity: 0.7; }
  13%  { opacity: 0.2; }
  16%  { opacity: 0.9; }
  18%  { opacity: 0.4; }
  25%  { opacity: 1; }
  100% { opacity: 1; }
}

/* CRT line-render: clip-path reveals content line by line */
@keyframes crt-render {
  0%   { clip-path: inset(0 0 100% 0); opacity: 0; }
  5%   { clip-path: inset(0 0 100% 0); opacity: 1; }
  6%   { clip-path: inset(0 0 95% 0); }
  15%  { clip-path: inset(0 0 80% 0); }
  30%  { clip-path: inset(0 0 55% 0); }
  50%  { clip-path: inset(0 0 30% 0); }
  70%  { clip-path: inset(0 0 10% 0); }
  80%  { clip-path: inset(0 0 0% 0); opacity: 1; }
  82%  { opacity: 0.6; }
  85%  { opacity: 1; }
  87%  { opacity: 0.8; }
  90%  { opacity: 1; }
  100% { clip-path: inset(0 0 0% 0); opacity: 1; }
}

/* Horizontal sweep like a CRT electron beam */
@keyframes crt-sweep {
  0%   { clip-path: inset(0 100% 0 0); opacity: 0; }
  5%   { clip-path: inset(0 100% 0 0); opacity: 1; }
  10%  { clip-path: inset(0 85% 0 0); }
  30%  { clip-path: inset(0 50% 0 0); }
  60%  { clip-path: inset(0 15% 0 0); }
  70%  { clip-path: inset(0 0% 0 0); opacity: 1; }
  72%  { opacity: 0.5; }
  75%  { opacity: 1; }
  100% { clip-path: inset(0 0% 0 0); opacity: 1; }
}

/* Glitch flicker for elements */
@keyframes glitch-in {
  0%   { opacity: 0; transform: translateX(0); }
  10%  { opacity: 0; }
  11%  { opacity: 0.8; transform: translateX(-3px); }
  13%  { opacity: 0; transform: translateX(2px); }
  16%  { opacity: 0.9; transform: translateX(0); }
  18%  { opacity: 0.3; transform: translateX(-1px); }
  22%  { opacity: 1; transform: translateX(0); }
  100% { opacity: 1; transform: translateX(0); }
}

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

/* ----------------------------------------------------------
   1. Reset & Base
   ---------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--body);
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.95rem;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  animation: crt-boot 0.6s steps(12);
  cursor: crosshair;
  -webkit-font-smoothing: antialiased;
}

a, button, .music-toggle, .traffic-light {
  cursor: pointer;
}

input, textarea {
  cursor: text;
}

/* CRT scanline overlay */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.04) 2px,
    rgba(0, 0, 0, 0.04) 4px
  );
}

/* Travelling scanline bar */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(to bottom, transparent, rgba(255, 51, 68, 0.03), transparent);
  z-index: 9998;
  pointer-events: none;
  animation: scanline-scroll 6s linear infinite;
}

/* Respect user preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ----------------------------------------------------------
   2. Typography
   ---------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: 'mrrobotregular', 'Courier New', Courier, monospace;
  font-weight: normal;
  color: var(--primary);
  letter-spacing: 0.05em;
  line-height: 1.2;
  text-shadow: 0 0 6px var(--glow-soft);
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.7rem; margin-bottom: 0.8rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

p {
  margin-bottom: 1rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.1s steps(2), text-shadow 0.15s steps(3);
}

a:hover {
  color: #ff6677;
  text-shadow: 0 0 8px var(--glow);
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

::selection {
  background: var(--primary);
  color: var(--bg);
}

/* ----------------------------------------------------------
   3. Terminal Window Chrome (Nav)
   ---------------------------------------------------------- */
.terminal-chrome {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 12px rgba(255, 51, 68, 0.03);
  animation: crt-sweep 0.4s 0.1s both;
}

.terminal-titlebar {
  display: flex;
  align-items: center;
  padding: 6px 14px;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  gap: 10px;
}

.terminal-traffic-lights {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.traffic-light {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  transition: box-shadow 0.1s steps(2);
}

.traffic-light.close    { background-color: #ff5f57; }
.traffic-light.minimize { background-color: #febc2e; }
.traffic-light.maximize { background-color: #28c840; }

.traffic-light.close:hover    { box-shadow: 0 0 8px #ff5f57; }
.traffic-light.minimize:hover { box-shadow: 0 0 8px #febc2e; }
.traffic-light.maximize:hover { box-shadow: 0 0 8px #28c840; }

.terminal-title {
  flex: 1;
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  font-family: 'mrrobotregular', monospace;
}

.terminal-nav {
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 2px;
  overflow-x: auto;
}

.terminal-nav .prompt {
  font-size: 0.8rem;
  color: var(--muted);
  margin-right: 6px;
}

.terminal-nav .prompt::after {
  content: '\2588';
  color: var(--primary);
  animation: blink-cursor 0.8s step-end infinite;
  margin-left: 2px;
  font-size: 0.7rem;
}

.terminal-nav a {
  display: inline-block;
  padding: 6px 14px;
  font-size: 0.8rem;
  color: var(--primary);
  text-decoration: none;
  border: 1px solid transparent;
  border-bottom: none;
  opacity: 0.5;
  letter-spacing: 0.05em;
  transition: opacity 0.1s steps(3), background-color 0.1s steps(2);
  white-space: nowrap;
  position: relative;
}

.terminal-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.15s steps(4), left 0.15s steps(4);
  box-shadow: 0 0 4px var(--glow);
}

.terminal-nav a:hover {
  opacity: 1;
  background-color: rgba(255, 51, 68, 0.05);
  border-color: var(--border);
  text-shadow: 0 0 6px var(--glow-soft);
}

.terminal-nav a:hover::after {
  width: 80%;
  left: 10%;
}

.terminal-nav a.active {
  opacity: 1;
  background-color: rgba(255, 51, 68, 0.07);
  border-color: var(--border);
  text-shadow: 0 0 8px var(--glow);
}

.terminal-nav a.active::after {
  width: 100%;
  left: 0;
}

.music-toggle {
  margin-left: auto;
  padding: 4px 10px;
  font-size: 0.75rem;
  color: var(--primary);
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  font-family: 'Courier New', Courier, monospace;
  letter-spacing: 0.05em;
  opacity: 0.5;
  transition: opacity 0.1s steps(3);
  white-space: nowrap;
  flex-shrink: 0;
}

.music-toggle:hover {
  opacity: 1;
  box-shadow: 0 0 8px rgba(255, 51, 68, 0.15);
}

.music-toggle.playing {
  opacity: 1;
  text-shadow: 0 0 6px var(--glow);
}

/* ----------------------------------------------------------
   4. Layout
   ---------------------------------------------------------- */
.page-body {
  margin-top: 80px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  padding: 2rem 1.5rem;
}

/* Each section renders in like a CRT drawing lines */
.page-body > * {
  animation: crt-render 0.6s both;
}
.page-body > *:nth-child(1) { animation-delay: 0.05s; }
.page-body > *:nth-child(2) { animation-delay: 0.2s; }
.page-body > *:nth-child(3) { animation-delay: 0.35s; }
.page-body > *:nth-child(4) { animation-delay: 0.5s; }
.page-body > *:nth-child(5) { animation-delay: 0.65s; }
.page-body > *:nth-child(6) { animation-delay: 0.8s; }
.page-body > *:nth-child(7) { animation-delay: 0.95s; }
.page-body > *:nth-child(8) { animation-delay: 1.1s; }

/* Headings get a horizontal sweep */
.page-body h1,
.page-body h2 {
  animation: crt-sweep 0.5s both;
}

/* Cards and grid items get glitch-in */
.project-card,
.post-entry,
.contact-link,
.oss-card,
.timeline-entry {
  animation: glitch-in 0.4s both;
}

.project-card:nth-child(1), .post-entry:nth-child(1) { animation-delay: 0.3s; }
.project-card:nth-child(2), .post-entry:nth-child(2) { animation-delay: 0.4s; }
.project-card:nth-child(3), .post-entry:nth-child(3) { animation-delay: 0.5s; }
.project-card:nth-child(4), .post-entry:nth-child(4) { animation-delay: 0.6s; }
.project-card:nth-child(5) { animation-delay: 0.7s; }
.project-card:nth-child(6) { animation-delay: 0.8s; }

.contact-link:nth-child(1) { animation-delay: 0.2s; }
.contact-link:nth-child(2) { animation-delay: 0.3s; }
.contact-link:nth-child(3) { animation-delay: 0.4s; }
.contact-link:nth-child(4) { animation-delay: 0.5s; }

.timeline-entry:nth-child(1) { animation-delay: 0.2s; }
.timeline-entry:nth-child(2) { animation-delay: 0.35s; }
.timeline-entry:nth-child(3) { animation-delay: 0.5s; }
.timeline-entry:nth-child(4) { animation-delay: 0.65s; }
.timeline-entry:nth-child(5) { animation-delay: 0.8s; }

.oss-card:nth-child(1) { animation-delay: 0.3s; }
.oss-card:nth-child(2) { animation-delay: 0.45s; }

/* ----------------------------------------------------------
   5. Home Dashboard
   ---------------------------------------------------------- */
.dashboard {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  margin-bottom: 2.5rem;
}

.dashboard-left {
  flex: 1 1 55%;
  min-width: 0;
}

.dashboard-right {
  flex: 1 1 40%;
  min-width: 0;
  border-left: 1px solid var(--border);
  padding-left: 2rem;
}

.identity-name {
  font-family: 'mrrobotregular', monospace;
  font-size: 2.8rem;
  color: var(--primary);
  letter-spacing: 0.08em;
  line-height: 1.1;
  margin-bottom: 0.3rem;
  text-shadow: 0 0 10px var(--glow), 0 0 30px var(--glow-soft);
  animation: glow-pulse 4s ease-in-out infinite;
}

.identity-alias {
  font-size: 0.88rem;
  color: var(--secondary);
  letter-spacing: 0.12em;
  margin-bottom: 0.6rem;
}

.identity-role {
  font-size: 0.9rem;
  color: var(--body);
  margin-bottom: 1.2rem;
  border-left: 2px solid var(--primary);
  padding-left: 0.6rem;
}

.social-links,
.dashboard-right {
  opacity: 0;
}

.social-links.revealed {
  animation: glitch-in 0.5s both;
}

.dashboard-right.revealed {
  animation: crt-render 0.7s both;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.social-links a {
  font-size: 0.8rem;
  color: var(--primary);
  border: 1px solid var(--border);
  padding: 4px 12px;
  text-decoration: none;
  transition: border-color 0.1s steps(2), box-shadow 0.15s steps(3);
  position: relative;
  overflow: hidden;
}

.social-links a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 51, 68, 0.06), transparent);
  transition: left 0.2s steps(5);
}

.social-links a:hover {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(255, 51, 68, 0.12);
}

.social-links a:hover::before {
  left: 100%;
}

.section-label {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
  margin-top: 1.4rem;
}

.latest-post {
  border-left: 2px solid var(--border);
  padding-left: 0.8rem;
  margin-bottom: 0.6rem;
  transition: border-color 0.1s steps(2);
}

.latest-post:hover {
  border-left-color: var(--primary);
}

.latest-post a {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.latest-post .post-date,
.latest-post .post-date-small {
  font-size: 0.75rem;
  color: var(--muted);
}

/* ----------------------------------------------------------
   6. Blog Listing
   ---------------------------------------------------------- */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-entry {
  border-left: 2px solid var(--border);
  padding: 1rem 1rem 1rem 1.2rem;
  transition: background-color 0.1s steps(3), border-color 0.1s steps(2);
}

.post-entry:first-child {
  border-left-color: var(--primary);
}

.post-entry:hover {
  background-color: rgba(255, 51, 68, 0.03);
  border-left-color: var(--primary);
}

.post-entry + .post-entry {
  border-top: 1px solid rgba(51, 34, 34, 0.5);
}

.post-entry-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}

.post-entry-title {
  font-family: 'mrrobotregular', monospace;
  font-size: 1.05rem;
  color: var(--primary);
  text-decoration: none;
  transition: text-shadow 0.1s steps(2);
}

.post-entry-title:hover {
  text-shadow: 0 0 8px var(--glow);
}

.post-entry-date {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.post-entry-excerpt {
  font-size: 0.85rem;
  color: var(--secondary);
  margin-bottom: 0.6rem;
  line-height: 1.5;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  font-size: 0.72rem;
  color: var(--body);
  border: 1px solid var(--border);
  padding: 1px 6px;
  letter-spacing: 0.06em;
  background-color: transparent;
  transition: border-color 0.1s steps(2);
}

.tag:hover {
  background-color: rgba(255, 51, 68, 0.06);
  border-color: var(--primary);
}

/* ----------------------------------------------------------
   7. Projects Grid
   ---------------------------------------------------------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}

.project-card {
  border: 1px solid var(--border);
  padding: 1.2rem;
  transition: border-color 0.1s steps(2), transform 0.15s steps(3);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-top: 2px solid transparent;
  border-right: 2px solid transparent;
  transition: width 0.15s steps(4), height 0.15s steps(4);
}

.project-card:hover {
  border-color: var(--primary);
  background-color: rgba(255, 51, 68, 0.02);
  transform: translateY(-2px);
}

.project-card:hover::before {
  width: 20px;
  height: 20px;
  border-color: var(--primary);
}

.project-name {
  font-family: 'mrrobotregular', monospace;
  font-size: 1.05rem;
  color: var(--primary);
  margin-bottom: 0.2rem;
}

.project-desc {
  font-size: 0.84rem;
  color: var(--secondary);
  flex: 1;
  line-height: 1.5;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.3rem;
}

.project-links {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.4rem;
  flex-wrap: wrap;
}

.project-links a {
  font-size: 0.75rem;
  color: var(--primary);
  border: 1px solid var(--border);
  padding: 2px 8px;
  text-decoration: none;
  transition: border-color 0.1s steps(2);
}

.project-links a:hover {
  background-color: rgba(255, 51, 68, 0.08);
  border-color: var(--primary);
}

/* ----------------------------------------------------------
   8. Resume Timeline
   ---------------------------------------------------------- */
.timeline-entry {
  border-left: 2px solid var(--border);
  padding: 0.8rem 0 0.8rem 1.4rem;
  position: relative;
}

.timeline-entry::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 1.2rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--border);
  border: 1px solid var(--muted);
}

.timeline-entry.current {
  border-left-color: var(--primary);
}

.timeline-entry.current::before {
  background-color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 6px var(--glow);
}

.timeline-entry + .timeline-entry {
  margin-top: 0.4rem;
}

.timeline-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.timeline-company {
  font-family: 'mrrobotregular', monospace;
  font-size: 1.1rem;
  color: var(--primary);
}

.timeline-date {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}

.timeline-role {
  font-size: 0.85rem;
  color: var(--body);
  margin-bottom: 0.5rem;
}

.timeline-details {
  list-style: none;
  font-size: 0.84rem;
  color: var(--secondary);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.timeline-details li::before {
  content: '> ';
  color: var(--primary);
  opacity: 0.6;
}

/* ----------------------------------------------------------
   9. About Page
   ---------------------------------------------------------- */
.about-section {
  margin-bottom: 2rem;
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.tag.primary {
  border-color: var(--primary);
  color: var(--primary);
  font-weight: bold;
}

.oss-entry {
  font-size: 0.87rem;
  color: var(--secondary);
  margin-bottom: 0.4rem;
  line-height: 1.5;
}

.oss-entry::before {
  content: '-> ';
  color: var(--primary);
  opacity: 0.7;
}

/* ----------------------------------------------------------
   10. Contact Page
   ---------------------------------------------------------- */
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 1rem;
  border-left: 2px solid var(--border);
  color: var(--body);
  font-size: 0.9rem;
  transition: border-color 0.1s steps(2);
}

.contact-link:hover {
  background-color: rgba(255, 51, 68, 0.03);
  border-left-color: var(--primary);
}

.contact-link a {
  color: var(--primary);
}

.contact-link .label,
.contact-link .contact-label {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  min-width: 80px;
  flex-shrink: 0;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  max-width: 540px;
}

.contact-form .form-hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.contact-form .field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.contact-form .field label {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.contact-form input,
.contact-form textarea {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--body);
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.88rem;
  padding: 0.6rem 0.8rem;
  outline: none;
  width: 100%;
  transition: border-color 0.1s steps(2);
  resize: vertical;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--dim);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 8px rgba(255, 51, 68, 0.08);
}

.contact-form button,
.contact-form input[type="submit"] {
  align-self: flex-start;
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  padding: 0.5rem 1.4rem;
  cursor: pointer;
  letter-spacing: 0.1em;
  transition: background-color 0.1s steps(2), color 0.1s steps(2);
}

.contact-form button:hover,
.contact-form input[type="submit"]:hover {
  background-color: var(--primary);
  color: var(--bg);
  box-shadow: 0 0 12px rgba(255, 51, 68, 0.2);
}

/* ----------------------------------------------------------
   11. Blog Post
   ---------------------------------------------------------- */
.post-meta {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-bottom: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.8rem;
}

.post-content {
  line-height: 1.8;
  font-size: 0.95rem;
  color: var(--body);
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
  color: var(--primary);
  margin-top: 1.8rem;
  margin-bottom: 0.7rem;
}

.post-content p {
  margin-bottom: 1.1rem;
}

.post-content a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: rgba(255, 51, 68, 0.3);
  text-underline-offset: 3px;
}

.post-content a:hover {
  text-decoration-color: var(--primary);
}

.post-content ul,
.post-content ol {
  margin-bottom: 1rem;
  padding-left: 0;
}

.post-content ul li,
.post-content ol li {
  margin-bottom: 0.3rem;
  color: var(--body);
}

.post-content ul li::before {
  content: '> ';
  color: var(--primary);
  opacity: 0.55;
}

.post-content ol {
  counter-reset: ol-counter;
}

.post-content ol li::before {
  counter-increment: ol-counter;
  content: counter(ol-counter) '. ';
  color: var(--primary);
  opacity: 0.55;
}

.post-content code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.87em;
  background-color: var(--bg-surface);
  color: var(--primary);
  padding: 1px 5px;
  border: 1px solid var(--border);
}

.post-content pre {
  background-color: #0c0c0c;
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  padding: 1rem 1.2rem;
  overflow-x: auto;
  margin-bottom: 1.2rem;
  font-size: 0.85rem;
}

.post-content pre code {
  background: transparent;
  border: none;
  padding: 0;
  font-size: inherit;
  color: var(--body);
}

.post-content blockquote {
  border-left: 3px solid var(--primary);
  margin: 1.2rem 0;
  padding: 0.6rem 1rem;
  background-color: rgba(255, 51, 68, 0.02);
  color: var(--secondary);
  font-style: italic;
}

.post-content blockquote p:last-child {
  margin-bottom: 0;
}

.post-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.8rem 0;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.2rem;
  font-size: 0.87rem;
}

.post-content th,
.post-content td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.8rem;
  text-align: left;
  color: var(--body);
}

.post-content th {
  background-color: var(--bg-surface);
  color: var(--primary);
}

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.post-nav a {
  font-size: 0.82rem;
  color: var(--primary);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 0.4rem 0.9rem;
  transition: border-color 0.1s steps(2);
  max-width: 48%;
}

.post-nav a:hover {
  border-color: var(--primary);
  box-shadow: 0 0 8px rgba(255, 51, 68, 0.1);
}

.post-nav .prev::before { content: '<< '; }
.post-nav .next::after { content: ' >>'; }

/* ----------------------------------------------------------
   12. Footer
   ---------------------------------------------------------- */
.site-footer {
  margin-top: 3rem;
  padding: 1.2rem 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.geo-info {
  font-size: 0.72rem;
  color: var(--dim);
  letter-spacing: 0.06em;
}

/* ----------------------------------------------------------
   13. ASCII Background
   ---------------------------------------------------------- */
#ascii-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.1;
  overflow: hidden;
  pointer-events: none;
}

/* ----------------------------------------------------------
   14. Download Button
   ---------------------------------------------------------- */
.download-btn {
  display: inline-block;
  color: var(--primary);
  border: 1px solid var(--primary);
  background: transparent;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  padding: 0.5rem 1.2rem;
  text-decoration: none;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background-color 0.1s steps(2), color 0.1s steps(2);
}

.download-btn:hover {
  background-color: var(--primary);
  color: var(--bg);
}

/* ----------------------------------------------------------
   15. Command Header
   ---------------------------------------------------------- */
.cmd-header {
  font-size: 0.8rem;
  color: var(--dim);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.cmd-header::before {
  content: '$ ';
  color: var(--muted);
}

/* ----------------------------------------------------------
   16. Typewriter Animation (handled by JS)
   ---------------------------------------------------------- */

/* ----------------------------------------------------------
   17. Dashboard Wrapper
   ---------------------------------------------------------- */
.dashboard-wrapper {
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 2rem;
}

.dashboard-wrapper .dashboard {
  margin-bottom: 2rem;
}

.dashboard-recon {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  animation: crt-render 0.6s 3.5s both;
}

.recon-header {
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.recon-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--secondary);
  margin-bottom: 0.3rem;
  letter-spacing: 0.04em;
}

.recon-label {
  color: var(--muted);
  min-width: 60px;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 4px var(--glow);
  flex-shrink: 0;
  animation: blink-cursor 2s step-end infinite;
}

/* ----------------------------------------------------------
   18. About Page — OSS Cards & Timeline
   ---------------------------------------------------------- */
.about-timeline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.2rem;
  font-size: 0.85rem;
}

.about-step {
  color: var(--body);
  border: 1px solid var(--border);
  padding: 4px 10px;
  transition: border-color 0.1s steps(2);
}

.about-step:hover {
  border-color: var(--primary);
}

.about-arrow {
  color: var(--primary);
  opacity: 0.5;
  font-size: 1rem;
}

.oss-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.oss-card {
  border: 1px solid var(--border);
  padding: 1rem;
  transition: border-color 0.1s steps(2);
  position: relative;
}

.oss-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 0;
  background: var(--primary);
  transition: height 0.2s steps(5);
}

.oss-card:hover {
  border-color: var(--primary);
}

.oss-card:hover::before {
  height: 100%;
}

.oss-org {
  font-family: 'mrrobotregular', monospace;
  font-size: 1.05rem;
  color: var(--primary);
  margin-bottom: 0.4rem;
}

.oss-company {
  font-family: 'Courier New', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 1px 5px;
  margin-left: 0.4rem;
  vertical-align: middle;
}

.oss-detail {
  font-size: 0.84rem;
  color: var(--secondary);
  line-height: 1.5;
}

/* ----------------------------------------------------------
   19. Utilities
   ---------------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ----------------------------------------------------------
   20. Responsive
   ---------------------------------------------------------- */
@media (max-width: 700px) {
  .page-body {
    padding: 1.2rem 1rem;
  }

  .dashboard {
    flex-direction: column;
    gap: 1.5rem;
  }

  .dashboard-right {
    border-left: none;
    border-top: 1px solid var(--border);
    padding-left: 0;
    padding-top: 1.2rem;
    flex: none;
    width: 100%;
  }

  .dashboard-left {
    flex: none;
    width: 100%;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .identity-name {
    font-size: 2rem;
  }

  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.4rem; }

  .post-nav {
    flex-direction: column;
  }

  .post-nav a {
    max-width: 100%;
  }

  .terminal-nav {
    padding: 0 6px;
  }

  .terminal-nav a {
    padding: 5px 8px;
    font-size: 0.74rem;
  }

  .site-footer {
    flex-direction: column;
    gap: 0.3rem;
  }

  .oss-cards {
    grid-template-columns: 1fr;
  }

  .about-timeline {
    flex-direction: column;
    align-items: flex-start;
  }

  .about-arrow {
    transform: rotate(90deg);
    align-self: center;
  }

  .dashboard-wrapper {
    min-height: auto;
  }
}
