html {
  background-color: #1c1c1e;
}

html, body {
  background-color: #1c1c1e;
  overscroll-behavior: none;
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  background-color: #1c1c1e; /* Charcoal gray */
  color: #f5f5f5;            /* Soft white */
  line-height: 1.6;
}

@media (max-width: 600px) {
  main {
    min-height: 100vh;
    background-color: #2a2a2d;
  }

  body {
    background-color: #1c1c1e;
  }
}

header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1rem 2rem;
  background-color: #000 !important;
  position: relative;
  overflow: visable;	/* changed to visable to allow menu-toggle to show */
  margin-bottom: 2rem;
}

.header-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
}

.site-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

@media (max-width: 600px) {
  header {
    padding-bottom: 1rem;
  }
}

/* H1 styling fix */
.site-title h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 1rem 0; /* Added bottom margin for spacing */
  text-align: left;   /* Changed from center to left */
  color: #FFAE03;
}

/* Nav layout */
.nav-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  margin-top: 1rem;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.nav-container ul {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin: 0;
  padding: 0;
}

.menu-toggle {
   position: relative;
   color: white;
   font-size: 1.5rem;
   background: none;
   border: none;
   z-index: 10;
}

/* Hide nav by default */
.menu-toggle .nav-container {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #1c1c1e;
  padding: 1rem;
  border-radius: 5px;
  min-width: 150px;
  z-index: 100;

  /* Animation setup */
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.4s ease-out, transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  visibility: hidden;
}

.menu-toggle .nav-container ul li {
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

/* When menu is open, animate each item with delay */
.menu-toggle.open .nav-container ul li:nth-child(1) {
  transition-delay: 0.1s;
  opacity: 1;
  transform: translateX(0);
}

.menu-toggle.open .nav-container ul li:nth-child(2) {
  transition-delay: 0.3s;
  opacity: 1;
  transform: translateX(0);
}

.menu-toggle.open .nav-container ul li:nth-child(3) {
  transition-delay: 0.5s;
  opacity: 1;
  transform: translateX(0);
}

.menu-toggle.open .nav-container ul li:nth-child(4) {
  transition-delay: 0.7s;
  opacity: 1;
  transform: translateX(0);
}

.menu-toggle.open .nav-container ul li:nth-child(5) {
  transition-delay: 0.9s;
  opacity: 1;
  transform: translateX(0);
}


.menu-toggle.open .nav-container {
  opacity: 1;
  transform: translateX(0);
  visibility: visible;
}

/* Nav styling */
.nav-container ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 600px) {
  .nav-container ul {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background-color: #1c1c1e;
  }
}

