/* ===================================
   DESIGN SYSTEM - Privacy/Cryptographer Theme
   =================================== */

:root {
  /* Terminal Color Palette */
  --bg-primary: #0a0e14;
  --bg-secondary: #0f1419;
  --bg-tertiary: #1a1f29;
  --bg-card: rgba(15, 20, 25, 0.8);
  
  /* Terminal Green Accents */
  --accent-primary: #00ff41;
  --accent-secondary: #00cc33;
  --accent-dim: #008822;
  
  /* Text Colors */
  --text-primary: #e6e6e6;
  --text-secondary: #a0a0a0;
  --text-dim: #707070;
  --text-accent: var(--accent-primary);
  
  /* Border & Lines */
  --border-color: rgba(0, 255, 65, 0.2);
  --border-dim: rgba(255, 255, 255, 0.1);
  
  /* Spacing - Document Style */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 0.75rem;
  --spacing-lg: 1rem;
  --spacing-xl: 1.5rem;
  --spacing-2xl: 2rem;
  
  /* Typography */
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Transitions */
  --transition-fast: 0.1s ease;
  --transition-normal: 0.2s ease;
  --transition-slow: 0.3s ease;
}

/* ===================================
   RESET & BASE STYLES
   =================================== */

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

html {
  scroll-behavior: smooth;
  font-size: 15px; /* Slightly smaller base font */
}

body {
  font-family: var(--font-mono);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===================================
   TYPOGRAPHY
   =================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-mono);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-accent);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: var(--spacing-md);
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: var(--spacing-md);
}

h3 {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  margin-bottom: var(--spacing-sm);
}

p {
  margin-bottom: var(--spacing-sm);
  color: var(--text-secondary);
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: all var(--transition-fast);
  position: relative;
}

a:hover {
  color: var(--text-primary);
}

a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-primary);
  transition: width var(--transition-normal);
}

a:hover::after {
  width: 100%;
}

/* ===================================
   LAYOUT UTILITIES
   =================================== */

.container {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.section {
  padding: var(--spacing-lg) 0;
  position: relative;
}

.section-header {
  margin-bottom: var(--spacing-sm);
  position: relative;
  display: flex;
  align-items: baseline;
  gap: var(--spacing-sm);
}

.section-title {
  display: inline-block;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.section-title::before {
  content: '> ';
  color: var(--accent-primary);
  animation: blink 1.5s infinite;
}

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

/* ===================================
   TERMINAL AESTHETIC COMPONENTS
   =================================== */

.terminal-window {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: var(--spacing-md);
  position: relative;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 255, 65, 0.1);
}

.terminal-window::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  border-radius: 4px 4px 0 0;
}

.terminal-dots {
  position: absolute;
  top: 10px;
  left: 12px;
  display: flex;
  gap: 6px;
  z-index: 1;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-dim);
}

.terminal-dot:nth-child(1) { background: #ff5f56; }
.terminal-dot:nth-child(2) { background: #ffbd2e; }
.terminal-dot:nth-child(3) { background: #27c93f; }

.terminal-content {
  margin-top: 30px;
}

/* ===================================
   SPLIT LIST LAYOUT (Arpit Style)
   =================================== */

.split-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.split-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--spacing-md);
  align-items: baseline;
}

.split-meta {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-dim);
  text-align: right;
}

/* Blinking cursor effect for '>' in split-meta */
.split-item .split-meta:contains(">") {
  color: var(--accent-primary);
  animation: blink 1.5s infinite;
}

/* Since CSS :contains isn't standard, we'll target it specifically if the user adds a class or we rely on the fact that we changed it to '>' in the HTML */
/* Better approach: target the specific use case where we changed 'Repo' to '>' */
.split-meta-cursor {
  color: var(--accent-primary);
  animation: blink 1.5s infinite;
  font-weight: bold;
}


.split-content {
  font-size: 1rem;
}

.split-link {
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--border-dim);
  transition: border-color var(--transition-fast);
}

.split-link:hover {
  border-bottom-color: var(--accent-primary);
  color: var(--accent-primary);
}

@media (max-width: 600px) {
  .split-item {
    grid-template-columns: 1fr;
    gap: var(--spacing-xs);
  }
  
  .split-meta {
    text-align: left;
    font-size: 0.8rem;
  }
}

/* ===================================
   CARD COMPONENT
   =================================== */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: 4px;
  padding: var(--spacing-md);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
/* ===================================
   CARD REPLACEMENT (Text Only)
   =================================== */

.text-block {
  margin-bottom: var(--spacing-sm);
}

.text-title {
  color: var(--text-primary);
  font-weight: 500;
}

.text-meta {
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* ===================================
   BUTTON COMPONENT
   =================================== */

.btn {
  display: inline-block;
  padding: var(--spacing-xs) var(--spacing-md);
  background: transparent;
  border: 1px solid var(--accent-primary);
  color: var(--accent-primary);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--accent-primary);
  transition: left var(--transition-normal);
  z-index: -1;
}

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

.btn:hover::before {
  left: 0;
}

/* ===================================
   TAG COMPONENT
   =================================== */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
  margin-top: var(--spacing-sm);
}

.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(0, 255, 65, 0.1);
  border: 1px solid var(--border-color);
  color: var(--accent-primary);
  font-size: 0.75rem;
  border-radius: 2px;
  transition: all var(--transition-fast);
}

.tag:hover {
  background: rgba(0, 255, 65, 0.2);
  transform: scale(1.05);
}

/* ===================================
   GLITCH EFFECT
   =================================== */

.glitch {
  position: relative;
  animation: glitch-skew 3s infinite;
}

@keyframes glitch-skew {
  0%, 100% { transform: skew(0deg); }
  20% { transform: skew(-0.5deg); }
  40% { transform: skew(0.5deg); }
  60% { transform: skew(-0.5deg); }
  80% { transform: skew(0.5deg); }
}

/* ===================================
   SCANLINE EFFECT
   =================================== */

.scanlines {
  position: relative;
}

.scanlines::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  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: 1000;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 768px) {
  :root {
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
  }
  
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ===================================
   ANIMATIONS
   =================================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

/* ===================================
   SCROLLBAR STYLING
   =================================== */

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-dim);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* ===================================
   SELECTION STYLING
   =================================== */

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