/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', Arial, Helvetica, sans-serif;
  background: #f8f9fa;
  color: #222;
  line-height: 1.7;
}

/* Header and Navigation */
header {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.2rem 2rem;
  display: flex;
  justify-content: flex-end;
}

nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
}

nav a {
  color: #0d6efd;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

nav a:hover,
nav a:focus {
  color: #222;
}

/* Section Layout */
main {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 2rem;
}

section {
  margin-bottom: 3.5rem;
  padding: 2rem 0;
}

section h2,
section h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  color: #0d6efd;
}

#home {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 45vh;
}

#home h1 {
  font-size: 2.5rem;
  color: #222;
  margin-bottom: 0.5rem;
}

#home p {
  font-size: 1.3rem;
  color: #555;
}

/* About Section */
#about p {
  font-size: 1.15rem;
  color: #444;
}

/* Portfolio Section */
.portfolio-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 2rem;
}

.portfolio-item {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(50, 50, 93, 0.07);
  padding: 2rem;
  transition: transform 0.18s, box-shadow 0.18s;
}

.portfolio-item:hover {
  transform: translateY(-5px) scale(1.025);
  box-shadow: 0 8px 32px rgba(50, 50, 93, 0.13);
}

.portfolio-item h3 {
  margin-bottom: 0.7rem;
  color: #0d6efd;
  font-size: 1.3rem;
}

.portfolio-item p {
  margin-bottom: 0.8rem;
  color: #444;
}

.portfolio-item a {
  color: #fff;
  background: #0d6efd;
  padding: 0.5rem 1.3rem;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.18s;
}

.portfolio-item a:hover {
  background: #084298;
}

/* Contact Form */
#contact form {
  max-width: 420px;
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 14px rgba(50, 50, 93, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

#contact label {
  font-weight: 500;
  margin-bottom: 0.3rem;
}

#contact input,
#contact textarea {
  width: 100%;
  padding: 0.7rem;
  border-radius: 6px;
  border: 1px solid #cfd8dc;
  background: #f6f9fb;
  font-size: 1rem;
  resize: vertical;
  transition: border 0.18s;
}

#contact input:focus,
#contact textarea:focus {
  border: 1.5px solid #0d6efd;
  outline: none;
}

#contact button[type="submit"] {
  width: fit-content;
  background: #0d6efd;
  color: #fff;
  padding: 0.6rem 2rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  align-self: flex-end;
  transition: background 0.18s;
}

#contact button[type="submit"]:hover {
  background: #084298;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 0 1rem 0;
  color: #888;
  font-size: 0.98rem;
}

/* Responsive Design */
@media (max-width: 900px) {
  nav, main {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

@media (max-width: 700px) {
  nav ul {
    gap: 1.2rem;
  }
  .portfolio-items {
    grid-template-columns: 1fr;
  }
  section {
    padding: 1.3rem 0;
  }
}

@media (max-width: 500px) {
  header {
    padding: 0;
  }
  nav {
    padding: 0.6rem 0.5rem;
  }
  section h1, section h2 {
    font-size: 1.6rem;
  }
  #home h1 {
    font-size: 1.3rem;
  }
  #home p {
    font-size: 1rem;
  }
}
#backToTop {
  display: none; /* Hidden by default */
  position: fixed;
  bottom: 40px;
  right: 40px;
  z-index: 999;
  background: #0d6efd;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 2rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(50,50,93,0.18);
  transition: background 0.2s, opacity 0.3s;
  opacity: 0.85;
}
#backToTop:hover {
  background: #084298;
  opacity: 1;
}
