/* Global Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Roboto", sans-serif;
  background-color: #000000;
  color: #ffffff;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

a {
  color: #f06400;
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: #ff7a1f;
}

h1,
h2,
h3 {
  color: #f06400;
}

p {
  line-height: 1.6;
}

.btn {
  padding: 15px 30px;
  background-color: #f06400;
  color: #ffffff;
  border: none;
  cursor: pointer;
  font-size: 1em;
  transition: background-color 0.3s, transform 0.3s;
}

.btn:hover {
  background-color: #d35400;
  transform: scale(1.05);
}

/* Navigation */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 20px 20px 20px;
  background-color: #000000;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 100;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 10px;
}

nav .logo {
  margin-left: auto;
  margin-right: auto; /* Center the logo horizontally */
}

nav .logo img {
  height: auto;
  width: 200px;
}

.nav-container ul {
  list-style: none;
  display: flex;
  gap: 20px;
}

.nav-container ul li {
  transition: color 0.3s;
}

.nav-container ul li:hover {
  color: #f06400;
}

/* Screen-reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Mobile Navigation Menu */
.nav-toggle {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.nav-toggle-icon {
  width: 30px;
  height: 3px;
  background-color: #f06400;
  margin: 5px 0;
  transition: 0.3s;
}

@media (max-width: 768px) {
  nav {
    padding: 15px 20px;
  }

  .nav-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  nav .logo {
    max-width: 200px;
    margin: 0;
  }

  nav .logo img {
    width: 200px;
    max-width: 200px;
  }

  .nav-toggle {
    display: block;
    order: 2;
  }

  .nav-container ul {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    margin: 0;
    background-color: #0a0a0a;
    padding: 0;
    border-top: 2px solid #f06400;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    gap: 0;
  }

  .nav-container ul li {
    width: 100%;
    padding: 0;
    border-bottom: 1px solid #1a1a1a;
  }

  .nav-container ul li a {
    display: block;
    padding: 12px 20px;
  }

  .nav-container ul li:last-child {
    border-bottom: none;
  }

  .nav-container ul.nav-open {
    display: flex;
    animation: slideDown 0.3s ease-out;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .nav-toggle.active .nav-toggle-icon:nth-child(1) {
    transform: rotate(45deg) translateY(10px);
  }

  .nav-toggle.active .nav-toggle-icon:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active .nav-toggle-icon:nth-child(3) {
    transform: rotate(-45deg) translateY(-10px);
  }
}

/* Introduction Section */
#introduction {
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

#particle-canvas {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.intro-content {
  position: relative;
  text-align: center;
  z-index: 1;
  padding: 0 20px;
  animation: introSlide 1.5s ease-out;
}

#introduction h1 {
  font-size: 3em;
}

#introduction p {
  font-size: 1.2em;
  max-width: 600px;
  margin: 20px auto;
  padding: 0px 0px 20px 0px;
}

