:root {
  --background: #0d1117;
  --primary: #c9d1d9;
  --secondary: #8b949e;
  --accent: #58a6ff;
  --green: #39d353;
  --border: #30363d;
}

body {
  font-family: 'Fira Code', monospace;
  background-color: var(--background);
  color: var(--primary);
  cursor: none;
  /* Hide default cursor */
}

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

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

/* Custom Cursor */
#cursor-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9999;
  transition: width 0.2s, height 0.2s, background-color 0.2s;
}

#cursor-dot.hovered {
  width: 32px;
  height: 32px;
  background-color: rgba(88, 166, 255, 0.2);
}

.glow {
  box-shadow: 0 0 5px var(--accent), 0 0 10px var(--accent),
    0 0 15px var(--accent);
}

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

.hero-content {
  z-index: 1;
  /* position: relative; */
  background-color: rgba(13, 17, 23, 0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  padding: 2rem 3rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
}

.glitch {
  position: relative;
}

.typewriter-cursor {
  display: inline-block;
  width: 10px;
  height: 1.5em;
  background-color: var(--accent);
  animation: blink 0.7s infinite;
  margin-left: 5px;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

.skill-bar-inner {
  transition: width 1.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.project-card {
  background-color: #161b22;
  border: 1px solid var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: none;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 0 15px var(--accent);
}

.filter-btn {
  background-color: transparent;
  border: 1px solid var(--border);
  color: var(--secondary);
  padding: 8px 16px;
  border-radius: 6px;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.filter-btn:hover {
  background-color: var(--border);
  color: var(--primary);
}

.filter-btn.active {
  background-color: var(--accent);
  color: var(--background);
  border-color: var(--accent);
}

#project-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

#project-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

#project-modal {
  background-color: #161b22;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: scale(0.9);
  transition: transform 0.3s;
}

#project-modal-overlay.active #project-modal {
  transform: scale(1);
}

.modal-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  overflow-x: auto;
  min-height: 0;
  word-break: break-word;
}

#project-modal .modal-body img,
#project-modal .modal-body video,
#project-modal .modal-body iframe {
  max-width: 100%;
  height: auto;
}

#project-modal .modal-body pre {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.modal-tab {
  padding: 0.5rem 1rem;
  cursor: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.modal-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

#project-modal .border-b.border-gray-800.flex.px-4 {
  flex-wrap: wrap;
  gap: 4px;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.timeline-item {
  position: relative;
  padding-bottom: 2rem;
  padding-left: 2rem;
}

.timeline-item:before {
  content: '';
  position: absolute;
  left: 0;
  top: 5px;
  width: 1px;
  height: 100%;
  background-color: var(--border);
}

.timeline-dot {
  position: absolute;
  left: -7px;
  top: 5px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background-color: var(--background);
  border: 2px solid var(--accent);
  transition: box-shadow 0.3s ease;
}

.timeline-item:hover .timeline-dot {
  box-shadow: 0 0 10px var(--accent);
}

.form-input {
  background-color: #010409;
  border: 1px solid var(--border);
  caret-color: var(--accent);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 5px var(--accent);
}

.submit-btn {
  background-color: var(--accent);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.submit-btn:hover {
  background-color: #79c0ff;
  box-shadow: 0 0 10px #79c0ff;
}

.blinking-cursor {
  animation: blink 1s step-end infinite;
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s, transform 0.8s;
}

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

#quote-container {
  transition: opacity 1s ease-in-out;
}

/* Skills section dynamic layout */
#skills .skills-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1rem, 4vw, 3.25rem);
}

#skills .skills-col {
  width: 100%;
  min-width: 0;
}

#skills .skills-chart-wrap {
  width: min(100%, clamp(300px, 40vw, 500px));
  max-width: 500px;
}

#skills .skills-cert-wrap {
  width: min(100%, 500px);
  margin-inline: auto;
}

@media (min-width: 768px) {
  #skills .skills-layout {
    flex-direction: row;
    align-items: center;
  }

  #skills .skills-col {
    flex: 1 1 0;
    display: flex;
    justify-content: center;
  }
}
html, body {
  max-width: 100%;
  overflow-x: hidden;
}
@media (hover: none) {
  #cursor-dot {
    display: none;
  }
}
#hero-canvas {
  background: radial-gradient(
    circle at center,
    #0d1117 0%,
    #010409 100%
  );
}


/* Hero terminal from test.html (scoped to #hero only) */
@keyframes ht-scroll {
  0% { height: 0; }
  100% { height: 100%; }
}

