/* =======================
   Theme Variables
======================= */

:root {
  --bg-color: #f5f7fa;
  --text-color: #111827;
  --panel-bg: #ffffff;
  --border-color: #e5e7eb;
  --accent: #ff9900;
  --content-color: #f8f8f8; /* Standard light AWS background */
}

[data-theme="dark"] {
  --bg-color: #020617;
  --text-color: #e5e7eb;
  --panel-bg: #0f172a;
  --border-color: #1f2937;
}

/* =======================
   Base
======================= */

* {
  box-sizing: border-box;
}

body {
  /* margin: 0;*/
  font-family: system-ui, sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  overflow-x: hidden; /* prevents horizontal scroll on narrow screens */
  margin-left: 2px;
}

/* Specific style only for the page with the class "project-background" */
div.project-background {
  /*background:  var(--bg-color); */
  /* background-image: url("images/my-special-background.jpg"); */ /* Or a background image */
  /*  background-repeat: no-repeat;*/
  /* background-size: cover; */ /* Ensures the image covers the entire background */
  /* x-width: 1200px; */
  position: relative;
  margin-left: 5px;
  margin-right: 30px;
  width: 99%; /* Content takes up 100% of the width */
}

section.project-section-background {
  background: var(--bg-color);
}

/* =======================
   Top Banner (Hero)
======================= */

.top-banner {
  height: 90px; /* this makes it sticky, causes some problems with table of contents. CSS for TOC below fixes that */
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, #020617, #0f172a);
  color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.top-banner::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent);
}

.banner-text h1 {
  margin: 0;
  font-size: 1.4rem;
}

.banner-text p {
  margin: 0;
  font-size: 0.9rem;
  color: #cbd5f5;
}

#theme-toggle {
  border: 1px solid #1f2937;
  background: none;
  color: #ffffff;
  border-radius: 6px;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
}

/* =======================
   Layout
======================= */

.layout {
  display: grid;
  grid-template-columns: 260px 1fr 300px;
  grid-template-areas: "left main right";
  min-height: calc(100vh - 90px);
}

.left-sidebar {
  grid-area: left;
}
.content {
  grid-area: main;
}
.right-sidebar {
  grid-area: right;
}

/* =======================
   Sidebars
======================= */

.sidebar {
  background: var(--panel-bg);
  padding: 1.25rem;
  border-right: 1px solid var(--border-color);
  position: sticky;
  top: 90px;
  height: calc(100vh - 90px);
  overflow-y: auto;
}

.right-sidebar {
  border-left: 1px solid var(--border-color);
  border-right: none;
  padding: 0; /* chatbot handles its own internal padding */
}

.profile-photo {
  width: 120px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  margin-bottom: 0.75rem;
  max-width: 100%;
  height: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: 50%; /* Optional: set a specific width, e.g., 50% or 200px */
}

hr.styled-line {
  border: none; /* Removes default border */
  height: 3px;
  background-color: var(--accent);
}

hr.dotted-line {
  border: none; /* Removes the default solid line */
  border-top: 2px dotted; /* Creates a dotted top border */
  color: var(--accent); /* Fallback for older browsers */
  height: 2px; /* Ensures a thin line */
}

.education_logo {
  width: 50px;
  border-radius: 50%;
  margin-bottom: 0.75rem;
  max-width: 100%;
  height: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: 25%; /* Optional: set a specific width, e.g., 50% or 200px */
}

.education-logo:hover {
  color: var(--accent);
}

.education-logo img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 0.75rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: 50%; /* Optional: set a specific width, e.g., 50% or 200px */
}

.center-text {
  text-align: center;
  /* border: 1px solid black; */
}

.center-table {
  margin-left: auto;
  margin-right: auto;
}

.equal-width-table {
  table-layout: fixed;
  text-align: center;
}

.center-image {
  display: block;
  margin-left: auto;
  margin-right: auto;
  /* width: 50%; */ /* Optional: set a specific width, e.g., 50% or 200px */
}

.profile-name {
  font-weight: 600;
  margin: 0;
}

.profile-role {
  font-size: 0.85rem;
  color: #9ca3af;
  margin-top: 0.25rem;
}

/*
.certifications img {
  width: 64px;
  margin: 0.25rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  max-width: 100%;
  height: auto;
}

*/

