/* ========================================
   Professional Security Researcher Portfolio
   Terminal-Inspired, Minimalist Design
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ==================================================
   Core Color Palette
   ================================================== */
:root {
    --bg-primary: #0a0a0a;
    --bg-surface: #1a1a1a;
    --text-primary: #e0e0e0;
    --text-secondary: #888888;
    --accent: #00ff9d;
    --border: #333333;
    
    --code-bg: #111111;
    --code-text: #e0e0e0;
}

body.light-theme {
    --bg-primary: #ffffff;
    --bg-surface: #f9f9f9;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --accent: #0066cc;
    --border: #e0e0e0;
    
    --code-bg: #111111;
    --code-text: #e0e0e0;
}

/* ==================================================
   Reset & Base
   ================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { width: 100%; height: 100%; }

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==================================================
   Main Content Area
   ================================================== */
main, .home-container {
    flex: 1;
    width: 100%;
    max-width: 750px;
    margin: 0 auto;
    padding: 3rem 2rem;
    text-align: left;
}

@media (max-width: 768px) {
    main, .home-container { padding: 2rem 1.5rem; }
}

/* ==================================================
   Typography
   ================================================== */
p { margin-bottom: 1.2rem; }

h1, h2, h3 {
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent);
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

h4, h5, h6 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    margin-bottom: 0.6rem;
    color: var(--text-primary);
}

strong { font-weight: 600; color: var(--text-primary); }
em { font-style: italic; color: var(--text-secondary); }

/* ==================================================
   Links
   ================================================== */
a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover { color: var(--accent); opacity: 0.8; }

/* ==================================================
   Header & Navigation
   ================================================== */
header {
    width: 100%;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.cipher {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--accent);
    text-decoration: none;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Navigation Links */
nav, .nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

nav a, .nav-links a {
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 0.25rem;
    transition: color 0.2s ease;
}

nav a:hover, .nav-links a:hover,
nav a.active, .nav-links a.active {
    color: var(--accent);
}

nav a::after, .nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.2s ease;
}

nav a:hover::after, .nav-links a:hover::after,
nav a.active::after, .nav-links a.active::after {
    width: 100%;
}

/* Social Icons */
.social-links {
    display: flex;
    gap: 1rem;
    list-style: none;
}

.social-links a {
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: color 0.2s ease;
}

.social-links a:hover { color: var(--accent); }

/* ==================================================
   Theme Toggle (Bottom-Right)
   ================================================== */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    width: 44px;
    height: 44px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    color: var(--accent);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    transform: rotate(20deg);
    box-shadow: 0 0 10px rgba(0, 255, 157, 0.15);
}

/* ==================================================
   Code Blocks
   ================================================== */
code {
    font-family: 'JetBrains Mono', monospace;
    background: var(--code-bg);
    color: var(--code-text);
    padding: 0.15rem 0.4rem;
    border-radius: 0;
    font-size: 0.9em;
}

pre {
    font-family: 'JetBrains Mono', monospace;
    background: var(--code-bg);
    color: var(--code-text);
    padding: 1rem 1.2rem;
    margin: 1.5rem 0;
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    overflow-x: auto;
    line-height: 1.5;
}

pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* ==================================================
   Lists
   ================================================== */
ul, ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
    color: var(--text-primary);
}

li { margin-bottom: 0.5rem; }

/* ==================================================
   Horizontal Rules & Dividers
   ================================================== */
hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2rem 0;
}

/* ==================================================
   Post/Article List
   ================================================== */
.post-list, article {
    list-style: none;
    margin: 2rem 0;
}

.post-list li {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    align-items: flex-start;
}

.post-list time, .post-list .date {
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
}

.post-list a {
    flex: 1;
    font-weight: 500;
}

.post-list li:hover {
    background: transparent;
    padding-left: 0.5rem;
    transition: padding-left 0.2s ease;
}

/* ==================================================
   Blockquotes
   ================================================== */
blockquote {
    border-left: 2px solid var(--accent);
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: var(--text-secondary);
    font-style: italic;
}

/* ==================================================
   Images
   ================================================== */
img { max-width: 100%; height: auto; }

/* ==================================================
   Tables
   ================================================== */
table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

th, td {
    padding: 0.5rem 0.8rem;
    border: 1px solid var(--border);
    text-align: left;
    white-space: nowrap;
}

th { background: var(--bg-surface); font-weight: 600; }

/* ==================================================
   Utilities
   ================================================== */
.text-muted { color: var(--text-secondary); }
.text-accent { color: var(--accent); }

.blinking-cursor::after {
    content: '_';
    animation: blink 1s step-end infinite;
    color: var(--accent);
}

@keyframes blink { 50% { opacity: 0; } }

/* ==================================================
   Responsive
   ================================================== */
@media (max-width: 768px) {
    header { flex-direction: column; gap: 1rem; align-items: flex-start; }
    .header-left { width: 100%; justify-content: space-between; }
    nav, .nav-links { flex-wrap: wrap; }
}

@media (max-width: 480px) {
    main, .home-container { padding: 1.5rem 1rem; }
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.2rem; }
}

