/* ===================== Base Styles ===================== */
:root {
    /* Color variables and base settings */
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #333;
    --text-light: #7f8c8d;
    --white: #fff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    /* Body font and background */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

/* ===================== Container ===================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

/* ===================== Light Background ===================== */
.bg-light {
    background-color: var(--light-color);
}

/* ===================== Headings ===================== */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 20px;
    font-weight: 700;
    color: var(--dark-color);
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 15px auto;
}

/* ===================== Typography ===================== */
p {
    margin-bottom: 15px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

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

/* ===================== Buttons ===================== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    text-align: center;
}

.btn:hover {
    background-color: var(--secondary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    margin-left: 10px;
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* ===================== Header ===================== */
header {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 100px 0;
    text-align: center;
}

header h1 {
    font-size: 3.5rem;
    margin-bottom: 10px;
    color: var(--white);
}

header p {
    font-size: 1.5rem;
    color: var(--light-color);
}

/* ===================== Navigation ===================== */
nav {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 20px 0;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: var(--dark-color);
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 4px;
}

nav ul li a:hover {
    color: var(--primary-color);
    background-color: rgba(52, 152, 219, 0.1);
}

/* ===================== About Section ===================== */
.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.image-placeholder {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background-color: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.about-image .image-placeholder {
    width: 200px;              /* or any width you prefer */
    height: 200px;             /* or match aspect ratio */
    overflow: hidden;
    border-radius: 50%;        /* makes it a perfect circle */
    border: 2px solid #ccc;    /* optional: adds a border */
}

.about-image .image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;         /* ensures image covers the placeholder */
    object-position: center top; /* keeps the face more visible */
    display: block;
}

/* ===================== Skills Section ===================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.skill-item {
    background-color: var(--white);
    padding: 30px 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.skill-item i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.skill-item span {
    font-weight: 600;
    font-size: 1.2rem;
}

/* ===================== Education Section ===================== */
.education-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 0;
}

.education-timeline::before {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 20px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-date {
    padding: 8px 15px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 20px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 15px;
}

.timeline-content {
    padding: 20px;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.timeline-content h3 {
    margin-bottom: 10px;
}

.timeline-item:nth-child(odd)::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--white);
    border: 4px solid var(--primary-color);
    top: 30px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(even)::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: -10px;
    background-color: var(--white);
    border: 4px solid var(--primary-color);
    top: 30px;
    border-radius: 50%;
    z-index: 1;
}

.download-cv {
    text-align: center;
    margin-top: 50px;
}

/* ===================== Interests Section ===================== */
.interest-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
    justify-content: center;
}

.tag {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.tag:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

/* ===================== Projects Section ===================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.project-card {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.project-image {
    height: 200px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-content {
    padding: 20px;
}

.project-content h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.project-links {
    margin-top: 20px;
}

/* ===================== Contact Section ===================== */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* ===================== Footer ===================== */
footer {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 30px 0;
    text-align: center;
}

.social-links {
    margin-bottom: 20px;
}

.social-links a {
    display: inline-block;
    margin: 0 10px;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    font-size: 1.2rem;
    line-height: 40px;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

/* ===================== Responsive Design ===================== */
@media (max-width: 768px) {
    .about-content {
        flex-direction: column;
    }
    
    .education-timeline::before {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    
    .timeline-item:nth-child(even) {
        left: 0;
    }
    
    .timeline-item:nth-child(odd)::after,
    .timeline-item:nth-child(even)::after {
        left: 21px;
    }
    
    nav ul {
        flex-wrap: wrap;
    }
    
    nav ul li {
        margin: 5px 10px;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    header h1 {
        font-size: 2.5rem;
    }
    
    header p {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 60px 0;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .project-links {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-outline {
        margin-left: 0;
    }
    
    .contact-form {
        padding: 20px;
    }
}