/* ========================================
   CSS Variables & Reset
   ======================================== */
:root {
    --color-primary: #1a2a4a;
    --color-primary-light: #2c4a7c;
    --color-text: #2d3748;
    --color-text-light: #64748b;
    --color-bg: #ffffff;
    --color-bg-alt: #f8fafc;
    --color-border: #e2e8f0;
    --color-accent: #3b82f6;
    --font-he: 'Heebo', sans-serif;
    --font-en: 'Inter', sans-serif;
    --max-width: 900px;
    --nav-height: 64px;
    --transition: 0.3s ease;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: var(--font-he);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* English mode */
html[lang="en"] body {
    font-family: var(--font-en);
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ========================================
   Container
   ======================================== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
   Navigation
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    transition: box-shadow var(--transition);
}

.navbar.scrolled {
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--color-primary);
    letter-spacing: 0.02em;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--color-text-light);
    transition: color var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-primary);
    transform: scaleX(0);
    transition: transform var(--transition);
}

html[dir="rtl"] .nav-link::after {
    transform-origin: right;
}

html[dir="ltr"] .nav-link::after {
    transform-origin: left;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

/* Language Toggle */
.lang-toggle {
    background: var(--color-primary);
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
    font-family: var(--font-en);
    letter-spacing: 0.05em;
}

.lang-toggle:hover {
    background: var(--color-primary-light);
    transform: translateY(-1px);
}

/* Hamburger Menu */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: var(--nav-height);
}

.hero-layout {
    display: flex;
    align-items: center;
    gap: 48px;
    padding: 60px 0;
}

html[dir="rtl"] .hero-layout {
    flex-direction: row;
}

html[dir="ltr"] .hero-layout {
    flex-direction: row-reverse;
}

.hero-image {
    flex-shrink: 0;
    width: 280px;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(26, 42, 74, 0.12);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.hero-image img:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(26, 42, 74, 0.18);
}

.hero-content {
    flex: 1;
    text-align: start;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    font-weight: 300;
    color: var(--color-text-light);
    margin-bottom: 20px;
}

.hero-description {
    font-size: 1rem;
    color: var(--color-text);
    max-width: 480px;
    margin-bottom: 20px;
    line-height: 1.8;
}

.hero-areas {
    font-size: 0.8rem;
    color: var(--color-text-light);
    letter-spacing: 0.03em;
    margin-bottom: 28px;
    opacity: 0.7;
}

.hero-areas-label {
    font-weight: 600;
    opacity: 1;
    color: var(--color-text);
}

.hero-links {
    display: flex;
    gap: 16px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: var(--color-text-light);
    border: 1px solid var(--color-border);
    transition: all var(--transition);
}

.social-link:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 42, 74, 0.12);
}

/* ========================================
   Sections
   ======================================== */
.section {
    padding: 80px 0;
}

.section-alt {
    background: var(--color-bg-alt);
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--color-accent);
    border-radius: 2px;
}

html[dir="rtl"] .section-title::after {
    left: auto;
    right: 0;
}

.section-placeholder {
    color: var(--color-text-light);
    font-size: 1rem;
    font-style: italic;
}

/* ========================================
   About Section
   ======================================== */
.about-intro {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 40px;
    color: var(--color-text);
}

.about-grid {
    display: grid;
    gap: 32px;
}

.about-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 32px;
    transition: box-shadow var(--transition);
}

.about-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.about-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
}

/* Experience List */
.experience-list li {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-bg-alt);
}

.experience-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.experience-list strong {
    display: block;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.experience-list span {
    font-size: 0.88rem;
    color: var(--color-text-light);
    line-height: 1.6;
}

/* Education List */
.education-list li {
    margin-bottom: 20px;
}

.education-list li:last-child {
    margin-bottom: 0;
}

.edu-degree {
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 4px;
}

.edu-detail {
    font-size: 0.88rem;
    color: var(--color-text-light);
}

/* Focus Areas */
.focus-areas {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--color-border);
}

.focus-areas h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 16px;
}

.focus-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.focus-tags span {
    font-size: 0.82rem;
    font-family: var(--font-en);
    color: var(--color-primary);
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    padding: 6px 14px;
    border-radius: 20px;
    letter-spacing: 0.01em;
    transition: all var(--transition);
}

.focus-tags span:hover {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

/* ========================================
   Projects Section
   ======================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.project-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 28px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    box-shadow: 0 6px 24px rgba(26, 42, 74, 0.1);
    transform: translateY(-2px);
}

.project-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--color-bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--color-primary);
    order: 0;
}

.project-org {
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--color-text-light);
    letter-spacing: 0.03em;
    margin-bottom: 4px;
    order: 2;
}

.project-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 6px;
    line-height: 1.4;
    order: 1;
}

.project-desc {
    font-size: 0.88rem;
    color: var(--color-text-light);
    line-height: 1.7;
    flex: 1;
    order: 3;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--color-border);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.footer-links {
    display: flex;
    gap: 16px;
}

.footer-links a {
    color: var(--color-text-light);
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--color-primary);
}

.footer-copy {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

/* ========================================
   Animations
   ======================================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        gap: 32px;
        opacity: 0;
        visibility: hidden;
        transition: opacity var(--transition), visibility var(--transition);
    }

    .nav-menu.open {
        opacity: 1;
        visibility: visible;
    }

    .nav-link {
        font-size: 1.25rem;
    }

    .hero-layout {
        flex-direction: column !important;
        text-align: center;
        gap: 32px;
        padding: 40px 0;
    }

    .hero-image {
        width: 220px;
    }

    .hero-content {
        text-align: center;
    }

    .hero-links {
        justify-content: center;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .section {
        padding: 60px 0;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .about-card {
        padding: 24px;
    }

    .container {
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.5rem;
    }
}
/* About Story Typography Fix */
.about-story {
    max-width: 720px;        /* רוחב קריאה נעים לעין */
    margin: 0 auto;          /* מרכז את הטקסט */
}

.about-paragraph {
    line-height: 1.8;        /* ריווח שורות – הכי חשוב */
    font-size: 1.06rem;
    color: #374151;          /* אפור כהה עדין */
    margin-bottom: 20px;     /* רווח בין פסקאות */
}

/* עברית */
html[dir="rtl"] .about-paragraph {
    text-align: right;
}

/* אנגלית */
html[dir="ltr"] .about-paragraph {
    text-align: left;
}
.about-story p:first-child {
    margin-top: 5px;
}

.about-story p:last-child {
    margin-bottom: 15px;
}
