/* ========================================
   Roshan A Rauof — Portfolio
   Dark OLED theme — shared stylesheet (blog posts)
   ======================================== */

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

:root {
  --bg:          #020203;
  --surface:     rgba(255,255,255,0.06);
  --surface-h:   rgba(255,255,255,0.10);
  --border:      rgba(255,255,255,0.10);
  --border-h:    rgba(255,255,255,0.20);
  --text:        #EDEDEF;
  --text2:       #8A8F98;
  --text3:       #4A4F58;
  --accent:      #5E6AD2;
  --accent-dim:  rgba(94,106,210,0.15);
  --green:       #30D68A;
  --blue:        #60A5FA;
  --purple:      #A78BFA;
  --orange:      #FB923C;
  --red:         #F87171;
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Inter', sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: #fff;
}

a {
  color: var(--blue);
  text-decoration: none;
  transition: color 0.2s;
}

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

img {
  max-width: 100%;
  display: block;
}

/* --- Navigation (top bar for blog posts) --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(2, 2, 3, 0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text2);
  letter-spacing: 0.04em;
  text-decoration: none;
}

.nav-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 0.2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.78rem;
  color: var(--text3);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  transition: all 0.2s;
  font-family: var(--mono);
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--surface-h);
}

/* --- Layout --- */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

/* --- Blog Post --- */
.blog-post {
  max-width: 700px;
  margin: 0 auto;
  padding-top: 7rem;
  padding-bottom: 5rem;
}

.blog-post-meta {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text3);
  margin-bottom: 1rem;
  letter-spacing: 0.04em;
}

.blog-post h1 {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.8px;
  margin-bottom: 2rem;
  line-height: 1.3;
}

.blog-post p {
  color: var(--text2);
  margin-bottom: 1.5rem;
  font-size: 0.975rem;
  line-height: 1.8;
}

.blog-post h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  letter-spacing: -0.3px;
}

.blog-post code {
  font-family: var(--mono);
  background: var(--surface);
  padding: 0.15rem 0.42rem;
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--accent);
  border: 1px solid var(--border);
}

.blog-post pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.4rem 1.6rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.blog-post pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.82rem;
  color: var(--text2);
  line-height: 1.7;
}

/* --- Footer --- */
.footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  position: relative;
  z-index: 1;
}

.footer p {
  font-size: 0.75rem;
  color: var(--text3);
  font-family: var(--mono);
}

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

.footer-links a {
  color: var(--text2);
  font-size: 0.78rem;
  font-family: var(--mono);
  transition: color 0.2s;
}

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

/* --- Animations --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .blog-post h1 {
    font-size: 1.5rem;
  }
}
