/* Minimal Portfolio - Based on Figma Reference */

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

/* Typography & Base */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #000;
    background: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container - ReadCV Style */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 82px 62px;
}

@media (max-width: 730px) {
    .container {
        max-width: 400;
        padding: 70px 22px 24px;
    }
    
    .portfolio-work {
        margin-left: -22px;
        margin-right: -22px;
        padding: 0 22px;
        width: calc(100% + 44px);
    }
}

/* Hero Section - ReadCV Style */
.hero {
    margin-bottom: 55px;
    text-align: center;
}

.profile-image {
    margin-bottom: 20px;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 100px;
    object-fit: cover;
    object-position: center;
    margin: 0 auto;
    display: block;
}

.name {
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 8px;
    color: #111;
    line-height: 1.3;
}

/* Title Badges - ReadCV Style */
.title-badges {
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.title {
    font-size: 12px;
    font-weight: 400;
    color: #6D6D6D;
    background: #F6F6F6;
    padding: 2px 10px 3px;
    border-radius: 12px;
    line-height: 1;
    display: inline-block;
}

/* Impact Summary */
.impact-summary {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #F0F0F0;
}

.impact-title {
    font-size: 14px;
    font-weight: 400;
    color: #111;
    margin-bottom: 8px;
}

.tldr {
    font-size: 12px;
    color: #6D6D6D;
    margin-bottom: 16px;
}

.impact-list p {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 8px;
}

.impact-list strong {
    font-weight: 600;
    color: #111;
}

.description {
    font-size: 14px;
    line-height: 1.8;
    color: #555;
    max-width: 500px;
    margin: 0 auto;
}

/* CV Download Button */
.cv-download {
    margin-top: 24px;
    text-align: center;
}

.cv-button {
    display: inline-block;
    background: #111;
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid #111;
}

.cv-button:hover {
    background: #333;
    border-color: #333;
    transform: translateY(-1px);
}

/* Section Titles - ReadCV Style */
.section-title {
    font-size: 15px;
    font-weight: 400;
    margin-bottom: 24px;
    color: #111;
    line-height: 1.4;
}

/* Work Experience - ReadCV Style */
.work-experience {
    margin-bottom: 55px;
}

.experience-item {
    display: flex;
    gap: 20px;
    margin-bottom: 44px;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
}

.experience-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(250, 250, 250, 0.75) 0%,
        rgba(248, 248, 248, 0.75) 25%,
        rgba(252, 252, 252, 0.75) 50%,
        rgba(246, 246, 246, 0.75) 75%,
        rgba(250, 250, 250, 0.75) 100%
    );
    border-radius: 8px;
    opacity: 0;
    z-index: 0;
}

.experience-item > * {
    position: relative;
    z-index: 1;
}

.experience-date {
    font-size: 15px;
    color: #6D6D6D;
    line-height: 1.4;
    min-width: 150px;
    flex-shrink: 0;
}

.experience-content {
    flex: 1;
}

.role-title {
    font-size: 15px;
    font-weight: 400;
    color: #111;
    margin-bottom: 10px;
    line-height: 1.4;
}

.role-title a {
    color: #111;
    text-decoration: none;
    position: relative;
}

.role-title a:hover {
    color: #111;
    text-decoration: underline;
}

.role-title a[target="_blank"]:after {
    content: "↗";
    font-size: 12px;
    margin-left: 2px;
    vertical-align: super;
    line-height: 1;
    text-decoration: none !important;
    display: inline-block;
}

.case-study-link {
    display: inline-block;
    font-size: 13px;
    color: #6D6D6D;
    text-decoration: none;
    margin-top: 4px;
    margin-bottom: 10px;
    transition: color 0.2s ease;
}

.case-study-link:hover {
    color: #111;
    text-decoration: underline;
}

.achievements {
    margin-top: 8px;
}

.achievements p {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 4px;
}

.achievements strong {
    font-weight: 600;
    color: #111;
}

.achievements a {
    color: #111;
    text-decoration: none;
    position: relative;
}

.achievements a:hover {
    color: #111;
    text-decoration: underline;
}

.achievements a[target="_blank"] {
    text-decoration-skip-ink: none;
}

.achievements a[target="_blank"]:after {
    content: "↗";
    font-size: 12px;
    margin-left: 2px;
    vertical-align: super;
    line-height: 1;
    text-decoration: none !important;
    display: inline-block;
}