.cta-btn {
  margin-top: 20px;
  padding: 18px 45px;
  font-size: 1.1em;
  font-weight: 700;
  background: linear-gradient(135deg, #f06400 0%, #d35400 100%);
  box-shadow: 0 8px 24px rgba(240, 100, 0, 0.4);
  border-radius: 50px;
  display: inline-block;
  text-decoration: none;
  animation: pulse 2s infinite;
  border: 3px solid transparent;
  width: 230px;
  text-align: center;
  white-space: nowrap;
  color: #ffffff;
}

.cta-btn:hover {
  transform: scale(1.1) translateY(-5px);
  box-shadow: 0 12px 32px rgba(240, 100, 0, 0.6);
  color: #ffffff;
}

.btn-h {
  padding: 15px 30px;
  background-color: #f06400;
  color: #ffffff;
  cursor: pointer;
  font-size: 1em;
  transition: background-color 0.3s, transform 0.3s;
}

.btn-h:hover {
  background-color: #d35400;
  transform: scale(1.05);
}

.cta-btn-row {
  display: flex;
  justify-content: center;   /* center row as a whole */
  flex-wrap: wrap;           /* allow wrapping on narrow screens */
  gap: 16px;                 /* space *between* buttons */
  margin-top: 20px;          /* optional spacing from content above */
}

.cta-h-btn {
  margin-top: 20px;
  padding: 18px 45px;
  font-size: 1.1em;
  font-weight: 700;
  background: none;
  background-color: transparent;
  border: 3px solid #f06400;
  color: #f06400;
  box-shadow: none;
  border-radius: 50px;
  display: inline-block;
  text-decoration: none;
  animation: pulse 2s infinite;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  width: 230px;
  text-align: center;
  white-space: nowrap;
}

.cta-h-btn:hover,
.cta-h-btn:focus,
.cta-h-btn:active {
  background: none;
  background-color: transparent;
  color: #f06400;
  transform: scale(1.1) translateY(-5px);
  box-shadow: 0 12px 32px rgba(240, 100, 0, 0.4);
}
@keyframes pulse {
  0%, 100% {
    box-shadow: 0 8px 24px rgba(240, 100, 0, 0.4);
  }
  50% {
    box-shadow: 0 8px 32px rgba(240, 100, 0, 0.6);
  }
}

/* Technologies Section */
#technologies {
  padding: 100px 20px;
  text-align: center;
  background: linear-gradient(180deg, #000000 0%, #000010 50%, #000000 100%);
}

.tech-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  margin-top: 50px;
}

.tech-card {
  background-color: #111122;
  padding: 30px;
  border-radius: 10px;
  width: 400px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.tech-card:hover {
  transform: translateY(-10px);
  border-color: #f06400;
  box-shadow: 0 10px 40px rgba(240, 100, 0, 0.2);
}

.tech-card img {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
}

.tech-card h3 {
  margin-bottom: 20px;
}

.tech-card p {
  color: #cccccc;
}

.tech-card p.highlight {
  color: #f06400;
  font-weight: 700;
  font-size: 1.1em;
  margin-top: 15px;
}

/* Extra descriptive text under Technologies */
.tech-extra-info {
  max-width: 900px;
  margin: 60px auto 0;
  text-align: left;
  line-height: 1.7;
  color: #cccccc;
  font-size: 1.05em;
}

.tech-extra-info p {
  margin-bottom: 1.5em;
  text-align: justify;
}

.tech-extra-info strong {
  color: #f06400; /* unified accent color */
  font-weight: 700;
}

.tech-extra-info em {
  font-style: italic; /* restore italic style */
  color: #f06400; /* same accent color for consistency */
  font-weight: 500;
}

.tech-extra-info abbr {
  text-decoration: none;
  border-bottom: 1px dotted #f06400; /* match accent color */
  cursor: help;
}

.tech-extra-info.collapsed {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s ease-out;
}

#toggle-tech-info {
  margin-top: 20px;
}

.btn.secondary {
  background-color: transparent;
  border: 2px solid #f06400;
  border-radius: 50px;
  transition: all 0.3s ease;
}

.btn.secondary:hover {
  background-color: #f06400;
  box-shadow: 0 6px 20px rgba(240, 100, 0, 0.4);
  transform: translateY(-2px);
}

/* Meet the Team Section */
#team {
  padding: 100px 20px;
  text-align: center;
  background-color: #000000;
}

.team-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  margin-top: 50px;
}

.team-member {
  text-align: center;
  width: 200px;
}

.team-member img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 3px solid transparent;
}

.team-member:hover img {
  transform: scale(1.05);
  border-color: #f06400;
  box-shadow: 0 8px 24px rgba(240, 100, 0, 0.3);
}

.team-member h3 {
  margin-top: 15px;
}

.team-member p {
  color: #cccccc;
}

