:root {
  --bg: #0f1724;
  --card: #ffffff;
  --muted: #7b7f8b;
  --accent: #00d4ff;
  --accent-2: #6a8cff;
  --text: #0b1220;
  --glass: rgba(255, 255, 255, 0.06);
  --radius: 12px;
  --maxw: 1100px;
}

/* Light theme variables (default) */
:root[data-theme="light"] {
  --bg: linear-gradient(135deg, #f7f9fc, #eef6ff);
  --card: #ffffff;
  --muted: #6b7280;
  --accent: #4facfe;
  --accent-2: #00f2fe;
  --text: #071022;
  --glass: rgba(10, 14, 20, 0.03);
}

/* Dark theme overrides */
:root[data-theme="dark"] {
  --bg: linear-gradient(135deg, #0f1724, #121827);
  --card: #0b1220;
  --muted: #9aa3b2;
  --accent: #00d4ff;
  --accent-2: #6a8cff;
  --text: #e6eef8;
  --glass: rgba(255, 255, 255, 0.03);
}

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

html,
body {
  height: 100%;
}

body {
  font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}



/* NAV */
.site-header {
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 12px;
}

.brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--accent);
}

.nav {
  display: flex;
  gap: 18px;
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
  transition: all .18s;
}

.nav-link:hover {
  background: var(--glass);
}

.controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.icon-btn {
  background: transparent;
  border: 0;
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
}

.hamburger {
  display: none;
}

.nav-link.active {
  color: var(--accent);
  /* highlighted link color */
  font-weight: 600;
}


/* S Logo in Nav */
#s-logo {
  width: 50px;
  /* smaller for nav */
  height: 50px;
  cursor: pointer;
  /* shows it's interactive */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

/* Hover effect: slight scale and color glow */
#s-logo:hover {
  transform: scale(1.15);
}

/* Optional: Responsive for mobile nav */
@media (max-width: 768px) {
  #s-logo {
    width: 40px;
    height: 40px;
  }
}

.logo-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  /* space between logo and text */
}

/* ========================= */
/* Blog Page Styles */
.blog-container {
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  font-family: 'Poppins', sans-serif;
}

/* Featured Post Modern Design */
.featured-post {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  display: flex;
  flex-direction: column;
}

.featured-post:hover {
  transform: scale(1.02);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.featured-post img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.featured-post:hover img {
  transform: scale(1.05);
  filter: brightness(0.9);
}

/* Glass overlay content for desktop */
.featured-content {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  padding: 1.8rem 2rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  color: #3d3b3b;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.featured-content h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.featured-content p {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: #515050;
  line-height: 1.6;
}

.featured-content .read-more {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  transition: background 0.3s ease, transform 0.3s ease;
}

.featured-content .read-more:hover {
  background: var(--accent-2);
  transform: translateY(-2px);
}

/* Tablet adjustments */
@media (max-width: 768px) {
  .featured-content {
    padding: 1.5rem;
    position: static;
    /* remove overlay */
    background: #fff;
    /* readable background */
    box-shadow: none;
    margin-top: -5px;
  }

  .featured-content h2 {
    font-size: 1.6rem;
  }

  .featured-content p {
    font-size: 0.95rem;
  }

  .featured-post img {
    height: auto;
  }
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .featured-content h2 {
    font-size: 1.3rem;
  }

  .featured-content p {
    font-size: 0.9rem;
  }

  .featured-content {
    padding: 1rem;
  }
}


/* Blog Layout */
.blog-layout {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
}

/* Blog Main */
.blog-main {
  flex: 1 1 65%;
}

.page-title {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(--text);
  text-align: center;
  font-weight: 700;
}

/* Blog Posts */
.blog-posts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 700px) {
  .blog-posts {
    grid-template-columns: 1fr 1fr;
  }
}

.blog-post {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-post:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.25);
}

.blog-post img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  /* crops edges, keeps aspect ratio */
  object-position: center;
  /* centers the crop */
  border-radius: 8px;
  /* optional: smooth corners */
  transition: transform 0.3s ease;
}


.blog-post:hover img {
  transform: scale(1.05);
}

.post-content {
  padding: 1.8rem;
}

.post-title {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text);
}

