:root {
  --bg: #0b0f14;
  --trbg: transparent;
  --text: #144875;
  --muted: #9fb0c0;
  --card: #11161c;
  --accent: #66c2ff;
  --accent-2: #8bda8b;
  --border: #253041;
  --link: #9cd1ff;
}

[data-theme="light"] {
  --bg: #ffffff;
  --trbg: transparent;
  --text: #1763c0;
  --muted: #4a5a69;
  --card: #f5f7fa;
  --accent: #0066cc;
  --accent-2: #1e7b1e;
  --border: #dce3eb;
  --link: #005bb5;
}

.scroll-box {
  width: 100%;
  height: 598px; /* Fixed height for the scrollable area */
/*  height: 60%; /* Relative height for scrollable area */
  overflow: auto; /* Adds scrollbars only when necessary */
  border: 0px solid #ccc;
  padding: 0px;
}

.scroll-box1 {
  width: 100%;
  height: 88%; /* Fixed height for the scrollable area */
  overflow: auto; /* Adds scrollbars only when necessary */
  border: 0px solid #ccc;
  padding: 0px;
}

* { box-sizing: border-box; }
html, body { margin-top: 0; margin-bottom: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial;
  background: var(--trbg); color: var(--text); line-height: 1.6;
}

main > * {
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    border: 0px solid var(--border);
}
main.page-box {
    margin: 0 auto;
    padding: 0;
    border: 0px solid var(--border);
    overflow: hidden;
    width: 100%;
    align-items: center;
    text-align: center;
    position: relative;
}

h2 {
  margin-top: 0 auto;
  padding-top: 0;
}
.visually-hidden { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.skip-link { position: absolute; left: -9999px; top: -9999px; }
.skip-link:focus { left: 0; top: 0; background: var(--accent); color: #000; padding: 0px; }

.site-header, .site-footer {
  border-bottom: 1px solid var(--border);
  text-align: center;
  background: var(--trbg);
/*  padding: 16px; */
  margin: 0px 0px 0px 0px;
  padding: 0px 0px 0px 0px;
}
.site-footer { border-top: 1px solid var(--border); border-bottom: none; text-align: center; }

.brand h1 { margin: 0; font-size: 1.8rem; text-align: center; }
.brand p { margin: 4px 0; color: var(--muted); text-align: center; }

.nav ul { 
  list-style: none;
  color: var(--accent);
  background: var(--trbg); 
  padding: 0; 
  margin: 0px 0 0; 
  display: flex; 
  flex-wrap: wrap; 
  gap: 8px; 
  align-items: center; 
  text-align: center; 
  justify-content: center; 
}
.nav a { background: var(--trbg); color: var(--link); text-decoration: none; padding: 8px 10px; border-radius: 6px; }
.nav a:hover { background: var(--trbg); color: var(--accent-2); border-radius: 6px; }
.nav .btn { background: var(--trbg); color: var(--accent); font-weight: 600; }
.nav .btn:hover { background: var(--trbg); color: var(--accent); filter: brightness(1.05); }

#themeToggle {
  border: 1px solid var(--border);
  background: var(--trbg);
  color: var(--text);
  border-radius: 8px;
  padding: 0px 0px;
  cursor: pointer;
}

main { padding: 8px; max-width: 1100px; margin: 0 auto; }

.loadedPage {
  width: 100%;
  height: 660px;
  border: none;
  overflow: hidden;
  display: none; 
  padding: 0px;
  margin: 0px;
}

.hero .actions { margin-top: 12px; display: flex; gap: 10px; }
.btn {
  display: inline-block;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--accent-2);
  padding: 10px 14px;
  border-radius: 8px;
}
.btn.primary { background: var(--accent); color: #071018; font-weight: 700; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(20%, 1fr)); gap: 16px; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
.card h2 {
  padding-top: 4px;
  text-align: center;
}

table, th, td {
  border: 1px solid var(--text);
  border-collapse: collapse;
}

section {
  margin-top: 0 auto;
  padding-top: 0;
}

.search-section { margin-top: 24px; }
.search-bar { display: flex; gap: 8px; align-items: center; }
.search-bar input {
  flex: 1; padding: 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--card); color: var(--text);
}
.search-bar button {
  padding: 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); cursor: pointer;
}
#searchResults { margin-top: 12px; }

.timeline { display: grid; gap: 16px; }
.timeline-item {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px;
}
.meta { color: var(--muted); }

.filters .filter-row { display: flex; gap: 16px; flex-wrap: wrap; }

