/* This is the required project styling. Will contain essential CSS styles like:
   * Flex property
   * Grid layout
   * Cards and sections
*/

@import url(https://fonts.googleapis.com/css?family=Raleway:100,200,300,regular,500,600,700,800,900,100italic,200italic,300italic,italic,500italic,600italic,700italic,800italic,900italic);

/* variables */
:root {
  /* Colors */
  --primary-color: #ffcd42;
  --secondary-color: #ffd35c;
  --bg-primary: #ffffff;
  --text-color: #222222;
  --text-color-two: #ffffff;
  --bg-secondary: #000000;
  --card-background: #f4f4f4;
  --bg-secondary-two: #111111;

  --shadow: 0 10px 40px rgba(0, 0, 0, 0.2);

  /* Font Weight */
  --weight-small: 400;
  --weight-semibold: 600;
  --weight-bold: 800;

  /* Max width */
  --width-small: 600px;
  --width-medium: 1100px;
  --width-large: 1300px;
}

[data-theme="dark"] {
  --primary-color: #ffcd42;
  --secondary-color: #ffd35c;
  --bg-primary: #000000;
  --text-color: #ffffff;
  --text-color-two: #222222;
  --bg-secondary: #ffffff;
  --card-background: #111111;
  --bg-secondary-two: #f4f4f4;
  --shadow: 0 2px 10px rgba(95, 95, 95, 0.2);
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

/* Reset default styling */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: var(--text-color);
}

/* Main styling */
body {
  background: var(--bg-primary);
  color: var(--text-color);
  font-family: "Raleway", sans-serif;
  line-height: 1.5;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background: var(--bg-primary);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 20;
  height: 80px;
  width: 100%;
}

.navbar .nav-menu {
  display: flex;
  align-items: center;
  background: var(--bg-primary);
}

.navbar .nav-link {
  margin: 0 1rem;
  font-size: 0.8rem;
  font-weight: var(--weight-semibold);
}

.navbar #logo img {
  display: block;
  width: 150px;
}

.navbar .btn {
  margin-right: 1.5rem;
}

.fas.fa-arrow-right {
  margin-left: 0.5rem;
  font-size: 0.9rem;
}

/* hamburger */
.hamburger {
  margin-bottom: 0.1rem;
  display: none;
}

.bar {
  display: block;
  width: 23px;
  height: 3px;
  margin: 4px auto;
  transition: all 0.3s ease-in-out;
  border-radius: 30px;
  background-color: var(--bg-secondary);
}

/* Hero section */
#hero {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.profile-image {
  width: 150px;
  border-radius: 50%;
  animation: bounce 1s infinite alternate;
}

@keyframes bounce {
  from {
    transform: translateY(0px);
  }

  to {
    transform: translateY(-10px);
  }
}

.division {
  width: 100%;
  height: 2px;
  background-color: var(--card-background);
  margin: 5.5rem 0;
}
/* Projects */
#projects {
  display: flex;
  flex-direction: column;
  margin: 2rem auto 5rem;
}

#projects .btn {
  align-self: center;
  margin: 2rem 0;
}

.project {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(250px, auto);
  grid-gap: 0.9rem;
}

.card .project-bio p {
  font-size: 0.83rem;
}

.card .project-bio h3 {
  font-size: 0.9rem;
}

.project-info {
  display: flex;
  justify-content: space-between;
  opacity: 0;
  position: relative;
  transition: 0.5s ease-in-out;
}

.project-bio {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  top: 160px;
  left: 10px;
}

/* Footer */
#footer {
  background: #111111;
}

#footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  min-height: 160px;
  text-align: center;
}

#footer a {
  font-size: 0.8rem;
  color: #fff;
}

#footer a:hover {
  opacity: 0.6;
}

#footer .social {
  margin: 0.9rem 0;
}

#footer .social img {
  width: 20px;
  height: 20px;
}

#footer .social a {
  margin: 0 0.5rem;
}

#footer p {
  font-size: 0.8rem;
}

/* Responsiveness */