/* Portfolio Work Image */
.portfolio-work {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.portfolio-caption {
    font-size: 10px;
    color: #6D6D6D;
    text-align: center;
    margin-top: 6px;
    margin-bottom: 0;
    line-height: 1.2;
    max-width: 200px;
}

.portfolio-thumbnail {
    width: 200px;
    height: auto;
    border-radius: 8px;
    border: 1px solid #E5E5E5;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.portfolio-thumbnail:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Small Portfolio Gallery */
.portfolio-gallery-small {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    overflow-x: scroll;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    padding-bottom: 4px;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding-left: calc(50vw - 50% + 0px);
    padding-right: calc(50vw - 50% + 22px);
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.portfolio-gallery-small::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.portfolio-item-small {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}


.portfolio-thumbnail-small {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #E5E5E5;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.portfolio-thumbnail-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.portfolio-thumbnail-bnpl {
    width: auto;
    height: 140px;
    border-radius: 6px;
    border: 1px solid #E5E5E5;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
}

.portfolio-thumbnail-bnpl:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.portfolio-caption-small {
    font-size: 10px !important;
    color: #6D6D6D !important;
    text-align: center;
    margin-top: 4px !important;
    margin-bottom: 0 !important;
    line-height: 1.2 !important;
    max-width: 120px;
}

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.97);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.modal-image {
    max-width: 95vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 8px;
    display: block;
    object-fit: contain;
}

/* Loading state */
.modal-loading {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 14px;
}

.modal-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.modal-content.loading .modal-image {
    opacity: 0;
}

.modal-content.loading .modal-caption {
    opacity: 0;
}

.modal-content.loading .modal-loading {
    display: block;
}

.modal-caption {
    font-size: 14px;
    color: #fff;
    text-align: center;
    margin-top: 12px;
    line-height: 1.4;
    padding: 0 20px;
    max-width: 600px;
}

/* Modal Navigation */
.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 48px;
    width: auto;
    height: auto;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 20px;
    font-family: system-ui, -apple-system, sans-serif;
}

.modal-nav:hover {
    color: #fff;
    transform: translateY(-50%) scale(1.2);
}

.modal-nav-prev {
    left: 30px;
}

.modal-nav-prev::after {
    content: '←';
    display: block;
    margin-right: 2px;
}

.modal-nav-next {
    right: 30px;
}

.modal-nav-next::after {
    content: '→';
    display: block;
    margin-left: 2px;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 36px;
    width: 44px;
    height: 44px;
    cursor: pointer;
    transition: opacity 0.3s ease;
    opacity: 0.7;
    line-height: 1;
    padding: 0;
}

.modal-close:hover {
    opacity: 1;
}

@media (max-width: 730px) {
    .modal-nav {
        font-size: 0;
        padding: 0;
        background: transparent;
        pointer-events: none;
    }
    
    .modal-nav-prev,
    .modal-nav-next {
        display: none;
    }
    
    .modal-nav-prev::after,
    .modal-nav-next::after {
        display: none;
    }
    
    .modal-image {
        max-width: 100vw;
        max-height: 85vh;
    }
}

.location {
    font-size: 12px;
    color: #6D6D6D;
    margin: 0;
}

/* Portfolio Gallery */
.portfolio-gallery {
    display: flex;
    gap: 10px;
    margin-top: 60px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.gallery-item {
    flex-shrink: 0;
    width: 200px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #E5E5E5;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Entrepreneurial DNA - ReadCV Style */
.ventures {
    margin-bottom: 55px;
}

/* Status indicators */
.status-online::before,
.status-offline::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

.status-online::before {
    background-color: #22c55e;
}

.status-offline::before {
    background-color: #ef4444;
}

/* Interesting Facts - Card Grid Layout */
.innovations {
    margin-bottom: 55px;
}

.facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.fact-card {
    background: #FAFAFA;
    border: 1px solid #F0F0F0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.fact-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border-color: #E0E0E0;
}

.fact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        #FF6B6B 0%, 
        #4ECDC4 25%, 
        #45B7D1 50%, 
        #96CEB4 75%, 
        #FFEAA7 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fact-card:hover::before {
    opacity: 1;
}

.fact-icon {
    font-size: 24px;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F6F6F6;
    border-radius: 10px;
    margin-top: 2px;
}

.fact-content {
    flex: 1;
}

.fact-title {
    font-size: 14px;
    font-weight: 500;
    color: #111;
    margin-bottom: 8px;
    line-height: 1.3;
}

.fact-description {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

.fact-description strong {
    font-weight: 600;
    color: #111;
}

.fact-description em {
    font-style: italic;
    color: #6D6D6D;
}

.fact-description a {
    color: #111;
    text-decoration: none;
    position: relative;
}

.fact-description a:hover {
    color: #111;
    text-decoration: underline;
}

.fact-description a[target="_blank"]:after {
    content: "↗";
    font-size: 11px;
    margin-left: 2px;
    vertical-align: super;
    line-height: 1;
    text-decoration: none !important;
    display: inline-block;
}

/* Cases Section */
.cases {
    margin-bottom: 55px;
}

.case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.case-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #FAFAFA;
    border: 1px solid #F0F0F0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.case-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border-color: #E0E0E0;
}

.case-thumbnail {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #F6F6F6;
}

.case-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.case-content {
    padding: 20px;
}

.case-title {
    font-size: 16px;
    font-weight: 500;
    color: #111;
    margin-bottom: 8px;
    line-height: 1.3;
}

.case-description {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 12px;
}

.case-link {
    font-size: 14px;
    color: #111;
    font-weight: 500;
}

@media (max-width: 730px) {
    .case-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .case-thumbnail {
        height: 150px;
    }
    
    .case-content {
        padding: 16px;
    }
}

/* Writing - ReadCV Style */
.writing {
    margin-bottom: 55px;
}

.writing-item {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    align-items: flex-start;
    position: relative;
}

.writing-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(250, 250, 250, 0.75) 0%,
        rgba(248, 248, 248, 0.75) 25%,
        rgba(252, 252, 252, 0.75) 50%,
        rgba(246, 246, 246, 0.75) 75%,
        rgba(250, 250, 250, 0.75) 100%
    );
    border-radius: 8px;
    opacity: 0;
    z-index: 0;
}