.post-excerpt {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.read-more {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  transition: background 0.3s ease, transform 0.3s ease;
}

/* Hover with contrasting background and text */
.read-more:hover {
  color: #fff;
  /* make text white for contrast */
  background: var(--accent-2);
  /* add background highlight */
  transform: translateY(-2px);
}


/* Sidebar */
.blog-sidebar {
  flex: 1 1 30%;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-widget {
  background: var(--card);
  padding: 1.8rem;
  border-radius: var(--radius);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sidebar-widget:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.sidebar-widget h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  font-weight: 600;
  color: var(--text);
}

.sidebar-widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-widget ul li {
  margin-bottom: 0.6rem;
}

.sidebar-widget ul li a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  transition: color 0.3s ease;
}

.sidebar-widget ul li a:hover,
.sidebar-widget ul li a.selected {
  color: var(--accent);

}

/* Tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tags a {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 0.85rem;
  color: #fff;
  font-weight: 500;
  transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.tags a:hover {
  transform: scale(1.05);
  opacity: 0.85;
}

/* Selected Tag */
.tags a.selected {
  background: linear-gradient(135deg, #00b4d8, #0077b6);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transform: scale(1.05);
  opacity: 1;
}

/* Pagination */
.pagination {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pagination a {
  padding: 0.5rem 1rem;
  background: var(--card);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: background 0.3s ease, color 0.3s ease;
}

.pagination a:hover {
  background: var(--accent);
  color: #fff;
}

.pagination .active {
  background: var(--accent);
  color: #fff;
}

/* Responsive */
@media (max-width: 900px) {
  .blog-layout {
    flex-direction: column;
  }

  .blog-sidebar {
    flex: 1 1 100%;
  }

  .featured-content {
    max-width: 100%;
  }
}

@media (max-width: 576px) {
  .featured-content h2 {
    font-size: 1.8rem;
  }

  .page-title {
    font-size: 2rem;
  }

  .post-title {
    font-size: 1.3rem;
  }
}

/* Professional Footer Design */
/* Footer */
.site-footer {
  background: var(--card);
  color: var(--text);
  padding: 60px 20px 30px;
  font-family: 'Poppins', sans-serif;
  border-top: 2px solid var(--accent-2);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
}

/* Footer Container */
.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 35px;
  max-width: var(--maxw);
  margin: 0 auto 30px;
}

/* Footer Cards */
.footer-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-card h4 {
  font-size: 1.15rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 10px;
  position: relative;
}

.footer-card h4::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  margin-top: 6px;
  border-radius: 2px;
}

.footer-card ul {
  list-style: none;
  padding: 0;
}

.footer-card li {
  margin-bottom: 8px;
}

.footer-card a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s;
}

.footer-card a:hover {
  color: var(--accent-2);
  transform: translateX(4px);
}

.footer-card p {
  color: var(--muted);
  margin-bottom: 6px;
}

/* Social Icons */
.social-icons {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-size: 1.3rem;
  border-radius: 50%;
  background: var(--glass);
  color: var(--text);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s;
}

.social-icons a i {
  color: inherit;
}

/* Brand colors on hover */
.social-icons a[aria-label="GitHub"]:hover {
  background: #181717;
  color: #fff;
}

.social-icons a[aria-label="LinkedIn"]:hover {
  background: #0077B5;
  color: #fff;
}

.social-icons a[aria-label="Twitter"]:hover {
  background: #1DA1F2;
  color: #fff;
}

.social-icons a:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

/* Footer Bottom */
.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding-top: 16px;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 20px;
}

/* Responsive Footer */
@media (max-width: 700px) {
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .social-icons {
    justify-content: center;
  }

  .footer-card h4::after {
    margin: 6px auto 0;
  }
}


/* Responsive */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .profile-card {
    flex-direction: column;
    align-items: center;
  }

  .form-row {
    flex-direction: column;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.6rem;
  }

  .hero-sub {
    font-size: 1rem;
  }
}

