/* ================================
   General Page Styling
   ================================ */

body {
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  margin: 0;
  /* padding: 2rem; */
  padding: 0;
  text-align: center;
  background: linear-gradient(-45deg, #0aa89e, #6b2d5e, #c84b8f, #1a6b5e, #e8703a, #8b1a4a);
  background-size: 400% 400%;
  animation: gradientShift 12s ease infinite;
  color: #eee;
}

/* Animated noise overlay for landing page */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  background-image: 
    repeating-linear-gradient(
      45deg,
      rgba(0, 255, 204, 0.02),
      rgba(0, 255, 204, 0.02) 1px,
      transparent 1px,
      transparent 4px
    ),
    url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0i2IiBoZWlnaHQ9IjIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iMSIgY3k9IjEiIHI9IjAuNSIgZmlsbD0icmdiYSgyNTUsMjU1LDI1NSwwLjEpIi8+PC9zdmc+");
  background-repeat: repeat, repeat;
  opacity: 0.25;
  animation: noiseAnim 20s linear infinite;
}

body::after {
  content: "";
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(255,255,255,0.03), transparent 70%);
}

@keyframes noiseAnim {
  0% { transform: translate(0, 0); }
  50% { transform: translate(-6%, 6%); }
  100% { transform: translate(0, 0); }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ================================
   Main & Containers
   ================================ */

main {
  margin: 0 auto;
  width: 100%;
}

/* Landing page container */
.landing-container {
  background: rgba(255, 255, 255, 0); 
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 4px 12px rgba(0,0,0,0.2),
    0 0 8px rgba(255,255,255,0.03);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  max-width: 380px;
  margin: 2rem auto;
  color: #eee;
  position: relative;
  z-index: 1;
}

/* Logo */
.logo {
  width: 120px;
  border-radius: 50%;
  margin-bottom: 1rem;
  border: 3px solid #fff;
  padding: 3px;
}

/* Social icons */
.social-icons-inline {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem auto 1.5rem auto;
  width: max-content;
}

.social-icons-inline a {
  display: inline-block;
  background: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

.social-icons-inline img {
  width: 32px;
  height: 32px;
  transition: transform 0.2s;
}

.social-icons-inline a:hover img {
  transform: scale(1.1);
}

/* Landing page headings */
h2 {
  /* margin-top: 2.5rem; */
  margin-bottom: 1rem;
  font-size: 1.1rem;
  color: #888;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Landing page buttons */
.landing-container a:not(.social-icons-inline a) {
  display: block;
  margin: 0.8rem auto;
  padding: 0.8rem 1.5rem;
  max-width: 260px;
  text-align: center;
  text-decoration: none;
  color: #eee;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  font-weight: 500;
  font-size: 1.1rem;
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.landing-container a:not(.social-icons-inline a):hover {
  background: rgba(255,255,255,0.12);
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(255,255,255,0.08);
}

/* Landing bio */
.landing-bio {
  text-align: center;
  margin: 2rem auto;
  font-size: 0.95rem;
  color: #bbb;
  max-width: 340px;
  line-height: 1.5;
}

.landing-bio .title {
  color: #e6fffb;
  font-weight: 600;
  font-size: 1.05rem;
}

.landing-bio .skill {
  display: inline-block;
  color: #ccc;
  font-weight: 400;
  margin: 0 0.25rem;
}

.landing-bio .dot-separator {
  display: inline-block;
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
  margin: 0 0.25rem;
  transform: translateY(-1px);
}

.landing-bio ul {
  padding-left: 1.2rem;
  list-style-type: disc;
  color: #ccc;
  margin: 0.5rem 0;
}

.landing-bio li {
  margin-bottom: 0.5rem;
}

/* section-card wrapper for better spacing & separation */
.section-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 1.8rem 1.5rem;
  margin: 1.5rem auto;
  max-width: 380px;
  text-align: left;
}

.section-card h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: #ccc;
}

.section-card .subsection {
  margin-bottom: 1rem;
}

.section-card .subsection h3 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: #aaa;
}

.section-card a {
  display: block;
  margin: 0.3rem 0;
  padding: 0.5rem 0.8rem;
  text-decoration: none;
  color: #0aa89e;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  transition: background 0.2s ease, transform 0.15s ease;
}

.section-card a:hover {
  background: rgba(255,255,255,0.1);
  transform: scale(1.02);
}

/* faint line between stacked section-cards */
.section-card + .section-card {
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* Landing footer */
footer {
  text-align: center;
  font-size: 0.9rem;
  color: #555;
  margin-top: 3rem;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(0,0,0,0.05);
  background: transparent;
}

footer a {
  color: #555;
  text-decoration: underline;
  transition: color 0.2s ease;
}

footer a:hover {
  color: #222;
}

/* ================================
   Page Layout (White Theme)
   ================================ */

.page-layout {
  background: #ffffff;
  color: #222;
  min-height: 100vh;
}

.page-layout .page-container {
  max-width: 720px;
  margin: 3rem auto;
  /* padding: 2rem; */
  padding: 0;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  text-align: left;
  min-height: 500px;
}

.page-layout h1 {
  color: #111;
  margin-bottom: 0.5rem;
}

.page-layout .page-subtitle {
  color: #555;
  margin-bottom: 2rem;
}

.page-layout .page-content {
  color: #333;
}

.page-layout .page-content p {
  margin-bottom: 1.2rem;
  line-height: 1.6;
}

/* ================================
   Navigation
   ================================ */

.site-nav {
  width: 100%;
  padding: 1rem 1.5rem;
  background: rgba(10, 26, 42, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.nav-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-weight: 600;
  text-decoration: none;
  color: #fff;
}

.nav-links a {
  margin-left: 1.5rem;
  text-decoration: none;
  color: #ccc;
}

.nav-links a:hover {
  color: #fff;
}

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
}

@media screen and (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    margin-top: 1rem;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    margin: 0.5rem 0;
  }
}

/* Page-layout specific nav */
.page-layout .site-nav {
  background: #111;
  border-bottom: 1px solid #222;
}

.page-layout .nav-logo {
  color: #fff !important;
  text-decoration: none !important;
}

.page-layout .nav-links a {
  color: #ccc !important;
  text-decoration: none !important;
}

.page-layout .nav-links a:hover {
  color: #fff;
}

/* ================================
   Footer (Page Layout)
   ================================ */

.page-layout .site-footer {
  color: #777;
  border-top: 1px solid #eee;
  margin-top: 4rem;
  text-align: center;
  font-size: 0.9rem;
  padding: 2rem 0;
}

.page-layout a {
  color: #0aa89e;
}

.page-layout a:hover {
  text-decoration: underline;
}

/* ================================
   Responsive / Desktop tweaks
   ================================ */

@media screen and (min-width: 1024px) {
  main {
    max-width: 720px;
  }

  .landing-container {
    max-width: 400px;
  }

  .landing-container a:not(.social-icons-inline a) {
    padding: 1rem 2rem;
    font-size: 1.1rem;
  }
}

@media screen and (max-width: 480px) {
  .landing-container {
    margin: 1.5rem;
    padding: 1.5rem 1.2rem;
    border-radius: 14px;
  }
}

/* ================================
   Blog Post / Page Layout Updates
   ================================ */

/* Optional for posts only */
body.page-layout.blog-post {
  background: #fefefe;
  color: #111;
}

.page-layout.blog-post .page-container {
  max-width: 720px;
  padding: 2rem 2rem 3rem;
  margin: 3rem auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}

.page-layout.blog-post .page-content p {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  color: #222;
}

.page-layout.blog-post h2, 
.page-layout.blog-post h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #0aa89e;
}