@media (max-width: 1000px) {
  .project {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
}

@media (max-width: 670px) {
  .navbar .nav-menu {
    position: fixed;
    right: -100vw;
    top: 4.5rem;
    flex-direction: column;
    width: calc(80% - 10px);
    transition: 0.3s;
    box-shadow: var(--shadow);
    padding: 2rem;
    border-radius: 5px;
    align-items: flex-start;
  }

  .navbar .btn {
    margin: 0;
    margin-top: 1rem;
  }

  .nav-menu.active {
    right: 20px;
  }

  .nav-menu .nav-link {
    font-size: 0.9rem;
    margin: 0 0.2rem;
  }

  .nav-menu li {
    margin-bottom: 0.5rem;
    width: 100%;
  }

  .nav-menu .btn {
    width: 100%;
    text-align: center;
    margin-top: 0.5rem;
  }

  .hamburger {
    display: block;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
  }

  .hamburger.active {
    border: 1px dotted gray;
  }

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

  .hamburger.active .bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

@media (max-width: 600px) {
  .project {
    display: grid;
    grid-template-columns: 1fr;
  }

  .header-container .btn {
    border-radius: 5px;
    width: 80%;
  }
}
/* ===== SEO Modal ===== */
.seo-modal {
  display: none; /* hidden by default */
  position: fixed;
  z-index: 9999; /* on top of everything */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(3px);
}

.seo-modal-content {
  background: #fff;
  margin: 5% auto;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 900px; /* wider for 1406×550 */
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
  animation: fadeIn .3s ease-in-out;
  text-align: center;
}

.seo-modal-content iframe {
  width: 100%;
  aspect-ratio: 1406 / 550; /* keep same ratio as cards */
  border: none;
  margin-top: 10px;
  border-radius: 8px;
}

.seo-modal .close {
  color: #333;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.seo-modal .close:hover {
  color: red;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* ===== SEO Projects ===== */
#seo-projects .project {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 per row */
  gap: 20px;
  margin-top: 20px;
}

/* Card container */
#seo-projects .card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  cursor: pointer;
  transition: transform 0.3s ease-in-out;

  /* ✅ force card background to match ratio */
  aspect-ratio: 1406 / 550;
  display: flex;
  flex-direction: column;
}

#seo-projects .card:hover {
  transform: translateY(-5px);
}

#seo-projects .card-img {
  flex: 1;
  width: 100%;
  overflow: hidden;
}

#seo-projects .card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* fill space, no white bars */
  display: block;
  transition: transform 0.3s ease;
}

#seo-projects .card:hover .card-img img {
  transform: scale(1.05);
}

#seo-projects .project-info {
  padding: 3px 4px;
  text-align: center;
  background: #fff;
}

#seo-projects .project-bio h3 {
  margin: 2px 0 1px;
  font-size: 1.2rem;
}

#seo-projects .project-bio p {
  font-size: 0.9rem;
  color: #666;
}

/* Mobile: only 1 card per row */
@media (max-width: 768px) {
  #seo-projects .project {
    grid-template-columns: 1fr;
    gap: 6px; /* smaller gap on mobile */
  }
}
/* Dark mode: Modal */
html[data-theme="dark"] .seo-modal-content {
  background: #1e1e1e;
  color: #f5f5f5;
}

html[data-theme="dark"] .seo-modal .close {
  color: #f5f5f5;
}

html[data-theme="dark"] .seo-modal .close:hover {
  color: #ff6b6b;
}

/* Dark mode: Project cards */
html[data-theme="dark"] #seo-projects .project-info {
  background: #222;
  color: #ddd;
}

html[data-theme="dark"] #seo-projects .project-bio p {
  color: #aaa;
}

/* Development project card container */
#dev-projects .card {
  position: relative;
  width: 100%;
  max-width: 350px;
  height: 220px;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  cursor: pointer;
  transition: transform 0.3s ease-in-out;
  background: none;   
  padding: 0;         
}

#dev-projects .card:hover {
  transform: translateY(-5px);
}

/* Project images */
#dev-projects .card img {
  width: 100%;
  height: 100%;
  object-fit: cover;  
  display: block;      
  transition: transform 6s ease-in-out;
}

/* Smooth vertical scroll effect */
#dev-projects .card:hover img {
  transform: translateY(calc(-100% + 220px));
}

/* Info overlay */
#dev-projects .project-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  color: #fff;
  padding: 12px;
}
/* Hide all cards after 6 by default (desktop) */
#dev-projects .card {
  display: none;
}

#dev-projects .card:nth-child(-n+6) {
  display: block;
}

