
.card {
  opacity: 0;
  transform: translateY(20px);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.card.reveal-active {
  opacity: 1;
  transform: translateY(0);
}


.btn:hover {
  transform: scale(1.05);
}


@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 1rem;
  }
  .nav-links.show {
    display: flex;
  }
}


button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #0077ff;
  outline-offset: 2px;
}


nav a.active {
  border-bottom: 2px solid #0077ff;
  font-weight: bold;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  transition: background 0.3s, color 0.3s;
  background: linear-gradient(160deg, #1a1a1a, #333);
}

.light-mode {
  background: linear-gradient(160deg, #f0f0f0, #ffffff);
  color: #000000;
}

.dark-mode {
  color: #ffffff;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1000px;
  margin: auto;
}

.nav-links a {
  margin: 0 0.75rem;
  text-decoration: none;
  color: inherit;
  font-weight: 500;
}

nav button {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #999;
  color: white;
  font-size: 18px;
  cursor: pointer;
}

section {
  max-width: 700px;
  margin: 4rem auto;
  padding: 0 1rem;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

section.reveal.active {
  opacity: 1;
  transform: none;
}

.hero {
  text-align: center;
  padding: 4rem 1rem;
}

.profile-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin-bottom: 1rem;
  object-fit: cover;
  border: 3px solid #ccc;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.btn-group {
  margin-top: 2rem;
}

.btn {
  padding: 0.75rem 2rem;
  border-radius: 12px;
  border: none;
  background: #333;
  color: #fff;
  cursor: pointer;
  margin: 0.5rem;
  transition: background 0.3s;
  font-size: 1rem;
  text-decoration: none;
  display: inline-block;
}

.btn:hover {
  background: #555;
}

.dark-mode .btn {
  background: #eee;
  color: #000;
}

.project-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.card {
  background: #222;
  padding: 1.5rem;
  border-radius: 12px;
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.light-mode .card {
  background: #f9f9f9;
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form input,
.contact-form textarea {
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1rem;
  transition: border 0.3s, box-shadow 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #0077ff;
  box-shadow: 0 0 5px rgba(0, 119, 255, 0.5);
}

.contact-form textarea {
  resize: vertical;
  min-height: 100px;
}

/* Scroll-to-top button */
#goTopBtn {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background-color: #333;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 5px;
  cursor: pointer;
  z-index: 1000;
  font-size: 16px;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

#goTopBtn.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

#goTopBtn:hover {
  background-color: #555;
}

/* Ensure project card links are styled correctly */
.project-cards a.card,
.project-cards a.card:link,
.project-cards a.card:visited,
.project-cards a.card:hover,
.project-cards a.card:active {
  text-decoration: none;
  color: inherit;
  display: block;
  padding: 1.5rem;
  border-radius: 12px;
  background: #222;
  transition: transform 0.3s ease, background 0.3s ease;
}

.project-cards a.card:hover {
  transform: translateY(-5px);
  background: #444;
}

.light-mode .project-cards a.card {
  background: #f9f9f9;
}

.light-mode .project-cards a.card:hover {
  background: #e0e0e0;
}

/* GLOBAL LINK RESET */
a, a:link, a:visited, a:hover, a:active {
  color: inherit;       /* inherit text color everywhere */
  text-decoration: none; /* remove underline globally */
}
/* Make project cards visible immediately */
.project-cards .card {
  opacity: 1 !important;
  transform: translateY(0) !important;
}