/* ---------------- MOBILE NAV ---------------- */
@media (max-width: 768px) {

  /* Hide normal nav */
  .nav {
    display: none;
  }

  /* Show hamburger */
  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 27px;
    height: 22px;
    cursor: pointer;
    padding: 0;
    position: relative;
    font-size: 0;
    z-index: 2100;
  }

  .hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background: #53575f;
    border-radius: 4px;
    transition: all 0.3s ease;
  }

  /* Hamburger animation (X) */
  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }

  /* Mobile nav container */
  .nav.mobile-active {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 12px;

    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;

    background: var(--bg);
    backdrop-filter: blur(12px);
    padding: 80px 24px 24px;

    transition: right 0.4s ease;
    z-index: 2000;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav.mobile-active.show {
    right: 0;
  }

  /* Mobile nav links */
  .nav.mobile-active .nav-link {
    width: 100%;
    font-size: 1.05rem;
    padding: 12px 16px;
    border-radius: var(--radius);
    color: var(--text);
    text-decoration: none;
    transition: background 0.25s, color 0.25s, transform 0.2s;
  }

  .nav.mobile-active .nav-link:hover {
    background: var(--glass);
    color: var(--accent);
    transform: scale(1.03);
  }

  /* Nav row spacing */
  .nav-row {
    justify-content: space-between;
    align-items: center;
  }

}

/* Prevent body scroll when nav is open */
body.no-scroll {
  overflow: hidden;
  height: 100%;
}

/* ==========================
   BLOG MODAL POPUP - GLASS & GLOW STYLE
   ========================== */

.blog-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 36, 0.9);
  /* darker semi-transparent overlay */
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 1rem;
}

.blog-modal.open {
  display: flex;
  animation: modalFadeIn 0.4s ease forwards;
}

.modal-wrap {
  background: rgba(20, 30, 50, 0.8);
  /* glass effect */
  backdrop-filter: blur(12px);
  border-radius: var(--radius, 14px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
  animation: modalSlideUp 0.35s ease;
  position: relative;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.5rem;
}

.modal-title {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--accent);
  text-shadow: 0 0 8px rgba(0, 212, 255, 0.6);
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.6rem;
  color: #ffffffaa;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.2s ease;
}

.modal-close:hover {
  color: var(--accent);
  transform: rotate(90deg);
}

.modal-content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.modal-image {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: var(--radius, 12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.modal-image:hover {
  transform: scale(1.04);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
}

.modal-body {
  font-size: 1rem;
  color: #d1d5db;
  line-height: 1.6;
}

/* Scrollbar styling */
.modal-wrap::-webkit-scrollbar {
  width: 8px;
}

.modal-wrap::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.2);
  border-radius: 4px;
}

.modal-wrap::-webkit-scrollbar-track {
  background: transparent;
}

/* Animations */
@keyframes modalFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes modalSlideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .modal-wrap {
    padding: 1.5rem;
    max-width: 95%;
    max-height: 85vh;
  }

  .modal-title {
    font-size: 1.5rem;
  }

  .modal-body {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .modal-title {
    font-size: 1.3rem;
  }

  .modal-body {
    font-size: 0.9rem;
  }

  .modal-image {
    max-height: 250px;
  }
}

.modal-body .post-meta {
  font-size: 0.9rem;
  color: #00fff7;
  display: flex;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
  font-weight: 500;
}

.modal-body .post-meta .author {
  position: relative;
}

.modal-body .post-meta .author::before {
  content: "👤";
  margin-right: 0.3rem;
}

.modal-body .post-meta .date::before {
  content: "📅";
  margin-right: 0.3rem;
}

.modal-body .post-meta .date {
  color: #ffb74d;
  /* soft orange accent */
}


.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  /* space between author and date */
  font-size: 0.875rem;
  /* slightly bigger than small text */
  color: #6b7280;
  /* modern soft gray */
  margin-bottom: 12px;
  font-family: 'Inter', sans-serif;
}

.post-meta .author {
  font-weight: 600;
  color: #111827;
  /* dark color for author */
  background: #e0f2fe;
  /* subtle light blue background */
  padding: 2px 8px;
  border-radius: 6px;
  position: relative;
  transition: all 0.3s ease;
}

.post-meta .author:hover {
  background: #3b82f6;
  /* blue on hover */
  color: #ffffff;
  cursor: pointer;
}

.post-meta .date {
  font-weight: 400;
  color: #374151;
  /* darker gray for date */
  font-style: italic;
  position: relative;
}

.post-meta .date::before {
  content: "•";
  /* modern dot separator */
  margin-right: 6px;
  color: #3b82f6;
  /* blue dot */
}