@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500&display=swap');

:root {
  --bg: #0c0c0c;
  --text: #c0c0c0;
  --accent: #00ff9d;
  --header-bg: #111;
}

body {
  font-family: 'Fira Code', monospace;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
  background: radial-gradient(circle at 20% 20%, #0b0b0b, #000 70%),
              linear-gradient(135deg, rgba(0,255,157,0.05) 0%, rgba(0,255,157,0.02) 100%);
  background-blend-mode: overlay;
  background-attachment: fixed;
}

header {
  background: var(--header-bg);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #222;
}

header .logo {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none; /* remove underline */
  cursor: pointer;
}

nav a {
  color: var(--text);
  margin-left: 1.2rem;
  text-decoration: none;
  transition: color 0.3s;
}

nav a:hover {
  color: var(--accent);
  text-shadow: 0 0 5px var(--accent);
}

nav a.active {
  color: var(--accent);
  text-decoration: underline;
}

.section {
  padding: 3rem 2rem;
  max-width: 900px;
  margin: auto;
  border-bottom: 1px solid #222;
}

h1, h2, h3 {
  color: var(--accent);
}

.intro {
  font-size: 1.1rem;
  line-height: 1.6;
}

.card-grid {
  display: grid;
  gap: 1.5rem;
}

.card {
  background: #151515;
  padding: 1.5rem;
  border-radius: 6px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid rgba(0, 255, 157, 0.05);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 20px rgba(0, 255, 157, 0.2);
  border-color: rgba(0, 255, 157, 0.3);
}

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

.btn {
  display: inline-block;
  background: var(--accent);
  color: #000;
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
}

.docs-layout {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  min-height: 80vh;
  gap: 2rem;
  padding: 2rem;
  max-width: 1600px;    /* ⭐ Prevent layout from stretching too wide */
  margin: 0 auto;       /* ⭐ Center the layout */
  width: 100%;
  overflow-x: hidden;   /* ⭐ Block horizontal page scroll */
}

.docs-sidebar {
  flex: 0 0 400px;
  background: #111;
  padding: 1.5rem;
  border-radius: 6px;
  height: fit-content;
}

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

.docs-sidebar a {
  color: var(--text);
  text-decoration: none;
  display: block;
  padding: 0.4rem 0;
  transition: color 0.3s;
}

.docs-sidebar a.active,
.docs-sidebar a:hover {
  color: var(--accent);
}

.docs-content {
  flex: 1;
  background: #151515;
  padding: 2rem;
  border-radius: 6px;
  min-width: 0;
  max-width: calc(100% - 250px - 2rem); /* prevent overflow */
  overflow-wrap: break-word;    /* Wrap normal text */
}

/* Inline code style inside docs */
.docs-content code {
  background: rgba(0, 255, 157, 0.1);
  padding: 2px 5px;
  border-radius: 4px;
  color: var(--accent);
  font-size: 0.95rem;
}

.docs-content h1, .docs-content h2, .docs-content h3 {
  color: var(--accent);
}

.docs-content pre {
  background: #222;
  padding: 1rem;
  border-radius: 4px;
  max-width: 100%;     /* Keep code block inside container */
  overflow-x: auto;    /* Scroll only inside code block */
  white-space: pre;    /* Do NOT wrap code (more readable) */
}

.docs-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1rem auto;
  border-radius: 6px;
  border: 1px solid rgba(0, 255, 157, 0.15);
}

footer {
  text-align: center;
  padding: 1.5rem;
  color: #666;
  font-size: 0.9rem;
  border-top: 1px solid #222;
}

/* Typing effect */
.typing {
  width: 15ch;
  white-space: nowrap;
  overflow: hidden;
  border-right: 2px solid var(--accent);
  animation: typing 3s steps(15), blink 0.75s step-end infinite alternate;
}

#docs-search {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 1rem;
  border-radius: 4px;
  border: none;
  background: #222;
  color: var(--text);
}

#docs-search::placeholder {
  color: #888;
}

#doc-content {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

#doc-content.visible {
  opacity: 1;
}

.code-wrapper {
  position: relative;
}

.copy-btn {
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.8rem;
  border: none;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: background 0.3s;
}

.copy-btn:hover {
  background: #ff5722;
}

.intro {
  opacity: 0;
  animation: fadeIn 1s ease 3.2s forwards;
}

/* --- Home Page Enhancements --- */
.about p, .skills, .featured, .certs-preview, .contact-cta {
  line-height: 1.6;
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}

.skills-grid span {
  background: #151515;
  padding: 0.5rem 0.9rem;
  border-radius: 5px;
  color: var(--accent);
  font-size: 0.95rem;
}

.contact-cta a {
  color: var(--accent);
  text-decoration: none;
}

