/* --- variables --- */
:root {
    --primary-navy: #0a2540; /* Deep industrial navy */
    --primary-blue: #005eb8; /* Brighter blue for accents */
    --accent-red: #c33a32;   /* Industrial safety red */
    --tech-grey: #e9ecef;    /* Light technical background grey */
    --text-dark: #212529;
    --text-light: #f8f9fa;
    --section-padding: 100px 10%;
}

/* --- Base Reset --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: #fff;
}
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; }
a { text-decoration: none; transition: 0.3s; }
ul { list-style: none; }

/* --- Buttons --- */
.btn-primary {
    display: inline-block;
    background: var(--accent-red);
    color: white;
    padding: 15px 35px;
    border-radius: 4px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.btn-primary:hover { background: #a32a23; transform: translateY(-2px); }

.btn-small {
    background: transparent;
    border: 2px solid var(--accent-red);
    color: var(--text-light);
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: 600;
}
.btn-small:hover { background: var(--accent-red); color: white; }

/* --- Header & Navigation --- */
header {
    /* 1. Replace 'https://...' with your local file path.
       2. The linear-gradient part creates the dark blue overlay so text remains readable.
    */
    background: linear-gradient(rgba(10,37,64,0.85), rgba(10,37,64,0.8)), 
                url('images/6.jpg');
    
    background-size: cover;
    background-position: center;
    color: var(--text-light);
    padding: 20px 10% 120px;
}
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 60px;
}

/* Custom CSS Nexus Logo */
.brand-container { display: flex; align-items: center; gap: 15px; }
.nexus-logo {
    width: 40px;
    height: 40px;
    position: relative;
}
.nexus-logo::before, .nexus-logo::after {
    content: '';
    position: absolute;
    width: 25px; height: 25px;
    border: 6px solid var(--accent-red);
    border-radius: 4px;
}
.nexus-logo::before { top: 0; left: 0; border-bottom: none; border-right: none; transform: skewX(-10deg); }
.nexus-logo::after { bottom: 0; right: 0; border-top: none; border-left: none; transform: skewX(-10deg); }

.brand-text {
    font-weight: 800;
    font-size: 1.4rem;
    line-height: 1.1;
    text-transform: uppercase;
}
.brand-text span { display: block; font-size: 0.8rem; font-weight: 400; color: #bbb; }

nav ul { display: flex; align-items: center; gap: 30px; }
nav ul li a { color: rgba(255,255,255,0.8); font-weight: 500; font-size: 0.95rem; }
nav ul li a:hover { color: var(--accent-red); }

.hero { max-width: 800px; margin-top: 60px; }
.hero h1 { font-size: 3.5rem; margin-bottom: 25px; }
.hero p { font-size: 1.2rem; margin-bottom: 40px; opacity: 0.9; max-width: 700px; }

/* --- Services Section (Grid with Image Placeholders) --- */
.services-section { padding: var(--section-padding); background: #fff; }
.section-header { text-align: center; max-width: 700px; margin: 0 auto 60px; }
.section-header h2 { color: var(--primary-navy); font-size: 2.5rem; margin-bottom: 15px; }
.section-header p { font-size: 1.1rem; color: #666; }

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.service-card {
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
    border-bottom: 4px solid transparent;
}
.service-card:hover { transform: translateY(-5px); border-bottom-color: var(--accent-red); }

/* Image Placeholders styling */
.img-placeholder {
    height: 200px;
    background: var(--tech-grey);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #aaa;
    text-align: center;
    padding: 20px;
    border-bottom: 1px solid #ddd;
    /* Optional: subtle gradient to look less flat */
    background: linear-gradient(45deg, #e9ecef 25%, #f4f4f4 25%, #f4f4f4 50%, #e9ecef 50%, #e9ecef 75%, #f4f4f4 75%, #f4f4f4 100%);
    background-size: 20px 20px;
}
.img-placeholder i { margin-bottom: 10px; color: #ccc; }
.img-placeholder span { font-size: 0.8rem; font-style: italic; }

.service-content { padding: 30px; }
.service-content h3 { color: var(--primary-navy); margin-bottom: 15px; }

/* --- About Section (Split Layout) --- */
.about-section { padding: var(--section-padding); background: var(--primary-navy); color: var(--text-light); }
.about-container {
    display: flex;
    gap: 60px;
    align-items: center;
}
.about-text { flex: 3; }
.about-image-frame { flex: 2; }

.about-text h2 { font-size: 2.5rem; margin-bottom: 30px; color: white; }
.about-text .lead { font-size: 1.2rem; font-weight: 600; margin-bottom: 20px; color: var(--accent-red); }
.about-text p { margin-bottom: 20px; opacity: 0.9; }
.credentials { margin-top: 30px; }
.credentials li { margin-bottom: 10px; display: flex; align-items: center; }
.credentials li i { color: var(--accent-red); margin-right: 15px; }

/* Picture Placeholder styling */
.actual-image-placeholder {
    width: 100%;
    height: 500px; /* Fixed height for portrait aspect */
    background-color: rgba(255,255,255,0.1);
    border: 3px dashed rgba(255,255,255,0.3);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    color: rgba(255,255,255,0.5);
    font-style: italic;
}

/* --- Contact Section (Split Layout) --- */
.contact-section { padding: var(--section-padding); background: var(--tech-grey); }
.contact-layout {
    display: flex;
    background: #fff;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    border-radius: 12px;
    overflow: hidden;
}

.contact-info {
    flex: 2;
    background: var(--primary-navy);
    color: var(--text-light);
    padding: 60px;
}
.contact-info h2 { font-size: 2rem; margin-bottom: 20px; }
.contact-info > p { opacity: 0.8; margin-bottom: 40px; }

.info-item { display: flex; gap: 20px; margin-bottom: 30px; }
.info-item i { font-size: 1.5rem; color: var(--accent-red); margin-top: 5px; }
.info-item h4 { font-size: 1.1rem; margin-bottom: 5px; }
.info-item p { opacity: 0.8; font-size: 0.95rem; }

#nexus-form {
    flex: 3;
    padding: 60px;
}
.form-group { margin-bottom: 25px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--primary-navy); }
.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-family: inherit;
    transition: 0.3s;
}
.form-group input:focus, .form-group textarea:focus {
    border-color: var(--primary-blue);
    outline: none;
}
#form-status { margin-top: 20px; font-weight: 600; }
.success { color: green; }
.error { color: red; }

/* --- Footer --- */
footer {
    background: #051626;
    color: #7a8b9a;
    text-align: center;
    padding: 40px 10%;
    font-size: 0.9rem;
}

/* --- Responsive Media Queries --- */
@media (max-width: 1024px) {
    .about-container { flex-direction: column; }
    .actual-image-placeholder { height: 400px; width: 100%; max-width: 400px; margin: 0 auto; }
}

@media (max-width: 900px) {
    .hero h1 { font-size: 2.8rem; }
    nav { flex-wrap: wrap; justify-content: center; gap: 20px; }
    .brand-container { margin-bottom: 10px; }
    .contact-layout { flex-direction: column; }
    .contact-info, #nexus-form { padding: 40px 30px; }
}

/* Add this to your CSS */
.card-img {
    width: 100%;
    height: 220px; /* Fixed height for uniformity */
    object-fit: cover; /* Ensures image covers area without distortion */
    border-bottom: 4px solid var(--primary-navy); /* Creates a nice separation line */
}

/* Add this to the bottom of your CSS or near the About section */
.bio-img {
    width: 100%;
    height: auto; 
    object-fit: cover; /* CRITICAL: This crops the photo so it doesn't look squished */
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    border: 4px solid rgba(255,255,255,0.1);
}

/* Mobile adjustment */
@media (max-width: 1024px) {
    .bio-img { height: 400px; max-width: 400px; display: block; margin: 0 auto; }
}

.bio-caption {
    text-align: center;
    margin-top: 20px;
}

.bio-caption h3 {
    color: var(--accent-red); /* Makes your name pop */
    font-size: 1.5rem;
    margin-bottom: 5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.credentials-text {
    color: rgba(255, 255, 255, 0.9); /* High contrast white */
    font-size: 1rem;
    font-weight: 500;
    display: block; /* Forces it to its own line */
}

/* Mobile Adjustment to keep it centered */
@media (max-width: 1024px) {
    .about-image-frame {
        text-align: center;
        margin-top: 40px;
    }
}