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

:root {
    --text-primary: #000000;
    --text-secondary: #666666;
    --text-muted: #999999;
    --bg-primary: #ffffff;
    --border-color: #e0e0e0;
    --accent-color: #0066cc;
    --hover-color: #f5f5f5;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 40px;
}

/* Header */
.header {
    margin-bottom: 80px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.text-section {
    flex: 1;
}

.profile-section {
    flex-shrink: 0;
}

.profile-picture {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-picture:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.name {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.tagline {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
    max-width: 600px;
}

/* Social Icons */
.social-icons {
    display: flex;
    gap: 16px;
    margin-bottom: 30px;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 50%;
    background-color: transparent;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.social-icon:hover {
    color: var(--accent-color);
    background-color: var(--hover-color);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.social-icon svg {
    width: 20px;
    height: 20px;
    transition: transform 0.2s ease;
}

.social-icon:hover svg {
    transform: scale(1.1);
}

.divider {
    font-size: 24px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.nav {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

.nav a:hover {
    color: var(--accent-color);
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent-color);
    transition: width 0.2s ease;
}

.nav a:hover::after {
    width: 100%;
}

/* Main Content */
.main {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Sections */
.section {
    border-bottom: 1px solid var(--border-color);
    padding: 40px 0;
}

.section:last-child {
    border-bottom: none;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    cursor: pointer;
    user-select: none;
}

.section-number {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    min-width: 20px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.05em;
    flex: 1;
}

.section-toggle {
    background: none;
    border: none;
    font-size: 14px;
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit;
    transition: color 0.2s ease;
}

.section-toggle:hover {
    color: var(--text-primary);
}

.section-content {
    padding-left: 40px;
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.section-content.collapsed {
    max-height: 0;
    opacity: 0;
}

.section-content p {
    margin-bottom: 20px;
    color: var(--text-secondary);
    line-height: 1.7;
}

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

.section-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Experience Items */
.experience-item {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.experience-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.experience-item h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.experience-item p {
    margin-bottom: 0;
}

/* Investment Grid */
.investment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

/* Startup Grid */
.startup-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 30px;
}

.startup-item {
    padding: 0;
    margin-bottom: 25px;
}

.startup-item:last-child {
    margin-bottom: 0;
}

.startup-item h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.startup-link {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.startup-link:hover {
    color: var(--accent-color);
}

.startup-period {
    font-size: 14px;
    color: var(--accent-color);
    font-weight: 500;
    margin-bottom: 12px !important;
}

.startup-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0 !important;
}

/* HeyJared Social Icons */
.startup-item .heyjared-social-icons {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 0;
}

.startup-item .heyjared-social-icon,
.startup-item .heyjared-social-icon:link,
.startup-item .heyjared-social-icon:visited {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 24px !important;
    height: 24px !important;
    color: #999999 !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    background-color: transparent !important;
    transition: all 0.2s ease !important;
    border: 1px solid var(--border-color) !important;
}

.startup-item .heyjared-social-icon:hover,
.startup-item .heyjared-social-icon:focus,
.startup-item .heyjared-social-icon:active {
    color: var(--accent-color) !important;
    background-color: var(--hover-color) !important;
    border-color: var(--accent-color) !important;
    transform: translateY(-1px) !important;
}

.startup-item .heyjared-social-icon svg {
    width: 12px !important;
    height: 12px !important;
    transition: transform 0.2s ease !important;
    color: inherit !important;
    fill: currentColor !important;
}

.startup-item .heyjared-social-icon:hover svg {
    transform: scale(1.1) !important;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 30px;
}

.blog-item {
    padding: 0;
    margin-bottom: 25px;
}

.blog-item:last-child {
    margin-bottom: 0;
}

.blog-item h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.blog-link {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-link:hover {
    color: var(--accent-color);
}

.blog-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0 !important;
}

.investment-category h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.investment-item {
    margin-bottom: 15px;
}

.investment-item:last-child {
    margin-bottom: 0;
}

.company-name {
    display: block;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 2px;
}

.company-name a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.company-name a:hover {
    color: var(--accent-color);
}

.company-description {
    display: block;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 8px;
}

/* Photo Links */
.photo-links {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.photo-links a, .portfolio-link, .social-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.photo-links a:hover, .portfolio-link:hover, .social-link:hover {
    color: var(--accent-color);
}

/* Photography Image */
.photography-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    margin-top: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.photography-image:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Pet Image */
.pet-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    margin-top: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pet-image:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Education Section */
.education-item {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #f0f0f0;
}

.education-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.education-item h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.degree {
    font-size: 14px;
    color: var(--accent-color);
    font-weight: 500;
    margin-bottom: 15px !important;
}

.coursework-list, .grades-list {
    margin: 15px 0;
    padding-left: 20px;
}

.coursework-list li, .grades-list li {
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.5;
}

.coursework-list li strong {
    color: var(--text-primary);
}

.activities, .achievements {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-top: 15px;
}

.activities strong, .achievements strong {
    color: var(--text-primary);
}

/* Unified External Link Styling (SpaceX-style) */
.external-link, .patent-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.external-link:hover, .patent-link:hover {
    color: var(--accent-color);
}

/* Connect Links */
.connect-links {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.connect-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 18px;
    transition: color 0.2s ease;
}

.connect-links a:hover {
    color: var(--accent-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 40px 20px;
    }
    
    .header {
        margin-bottom: 40px; /* Reduced from 80px to 40px for mobile */
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 25px;
    }
    
    .profile-section {
        order: -1; /* This moves the profile picture before the text section */
    }
    
    .profile-picture {
        width: 130px;
        height: 130px;
    }
    
    .name {
        font-size: 36px;
    }
    
    .tagline {
        font-size: 16px;
    }
    
    .social-icons {
        justify-content: center;
        gap: 20px;
    }
    
    .nav {
        gap: 20px;
    }
    
    .section-header {
        gap: 15px;
    }
    
    .section-content {
        padding-left: 35px;
    }
    
    .investment-grid,
    .startup-grid,
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .photo-links,
    .connect-links {
        flex-direction: column;
        gap: 15px;
    }
    
    .connect-links a {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 30px 15px;
    }
    
    .header {
        margin-bottom: 30px; /* Even smaller spacing for very small screens */
    }
    
    .profile-section {
        order: -1; /* Ensure profile picture comes first on smaller screens too */
    }
    
    .profile-picture {
        width: 110px;
        height: 110px;
    }
    
    .name {
        font-size: 28px;
    }
    
    .section-content {
        padding-left: 25px;
    }
    
    .section-header {
        gap: 10px;
    }
}

/* Smooth animations */
.section-header:hover .section-title {
    color: var(--accent-color);
    transition: color 0.2s ease;
}

/* Focus states for accessibility */
.section-header:focus-within .section-title,
.section-toggle:focus {
    color: var(--accent-color);
    outline: none;
}

/* Print styles */
@media print {
    .section-toggle {
        display: none;
    }
    
    .section-content {
        max-height: none !important;
        opacity: 1 !important;
    }
}