/* Color Variables */
:root {
    --primary-color: #282c34; /* Dark gray */
    --gradient-start: #0d223f; /* Dark blue */
    --secondary-color: #61afef; /* Accent color */
    --text-color: #dcdfe4; /* Light text color */
    --link-color: #61afef; /* Link color */
    --link-hover-color: #98c379; /* Link hover color */
    --name: #1b43e3 /* Name Color */
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, var(--gradient-start), var(--primary-color));
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    text-align: center;
}

.container {
    max-width: 90%; /* Use percentage for better scaling */
    padding: 2rem;
}

h1 {
    font-size: 3rem; /* Using rem for better scalability */
    margin-bottom: 1rem;
}

p {
    font-size: 1.7rem;
    margin-bottom: 1rem;
}

.contact p {
    font-size: 1rem;
}

a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    color: var(--link-hover-color);
}

span.name {
    color: var(--name);
}

/* Email Form Styles */
.email-form {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1rem; /* Use rem for better scalability */
}

.email-form input {
    padding: 1rem;
    font-size: 1rem;
    border: 2px solid var(--secondary-color);
    border-radius: 5px;
    outline: none;
    width: 100%; /* Use percentage for fluid layout */
    max-width: 300px; /* Limit max width */
}

.email-form input:focus {
    border-color: var(--link-hover-color);
    box-shadow: 0 0 0.3rem var(--link-hover-color);
}

.email-form button {
    padding: 1rem 2rem;
    font-size: 1rem;
    background-color: var(--secondary-color);
    color: var(--text-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.email-form button:hover {
    background-color: var(--link-hover-color);
}

/* Response message styling */
#response-message {
    margin-top: 1rem;
    color: var(--link-hover-color);
    font-size: 1rem;
}

/* Email Box Styling */
.email-box {
    background-color: rgba(40, 44, 52, 0.9); /* Slightly transparent dark gray */
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 4px 1rem rgba(0, 0, 0, 0.3);
    margin-top: 2rem;
    max-width: 90%; /* Responsive width */
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    border: 3px solid transparent;
    background-clip: padding-box;
    position: relative;
    z-index: 1;
}

.email-message {
    color: var(--text-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

/* Popup Styling */
.popup {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: rgba(40, 44, 52, 0.9); /* Same as email box */
    color: #fff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 0 0.5rem #00ff00, 0 0 0.75rem #00ff00; /* Toned down neon glow */
    font-size: 0.65rem; /* Smaller text */
    display: none;
    z-index: 9999;
    max-width: 90%; /* Responsive width */
    text-align: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

/* Success Popup */
.popup.success {
    background-color: rgba(40, 44, 52, 0.9);
    box-shadow: 0 0 0.5rem #297528, 0 0 0.75rem #297528;
}

/* Error Popup */
.popup.error {
    background-color: rgba(40, 44, 52, 0.9);
    box-shadow: 0 0 0.5rem #782525, 0 0 0.75rem #782525;
}

/* Media Queries for responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    p {
        font-size: 1.5rem;
    }

    .email-form input {
        width: 100%;
    }

    .email-form button {
        width: 100%;
    }

    .popup {
        bottom: 1rem;
        right: 1rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }

    p {
        font-size: 1.2rem;
    }

    .email-form input {
        width: 100%;
        max-width: none;
    }

    .email-form button {
        width: 100%;
        padding: 0.8rem 1.5rem;
    }

    .popup {
        font-size: 0.75rem;
    }
}
