html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding-top: 60px;
  overflow-x: hidden;
  font-family: 'Fira Code', monospace;
  background: radial-gradient(circle, #0a0a5c 0%, #000022 100%);
  color: #ffffff;
  font-size: 16px;
  letter-spacing: 0.5px;
  text-shadow: 0 0 2px #ffffff, 0 0 5px #008bff;
}

* {
  box-sizing: border-box;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 255, 255, 0.02),
    rgba(0, 255, 255, 0.02) 1px,
    transparent 1px,
    transparent 2px
  );
  background-size: 100% 2px;
  z-index: -1;
  pointer-events: none;
  animation: flicker 0.15s infinite alternate;
}

@keyframes flicker {
  0% { opacity: 0.98; }
  50% { opacity: 1; }
  100% { opacity: 0.98; }
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0gAAAAFklEQVQIHWNgYGBgYOBiAAIIMjAwAgAFDAAU4B5PAAAAAElFTkSuQmCC');
  opacity: 0.05;
  z-index: -2;
  pointer-events: none;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: #000033;
  color: #fff;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  font-size: 1rem;
  border-bottom: 2px solid #005bff;
  overflow-x: hidden;
  box-shadow: 0 2px 10px rgba(0, 255, 255, 0.2);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-title {
  color: #f8ffbc;
  font-size: 1.1rem;
  text-decoration: none;
  white-space: nowrap;
  text-shadow: 0 0 1px #ffffff, 0 0 3px #00e1ff, 0 0 5px #0099ff;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  padding-left: 1rem;
  border-left: 1px solid #555;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #005bff;
  text-shadow: 0 0 5px #005bff;
}

.dropdown-toggle {
  display: none;
  cursor: pointer;
}

.dropdown-toggle img {
  width: 28px;
  height: 28px;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 60px;
  right: 1rem;
  background: #000;
  border: 1px solid #444;
  flex-direction: column;
  width: 180px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.8);
  z-index: 999;
}

.dropdown-menu a {
  color: #fff;
  text-decoration: none;
  display: block;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #222;
  text-align: left;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.dropdown-menu a:hover {
  background: #1d2287;
  color: #c300ff;
}

.dropdown-menu.show {
  display: flex;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .dropdown-toggle {
    display: block;
  }
}

main {
  padding: 6rem 1rem 2rem;
  max-width: 800px;
  margin: auto;
}

.accent {
  color: #63B650;
}

.hero {
  display: flex;
  align-items: right;
  gap: 2rem;
  margin-bottom: 3rem;
  margin-top: 20%;
}

/* Hero Image Wrapper */
.hero-img-wrapper {
  width: 70%;
  position: relative;
  padding-top: 143%; /* 2388 / 1668 * 100 ≈ 143% */
  max-width: 400px;
  overflow: hidden;
}
.hero-img-wrapper img {
  width: 100%;
  height: auto;
  object-fit: cover; 
  display: block;
  position: absolute;
  top: 0; left: 0;
  z-index: 1;
}


.hero-img-wrapper img:hover {
  transform: scale(1.02);
}

/* Transition GIF styling */
#transition-gif {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  z-index: 2;
  display: none;
}

.project-card {
  border: 1px dashed #00e1ff;
  border-radius: 2px;
  background-color: rgba(0, 0, 64, 0.4);
  padding: 1rem;
  margin-bottom: 1rem;
  position: relative;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.3s;
}

.project-card:hover {
  background-color: rgba(0, 0, 64, 0.6);
  border-color: #ffffff;
}

.github-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.github-btn img {
  width: 40px;
  filter: invert(1);
}

.skills h4 {
  margin-bottom: 0.5rem;
}

.hero p::after {
  content: '_';
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.proficiency-legend {
  display: flex;
  gap: 2rem;
  margin: 1rem 0 1rem;
  font-size: 0.9rem;
  align-items: center;
  flex-wrap: wrap;
}

.legend-box {
  width: 16px;
  height: 16px;
  display: inline-block;
  margin-right: 0.5rem;
}

.level-3 {
  background-color: #bf00ff;
}

.level-2 {
  background-color: #da8bff;
}

.level-1 {
  background-color: #f0dcff;
}

.skill-box {
  width: 200px;
  height: 48px;
  padding: 0.6rem 1.2rem 0.6rem 1.6rem;
  margin: 0.5rem;
  border-radius: 8px;
  font-weight: bold;
  font-size: 0.85rem;
  color: #ffffff;
  background-color: #111827;
  box-shadow: 0 0 6px rgba(0,255,255,0.1);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
}

.skill-box::before {
  content: '';
  display: block;
  width: 8px;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 4px 0 0 4px;
  box-shadow: 0 0 6px currentColor;
}

.level-1::before {
  background-color: #f0dcff;
  color: #f0dcff;
  box-shadow: 0 0 10px #f0dcff;
}

.level-2::before {
  background-color: #da8bff;
  color: #da8bff;
  box-shadow: 0 0 10px #da8bff;
}

.level-3::before {
  background-color: #bf00ff;
  color: #bf00ff;
  box-shadow: 0 0 10px #bf00ff;
}

.skill-box:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}

.hint {
  font-weight: normal;
  color: #ccc;
}

.project-list {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 0.5rem;
  margin-bottom: 1rem;
}

.project-list::-webkit-scrollbar {
  width: 8px;
}
.project-list::-webkit-scrollbar-track {
  background: #1c1c1c;
}
.project-list::-webkit-scrollbar-thumb {
  background-color: #888;
  border-radius: 4px;
}
.project-list::-webkit-scrollbar-thumb:hover {
  background-color: #555;
}

h2 {
  line-height: 78px;
  margin-top: 250px;
}

h3 {
  font-family:'Fira Code Bold', monospace;
  color: #ffffff;
}

strong {
  font-family: 'Fira Code Bold', monospace;
  color: #f8ffbc;
}