/* ========================================
   TechyCodec — Security Blog
   Dark theme, terminal aesthetic, clean typography
   ======================================== */

:root {
    --bg: #0a0e14;
    --bg-surface: #111820;
    --bg-card: #151d27;
    --bg-card-hover: #1a2332;
    --border: #1e2a3a;
    --border-hover: #2a3a4e;
    --text: #e0e6ed;
    --text-secondary: #7a8a9e;
    --text-muted: #4a5568;
    --accent: #00e676;
    --accent-dim: rgba(0, 230, 118, 0.12);
    --accent-secondary: #40c4ff;
    --accent-secondary-dim: rgba(64, 196, 255, 0.12);
    --red: #ff5252;
    --red-dim: rgba(255, 82, 82, 0.12);
    --yellow: #ffd740;
    --yellow-dim: rgba(255, 215, 64, 0.12);
    --purple: #b388ff;
    --purple-dim: rgba(179, 136, 255, 0.12);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --container: 1100px;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --transition: 0.2s ease;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }

/* Container */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ========================================
   Navigation
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 14, 20, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
.nav-container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.nav-logo {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 1px;
}
.logo-bracket { color: var(--accent); }
.logo-text { color: var(--text); }
.nav-logo img.logo-icon {
    width: 18px;
    height: 18px;
    margin-right: 6px;
}
.footer-logo img.logo-icon {
    width: 16px;
    height: 16px;
    margin-right: 5px;
}
.nav-links { display: flex; gap: 32px; }
.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition);
    position: relative;
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
}
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-social {
    color: var(--text-muted);
    transition: color var(--transition);
    display: flex;
    align-items: center;
}
.nav-social:hover { color: var(--accent); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 4px; }
.nav-toggle span {
    width: 20px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 1px;
    transition: all var(--transition);
}

/* ========================================
   Hero
   ======================================== */
.hero {
    padding: 140px 0 80px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 600px;
    background: radial-gradient(ellipse, rgba(0, 230, 118, 0.06) 0%, transparent 70%);
    pointer-events: none;
}
.hero-container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--accent);
    background: var(--accent-dim);
    border: 1px solid rgba(0, 230, 118, 0.2);
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 24px;
}
.badge-dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.hero-title {
    font-size: 52px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}
.hero-accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 500px;
}
.hero-cta { display: flex; gap: 12px; margin-bottom: 48px; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}
.btn-primary {
    background: var(--accent);
    color: var(--bg);
}
.btn-primary:hover {
    background: #00ff88;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(0, 230, 118, 0.3);
}
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.btn-ghost:hover {
    border-color: var(--border-hover);
    color: var(--text);
    background: var(--bg-card);
}

/* Stats */
.hero-stats {
    display: flex;
    gap: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}
.stat-number {
    display: block;
    font-size: 28px;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--text);
}
.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Terminal */
.terminal {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    font-family: var(--font-mono);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.terminal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}
.terminal-dots { display: flex; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #ff5f57; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #28c840; }
.terminal-title { font-size: 12px; color: var(--text-muted); }
.terminal-body { padding: 20px; min-height: 240px; }
.terminal-line { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.prompt { color: var(--accent); font-weight: 600; }
.command { color: var(--text); }
.cursor {
    color: var(--accent);
    animation: blink 1s infinite;
}
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}
.terminal-output { color: var(--text-secondary); font-size: 13px; line-height: 1.7; }
.terminal-output .line { margin-bottom: 2px; }
.terminal-output .highlight { color: var(--accent); }
.terminal-output .info { color: var(--accent-secondary); }
.terminal-output .warn { color: var(--yellow); }
.terminal-output .err { color: var(--red); }

/* ========================================
   Sections
   ======================================== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}
.section-title {
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}
.title-accent {
    color: var(--accent);
    font-family: var(--font-mono);
    font-weight: 400;
}
.section-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    transition: color var(--transition);
}
.section-link:hover { color: var(--accent); }

/* ========================================
   Featured Card
   ======================================== */
.featured-section { padding: 40px 0; }
.featured-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}
.featured-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
}
.featured-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}
.featured-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.featured-tag {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-xs);
}
.featured-date, .featured-read {
    font-size: 13px;
    color: var(--text-muted);
}
.featured-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}
.featured-excerpt {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 700px;
    margin-bottom: 24px;
}
.featured-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.author {
    display: flex;
    align-items: center;
    gap: 10px;
}
.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-dim);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    font-family: var(--font-mono);
}
.author-name { font-size: 13px; color: var(--text-secondary); }
.read-more {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--accent);
    font-weight: 500;
}