/* Contact Us Section */
#contact {
  padding: 100px 20px;
  text-align: center;
  background: linear-gradient(180deg, #000000 0%, #000010 50%, #000000 100%);
}

#contact form {
  max-width: 600px;
  margin: 0 auto;
}

#contact input,
#contact textarea {
  width: 100%;
  padding: 18px 20px;
  margin: 12px 0;
  background-color: #111122;
  border: 2px solid #2a2a3e;
  border-radius: 8px;
  color: #ffffff;
  font-size: 1em;
  font-family: "Roboto", sans-serif;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

#contact input:focus,
#contact textarea:focus {
  outline: none;
  border-color: #f06400;
  background-color: #1a1a2a;
  box-shadow: 0 0 0 3px rgba(240, 100, 0, 0.1);
}

#contact input::placeholder,
#contact textarea::placeholder {
  color: #888888;
}

#contact textarea {
  resize: vertical;
  min-height: 150px;
}

#contact .btn {
  margin-top: 10px;
  width: 100%;
  font-size: 1.1em;
  padding: 16px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

#contact .btn:hover {
  box-shadow: 0 8px 24px rgba(240, 100, 0, 0.4);
  transform: translateY(-2px);
}

#contact p {
  color: #cccccc;
}

/* Footer */
footer {
  padding: 40px 20px 20px;
  text-align: center;
  background-color: #000000;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #ffffff;
  text-decoration: none;
  border-radius: 30px;
  font-size: 1em;
  font-weight: 500;
  border: 2px solid #2a2a3e;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.social-btn:hover {
  background: linear-gradient(135deg, #f06400 0%, #d35400 100%);
  border-color: #f06400;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(240, 100, 0, 0.4);
  color: #ffffff;
}

.social-icon {
  width: 20px;
  height: 20px;
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .social-links {
    gap: 15px;
  }
  
  .social-btn {
    padding: 10px 20px;
    font-size: 0.9em;
  }
  
  .social-btn span {
    display: none;
  }

  .model-download-btn span {
    display: inline;
  }
  
  .social-icon {
    width: 24px;
    height: 24px;
    font-size: 24px;
  }
}

footer p {
  margin: 0;
  color: #777777;
}

/* Responsive Design */
/* Landscape tablet/large phone mode - full nav visible */
@media (min-width: 769px) and (max-height: 500px) and (orientation: landscape) {
  #introduction {
    height: auto;
    min-height: 100vh;
    display: block;
    padding-top: 0;
    overflow-y: auto;
  }

  .intro-content {
    padding: 140px 20px 40px 20px;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  #introduction h1 {
    font-size: 1.8em;
    line-height: 1.2;
    margin-bottom: 10px;
  }

  #introduction p {
    font-size: 0.95em;
    padding: 0 10px 10px;
    margin: 8px auto;
  }

  .cta-btn-row {
    gap: 12px;
    margin-top: 15px;
  }

  .cta-btn,
  .cta-h-btn {
    padding: 12px 30px;
    font-size: 0.95em;
    width: 180px;
  }
}

/* Landscape phone mode - hamburger menu */
@media (max-width: 768px) and (max-height: 500px) and (orientation: landscape) {
  nav {
    padding: 10px 20px;
  }

  nav .logo img {
    width: 150px;
  }

  .nav-container ul {
    top: 50px;
    max-height: calc(100vh - 50px);
    overflow-y: auto;
  }

  #introduction {
    height: auto;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding-top: 70px;
    overflow-y: auto;
  }

  .intro-content {
    padding: 20px 20px 30px 20px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }

  #introduction h1 {
    font-size: 1.2em;
    line-height: 1.15;
    margin-bottom: 8px;
    margin-top: 0;
  }

  #introduction p {
    font-size: 0.75em;
    padding: 0 10px 8px;
    margin: 6px auto;
  }

  .cta-btn-row {
    gap: 8px;
    margin-top: 10px;
    flex-direction: row;
  }

  .cta-btn,
  .cta-h-btn {
    padding: 8px 18px;
    font-size: 0.75em;
    width: 145px;
  }
}

