html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif;
  background-color: #222;
  color: white;
}

/* Navigation bar */
nav {
  background-color: #333;
  padding: 15px 30px;
  position: sticky;
  top: 0;
  z-index: 1000;
  text-align: left;
}

nav a {
  color: white;
  text-decoration: none;
  margin-right: 25px;
  font-size: 18px;
}

nav a:hover {
  text-decoration: underline;
}

/* Sections */
.section {
  padding: 40px 20px;
  max-width: 1200px;
  margin: auto;
}

h2 {
  text-align: center;
  margin-bottom: 20px;
}

p {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 30px auto;
  line-height: 1.6;
}

/* Project cards grid */
.projects-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
}

@media (max-width: 900px) {
  .projects-container {
    grid-template-columns: 1fr;
  }
}

/* Individual project cards */
.project-card {
  text-align: left;
  background-color: #222;
  padding: 20px;
  border: 2px solid #555;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease, border-color 0.3s ease;
}


.project-card.show {
  opacity: 1;
  transform: translateY(0);
}

.project-card:hover {
  border-color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

.project-card img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

.project-title {
  font-size: 1.3rem;
  font-weight: bold;
  color: #888;
  margin: 10px 0 8px 0;
}

.project-description {
  font-size: 1rem;
  color: #888;
  margin: 15px 0;
}

.project-links {
  color: #888;
  font-size: 27px;
  transition: color 0.3s ease;
}

.project-links a:hover i {
  color: #bbbbbb;  
}

.project-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
}

/* Tech grid */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
  justify-items: center;
}

.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: white;
  transition: transform 0.3s ease;
}

.tech-item i,
.tech-item img {
  font-size: 48px;
  width: 48px;
  height: 48px;
  filter: grayscale(70%);  /* start as gray */
  transition: filter 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

/* Hover effect: colored */
.tech-item:hover i {
  filter: grayscale(0%);
}

/* Specific tech colors for hover */
.python i { color: #3776ab; }
.java i { color: #f89820; }
.html i { color: #e34c26; }
.css i { color: #1572b6; }
.js i { color: #f7df1e; }

/* For images like C++, Arduino, etc., keep original on hover */
.tech-item:hover img {
  filter: grayscale(0%);
}

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

.tech-item span {
  margin-top: 8px;
  font-size: 16px;
  color: white;
}


/* Social links */
.connect_socials {
  margin-top: 1rem;
  transform: scale(1.3);
  display: flex;
  justify-content: center;
  align-items: center;
}

.connect_socials a {
  color: #fff;
  font-size: 1.5rem;
  margin: 0 1rem;
  text-decoration: none;
  transition: color 0.3s ease, transform 0.3s ease;
}

.connect_socials a:hover {
  color: #ADD8E6;
  transform: scale(1.2);
}

/* Buttons */
.learn-more-btn,
.view-projects-btn {
  display: inline-block;
  background-color: #333;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.learn-more-btn {
  padding: 8px 16px;
  font-size: 14px;
}

.learn-more-btn:hover {
  background-color: #555;
  transform: translateY(-2px);
}

.view-projects-btn {
  padding: 14px 28px;
  font-size: 18px;
}

.view-projects-btn:hover {
  background-color: lightskyblue;
  transform: translateY(-2px);
}

/* Footer */
footer {
  background-color: #222;
  color: #bbb;
  padding: 12px 0;
  font-size: 15px;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.footer-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 90%;
  max-width: 1200px;
  margin-bottom: 8px;
}

.footer-left,
.footer-center {
  flex: 1;
  text-align: center;
}

.footer-social {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.footer-social a {
  color: #bbb;
  font-size: 1.5rem;
  transition: color 0.3s ease;
}

.footer-social a:hover {
  color: #fff;
}

.footer-link {
  font-size: 14px;
  color: #888;
}

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 6px;
  text-align: center;
  font-size: 13px;
  color: #666;
}

.footer-bottom p {
  margin: 0;
}

/* Scroll-down arrow */
.scroll-down {
  text-align: center;
  margin-top: 20px;
}

.scroll-down a {
  color: white;
  font-size: 2rem;
  animation: bounce 2s infinite;
  display: inline-block;
  text-decoration: none;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(8px); }
  60% { transform: translateY(4px); }
}

.scroll-down a:hover {
  color: #ADD8E6;
}

/* About Section */
#about {
  position: relative;
  height: 100vh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 100px 20px 0 40px; /* add top padding to move content down */
  background: url("images/tommy1.jpg") center 50% / cover no-repeat fixed;
  color: white;
  font-size: 20px;
}

#about::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  
  z-index: 0;
}

#about * {
  position: relative;
  z-index: 1;
}

/* Welcome text animations */
#welcome-text {
  text-align: center;
  max-width: 700px;  
  margin: 20px auto 0 auto; 
  font-family: 'Playfair';
  line-height: 1.6;  
  font-size: 1.6rem; 
  opacity: 0;
  transform: translateY(-50px);
}

#welcome-subtext {
  text-align: center;
  max-width: 700px;  
  margin: 20px auto 0 auto; 
  line-height: 1.6; 
  font-size: 1.1rem;
  opacity: 0;
  transform: translateY(-50px);
}

.bounce-in {
  animation: bounceIn 1s ease forwards;
}

.bounce-in-delay {
  animation: bounceIn 1s ease forwards;
  animation-delay: 0.3s;
}

@keyframes bounceIn {
  60% { opacity: 1; transform: translateY(10px); }
  80% { transform: translateY(-5px); }
  100% { opacity: 1; transform: translateY(0); }
}
