body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #000000 0%, #111111 100%);
    background-attachment: fixed;
    color: #ffffff;
    line-height: 1.6;
    font-size: 16px;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 20% 20%, rgba(46, 164, 97, 0.1) 0%, transparent 50%),
                      radial-gradient(circle at 80% 80%, rgba(46, 164, 97, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

header {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #2ea461 0%, #248a52 100%);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.05);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    z-index: 1;
}

header > * {
    position: relative;
    z-index: 2;
}

header h1 {
    margin: 0 0 0.5rem 0;
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

header p {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    margin-top: 0.5rem;
    font-weight: 400;
    opacity: 0.95;
    letter-spacing: 0.02em;
}

#about p {
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.7;
    max-width: 800px;
    margin: 0 auto 2rem auto;
    color: #e0e0e0;
}

/* Unified, button-styled navigation bar */
nav {
    text-align: center;
    margin: 1.5rem 0;
}

nav a {
    display: inline-block;
    background: #2ea461;
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    margin: 0 0.5rem;
    font-weight: 700;
    transition: background 0.3s;
}

nav a:hover {
    background: #248a4f;
}

/* Ensure the nav container is positioned relatively for absolute positioning of its child */
nav {
  position: relative;
}

/* Style for the blog button */
nav a.btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #2ea461;
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 700;
  transition: background 0.3s;
}

nav a.btn:hover {
  background-color: #333333;
}

section {
    padding: 3rem 2rem;
    max-width: 1000px;
    margin: auto;
}

section h2 {
    border-bottom: 2px solid #2ea461;
    padding-bottom: 0.8rem;
    margin-bottom: 2rem;
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #ffffff;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    header {
        padding: 2rem 1rem;
    }
    
    section {
        padding: 2rem 1rem;
    }
    
    .card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .button {
        --fs-size: 1.5rem;
        letter-spacing: 1px;
    }
    
    #contact {
        padding: 2rem 1rem;
        margin: 1rem;
    }
    
    #contact a {
        display: block;
        margin: 0.5rem auto;
        max-width: 250px;
    }
}

@media screen and (max-width: 480px) {
    header h1 {
        font-size: 2rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    .card {
        padding: 1rem;
        width: 95%;
    }
    
    .button {
        --fs-size: 1.2rem;
    }
    
    section h2 {
        font-size: 1.8rem;
    }
}

.projects {
    display: flex;
    flex-direction: column;  /* Stack cards vertically */
    align-items: center;     /* Center the cards horizontally */
    width: 100%;             /* Make sure the container takes the full width */
}

/* Card style: adjust based on your preference */
.card {
    background: linear-gradient(145deg, #1a1a1a 0%, #2a2a2a 100%);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(46, 164, 97, 0.1);
    width: 90%;
    max-width: 900px;
    margin: 0 auto 2rem auto;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(46, 164, 97, 0.2);
    border-color: rgba(46, 164, 97, 0.3);
}

.card h3 {
    color: #2ea461;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
}

.card img {
    max-width: 100%;
    border-radius: 8px;
}

.left-align {
    text-align: left;
}

#contact {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #111111 0%, #1a1a1a 100%);
    border-radius: 16px;
    margin: 2rem auto;
    max-width: 800px;
    border: 1px solid rgba(46, 164, 97, 0.2);
}

#contact h2 {
    color: #2ea461;
    margin-bottom: 1.5rem;
}

#contact p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: #e0e0e0;
}

#contact a {
    display: inline-block;
    margin: 0.5rem 1rem;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, #2ea461 0%, #248a52 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

#contact a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 164, 97, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
    background: linear-gradient(135deg, #000000 0%, #111111 100%);
    border-top: 1px solid rgba(46, 164, 97, 0.3);
}

footer p {
    margin: 0;
    color: #999999;
    font-size: 0.9rem;
}

footer a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
}

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

a {
    color: #2ea461;
    transition: color 0.3s ease;
}

a:hover {
    color: #37FF8B;
}

/* Generic button style for both <button> and <a class="btn"> */
.btn {
  display: inline-block;
  background: #2ea461;
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  margin: 0.3rem;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.3s;
}

.btn:hover {
  background: #248a4f;
}

/* Custom Navigation Buttons */
.nav-button {
    display: inline-block;
    padding: 1rem 2rem;
    margin: 0.5rem;
    background: linear-gradient(135deg, #2ea461 0%, #248a52 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    box-shadow: 0 4px 16px rgba(46, 164, 97, 0.3);
}

.nav-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.nav-button:hover::before {
    left: 100%;
}

.nav-button:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 32px rgba(46, 164, 97, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, #37FF8B 0%, #2ea461 100%);
}

.nav-button:active {
    transform: translateY(-2px) scale(1.02);
    transition: all 0.1s ease;
}

/* Hovering Left Navigation Tab */
.nav-tab {
  position: fixed;
  top: 50%;
  left: -250px;
  transform: translateY(-50%);
  width: 280px;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  border: 1px solid rgba(46, 164, 97, 0.3);
  border-left: none;
  border-radius: 0 12px 12px 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

.nav-tab:hover {
  left: 0;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
  border-color: rgba(46, 164, 97, 0.5);
}

.nav-tab-trigger {
  position: absolute;
  right: -30px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 80px;
  background: linear-gradient(135deg, #2ea461 0%, #248a52 100%);
  border: 1px solid rgba(46, 164, 97, 0.3);
  border-left: none;
  border-radius: 0 8px 8px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-tab:hover .nav-tab-trigger {
  background: linear-gradient(135deg, #37FF8B 0%, #2ea461 100%);
  border-color: rgba(46, 164, 97, 0.7);
}

.nav-tab-trigger::before {
  content: '▶';
  color: white;
  font-size: 0.8rem;
  transform: rotate(90deg);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.nav-tab-content {
  padding: 1.5rem;
  color: white;
}

.nav-tab-header {
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(46, 164, 97, 0.3);
}

.nav-tab-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2ea461;
  margin: 0;
  letter-spacing: 0.02em;
}

.nav-tab-location {
  font-size: 0.9rem;
  color: #cccccc;
  margin: 0.3rem 0 0 0;
  font-style: italic;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 0.8rem 1rem;
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 0.95rem;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(46, 164, 97, 0.1), transparent);
  transition: left 0.3s ease;
}

.nav-link:hover::before {
  left: 100%;
}

.nav-link:hover {
  background: rgba(46, 164, 97, 0.15);
  border-color: rgba(46, 164, 97, 0.3);
  transform: translateX(5px);
}

.nav-link.active {
  background: linear-gradient(135deg, #2ea461 0%, #248a52 100%);
  border-color: rgba(46, 164, 97, 0.5);
  box-shadow: 0 2px 8px rgba(46, 164, 97, 0.3);
}

.nav-link.active:hover {
  background: linear-gradient(135deg, #37FF8B 0%, #2ea461 100%);
  transform: translateX(3px);
}

.nav-link-icon {
  margin-right: 0.8rem;
  font-size: 1rem;
  opacity: 0.8;
}

.nav-link-text {
  flex: 1;
}

.nav-link-arrow {
  font-size: 0.7rem;
  opacity: 0.6;
  transition: all 0.3s ease;
}

.nav-link:hover .nav-link-arrow {
  opacity: 1;
  transform: translateX(3px);
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
  .nav-tab {
    left: -240px;
    width: 260px;
  }
  
  .nav-tab-trigger {
    right: -25px;
    width: 25px;
    height: 70px;
  }
  
  .nav-tab-content {
    padding: 1rem;
  }
  
  .nav-link {
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
  }
}