@media (max-width: 768px) {
  /* Introduction Section */
  #introduction h1 {
    font-size: 2em;
    line-height: 1.3;
    padding: 0 10px;
  }

  #introduction p {
    font-size: 1em;
    padding: 0 15px 20px;
  }

  .intro-content {
    padding: 0 15px;
  }

  /* Technologies Section */
  #technologies {
    padding: 60px 15px;
  }

  #technologies h2 {
    font-size: 2em;
    margin-bottom: 30px;
  }

  .tech-container,
  .team-container {
    flex-direction: column;
    align-items: center;
    gap: 30px;
  }

  .tech-card {
    width: 90%;
    max-width: 320px;
    padding: 20px;
    margin: 0 auto;
  }

  .tech-card img {
    width: 50px;
    height: 50px;
    margin-bottom: 15px;
  }

  .tech-card h3 {
    font-size: 1.3em;
    margin-bottom: 12px;
  }

  .tech-card p {
    font-size: 0.9em;
    line-height: 1.5;
  }

  .tech-card p.highlight {
    font-size: 0.95em;
    margin-top: 10px;
  }

  /* Team Section */
  #team {
    padding: 60px 15px;
  }

  #team h2 {
    font-size: 2em;
    margin-bottom: 30px;
  }

  .team-member {
    width: 100%;
    max-width: 300px;
  }

  /* Contact Section */
  #contact {
    padding: 60px 15px;
  }

  #contact h2 {
    font-size: 1.8em;
    margin-bottom: 15px;
  }

  #contact p {
    font-size: 0.95em;
    padding: 0 10px;
    margin-bottom: 25px;
  }

  #contact form {
    padding: 0;
    width: 90%;
    max-width: 400px;
    margin: 0 auto;
  }

  #contact input,
  #contact textarea {
    padding: 14px 16px;
    font-size: 0.95em;
    margin: 10px 0;
  }

  #contact textarea {
    min-height: 120px;
  }

  #contact .btn {
    font-size: 1em;
    padding: 14px;
  }

  .captcha-container {
    transform: scale(0.9);
    transform-origin: center;
  }

  /* CTA Buttons on Mobile */
  .cta-btn-row {
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 0 20px;
  }

  .cta-btn,
  .cta-h-btn {
    width: 100%;
    max-width: 280px;
  }
}

/* Fade-in Animations */
.fade-in {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1s ease-out, transform 1s ease-out;
}

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

/* Modal styles */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1000; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  background-color: rgba(0, 0, 0, 0.6); /* Black background with opacity */
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: #1a1a2a;
  margin: auto;
  padding: 30px;
  border-radius: 12px;
  width: 80%;
  max-width: 400px;
  text-align: center;
  color: #ffffff;
  animation: fadeIn 0.3s ease;
  border: 2px solid #2a2a3e;
}

.modal-content.success {
  border-color: #4caf50;
  background-color: #1a2a1a;
}

.modal-content.success p {
  color: #4caf50;
  font-size: 1.1em;
}

.modal-content.error {
  border-color: #f44336;
  background-color: #2a1a1a;
}

