/* ========================================
   Optimized Custom Styles for Andrew J. Vinson Portfolio
   Modern, Simplified Design System
   ======================================== */

:root {
    --primary-color: #2c3e50;
    --primary-dark: #1a252f;
    --primary-light: #34495e;
    --secondary-color: #1abc9c;
    --secondary-dark: #16a085;
    --accent-color: #e74c3c;
    --text-dark: #212529;
    --text-light: #f8f9fa;
    --gray-light: #f8f9fa;
    --gray-medium: #e9ecef;
    --gray-dark: #6c757d;
}

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700&family=Open+Sans:wght@400;500;600&display=swap');

/* ========== Global Styles ========== */

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

html {
    scroll-behavior: smooth;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

/* ========== Navigation Bar ========== */

.navbar {
    padding: 1rem 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navbar.scrolled {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
}

.navbar-brand {
    font-size: 1.3rem;
    font-weight: 700;
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    position: relative;
    margin: 0 0.25rem;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 80%;
}

.navbar-nav .nav-link:hover {
    color: var(--secondary-color);
}

.dropdown-menu {
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
}

.dropdown-item {
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: var(--gray-light);
    color: var(--secondary-color);
    padding-left: 2rem;
}

/* ========== Hero Section ========== */

.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 50%, var(--secondary-dark) 100%);
    color: white;
    padding-top: 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    animation: pulse 15s ease-in-out infinite;
    z-index: 0;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 4rem 0;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content .lead {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    margin-bottom: 1rem;
}

.btn-primary, .btn-outline-light {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-primary:hover {
    background-color: var(--secondary-dark);
    border-color: var(--secondary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(26, 188, 156, 0.3);
}

.btn-outline-light {
    border-width: 2px;
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

/* ========== Section Headings ========== */

.sec-heading {
    margin-bottom: 3rem;
}

.sec-heading h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.sec-heading h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.sec-heading .subheading {
    display: block;
    font-size: 1.1rem;
    color: var(--secondary-color);
    font-weight: 500;
    margin-top: 0.5rem;
}

/* ========== Feature Cards ========== */

.ft-item {
    padding: 2.5rem 2rem;
    border-radius: 1rem;
    background: white;
    height: 100%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border-left: 4px solid var(--secondary-color);
}

.ft-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.ft-item i {
    color: var(--primary-color);
}

.ft-item h4 {
    margin: 1.5rem 0 1rem;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.25rem;
}

.ft-item p {
    color: var(--gray-dark);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* ========== Skill Badges ========== */

.skill-badge-large {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem 1.5rem;
    border-radius: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    height: 100%;
}

.skill-badge-large:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.skill-badge-large p {
    margin: 0;
    font-weight: 700;
    font-size: 1.1rem;
    color: white;
}

.skill-badge-large small {
    color: rgba(255, 255, 255, 0.8);
    display: block;
    margin-top: 0.5rem;
}

/* ========== Portfolio Cards ========== */

.portfolio-card {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 300px;
}

.portfolio-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-card:hover img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.95) 0%, rgba(26, 188, 156, 0.95) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 2rem;
}

.portfolio-card:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h5 {
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.portfolio-overlay p {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

/* ========== Experience Timeline ========== */

.experience-timeline {
    position: relative;
    padding: 3rem 0;
}

.experience-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--secondary-color), var(--secondary-dark));
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(26, 188, 156, 0.3);
}

.timeline-item-wrapper {
    position: relative;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
}

.timeline-item-wrapper:nth-child(odd) {
    flex-direction: row;
}

.timeline-item-wrapper:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-content-wrapper {
    width: 45%;
    padding: 2rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    border: 2px solid transparent;
}

.timeline-content-wrapper:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border-color: var(--secondary-color);
}

.timeline-marker-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--secondary-color);
    border: 5px solid white;
    box-shadow: 0 0 0 3px var(--secondary-color), 0 4px 10px rgba(26, 188, 156, 0.4);
    z-index: 10;
    transition: all 0.3s ease;
}

.timeline-item-wrapper:hover .timeline-marker-dot {
    transform: translateX(-50%) scale(1.3);
    box-shadow: 0 0 0 5px var(--secondary-color), 0 4px 15px rgba(26, 188, 156, 0.6);
}

.timeline-date-badge {
    font-size: 0.85rem;
    color: var(--secondary-color);
    font-weight: 700;
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(26, 188, 156, 0.1);
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.timeline-job-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.timeline-company {
    color: var(--gray-dark);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timeline-company i {
    color: var(--secondary-color);
}

.timeline-description {
    color: var(--text-dark);
    line-height: 1.7;
    font-size: 0.95rem;
}

.timeline-description ul {
    margin-top: 1rem;
    padding-left: 1.5rem;
}

.timeline-description li {
    margin-bottom: 0.75rem;
    position: relative;
}

.timeline-tech-stack {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background: var(--gray-light);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid var(--gray-medium);
}

.tech-badge:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
    border-color: var(--secondary-color);
}

/* Timeline Responsive */
@media (max-width: 991px) {
    .experience-timeline::before {
        left: 20px;
    }

    .timeline-item-wrapper,
    .timeline-item-wrapper:nth-child(even) {
        flex-direction: column !important;
        align-items: flex-start;
        padding-left: 50px;
    }

    .timeline-content-wrapper {
        width: 100%;
    }

    .timeline-marker-dot {
        left: 20px;
        transform: translateX(0);
    }

    .timeline-item-wrapper:hover .timeline-marker-dot {
        transform: translateX(0) scale(1.3);
    }
}

/* ========== Publications Section ========== */

.publication-item {
    padding: 2rem;
    background: white;
    border-radius: 1rem;
    height: 100%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.publication-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.pub-icon {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.publication-item h5 {
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.pub-title {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.pub-meta {
    color: var(--secondary-color);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.publication-item p {
    color: var(--gray-dark);
    line-height: 1.6;
    font-size: 0.9rem;
}

/* ========== Contact Section ========== */

.contact-info {
    margin-bottom: 2rem;
}

.contact-info p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.contact-info a {
    color: var(--secondary-color);
    font-weight: 500;
}

.contact-info a:hover {
    text-decoration: underline;
}

.contact-form .form-control {
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-medium);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.contact-form .form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(26, 188, 156, 0.25);
}

/* ========== Responsive Design ========== */

@media (max-width: 768px) {
    .sec-heading h2 {
        font-size: 2rem;
    }

    .sec-heading h2::after {
        width: 50px;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content .lead {
        font-size: 1.1rem;
    }

    .navbar-nav .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    .ft-item {
        margin-bottom: 1.5rem;
    }

    .timeline-content-wrapper {
        width: 100%;
    }

    .publication-item {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .sec-heading h2 {
        font-size: 1.75rem;
    }

    .navbar {
        padding: 0.5rem 0;
    }

    .btn-primary, .btn-outline-light {
        padding: 0.6rem 1.5rem;
        font-size: 0.85rem;
    }

    .d-flex.gap-3 {
        gap: 0.5rem !important;
    }

    .timeline-company {
        font-size: 0.9rem;
    }

    .timeline-job-title {
        font-size: 1.25rem;
    }
}

/* ========== Accessibility ========== */

a:focus,
button:focus,
.btn:focus {
    outline: 3px solid var(--secondary-color);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========== Utility Classes ========== */

.bg-light {
    background-color: var(--gray-light) !important;
}

.bg-dark {
    background-color: var(--text-dark) !important;
}

.text-muted {
    color: var(--gray-dark) !important;
}

.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

/* ========== Image Optimization ========== */

img {
    max-width: 100%;
    height: auto;
    display: block;
}

img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}
