/* ===== CSS VARIABLES ===== */
:root {
    /* Light mode colors */
    --bg-color: #fff;
    --text-color: #333;
    --text-muted: #666;
    --text-subtle: #555;
    --text-light: #888;
    --text-meta: #999;
    --border-color: #ccc;
    --border-hover: #aaa;
    --border-subtle: #ddd;
    --accent-color: #0066cc;
    --accent-hover: #0052a3;
    --card-bg: #fff;
    --button-bg: #f5f5f5;
    --button-hover: #eeeeee;
    --highlight-bg: #f0f8ff;
    --shadow: rgba(0,0,0,0.1);
    --profile-image: url('almond.png');
}

/* Dark mode colors */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #0d1117;
        --text-color: #e6edf3;
        --text-muted: #7d8590;
        --text-subtle: #c9d1d9;
        --text-light: #8b949e;
        --text-meta: #6e7681;
        --border-color: #30363d;
        --border-hover: #444c56;
        --border-subtle: #21262d;
        --accent-color: #58a6ff;
        --accent-hover: #1f6feb;
        --card-bg: #161b22;
        --button-bg: #21262d;
        --button-hover: #30363d;
        --highlight-bg: #0d419d;
        --shadow: rgba(0,0,0,0.3);
        --profile-image: url('almond_dark.png');
    }
}

/* Manual dark mode override */
[data-theme="dark"] {
    --bg-color: #0d1117;
    --text-color: #e6edf3;
    --text-muted: #7d8590;
    --text-subtle: #c9d1d9;
    --text-light: #8b949e;
    --text-meta: #6e7681;
    --border-color: #30363d;
    --border-hover: #444c56;
    --border-subtle: #21262d;
    --accent-color: #58a6ff;
    --accent-hover: #1f6feb;
    --card-bg: #161b22;
    --button-bg: #21262d;
    --button-hover: #30363d;
    --highlight-bg: #0d419d;
    --shadow: rgba(0,0,0,0.3);
    --profile-image: url('almond_dark.png');
}

/* Manual light mode override */
[data-theme="light"] {
    --bg-color: #fff;
    --text-color: #333;
    --text-muted: #666;
    --text-subtle: #555;
    --text-light: #888;
    --text-meta: #999;
    --border-color: #eee;
    --border-hover: #ccc;
    --border-subtle: #ddd;
    --accent-color: #0066cc;
    --accent-hover: #0052a3;
    --card-bg: #fff;
    --button-bg: #f5f5f5;
    --button-hover: #eeeeee;
    --highlight-bg: #f0f8ff;
    --shadow: rgba(0,0,0,0.1);
    --profile-image: url('almond.png');
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
    font-size: 16px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ===== LAYOUT ===== */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* ===== HEADER ===== */
.header {
    text-align: center;
    margin-bottom: 60px;
}

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

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto;
    border: 3px solid var(--border-color);
    object-fit: cover;
    display: block;
}

.name {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
}

.title {
    font-size: 18px;
    color: var(--text-muted);
    font-weight: 400;
}

/* ===== SECTIONS ===== */
section {
    margin-bottom: 48px;
}

h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-color);
}

p {
    color: var(--text-subtle);
    margin-bottom: 16px;
}

.link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.link:hover {
    text-decoration: underline;
}

/* ===== CONTACT ===== */
.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 8px;
}

.contact-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

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

/* ===== AWARENESS RAISING ===== */
.awareness-raising {
    margin-bottom: 3rem;
}

.awareness-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    background: var(--card-bg);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.awareness-content:hover {
    border-color: var(--border-hover);
    box-shadow: 0 4px 12px var(--shadow);
}

.awareness-content:has(.awareness-clickable):hover {
    transform: translateY(-2px);
    transition: transform 0.2s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.awareness-content:has(.awareness-clickable) {
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.awareness-content h2 {
    margin: 0 0 16px 0;
    color: var(--text-color);
    font-size: 24px;
    font-weight: 600;
}

.awareness-content p {
    margin: 0 0 12px 0;
    line-height: 1.6;
}

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

.awareness-clickable {
    display: block;
    width: 100%;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.awareness-clickable:hover {
    color: inherit;
    text-decoration: none;
}

.awareness-clickable h2,
.awareness-clickable p {
    pointer-events: none;
}

.awareness-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.awareness-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* ===== PUBLICATIONS ===== */
.publications-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.publication {
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    transition: border-color 0.2s ease;
}

.publication:hover {
    border-color: var(--border-hover);
}

.publication-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--text-color);
}

.publication-authors {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.publication-journal {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.publication-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-meta);
}

.publication-link {
    color: var(--accent-color);
    text-decoration: none;
}

.publication-link:hover {
    text-decoration: underline;
    color: var(--accent-hover);
}

.show-more-btn {
    background: var(--button-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 16px;
    color: var(--text-color);
    transition: background-color 0.2s ease;
}

.show-more-btn:hover {
    background: var(--button-hover);
}

.publication.hidden {
    display: none;
}

/* ===== CAROUSEL ===== */
.carousel-container {
    overflow: hidden;
    position: relative;
}

.carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 10px;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.carousel::-webkit-scrollbar {
    height: 6px;
}

.carousel::-webkit-scrollbar-track {
    background: var(--button-bg);
    border-radius: 3px;
}

.carousel::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: 3px;
}

.carousel::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* ===== OPEN SOURCE ===== */
.repo-card {
    flex: 0 0 280px;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.repo-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 2px 8px var(--shadow);
}

.repo-card h3 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-color);
}

.repo-card p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1.4;
}

