/*
Stylesheet for Personal CV & Portfolio Website
Author: Wang Minmin
Year: 2025
Description: This file contains all the CSS styles for the website, including layout, typography, animations, and responsiveness.
*/

/* Global Styles */
body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(to bottom, #E6E6FA, #D8BFD8);
    color: #333;
    text-align: center;
    margin: 0;
    padding: 0;
}

/* Typography Styles */
h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: #3B2379; /* Deep purple for contrast */
}

/* Special text styles for important sections */
.personal-statement, .hero-content p {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-style: italic;
    font-weight: bold;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    background: url('images/hero-bg.jpg') no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Overlay for readability */
.overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(230, 230, 250, 0.5); /* Light purple transparency */
    z-index: 1;
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

/* Typing Effect */
.typing-text {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid #5D3A9B;
    font-size: 20px;
    width: 100%;
    animation: typing 3s steps(40, end), blink 0.75s step-end infinite;
}

/* Floating Butterflies Animation */
.butterflies img {
    position: absolute;
    width: 200px;
    opacity: 0.8;
    animation: float 10s infinite ease-in-out alternate;
}

.butterflies img:nth-child(1) { animation-duration: 10s; }
.butterflies img:nth-child(2) { animation-duration: 10s; }
.butterflies img:nth-child(3) { animation-duration: 10s; }

/* Floating Animation */
@keyframes float {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-20px); }
}

.index-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 90vh; /* Lowering the content further */
    padding-top: 70px;
    }

/* Navigation Bar */
.nav-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #CDB7F6;
    padding: 20px 0;
    list-style: none;
    margin: 0;
    font-size: 22px;
    font-weight: bold;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 1px 4px 8px rgba(0, 0, 0, 0.2);
}

/* Ensures proper spacing for navigation */
.nav-bar li {
    margin: 0 40px;
    display: inline;
}

/* Navigation links */
.nav-bar a {
    text-decoration: none;
    color: #5D3A9B;
    font-size: 22px;
    font-weight: bold;
    padding: 10px 15px;
    display: inline-block;
}
.nav-bar a:hover {
    color: #3B2379;
}

/* Add padding to prevent navbar from covering content */
body {
    padding-top: 80px;
}

/* Butterfly styles */
.butterfly {
    position: absolute;
    width: 50px; /* Adjust size */
    height: auto;
    animation: flyAnimation 10s infinite ease-in-out;
}

/* Typing Effect */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    50% { border-color: transparent; }
}

.personal-statement {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid #5D3A9B;
    font-size: 20px;
    width: 100%;
    animation: typing 2s steps(40, end), blink 0.75s step-end infinite;
}

/* Card Layout */
.card {
    background: white;
    width: 55%;
    padding: 10px;
    margin: 25px auto;
    border-radius: 15px;
    box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    text-align: center;
}

.card-container {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-items: center;
    flex-wrap: wrap;
}

.card-img {
    width: 80%; 
    max-width: 200px; /* Limits image size */
    height: auto; 
    display: block;
    margin: auto; 
    border-radius: 10px; 
    box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.2);
}   

.card a {
    display: inline-block;
    padding: 8px 15px;
    background: #5D3A9B;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.3s ease-in-out;
}

.card a:hover {
    background: #3B2379;
}

/* Profile Section */
.profile-container {
    display: flex; 
    align-items: center; 
    justify-content: center;
    gap: 20px; 
    padding: 20px;
    max-width: 800px;
    margin: 30px auto;
}

.card:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease-in-out;
}

main {
    position: relative;
    padding: 50px 20px;
    background: url('images/portfolio-bg.jpg') no-repeat center center/cover;
    background-attachment: fixed; /* Creates a parallax effect */
}

/* Profile Image */
.profile-pic {
    width: 180px;
    height: 240px;
    border-radius: 10px; /* Slightly rounded corners */
    border: 3px solid #5D3A9B; /* Purple border */
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease-in-out;
}

.profile-pic:hover {
    transform: scale(1.1);
}

/* Table Styling */
.info-table {
    width: 100%;
    table-layout: fixed; /* Fixed table layout */
    border-collapse: collapse;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.info-table th {
    background-color: #5D3A9B;
    color: white;
    padding: 12px;
    font-size: 18px;
}

.info-table td {
    padding: 20px;
    border-bottom: 1px solid #ddd;
    text-align: center;
}

.info-table tr:hover {
    background-color: #f3e5f5;
    transition: 0.3s;
}

/* Make 'Category' column bold in Personal Details */
.info-table td:first-child {
    font-weight: bold;
}

/* Specific styling for the Education Table */
.education-table {
    width: 90%; /* Adjusted width for better layout */
    margin: 20px auto;
}

.education-table td img {
    display: block;
    margin: 10px auto;
    border-radius: 8px;
    box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.2);
}

.education-table td:first-child {
    font-weight: bold; /* Ensure school names are bold */
}

.education-table .no-bold {
    font-weight: normal; /* Ensure no bold style applies to degrees */
}

/* Specific styling for the Work Experience Table */
.work-table {
    width: 90%;
    margin: 20px auto;
}

.work-table th, .work-table td {
    padding: 15px;
    text-align: center;
}

.work-table td:first-child {
    font-weight: bold;
}

.info-table th:nth-child(3), .info-table td:nth-child(3) {
    width: 180px; /* Increase column width for Year */
    text-align: center;
}

.skills-table {
    width: 90%; 
    margin: auto;
    table-layout:fixed;
    border-collapse: collapse;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    overflow: hidden;
    font-weight: bold; 
    border: 2px solid #5D3A9B; 
}

.skills-table th {
    background-color: #5D3A9B; 
    color: white;
    padding: 12px;
    font-size: 18px;
}

.skills-table td {
    padding: 15px;
    border-bottom: 1px solid #ddd;
    text-align: center;
}

/* Adjust column widths */
.skills-table th:nth-child(1), 
.skills-table td:nth-child(1) {
    width: 30%; /* Adjust technical column width */
}

.skills-table th:nth-child(2), 
.skills-table td:nth-child(2) {
    width: 30%; /* Adjust design column width */
}

.skills-table th:nth-child(3), 
.skills-table td:nth-child(3) {
    width: 40%; /* Make Soft Skills column wider */
    word-wrap: break-word; 
}

.skills-table tr:hover {
    background-color: #f3e5f5;
    transition: 0.3s;
}

/* Contact Form Styles */
form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 80%;
    margin: auto;
}
/* Input fields, dropdowns, and text areas */
form input, form textarea, form select {
    width: 100%;
    max-width: 500px;
    padding: 10px;
    margin: 5px;
    border-radius: 6px;
    border: 1px solid #ccc;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
    font-size: 16px;
}

/* Add hover effect */
form input:focus, form textarea:focus, form select:focus {
    border-color: #5D3A9B;
    outline: none;
    box-shadow: 0 0 5px rgba(93, 58, 155, 0.5);
}

/* Contact Method Buttons */
.contact-method {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.contact-method label {
    display: inline-flex; 
    align-items: center;
    gap: 5px; 
    cursor: pointer;
}


/* File Upload Input */
input[type="file"] {
    border: none;
    background: white;
    padding: 10px;
    cursor: pointer;
}

/* Submit Button */
button {
    background-color: #5D3A9B;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease-in-out, transform 0.2s ease-in-out;
}

button:hover {
    background-color: #3B2379;
    transform: scale(1.05);
}

/* Footer */
footer {
    background: #CDB7F6;
    padding: 10px;
    margin-top: 20px;
    font-weight: bold;
    color:white
}
