/* General Styles */
*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --primary-dark: #1a1a2e; /* Deep dark background */
    --primary-dark-rgb: 26, 26, 46; /* RGB values for primary-dark */
    --secondary-dark: #22223b; /* Slightly lighter dark for sections/cards */
    --text-light: #e0e0e0; /* Light gray for general text */
    --text-accent: #00efff; /* Neon accent color */
    --text-muted: #a0a0a0; /* Muted gray for secondary text */
    --border-neon: rgba(0, 239, 255, 0.3); /* Neon border for elements */
    --shadow-neon: 0 0 15px rgba(0, 239, 255, 0.4); /* Neon glow shadow */

    /* New Button Variables */
    --btn-gradient-1: #00efff;
    --btn-gradient-2: #8e44ad;
    --btn-gradient-3: #00ff95;
    --btn-text-color: #1a1a2e; /* Dark text for contrast on bright buttons */
    --btn-hover-bg-opacity: 0.2; /* Opacity for button background on hover */
}

body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    background-color: transparent;
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

#background-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Place behind all content */
    background-color: var(--primary-dark); /* Fallback background */
}

.container {
    max-width: 75rem; /* 1200px */
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.75s ease-out;
}

.preloader.hidden {
    opacity: 0;
    pointer-events: none;
}

.preloader .logo {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-light);
    animation: pulse 2.5s infinite alternate;
}

.preloader .logo .stylized-n, .preloader .logo .stylized-a {
    color: var(--text-accent);
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.05); opacity: 0.8; }
}

/* Header */
header {
    background-color: var(--secondary-dark);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .5rem 3.5rem; /* Keep horizontal padding */
    width: 100%; /* Ensure it takes full width */
}

.logo {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-light);
}

.logo .stylized-n, .logo .stylized-a {
    color: var(--text-accent);
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

nav ul li {
    margin-left: 1rem;
}

nav ul li a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s ease;
    padding: 0.5rem 0.9rem;
    border-radius: 0.3rem;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--text-accent);
}

/* Hamburger Menu */
.hamburger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.6rem;
}

.hamburger-menu .bar {
    width: 1.5rem;
    height: 0.18rem;
    background-color: var(--text-light);
    margin: 0.25rem 0;
    transition: 0.4s;
}

/* Mobile Navigation */
@media (max-width: 48rem) { /* 768px */
    .hamburger-menu {
        display: flex;
    }

    nav .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: rgba(34, 34, 59, 0.9); /* Semi-transparent secondary-dark */
        position: absolute;
        top: 3.75rem; /* Adjust based on header height */
        left: 0;
        padding: 1rem 0;
        transition: all 0.3s ease-in-out;
        transform: translateY(-100%);
        opacity: 0;
    }

    nav .nav-links.active {
        display: flex;
        transform: translateY(0);
        opacity: 1;
    }

    nav .nav-links li {
        margin: 0;
        text-align: center;
        padding: 0.6rem 0;
    }

    nav .nav-links a {
        color: var(--text-light);
        display: block;
    }
}

main {
    padding-top: 4rem; /* Space for fixed header */
}

section {
    padding: 4rem 0;
}

/* Hero Section */
#hero {
    background-color: transparent;
    min-height: 100vh; /* Changed to min-height for responsive content */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0;
}

.hero-content {
    max-width: 55rem;
    padding: 1.5rem;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 8vw, 5rem); /* Responsive font size */
    margin-bottom: 0.6rem;
    color: var(--text-light);
}

.neon-text {
    background: linear-gradient(90deg, #00efff, #8e44ad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent; /* Fallback for browsers that don't support -webkit-text-fill-color */
}

.animated-text {
    font-size: clamp(1.5rem, 4vw, 2.5rem); /* Responsive font size */
    margin-bottom: 1.2rem;
    color: var(--text-accent);
}

.cursor {
    display: inline-block;
    background-color: var(--text-accent);
    margin-left: 0.1rem;
    width: 0.18rem;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}

.hero-content .subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    margin: 1rem 0 2rem;
    color: var(--text-muted);
}