.modal-content.error p {
  color: #f44336;
  font-size: 1.1em;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: #f06400;
  text-decoration: none;
  cursor: pointer;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.captcha-container {
  display: flex;
  justify-content: center; /* Center horizontally */
  align-items: center; /* Center vertically (if needed) */
  margin: 20px 0; /* Add some space above and below */
}

.feature-list {
  margin: 20px 0 20px 20px;
  padding-left: 0;
  list-style-type: none;
}

.feature-list li {
  position: relative;
  margin-bottom: 12px;
  padding-left: 24px;
  color: #cccccc;
}

.feature-list li::before {
  content: "✔";
  position: absolute;
  left: 0;
  top: 0;
  color: #f06400;
}

@keyframes introSlide {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
  }
  60% {
    opacity: 1;
    transform: translateY(-8px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Blog Styles */
#blog-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 120px clamp(30px, 3.5vw, 40px) 60px;
  color: #ffffff;
}

.blog-header {
  text-align: center;
  margin-bottom: 60px;
  padding-bottom: 30px;
  border-bottom: 2px solid #f06400;
}

.blog-header h1 {
  font-size: 2.5em;
  margin-bottom: 15px;
  color: #f06400;
  line-height: 1.2;
}

.blog-meta {
  color: #888888;
  font-size: 1em;
  margin: 10px 0;
}

.blog-body {
  line-height: 1.8;
}

.blog-section {
  margin-bottom: 60px;
}

.blog-section h2 {
  font-size: 2em;
  margin-top: 60px;
  margin-bottom: 25px;
  color: #f06400;
  padding-bottom: 10px;
  border-bottom: 1px solid #333333;
}

.blog-section h3 {
  font-size: 1.5em;
  margin-top: 40px;
  margin-bottom: 20px;
  color: #f06400;
}

.blog-section h4 {
  font-size: 1.2em;
  margin-top: 30px;
  margin-bottom: 15px;
  color: #f06400;
}

.blog-section p {
  margin-bottom: 20px;
  color: #cccccc;
  text-align: justify;
}

.blog-section strong {
  color: #ffffff;
  font-weight: 700;
}

.blog-section em {
  font-style: italic;
  color: #f06400;
}

.blog-list {
  margin: 20px 0 20px 20px;
  padding-left: 20px;
  list-style-type: none;
}

.blog-list li {
  position: relative;
  margin-bottom: 15px;
  padding-left: 30px;
  color: #cccccc;
  line-height: 1.7;
}

.blog-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  top: 0;
  color: #f06400;
  font-size: 1.2em;
}

.blog-figure {
  width: 100%;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: visible;
  padding: 0;
}

.blog-figure img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(240, 100, 0, 0.2);
  transition: transform 0.3s ease;
}

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

.blog-figure figcaption {
  text-align: center;
  margin-top: 0.5rem;
  padding: 0 2rem;
  color: #888888;
  font-size: 0.9em;
  font-style: italic;
}

/* Interactive iframe charts */
.blog-figure iframe {
  width: 1400px;
  height: 800px;
  border: none;
  transform: scale(0.9);
  transform-origin: center center;
  margin: calc(-800px * 0.05) 0;
}

.blog-figure iframe::-webkit-scrollbar {
  display: none;
}

@media (max-width: 1600px) {
  .blog-figure iframe {
    transform: scale(0.75);
    margin: calc(-800px * 0.125) 0;
  }
}

@media (max-width: 1200px) {
  .blog-figure iframe {
    transform: scale(0.6);
    margin: calc(-800px * 0.2) 0;
  }
}

@media (max-width: 900px) {
  .blog-figure iframe {
    transform: scale(0.45);
    margin: calc(-800px * 0.275) 0;
  }
}

@media (max-width: 600px) {
  .blog-figure iframe {
    transform: scale(0.3);
    margin: calc(-800px * 0.35) 0;
  }
}

/* Mobile vs desktop display switching for interactive chart posts */
.blog-figure-mobile {
  display: none;
}

.blog-figure-mobile img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  cursor: zoom-in;
  transition: opacity 0.2s ease;
}

.blog-figure-mobile img:hover {
  opacity: 0.9;
}

.blog-figure-desktop {
  display: flex;
}

@media (max-width: 900px) {
  .blog-figure-mobile {
    display: flex;
  }

  .blog-figure-desktop {
    display: none;
  }
}

/* Model download buttons */
.model-download-btn {
  background: #1a1a2e;
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 2px solid #2a2a3e;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
  min-width: fit-content;
}

