/* PookaSec Blog - ARK Design System */
:root {
  --primary: #7C3AED;
  --primary-hover: #9061f9;
  --secondary: #A855F7;
  --background: #05020B;
  --card-bg: #12091F;
  --card-hover: #1E1230;
  --text: #ffffff;
  --text-muted: #B8A9D9;
  --border: #2A1746;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 0.75rem;
}

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

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--background); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3d2460; }

body {
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  letter-spacing: -0.03em;
}

/* Header */
.site-header {
  background: rgba(5, 2, 11, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-title span {
  color: var(--primary);
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 2rem;
  transition: color 0.2s;
  font-weight: 500;
}

.site-nav a:hover {
  color: var(--primary);
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 6rem 2rem;
  background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(124, 58, 237, 0.2), transparent), var(--background);
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .tagline {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 800px;
  margin: 0 auto 2rem;
}

.hero-subtitle {
  color: var(--primary);
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  font-weight: 600;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* Blog Posts Grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* Post Card */
.post-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(18, 9, 31, 0.9) 0%, rgba(18, 9, 31, 0.95) 100%);
  border: 1px solid rgba(42, 23, 70, 0.5);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all 0.3s ease;
  text-decoration: none;
  display: block;
  backdrop-filter: blur(8px);
}

.post-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s;
  background: radial-gradient(circle at 50% 0%, rgba(168, 85, 247, 0.15), transparent 70%);
  pointer-events: none;
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 58, 237, 0.5);
  box-shadow: 0 0 40px rgba(168, 85, 247, 0.35), 0 12px 40px rgba(5, 2, 11, 0.6);
}

.post-card:hover::before {
  opacity: 1;
}

.post-meta {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.post-category {
  background: rgba(124, 58, 237, 0.15);
  color: var(--secondary);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(124, 58, 237, 0.3);
}

.post-card h2 {
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.post-excerpt {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.post-meta-centered {
  justify-content: center;
  margin-bottom: 1rem;
}

.post-tags-centered {
  justify-content: center;
  margin-top: 1rem;
}

.tag {
  background: var(--background);
  color: var(--text-muted);
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  border: 1px solid var(--border);
}

/* Single Post */
.post-header {
  text-align: center;
  padding: 4rem 2rem 2rem;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(124, 58, 237, 0.2), transparent), var(--background);
}

.post-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  background: linear-gradient(135deg, #ffffff 0%, #B8A9D9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.post-content {
  max-width: 800px;
  margin: 3rem auto;
  padding: 2.5rem 3rem;
  font-size: 1.125rem;
  line-height: 1.8;
  background: linear-gradient(180deg, rgba(18, 9, 31, 0.6) 0%, rgba(18, 9, 31, 0.4) 100%);
  border: 1px solid rgba(42, 23, 70, 0.5);
  border-radius: var(--radius);
}

@media (max-width: 860px) {
  .post-content {
    padding: 1.5rem 1.25rem;
    margin: 2rem 1rem;
  }
}

.post-content h2 {
  font-size: 2rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.post-content h3 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

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

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

.post-content li {
  margin-bottom: 0.5rem;
}

.post-content code {
  background: var(--card-bg);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--primary);
  border: 1px solid var(--border);
}

.post-content pre {
  background: #0D0618;
  padding: 1.5rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  position: relative;
  box-shadow: inset 0 0 30px rgba(124, 58, 237, 0.05);
}

.post-content pre::before {
  content: '';
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #7C3AED 0%, #A855F7 100%);
  border-radius: var(--radius) var(--radius) 0 0;
}

.post-content pre code {
  background: none;
  padding: 0;
  border: none;
  color: var(--text);
  font-family: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, Consolas, monospace;
  font-size: 0.875em;
  line-height: 1.7;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
}

.post-content th {
  background: rgba(124, 58, 237, 0.15);
  color: var(--secondary);
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--border);
}

.post-content td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.post-content tr:last-child td {
  border-bottom: none;
}

.post-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  color: var(--text-muted);
  font-style: italic;
  background: rgba(124, 58, 237, 0.08);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.post-content a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.post-content a:hover {
  border-bottom-color: var(--primary);
}

/* Footer */
.site-footer {
  background: linear-gradient(180deg, rgba(18, 9, 31, 0.9) 0%, rgba(5, 2, 11, 1) 100%);
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
  margin-top: 4rem;
  text-align: center;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-text {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0.25rem;
}

.badge-success {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
  border: 1px solid var(--success);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
  border: 1px solid var(--warning);
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .posts-grid {
    grid-template-columns: 1fr;
  }
  
  .site-nav {
    display: none;
  }
  
  .post-header h1 {
    font-size: 2rem;
  }
  
  .post-content {
    font-size: 1rem;
  }
}

/* ========================================
   SCREENSHOT STYLES FOR ATTACK WALKTHROUGHS
   ======================================== */

/* Single Image */
.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin: 2rem 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Image with caption */
.screenshot {
  margin: 2rem 0;
}

.screenshot img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.screenshot figcaption {
  margin-top: 0.75rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  text-align: center;
  font-style: italic;
}

/* Side-by-side screenshots (attacker vs defender) */
.dual-perspective {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 3rem 0;
}

.perspective {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  overflow: hidden;
}

.perspective-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.perspective-icon {
  font-size: 1.5rem;
}

.perspective-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.perspective-title.attacker {
  color: #ef4444; /* Red */
}

.perspective-title.defender {
  color: #10b981; /* Green */
}

.perspective img {
  width: 100%;
  border-radius: 6px;
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}

.perspective-caption {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Terminal-style screenshot */
.terminal-shot {
  background: #1e1e1e;
  border-radius: 8px;
  padding: 1rem;
  border: 1px solid var(--border);
  margin: 2rem 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #333;
}

.terminal-dots {
  display: flex;
  gap: 0.5rem;
}

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

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

.terminal-title {
  color: #888;
  font-size: 0.875rem;
  margin-left: auto;
}

.terminal-shot img {
  width: 100%;
  border-radius: 4px;
}

/* Log viewer style */
.log-viewer {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 1.5rem;
  border: 1px solid var(--border);
  margin: 2rem 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.log-title {
  font-weight: 700;
  color: var(--primary);
  font-size: 1rem;
}

.log-timestamp {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-family: monospace;
}

.log-viewer img {
  width: 100%;
  border-radius: 6px;
}

/* Attack step walkthrough */
.attack-step {
  background: var(--card-bg);
  border-left: 4px solid var(--primary);
  padding: 2rem;
  margin: 2rem 0;
  border-radius: 8px;
}

.attack-step h3 {
  color: var(--primary);
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: var(--background);
  border-radius: 50%;
  font-weight: 700;
  font-size: 1rem;
}

/* Detection badge */
.detection-result {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.875rem;
  margin: 1rem 0;
}

.detection-result.detected {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
  border: 1px solid var(--success);
}

.detection-result.missed {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid #ef4444;
}

.detection-result.partial {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
  border: 1px solid var(--warning);
}

/* Timeline view */
.attack-timeline {
  position: relative;
  padding-left: 2rem;
  margin: 2rem 0;
}

.attack-timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--primary) 0%, transparent 100%);
}

.timeline-event {
  position: relative;
  margin-bottom: 2rem;
  padding-left: 2rem;
}

.timeline-event::before {
  content: '';
  position: absolute;
  left: -2.5rem;
  top: 0.5rem;
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: 50%;
  border: 3px solid var(--background);
  box-shadow: 0 0 0 2px var(--primary);
}

.timeline-time {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  font-family: monospace;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .dual-perspective {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .attack-step {
    padding: 1.5rem;
  }
}