.contact-cta a:hover {
  text-decoration: underline;
}

.section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

.about-container {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.profile-photo.about-photo {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  object-fit: cover;
  box-shadow: 0 0 15px rgba(0,255,255,0.2);
  transition: transform 0.3s ease;
}

.profile-photo:hover {
  transform: scale(1.05);
}

.project-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 4px rgba(0, 255, 157, 0.3));
}

.category-title {
  margin-top: 1rem;
  margin-bottom: 0.3rem;
  color: var(--accent);
  font-weight: 600;
  font-size: 1rem;
}

.category-list {
  list-style: none;
  margin: 0 0 1rem 0;
  padding-left: 1rem;
}

.category-list li a {
  color: var(--text);
  text-decoration: none;
  display: block;
  padding: 4px 0;
  transition: color 0.2s;
}

.category-list li a:hover {
  color: var(--accent);
}

.category-list li a.active {
  color: var(--accent);
  font-weight: 500;
}

.category-container {
  margin-bottom: 0.8rem;
}

.category-header {
  display: flex;
  align-items: center;
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
  font-size: 1rem;
  margin: 1rem 0 0.3rem;
  user-select: none;
  transition: color 0.2s;
}

.category-header:hover {
  color: #0f0;
}

.arrow {
  display: inline-block;
  width: 1em;
  font-size: 0.9rem;
  margin-right: 6px;
  transition: transform 0.2s ease;
}

.category-list {
  list-style: none;
  margin: 0 0 0.5rem 1.2rem;
  padding: 0;
}

.category-list li a {
  display: block;
  padding: 4px 0;
  color: var(--text);
  text-decoration: none;
  position: relative;
  transition: color 0.2s ease;
}

/* Green dot bullet */
.category-list li a::before {
  content: "•";
  position: absolute;
  left: -1rem;
  color: var(--accent);
  font-weight: bold;
  font-size: 1.1rem;
}

.category-list li a:hover {
  color: var(--accent);
  text-shadow: 0 0 8px rgba(0,255,157,0.4);
}

.category-list li a.active {
  color: var(--accent);
  font-weight: 500;
  text-shadow: 0 0 8px rgba(0,255,157,0.4);
}

/* === Certifications Page === */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.cert-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(0, 255, 157, 0.15);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.cert-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 15px rgba(0, 255, 157, 0.3);
}

.cert-card img {
  width: 100%;
  max-height: 160px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 0.8rem;
}

/* === Modal === */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  justify-content: center;           /* center horizontally */
  align-items: center; 
  overflow-y: auto; 
  padding: 2rem;
}

.modal-content {
  background: #111;
  border: 1px solid rgba(0, 255, 157, 0.3);
  border-radius: 12px;
  width: 90%;
  max-width: 450px;
  margin: auto;
  padding: 1.5rem;
  text-align: center;
  position: relative;
  max-height: 90vh;                  /* ⭐ Ensure modal never exceeds screen */
  overflow-y: auto;                  /* internal scroll if needed */
}

.modal-content img {
  width: 100%;
  max-height: 260px; 
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.close-btn {
  position: absolute;
  right: 1rem;
  top: 0.8rem;
  font-size: 1.6rem;
  cursor: pointer;
  color: #0f0;
}

.view-btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.6rem 1.2rem;
  border: 1px solid #0f0;
  border-radius: 8px;
  text-decoration: none;
  color: #0f0;
  transition: background 0.3s ease;
}

.view-btn:hover {
  background: #0f0;
  color: #000;
}

/* ==== Resume Page ==== */
.resume-section {
  display: flex;
  flex-direction: column;
  align-items: center;   /* Centers everything horizontally */
  text-align: center;    /* Centers text */
}