.model-download-btn:hover {
  background: #f06400;
  border-color: #f06400;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(240, 100, 0, 0.4);
  color: #ffffff;
}

.model-download-btn img {
  width: 1.2rem;
  height: 1.2rem;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .model-download-btn {
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
  }
}

@media (max-width: 480px) {
  .model-download-btn {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    width: 100%;
    justify-content: center;
  }
}

/* Lightbox for mobile image zoom */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  overflow: auto;
  cursor: zoom-out;
}

.lightbox.active {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox img {
  max-width: 95%;
  max-height: 95vh;
  object-fit: contain;
  cursor: zoom-out;
  box-shadow: 0 0 50px rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.5);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.3s ease;
}

.lightbox-close:hover {
  background: rgba(240, 100, 0, 0.8);
}

.lightbox-caption {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  background: rgba(0, 0, 0, 0.7);
  padding: 10px 20px;
  border-radius: 5px;
  max-width: 80%;
  text-align: center;
  font-size: 14px;
}

.blog-table-wrapper {
  overflow-x: auto;
  margin: 30px 0;
}

.blog-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #111122;
  border-radius: 8px;
  overflow: hidden;
}

.blog-table thead {
  background-color: #f06400;
}

.blog-table thead th {
  padding: 15px;
  text-align: left;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.blog-table tbody tr {
  border-bottom: 1px solid #222233;
  transition: background-color 0.3s;
}

.blog-table tbody tr:hover {
  background-color: #1a1a2a;
}

.blog-table tbody tr:last-child {
  border-bottom: none;
}

.blog-table tbody td {
  padding: 15px;
  color: #cccccc;
  font-size: 0.95em;
}

.blog-table tbody td:first-child {
  color: #ffffff;
  font-weight: 500;
}

code {
  background-color: #1a1a2a;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  color: #f06400;
}

/* Blog Table of Contents */
.blog-toc {
  position: fixed;
  top: 120px;
  width: 220px;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 100;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
  display: none;
  background: none;
  padding: 0;
  justify-content: initial;
  align-items: initial;
  box-sizing: border-box;
}

.blog-toc::-webkit-scrollbar {
  width: 4px;
}

.blog-toc::-webkit-scrollbar-track {
  background: transparent;
}

.blog-toc::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

.blog-toc::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

.blog-toc.desktop {
  display: block;
  animation: tocFadeIn 0.5s ease both;
}

@keyframes tocFadeIn {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

.blog-toc-title {
  font-size: 0.7em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #555;
  padding: 0 14px 10px;
  margin: 0;
}

.blog-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: block;
  gap: 0;
  flex-direction: unset;
  position: relative;
}

.blog-toc-track {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.06);
}

.blog-toc-indicator {
  position: absolute;
  left: 0;
  width: 2px;
  height: 0;
  top: 0;
  background: linear-gradient(180deg, #f06400, #ff8c3a);
  border-radius: 2px;
  transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1), height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px rgba(240, 100, 0, 0.4);
}

.blog-toc-item {
  opacity: 0;
  animation: tocItemIn 0.4s ease forwards;
}

@keyframes tocItemIn {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}

.blog-toc-item a {
  display: block;
  padding: 6px 14px;
  font-size: 0.78em;
  font-weight: 400;
  color: #666;
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: color 0.25s ease, background 0.25s ease, transform 0.2s ease, border-color 0.25s ease;
  line-height: 1.5;
  border-radius: 0 4px 4px 0;
}

.blog-toc-item a:hover {
  color: #bbb;
  background: rgba(255, 255, 255, 0.03);
  transform: translateX(2px);
}

.blog-toc-item.active > a {
  color: #f06400;
  border-left-color: transparent;
  background: rgba(240, 100, 0, 0.05);
  font-weight: 500;
}

.blog-toc-item[data-level="3"] a {
  padding-left: 28px;
  font-size: 0.76em;
}