.hero-buttons {
    margin-top: 3rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 0.3rem;
    font-weight: 600;
    margin: 0 0.6rem;
    border: 1px solid var(--text-accent); /* Neon outline */
    cursor: pointer;
    background-color: rgba(var(--primary-dark-rgb), 0.6); /* Semi-transparent background */
    color: var(--text-light); /* Light text color */
    backdrop-filter: blur(5px); /* Glass effect */
    box-shadow: 0 0 10px var(--text-accent); /* Initial neon glow */
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif; /* Modern font */
}

.btn:hover {
    background-color: rgba(var(--primary-dark-rgb), 0.8); /* More opaque on hover */
    box-shadow: 0 0 5px var(--text-accent), 0 0 10px var(--text-accent); /* Stronger glow */
    transform: translateY(-3px); /* Lift effect */
    filter: brightness(1.2); /* Brighter look */
}

.primary-btn {
    background-color: var(--text-accent); /* Solid accent color for primary */
    color: var(--primary-dark); /* Dark text for contrast */
    border: none; /* No border for primary button */
    box-shadow: 0 0 15px var(--text-accent); /*Stronger initial glow*/
}

.primary-btn:hover {
    background-color: var(--text-accent); /* Keep solid on hover */
    box-shadow: 0 0 5px var(--text-accent), 0 0 10px var(--text-accent); /* Even stronger glow */
    transform: translateY(-5px); /* More pronounced lift */
}

.secondary-btn {
    background-color: transparent; /* Transparent background to show canvas */
    color: var(--text-light); /* Light text color */
    border: 1px solid var(--text-accent); /* Neon outline */
    box-shadow: 0 0 10px var(--text-accent); /* Initial neon glow */
}

.secondary-btn:hover {
    background-color: rgba(var(--primary-dark-rgb), 0.8); /* More opaque on hover */
    box-shadow: 0 0 5px var(--text-accent), 0 0 10px var(--text-accent); /* Stronger glow */
    transform: translateY(-3px); /* Lift effect */
    filter: brightness(1.2); 
}

/* Fade In Animation */
.fade-in {
    opacity: 0;
    animation: fadeIn 1s forwards;
}

.fade-in:nth-child(1) { animation-delay: 0.5s; }
.fade-in:nth-child(2) { animation-delay: 1s; }
.fade-in:nth-child(3) { animation-delay: 1.5s; }
.fade-in:nth-child(4) { animation-delay: 2s; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(1.25rem); }
    to { opacity: 1; transform: translateY(0); }
}