@keyframes ht-flicker {
  0% { opacity: 0.15795; }
  5% { opacity: 0.31511; }
  10% { opacity: 0.94554; }
  15% { opacity: 0.2469; }
  20% { opacity: 0.62031; }
  25% { opacity: 0.0293; }
  30% { opacity: 0.00899; }
  35% { opacity: 0.5344; }
  40% { opacity: 0.12778; }
  45% { opacity: 0.52042; }
  50% { opacity: 0.3823; }
  55% { opacity: 0.2198; }
  60% { opacity: 0.9383; }
  65% { opacity: 0.86615; }
  70% { opacity: 0.68695; }
  75% { opacity: 0.55749; }
  80% { opacity: 0.96984; }
  85% { opacity: 0.0361; }
  90% { opacity: 0.24467; }
  95% { opacity: 0.08351; }
  100% { opacity: 0.54813; }
}

#hero {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(4.75rem, 8vh, 6rem) clamp(0.5rem, 1.2vw, 0.9rem)
    clamp(0.5rem, 1.4vh, 0.9rem);
}

#hero .hero-terminal {
  position: relative;
  width: 100%;
  max-width: 1400px;
  height: 100%;
  min-height: 0;
  background: #383838;
  color: #00dd00;
  border: 1px solid #00aa00;
  box-shadow: 0 0 24px rgba(0, 221, 0, 0.15);
  font-family: 'VT323', Courier, monospace;
  font-size: clamp(1.2rem, 1.8vw, 1.8rem);
  overflow: hidden;
}

#hero .hero-terminal * {
  box-sizing: border-box;
}

#hero .ht-overlay,
#hero .ht-scanline {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 2;
}

#hero .ht-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(#101010 50%, rgba(16, 16, 16, 0.2) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.03));
  background-size: 100% 3px, 6px 100%;
}

#hero .ht-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(16, 16, 16, 0.2);
  animation: ht-flicker 0.3s infinite;
}

#hero .ht-scanline {
  height: 20px;
  inset: -5% 0 auto;
  opacity: 0.05;
  animation: ht-scroll 10s 5s infinite;
  background: linear-gradient(to bottom, rgba(0, 221, 0, 0) 0%, rgba(0, 221, 0, 1) 50%, rgba(0, 221, 0, 0) 100%);
}

#hero .ht-wrapper,
#hero .ht-content {
  animation: ht-scroll 3s 1;
}

#hero .ht-wrapper {
  height: 100%;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

#hero .ht-wrapper::-webkit-scrollbar {
  display: none;
}

#hero .ht-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1100px;
  padding: clamp(18px, 3vw, 42px);
  padding-top: clamp(70px, 8vw, 88px);
  min-height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

#hero .ht-content,
#hero .ht-content p,
#hero .ht-content h1,
#hero .ht-content h2,
#hero .ht-content h3,
#hero .ht-content h4,
#hero .ht-content li {
  text-align: center;
}

#hero .ht-content > * {
  margin-left: auto;
  margin-right: auto;
}

#hero .ht-site-header,
#hero .ht-site-nav,
#hero .ht-content p,
#hero .ht-content ul,
#hero .ht-content h4 {
  margin: 0 0 12px;
  text-transform: uppercase;
  line-height: 1.1;
}

#hero .ht-name,
#hero .ht-tagline,
#hero .ht-desc,
#hero .ht-focus,
#hero .ht-prompt {
  text-transform: none;
}

#hero .ht-status-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid rgba(0, 221, 0, 0.45);
  background: linear-gradient(180deg, rgba(28, 28, 28, 0.95), rgba(18, 18, 18, 0.9));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  font-size: clamp(0.86rem, 1.05vw, 1.05rem);
  line-height: 1.1;
  box-shadow: inset 0 -1px 0 rgba(0, 221, 0, 0.2);
  z-index: 3;
}

#hero .ht-status-bar span {
  white-space: nowrap;
  color: #9bff9b;
}

#hero .ht-name {
  margin: 0 0 10px;
  font-size: clamp(3.2rem, 11vw, 8.4rem);
  line-height: 0.92;
  letter-spacing: 1px;
  color: #7cf77c;
  text-shadow: 0 0 10px rgba(0, 221, 0, 0.45);
  width: 100%;
  text-align: center;
}

#hero .ht-tagline {
  margin: 0 0 14px;
  font-size: clamp(1.2rem, 2.3vw, 2.3rem);
  color: #b6ffb6;
  width: 100%;
  text-align: center;
}

#hero .ht-divider {
  margin: 0 0 14px;
  color: rgba(0, 221, 0, 0.7);
}

#hero .ht-desc {
  max-width: 900px;
  margin: 0 0 16px;
  font-size: clamp(1.05rem, 1.5vw, 1.55rem);
  color: #a6ffa6;
}

#hero .ht-focus {
  list-style: none;
  padding-left: 0;
  margin: 0 0 16px;
  width: fit-content;
  max-width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

#hero .ht-focus li {
  margin-bottom: 0;
  font-size: clamp(1rem, 1.25vw, 1.3rem);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1.2;
  white-space: nowrap;
}