/* ========================================
   Post Cards
   ======================================== */
.posts-section { padding: 40px 0 80px; }
.posts-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all var(--transition);
    display: flex;
    flex-direction: row;
    align-items: stretch;
}
.post-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}
.post-card-body { padding: 20px 24px; flex: 1; display: flex; flex-direction: column; }
.post-title-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}
.post-title-row img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    opacity: 0.8;
    flex-shrink: 0;
    margin-top: 2px;
}
.post-tags { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }

/* Tags */
.tag {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-xs);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.tag-ai { background: var(--purple-dim); color: var(--purple); }
.tag-web { background: var(--accent-secondary-dim); color: var(--accent-secondary); }
.tag-critical { background: var(--red-dim); color: var(--red); }
.tag-red { background: var(--red-dim); color: var(--red); }
.tag-tool { background: var(--yellow-dim); color: var(--yellow); }

.post-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
}
.post-title-row .post-title { margin-bottom: 0; }
.post-card:hover .post-title { color: var(--accent); }
.post-excerpt {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    flex: 1;
    margin-bottom: 16px;
}
.post-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    padding-top: 14px;
    border-top: 1px solid var(--border);
}
.placeholder-card { opacity: 0.6; }
.placeholder-card:hover { opacity: 0.8; }

/* ========================================
   Topics
   ======================================== */
.topics-section { padding: 40px 0 80px; }
.topics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.topic-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: all var(--transition);
}
.topic-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-dim);
}
.topic-icon {
    margin-bottom: 16px;
    color: var(--accent);
}
.topic-name {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 8px;
}
.topic-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ========================================
   CTA
   ======================================== */
.cta-section { padding: 40px 0 80px; }
.cta-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    position: relative;
    overflow: hidden;
}
.cta-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.03), rgba(64, 196, 255, 0.03));
    pointer-events: none;
}
.cta-title { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.cta-text { font-size: 15px; color: var(--text-secondary); }

/* ========================================
   Page Header
   ======================================== */
.page-header {
    padding: 120px 0 40px;
}
.page-title {
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 8px;
}
.page-subtitle {
    font-size: 17px;
    color: var(--text-secondary);
}

/* ========================================
   Filter Bar
   ======================================== */
.filter-section { padding: 0 0 32px; }
.filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.filter-tag {
    font-size: 13px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    transition: all var(--transition);
}
.filter-tag:hover {
    border-color: var(--border-hover);
    color: var(--text);
}
.filter-tag.active {
    background: var(--accent-dim);
    border-color: rgba(0, 230, 118, 0.3);
    color: var(--accent);
}

/* ========================================
   About Page
   ======================================== */
.about-section { padding: 120px 0 80px; }
.about-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 48px;
    align-items: start;
}
.about-intro {
    display: flex;
    gap: 24px;
    align-items: center;
    margin-bottom: 40px;
}
.avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--accent-dim);
    border: 2px solid rgba(0, 230, 118, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--accent);
    flex-shrink: 0;
}
.about-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid rgba(0, 230, 118, 0.3);
    object-fit: cover;
    flex-shrink: 0;
}
.about-name {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 4px;
}
.about-role {
    font-size: 15px;
    color: var(--accent);
    margin-bottom: 12px;
}
.about-socials { display: flex; gap: 8px; flex-wrap: wrap; }
.social-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 5px 12px;
    border-radius: 16px;
    transition: all var(--transition);
}
.social-pill:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.about-content { font-size: 15px; line-height: 1.8; color: var(--text-secondary); }
.about-content p { margin-bottom: 20px; }
.about-content h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin: 36px 0 16px;
}
.about-content ul {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}
.about-content li {
    padding: 6px 0 6px 20px;
    position: relative;
}
.about-content li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-family: var(--font-mono);
    font-weight: 600;
}
.about-content strong { color: var(--text); }