.skills-grid, .certs, .contact-grid { display: grid; gap: 16px; }
.skills-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); background: var(--bg); }
.cert-card, .edu-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px;
}
.contact-grid { grid-template-columns: 1fr 1fr; color: var(--accent); }
.contact-list {  color: var(--accent); list-style: none; padding: 0; margin: 0; }
.form-row { display: grid; gap: 6px; margin-bottom: 12px; }
input, textarea {
  border: 1px solid var(--border); background: var(--card); color: var(--text); border-radius: 8px; padding: 10px;
}
input:focus, textarea:focus { outline: 2px solid var(--accent); }

@media (max-width: 800px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.alert-dialog {
  position: absolute;
  padding: 8px 12px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  background: #fff;
  color: #111;
  max-width: 300px;
  z-index: 2000;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .12s ease, transform .12s ease;
  pointer-events: none;
}
.alert-dialog[data-open="true"] {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
@media (prefers-color-scheme: dark) {
  .alert-dialog { background:#111; color:#eee; box-shadow: 0 8px 24px rgba(0,0,0,0.6); }
}

.modal {
  position: relative;
  inset: 0;
  display: grid;
  place-items: center;
/*  background: rgba(0,0,0,0.5); */
  background: var(--bg);
  z-index: 1000;
  transition: opacity 180ms ease;
}
.modal[hidden] { display: none; }
.modal-panel {
  background: var(--bg);
  color: var(--text);
  width: 90%;
  max-width: 600px;
  border-radius: 8px;
  border-color: var(--border);
  border-width: 8px;
  box-shadow: 0 12px 40px var(--border);
  padding: 16px;
}
.modal-header { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.modal-close {
  background: var(--trbg);
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
}
@media (prefers-color-scheme: dark) {
  .modal-panel { background: var(--bg); color: var(--text); }
}  

/* Hover target */
.hover-target, .hover-target1, .hover-target2, .hover-target3 {
  display: inline-block;
  padding: 12px 20px;
  background: #0078d4;
  color: white;
  border-radius: 6px;
  cursor: pointer;
}

/* Overlay */
.overlay, .overlay1, .overlay2, .overlay3 {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  color: black;
  z-index: 999;
}

/* Dialog */
.dialog {
  background: #fff;
  padding: 20px 24px;
  border-radius: 8px;
  max-width: 360px;
  width: 90%;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.dialog-header {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
  text-align: center;
  align-items: center;
}

.dialog-body {
  margin-bottom: 16px;
  text-align: center;
  align-items: center;
}

.dialog-footer {
  text-align: center;
}

.dialog-button {
  padding: 8px 14px;
  background: #0078d4;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.dialog-button:hover {
  background: #005fa3;
}

/***********************/
/* Tooltip             */
/***********************/
.tooltip-wrapper {
  position: relative;
  display: inline-block;
  margin-right: 2rem;
}

.tooltip-target {
  padding: 0.5rem 1rem;
  cursor: pointer;
}

.tooltip-popup {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 0.4rem;
  padding: 0.6rem 0.8rem;
  background: #222;
  color: #fff;
  border-radius: 4px;
  font-size: 0.85rem;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease-out;
  z-index: 10;
}

.tooltip-popup.visible {
  opacity: 1;
  pointer-events: auto;
}
/***********************/
/* Reminder ticker box */
/***********************/
.ticker {
  background: var(--trbg);
  border: 0px solid;
  padding: 0 0 0 0;
  margin: 0;
  overflow: hidden;
  border-radius: 10px;
  font-size: 1.2rem;
  max-width: 100%;
  text-align: center;
  align-items: center;
  justify-content: center;
}

.ticker-container {
  border: 0px;
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  background: var(--trbg);
  padding: 0 0 0 0;
  margin: 0;
  position: relative;
  left: 25%;
  max-width: 50%;
  text-align: center;
  align-items: center;
  justify-content: center;
}

.ticker-track {
  border: 0px;
  width: 100%;
  display: inline-block;
  padding: 0 0 0 0;
  white-space: nowrap;
  margin: 0 auto;
  overflow: hidden;
  text-align: center;
  align-items: center;
  will-change: transform;
  animation: scroll-left 20s linear infinite;
}

  /* Pause animation on hover */
.ticker-track:hover {
  animation-play-state: paused;
}


.ticker-item {
  display: inline-block;
  margin-right: 0px;
  font-size: 1.15rem;
  color: var(--text);
}

  /* Slow, smooth scroll */
@keyframes scroll-left {
  0%   { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}
