html, body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;

  background: linear-gradient(135deg, #0d4687, #1f0011);
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
}

body.home {
    height: 100%;
}

.home-section, .skills-section::selection{
  background: none;
}

h1, h2, h3, h4, h5, h6, a {
  font-family: 'Space Grotesk', sans-serif;
}

h3.skill-back {
  color: #dfdfdf;
  margin-block-start: 0px;
  margin-block-end: 0px;
  padding-left: 1vh;

}

.container {
  height: 100vh;
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
}

.back-menu{
  height: 35px;
  background: #e9e9e965 ;
}

.back-menu:hover {
  cursor: pointer;
  background: #e9e9e9a9;
}

.back-menu-404{
  height: 35px;
  background: #e9e9e965 ;
}

.back-menu-404 h3{
  padding-top: 5px;
}

.back-menu h3{
  padding-top: 5px;
}

.back-menu-404:hover {
  cursor: pointer;
  background: #e9e9e9a9;
}

section {
  scroll-snap-align: start;
  height: 100vh;
  position: relative;
}

section.skills-section {
  height: auto;
}

section.timeline-section {
  height: 60vh;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(335px, 1fr));
  gap: 30px;
  max-width: 90vw;
  margin: 0vh auto 0vh auto;
  padding: 0px;
}

.skill-item {
  background-color: #e9e9e9;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s;
  position: relative;
}

.skill-item-in {
  background-color: #e9e9e9a3;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  position: relative;
}

.skill-item:hover {
  transform: scale(1.02);
}

.skill-badge {
  position: absolute;
  top: 10px;
  right: 15px;
  background-color: #007bff;
  color: white;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.skill-badge.beginner {
  background-color: #f39c12;
}

.skill-badge.in-progress {
  background-color: #3498db;
}

.skill-badge.intermediate {
  background-color: #2ecc71;
}

.lang-badge {
  background-color: #ccc;
  color: #333;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  margin-left: 8px;
  font-weight: bold;
}

.skill-icon {
  font-size: 2.5rem;
  color: #0d4687;
  margin-bottom: 10px;
  display: block;
}

.skill-item h3 {
  font-family: 'Space Grotesk', sans-serif;
  margin: 10px 0;
  font-size: 22px;
  color: #1f0011;
}

.skill-item p {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: #333;
  line-height: 1.4;
}

#skills {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 10px 20px 140px 20px;
  min-height: 80vh;
}

.timeline-section {
  padding: 80px 20px;
  background-color: #f9f9f9;
}

.timeline {
  max-width: 800px;
  margin: 0 auto;
}

.timeline-item {
  margin-bottom: 40px;
  border-left: 2px solid #333;
  padding-left: 20px;
  position: relative;
}

.timeline-item::before {
  content: "";
  width: 12px;
  height: 12px;
  background: #333;
  border-radius: 50%;
  position: absolute;
  left: -7px;
  top: 0;
}

#blog {
  padding: 60px 20px;
}

.section-title {
  text-align: center;
  font-size: 32px;
  margin-bottom: 40px;
  color: #f9f9f9;
}