.blog-toc-item[data-level="4"] a {
  padding-left: 42px;
  font-size: 0.73em;
  color: #555;
}

.blog-toc-toggle {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(15, 15, 30, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f06400;
  cursor: pointer;
  z-index: 101;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.05em;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: togglePulse 3s ease-in-out infinite;
}

@keyframes togglePulse {
  0%, 100% { box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04); }
  50% { box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(240, 100, 0, 0.15); }
}

.blog-toc-toggle:hover {
  background: linear-gradient(135deg, #f06400, #ff8c3a);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 28px rgba(240, 100, 0, 0.35), 0 0 0 1px rgba(240, 100, 0, 0.2);
  transform: scale(1.08);
  animation: none;
}

.blog-toc-toggle.visible {
  display: flex;
}

.blog-toc.mobile {
  display: block;
  top: 0;
  right: 0;
  left: auto;
  width: 300px;
  height: 100vh;
  max-height: 100vh;
  background: rgba(10, 10, 22, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0;
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.6);
  z-index: 200;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-toc.mobile .blog-toc-title {
  padding: 28px 20px 16px;
  font-size: 0.72em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 8px;
}

.blog-toc.mobile .blog-toc-list {
  padding: 8px 8px 24px;
  border-left: none;
}

.blog-toc.mobile .blog-toc-list .blog-toc-track,
.blog-toc.mobile .blog-toc-list .blog-toc-indicator {
  display: none;
}

.blog-toc.mobile .blog-toc-list .blog-toc-item {
  opacity: 1;
  animation: none;
}

.blog-toc.mobile .blog-toc-list .blog-toc-item a {
  padding: 8px 14px;
  font-size: 0.85em;
  border-radius: 6px;
  border-left: none;
  margin-left: 0;
  color: #777;
}

.blog-toc.mobile .blog-toc-list .blog-toc-item a:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.04);
  color: #ccc;
}

.blog-toc.mobile .blog-toc-list .blog-toc-item.active > a {
  background: rgba(240, 100, 0, 0.1);
  border-left: none;
  color: #f06400;
  font-weight: 500;
}

.blog-toc.mobile .blog-toc-list .blog-toc-item[data-level="3"] a {
  padding-left: 30px;
  font-size: 0.8em;
}

.blog-toc.mobile .blog-toc-list .blog-toc-item[data-level="4"] a {
  padding-left: 46px;
  font-size: 0.76em;
}

.blog-toc.mobile.open {
  transform: translateX(0);
}

.blog-toc-close {
  position: absolute;
  top: 22px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.04);
  color: #666;
  border-radius: 8px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.8em;
  transition: all 0.2s ease;
}

.blog-toc.mobile .blog-toc-close {
  display: flex;
}

.blog-toc-close:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.blog-toc-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 199;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.blog-toc-overlay.active {
  display: block;
  opacity: 1;
}

/* Responsive Blog Styles */

/* Tablets and large phones — only top/bottom change, sides handled by clamp */
@media (max-width: 768px) {
  #blog-content {
    padding-top: 90px;
    padding-bottom: 40px;
  }

  .blog-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
  }

  .blog-header h1 {
    font-size: 1.6em;
    line-height: 1.3;
  }

  .blog-meta {
    font-size: 0.85em;
  }

  .blog-section {
    margin-bottom: 40px;
  }

  .blog-section h2 {
    font-size: 1.4em;
    margin-top: 40px;
    margin-bottom: 20px;
  }

  .blog-section h3 {
    font-size: 1.2em;
    margin-top: 30px;
    margin-bottom: 15px;
  }

  .blog-section h4 {
    font-size: 1.05em;
    margin-top: 25px;
  }

  .blog-section p {
    font-size: 0.95em;
    line-height: 1.6;
    margin-bottom: 15px;
  }

  .blog-list {
    margin: 15px 0 15px 10px;
    padding-left: 15px;
  }

  .blog-list li {
    font-size: 0.9em;
    margin-bottom: 12px;
    padding-left: 20px;
  }

  .blog-figure {
    margin: 30px 0;
  }

  .blog-figure figcaption {
    font-size: 0.85em;
    padding: 0 10px;
  }

  .blog-table {
    font-size: 0.8em;
  }

  .blog-table thead th,
  .blog-table tbody td {
    padding: 8px 6px;
  }
}

