/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Font Face Declarations */
@font-face {
    font-family: 'Lato';
    src: url('../fonts/Lato/Lato-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Lato';
    src: url('../fonts/Lato/Lato-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Lato';
    src: url('../fonts/Lato/Lato-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

body {
    font-family: 'Lato', 'Arial', sans-serif;
    background-color: #000;
    color: #fff;
    line-height: 1.6;
    min-height: 100vh;
}

/* Navigation */
.nav {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1000;
    padding: 2rem;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 300;
    transition: opacity 0.3s ease;
}

.nav-link:hover {
    opacity: 0.7;
}

/* Main content */
.contact-main {
    padding: 6rem 2rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.contact-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 300;
    text-align: center;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, #fff, #ccc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Contact Form */
.contact-form-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 3rem;
    margin-top: 1rem;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 300;
    color: #ccc;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.submit-button {
    width: 100%;
    padding: 1.2rem;
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-button:hover {
    background: #fff;
    color: #000;
}

.submit-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Contact Information */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 1.5rem 0;
    /* Reduced from 2rem */
    margin-top: 1rem;
    /* Reduced spacing */
}

.contact-item {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-item h3 {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
    color: #fff;
}

.contact-link {
    display: block;
    color: #ccc;
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: #fff;
}

.contact-item p {
    color: #aaa;
    font-size: 0.9rem;
}

/* Success/Error Messages */
.message {
    padding: 0.5rem 0.75rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
    text-align: center;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.message.show {
    opacity: 1;
    transform: translateY(0);
}

.message.success {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid rgba(0, 255, 0, 0.3);
    color: #90EE90;
}

.message.error {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    color: #FFB6C1;
}

.message-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    margin-left: 0.75rem;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message-close:hover {
    opacity: 1;
}

.message-close:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
    border-radius: 3px;
}

/* Form Validation Styles */
.form-group {
    margin-bottom: 1rem;
    position: relative;
}

.form-group.error input,
.form-group.error textarea {
    border-color: rgba(255, 0, 0, 0.5);
    background: rgba(255, 0, 0, 0.1);
}

.form-group .error-message {
    color: #FFB6C1;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: block;
    height: 1.2rem;
    line-height: 1.2rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.form-group.error .error-message {
    opacity: 1;
}

.form-group .error-message:empty {
    opacity: 0;
}

/* Message Container Styles */
.message-container {
    height: 3rem;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.linkedin-icon {
    width: 32px;
}

/* Responsive design */
@media (max-width: 768px) {
    .contact-main {
        padding: 4rem 1rem 2rem;
    }

    .contact-title {
        margin-bottom: 1rem;
        /* Further reduced for mobile */
    }

    .contact-form-section {
        padding: 2rem 1.5rem;
        margin-top: 0.5rem;
        /* Minimal spacing on mobile */
    }

    .contact-info {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1rem 0;
        margin-top: 0.5rem;
    }

    .contact-item {
        padding: 1.5rem;
    }

    .form-group {
        margin-bottom: 0.75rem;
        /* Further reduced for mobile */
    }

    .message-container {
        height: 1rem;
        margin-bottom: 0.5rem;
    }

    .message {
        padding: 0.5rem;
        border-radius: 4px;
        width: 100%;
        margin: 0;
    }

    /* Mobile background optimizations */
    body {
        background-attachment: fixed;
        background-size: cover;
    }
}

@media (max-width: 480px) {
    .nav {
        padding: 1rem;
    }

    .contact-main {
        padding: 3.5rem 0.75rem 1.5rem;
        /* Reduced padding for very small screens */
    }

    .contact-title {
        font-size: clamp(2rem, 8vw, 2.5rem);
        /* Adjusted for very small screens */
        margin-bottom: 0;
    }

    .contact-form-section {
        padding: 1.5rem 1rem;
        margin-top: 0.25rem;
    }

    .contact-info {
        gap: 1rem;
        padding: 0.75rem 0;
        margin-top: 0.25rem;
    }

    .contact-item {
        padding: 1.25rem;
    }

    .form-group {
        margin-bottom: 0.75rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 0.625rem;
        /* Further reduced padding for mobile */
    }

    .submit-button {
        padding: 1rem;
        /* Reduced padding */
    }

    /* Very small screen optimizations */
    .contact-container {
        gap: 0.75rem;
    }

    .contact-form {
        max-width: 100%;
    }
}