.section-subtitle {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 40px;
  font-size: 16px;
  color: #909090;
  line-height: 1.6;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.blog-card {
  background-color: #fff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s;
  display: flex;
  flex-direction: column;
}

.blog-card.hidden {
  opacity: 0;
  visibility: hidden;
  height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.blog-card:hover {
  transform: scale(1.02);
}

.blog-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.blog-content {
  padding: 20px;
}

.blog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.blog-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.blog-badge {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 12px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-badge {
  font-size: 0.8rem;
  color: #7a7a7a;
  display: flex;
  align-items: center;
  gap: 5px;
  font-style: italic;
}
.ai-badge i {
  color: #8a8a8a;
}

.badge-hardware {
  background-color: #4a90e2;
}

.badge-software {
  background-color: #7b4397;
}

.badge-thoughts {
  background-color: #2ecc71;
}

.badge-how-to {
  background-color: #e67e22;
}

.badge-other {
  background-color: #e63622;
}

.blog-date {
  font-size: 12px;
  color: #999;
  margin: 8px 0;
}

.blog-preview {
  font-size: 14px;
  color: #444;
  line-height: 1.6;
}

.read-more {
  display: inline-block;
  margin-top: 10px;
  margin-bottom: 5px;
  font-size: 14px;
  color: #3498db;
  text-decoration: none;
}

.read-more:hover {
  text-decoration: underline;
}

.blog-filters {
  text-align: center;
  margin-bottom: 30px;
}

.language-filters {
  text-align: center;
  margin-bottom: 30px;
}

.filter-btn {
  background-color: #f0f0f0;
  border: none;
  padding: 8px 16px;
  margin: 0 5px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
  background-color: #0077ff;
  color: white;
}

.lang-filter-btn {
  background-color: #f0f0f0;
  border: none;
  padding: 8px 16px;
  margin: 0 5px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s;
}

.lang-filter-btn:hover,
.lang-filter-btn.active {
  background-color: #0077ff;
  color: white;
}

.badges {
  display: flex;
  align-items: center;
  margin-left: 10px;
}

.blog-search {
  text-align: center;
  margin: 20px auto;
}

#blogSearchInput {
  padding: 10px 15px;
  width: 80%;
  max-width: 400px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 16px;
}

.blog-detail-container {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 20px;
}

.blog-detail-title {
  font-size: 2rem;
  margin-bottom: 10px;
}

.blog-detail-meta {
  color: #777;
  font-size: 0.9rem;
  margin-bottom: 20px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.blog-detail-image {
  width: 100%;
  border-radius: 10px;
  margin: 20px 0;
}

.image-wrapper {
  position: relative;
  display: inline-block;
}

.image-source {
  position: absolute;
  bottom: 24px;
  right: 0px;
  background-color: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 0.9rem;
  padding: 4px 8px;
  border-radius: 10px 0 10px 0;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  transition: background-color 0.3s ease;
}

.image-source:hover {
  background-color: rgba(0, 0, 0, 0.6);
}

.blog-detail-content p {
  line-height: 1.7;
  margin-bottom: 20px;
}

.blog-detail-content h2 {
  margin-top: 30px;
  margin-bottom: 10px;
  font-size: 1.4rem;
  color: #333;
}

.blog-share {
  font-size: 1rem;
  margin-left: 10px;
  cursor: pointer;
  color: #444;
  transition: color 0.2s ease;
}

.code-block {
  background-color: #1e1e2f;
  border-radius: 8px;
  overflow: auto;
  margin: 20px 0;
  font-family: 'Courier New', Courier, monospace;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.code-header {
  background-color: #2a2a3b;
  color: #f1f1f1;
  font-size: 14px;
  padding: 8px 12px;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  font-weight: bold;
}

pre {
  margin: 0;
  padding: 12px;
  color: #f8f8f2;
  font-size: 14px;
  white-space: pre-wrap;
}

.blog-share:hover {
  color: #000;
}

.paper {
  background-color: #fff;
  max-width: 800px;
  margin: 30px auto;
  padding: 40px 20px;
  border-radius: 12px;
  width: 90%;
  box-sizing: border-box;
}

.paper-404 {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #fff;
  max-width: 1800px;
  margin: 30px auto;
  padding: 10px;
  border-radius: 12px;
  width: 90%;
  height: auto;
  box-sizing: border-box;
  overflow: hidden;
}

.paper-404 img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}

.dark-mode-toggle {
  position: fixed;
  top: 50px;
  right: 20px;
  background: #eaeaea;
  padding: 10px 12px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: background 0.3s ease;
}

.dark-mode-toggle:hover {
  background: #ccc;
}

body, .paper, .feedback-form, .back-menu {
  transition: background-color 0.5s ease, color 0.5s ease;
}

.dark-mode-active {
  background-color: #121212; 
  color: #f1f1f1;
}

.dark-mode-active .paper {
  background-color: #1e1e1e;
  color: #e0e0e0;
}

.dark-mode-active .back-menu {
  background-color: #1e1e1e9c;
}

.dark-mode-active a {
  color: #90caf9;
}

.dark-mode-active h1,
.dark-mode-active h2,
.dark-mode-active h3,
.dark-mode-active h4,
.dark-mode-active h5,
.dark-mode-active h6 {
  color: #ffffff;
}

.feedback-form {
  margin: 0px auto 30px auto;
  max-width: 800px;
  padding: 20px;
  background: #f4f4f4;
  border-radius: 12px;
  box-sizing: border-box;
}

.dark-mode-active .feedback-form {
  background: #2a2a2a;
}

.dark-mode-active .blog-share i {
  color: #d6d6d6;
}

.dark-mode-active .blog-share b {
  color: #d6d6d6;
}

.feedback-form textarea {
  width: 100%;
  padding: 10px;
  resize: vertical;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
  font-family: inherit;
  resize: none;
  height: 150px;
}

.feedback-form button {
  margin-top: 10px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background-color: #007acc;
  color: white;
  cursor: pointer;
}

.feedback-form button:hover {
  background-color: #005fa3;
}

.footer-text {
  text-align: center;
  color: #aaa;
  font-size: 0.9rem;
  margin-top: 60px;
}

.grid-title {
  text-align: center;
  color: #e9e9e9;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 64px;
  font-weight: 600;
  margin: 0;
  padding-top: 10vh;
}

.skill-grid-title{
  text-align: center;
  color: #e9e9e9;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 64px;
  font-weight: 600;
  margin-top: 2vh;
}

.grid-container {
  display: grid;
  grid-template-columns: 400px 350px 350px;
  grid-template-rows: 400px 100px;
  gap: 20px;
  padding: 10px;
  margin: auto;
  width: max-content;
  height: max-content;
  padding-top: 8vh;
  margin-top: 0;
}

.grid-container > div {
  background-color: #e9e9e9;
  text-align: center;
  border-radius: 15px;
  padding: 10px;
  font-size: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid #dfdfdfcc; 
  outline: 2px solid #dfdfdf;  
}

#scrollToTopBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
  background-color: #969696;
  color: #fff;
  border: none;
  padding: 12px 16px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#scrollToTopBtn:hover {
  background-color: #555;
}

.me-box {
  grid-row: 1 / span 2;
  background-image: url('https://images.unsplash.com/photo-1566041510394-cf7c8fe21800?q=80&w=1974&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.profile-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #dfdfdf;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: opacity 0.3s ease;
}

.profile-photo:hover {
  opacity: 0.90;
}

.profile-name {
  font-size: 24px;
  margin: 12px 0 4px;
  color: #333;
}

.profile-title {
  font-size: 18px;
  color: #555;
  margin: 0 0 25px;
}

.profile-bio {
  font-size: 16px;
  color: #666;
  max-width: 250px;
  padding: 0 10px;
}

.download-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 14px;
  background: #0d4687;
  color: #dfdfdf;
  border-radius: 6px;
  font-size: 1.2rem;
  font-weight: 600;
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 0.3s ease;
}
.download-btn:hover {
  opacity: 1;
}

.social-icons {
  margin-top: 35px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.social-icons a {
  color: #333;
  font-size: 1em;
  transition: color 0.3s;
}

.social-icons a:hover {
  color: #0d4687;
}

.interest-box {
  background-image: url('https://images.unsplash.com/photo-1566041510394-cf7c8fe21800?q=80&w=1974&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #2b0034;
  display: flex;
  justify-content: center;
  align-items: center;
}

.interest-box:hover{
  cursor: pointer;
}

.blog-box {
  grid-column: 2 / 4;
  grid-row: 2;
  background-image: url('https://images.unsplash.com/photo-1566041510394-cf7c8fe21800?q=80&w=1974&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #2b0034;
  display: flex;
  justify-content: center;
  align-items: center;
}

.blog-box:hover{
  cursor: pointer;
}

.box{
  background-image: url('https://images.unsplash.com/photo-1566041510394-cf7c8fe21800?q=80&w=1974&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #2b0034;
  display: flex;
  justify-content: center;
  align-items: center;
}

.box:hover{
  opacity: 0.75;
  cursor: not-allowed;
}

.scroll-icon {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 40px;
  cursor: pointer;
  animation: bounce 1.5s infinite;
  color: #e9e9e9;
  z-index: 10;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(12px); }
}

.contact-section {
  background-color: #e9e9e9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 40px 0px 40px;
}

.contact-subtext {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 2s ease, transform 1s ease;
  font-size: 120px;
  margin-top: 10px;
  margin-bottom: 10px;
  text-align: center;
}

.contact-subtext.visible {
  opacity: 1;
  transform: translateY(0);
  background: linear-gradient(135deg, #0d4687, #1f0011);
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.contact-section h2 {
  color: rgb(64, 64, 64);
  font-size: 36px;
  margin-bottom: 20px;
}

.contact-section form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 55vh;
}

.contact-section input,
.contact-section textarea {
  padding: 10px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background-color: #fff;
  box-shadow:
    inset 0 2px 5px #45454588,
    0 0 10px #2e2e2e3c;
}

.contact-section textarea {
  resize: none;
  height: 150px;
  font-family: 'Inter', sans-serif;
}

.contact-section button {
  padding: 10px;
  background: linear-gradient(135deg, #0d4687, #1f0011);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  height: 60px;
}

.contact-section button:hover {
  background-color: #555;
}

#toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #16a34a;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

.footer {
  margin-top: 20vh;
  padding: 20px 0;
  text-align: center;
  font-size: 14px;
  color: #444;
  border-top: 1px solid #828282;
  width: 100%;
}

.footer-a {
  text-decoration: underline;
  color: #444;
}

@media (min-width: 769px) {
  .grid-container > div {
    transition: outline-offset 0.1s ease, transform 0.3s ease;
  }

  .grid-container > div:hover {
    outline-offset: 7px;
    transform: scale(0.98);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .grid-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 10px;
    margin: 100px 40px;
    width: auto;
    height: auto;
    padding-top: 2vh;
    margin-top: 0;
  }

  .grid-title {
  padding-top: 1vh;
  padding-bottom: 1vh;
  }

  .grid-container > div {
    width: 92%;
    font-size: 24px;
    border-radius: 10px;
    border: none;
  }

  .me-box {
    height: 300px;
  }

  .profile-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #dfdfdf;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s ease;
    z-index: 999;
  }

  .profile-photo:hover {
    opacity: 0.90;
  }

  .profile-name {
    font-size: 20px;
    margin: 12px 0 4px;
    color: #333;
  }

  .profile-title {
    font-size: 15px;
    color: #555;
    margin: 0 0 0 0;
  }

  .profile-bio {
    font-size: 13px;
    color: #666;
    max-width: 250px;
    padding: 0 0px;
  }
  

  .download-btn {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 14px;
    background: #0d4687;
    color: #dfdfdf;
    border-radius: 6px;
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.3s ease;
    transition: font-size 0.3s ease;
  }
  .download-btn:hover {
    opacity: 0.85;
    font-size: 1.3rem;
  }

  .social-icons {
    margin-top: 0px;
    display: flex;
    justify-content: center;
  }

  .social-icons a {
    color: #333;
    font-size: 1em;
    transition: color 0.3s;
  }

  .social-icons a:hover {
    color: #2b0034;
  }

  .interest-box,
  .box {
    height: 32px;
  }

  #blog {
    padding: 20px 20px;
  }

  .blog-box {
    height: 32px;
  }

  .paper {
    padding: 30px 16px;
    border-radius: 8px;
  }

  .paper {
    padding: 30px 16px;
    border-radius: 8px;
  }

  .contact-section form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 35vh;
  }

  .contact-subtext {
    font-size: 55px;
  }

  .me-box,
  .interest-box,
  .box,
  .blog-box {
    grid-column: auto;
    grid-row: auto;
  }

  .interest-box h3{
    font-size: 20px;
  }
  .box h3{
    font-size: 20px;
  }
  .blog-box h3{
    font-size: 20px;
  }

  .scroll-icon {
    color: rgba(209, 209, 209, 0.742);
  }

  .section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 20px;
    color: #f9f9f9;
  }

  .blog-filters {
  text-align: center;
  margin-bottom: 30px;
  }

  .filter-btn {
    background-color: #f0f0f0;
    border: none;
    padding: 8px 15px;
    margin: 5px 3px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    font-family: 'Space Grotesk', sans-serif;
  }

  .footer {
    font-size: 12px;
    padding: 15px 0;
    margin-top: 10vh;
  }
}