/* =========================================
   Cyberdev — 0xSEC
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg:         #0d0d0d;
  --fg:         #d0d0d0;
  --fg-dim:     #777777;
  --fg-muted:   #444444;
  --border:     #1f1f1f;
  --link:       #d0d0d0;
  --code-bg:    #111111;
  --index-max:  1200px;
  --prose-max:  1000px;
  --font-mono:  'JetBrains Mono', 'Courier New', monospace;
  --font-prose: 'Lora', Georgia, serif;
}

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

html { font-size: 18px; -webkit-font-smoothing: antialiased; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-prose);
  line-height: 1.75;
}

.site-wrap { margin: 0 auto; padding: 2.5rem 2rem 6rem; }
body.page-index .site-wrap { max-width: var(--index-max); }
body:not(.page-index) .site-wrap { max-width: var(--prose-max); }

nav {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 3.5rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}
nav a { color: var(--fg-dim); text-decoration: none; }
nav a:hover { color: var(--fg); }

h1 {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg);
  margin-bottom: 1.5rem;
}

h2 {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg);
  margin: 2.5rem 0 0.75rem;
  border: none;
  padding: 0;
}

h3 { font-family: var(--font-prose); font-size: 1rem; font-weight: 600; color: var(--fg); margin: 1.5rem 0 0.25rem; }
h4 { font-family: var(--font-prose); font-size: 1rem; font-weight: 400; color: var(--fg-dim); margin: 1rem 0 0.2rem; }

p { font-family: var(--font-prose); font-size: 1rem; color: var(--fg); line-height: 1.75; margin-bottom: 1rem; font-weight: 400; }

a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--fg-muted); }
a:hover { color: #ffffff; text-decoration-color: #ffffff; }

hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

/* Index */
.index-intro { font-family: var(--font-prose); font-size: 1rem; color: var(--fg-dim); line-height: 1.75; margin-bottom: 2.5rem; font-weight: 400; }
.section-block { margin-bottom: 2rem; }

.role-item { display: flex; justify-content: space-between; align-items: baseline; padding: 0.15rem 0; }
.role-title { font-family: var(--font-prose); font-size: 0.95rem; font-weight: 600; color: var(--fg); }
.role-org { font-family: var(--font-prose); font-size: 0.95rem; font-weight: 400; color: var(--fg-dim); }
.role-date { font-family: var(--font-mono); font-size: 0.78rem; color: var(--fg-muted); white-space: nowrap; margin-left: 1rem; }

.project-item { margin-bottom: 1.25rem; }
.project-name { font-family: var(--font-prose); font-size: 0.95rem; font-weight: 600; color: var(--fg); display: block; margin-bottom: 0.15rem; }
.project-name:hover { color: #ffffff; }
.project-desc { font-family: var(--font-prose); font-size: 0.9rem; color: var(--fg-dim); line-height: 1.65; font-weight: 400; }

/* Blog list */
.blog-year { font-family: var(--font-mono); font-size: 0.78rem; color: var(--fg-muted); letter-spacing: 0.08em; margin: 2rem 0 0.5rem; }

.post-item { display: grid; grid-template-columns: 105px 1fr auto; align-items: baseline; gap: 1rem; padding: 0.3rem 0; text-decoration: none; border-bottom: 1px solid var(--border); }
.post-item:last-child { border-bottom: none; }
.post-date { font-family: var(--font-mono); font-size: 0.78rem; color: var(--fg-muted); white-space: nowrap; }
.post-title { font-family: var(--font-prose); font-size: 0.95rem; font-weight: 400; color: var(--fg); text-decoration: none; }
.post-item:hover .post-title { color: #ffffff; }
.post-type { font-family: var(--font-mono); font-size: 0.75rem; color: var(--fg-muted); white-space: nowrap; }

/* Single post */
.post-header { margin-bottom: 2.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.post-header h2 { font-family: var(--font-prose); font-size: 1.2rem; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--fg); margin-bottom: 0.5rem; }
.post-meta { font-family: var(--font-mono); font-size: 0.78rem; color: var(--fg-muted); display: flex; gap: 1.5rem; flex-wrap: wrap; }
.post-description { font-family: var(--font-prose); font-size: 0.9rem; color: var(--fg-dim); margin-top: 0.75rem; font-style: italic; font-weight: 400; }

.post-content { font-family: var(--font-prose); }
.post-content h1 { font-family: var(--font-prose); font-size: 1.15rem; font-weight: 600; text-transform: none; letter-spacing: 0; margin: 2rem 0 0.75rem; }
.post-content h2 { font-family: var(--font-prose); font-size: 1.05rem; font-weight: 600; text-transform: none; letter-spacing: 0; margin: 1.75rem 0 0.6rem; }
.post-content h3 { font-size: 1rem; font-weight: 600; margin: 1.5rem 0 0.4rem; }
.post-content p { font-size: 1rem; line-height: 1.8; margin-bottom: 1rem; }
.post-content ul, .post-content ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.post-content li { font-size: 1rem; line-height: 1.75; margin-bottom: 0.3rem; font-weight: 400; }
.post-content img { max-width: 100%; display: block; margin: 1.5rem 0; border: 1px solid var(--border); }
.post-content table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 0.82rem; margin: 1.5rem 0; }
.post-content th { text-align: left; padding: 0.4rem 0.75rem; border-bottom: 1px solid var(--fg-muted); color: var(--fg-dim); font-weight: 500; }
.post-content td { padding: 0.35rem 0.75rem; border-bottom: 1px solid var(--border); color: var(--fg); vertical-align: top; }
.post-content blockquote { border-left: 2px solid var(--fg-muted); padding-left: 1rem; margin: 1.5rem 0; color: var(--fg-dim); font-style: italic; }

code { font-family: var(--font-mono); font-size: 0.82rem; background: var(--code-bg); padding: 0.15em 0.4em; color: var(--fg); border-radius: 2px; }
pre { background: var(--code-bg); border: 1px solid var(--border); padding: 1rem 1.25rem; overflow-x: auto; margin: 1.25rem 0; font-size: 0.82rem; line-height: 1.6; }
pre code { background: none; padding: 0; font-size: inherit; color: var(--fg); }

.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.tag { font-family: var(--font-mono); font-size: 0.75rem; color: var(--fg-muted); text-decoration: none; }
.tag:hover { color: var(--fg); }

.links-section { margin-bottom: 2rem; }
.links-number { font-family: var(--font-mono); font-size: 0.78rem; color: var(--fg-muted); margin-bottom: 0.25rem; }

footer { margin-top: 4rem; padding-top: 1rem; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
footer p { font-family: var(--font-mono); font-size: 0.78rem; color: var(--fg-muted); margin: 0; font-weight: 400; }
footer a { color: var(--fg-muted); text-decoration: none; }
footer a:hover { color: var(--fg); }

@media (max-width: 520px) {
  html { font-size: 16px; }
  .post-item { grid-template-columns: 85px 1fr; }
  .post-type { display: none; }
  nav { gap: 1rem; }
}