h2 {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 4rem;
    background: linear-gradient(90deg, #00efff, #8e44ad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent; /* Fallback */
}

/* ABOUT SECTION STYLING */
.about-full-width-section {
    position: relative;
    padding: 6rem 0;
    overflow: hidden;
    background-color: transparent;
  border-top: 1px solid var(--border-neon);
  border-bottom: 1px solid var(--border-neon);
  color: var(--text-light);
}

.about-background-blobs {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  opacity: 0.2;
  filter: blur(5rem);
  animation: blob-animation 15s infinite ease-in-out alternate;
}

.blob-1 {
  width: 18rem;
  height: 18rem;
  top: 10%;
  left: -5%;
  background: linear-gradient(45deg, #00efff, #8e44ad);
  animation-delay: 0s;
}

.blob-2 {
  width: 25rem;
  height: 25rem;
  bottom: 5%;
  right: -10%;
  background: linear-gradient(45deg, #ff00ff, #ffcc00);
  animation-delay: 5s;
}

.blob-3 {
  width: 15rem;
  height: 15rem;
  top: 40%;
  left: 30%;
  background: linear-gradient(45deg, #00ff00, #00efff);
  animation-delay: 10s;
}

@keyframes blob-animation {
  0% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(1.2rem, -1.8rem) scale(1.1); }
  50% { transform: translate(-0.6rem, 3.1rem) scale(0.9); }
  75% { transform: translate(1.8rem, 0.6rem) scale(1.05); }
  100% { transform: translate(0, 0) scale(1); }
}

.about-content-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
  text-align: center;
  padding: 2rem 0; /* Adjusted padding for consistent horizontal spacing */
    background-color: rgba(34, 34, 59, 0.5); /* More transparent secondary-dark */
    border-radius: 0.5rem;
}

@media (min-width: 992px) {
  .about-content-wrapper {
    flex-direction: row;
    text-align: left;
    justify-content: center;
  }
}

.about-image-container {
  flex-shrink: 0;
  text-align: center;
}

.about-profile-image-fw {
    width: 18rem;
    height: 18rem;
    border-radius: 50%;
    object-fit: cover;
    border: 0.3rem solid var(--border-neon);
    transition: transform 0.3s ease;
}

.about-profile-image-fw:hover {
  transform: scale(1.05);
}

.about-text-content {
  max-width: 600px;
  text-align: center;
}

@media (min-width: 992px) {
  .about-text-content {
    text-align: left;
    margin-left: 3rem;
  }
}

.about-main-heading {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--text-light);
  line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(90deg, #00efff, #8e44ad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent; /* Fallback for browsers that don't support -webkit-text-fill-color */
}

.about-animated-subtitle {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.about-bio-fw {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* Skill Horizontal Scroll */
.skill-scroll-container {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    padding: 2rem 0;
    background-color: transparent;
}

.skill-scroll-wrapper {
    display: inline-block;
    animation: scrollSkills 30s linear infinite;
}

.skill-scroll-container:hover .skill-scroll-wrapper {
    animation-play-state: paused;
}

.skill-icon-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    margin: 0 1.5rem;
    transition: transform 0.3s;
    opacity: 1;
    animation: waveEffect 2s ease-in-out infinite alternate;
}

.skill-icon-item:nth-child(odd) { animation-delay: 0s; }
.skill-icon-item:nth-child(even) { animation-delay: 0.1s; }

.skill-icon-item:hover {
    transform: scale(1.2);
    animation-play-state: paused;
}

.skill-icon-item img {
    width: 5rem;
    height: 5rem;
}

.skill-icon-item p {
    color: var(--text-light);
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

@keyframes waveEffect {
    0% { transform: translateY(0); }
    50% { transform: translateY(-0.6rem); }
    100% { transform: translateY(0); }
}

@keyframes scrollSkills {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-50%); }
}

/* Project Cards */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: rgba(34, 34, 59, 0.8); /* Semi-transparent secondary-dark */
    padding: 2rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-neon);
    transition: transform 0.3s, background-color 0.3s;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-card:hover {
    transform: translateY(-0.5rem) scale(1.03);
    background-color: rgba(34, 34, 59, 0.9); /* Slightly lighter on hover with more transparency */
}

/* Project Card Color Variations - Adjust for dark theme */

.project-card h3 {
    color: var(--text-accent);
    margin-top: 0;
    margin-bottom: 1rem;
}

.project-image {
    width: 100%;
    height: 12.5rem;
    background-color: #33334f;
    margin-bottom: 1rem;
    border-radius: 0.3rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-muted);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-card p {
    font-size: 1rem;
    margin-bottom: 1rem;
    flex-grow: 1;
    color: var(--text-light);
}

.project-card .technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-card .technologies span {
    background-color: #33334f;
    color: var(--text-accent);
    padding: 0.3rem 0.6rem;
    border-radius: 0.3rem;
    font-size: 0.8rem;
    border: 1px solid rgba(0, 239, 255, 0.2);
}

.project-btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    text-decoration: none;
    border-radius: 0.3rem;
    font-weight: 600;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(1.2rem);
    text-align: center;
    background-color: rgba(var(--primary-dark-rgb), 0.6); /* Semi-transparent background */
    color: var(--text-light); /* Light text color */
    border: 1px solid var(--text-accent); /* Neon outline */
    box-shadow: 0 0 10px var(--text-accent); /* Initial neon glow */
}

.project-btn:hover {
    background-color: rgba(var(--primary-dark-rgb), 0.8); /* More opaque on hover */
    box-shadow: 0 0 5px var(--text-accent), 0 0 10px var(--text-accent); /* Stronger glow */
    transform: translateY(-3px); /* Lift effect */
    filter: brightness(1.2); /* Brighter look */
}

.project-card:hover .project-btn {
    opacity: 1;
    transform: translateY(0);
}

/* Blog Section */
#blog {
    background-color: transparent;
    padding: 6rem 0;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    gap: 2rem;
}

.blog-card {
    background-color: rgba(26, 26, 46, 0.5); /* More transparent primary-dark */
    padding: 2rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-neon);
    transition: transform 0.3s, box-shadow 0.3s;
}

