/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
}

/* Typography utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-muted { color: #6c757d; }
.text-primary { color: #003366; }
.text-accent { color: #FF9933; }
.highlight { 
    background: linear-gradient(120deg, #FF9933 0%, #FF9933 100%);
    background-repeat: no-repeat;
    background-size: 100% 0.2em;
    background-position: 0 88%;
    padding: 0 4px;
}

.font-weight-bold { font-weight: 700; }
.font-weight-normal { font-weight: 400; }
.font-weight-light { font-weight: 300; }

/* Container and Layout */
#formSection, #resumeSection {
    max-width: 1000px;
    margin: 20px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 51, 102, 0.1);
    overflow: hidden;
}

#formSection {
    padding: 40px;
}

#resumeSection {
    padding: 20px;
}

/* Main Title */
h1 {
    color: #003366;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

h1::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #003366, #FF9933);
    margin: 15px auto;
    border-radius: 2px;
}

/* Section Headers */
h2 {
    color: #003366;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 30px 0 20px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #E6F0FF;
    position: relative;
}

h2::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, #FF9933, #003366);
}

h3 {
    color: #003366;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 15px 0 10px 0;
}

/* Form Styling */
form {
    background: transparent;
}

/* Table Styling */
table {
    width: 100%;
    margin-bottom: 20px;
    border-collapse: separate;
    border-spacing: 0;
}

td {
    padding: 12px 15px;
    vertical-align: top;
}

td:first-child {
    width: 200px;
    background: #f8f9fb;
    border-right: 1px solid #e9ecef;
}

/* Labels */
label {
    font-weight: 600;
    color: #003366;
    display: block;
    margin-bottom: 5px;
}

/* Form Controls */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #fff;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #FF9933;
    box-shadow: 0 0 0 3px rgba(255, 153, 51, 0.1);
    transform: translateY(-1px);
}

/* Required field indicator */
input[required] {
    border-left: 4px solid #FF9933;
}

/* File Input Styling */
input[type="file"] {
    padding: 8px;
    border: 2px dashed #e9ecef;
    background: #f8f9fa;
    cursor: pointer;
}

input[type="file"]:hover {
    border-color: #FF9933;
    background: #fff5e6;
}

/* Photo Preview */
.photo-preview {
    max-width: 160px;
    max-height: 200px;
    border: 3px solid #e9ecef;
    border-radius: 8px;
    margin: 15px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.photo-preview:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Buttons */
button {
    background: linear-gradient(135deg, #003366 0%, #004d99 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin: 8px 8px 8px 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.2);
}

button:hover {
    background: linear-gradient(135deg, #FF9933 0%, #ff8800 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 153, 51, 0.3);
}

button:active {
    transform: translateY(0);
}

/* Submit Button Special Styling */
button[type="submit"] {
    background: linear-gradient(135deg, #FF9933 0%, #ff8800 100%);
    font-size: 1.1rem;
    padding: 16px 32px;
    margin-top: 20px;
}

button[type="submit"]:hover {
    background: linear-gradient(135deg, #003366 0%, #004d99 100%);
}

/* Remove buttons */
button:contains("Remove") {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    padding: 8px 16px;
    font-size: 0.9rem;
}

button:contains("Remove"):hover {
    background: linear-gradient(135deg, #bd2130 0%, #a71e2a 100%);
}

/* Skills Section */
.skills-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fb;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.skill-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.skill-checkbox:hover {
    border-color: #FF9933;
    background: #fff5e6;
    transform: translateY(-1px);
}

.skill-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #FF9933;
    cursor: pointer;
}

.skill-checkbox label {
    font-weight: 500;
    color: #333;
    cursor: pointer;
    margin: 0;
}

/* Dynamic Sections */
.education-entry,
.experience-entry {
    background: #f8f9fb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
    position: relative;
}

.education-entry::before,
.experience-entry::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #003366, #FF9933);
    border-radius: 0 4px 4px 0;
}

/* Separator */
hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e9ecef, transparent);
    margin: 20px 0;
}

/* Resume Content Styling */
#resumeContent {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#resumeContent h1 {
    color: #003366;
    font-size: 2.2rem;
    margin-bottom: 10px;
}

#resumeContent h2 {
    color: #003366;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 25px 0 15px 0;
    padding-bottom: 5px;
    border-bottom: 2px solid #FF9933;
}

#resumeContent h3 {
    color: #003366;
    font-size: 1.1rem;
    margin: 15px 0 8px 0;
}

#resumeContent table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

#resumeContent th,
#resumeContent td {
    border: 1px solid #dee2e6;
    padding: 12px;
    text-align: left;
}

#resumeContent th {
    background: linear-gradient(135deg, #003366, #004d99);
    color: white;
    font-weight: 600;
}

#resumeContent td {
    background: #fff;
}

#resumeContent tr:nth-child(even) td {
    background: #f8f9fa;
}

#resumeContent ul {
    margin: 10px 0 10px 20px;
}

#resumeContent li {
    margin: 5px 0;
    color: #555;
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    #resumeContent {
        box-shadow: none;
        margin: 0;
    }
    
    button {
        display: none;
    }
    
    @page {
        margin: 0.5in;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    #formSection, #resumeSection {
        margin: 10px;
        padding: 20px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    td {
        display: block;
        width: 100%;
        padding: 8px 0;
    }
    
    td:first-child {
        background: transparent;
        border: none;
        font-weight: 600;
        color: #003366;
    }
    
    .skills-section {
        grid-template-columns: 1fr;
    }
    
    button {
        width: 100%;
        margin: 8px 0;
    }
}

/* Animation utilities */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Focus indicators for accessibility */
*:focus {
    outline: 2px solid #FF9933;
    outline-offset: 2px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #003366, #FF9933);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #FF9933, #003366);
}