/* Global styles for Ahmed Essmat portfolio */

/*
 * Embed the Jannat typeface for Arabic and Latin text.  The project only
 * includes one weight of the font, so we alias both normal and bold
 * weights to this file.  If additional weights become available in the
 * future they can be added here and referenced in the font-family
 * declarations.
 */
@font-face {
    font-family: 'AJannatLT';
    src: url('assets/AJannatLT-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'AJannatLT';
    src: url('assets/AJannatLT-Regular.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

body {
    margin: 0;
    padding: 0;
    /* Use the Jannat typeface throughout the site.  Fallbacks ensure the
       text remains legible if the font fails to load. */
    font-family: 'AJannatLT', 'Arial', sans-serif;
    font-weight: 400;
    background-color: #f7f9fc;
    color: #222;
    direction: rtl;
    text-align: right;
    line-height: 1.6;
}

h1, h2, h3, h4 {
    margin-top: 0;
}

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

a:hover {
    text-decoration: underline;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 0;
}

/* Hero section */
.hero {
    position: relative;
    background-image: url('assets/logo.png');
    background-position: center;
    background-size: cover;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.6);
}

.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-logo {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    margin-bottom: 15px;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    /* Force the name in the hero to display in white regardless of
       inheritance or other styles.  Important is used here because some
       browsers may apply default link colours. */
    color: #ffffff !important;
    margin: 0;
    margin-bottom: 10px;
}

.tagline {
    font-size: 1rem;
    font-weight: 400;
    /* Light grey tagline text for readability on dark backgrounds */
    color: #dcdcdc;
}

/* About section */
.about {
    background-color: #fff;
}

.about h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #1f3556;
}

.about p {
    font-size: 1rem;
    max-width: 800px;
}

/* Stats and skills */
.stats-skills {
    background-color: #f0f4f8;
}

.stats-skills h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #1f3556;
}

.contact-info {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.contact-info .phone::before {
    content: "📞 ";
}

.contact-info .location::before {
    content: "📍 ";
}

.stats-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-box {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    padding: 20px;
    flex: 1 1 200px;
    text-align: center;
}

.stat-box .stat-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: #1f3556;
}

.stat-box .stat-label {
    font-size: 0.85rem;
    color: #666;
}

.skills-container h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #1f3556;
}

.skills-list {
    list-style: disc;
    padding-right: 20px;
    margin: 0;
}

.skills-list li {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

/* Portfolio */
.portfolio {
    background-color: #fff;
}

.portfolio h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: #1f3556;
}

.project-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 40px;
    /* Make each project card a flexible row by default.  Wrapping
       ensures the content adjusts gracefully on smaller screens. */
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    overflow: hidden;
}

.project-card .project-image {
    flex: 1 1 40%;
    min-width: 280px;
    max-height: 280px;
    overflow: hidden;
}

.project-card .project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-card .project-content {
    flex: 1 1 60%;
    padding: 20px 25px;
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: #1f3556;
}

.project-card .subtitle {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 6px;
}

.project-card .goal {
    font-size: 0.9rem;
    color: #333;
    margin-bottom: 12px;
    font-style: italic;
}

.project-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
    font-size: 0.85rem;
}

.project-stats div {
    background-color: #f9fafb;
    border: 1px solid #e3e8ef;
    border-radius: 6px;
    padding: 8px;
}

.project-stats div strong {
    display: block;
    color: #1f3556;
    margin-bottom: 4px;
    font-size: 0.8rem;
}

.project-details {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.project-details > div {
    flex: 1 1 250px;
}

.project-details h4 {
    margin-bottom: 6px;
    font-size: 1rem;
    color: #1f3556;
}

.project-details ul {
    list-style: disc;
    padding-right: 20px;
    margin: 0;
    font-size: 0.85rem;
}

.project-details ul li {
    margin-bottom: 6px;
}

/* Footer */
.footer {
    background-color: #1f3556;
    color: #fff;
    padding: 20px 0;
    text-align: center;
}

.footer a {
    color: #fff;
    text-decoration: underline;
}

.footer a:hover {
    text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        height: 50vh;
    }
    .project-card {
        flex-direction: column;
    }
    .project-card .project-content {
        padding: 20px;
    }
    .project-stats {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}