.blog-card:hover {
    transform: translateY(-0.5rem);
}

.blog-card h3 {
    color: var(--text-accent);
    margin-bottom: 0.5rem;
}

.blog-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.blog-card .blog-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 0.3rem;
    font-weight: 600;
    transition: all 0.3s ease;
    background-color: rgba(var(--primary-dark-rgb), 0.6); /* Semi-transparent background */
    color: var(--text-light); /* Light text color */
    border: 1px solid var(--text-accent); /* Neon outline */
    box-shadow: 0 0 10px var(--text-accent); /* Initial neon glow */
}

.blog-card .blog-btn:hover {
    background-color: rgba(var(--primary-dark-rgb), 0.8); /* More opaque on hover */
    box-shadow: 0 0 5px var(--text-accent), 0 0 10px var(--text-accent); /* Stronger glow */
    transform: translateY(-3px); /* Lift effect */
    filter: brightness(1.2); /* Brighter look */
}

/* Testimonials Section */
#testimonials {
    background-color: transparent;
    padding: 4rem 0;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background-color: rgba(34, 34, 59, 0.8); /* Semi-transparent secondary-dark */
    padding: 2rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-neon);
    transition: transform 0.3s, box-shadow 0.3s;
}

.testimonial-card:hover {
    transform: translateY(-0.5rem);
}

.testimonial-card p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.testimonial-card .client-info {
    text-align: right;
}

.testimonial-card .client-info h4 {
    color: var(--text-accent);
    margin-bottom: 0.2rem;
}

.testimonial-card .client-info span {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Contact Section */
#contact .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    width: 100%;
    max-width: 62rem;
    margin-top: 2rem;
}

@media (min-width: 48rem) {
    .contact-grid {
        grid-template-columns: 1fr 1.5fr;
        text-align: left;
    }
}

.contact-info {
    background-color: transparent;
    padding: 2.5rem;
    border-radius: 0.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    border: 1px solid var(--border-neon);
}

.contact-info h3 {
    font-size: 1.8rem;
    color: var(--text-accent);
    margin-bottom: 1.5rem;
}

.contact-info p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: var(--text-light);
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--text-light);
}

.info-item img {
    width: 1.5rem;
    height: 1.5rem;
    margin-right: 0.9rem;
    filter: invert(70%) sepia(100%) saturate(2000%) hue-rotate(180deg) brightness(100%) contrast(100%); /* Adjust icon color for dark theme */
}

.info-item span {
    font-weight: 500;
}

.social-links {
    margin-top: 2rem;
    display: flex;
    gap: 1.2rem;
}

.social-links a img {
    width: 2.1rem;
    height: 2.1rem;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: invert(70%) sepia(100%) saturate(2000%) hue-rotate(180deg) brightness(100%) contrast(100%); /* Initial icon color */
}

.social-links a img:hover {
    transform: translateY(-0.3rem);
    filter: invert(70%) sepia(100%) saturate(2000%) hue-rotate(180deg) brightness(100%) contrast(100%);
}

#contact-form {
    width: 100%;
    background-color: rgba(34, 34, 59, 0.8); /* Semi-transparent secondary-dark */
    padding: 2.5rem;
    border-radius: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    border: 1px solid var(--border-neon);
}

.form-group {
    position: relative;
    overflow: hidden;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.9rem;
    border: 1px solid var(--border-neon);
    border-radius: 0.5rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    background-color: var(--primary-dark);
    color: var(--text-light);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--text-accent);
    outline: none;
    background-color: #2a2a40;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}



.form-group textarea {
    resize: vertical;
    min-height: 7.5rem;
}

#contact-form .btn {
    width: auto;
    padding: 0.9rem 2.5rem;
    font-size: 1.1rem;
    cursor: pointer;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease; /* Smooth transitions */
    align-self: flex-start;
    border: 1px solid var(--text-accent); /* Neon outline */
    background-color: rgba(var(--primary-dark-rgb), 0.6); /* Semi-transparent background */
    color: var(--text-light); /* Light text color */
    backdrop-filter: blur(5px); /* Glass effect */
    box-shadow: 0 0 10px var(--text-accent); /* Initial neon glow */
}

