/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #1e293b;
    background-color: #fff7ed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.min-h-screen {
    min-height: 100vh;
    padding-bottom: 3rem;
}

/* Header */
.header {
    background-color: #fbbf24;
    padding-top: 3rem;
    padding-bottom: 8rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    position: relative;
    overflow: hidden;
}

.header-bg-blob {
    position: absolute;
    border-radius: 9999px;
    opacity: 0.5;
    filter: blur(64px);
}

.header-bg-blob-1 {
    top: 0;
    right: 0;
    width: 16rem;
    height: 16rem;
    background-color: #fcd34d;
    margin-right: -5rem;
    margin-top: -5rem;
}

.header-bg-blob-2 {
    bottom: 0;
    left: 0;
    width: 12rem;
    height: 12rem;
    background-color: #fb923c;
    margin-left: -2.5rem;
    margin-bottom: -2.5rem;
}

.header-content {
    max-width: 56rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    position: relative;
    z-index: 10;
}

.profile-container {
    position: relative;
}

.profile-image-wrapper {
    width: 10rem;
    height: 10rem;
    border-radius: 9999px;
    border: 8px solid white;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    background-color: white;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.star-badge {
    position: absolute;
    bottom: -0.5rem;
    right: -0.5rem;
    background-color: white;
    padding: 0.5rem;
    border-radius: 9999px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.star-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: #f59e0b;
}

.profile-info {
    text-align: center;
    color: #1e293b;
}

.profile-name {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.5));
}

.profile-tagline {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: #334155;
}

.profile-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge {
    background-color: white;
    color: #ea580c;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    font-weight: 600;
    border: 2px solid #fed7aa;
}

.badge-icon {
    width: 1.125rem;
    height: 1.125rem;
    color: #ea580c;
}

/* Main Content */
.main-content {
    max-width: 56rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    margin-top: -4rem;
    position: relative;
    z-index: 20;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid #fed7aa;
    page-break-inside: avoid;
    break-inside: avoid;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #ea580c;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.title-icon {
    width: 1.25rem;
    height: 1.25rem;
}

/* Contact Info */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-size: 0.875rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #1e293b;
    transition: color 0.3s ease;
}

.contact-item:not(.static):hover {
    color: #f97316;
}

.contact-item.static {
    color: #475569;
}

.contact-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    background-color: #fed7aa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ea580c;
    transition: all 0.3s ease;
}

.contact-item:not(.static):hover .contact-icon {
    background-color: #ea580c;
    color: white;
}

.contact-icon svg {
    width: 1rem;
    height: 1rem;
}

/* Skills */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background-color: #fffbeb;
    color: #b45309;
    padding: 0.375rem 0.75rem;
    border-radius: 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid #fde68a;
}

.skill-icon {
    width: 1rem;
    height: 1rem;
}

/* Community Card */
.community-card {
    background-color: #ea580c;
    color: white;
}

/* Hide print-only community card on screen */
.community-card-print {
    display: none !important;
}

.community-card .card-title {
    color: white;
}

.community-section {
    margin-bottom: 1rem;
}

.community-section:last-child {
    margin-bottom: 0;
}

.community-category {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    opacity: 0.7;
    margin-bottom: 0.25rem;
}

.community-list {
    font-size: 0.75rem;
    list-style: none;
    opacity: 0.9;
    line-height: 1.5;
}