.certifications img {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/*
.certifications:hover {
  color: var(--accent);
}
  */

/* =======================
   Main Content
======================= */

.content {
  padding: 2rem;
}

.content h1 {
  margin: 0;
}

.content h2 {
  margin: 0;
}

.content h3 {
  margin: 0;
}

.content h4 {
  margin: 0;
}

.content h3 {
  margin: 0;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.project-tile {
  text-decoration: none;
  color: inherit;
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.project-tile:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.project-tile:hover h3 {
  color: var(--accent);
}

.project-tile img {
  border-radius: 12px;
  margin-bottom: 0.75rem;
  display: block;
  height: auto;
}
/* 
.project-tile img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 0.75rem;
  display: block;
  height: auto;
}

*/

/* Tags */
.tags {
  margin-bottom: 0.5rem;
}

.tag {
  display: inline-block;
  background: rgba(255, 153, 0, 0.15);
  color: var(--accent);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  margin-right: 0.3rem;
}

/* =======================
   Chatbot Placeholder (legacy)
======================= */

.chatbot-placeholder {
  border: 1px dashed var(--border-color);
  padding: 1rem;
  border-radius: 12px;
  font-size: 0.85rem;
}

/* =========================
   Chatbot Panel
========================= */

.chatbot-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: linear-gradient(180deg, var(--panel-bg), rgba(2, 6, 23, 0.95));
  border-left: 1px solid var(--border-color);
}

/* Header */
.chatbot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  font-weight: 600;
  background: #020617;
  border-bottom: 1px solid var(--border-color);
}

.chatbot-status {
  font-size: 0.75rem;
  color: #22c55e; /* green */
}

/* Messages */
.chatbot-messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chatbot-message {
  max-width: 85%;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.chatbot-message.bot {
  background: rgba(255, 255, 255, 0.06);
  border-left: 3px solid var(--accent);
}

.chatbot-message.user {
  align-self: flex-end;
  background: rgba(255, 153, 0, 0.15);
  color: #ffffff;
}

/* Input */
.chatbot-input {
  display: flex;
  padding: 0.75rem;
  border-top: 1px solid var(--border-color);
  background: #020617;
}

.chatbot-input input {
  flex: 1;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  font-size: 0.9rem;
  min-width: 0; /* prevents overflow in flex containers */
}

.chatbot-input input:focus {
  outline: none;
  border-color: var(--accent);
}

.chatbot-input button {
  margin-left: 0.5rem;
  background: var(--accent);
  border: none;
  color: #020617;
  padding: 0 0.75rem;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
}

.chatbot-input button:hover {
  opacity: 0.9;
}

/* =======================
   Responsive
======================= */

/* to do: is this code needed?  There are comments left out from ChatGPT  */
/* Tablet: hide chatbot to keep layout clean (optional).
   If you prefer stacking chatbot on tablets too, tell me and I’ll adjust. */
@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 220px 1fr;
    grid-template-areas: "left main";
  }
  .right-sidebar {
    display: none;
  }
}

/* Mobile: stack Left Sidebar -> Main -> Chatbot */
@media (max-width: 768px) {
  .layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "left"
      "main"
      "right";
  }

  /* Make sidebars behave like normal blocks on mobile */
  .sidebar {
    position: relative;
    top: auto;
    height: auto;
    overflow: visible;
    border-right: none;
  }

  /* Show left sidebar */
  .left-sidebar {
    display: block;
    border-bottom: 1px solid var(--border-color);
  }

  /* Show chatbot stacked under projects */
  .right-sidebar {
    display: block;
    border-left: none;
    border-top: 1px solid var(--border-color);
    padding: 0;
  }

  /* Tighter mobile spacing */
  .content {
    padding: 1.25rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  /* Center left-sidebar content nicely */
  .profile-photo {
    display: block;
    margin: 0 auto 0.75rem;
  }

  .profile-name,
  .profile-role {
    text-align: center;
  }

  .certifications {
    display: flex;
    justify-content: center; /* Centers content horizontally */
    align-items: center; /* Centers content vertically */
    height: 100%; /* Ensure the container has a defined height */
  }
}

/*  new code as of 1/24 to add chatbox heather style */

/* ===============================
   Chatbot Panel – Right Sidebar
   =============================== */

.chatbot-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: linear-gradient(180deg, #0b1220, #060a14);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

/* Header */
.chatbot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: linear-gradient(180deg, #111827, #0b1220);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chatbot-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chatbot-badge {
  font-size: 1.2rem;
}

.chatbot-header h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #f9fafb; /* <-- fixes black-on-black */
}

.chatbot-subtitle {
  margin: 0;
  font-size: 0.7rem;
  color: #9ca3af;
}

/* Header actions */
.chatbot-header-actions {
  display: flex;
  align-items: center;
}

.chatbot-icon-btn {
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 1rem;
  cursor: pointer;
}

.chatbot-icon-btn:hover {
  color: #f9fafb;
}

/* 1/24/2026 second set of code to correct the default chatbox color to match what is active on the page */

/* ===============================
   Chatbot Panel – Theme-aware
   =============================== */

/* Default (Light theme) values */
:root {
  --chat-panel-bg: #ffffff;
  --chat-panel-border: rgba(0, 0, 0, 0.1);

  --chat-header-bg: #f3f4f6;
  --chat-header-border: rgba(0, 0, 0, 0.1);

  --chat-title: #111827;
  --chat-subtitle: #6b7280;

  --chat-icon: #6b7280;
  --chat-icon-hover: #111827;
}

