/* --- GLOBAL LAYOUT SETUP --- */
body {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  padding: 40px 20px;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
  background-color: #f4f4f9;
  color: #333333;
  transition: background-color 0.4s ease, color 0.4s ease;
}

body.dark { background-color: #1e1e24; }

/* Main Container */
.resume-card {
  background-color: #ffffff;
  max-width: 950px;
  width: 90%;
  padding: 35px;
  border-radius: 12px;
  border: 2px solid #dddddd;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 40px;
}

body.dark .resume-card { background-color: #2a2a35; color: #ffffff; border-color: #444455; }

/* Responsive Rule */
@media (max-width: 820px) {
  .resume-card { grid-template-columns: 1fr; gap: 30px; padding: 20px; }
  .left-column { max-width: 100% !important; }
}

/* --- COLUMNS --- */
.left-column { display: flex; flex-direction: column; gap: 25px; max-width: 350px; width: 100%; }
.right-column { display: flex; flex-direction: column; gap: 25px; width: 100%; min-width: 0; }

/* --- THEME BUTTON --- */
.theme-container { display: flex; justify-content: center; margin-bottom: 20px; width: 100%; }
#theme-btn {
  background-color: #007bff; color: #ffffff; border: none; padding: 12px 24px;
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px;
  border-radius: 6px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  transition: background-color 0.3s ease, transform 0.2s ease;
}
#theme-btn:hover { background-color: #0056b3; transform: translateY(-1px); }
body.dark #theme-btn { background-color: #38bdf8; color: #1e293b; }

/* --- MODERN PILL BADGES --- */
.skills-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; margin-top: 15px; }
.skill-item { display: inline-block; padding: 6px 12px; font-size: 13px; border-radius: 20px; font-weight: 500; transition: all 0.2s ease; }
.skill-item.tech { background-color: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.skill-item.soft { background-color: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
body.dark .skill-item.tech { background-color: #1e293b; color: #38bdf8; border: 1px solid #334155; }
body.dark .skill-item.soft { background-color: #064e3b; color: #4ade80; border: 1px solid #065f46; }

/* --- PROJECTS GRID --- */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-top: 15px; }
.project-card {
  background-color: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 20px;
  display: flex; flex-direction: column; justify-content: space-between; min-width: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
body.dark .project-card { background-color: #1e293b; border-color: #334155; }

/* --- WEATHER WIDGET --- */
.weather-search { display: flex; flex-wrap: nowrap; gap: 5px; margin: 10px 0; }
#widget-city { width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }
#widget-search-btn { padding: 8px 12px; background: #007bff; color: white; border: none; border-radius: 4px; cursor: pointer; white-space: nowrap; }

/* --- BOTTOM-CENTERED CONTACT SECTION --- */
.contact-section {
  grid-column: 1 / -1; 
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}

#resume-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 400px;
  gap: 10px;
}

#resume-form input {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  box-sizing: border-box;
}

#resume-form button[type="submit"] {
  width: 100%;
  max-width: 300px;
  padding: 10px 20px;
  background-color: #007bff;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.hidden { display: none !important; }

.filter-buttons { display: flex; gap: 8px; margin-bottom: 15px; }
.filter-btn { 
  padding: 6px 12px; border: 1px solid #cbd5e1; background: #fff; 
  border-radius: 4px; cursor: pointer; font-size: 12px; font-weight: 600; 
}
.filter-btn.active { background: #007bff; color: #fff; border-color: #007bff; }
body.dark .filter-btn { background: #334155; color: #e2e8f0; border-color: #475569; }
body.dark .filter-btn.active { background: #38bdf8; color: #1e293b; border-color: #38bdf8; }

/* ==========================================================
   SANDBOX & WIDGET UTILITY STRUCTURING
   ========================================================== */
.theme-container { margin-bottom: 20px; }

.widget-input {
  padding: 6px;
  border-radius: 4px;
  border: 1px solid #ccc;
  flex: 1;
  font-size: 13px;
}

.widget-button {
  padding: 6px 12px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
}

#widget-result {
  font-size: 13px;
  line-height: 1.4;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #cbd5e1;
}

.sandbox-controls {
  margin: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Interactivity Control Upgrades */
.sand-btn-check, .sand-btn-pay {
  padding: 6px;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
  transition: all 0.2s ease-in-out;
}
.sand-btn-check { background: #475569; }
.sand-btn-check:hover { background: #334155; transform: translateY(-1px); }
.sand-btn-pay { background: #059669; }
.sand-btn-pay:hover { background: #047857; transform: translateY(-1px); }
.sand-btn-pay:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

#sand-result {
  font-size: 12px;
  line-height: 1.4;
  margin-top: 10px;
  padding: 8px;
  border-top: 1px dashed #cbd5e1;
  font-family: monospace;
  border-radius: 4px;
  background-color: #f1f5f9;
  color: #0f172a;
}

/* --- DYNAMIC STATUS TAG BADGING SYSTEM --- */
.status-badge, .role-badge {
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 11px;
}

/* Response Tier Badges */
.status-denied { background-color: #fee2e2; color: #991b1b; }
.status-authorized { background-color: #d1fae5; color: #065f46; }
.role-premium { background-color: #dbeafe; color: #1e40af; }

/* Response Data Text Classes */
.payload-data { font-style: italic; }
.data-denied { color: #dc2626; }
.data-authorized { color: #16a34a; }

/* Dark Mode Support Structure Override */
body.dark #sand-result {
  background-color: #1e293b !important;
  border-top-color: #334155 !important;
  color: #e2e8f0 !important;
}
body.dark .status-denied { background-color: #7f1d1d; color: #fca5a5; }
body.dark .status-authorized { background-color: #064e3b; color: #4ade80; }
body.dark .role-premium { background-color: #1e3a8a; color: #93c5fd; }
body.dark .data-denied { color: #f87171; }
body.dark .data-authorized { color: #4ade80; }

/* --- INFO LINK --- */
.project-card p a {
  color: #007bff;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}
.project-card p a:hover { text-decoration: underline; }
body.dark .project-card p a { color: #38bdf8; }

/* --- INFO MODAL --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  box-sizing: border-box;
}
.modal-box {
  background: #ffffff;
  color: #333333;
  border-radius: 10px;
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}
body.dark .modal-box { background: #2a2a35; color: #ffffff; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  background: inherit;
}
body.dark .modal-header { border-bottom-color: #444455; }

.modal-header h3 { margin: 0; font-size: 17px; }

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
  padding: 0 4px;
}
.modal-close:hover { color: #0f172a; }
body.dark .modal-close { color: #94a3b8; }
body.dark .modal-close:hover { color: #ffffff; }

.modal-body { padding: 20px; font-size: 14px; line-height: 1.6; }
.modal-body h4 { margin: 18px 0 8px; font-size: 14px; }
.modal-body h4:first-child { margin-top: 0; }
.modal-body ol, .modal-body ul { margin: 0 0 12px; padding-left: 20px; }
.modal-body li { margin-bottom: 6px; }

.test-card-list {
  background: #f1f5f9;
  border-radius: 6px;
  padding: 12px 12px 12px 28px;
  font-family: monospace;
  font-size: 13px;
}
body.dark .test-card-list { background: #1e293b; }