@media (min-width: 601px) {
  .nav-container ul {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

.nav-container a {
  color: white;
  text-decoration: none;
}

@media (max-width: 600px) {
  nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    background-color: #1c1c1e;
  }
}

nav a {
  text-decoration: none;
  font-weight: 600;
}

nav ul li {
  display: inline-flex;
  align-items: center;
}

nav ul li a {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  border-radius: 4px;
  background-color: transparent;
  border: 1px solid #FFAE03;
  text-decoration: none;
  color: #ffffff;
  font-weight: 600;
}

nav ul li a:hover {
  background-color: #FFAE03;
  color: #000;
}

/* styling for code snippet effect with animation in header */
.code-overlay {
  position: absolute;
  top: 0;
  right: 0;
  width: 40%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.typewriter-wrapper {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  animation: typing 4s steps(60, end) forwards;
}

.code-overlay pre,
.code-overlay code {
  font-family: 'Courier New', monospace;
  color: rgba(255, 255, 255, 0.5); /* bump this up to test visibility */
  margin: 0;
}

.cursor {
  display: inline-block;
  font-family: 'Courier New', monospace;
  color: rgba(255, 255, 255, 0.5);
  animation: blink 1s step-end infinite;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

@media screen and (max-width: 768px) {
  .code-overlay {
    top: auto;
    bottom: 10px;
    right: 10px;
    width: 100%;
    height: auto;
    text-align: right;
    z-index: 1;
  }

  .typewriter-wrapper {
    width: 100%;
  }
}
/* End of Code snippet */

a {
  color: #FFAE03;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

/* adds amnimation to arrow on projects.html */
.arrow-link::after {
  content: "→";
  display: inline-block;
  transition: transform 0.9s ease;
  width: 1em;
  height: 1em;
  text-align: center;
}

.arrow-link:hover::after {
  transform: rotate(180deg);
}

/* adds amnimation to reload on projects.html */
.reload::after {
  content: "↻";
  display: inline-block;
  transition: transform 0.9s ease;
}

.reload:hover::after {
  transform: rotate(360deg);
}

/* adds animation to home icon on error.html & thank-you.htm */
.emoji {
  display: inline-block;
}

.home-link:hover .emoji {
  animation: wiggle 0.4s ease-in-out infinite;
}

@keyframes wiggle {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}

/* animation for wave on index.html */
.wave {
  display: inline-block;
}

.animate {
  animation: wave 1.2s ease-in-out infinite;
  transform-origin: 70% 70%;
}

@keyframes wave {
  0% { transform: rotate(0deg); }
  20% { transform: rotate(20deg); }
  40% { transform: rotate(-10deg); }
  60% { transform: rotate(20deg); }
  80% { transform: rotate(-10deg); }
  100% { transform: rotate(0deg); }
}
/* animation for email in contact.html */
.e-mail {
  font-size: 2rem; /* or try 3rem, 4rem, etc. */
  display: inline-block;
}

.pulse {
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.6; }
}

.animate,
.pulse,
.emoji {
  will-change: transform;
}

/* End of Animation */

/* font hover index.html "Explore my work" */
a:hover {
  color: #FFF;
}

section {
  background-color: #2a2a2d; /* Slightly lighter for contrast */
  border-radius: 8px;
  padding: 2rem;
  margin: 2rem auto;
  max-width: 800px;
}

#hero {
  padding: 6rem 2rem;
  text-align: center;
  margin-top: 0;
}

#hero h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

#hero p {
  font-size: 1.0rem;
  margin-bottom: 1rem;
}

.cta-button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: #FFAE03;
  color: #2a2a2d;
  font-weight: 600;
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.cta-button:hover {
  background-color: #e67f0d;
}

footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.9rem;
  color: #FFAE03;
  background-color: #1c1c1e;
}

.project-detail {
  padding: 2rem;
  max-width: 800px;
  margin: auto;
  background-color: #2a2a2d;
  border-radius: 8px;
}

.project-detail a {
  color: #FFAE03;
  text-decoration: underline;
  font-weight: 600;
}

.project-card {
  background-color: #2a2a2d;
  padding: 1rem;
  margin-top: 1rem;
  border-radius: 8px;
}

button {
  padding: 0.75rem;
  background-color: #e67f0d;
  color: #fff;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

button:hover {
  background-color: #FFAE03;
  color: #2a2a2d;
}

/* password-gen.html */

.screenshot {
  margin-top: 2rem;
  text-align: center;
}

.screenshot img {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  margin-top: 1rem;
}

/* contact form */

input, textarea {
  padding: 0.75rem;
  border: 1px solid #FFAE03; /* Always visible border */
  border-radius: 4px;
  background-color: #2a2a2d;
  color: #fff;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

input:focus, textarea:focus {
  border-color: #FFAE03; /* Highlight on focus */
  outline: none;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

/* Buy Me a Coffee button */

nav ul li.coffee a {
  display: inline-flex;
  align-items: center;
  justify-content: center; 
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  border: 1px solid #FFAE03;
  background-color: transparent;
  color: #ffffff;
  flex-shrink: 0;
}

nav ul li.coffee {
  flex-shrink: 0;
}

nav ul li.coffee a:hover {
  background-color: #FFAE03;
  color: #000;
}

/* Default: show full text, hide emoji */
.coffee-label {
  display: inline;
}

.coffee-emoji {
  display: none;
  font-size: 1.2rem;
}

/* On mobile: hide text, show emoji */
@media (max-width: 600px) {
  .coffee-label {
    display: none !important;
  }

  .coffee-emoji {
    display: inline !important;
  }
}

@media (max-width: 600px) {
  nav ul li.coffee a {
    width: 100%;
    justify-content: flex-start;
  }
}