.writing-item > * {
    position: relative;
    z-index: 1;
}

.writing-item:hover::before {
    opacity: 1;
}

.writing-date {
    font-size: 14px;
    color: #6D6D6D;
    line-height: 1.4;
    min-width: 150px;
    flex-shrink: 0;
}

.writing-content {
    flex: 1;
}

.writing-title {
    font-size: 14px;
    font-weight: 400;
    color: #111;
    margin-bottom: 8px;
    line-height: 1.4;
}

.writing-title a {
    color: #111;
    text-decoration: none;
    position: relative;
}

.writing-title a:hover {
    color: #111;
    text-decoration: underline;
}

.writing-title a[target="_blank"]:after {
    content: "↗";
    font-size: 12px;
    margin-left: 2px;
    vertical-align: super;
    line-height: 1;
    text-decoration: none !important;
    display: inline-block;
}

.writing-description {
    font-size: 14px;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.6;
}

.writing-preview-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 8px;
    overflow: hidden;
}

.writing-preview-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.writing-preview {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: #F9F9F9;
    border-radius: 8px;
    border: 1px solid #F0F0F0;
    overflow: hidden;
}

.preview-image {
    flex-shrink: 0;
}

.preview-img {
    width: 200px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
}

.preview-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.preview-title {
    font-size: 14px;
    font-weight: 400;
    color: #111;
    margin-bottom: 4px;
    line-height: 1.4;
}

.read-time {
    font-size: 12px;
    color: #6D6D6D;
    margin: 0;
}

/* Key Metrics - ReadCV Style */
.metrics {
    margin-bottom: 55px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.metric {
    text-align: center;
    padding: 20px;
    background: #F2F2F2;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.metric::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 154, 158, 0.1) 0%,
        rgba(250, 208, 196, 0.1) 25%,
        rgba(212, 252, 121, 0.1) 50%,
        rgba(150, 230, 161, 0.1) 75%,
        rgba(168, 219, 168, 0.1) 100%
    );
    border-radius: 8px;
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 0;
}

.metric > * {
    position: relative;
    z-index: 1;
}

.metric-value {
    font-size: 20px;
    font-weight: 400;
    color: #111;
    margin-bottom: 8px;
    display: block;
}

.metric-label {
    font-size: 12px;
    line-height: 1.4;
    color: #6D6D6D;
}

@media (max-width: 730px) {
    .metric-label {
        font-size: 13px;
    }
}

.metric-multiplier {
    font-size: 14px;
    vertical-align: baseline;
    line-height: 1;
}

/* Education - ReadCV Style */
.education {
    margin-bottom: 55px;
}

/* Highlight effect - felt-tip pen style */
.highlight {
    background: linear-gradient(120deg, rgba(255, 235, 59, 0.3) 0%, rgba(255, 235, 59, 0.3) 100%);
    background-size: 100% 0.5em;
    background-repeat: no-repeat;
    background-position: 0 bottom;
    padding: 0 5px;
    border-radius: 2px;
}

