:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --bg-dark: #1a1a1a;
  --text-main: #f0f0f0;
  --text-muted: #ddd;
}

* {
  scrollbar-width: none;
}
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 6px;
}

body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(26, 26, 26, 0.7);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);

  border-bottom: none;
}

.navbar .logo {
  display: flex;
  align-items: center;
  filter: invert(100%);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
}

.nav-links li a {
  text-decoration: none;
  color: var(--text-muted);
  padding: 5px 0;
  position: relative;
  transition: color 0.3s;
}

.nav-links li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.nav-links li a:hover {
  color: var(--primary);
}

.nav-links li a:hover::after {
  width: 100%;
}

.container {
  max-width: 1100px;
  margin: auto;
  padding: 40px 20px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  width: 100%;
}

.project-box {
  background: #222;
  border: 1px solid #333;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: 0.3s;
}

.project-box:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
}

.project-box img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.project-box .content {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 15px;
}

.project-description {
  color: #bbb;
  margin: 10px 0;
  flex: 1;
}

.lang-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.lang-tag {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  background: #2b2b2b;
  padding: 5px 10px;
  border-radius: 999px;
}

.color-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.cert-preview {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.cert-preview.active {
  display: flex;
}

.cert-preview img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 320px));
  justify-content: center;
  gap: 24px;
  margin-top: 20px;
}

.cert-box {
  width: 320px;
  height: 220px;
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.25s, border-color 0.25s;
  overflow: hidden;
}

.cert-box:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
}

.cert-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

@media (max-width: 768px) {
  .cert-grid {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .cert-box {
    width: 100%;
    max-width: 320px;
  }
}

.resume-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.tech-pills {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 15px;
}
.pill {
  background: #333;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.85em;
  border: 1px solid var(--primary);
  color: #fff;
}
.pill:hover {
  transform: scale(1.05);
}
.widget h3 {
  margin-top: 0;
  margin-bottom: 15px;
}
.widget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.widget {
  background: #222;
  border: 1px solid #333;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
}
.widget h3 {
  color: var(--primary);
  margin: 0;
}
.widget a.normal-btn {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.8em;
}

.hero {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-bottom: 40px;
}

.avatar-container {
    position: relative;
    width: 140px;
    height: 140px;
      justify-content: center;
  align-items: center;
   display: flex;
}

.avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 4px solid var(--primary);
    object-fit: cover;
    display: block;
}


.avatar-badge {
    position: absolute;
    right: -6px;
    bottom: -6px;

    width: 42px;
    height: 42px;

    background: white;
    border: 3px solid var(--primary);
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
  flex: 1;
}

.hero h1 {
  margin: 0;
  font-size: 3rem;
}

.hero-bio {
  color: #bbb;
  font-size: 1.05rem;
  margin: 15px 0;
  max-width: 700px;
}

.hero-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.featured {
  display: flex;
  gap: 25px;
  align-items: center;
  text-align: left;
  margin-top: 40px;
}

.featured img {
  width: 40%;
  max-width: 400px;
  border-radius: 12px;
  object-fit: cover;
}

.featured > div {
  flex: 1;
}

.section {
  margin-top: 40px;
}

@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .hero-links {
    justify-content: center;
    flex-wrap: wrap;
  }

  .hero h1 {
    font-size: 2.2rem;
  }
  .featured {
    flex-direction: column;
    text-align: center;
  }

  .featured img {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    gap: 20px;
    padding: 20px;
  }

  .nav-links {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 15px;
    width: auto;
    max-width: 100%;
    padding: 0;
    margin: 0;
  }
}

@media (max-width: 768px) {
  .project-grid,
  .project-box img,
  .lang-container {
    justify-content: center;
  }
}

.custom-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background-color: var(--btn-color);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.1s ease;
  text-decoration: none;
}

.custom-btn:hover {
  opacity: 0.9;
}

.custom-btn:active {
  transform: scale(0.98);
}

.custom-btn i {
  font-size: 16px;
}

.normal-btn {
  display: inline-block;
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  transition: opacity 0.3s;
}
.normal-btn:hover {
  opacity: 0.9;
}
