/* Universal Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Root Variables for Colors and Gradients */
:root {
    --primary: #4a4aff;
    --secondary: #3399cc;
    --accent: #e0b054;
    --dark: #0d1117;
    --light: #f0f0f0;
    --gray: #a0a0a0;
    --gradient-start: #1a1e2c;
    --gradient-middle: #334d6e;
    --gradient-end: #1c2a43;
    --card-bg-gradient-start: #171b26;
    --card-bg-gradient-end: #222935;
    --border-color: #2c3e50;
}

/* Body Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--light);
    overflow-x: hidden;
    background-color: var(--dark);
    background: linear-gradient(180deg, var(--dark) 0%, var(--gradient-start) 50%, var(--dark) 100%);
    background-attachment: fixed;
}

/* Header Styles */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 15, 30, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(52, 152, 219, 0.3);
}

/* Navigation Styles */
nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo h1 {
    color: var(--light);
    font-size: 1.8rem;
    background: linear-gradient(45deg, var(--primary), var(--secondary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 6px rgba(52, 152, 219, 0.5);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--light);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    transition: width 0.3s ease;
    border-radius: 5px;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section Styles */
#hero {
    height: 100vh;
    background: linear-gradient(135deg, var(--gradient-end) 0%, var(--gradient-middle) 50%, var(--primary) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid var(--accent);
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1.5" fill="%23ffffff" opacity="0.05"/><circle cx="75" cy="75" r="1.5" fill="%23ffffff" opacity="0.05"/><circle cx="25" cy="75" r="1.5" fill="%23ffffff" opacity="0.05"/><circle cx="75" cy="25" r="1.5" fill="%23ffffff" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.5;
}

.hero-content {
    z-index: 2;
    padding: 1rem;
}

/* Clean "Soy Josh" text without excessive glow */
#hero h2 {
    font-size: clamp(3rem, 6vw, 5rem);
    color: var(--light);
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3),
                0 0 10px rgba(255, 255, 255, 0.2);
    letter-spacing: 0.02em;
}

#hero p {
    font-size: 1.3rem;
    color: var(--gray);
    max-width: 700px;
    margin: 0 auto 2.5rem;
}

/* Call to Action Button Styles */
.cta-button {
    background: linear-gradient(45deg, var(--primary), var(--secondary), var(--gradient-middle));
    color: white;
    padding: 1.2rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.4s ease;
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: all 0.7s ease;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 30px rgba(52, 152, 219, 0.6);
}

/* Section General Styles */
section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

section h2 {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 3.5rem;
    background: linear-gradient(45deg, var(--primary), var(--secondary), var(--gradient-middle));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 10px rgba(52, 152, 219, 0.4);
}

/* About Section Styles */
#about {
    background: rgba(10, 15, 30, 0.7);
    border-radius: 20px;
    padding: 4rem;
    margin-top: 3rem;
    margin-bottom: 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(52, 152, 219, 0.2);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--gray);
}

.skills {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.skill-card {
    background: linear-gradient(135deg, var(--card-bg-gradient-start), var(--card-bg-gradient-end));
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 6px 25px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    color: var(--light);
    border: 1px solid rgba(52, 152, 219, 0.1);
}

.skill-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: var(--light);
}

.skill-card i {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1.2rem;
    filter: drop-shadow(0 0 8px rgba(224, 176, 84, 0.7));
}

/* Project Section Styles */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background: linear-gradient(160deg, var(--card-bg-gradient-start), var(--card-bg-gradient-end));
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    transition: all 0.4s ease;
    position: relative;
    color: var(--light);
    border: 1px solid rgba(0, 191, 255, 0.2);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
}

.project-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0,0,0,0.4);
    border-color: var(--primary);
}

.project-image {
    height: 220px;
    background: linear-gradient(135deg, var(--secondary), var(--primary), var(--gradient-middle));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: var(--light);
    border-bottom: 2px solid rgba(0, 191, 255, 0.3);
}

