/* Root variables for color and styling */
:root {
    --primary-color: #5f8f9e;
    --secondary-color: #5f8f9e;
    --text-color: #ffffff;
    --bg-color: #1a1a1a;
    --card-bg: #2d2d2d;
    --navbar-bg: #000000;
    --transition: all 0.3s ease;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    --glow-color: rgba(95, 143, 158, 0.6); /* צבע הזוהר */
}

/* Reset and box-sizing */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Base body styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    transition: var(--transition);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    margin-bottom: 1rem;
}

/* Navbar styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--navbar-bg);
    padding: 1rem 2rem;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
}

/* Desktop navigation links */
.nav-links {
    display: flex;
}

.nav-links ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    transition: var(--transition);
}

/* Active link color */
.nav-links a.active,
.mobile-nav a.active {
    color: var(--primary-color);
}

/* Underline for active navbar link on desktop */
@media (min-width: 769px) {
    .nav-links a.active {
        position: relative;
    }

    .nav-links a.active::after {
        content: '';
        position: absolute;
        bottom: -5px; /* Adjust this value as needed */
        left: 0;
        width: 100%;
        height: 2px; /* Thickness of the line */
        background-color: var(--primary-color);
    }
}

/* Hamburger menu for mobile */
.nav-toggle {
    display: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    z-index: 1001;
}

/* Mobile navigation menu */
.mobile-nav {
    position: fixed;
    top: 4.2rem;
    left: 0;
    width: 40%;
    height: calc(100% - 5rem);
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(2px);
    z-index: 1000;
    transition: transform 0.3s ease;
    transform: translateX(-100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.mobile-nav.open {
    transform: translateX(0);
}

/* Animation for mobile nav links */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.mobile-nav li {
    opacity: 0;
    transform: translateX(-50px);
}

.mobile-nav.open li {
    animation: slideIn 0.5s forwards;
}

.mobile-nav.open li:nth-child(1) {
    animation-delay: 0.1s;
}

.mobile-nav.open li:nth-child(2) {
    animation-delay: 0.2s;
}

.mobile-nav.open li:nth-child(3) {
    animation-delay: 0.3s;
}

.mobile-nav.open li:nth-child(4) {
    animation-delay: 0.4s;
}

.mobile-nav.open li:nth-child(5) {
    animation-delay: 0.5s;
}

.mobile-nav ul {
    list-style: none;
    padding: 2rem 0;
}

.mobile-nav li {
    margin-bottom: 1.5rem;
}

.mobile-nav a {
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    transition: var(--transition);
}

.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    overflow: hidden;
    padding-top: 60px;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.video-background video {
    position: absolute;
    width: 100vw;
    height: 100vh;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.5);
    object-fit: cover;
    z-index: 0;
    animation: zoomOut 1.5s ease-out forwards;
}

@keyframes zoomOut {
    from {
        transform: translate(-50%, -50%) scale(2);
    }
    to {
        transform: translate(-50%, -50%) scale(1);
    }
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 20px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: white;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Adjustments for medium screens */
@media (max-width: 1200px) {
    .video-background video {
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Adjustments for small screens */
@media (max-width: 768px) {
    .video-background video {
        transform: translate(-50%, -50%) scale(1.2);
        object-fit: cover;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }

    .about-grid,
    .contact-container {
        grid-template-columns: 1fr;
    }

    .content-section {
        padding: 3rem 1rem;
    }

    .content-section h2 {
        font-size: 2rem;
    }

    .skill-categories {
        display: none; /* Hide category buttons on mobile */
    }

    .skill-selection-mobile {
        display: flex; /* Show selection bar on mobile */
        justify-content: center;
        margin-bottom: 2rem;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 1rem;
    }

    .skill-item {
        margin: 0; /* תיקון ערך margin לא חוקי */
    }

    .skill-item .skill-icon {
        width: 40px;
        height: 40px;
    }

    .skill-item span {
        font-size: 0.8rem;
    }
}

/* סגנונות לחלון הצף של ה-PDF */
#pdf-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 1rem; /* הוספת padding כדי למנוע חיתוך במובייל */
    overflow: auto; /* לאפשר גלילה אם התוכן גדול מהמסך */
}

#pdf-object {
    width: 90%;
    max-width: 800px;
    height: 80vh;
}

#close-pdf {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#close-pdf:hover {
    background-color: var(--secondary-color);
}

/* התאמות למובייל */
@media (max-width: 768px) {
    #pdf-object {
        width: 100%;
        height: 70vh;
    }

    #close-pdf {
        width: 100%;
        text-align: center;
    }
}

/* Scroll indicator at the bottom of the hero section */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    color: white;
}

/* Typing effect for hero text */
.typing-text {
    font-size: 3rem;
    margin-bottom: 1rem;
    position: relative;
}