#contact-form .btn:hover {
    background-color: rgba(var(--primary-dark-rgb), 0.8); /* More opaque on hover */
    box-shadow: 0 0 5px var(--text-accent), 0 0 10px var(--text-accent); /* Stronger glow */
    transform: translateY(-3px); /* Lift effect */
    filter: brightness(1.2); /* Brighter look */
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    background-color: transparent;
    color: var(--text-muted);
    border-top: 1px solid var(--border-neon);
}

/* Responsive Design for Hero Section */

/* Extra Large Displays (Default styles, already set) */
/* h1: clamp(2.5rem, 8vw, 5rem); */
/* .animated-text: clamp(1.5rem, 4vw, 2.5rem); */

/* Laptop Displays (max-width: 1024px / 64rem) */
@media (max-width: 78rem) {
    #hero {
        min-height: 80vh; /* Slightly less height */
        padding: 2rem 0;
    }

    .hero-content {
        padding: 1rem;
    }

    .hero-content h1 {
        font-size: clamp(2.2rem, 7vw, 4.5rem);
    }

    .animated-text {
        font-size: clamp(1.3rem, 3.5vw, 2.2rem);
    }
}

/* Laptop Displays (min-width: 1025px and max-width: 1440px) */
@media (min-width: 64.063rem) and (max-width: 90rem) {
    #hero {
        min-height: 80vh; /* Further reduced height for laptops */
        padding: 3rem 0;
    }

    .hero-content h1 {
        font-size: clamp(2rem, 5vw, 3.5rem);
    }

    .animated-text {
        font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    }
}

/* Tablet Displays (max-width: 768px / 48rem) */
@media (max-width: 48rem) {
    #hero {
        min-height: 70vh; /* Further reduced height */
        padding: 1.5rem 0;
    }

    .hero-content {
        padding: 0.8rem;
    }

    .hero-content h1 {
        font-size: clamp(1.8rem, 6vw, 3.5rem);
    }

    .animated-text {
        font-size: clamp(1rem, 3vw, 1.8rem);
    }

    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .project-card {
        padding: 0.9rem;
    }

    .contact-info, #contact-form {
        padding: 1.5rem;
    }
}

/* Mobile Displays (max-width: 480px / 30rem) */
@media (max-width: 30rem) {
    #hero {
        min-height: 60vh; /* Even more reduced height for mobile */
        padding: 1rem 0;
    }

    .hero-content {
        padding: 0.5rem;
    }

    .hero-content h1 {
        font-size: clamp(1.5rem, 5vw, 2.5rem);
    }

    .animated-text {
        font-size: clamp(0.9rem, 2.5vw, 1.5rem);
    }

    .hero-buttons {
        flex-direction: column;
        gap: 0.8rem;
    }

    .btn {
        width: 80%; /* Make buttons take more width */
        margin: 0 auto; /* Center buttons */
    }
}

/* Scroll Reveal Animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(3.1rem);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.scroll-reveal.left {
    transform: translateX(-3.1rem);
}

.scroll-reveal.right {
    transform: translateX(3.1rem);
}

.scroll-reveal.left.active {
    transform: translateX(0);
}

.scroll-reveal.right.active {
    transform: translateX(0);
}

/* Hamburger Menu Toggle */
.hamburger-menu.active .bar:nth-child(1) {
    transform: translateY(0.43rem) rotate(45deg);
}

.hamburger-menu.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .bar:nth-child(3) {
    transform: translateY(-0.43rem) rotate(-45deg);
}

/* Scroll to Top Button */
.scroll-to-top-btn {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background-color: rgba(var(--primary-dark-rgb), 0.8);
    color: var(--text-accent);
    border: 1px solid var(--border-neon);
    border-radius: 50%;
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(1.5rem); /* Start slightly below */
    transition: opacity 0.5s ease, visibility 0.5s ease, transform 0.5s ease;
    z-index: 999;
    box-shadow: 0 0 10px var(--text-accent);
}

.scroll-to-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0); /* Slide up to original position */
}

.scroll-to-top-btn:hover {
    transform: translateY(-0.3rem);
    box-shadow: 0 0 15px var(--text-accent);
}

.scroll-to-top-btn svg {
    width: 1.5rem;
    height: 1.5rem;
    fill: currentColor;
}