.community-list li {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.community-list li:before {
    content: "•";
    opacity: 0.5;
}

/* Main Feed */
.main-feed {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Bio Card */
.bio-card {
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.bio-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bio-text {
    color: #475569;
    line-height: 1.75;
    font-style: italic;
}

/* Timeline */
.timeline-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.timeline-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.timeline-divider {
    flex-grow: 1;
    height: 1px;
    background-color: #fed7aa;
}

.timeline-title {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #f97316;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.timeline-icon {
    width: 1rem;
    height: 1rem;
}

/* Timeline Items */
.timeline-item {
    background-color: white;
    padding: 1.25rem;
    border-radius: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid #fed7aa;
    display: flex;
    gap: 1rem;
    transition: all 0.3s ease;
    page-break-inside: avoid;
    break-inside: avoid;
}

.timeline-item:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.timeline-item.older {
    background-color: rgba(255, 255, 255, 0.6);
    border-color: #fff7ed;
}

.timeline-number {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timeline-bubble {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background-color: #fef3c7;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d97706;
    font-weight: 700;
    font-size: 0.75rem;
}

.timeline-item.older .timeline-bubble {
    background-color: #f1f5f9;
    color: #94a3b8;
}

.timeline-line {
    width: 2px;
    flex-grow: 1;
    background-color: #fffbeb;
    margin-top: 0.5rem;
}

.timeline-item.older .timeline-line {
    background-color: #f8fafc;
}

.timeline-content {
    flex-grow: 1;
}

.timeline-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.25rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.timeline-period {
    font-size: 0.625rem;
    font-weight: 700;
    color: #fb923c;
    text-transform: uppercase;
}

.timeline-item.older .timeline-period {
    color: #94a3b8;
}

.timeline-badge {
    font-size: 0.563rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.timeline-badge.returning {
    background-color: #dcfce7;
    color: #15803d;
}

.timeline-badge.specialist {
    background-color: #fef2f2;
    color: #dc2626;
}

.timeline-badge svg {
    width: 0.75rem;
    height: 0.75rem;
}

.timeline-job-title {
    font-weight: 700;
    color: #1e293b;
}

.timeline-item.older .timeline-job-title {
    color: #475569;
}

.timeline-details {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.timeline-item.older .timeline-details {
    color: #94a3b8;
}

/* Toggle Button */
.toggle-history-btn {
    width: 100%;
    padding: 1rem;
    background-color: #fed7aa;
    color: #c2410c;
    border-radius: 1.5rem;
    font-weight: 700;
    font-size: 0.875rem;
    border: 2px dashed #fdba74;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.toggle-history-btn:hover {
    background-color: #fdba74;
}

.toggle-icon {
    width: 1rem;
    height: 1rem;
    transition: transform 0.3s ease;
}

.toggle-icon.rotated {
    transform: rotate(180deg);
}

.timeline-older-hidden {
    display: none;
}

.timeline-older-visible {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-1rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Teaching Card */
.teaching-card {
    background-color: #fffbeb;
    border: 2px dashed #fde68a;
    page-break-inside: avoid;
    break-inside: avoid;
}

.teaching-title {
    color: #b45309;
}

.teaching-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.teaching-item {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    page-break-inside: avoid;
    break-inside: avoid;
}

.teaching-year {
    font-size: 0.625rem;
    font-weight: 700;
    color: #f59e0b;
    width: 4rem;
    line-height: 1.25;
}

.teaching-info {
    flex-grow: 1;
}

.teaching-role {
    font-weight: 700;
    color: #1e293b;
    font-size: 0.875rem;
}

.teaching-group {
    font-size: 0.625rem;
    color: #64748b;
    text-transform: uppercase;
}

/* Footer */
.footer {
    max-width: 56rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    margin-top: 3rem;
    text-align: center;
}

.footer-card {
    background-color: white;
    padding: 2rem;
    border-radius: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid #fed7aa;
}

.footer-icon {
    width: 2.5rem;
    height: 2.5rem;
    color: #fb923c;
    margin: 0 auto 1rem;
}

.footer-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.footer-text {
    color: #64748b;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.75;
}

.footer-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
}

.footer-btn {
    background-color: #f97316;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 1rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.footer-btn:hover {
    background-color: #ea580c;
}

.footer-btn-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.footer-copyright {
    margin-top: 2rem;
    font-size: 0.75rem;
    color: #cbd5e1;
}

/* Responsive Design */
@media (min-width: 768px) {
    .header-content {
        flex-direction: row;
    }
    
    .profile-info {
        text-align: left;
    }
    
    .profile-badges {
        justify-content: flex-start;
    }
    
    .content-grid {
        grid-template-columns: 1fr 2fr;
    }
    
    .teaching-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-buttons {
        flex-direction: row;
    }
    
    .timeline-number {
        display: flex;
    }
}

@media (max-width: 767px) {
    .profile-name {
        font-size: 2rem;
    }
    
    .profile-tagline {
        font-size: 1rem;
    }
    
    .timeline-number {
        display: none;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    .header-bg-blob,
    .toggle-history-btn,
    .footer-buttons,
    .footer-copyright {
        display: none;
    }
    
    /* Make header more compact */
    .header {
        padding-top: 1rem;
        padding-bottom: 2.5rem;
    }
    
    .header-content {
        gap: 1rem;
        margin-bottom: 1rem;
    }
    
    .profile-image-wrapper {
        width: 6rem;
        height: 6rem;
        border: 4px solid white;
        box-shadow: none;
    }
    
    .profile-name {
        font-size: 1.75rem;
        margin-bottom: 0.25rem;
    }
    
    .profile-tagline {
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
    }
    
    .badge {
        padding: 0.25rem 0.75rem;
        font-size: 0.75rem;
        box-shadow: none;
    }
    
    .badge-icon {
        width: 0.875rem;
        height: 0.875rem;
    }
    
    /* Remove shadows and backgrounds from cards */
    .card {
        box-shadow: none;
        border: 1px solid #e5e7eb;
        padding: 1rem;
        background: white;
    }
    
    /* Make sidebar cards more compact */
    .card-title {
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
    }
    
    .title-icon {
        width: 1rem;
        height: 1rem;
    }
    
    /* Compact contact info */
    .contact-info {
        gap: 0.5rem;
        font-size: 0.75rem;
    }
    
    .contact-icon {
        width: 1.5rem;
        height: 1.5rem;
    }
    
    .contact-icon svg {
        width: 0.75rem;
        height: 0.75rem;
    }
    
    /* Compact skills */
    .skills-container {
        gap: 0.25rem;
    }
    
    .skill-tag {
        padding: 0.25rem 0.5rem;
        font-size: 0.625rem;
        border: 1px solid #e5e7eb;
        background: white;
    }
    
    .skill-icon {
        width: 0.75rem;
        height: 0.75rem;
    }
    
    /* Make Bio card much more compact */
    .bio-card {
        padding: 0.75rem;
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
    
    .bio-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .bio-text {
        font-size: 0.75rem;
        line-height: 1.4;
    }
    
    /* Compact main content area */
    .main-content {
        margin-top: 0.5rem;
        padding: 0 1rem;
    }
    
    /* REORDER LAYOUT FOR PRINT */
    .content-grid {
        display: block;
    }
    
    /* Get In Touch and Core Skills side by side - 50% each */
    .sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        margin-bottom: 0.75rem;
    }
    
    /* Get In Touch - first card, left column */
    .sidebar > .card:nth-child(1) {
        order: 1;
        grid-column: 1;
    }
    
    /* Core Skills - second card, right column */
    .sidebar > .card:nth-child(2) {
        order: 2;
        grid-column: 2;
    }
    
    /* Community Card - move to end, hide for now */
    .sidebar > .community-card {
        order: 999;
        grid-column: 1 / -1;
        display: none !important;
    }
    
    /* Community Card at end of main-feed - only show in print */
    .community-card-print {
        display: none;
    }
    
    /* Main feed starts after sidebar */
    .main-feed {
        gap: 0.75rem;
    }
    
    /* Hello Families - directly after Get In Touch / Core Skills */
    .bio-card {
        order: 1;
    }
    
    /* Timeline section */
    .timeline-section {
        order: 2;
    }
    
    /* Teaching Card */
    .teaching-card {
        order: 3;
    }
    
    /* Show Community Card at end in print */
    .community-card-print {
        display: block !important;
        order: 4;
        margin-top: 0;
    }
    
    /* Make timeline more compact - match teaching section style */
    .timeline-header {
        margin-bottom: 0.5rem;
    }
    
    .timeline-title {
        font-size: 0.75rem;
    }
    
    .timeline-icon {
        width: 0.75rem;
        height: 0.75rem;
    }
    
    .timeline-older-hidden {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .timeline-section {
        gap: 0.5rem;
    }
    
    .timeline-item {
        padding: 0.5rem;
        margin-bottom: 0;
        box-shadow: none;
        border: 1px solid #e5e7eb;
        background-color: white;
        page-break-inside: avoid;
        break-inside: avoid;
        gap: 0.5rem;
    }
    
    .timeline-item.older {
        background-color: white;
        border: 1px solid #e5e7eb;
    }
    
    .timeline-item.older .timeline-bubble {
        background-color: #fef3c7;
        color: #d97706;
    }
    
    .timeline-item.older .timeline-period {
        color: #fb923c;
    }
    
    .timeline-item.older .timeline-job-title {
        color: #1e293b;
    }
    
    .timeline-item.older .timeline-details {
        color: #64748b;
    }
    
    .timeline-bubble {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.563rem;
    }
    
    .timeline-period {
        font-size: 0.5rem;
    }
    
    .timeline-job-title {
        font-size: 0.75rem;
        line-height: 1.2;
    }
    
    .timeline-details {
        font-size: 0.563rem;
        margin-top: 0.125rem;
    }
    
    .timeline-badge {
        font-size: 0.438rem;
        padding: 0.063rem 0.313rem;
    }
    
    .timeline-badge svg {
        width: 0.625rem;
        height: 0.625rem;
    }
    
    .timeline-header-row {
        margin-bottom: 0.125rem;
    }
    
    /* Compact teaching card */
    .teaching-card {
        padding: 0.75rem;
        box-shadow: none;
        border: 1px solid #e5e7eb;
        page-break-inside: avoid;
        break-inside: avoid;
    }
    
    .teaching-grid {
        gap: 0.5rem;
    }
    
    .teaching-item {
        padding: 0.5rem;
        gap: 0.5rem;
        box-shadow: none;
        border: 1px solid #e5e7eb;
        page-break-inside: avoid;
        break-inside: avoid;
    }
    
    .teaching-year {
        font-size: 0.563rem;
        width: 3rem;
    }
    
    .teaching-role {
        font-size: 0.75rem;
    }
    
    .teaching-group {
        font-size: 0.563rem;
    }
    
    /* Compact community card - moved to end */
    .community-card {
        background-color: #fff7ed !important;
        color: black !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        color-adjust: exact;
        border: 1px solid #fed7aa !important;
        padding: 0.75rem;
    }
    
    .community-card .card-title {
        color: #ea580c !important;
        font-size: 0.875rem;
    }
    
    .community-section {
        margin-bottom: 0.5rem;
        page-break-inside: avoid;
        break-inside: avoid;
    }
    
    .community-category {
        font-size: 0.563rem;
        color: #ea580c !important;
        opacity: 1 !important;
    }
    
    .community-list {
        font-size: 0.625rem;
        color: #475569 !important;
        opacity: 1 !important;
    }
    
    .community-list li {
        color: #475569 !important;
        opacity: 1 !important;
    }
    
    /* Compact footer - much smaller */
    .footer {
        margin-top: 1rem;
        padding: 0 1rem;
    }
    
    .footer-card {
        padding: 0.5rem;
        box-shadow: none;
        border: 1px solid #e5e7eb;
        page-break-inside: avoid;
        break-inside: avoid;
    }
    
    .footer-icon {
        width: 1rem;
        height: 1rem;
        margin-bottom: 0.25rem;
    }
    
    .footer-title {
        font-size: 0.75rem;
        margin-bottom: 0.125rem;
    }
    
    .footer-text {
        font-size: 0.625rem;
        margin-bottom: 0;
        line-height: 1.3;
    }
}
