* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #0a0a0a;
  color: #e0e0e0;
  min-height: 100vh;
  line-height: 1.6;
}

.floating-glass {
  background: rgba(18, 18, 18, 0.75);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.navbar {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  border-radius: 20px;
  padding: 8px 24px;
  width: calc(100% - 36px);
  max-width: 1100px;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.nav-logo {
  font-size: 1.6rem;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: 1px;
  transition: text-shadow 0.3s;
}

.nav-logo:hover {
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

.nav-right {
  display: flex;
  align-items: center;
}

.menu-toggle {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.3rem;
  cursor: pointer;
  display: block;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links li {
  position: relative;
}

.nav-links a {
  text-decoration: none;
  color: #b0b0b0;
  font-weight: 500;
  font-size: 1rem;
  padding-bottom: 4px;
  transition: color 0.3s;
  display: inline;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background-color: #ffffff;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.nav-links a:hover {
  color: #ffffff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

main {
  padding-top: 100px;
}

.full-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-greeting {
  font-size: 1.5rem;
  color: #999999;
  margin-bottom: 0.5rem;
  font-weight: 400;
}

.hero-cta {
  font-size: 4.5rem;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
  margin-bottom: 2rem;
  line-height: 1.2;
  animation: softGlow 4s ease-in-out infinite alternate;
}

@keyframes softGlow {
  0% { text-shadow: 0 0 20px rgba(255, 255, 255, 0.3); }
  100% { text-shadow: 0 0 40px rgba(255, 255, 255, 0.6); }
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.dark-btn {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.3s ease;
  cursor: pointer;
  font-size: 1rem;
}

.dark-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.dark-btn i {
  font-size: 0.9rem;
}

.content-section {
  padding: 5rem 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.section-heading {
  font-size: 2rem;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  margin-bottom: 3rem;
  letter-spacing: -0.5px;
  position: relative;
}

.section-heading::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -12px;
  transform: translateX(-50%);
  width: 100px;
  height: 2px;
  background-color: #ffffff;
  opacity: 0.6;
  transition: width 0.3s ease, opacity 0.3s ease;
}

.section-heading:hover::after {
  width: 140px;
  opacity: 1;
}

.about-text {
  font-size: 1.15rem;
  max-width: 800px;
  margin: 0 auto;
  color: #cccccc;
  line-height: 1.8;
  text-align: justify;
}

.about-text p {
  margin: 0;
}

.about-text .reveal-line {
  display: inline;
  margin-right: 2px;
}

.gated-section {
  position: relative;
}

.gated-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 1rem;
}

.gated-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, rgba(10,10,10,0.95) 0%, rgba(10,10,10,0.7) 60%, transparent 100%);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.gated-overlay.show {
  display: flex;
}

.see-more-btn {
  z-index: 3;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  margin-top: 1rem;
}

.cert-card, .project-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  cursor: pointer;
}

.cert-card:hover, .project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  border-color: rgba(255, 255, 255, 0.2);
}

.card-image {
  height: 180px;
  background-size: cover;
  background-position: center;
  background-color: #1a1a1a;
}

.card-image.placeholder {
  background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
}

.card-title {
  padding: 1rem 1rem 0 1rem;
  font-weight: 600;
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  color: #ffffff;
  text-align: center;
  margin: 0 1rem;
  text-shadow: 0 0 8px rgba(255,255,255,0.3);
}

.card-desc {
  padding: 0.5rem 1rem 1rem 1rem;
  color: #cccccc;
  font-weight: 400;
  text-align: center;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.empty-message {
  text-align: center;
  color: #888888;
  grid-column: 1 / -1;
  padding: 2rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.skill-item {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.skill-item span {
  font-weight: 600;
  color: #dddddd;
  font-size: 1.1rem;
}

.skill-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffffff, #888888);
  border-radius: 10px;
  width: 0%;
  transition: width 1.2s ease;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.social-icon {
  font-size: 2.2rem;
  color: #999999;
  transition: transform 0.3s, color 0.3s, text-shadow 0.3s;
}

.social-icon:hover {
  color: #ffffff;
  transform: translateY(-5px) scale(1.1);
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

.contributions-wrapper {
  text-align: center;
}

.contributions-img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 1rem;
}

.contributions-link a {
  color: #888888;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s;
}

.contributions-link a:hover {
  color: #ffffff;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.form-group {
  width: 100%;
}

.button-group {
  display: flex;
  justify-content: center;
}

.dark-input {
  width: 100%;
  padding: 1rem 1.5rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.dark-input::placeholder {
  color: #666666;
}

.dark-input:focus {
  border-color: #ffffff;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

textarea.dark-input {
  resize: vertical;
}

.send-btn {
  width: auto;
  padding: 0.7rem 2rem;
}

.form-feedback {
  text-align: center;
  font-size: 0.95rem;
  min-height: 1.5em;
}

.form-feedback.success {
  color: #4ade80;
}

.form-feedback.error {
  color: #f87171;
}

.footer {
  background: rgba(18, 18, 18, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 16px 24px;
  text-align: center;
  font-size: 0.9rem;
  color: #888888;
  margin-top: 3rem;
}

.reveal-line {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transition-delay: var(--delay, 0s);
}

.reveal-line.visible {
  opacity: 1;
  transform: translateY(0);
}

.about-text .reveal-line {
  display: inline;
}

@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(25px);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
  }

  .nav-links.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .gated-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .hero-cta {
    font-size: 3rem;
  }

  .content-section {
    padding: 4rem 16px;
  }

  .section-heading {
    font-size: 1.7rem;
  }

  .about-text {
    text-align: left;
  }
}

@media (min-width: 769px) {
  .menu-toggle {
    display: none;
  }

  .nav-links {
    position: static;
    flex-direction: row;
    background: transparent;
    backdrop-filter: none;
    border: none;
    padding: 0;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .gated-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