.page-layout.blog-post pre {
  background: #0a1a2a;
  color: #eee;
  padding: 1rem;
  border-radius: 12px;
  overflow-x: auto;
  font-family: 'Fira Code', monospace;
  font-size: 0.95rem;
}

.page-layout.blog-post code {
  /* background: #eaeaea; */
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: 'Fira Code', monospace;
}

.page-layout.blog-post a {
  color: #0aa89e;
  text-decoration: underline;
}

.page-layout.blog-post a:hover {
  text-decoration: none;
}

body.blog-post .twitch-card {
  background: #f4f4f4;
  color: #111;
  max-width: 260px;   /* narrower */
  margin: 0 auto;     /* centered */
}

body.blog-post .twitch-card.live {
  background: #e6f7f5;
}

.twitch-card.live {
  background: rgba(0, 128, 255, 0.3);
  animation: twitchPulse 1.8s infinite ease-in-out;
  border: 1px solid rgba(78, 228, 78, 0.6);
}

@keyframes twitchPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(78, 228, 78, 0.3); }
  50% { box-shadow: 0 0 16px rgba(78, 228, 78, 0.6); }
}

.demo-block {
  margin: 2rem 0;
  padding: 1.5rem;
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  background: #fafafa;
  text-align: center;
}

.demo-block:hover {
  border-color: #ccc;
  background: #f5f5f5;
}

.demo-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #666;
  margin-bottom: 1rem;
}

/* ================================
   Blog Post Images
   ================================ */

.blog-post img {
  display: block;
  max-width: 700px;   /* consistent readable width */
  width: auto;
  height: auto;
  margin: 1.5rem auto;
  border-radius: 12px;

  /* subtle card feel */
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Optional: smaller images (for close-ups) */
.blog-post img.small {
  max-width: 500px;
}

/* ================================
   Blog Layout
   ================================ */

.blog-container {
  max-width: 720px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}

.blog-post {
  background: #ffffff;
  color: #222;
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  text-align: left;
}

/* Header */
.blog-header h1 {
  margin-bottom: 0.5rem;
}

.blog-subtitle {
  color: #666;
  margin-bottom: 0.75rem;
}

.blog-date {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 2rem;
}

/* Content */
.blog-content p {
  margin-bottom: 1.2rem;
  line-height: 1.7;
}

.blog-content h2,
.blog-content h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.blog-content ul {
  margin: 1rem 0;
  padding-left: 1.2rem;
}

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

/* Images */
.blog-content img {
  max-width: 100%;
  border-radius: 12px;
  margin: 1.5rem auto;
  display: block;
}

/* Optional: image grid for multiple screenshots */
.image-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.image-row img {
  flex: 1 1 calc(33% - 1rem);
}

/* Back link */
.blog-back {
  text-align: center;
  margin-top: 2rem;
}

.blog-back a {
  color: #ccc;
  text-decoration: none;
}

.blog-back a:hover {
  color: #fff;
}