/* Dark theme values (matches your existing toggle that sets data-theme) */
html[data-theme="dark"] {
  --chat-panel-bg: linear-gradient(180deg, #0b1220, #060a14);
  --chat-panel-border: rgba(255, 255, 255, 0.1);

  --chat-header-bg: linear-gradient(180deg, #111827, #0b1220);
  --chat-header-border: rgba(255, 255, 255, 0.12);

  --chat-title: #f9fafb;
  --chat-subtitle: #9ca3af;

  --chat-icon: #9ca3af;
  --chat-icon-hover: #f9fafb;
}

/* Apply variables */
.chatbot-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--chat-panel-bg);
  border-left: 1px solid var(--chat-panel-border);
}

.chatbot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: var(--chat-header-bg);
  border-bottom: 1px solid var(--chat-header-border);
}

.chatbot-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chatbot-badge {
  font-size: 1.2rem;
}

.chatbot-header h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--chat-title);
}

.chatbot-subtitle {
  margin: 0;
  font-size: 0.7rem;
  color: var(--chat-subtitle);
}

.chatbot-icon-btn {
  background: transparent;
  border: none;
  color: var(--chat-icon);
  font-size: 1rem;
  cursor: pointer;
}

.chatbot-icon-btn:hover {
  color: var(--chat-icon-hover);
}

/* added to correct the black background in the chat form */

/* ===============================
   Chatbot Input / Footer – Theme-aware
   =============================== */

/* Variables */
:root {
  --chat-input-bg: #ffffff;
  --chat-input-border: #d1d5db;
  --chat-input-text: #111827;
  --chat-input-placeholder: #9ca3af;

  --chat-send-bg: #ff9900;
  --chat-send-bg-hover: #1d4ed8;
  --chat-send-text: #ffffff;

  --chat-hint-text: #6b7280;
  --chat-footer-border: rgba(0, 0, 0, 0.08);
}

html[data-theme="dark"] {
  --chat-input-bg: #0b1220;
  --chat-input-border: rgba(255, 255, 255, 0.15);
  --chat-input-text: #f9fafb;
  --chat-input-placeholder: #9ca3af;

  --chat-send-bg: #3b82f6;
  --chat-send-bg-hover: #2563eb;

  --chat-hint-text: #9ca3af;
  --chat-footer-border: rgba(255, 255, 255, 0.1);
}

/* Footer container */
.chatbot-footer {
  padding: 10px 12px;
  border-top: 1px solid var(--chat-footer-border);
  background: transparent;
}

/* Form */
.chatbot-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Text input */
.chatbot-input {
  width: 100%;
  min-height: 44px;
  resize: none;
  padding: 8px 10px;

  background: var(--chat-input-bg);
  color: var(--chat-input-text);

  border: 1px solid var(--chat-input-border);
  border-radius: 6px;

  font-size: 0.85rem;
  line-height: 1.3;
}

.chatbot-input::placeholder {
  color: var(--chat-input-placeholder);
}

.chatbot-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.4);
}

/* Controls row */
.chatbot-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Hint text */
.chatbot-hint {
  font-size: 0.65rem;
  color: var(--chat-hint-text);
}

/* Send button */
.chatbot-send {
  background: var(--chat-send-bg);
  color: var(--chat-send-text);
  border: none;
  padding: 6px 12px;
  font-size: 0.75rem;
  border-radius: 6px;
  cursor: pointer;
}

.chatbot-send:hover {
  background: var(--chat-send-bg-hover);
}

/* =========================
   Table of Contents
========================= */

/* Fix TOC anchor offset for sticky top banner */
.project-background h2,
.project-background h3,
.project-background h4,
.project-section-background h2,
.project-section-background h3,
.project-section-background h4 {
  scroll-margin-top: 110px; /* 90px banner + a little breathing room */
}

.toc {
  margin-top: 1rem;
  padding: 0.9rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.toc-title {
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
  letter-spacing: 0.03em;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.35rem;
}

.toc-list a {
  text-decoration: none;
  color: var(--text-color);
  border-left: 3px solid transparent;
  padding: 0.25rem 0.25rem 0.25rem 0.5rem;
  border-radius: 8px;
  transition: all 0.15s ease;
}

/* Hover accent */
.toc-list a:hover {
  color: var(--accent);
  background: rgba(255, 153, 0, 0.1);
  border-left-color: var(--accent);
}

/* Indent H3 */
.toc-list a[data-level="3"] {
  margin-left: 0.75rem;
  font-size: 0.85rem;
  opacity: 0.9;
}

/* Bottom spacing */
.toc-bottom {
  margin-top: 3rem;
}

nav a:hover {
  color: var(--accent);
  background: rgba(255, 153, 0, 0.1);
  border-left-color: var(--accent);
}
