/* ===================================
   Global Reset & Typography
=================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Merriweather', sans-serif;
  background-color: #fefefe;
  color: #111;
  line-height: 1.6;
  overflow-x: hidden;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===================================
   Navbar
=================================== */
nav {
  width: 100vw;
  height: 3rem;
  background-color: #111;
  color: #fff;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 0.5rem 2rem;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  font-size: 1rem;
}

nav .logo {
  font-weight: bold;
  font-size: 1.25rem;
  margin-right: auto;
}

nav ul {
  font-family: 'Roboto', sans-serif;
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

nav ul li {
  position: relative;
}

nav ul li a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  padding: 0.25rem 0;
  transition: color 0.3s ease, border-bottom 0.3s ease;
}

nav ul li a:hover {
  color: #f0c040;
}

/* Dropdown Menu */
nav ul li .dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #222;
  flex-direction: column;
  min-width: 10rem;
  border-radius: 0.25rem;
  padding: 0.5rem 0;
  z-index: 999;
}

nav ul li:hover .dropdown-content {
  display: flex;
}

nav ul li .dropdown-content a {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

nav ul li .dropdown-content a:hover {
  background-color: #f0c040;
  color: #111;
}

/* Main content offset */
.main-content {
  padding: 2rem;
}

/* ===================================
   Homepage Name (Kimani Griffin)
=================================== */
.stardos-stencil-regular {
  font-family: "Stardos Stencil", system-ui;
  font-weight: 400;
  font-style: normal;
}

/* ===================================
   Hero Section (Homepage)
=================================== */
.hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: url('../img/bg.png') center/cover repeat;
}

.hero h1 {
  font-size: 3rem;
}

.hero p {
  font-size: 1.25rem;
  max-width: 700px;
}

/* Hero Tagline */
.hero h2.tagline {
  font-size: .9rem;
  margin-bottom: 2rem;
  font-weight: 300;
  color: #333;
  font-style: italic;
}

/* Hero Buttons Group */
.hero-buttons {
  margin: .5rem 0;
}

.hero .btn {
  margin-right: 1rem;
}

/* Light Button Style */
.btn-light {
  background: #fff;
  color: #111;
  border: 1px solid #111;
}

/* Social Icons */
.social-icons {
  display: flex;
  gap: 1.5rem;
  font-size: 1.25rem;
  margin-top: 1rem;
}

.social-icons a {
  color: #111;
  transition: color 0.3s ease;
}

.social-icons a:hover img {
  filter: brightness(0) saturate(100%) invert(77%) sepia(58%) saturate(441%) hue-rotate(5deg) brightness(95%) contrast(91%);
  color: #f0c040;
}

.social-icons img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

/* Sections (About, Contact) */
.section {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

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

/* ===================================
   Portfolio Grid
=================================== */
.portfolio-grid {
  padding-top: 3rem;
  ;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 2rem;
}

.portfolio-item img {
  pointer-events: auto;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
  display: block;
  transition: transform 0.3s ease;
}

.portfolio-item:hover img {
  transform: scale(1.10);
}

.lazyload {
  filter: blur(20px);
  transition: filter 0.5s;
}

.lazyloaded {
  filter: blur(0);
}

/* ===================================
   Lightbox & Download Protection
=================================== */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 0.5rem;
  transition: transform 0.5s ease;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  font-weight: bold;
}

.lightbox-content {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  width: 100vw;
  height: 100%;
  opacity: 1;
  transition: opacity 0.4s;
}

.lightbox.scrollable {
  overflow: auto;
  justify-content: flex-start;
  align-items: flex-start;
}

.lightbox.scrollable img {
  cursor: grab;
  transform: scale(2);
  transition: transform 0.3s ease;
}

html.lightbox-enabled {
  overflow: hidden;
}

.disable-download img {
  pointer-events: none;
}

@keyframes rotate-forever {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.lightbox-spinner {
  animation: rotate-forever 0.7s linear infinite;
  height: 30px;
  width: 30px;
  border: 4px solid #fff;
  border-right-color: transparent;
  border-radius: 50%;
  display: inline-block;
  opacity: 0.7;
}

.link-transition a,
.project-cover .title,
.project-cover .fields,
.project-cover .custom,
.project-cover .description,
.project-cover .date {
  transition: color 0.2s ease, background 0.2s ease;
}

html.lightbox-enabled,
html.lightbox-enabled body {
  overflow: hidden;
}

html.lightbox-zoomed .lightbox-content {
  cursor: zoom-out;
  overflow: auto;
}

.lightbox-link,
.lightbox-content.zoomable {
  cursor: zoom-in;
}


#lightbox-wrap .lightbox-contents {
  user-select: none;
}

.lightbox-content {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  width: 100vw;
  height: 100%;
  opacity: 1;
  transition: opacity 0.4s;
}

/* Fade animations */
@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fade-out {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

.transition-enabled {
  opacity: 0;
}

.transition-in {
  animation: fade-in 0.25s ease-in forwards;
}

.transition-out {
  animation: fade-out 0.25s ease-out forwards;
}

/* ===================================
   Contact form
=================================== */
.contact-section {
  max-width: 600px;
  margin: 2rem auto 3rem auto;
  padding: 2.5rem 2rem;
  background: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.contact-section h2 {
  font-size: 2.25rem;
  text-align: center;
  margin-bottom: 1rem;
}

.contact-intro {
  text-align: center;
  font-size: 1rem;
  margin-bottom: 2rem;
  color: #555;
  line-height: 1.5;
}

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

.form-group {
  display: flex;
  flex-direction: column;
}

.contact-form label {
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #111;
}

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

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #f0c040;
  box-shadow: 0 0 0 2px rgba(240, 192, 64, 0.2);
}

.contact-form button.portfolio-button {
  padding: 0.85rem 1.5rem;
  font-size: 1.05rem;
  background: #111;
  color: #fff;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
  border: none;
}

.contact-form button.portfolio-button:hover {
  background: #f0c040;
  color: #111;
}

.direct-email {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.95rem;
  color: #555;
}

.direct-email a {
  color: #111;
  font-weight: 500;
  transition: color 0.3s ease;
}

.direct-email a:hover {
  color: #f0c040;
}

#thankYouModal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}

#thankYouModal .modal-content {
  background: #fff;
  color: #333;
  padding: 2rem 3rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  animation: scaleUp 0.4s ease;
  max-width: 90%;
  width: 400px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleUp {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ===================================
   Buttons & Links
=================================== */
button,
.btn {
  background: #111;
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

button:hover,
.btn:hover {
  background: #f0c040;
  color: #111;
}

/* ===================================
   Footer
=================================== */
footer {
  background: #111;
  color: #fff;
  text-align: center;
  padding: .5rem .5rem;
}

/* ===================================
   Responsive
=================================== */
@media (max-width: 1000px) {

  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  nav ul {
    gap: 1rem;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero p {
    font-size: 1rem;
    padding: 0 1rem;
  }

  .contact-section {
    margin: 4rem 1rem 2rem 1rem;
    padding: 1.5rem 1rem;
  }
}