.typing-text::after {
    content: '|';
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Buttons */
.cta-buttons {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn.small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn.primary {
    background-color: var(--primary-color);
    color: white;
}

.btn.secondary {
    background-color: transparent;
    border: 2px solid white;
    color: white;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Content Sections */
.content-section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.content-section h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
}

.content-section h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 1rem auto;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.5rem;
}

.profile-image {
    width: 100%;
    border-radius: 10px;
}


/* Course Progress Section */ /*Add only when I'm at 50 percent*/
/* #course-progress {
    text-align: center;
    padding: 5rem 2rem;
    background-color: var(--bg-color);
    color: var(--text-color);
} */

/* .course-progress-container {
    display: flex;
    justify-content: center;
    gap: 10rem; 
    flex-wrap: wrap; 
} */

/* .course-progress {
    position: relative;
    width: 120px;
    height: 160px; 
} */

/* .progress-ring {
    transform: rotate(-90deg);
} */

/* .progress-ring__circle {
    transition: stroke-dashoffset 0.35s;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
} */

/* .progress-ring__text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    color: var(--text-color);
} */

/* Styling for Course Details */
/* .course-details {
    margin-top: 1.5rem;
    text-align: center;
} */

/* .course-details h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
} */

/* .course-details a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
} */

/* .course-details a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
} */

/* Responsive Adjustments for Course Progress */
/* @media (max-width: 768px) {
    #course-progress {
        padding: 3rem 1rem;
    }


    .course-progress-container {
        flex-direction: column; 
        align-items: center;    
        margin-bottom: 6rem;             
    }

    .course-progress {
        width: 110px;
        height: 140px; 
    }

    .progress-ring__text {
        font-size: 1.2rem;
    }

    .course-details h3 {
        font-size: 0.9rem;
    }

    .course-details a {
        font-size: 0.9rem;
    }
}  */




/* Skills Section */

/* Container for category buttons */
.skill-categories {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

/* Style for category buttons */
.category-btn {
    padding: 0.5rem 1rem;
    border: none;
    background-color: var(--card-bg);
    color: var(--text-color);
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease, opacity 0.3s ease;
}

.category-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.category-btn.active {
    background-color: var(--primary-color);
    color: white;
}

/* Selection Bar for Mobile */
.skill-selection-mobile {
    display: none; /* Hidden by default, shown on mobile */
    justify-content: center;
    margin-bottom: 2rem;
}

.skill-selection-mobile select {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    border: none;
    border-radius: 5px;
    background-color: var(--card-bg);
    color: var(--text-color);
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}


/* Skills grid layout */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 2rem;
    justify-items: center;
    align-items: center;
}

/* Individual skill item */
.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: var(--text-color);
    transition: opacity 0.6s ease, transform 0.6s ease;
    opacity: 1;
    position: relative;
    margin-top: 10px;
    margin-right: 5px;
    margin-left: 5px;
}

/* Icon within skill item */
.skill-item .skill-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease;
}

/* Skill name */
.skill-item span {
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Glow effect around skill items */
.skill-item::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 10px;
    background: rgba(95, 143, 158, 0.2);
    box-shadow: 0 0 10px var(--glow-color);
    transition: box-shadow 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

.skill-item:hover::before {
    opacity: 1;
    box-shadow: 0 0 20px var(--glow-color);
}

.skill-item .skill-icon:hover {
    transform: scale(1.1);
}

/* Fade effect for category button transitions */
.category-btn {
    opacity: 0.7;
}

.category-btn.active {
    opacity: 1;
}

.category-btn:not(.active):hover {
    opacity: 1;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* שמירה על רווחים קבועים בין התוכן */
    height: 100%; /* יישור גובה אחיד */
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-image video {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* פיזור אחיד של תוכן */
    flex-grow: 1; /* מניעת התכווצות */
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tech-tag {
    background-color: rgba(76, 175, 80, 0.1);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
}

.project-links {
    margin-top: auto; /* דחיפת הכפתורים לתחתית */
    display: flex;
    gap: 1rem;
    justify-content: left; /* מרכז הכפתורים */
}

/* Fill animation "Source Code" */
.btn.secondary {
    position: relative;
    overflow: hidden;
}

.btn.secondary::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background-color: var(--primary-color); 
    z-index: -1;
    transition: height 0.5s ease;
}

.btn.secondary:hover::before {
    height: 100%;
}

.btn.secondary:hover {
    color: white; 
}

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-info {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.social-links {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

/* Footer */
footer {
    background-color: var(--navbar-bg);
    color: white;
    padding: 2rem;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1000;
    }

    /* Hide desktop navigation and show hamburger menu */
    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

    .nav-brand {
        order: 2;
    }

    .nav-toggle {
        order: 1;
    }

    .navbar {
        justify-content: space-between;
        align-items: center;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }

    .about-grid,
    .contact-container {
        grid-template-columns: 1fr;
    }

    .content-section {
        padding: 3rem 1rem;
    }

    .content-section h2 {
        font-size: 2rem;
    }

    .skill-categories {
        display: none; /* Hide category buttons on mobile */
    }

    .skill-selection-mobile {
        display: flex; /* Show selection bar on mobile */
        justify-content: center;
        margin-bottom: 2rem;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 1rem;
    }

    .skill-item {
        margin: 4px;
    }

    .skill-item .skill-icon {
        width: 40px;
        height: 40px;
    }

    .skill-item span {
        font-size: 0.8rem;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}
