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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #4facfe;
    transition: width 0.3s;
}

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

/* Hero section */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    padding-top: 80px; /* Account for fixed navbar */
}

.hero-split {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    min-height: calc(100vh - 80px);
    padding: 2rem;
}

.hero-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

.hero-right {
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    width: 100%;
    max-width: 600px;
}

.quick-link-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.quick-link-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

.quick-link-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.quick-link-content i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #4facfe, #00f2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.quick-link-content h3 {
    font-size: 1.3rem;
    margin: 0;
}

.quick-link-content p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Update profile image */
.profile-image.small {
    width: 140px;
    height: 140px;
    margin-bottom: 2.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 30px rgba(79, 172, 254, 0.3);
}

.profile-image.small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 0.8rem;
    background: linear-gradient(45deg, #4facfe, #00f2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    line-height: 1.2;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.4;
}

/* Responsive design */
@media (max-width: 968px) {
    .hero-split {
        grid-template-columns: 1fr;
        height: auto;
    }

    .hero-left {
        padding: 2rem 0;
    }

    .quick-links {
        grid-template-columns: 1fr;
        padding: 1rem 0;
    }
}

/* Sections */
.section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #2c3e50;
}

/* About section */
.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #4a5568;
    margin: 2rem 0;
}

.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.experience-item {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.experience-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.experience-header i {
    font-size: 1.8rem;
    color: #4facfe;
}

.experience-header h3 {
    font-size: 1.3rem;
    color: #2d3748;
    margin: 0;
}

.experience-item p {
    color: #4a5568;
    font-size: 1rem;
}

/* Projects section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.project-card {
    padding: 2rem;
    border-radius: 15px;
    background: white;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transition: all 0.3s;
    border: 1px solid #eee;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

/* Contact section */
.contact-content {
    text-align: center;
}

.social-links {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.social-links a {
    text-decoration: none;
    color: #3498db;
    font-weight: 500;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #2980b9;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    background: #2c3e50;
    color: white;
}

/* About section enhancements */
.lead-text {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 2rem;
    font-weight: 300;
}

.skills-container {
    margin-top: 3rem;
}

.skills-container h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #2d3748;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    transition: transform 0.3s;
}

.skill-item:hover {
    transform: translateY(-5px);
}

.skill-item i {
    font-size: 1.5rem;
    color: #4facfe;
}

/* Project cards enhancement */
.project-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.project-header i {
    font-size: 2rem;
    color: #4facfe;
}

.project-links {
    margin-top: 1.5rem;
}

.project-links a {
    color: #4facfe;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: gap 0.3s;
}

.project-links a:hover {
    gap: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .about-description {
        font-size: 1rem;
        text-align: left;
    }
    
    .experience-grid {
        grid-template-columns: 1fr;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .lead-text {
        font-size: 1.2rem;
    }
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.featured-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.featured-card:hover {
    transform: translateY(-5px);
}

.featured-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.featured-header i {
    font-size: 2.5rem;
    color: #4facfe;
}

.featured-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #4facfe;
    text-decoration: none;
    font-weight: 500;
    margin-top: 1rem;
    transition: gap 0.3s;
}

.featured-links a:hover {
    gap: 1rem;
}

.hero-social {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.hero-social a {
    color: white;
    font-size: 1.8rem;
    transition: transform 0.3s, color 0.3s;
}

.hero-social a:hover {
    color: #4facfe;
    transform: translateY(-3px);
}

/* Research list styles */
.research-list {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.research-item {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.research-item.published {
    border-left: 4px solid #4facfe;
}

.pub-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2em 0.6em;
    border-radius: 4px;
    vertical-align: middle;
    margin-left: 0.5rem;
}

.pub-badge.acm {
    background: #0277bd;
    color: #fff;
}

.pub-badge.paper {
    background: #6a1b9a;
    color: #fff;
}

.research-item:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.12);
}

.research-item h3 {
    margin: 0 0 1rem 0;
    font-size: 1.4rem;
}

.research-title {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.research-title:hover {
    color: #4facfe;
}

.research-description {
    position: relative;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.research-description.collapsed {
    max-height: 2.4em;
}

.research-description.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1.2em;
    background: linear-gradient(to bottom, transparent, #f8f9fa);
    pointer-events: none;
}

.research-description.expanded {
    max-height: 500px;
}

.research-description.expanded::after {
    display: none;
}

.research-description p {
    margin: 0 0 0.5rem 0;
    line-height: 1.6;
    color: #555;
}

.read-more {
    display: inline-block;
    color: #4facfe;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: #2c3e50;
}

/* Lectures section */
.lectures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.lecture-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.lecture-card:hover {
    transform: translateY(-5px);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.lecture-content {
    padding: 1.5rem;
}

.lecture-content h3 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.lecture-content p {
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.6;
}

.lecture-card.playlist {
    padding: 2rem;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: white;
}

.playlist-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.playlist-header i {
    font-size: 2.5rem;
    color: #4facfe;
}

.playlist-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #4facfe;
    text-decoration: none;
    margin-top: 1.5rem;
    font-weight: 500;
    transition: gap 0.3s;
}

.playlist-link:hover {
    gap: 1rem;
}

@media (max-width: 768px) {
    .lectures-grid {
        grid-template-columns: 1fr;
    }
}

/* Lectures page specific styles */
.lectures-page {
    padding-top: 100px;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 5rem;
}

.lectures-header {
    text-align: center;
    margin-bottom: 4rem;
    padding: 0 2rem;
}

.lectures-header h1 {
    font-size: 2.5rem;
    color: #2d3748;
    margin-bottom: 1rem;
}

.lectures-header p {
    font-size: 1.2rem;
    color: #4a5568;
}

.lecture-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 0 2rem;
}

.lecture-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    max-width: 500px;
    margin: 0 auto;
}

.lecture-item:hover {
    transform: translateY(-5px);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-height: 280px; /* Make videos smaller */
}

.lecture-details {
    padding: 1.5rem;
}

.lecture-details h2 {
    font-size: 1.4rem;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.lecture-description p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #4a5568;
    margin-bottom: 1rem;
}

/* Style updates for the MicroPython playlist card */
.lecture-item .playlist-header {
    padding: 2rem 1.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.playlist-header i {
    font-size: 2rem;
    color: #4facfe;
}

.playlist-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #4facfe;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    margin-top: 1rem;
}

.playlist-link:hover {
    gap: 1rem;
    color: #2d3748;
}

@media (max-width: 768px) {
    .lecture-container {
        grid-template-columns: 1fr;
    }
}

/* Research page styles */
.research-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    direction: rtl;
    text-align: right;
}

.research-section {
    margin-bottom: 30px;
}

.section-title {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.section-title i {
    font-size: 1.5rem;
    color: #4facfe;
    margin-left: 15px;
}

.section-title h2 {
    font-size: 1.5rem;
    margin: 0;
}

.stakeholder {
    margin-bottom: 15px;
}

.stakeholder strong {
    color: #2d3748;
}

ul.recommendations {
    padding-right: 20px;
    margin: 0;
}

ul.recommendations li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.download-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #4facfe;
    text-decoration: none;
    font-weight: 500;
    margin-top: 20px;
}

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

@media (max-width: 768px) {
    .stakeholder {
        margin-bottom: 10px;
    }
}

/* Hebrew text alignment */
.hebrew-content {
    direction: rtl;
    text-align: right;
}

/* Apply RTL to mini-research section */
#mini-research h2,
#mini-research .lead-text,
#mini-research .about-description,
#mini-research .featured-card h3,
#mini-research .featured-card p,
#mini-research .featured-links a {
    direction: rtl;
    text-align: right;
}

#mini-research .featured-links a {
    display: inline-flex;
    flex-direction: row-reverse;
}

#mini-research .featured-header {
    flex-direction: row-reverse;
}