/* Small phones */
@media (max-width: 480px) {
  #blog-content {
    padding-top: 80px;
    padding-bottom: 30px;
  }

  .blog-header h1 {
    font-size: 1.4em;
  }

  .blog-section h2 {
    font-size: 1.25em;
  }
}

/* Blog Listing Page Styles */
#blog-listing {
  padding: 120px clamp(30px, 3.5vw, 40px) 60px;
  max-width: 1200px;
  margin: 0 auto;
}

.blog-listing-header {
  text-align: center;
  margin-bottom: 80px;
}

.blog-listing-header h1 {
  font-size: 3em;
  color: #f06400;
  margin-bottom: 15px;
}

.blog-listing-header p {
  font-size: 1.2em;
  color: #888888;
  max-width: 600px;
  margin: 0 auto;
}

.blog-posts-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
  gap: 40px;
  margin-top: 60px;
}

.blog-post-card {
  background-color: #111122;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.blog-post-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(240, 100, 0, 0.3);
}

.blog-card-image {
  width: 100%;
  height: 280px;
  overflow: hidden;
  background-color: #000000;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.blog-card-content {
  padding: 30px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-meta {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  font-size: 0.85em;
}

.blog-card-date {
  color: #888888;
}

.blog-card-category {
  color: #f06400;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.blog-card-content h2 {
  font-size: 1.5em;
  margin-bottom: 15px;
  line-height: 1.3;
}

.blog-card-content h2 a {
  color: #f06400;
  text-decoration: none;
  transition: color 0.3s ease;
}

.blog-card-content h2 a:hover {
  color: #ff8533;
}

.blog-card-content p {
  color: #cccccc;
  line-height: 1.7;
  margin-bottom: 20px;
  flex: 1;
}

.blog-card-link {
  color: #f06400;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: gap 0.3s ease;
}

.blog-card-link:hover {
  gap: 10px;
}

/* Coming Soon Card */
.blog-card-coming-soon {
  opacity: 0.7;
  border: 2px dashed #333333;
  background-color: #0a0a15;
  cursor: default;
}

.blog-card-coming-soon:hover {
  transform: none;
  box-shadow: none;
  opacity: 0.8;
}

.blog-card-coming-soon .blog-card-content h2 {
  color: #888888;
}

/* Responsive Blog Listing */
/* Tablets and large phones — only top/bottom change, sides handled by clamp */
@media (max-width: 768px) {
  #blog-listing {
    padding-top: 90px;
    padding-bottom: 40px;
  }

  .blog-listing-header h1 {
    font-size: 1.8em;
    margin-bottom: 10px;
  }

  .blog-listing-header p {
    font-size: 0.95em;
  }

  .blog-posts-container {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .blog-post-card {
    max-width: 100%;
  }

  .blog-card-image {
    height: 180px;
  }

  .blog-card-content {
    padding: 18px;
  }

  .blog-card-meta {
    font-size: 0.75em;
    gap: 10px;
    margin-bottom: 10px;
  }

  .blog-card-content h2 {
    font-size: 1.15em;
    margin-bottom: 10px;
  }

  .blog-card-content p {
    font-size: 0.9em;
    line-height: 1.5;
    margin-bottom: 15px;
  }

  .blog-card-link {
    font-size: 0.9em;
  }
}

/* Small phones */
@media (max-width: 480px) {
  #blog-listing {
    padding-top: 80px;
    padding-bottom: 30px;
  }

  .blog-listing-header h1 {
    font-size: 1.5em;
  }
}