.repo-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.repo-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.repo-language {
    font-size: 12px;
    color: var(--text-meta);
}

.repo-fork-badge {
    font-size: 10px;
    background: var(--highlight-bg);
    color: var(--accent-color);
    padding: 2px 6px;
    border-radius: 3px;
    margin-top: 8px;
    display: inline-block;
}

.see-more-card {
    flex: 0 0 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 2px dashed var(--border-subtle);
    border-radius: 8px;
    background: var(--button-bg);
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.2s ease;
}

.see-more-card:hover {
    border-color: var(--border-hover);
    background: var(--button-hover);
    color: var(--text-color);
}

/* ===== ONLINE COURSE ===== */
.course-card {
    display: flex;
    gap: 24px;
    padding: 24px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    align-items: center;
}

.course-logo {
    flex: 0 0 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.course-logo img {
    max-width: 100%;
    /* max-height: 120px; */
    object-fit: contain;
}

.course-content {
    flex: 1;
}

.course-title {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--text-color);
}

.course-provider {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.course-description {
    font-size: 14px;
    color: var(--text-subtle);
    margin-bottom: 12px;
    line-height: 1.4;
}

.course-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.course-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.course-highlight {
    background: var(--highlight-bg);
    color: var(--accent-color);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.course-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.course-link:hover {
    text-decoration: underline;
    color: var(--accent-hover);
}

/* ===== CSSP (Cute Simple Side Projects) ===== */
.cssp-card {
    flex: 0 0 200px;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
}

.cssp-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 2px 8px var(--shadow);
    text-decoration: none;
    color: inherit;
    transform: translateY(-2px);
}

.cssp-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
}

.cssp-favicon {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: contain;
}

.cssp-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cssp-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    line-height: 1.3;
}

.cssp-description {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.3;
}

/* ===== TALKS & VIDEOS ===== */
.talk-card {
    flex: 0 0 260px;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    display: block;
}

.talk-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 2px 8px var(--shadow);
    text-decoration: none;
    color: inherit;
    transform: translateY(-2px);
}

.talk-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.talk-icon {
    font-size: 16px;
    color: var(--text-muted);
}

.talk-platform {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.talk-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--text-color);
    line-height: 1.3;
}

.talk-type {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 6px;
}

.talk-description {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.3;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.talk-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-meta);
}

.language-tag {
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: auto;
}

/* English language tag - cool blue */
.language-tag.lang-en {
    background: var(--accent-color);
    color: var(--bg-color);
}

/* Hebrew language tag - lighter inverted blue */
.language-tag.lang-he {
    background: var(--highlight-bg);
    color: var(--accent-color);
}

/* Default fallback */
.language-tag:not(.lang-en):not(.lang-he) {

}

/* ===== PUBLICATIONS PAGE ===== */
.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-color);
    text-decoration: none;
    margin-bottom: 20px;
    font-weight: 500;
}

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

.page-subtitle {
    color: var(--text-muted);
    font-size: 18px;
    margin-top: 10px;
}

.scholar-link {
    margin-top: 20px;
}

.scholar-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 400;
    font-size: 14px;
    transition: color 0.2s ease;
}

.scholar-button:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.publications-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.publication-card {
    display: flex;
    gap: 20px;
    padding: 30px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--card-bg);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.publication-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 4px 12px var(--shadow);
}

.publication-year {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-color);
    min-width: 60px;
    text-align: center;
}

.publication-content {
    flex: 1;
}

.publication-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 12px 0;
}

.publication-title a {
    color: var(--text-color);
    text-decoration: none;
}

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

.publication-journal {
    font-weight: 500;
    color: var(--accent-color);
    margin-bottom: 12px;
}

.publication-description {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

.publication-actions {
    margin-top: 15px;
}

.publication-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.publication-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.empty-state, .loading {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 40px;
}

.photography-link {
    color: var(--accent-color);
    text-decoration: none;
}

.photography-link:hover {
    text-decoration: underline;
    color: var(--accent-hover);
}

.black-link {
    color: var(--text-color);
    text-decoration: none;
}

.black-link:hover {
    text-decoration: underline;
    color: var(--accent-hover);
}

/* ===== DARK MODE TOGGLE ===== */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 2px 8px var(--shadow);
}

.theme-toggle:hover {
    background: var(--button-hover);
    border-color: var(--border-hover);
}

.theme-toggle-icon {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.theme-toggle-text {
    font-weight: 500;
    font-size: 12px;
}

/* Hide toggle text on mobile */
@media (max-width: 600px) {
    .theme-toggle {
        padding: 8px;
        top: 15px;
        right: 15px;
    }
    
    .theme-toggle-text {
        display: none;
    }
}

/* ===== PODCAST NAME ===== */
.podcast-name {
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 4px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    .container {
        padding: 40px 16px;
    }

    .name {
        font-size: 28px;
    }

    .title {
        font-size: 16px;
    }

    h2 {
        font-size: 20px;
    }

    .avatar {
        width: 100px;
        height: 100px;
    }

    .contact-links {
        gap: 16px;
    }

    .publication {
        padding: 16px;
    }

    .repo-card,
    .talk-card {
        flex: 0 0 240px;
        padding: 16px;
    }

    .cssp-card {
        flex: 0 0 180px;
        padding: 14px;
        gap: 10px;
    }

    .awareness-content {
        padding: 20px;
        border-radius: 10px;
    }

    .awareness-content h2 {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .see-more-card {
        flex: 0 0 240px;
    }

    .course-card {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .course-logo {
        flex: none;
    }

    .course-stats {
        justify-content: center;
    }
}