#hero .ht-focus li:not(:last-child)::after {
  content: " | ";
  color: rgba(124, 247, 124, 0.85);
  margin-left: 6px;
}

#hero .ht-focus-icon {
  width: 1em !important;
  height: 1em !important;
  min-width: 1em;
  max-width: 1em;
  flex: 0 0 1em;
  display: inline-block;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(0, 221, 0, 0.35));
}

#hero .ht-prompt {
  font-size: clamp(1rem, 1.3vw, 1.35rem);
  color: #7cf77c;
}

#hero .ht-cta-links {
  width: 100%;
  max-width: 980px;
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

#hero .ht-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 221, 0, 0.45);
  background: rgba(0, 0, 0, 0.28);
  color: #b6ffb6;
  text-decoration: none;
  font-size: clamp(0.95rem, 1.05vw, 1.08rem);
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

#hero .ht-cta-btn:hover {
  background: rgba(0, 221, 0, 0.18);
  color: #e4ffe4;
  box-shadow: 0 0 10px rgba(0, 221, 0, 0.25);
}

#hero .ht-cta-btn svg {
  width: 1em;
  height: 1em;
  fill: currentColor;
  flex: 0 0 1em;
}

#hero .ht-col {
  float: none;
  padding: 0 16px 0 0;
}

#hero .ht-col-one {
  width: 190px;
}

#hero #ht-logo {
  display: block;
  width: 100%;
  height: auto;
}

#hero .ht-site-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#hero .ht-site-nav li {
  display: inline-block;
  min-width: 180px;
  padding-right: 10px;
}

#hero .ht-site-nav a,
#hero .ht-button {
  color: #fff;
  text-decoration: none;
}

#hero .ht-site-nav a::before,
#hero .ht-site-nav a::after {
  color: #00dd00;
}

#hero .ht-site-nav a::before {
  content: ' [ ';
}

#hero .ht-site-nav a::after {
  content: ' ] ';
}

#hero form {
  margin-top: 8px;
}

#hero form label {
  clear: left;
  float: none;
  margin-right: 10px;
  padding-top: 5px;
}

#hero form input[type='text'],
#hero form textarea {
  background: transparent;
  border: none;
  color: #00dd00;
  float: none;
  width: 80%;
  font: inherit;
}

#hero form textarea {
  resize: none;
  overflow: hidden;
}

#hero form input[type='text']:focus,
#hero form textarea:focus,
#hero form input[type='submit']:focus,
#hero .ht-button:focus {
  outline: 0;
}

#hero form input[type='submit'],
#hero .ht-button {
  display: inline-block;
  margin: 0 12px 20px 0;
  padding: 8px 32px;
  border: 1px solid #00dd00;
  background: transparent;
  color: #00dd00;
  text-transform: uppercase;
  opacity: 0.25;
}

#hero form input[type='submit']:hover,
#hero .ht-button:hover {
  background: #00dd00;
  color: #383838;
  opacity: 0.8;
}

#hero .ht-clear,
#hero .clearfix::after {
  clear: both;
}

#hero .clearfix::after {
  content: '';
  display: table;
}

@media (max-width: 768px) {
  #hero {
    padding: 5rem 0.5rem 0.5rem;
  }

  #hero .hero-terminal {
    height: 100%;
    min-height: 0;
  }

  #hero .ht-col {
    float: none;
    width: 100%;
    padding-right: 0;
  }

  #hero .ht-site-nav li {
    display: block;
    min-width: auto;
    margin-bottom: 4px;
  }

  #hero form input[type='text'],
  #hero form textarea {
    width: 100%;
    margin-bottom: 8px;
  }

  #hero form label {
    float: none;
    display: block;
    padding-top: 0;
  }

  #hero .ht-content {
    padding-top: 78px;
  }

  #hero .ht-status-bar {
    justify-content: center;
    gap: 6px 10px;
  }

  #hero .ht-cta-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #hero .ht-focus {
    width: 100%;
    max-width: 100%;
    gap: 6px 10px;
  }

  #hero .ht-focus li {
    white-space: normal;
  }

  #project-modal {
    width: 96vw;
    max-height: 92vh;
    border-radius: 6px;
  }

  .modal-header {
    padding: 0.6rem 0.75rem;
  }

  .modal-tab {
    padding: 0.45rem 0.6rem;
    font-size: 0.82rem;
  }

  .modal-body {
    padding: 0.9rem;
  }
}

@media (max-width: 460px) {
  #hero .ht-cta-links {
    grid-template-columns: 1fr;
  }
}

/* Final alignment override for embedded hero content */
#hero #hero-terminal .ht-content,
#hero #hero-terminal .ht-content * {
  text-align: center !important;
}

#hero #hero-terminal .ht-content {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

#hero #hero-terminal .ht-focus,
#hero #hero-terminal .ht-focus li {
  justify-content: center !important;
  align-items: center !important;
}
