/* 
   Mechanical Design Engineer Portfolio - Styles
   A modern, responsive portfolio website for a mechanical design engineer
*/

/* ===== VARIABLES ===== */
:root {
    /* Colors */
    --primary-color: #0066cc;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gray-color: #6c757d;
    --light-gray: #e9ecef;
    
    /* Typography */
    --heading-font: 'Montserrat', sans-serif;
    --body-font: 'Roboto', sans-serif;
    
    /* Spacing */
    --section-padding: 80px 0;
    --container-padding: 0 15px;
    
    /* Shadows */
    --card-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --hover-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-color);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

p {
    margin-bottom: 15px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--container-padding);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #0055aa;
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--hover-shadow);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--hover-shadow);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.9rem;
}

/* Placeholder image styling for development */
.placeholder-image {
    background-color: #e0e0e0;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 1rem;
    border-radius: 5px;
}

/* ===== NAVIGATION ===== */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
    padding: 15px 0;
}

#navbar.scrolled {
    padding: 10px 0;
    background-color: white;
}

#navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.8rem;
    margin-bottom: 0;
    color: var(--secondary-color);
}

.logo span {
    color: var(--primary-color);
    font-weight: 700;
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: var(--secondary-color);
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--secondary-color);
    transition: all 0.3s ease;
}

/* ===== HERO SECTION ===== */
.hero {
    padding-top: 150px;
    padding-bottom: 80px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e7eb 100%);
    position: relative;
    overflow: hidden;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-content {
    flex: 1;
    padding-right: 30px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.hero-content h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--gray-color);
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.hero-image {
    flex: 1;
    position: relative;
}

.hero-image img {
    border-radius: 10px;
    box-shadow: var(--card-shadow);
}

/* ===== ABOUT SECTION ===== */
.about {
    padding: var(--section-padding);
    background-color: white;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-image {
    flex: 1;
}

.about-image img {
    border-radius: 10px;
    box-shadow: var(--card-shadow);
}

.about-text {
    flex: 1.5;
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.about-details {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 30px 0;
}

.detail {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    flex: 1 0 calc(50% - 20px);
}

.detail i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.detail h4 {
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.detail p {
    color: var(--gray-color);
    margin-bottom: 0;
}

/* ===== PROJECTS SECTION ===== */
.projects {
    padding: var(--section-padding);
    background-color: var(--light-gray);
}

.project-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 8px 20px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.project-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--hover-shadow);
}

.project-img {
    height: 200px;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-img img {
    transform: scale(1.1);
}

.project-info {
    padding: 20px;
}

.project-info h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.project-info p {
    color: var(--gray-color);
    margin-bottom: 15px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.project-tags span {
    background-color: var(--light-gray);
    color: var(--gray-color);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.projects-cta {
    text-align: center;
}

/* ===== SKILLS SECTION ===== */
.skills {
    padding: var(--section-padding);
    background-color: white;
}

.skills-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.skills-category h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: var(--secondary-color);
}

.skills-category h3 i {
    color: var(--primary-color);
}

.skill {
    margin-bottom: 20px;
}

.skill-name {
    font-weight: 500;
    margin-bottom: 8px;
}

.skill-bar {
    height: 10px;
    background-color: var(--light-gray);
    border-radius: 5px;
    overflow: hidden;
}

.skill-level {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 5px;
}

.certifications {
    margin-top: 50px;
}

.certifications h3 {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 30px;
}

.certification-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.certification {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: var(--light-gray);
    padding: 20px;
    border-radius: 10px;
    width: 100%;
    max-width: 350px;
    transition: all 0.3s ease;
}

.certification:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow);
}

.certification i {
    font-size: 2rem;
    color: var(--primary-color);
}

.certification h4 {
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.certification p {
    color: var(--gray-color);
    margin-bottom: 0;
}

/* ===== CONTACT SECTION ===== */
.contact {
    padding: var(--section-padding);
    background-color: var(--light-gray);
}

.contact-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 50px;
}

.contact-info h3,
.contact-form h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.contact-info p {
    margin-bottom: 30px;
}

.contact-details {
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.contact-item i {
    font-size: 1.2rem;
    color: var(--primary-color);
    width: 30px;
    text-align: center;
}

.contact-item p {
    margin-bottom: 0;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-5px);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: var(--body-font);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* ===== FOOTER ===== */
footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo h2 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.footer-logo span {
    color: var(--primary-color);
}

.footer-logo p {
    color: #aaa;
}

.footer-links h3 {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #aaa;
    transition: all 0.3s ease;
}

.footer-links ul li a:hover {
    color: white;
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: #aaa;
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--card-shadow);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-5px);
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 2.8rem;
    }
    
    .hero-content h2 {
        font-size: 1.8rem;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .about-image {
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: white;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 50px;
        transition: all 0.3s ease;
        z-index: 999;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links li {
        margin: 15px 0;
    }
    
    .hamburger {
        display: block;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .hero .container {
        flex-direction: column;
    }
    
    .hero-content {
        padding-right: 0;
        margin-bottom: 50px;
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .detail {
        flex: 1 0 100%;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero-content h2 {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 10px 20px;
    }
    
    .project-filters {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn {
        width: 100%;
        max-width: 200px;
        text-align: center;
    }
    
    .certification {
        max-width: 100%;
    }
}