/* Contact - ReadCV Style */
.contact {
    margin-bottom: 55px;
}

.contact-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-link {
    font-size: 14px;
    color: #111;
    text-decoration: none;
    transition: color 0.2s ease;
    position: relative;
}

.contact-link:hover {
    color: #111;
    text-decoration: underline;
}

.contact-link[target="_blank"]:after {
    content: "↗";
    font-size: 12px;
    margin-left: 2px;
    vertical-align: super;
    line-height: 1;
    text-decoration: none !important;
    display: inline-block;
}

.contact-separator {
    font-size: 14px;
    color: #6D6D6D;
    margin: 0 4px;
}

/* Responsive Design - ReadCV Style */
@media (max-width: 730px) {
    .name {
        font-size: 20px;
    }
    
    .title {
        font-size: 14px;
    }
    
    .description {
        font-size: 14px;
    }
    
    .section-title {
        font-size: 17px;
        margin-bottom: 20px;
    }
    
    .experience-item {
        flex-direction: column;
        gap: 4px;
        margin-bottom: 32px;
    }
    
    .experience-date {
        min-width: auto;
        margin-bottom: 4px;
    }
    
    .venture-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    
    .portfolio-gallery {
        margin-top: 40px;
    }
    
    .gallery-item {
        width: 150px;
        height: 90px;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .contact-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .contact-separator {
        display: none;
    }
    
    
    .facts-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .fact-card {
        padding: 16px;
    }
    
    .fact-icon {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
    
    .writing-item {
        flex-direction: column;
        gap: 4px;
        margin-bottom: 32px;
        padding: 16px;
        margin: -16px -16px 16px;
        border-radius: 8px;
    }
    
    .writing-date {
        min-width: auto;
        margin-bottom: 4px;
    }
    
    .writing-preview {
        flex-direction: column;
        gap: 12px;
    }
    
    .preview-img {
        width: 100%;
        height: 130px;
    }
    
    .portfolio-thumbnail {
        width: 100%;
        max-width: 300px;
    }
    
    .portfolio-gallery-small {
        gap: 6px;
        padding-left: calc(50vw - 50% + 0px);
        padding-right: calc(50vw - 50% + 22px);
    }
    
    .portfolio-thumbnail-small {
        width: 150px;
        height: 150px;
    }
    
    .portfolio-thumbnail-bnpl {
        height: 150px;
    }
    
    .portfolio-caption-small {
        max-width: 140px;
    }
    
    .achievements p {
        font-size: 15px;
        line-height: 1.5;
    }
    
    .title-badges {
        justify-content: center;
        gap: 6px;
    }
}

/* Subtle Hover Effects */
.experience-item {
    padding: 20px 16px 20px 16px;
    margin: -16px;
    border-radius: 8px;
}

.writing-item {
    padding: 16px;
    margin: -16px;
    border-radius: 8px;
    overflow: hidden;
}

.experience-item:hover::before {
    opacity: 1;
}

.venture-item {
    transition: background-color 0.2s ease;
    padding: 12px;
    margin: -12px;
    border-radius: 6px;
}

.venture-item:hover {
    background-color: #fafafa;
}

.innovation-item {
    transition: background-color 0.2s ease;
    padding: 12px;
    margin: -12px;
    border-radius: 6px;
}

.innovation-item:hover {
    background-color: #fafafa;
}

.metric:hover,
.metric.scroll-active {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    background: #fff;
}

.metric:hover::before,
.metric.scroll-active::before {
    opacity: 1;
}

/* Footer */
.footer {
    margin-top: 160px;
    padding: 40px 20px;
    margin-bottom: 200px;
    text-align: center;
}

.footer p {
    font-size: 13px;
    color: #b1b1b1;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

@media (max-width: 730px) {
    .footer {
        margin-top: 60px;
        padding: 30px 20px;
    }
    
    .footer p {
        font-size: 12px;
    }
}

/* Table of Contents */
.toc-container {
    position: fixed;
    top: 24px;
    right: 24px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    z-index: 1000;
    min-width: 200px;
    max-width: 280px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Desktop TOC content is always visible unless explicitly collapsed */
@media (min-width: 731px) {
    .toc-content {
        padding: 8px 0 16px;
        max-height: 400px;
        overflow-y: auto;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .toc-content.collapsed {
        max-height: 0;
        padding: 0;
        overflow: hidden;
    }
}

.toc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.toc-title {
    font-size: 14px;
    font-weight: 500;
    color: #666;
}

.toc-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    color: #999;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toc-toggle:hover {
    background: rgba(0, 0, 0, 0.03);
    color: #666;
}

/* Desktop TOC content styles are in the media query above */

.toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.toc-list li {
    margin: 0;
}

.toc-link {
    display: block;
    padding: 8px 20px;
    font-size: 13px;
    color: #888;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.toc-link:hover {
    color: #555;
    background: rgba(0, 0, 0, 0.02);
}

.toc-link.active {
    color: #444;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.03);
}

.toc-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #888;
    border-radius: 0 1px 1px 0;
}

/* Mobile TOC */
@media (max-width: 730px) {
    .toc-container {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        width: 100%;
        max-width: 100%;
        min-width: auto;
        border-radius: 24px 24px 0 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(16px);
        box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.08);
        transform: translateY(calc(100% - 56px));
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .toc-container.expanded {
        transform: translateY(0);
    }
    
    .toc-header {
        padding: 16px 24px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        position: relative;
    }
    
    .toc-header::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 36px;
        height: 4px;
        background: rgba(0, 0, 0, 0.2);
        border-radius: 2px;
    }
    
    .toc-title {
        font-size: 14px;
        font-weight: 600;
        color: #333;
        transition: all 0.3s ease;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: calc(100% - 40px);
    }
    
    .toc-toggle {
        display: none;
    }
    
    .toc-content {
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.3s ease, opacity 0.3s ease;
        padding: 0;
    }
    
    .toc-container.expanded .toc-content {
        max-height: 60vh;
        overflow-y: auto;
        opacity: 1;
        padding: 8px 0 24px;
        -webkit-overflow-scrolling: touch;
    }
    
    .toc-content.collapsed {
        display: none;
    }
    
    .toc-link {
        padding: 12px 24px;
        font-size: 14px;
        color: #555;
    }
    
    .toc-link:hover {
        background: rgba(0, 0, 0, 0.03);
    }
    
    .toc-link.active {
        color: #1a1a1a;
        font-weight: 600;
        background: rgba(0, 0, 0, 0.05);
    }
    
    .toc-link.active::before {
        width: 3px;
        background: #1a1a1a;
    }
    
    .toc-badge {
        font-size: 10px;
        padding: 2px 6px;
        margin-left: 8px;
    }
}

/* TOC Badge */
.toc-badge {
    display: inline-block;
    background: #e8f5e8;
    color: #2d6a2d;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 8px;
    margin-left: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    vertical-align: middle;
}

@media (max-width: 730px) {
    .toc-badge {
        font-size: 9px;
        padding: 1px 4px;
        margin-left: 4px;
    }
}

/* Books & Resources Section */
.books {
    margin-bottom: 60px;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.book-item {
    display: flex;
    gap: 20px;
    transition: all 0.2s ease;
    padding: 20px;
    margin: -20px;
    border-radius: 8px;
}

.book-item:hover {
    background: rgba(0, 0, 0, 0.02);
}

.book-cover {
    flex-shrink: 0;
    width: 80px;
}

.book-image {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.book-content {
    flex: 1;
}

.book-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 8px;
}

.book-author {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.book-year {
    font-size: 13px;
    color: #999;
    font-weight: 400;
}

.book-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 8px;
}

.book-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.book-title a:hover {
    color: #666;
}

.book-title a[target="_blank"]:after {
    content: "↗";
    font-size: 12px;
    margin-left: 2px;
    vertical-align: super;
    line-height: 1;
    text-decoration: none !important;
    display: inline-block;
}

.book-description {
    font-size: 14px;
    line-height: 1.5;
    color: #555;
    margin: 0;
}

@media (max-width: 730px) {
    .books {
        margin-bottom: 40px;
    }
    
    .books-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .book-item {
        flex-direction: column;
        gap: 0;
        padding: 20px;
        margin: 0;
        background: #fafafa;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }
    
    .book-item:hover {
        background: #f5f5f5;
        transform: translateY(-2px);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    }
    
    .book-cover {
        width: 80px;
        align-self: center;
        margin-bottom: 16px;
    }
    
    .book-content {
        text-align: center;
    }
    
    .book-meta {
        flex-direction: column;
        gap: 2px;
        margin-bottom: 8px;
        justify-content: center;
    }
    
    .book-title {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .book-description {
        font-size: 14px;
        text-align: center;
    }
}

/* Scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Print Styles */
@media print {
    .container {
        max-width: none;
        padding: 0;
    }
    
    .hero {
        page-break-after: avoid;
    }
    
    .experience-item {
        page-break-inside: avoid;
    }
    
    .toc-container {
        display: none;
    }
}