/* On mobile (max-width: 768px), only show 3 initially */
@media (max-width: 768px) {
  #dev-projects .card {
    display: none;
  }
  #dev-projects .card:nth-child(-n+3) {
    display: block;
  }
}
/* Default button (light mode) */
#loadMoreBtn,
#seoLoadMoreBtn {
  display: block;
  margin: 20px auto;
  padding: 10px 25px;
  border: none;
  border-radius: 50px; /* pill shape */
  background: #000; /* black for light mode */
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

/* Hover */
#loadMoreBtn:hover,
#seoLoadMoreBtn:hover {
  background: #000000;
}

/* ===== Dark Mode Overrides ===== */
[data-theme="dark"] #loadMoreBtn,
[data-theme="dark"] #seoLoadMoreBtn {
  background: #fff;   /* white in dark mode */
  color: #000;
}

[data-theme="dark"] #loadMoreBtn:hover,
[data-theme="dark"] #seoLoadMoreBtn:hover {
  background: #ddd;   /* subtle hover */
}
/* =========================
   BLOG PAGES
========================= */

.blog-post-section {
  padding-top: 2rem;
  padding-bottom: 4rem;
}

.blog-post-wrap {
  max-width: 850px;
  margin: 0 auto;
  background: var(--card-background);
  border-radius: 12px;
  padding: 2.2rem;
  box-shadow: var(--shadow);
}

.blog-post-wrap h2 {
  font-size: 1.7rem;
  margin: 2rem 0 0.8rem;
}

.blog-post-wrap h3 {
  font-size: 1.15rem;
  margin: 1.5rem 0 0.6rem;
}

.blog-post-wrap p {
  margin-bottom: 1rem;
  line-height: 1.9;
}

.blog-post-wrap ul {
  list-style: disc;
  margin-left: 1.25rem;
  margin-bottom: 1rem;
}

.blog-post-wrap li {
  margin-bottom: 0.65rem;
  line-height: 1.8;
}

.blog-post-wrap a {
  text-decoration: underline;
}

.blog-meta-line {
  margin-top: 0.6rem;
  font-size: 0.95rem;
  opacity: 0.85;
}

.blog-cta-box {
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: 10px;
  background: rgba(255, 205, 66, 0.12);
  border: 1px solid rgba(255, 205, 66, 0.3);
}

.blog-cta-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

html[data-theme="dark"] .blog-post-wrap {
  background: #111111;
}

html[data-theme="dark"] .blog-cta-box {
  background: rgba(255, 205, 66, 0.08);
  border: 1px solid rgba(255, 205, 66, 0.2);
}

/* =========================
   BLOG INDEX PAGE
========================= */

.blogs-page-section {
  padding-bottom: 5rem;
}

.blogs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.blog-card {
  background: var(--card-background);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-5px);
}

.blog-card-content {
  padding: 1.5rem;
}

.blog-card-tag {
  display: inline-block;
  margin-bottom: 0.8rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--primary-color);
  color: #000;
  font-size: 0.75rem;
  font-weight: var(--weight-bold);
}

.blog-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
}

.blog-card p {
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.blog-card .btn {
  margin-top: auto;
}

.featured-blog {
  grid-column: 1 / -1;
}

.featured-blog .blog-card-content {
  padding: 2rem;
}

.featured-blog h3 {
  font-size: 1.5rem;
}

.header-container.blogs-header {
  min-height: auto;
  padding-top: 7rem;
  padding-bottom: 3rem;
}

.blogs-status {
  margin-top: 2rem;
  text-align: center;
  font-size: 1rem;
  opacity: 0.8;
}

.empty-blogs {
  max-width: 760px;
  margin: 2rem auto 0;
  background: var(--card-background);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow);
  text-align: center;
}

.empty-blogs h3 {
  margin-bottom: 0.8rem;
}

@media (max-width: 768px) {
  .blog-post-wrap {
    padding: 1.4rem;
  }

  .blog-post-wrap h2 {
    font-size: 1.4rem;
  }

  .blog-post-wrap h3 {
    font-size: 1.05rem;
  }

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

  .featured-blog {
    grid-column: auto;
  }

  .blog-card-content,
  .featured-blog .blog-card-content {
    padding: 1.25rem;
  }
}