.project-content {
    padding: 2rem;
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1.2rem;
    color: var(--light);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

.project-content p {
    color: var(--gray);
    margin-bottom: 1.8rem;
    line-height: 1.7;
}

.project-tags {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin-bottom: 1.8rem;
}

.tag {
    background: linear-gradient(90deg, rgba(52, 152, 219, 0.1), rgba(51, 153, 204, 0.1));
    color: var(--primary);
    padding: 0.4rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.project-links {
    display: flex;
    gap: 1.2rem;
}

.project-link {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    text-shadow: 0 0 5px rgba(51, 153, 204, 0.5);
}

.project-link:hover {
    color: var(--primary);
    transform: translateY(-2px);
    text-shadow: 0 0 10px rgba(52, 152, 219, 0.7);
}

/* Contact Section Styles */
#contact {
    background: rgba(10, 15, 30, 0.7);
    border-radius: 20px;
    padding: 4rem;
    margin-top: 3rem;
    margin-bottom: 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(51, 153, 204, 0.2);
}

.contact-container {
    display: grid;
    /* Adjusted grid-template-columns to make the form wider */
    grid-template-columns: 1fr 1.5fr; /* contact-info takes 1 part, contact-form takes 1.5 parts */
    gap: 4rem;
    align-items: start;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--light);
}

.contact-info p {
    color: var(--gray);
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--light);
}

.contact-item i {
    color: var(--secondary);
    width: 25px;
    font-size: 1.5rem;
    text-shadow: 0 0 8px rgba(51, 153, 204, 0.6);
}

.contact-form {
    background: linear-gradient(135deg, var(--card-bg-gradient-start), var(--card-bg-gradient-end));
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    border: 1px solid rgba(52, 152, 219, 0.2);
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

.form-group input,
.form-group textarea {
    width: 100%; /* Ensures inputs fill their parent's width */
    padding: 1.2rem;
    border: 2px solid #25406a;
    border-radius: 12px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.5);
    color: var(--light);
    box-sizing: border-box; /* Ensures padding and border are included in the element's total width and height */
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(51, 153, 204, 0.2), 0 0 15px rgba(51, 153, 204, 0.4);
    background: rgba(0, 0, 0, 0.7);
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

.submit-btn {
    width: 100%;
    background: linear-gradient(45deg, var(--primary), var(--secondary), var(--gradient-middle));
    color: white;
    padding: 1.2rem;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 8px 30px rgba(52, 152, 219, 0.4);
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: all 0.7s ease;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 15px 45px rgba(52, 152, 219, 0.6);
}

/* Footer Styles */
footer {
    background: #11151c;
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: #888;
}

.social-links {
    margin-top: 2.5rem;
    display: flex;
    justify-content: center;
    gap: 1.8rem;
}

.social-links a {
    color: var(--gray);
    font-size: 1.8rem;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.1));
}

.social-links a:hover {
    color: var(--secondary);
    transform: translateY(-5px) scale(1.1);
    filter: drop-shadow(0 0 15px rgba(51, 153, 204, 0.8));
}

/* Responsive Styles */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    #hero h2 {
        font-size: 2.8rem;
    }

    #hero p {
        font-size: 1.1rem;
    }

    .cta-button {
        font-size: 1rem;
        padding: 1rem 2rem;
    }

    .about-content,
    .contact-container { /* This will make both columns stack on small screens */
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    section {
        padding: 4rem 1.5rem;
    }

    section h2 {
        font-size: 2.2rem;
        margin-bottom: 2.5rem;
    }

    #about, #contact {
        padding: 2.5rem;
    }

    .skill-card {
        padding: 1.5rem;
    }

    .project-image {
        height: 180px;
    }

    .project-content {
        padding: 1.5rem;
    }
    .project-images {
        display: flex;
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 1rem;
    }
    
    .project-images img {
        width: 100%;
        max-width: 250px;
        border-radius: 12px;
        object-fit: cover;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    
    .project-images img:hover {
        transform: scale(1.05);
        box-shadow: 0 12px 30px rgba(52, 152, 219, 0.5);
    }
}