/* Achievement Grid */
.achievement-grid { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.achievement-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.achievement-icon { color: var(--yellow); flex-shrink: 0; }
.achievement-card img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 4px;
}
.achievement-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}
.achievement-detail {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
}

/* Sidebar */
.sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 16px;
}
.sidebar-card h3 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.skill-tag {
    font-size: 12px;
    font-weight: 500;
    padding: 5px 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text-secondary);
}
.current-list li {
    padding: 8px 0;
    font-size: 13px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    padding-left: 16px;
    position: relative;
}
.current-list li:last-child { border-bottom: none; }
.current-list li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 12px;
}

/* ========================================
   Projects Page
   ======================================== */
.projects-section { padding: 0 0 80px; }
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: all var(--transition);
}
.project-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}
.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.project-links { display: flex; gap: 10px; }
.project-links a {
    color: var(--text-muted);
    transition: color var(--transition);
}
.project-links a:hover { color: var(--accent); }
.project-name { font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.project-name a { color: inherit; text-decoration: none; transition: color var(--transition); }
.project-name a:hover { color: var(--accent); }
.project-card:hover .project-name { color: var(--accent); }
.project-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}
.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.project-tech span {
    font-size: 12px;
    font-family: var(--font-mono);
    color: var(--text-muted);
}

/* ========================================
   Footer
   ======================================== */
.footer {
    border-top: 1px solid var(--border);
    padding: 48px 0 24px;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 32px;
}
.footer-logo {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 1px;
    margin-bottom: 8px;
}
.footer-tagline { font-size: 13px; color: var(--text-muted); }
.footer-links { display: flex; gap: 64px; }
.footer-col h4 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 14px;
}
.footer-col a {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    padding: 4px 0;
    transition: color var(--transition);
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border);
}
.footer-bottom p {
    font-size: 12px;
    color: var(--text-muted);
}

/* ========================================
   Mobile Responsive
   ======================================== */
@media (max-width: 900px) {
    .hero-container { grid-template-columns: 1fr; gap: 40px; }
    .hero-title { font-size: 36px; }
    .hero-visual { order: -1; }
    .posts-grid { gap: 14px; }
    .topics-grid { grid-template-columns: repeat(2, 1fr); }
    .projects-grid { grid-template-columns: repeat(2, 1fr); }
    .about-grid { grid-template-columns: 1fr; }
    .cta-card { flex-direction: column; text-align: center; }
}

@media (max-width: 640px) {
    .nav-links, .nav-actions { display: none; }
    .nav-toggle { display: flex; }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-surface);
        border-bottom: 1px solid var(--border);
        padding: 16px 24px;
        gap: 12px;
    }
    .nav-link.active::after { display: none; }
    .hero { padding: 100px 0 60px; }
    .hero-title { font-size: 30px; }
    .hero-stats { flex-wrap: wrap; gap: 20px; }
    .posts-grid { gap: 12px; }
    .topics-grid { grid-template-columns: 1fr; }
    .projects-grid { grid-template-columns: 1fr; }
    .featured-card { padding: 24px; }
    .featured-title { font-size: 22px; }
    .page-title { font-size: 30px; }
    .about-intro { flex-direction: column; text-align: center; }
    .about-socials { justify-content: center; }
    .filter-bar { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 8px; }
}

/* ========================================
   Scroll Animations
   ======================================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
