* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Lora', 'Segoe UI', sans-serif;
  background-color: #f4f1e6;
  color: #1c1c1c;
  line-height: 1.6;
  margin: 0 !important;
  padding: 0 !important;
}

h1, h2, h3 {
  font-family: 'Cinzel', serif;
}
h1 {
  padding-bottom: 5%;
}
p {
  padding: 10px;
}
.thistle {
  width: 70px;  
  height: auto;
  margin:0;
}

header {
  background-color: #0d1f4f;
  color: #ffffff;
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 4px solid #c9b17c; 
}

header #LogoText {
  font-size: 1.5rem;
  font-weight: bold;
  color: #c9b17c;
}

header nav a {
  margin-left: 20px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

header nav a:hover {
  color: #014421;
}
#navbarNav {
  text-align: center;
}

#navbarNav .navbar-nav {
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.navbar-dark .navbar-toggler-icon {
  filter: none;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba%28255,255,255,1%29' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

.hero {
  text-align: center;
  padding: 100px 20px;
  background: url('../images/scottish-highlands.jpg') no-repeat center/cover;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center; /* vertically centers content */
  align-items: center;
}

.hero::after {
  content: '';
  position: absolute;
  top:0; left:0; width:100%; height:100%;
  background-color: rgba(1,68,33,0.5);
  z-index: 1;
}

.hero * {
  position: relative;
  z-index: 2;
  color: #c9b17c;
}

.hero h1 span {
  color: #c9b17c;
  font-size: 2rem;
}

.hero p {
  color: #ffffff;
  font-size: 1.2rem;
  margin-bottom: 10px !important;
}

.hero .btn {
  background-color: #0d2a2a; 
  color: #c9b17c;
  margin-top: 20px;
  padding: 12px 35px;
  border-radius: 25px;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.2s ease;
  border: 2px solid #c9b17c; 
}

.hero .btn:hover {
  background-color: #c9b17c;
  color: #0d2a2a;
  transform: scale(1.05);
  border: 2px solid #0d2a2a; 
}

section {
  position: relative;
  margin: 0;
  padding: 60px 20px;
  text-align: center;
  overflow: visible;
}

section h2 {
  color: #c9b17c;
  border-bottom: 1px solid #c9b17c;
  display: inline-block;
  padding-bottom: 5px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.about::before,
.projects::before,
.contact::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: repeating-linear-gradient(
    45deg,
    rgba(255,255,255,0.02),
    rgba(255,255,255,0.02) 1px,
    transparent 1px,
    transparent 5px
  );
  z-index: 0;
  pointer-events: none;
}

.about *, .projects *, .contact * {
  position: relative;
  z-index: 1;
}

.about {
  background-color: #0d1f4f;
  color: #f4f1e6;
}

.about .profile {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  margin-top: 20px;
  border: 3px solid #c9b17c;
}

.projects {
  background-color: #014421;
  color: #f4f1e6;

}

.project-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.project-card {
  background-color: #0d2a2a;
  color: #f4f1e6;
  border: 1px solid #c9b17c;
  border-radius: 10px;
  width: 300px;
  max-width: 100%;
  padding: 20px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.4);
}

.project-card h3 {
  color: #c9b17c;
  margin: 10px 0;
}

.project-card p {
  color: #f4f1e6;
  font-size: 0.95rem;
  line-height: 1.5;
}

.project-card img {
  width: 100%;
  height: 200px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease;
  object-fit: cover;
}

.project-card img:hover {
  transform: scale(1.05);
}

#imageModal {
  
   width: 100%;
      max-height: 80vh;
      object-fit: contain;
      
      margin: 0 auto;
      border-radius: 6px;
}

#imageModal .modal-dialog {
  max-width: 900px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  margin: 0;
}

#imageModal .modal-content {
  background-color: #0d2a2a;
  border: 1px solid #c9b17c;
  border-radius: 12px;
}

#imageModal img {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border-radius: 6px;
}

.modal.fade .modal-dialog {
  transform: scale(0.95);
  opacity: 0;
}

.modal.show .modal-dialog {
  transform: scale(1);
  opacity: 1;
}

#imageModal .modal-footer {
  background-color: #0d2a2a;
  border-top: 1px solid #c9b17c;
  justify-content: center;
}

#imageModal .modal-footer .btn-secondary {
  background-color: #c9b17c;
  color: #0d1f4f;
  border: none;
  padding: 10px 25px;
  border-radius: 25px;
  font-weight: bold;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#imageModal .modal-footer .btn-secondary:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.contact {
  background-color: #0d1f4f;
  color: #f4f1e6;
}

.contact form {
  max-width: 500px;
  margin: auto;
  display: flex;
  flex-direction: column;
}

.contact input,
.contact textarea {
  background-color: #0d2a2a;
  color: #f4f1e6;
  border: 1px solid #c9b17c;
  padding: 12px;
  border-radius: 6px;
  margin: 10px 0;
  transition: background 0.3s ease;
}

.contact input:focus,
.contact textarea:focus {
  background-color: #014421;
  outline: none;
}

.contact button {
  background-color: #c9b17c;
  color: #0d1f4f;
  padding: 12px;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact button:hover {
  background-color: #014421; 
  color: #c9b17c;            
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  border: 2px solid #c9b17c; 
}

footer {
  background-color: #014421;
  color: #f4f1e6;
  text-align: center;
  padding: 20px;
  margin-top: 0;
}

@media (max-width: 1024px) {
  .project-card { width: 45%; }
}

@media (max-width: 768px) {
  header { flex-direction: column; align-items: flex-start; }
  header nav { margin-top: 10px; }
  header nav a { margin-left: 0; margin-right: 15px; }

  .hero h1 { font-size: 2.2rem; }
  .hero p { font-size: 1rem; }

  .project-grid { flex-direction: column; align-items: center; }
  .project-card { width: 70%; }

  .contact input,
  .contact textarea,
  .contact button {
    width: 100%;
  }
  
  #navbarNavAltMarkup {
    background-color: #0d1f4f;  
    border-radius: 8px;
    margin-top: 8px;
    padding: 10px 15px;
  }

  #navbarNavAltMarkup .navbar-nav {
    flex-direction: column;     
    align-items: flex-start;    
  }

  #navbarNavAltMarkup .nav-link {
    padding-left: 0;            
    width: 100%;                
    color: #f4f1e6;             
  }

  #navbarNavAltMarkup .nav-link:hover {
    color: #c9b17c;            
  }
}



@media (max-width: 480px) {
  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 0.9rem; }
  header { padding: 10px 15px; }

  .project-card { width: 90%; }
  
  .contact input,
  .contact textarea,
  .contact button {
    width: 100%;
  }
}