/* Center resume thumbnail or any images */
.resume-preview,
.resume-thumbnail {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

.resume-section h2 {
  margin-bottom: 0.5rem;
}

.resume-subtitle {
  color: #bbb;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

/* Resume card */
.resume-card {
  background: rgba(20, 20, 20, 0.8);
  border: 1px solid rgba(0, 255, 157, 0.2);
  border-radius: 12px;
  padding: 2rem;
  width: 100%;
  max-width: 700px;

  /* Glow + subtle shadow */
  box-shadow: 0 0 15px rgba(0, 255, 157, 0.15);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

/* Hover effect: stronger glow */
.resume-card:hover {
  box-shadow: 0 0 25px rgba(0, 255, 157, 0.35);
  transform: translateY(-4px);
}

/* Title and subtitle centering */
.resume-card h2,
.resume-card p {
  text-align: center;
}

.resume-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.resume-thumbnail img {
  margin-top: 1.5rem;
  width: 100%;
  max-width: 450px;
  border-radius: 8px;
  border: 1px solid rgba(0, 255, 157, 0.2);
  box-shadow: 0 0 10px rgba(0, 255, 157, 0.25);
  transition: transform 0.3s ease;
}

.resume-thumbnail img:hover {
  transform: scale(1.03);
  opacity: 1;
}

.profile-card {
  text-align: center;
  padding: 2rem;
  background: #111;
  border-radius: 12px;
  border: 1px solid rgba(0,255,157,0.15);
  max-width: 350px;
  margin-bottom: 2rem;
  margin-top: 2rem;
}

.profile-photo.resume-photo{
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  object-fit: cover;
  margin-bottom: 1rem;
}

.profile-tags span {
  display: inline-block;
  background: rgba(0,255,157,0.1);
  color: var(--accent);
  margin: 4px;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid rgba(0,255,157,0.2);
}

/* ===== Contact Page ===== */

.contact-section {
  display: flex;
  justify-content: center;
  align-items: center;
}

.contact-card {
  background: rgba(20, 20, 20, 0.85);
  border: 1px solid rgba(0, 255, 157, 0.15);
  border-radius: 12px;
  padding: 2rem;
  max-width: 600px;
  width: 100%;
  text-align: center;

  box-shadow: 0 0 15px rgba(0, 255, 157, 0.15);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.contact-card:hover {
  box-shadow: 0 0 25px rgba(0, 255, 157, 0.35);
  transform: translateY(-4px);
}

.contact-subtitle {
  color: #bbb;
  margin-bottom: 1.5rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Contact items */
.contact-item {
  background: #111;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(0,255,157,0.2);
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.contact-item:hover {
  background: rgba(0,255,157,0.1);
  box-shadow: 0 0 10px rgba(0,255,157,0.25);
}

/* Icon style */
.icon {
  font-size: 1.2rem;
  color: var(--accent);
}

/* ===== Contact Form ===== */

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.contact-form label {
  text-align: left;
  color: var(--accent);
  font-size: 0.9rem;
}

.contact-form input,
.contact-form textarea {
  background: #0f0f0f;
  border: 1px solid rgba(0,255,157,0.2);
  padding: 0.8rem;
  border-radius: 6px;
  color: var(--text);
  font-family: 'Fira Code', monospace;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 8px rgba(0,255,157,0.3);
}

.send-btn {
  width: 100%;
  margin-top: 0.5rem;
  background: var(--accent);
  color: #000;
}

.send-btn:hover {
  background: #00e68a;
}

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

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

@keyframes typing {
  from { width: 0; }
}
@keyframes blink {
  50% { border-color: transparent; }
}

/* ============================================
   MOBILE FIX — FINAL CLEAN VERSION
   ============================================ */

@media (max-width: 768px) {

  /* Stack layout vertically */
  .docs-layout {
    flex-direction: column;
    gap: 1.2rem;
    padding: 1rem;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  /* Sidebar full width */
  .docs-sidebar {
    width: 100%;
    padding: 1rem;
    flex: none;
    border-radius: 8px;
  }

  /* Content full width */
  .docs-content {
    width: 100%;
    max-width: 100%;
    padding: 1.2rem;
    overflow-x: hidden;
    font-size: 0.95rem;
  }

  /* Headings balanced for mobile */
  .docs-content h1 {
    font-size: 1.6rem;
    word-break: break-word;
  }
  .docs-content h2 {
    font-size: 1.35rem;
    word-break: break-word;
  }
  .docs-content h3 {
    font-size: 1.15rem;
    word-break: break-word;
  }

  /* Code block fixes */
  .docs-content pre {
    background: #222;
    padding: 0.8rem;
    font-size: 0.8rem;
    max-width: 100%;
    overflow-x: auto;
    white-space: pre-wrap;   
    word-break: break-word;
    border-radius: 6px;
  }

  .docs-content code {
    white-space: pre-wrap;
    word-break: break-word;
  }

  /* Images responsive */
  .docs-content img {
    max-width: 100%;
    height: auto;
  }
}

@media (max-width: 480px) {
  .docs-content {
    padding: 0.9rem;
  }
  .docs-content h1 {
    font-size: 1.25rem;
  }
  .docs-content pre {
    font-size: 0.75rem;
  }
}

/* ========== HAMBURGER MENU (Mobile Only) ========== */

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.hamburger span {
  width: 28px;
  height: 3px;
  background: var(--accent);
  border-radius: 3px;
  transition: 0.3s;
}

/* Mobile Styles */
@media (max-width: 768px) {
  
  /* Show hamburger, hide desktop nav */
  .hamburger {
    display: flex;
  }

  #nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    margin-top: 1rem;
    background: #111;
    padding: 1rem;
    border-radius: 8px;
  }

  #nav-menu.active {
    display: flex;
  }

  /* Animate hamburger into X */
  .hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

