:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --background-color: #fff;
    --text-color: #222;
    --light-text: #777;
    --white: #fff;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

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

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease-in-out;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--secondary-color);
    transition: color 0.7s ease-in-out;
}

.logo span {
    color: var(--primary-color);
}

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

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: var(--secondary-color);
    font-weight: 500;
    transition: color 0.3s;
}

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

.nav-links a.active {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: auto;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-text {
    flex: 1;
    padding-right: 50px;
}

.hero-text h1 {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--secondary-color);
    line-height: 1.2;
}

.hero-text h1 span {
    color: var(--primary-color);
}

.hero-text p {
    font-size: 18px;
    margin-bottom: 30px;
    color: var(--light-text);
    line-height: 1.6;
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    max-width: 350px;
    height: 350px;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    object-fit: cover;
    transition: transform 0.3s ease;
    border: 5px solid var(--white);
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

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

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

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

.social-icons {
    margin-top: 30px;
}

.social-icons a {
    display: inline-block;
    margin-right: 15px;
    font-size: 20px;
    color: var(--secondary-color);
    transition: color 0.3s;
}

.social-icons a:hover {
    color: var(--primary-color);
}

/* About Section */
.section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 36px;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.section-title p {
    color: var(--light-text);
    max-width: 700px;
    margin: 0 auto;
}

.about-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.about-text {
    flex: 1;
    padding-right: 50px;
}

.about-text h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.about-text p {
    margin-bottom: 20px;
    color: var(--light-text);
}

.skills {
    text-align: center;
    margin: 0 auto;
    padding: 20px 0;
}

.skills-category {
    margin-bottom: 40px;
}

.skills-category h4 {
    margin-bottom: 20px;
    color: var(--secondary-color);
}

/* Updated layout to display only two categories per row */
.skills-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin: 0 auto;
    max-width: 900px;
}

.skill-item {
    margin: 10px;
    padding: 10px 20px;
    background-color: var(--white);
    border-radius: 5px;
    box-shadow: var(--shadow);
    font-size: 16px;
}

/* Experience Section */
.experience-item {
    background-color: var(--white);
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 5px;
    box-shadow: var(--shadow);
}

.experience-item h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.experience-item .date {
    color: var(--light-text);
    margin-bottom: 15px;
    font-size: 14px;
}

.experience-item ul {
    margin-left: 20px;
}

.experience-item ul li {
    margin-bottom: 10px;
    color: var(--light-text);
}

/* Projects Section */
/* Projects Section */
.projects-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    padding: 0 20px;
}

.project-card {
    background-color: var(--white);
    border-radius: 5px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    width: 320px;  /* Increased from 300px */
    flex: 0 0 auto;
}

@media (max-width: 768px) {
    .projects-grid {
        gap: 20px;
    }
    
    .project-card {
        width: 100%;
        max-width: 400px;  /* Increased max-width for mobile */
    }
}

.project-card:hover {
    transform: translateY(-10px);
}

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

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.project-info {
    padding: 20px;
}

.project-info h3 {
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.project-info p {
    color: var(--light-text);
    margin-bottom: 15px;
    font-size: 14px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.tech-item {
    background-color: #e0f2fe;
    color: var(--primary-color);
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
    margin-right: 8px;
    margin-bottom: 8px;
}

.project-links a {
    margin-right: 15px;
    font-size: 14px;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
}

.project-links a i {
    margin-right: 5px;
}

/* Contact Section */
.contact-content {
    display: flex;
    justify-content: space-between;
}

.contact-info {
    flex: 1;
    padding-right: 50px;
}

.contact-info h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.contact-info p {
    margin-bottom: 30px;
    color: var(--light-text);
}

.contact-details {
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.contact-item i {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.contact-form {
    flex: 1;
    background-color: var(--white);
    padding: 30px;
    border-radius: 5px;
    box-shadow: var(--shadow);
    width: 80%;
    margin: 0 auto;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--secondary-color);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

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

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

.footer-content p {
    margin-bottom: 20px;
}

.footer-links {
    display: flex;
    justify-content: center;
    list-style: none;
    margin-bottom: 20px;
}

.footer-links li {
    margin: 0 15px;
}

.footer-links a {
    color: var(--white);
    transition: color 0.3s;
}

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

.footer-social a {
    display: inline-block;
    margin: 0 10px;
    color: var(--white);
    font-size: 20px;
    transition: color 0.3s;
}

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

/* --- Clean Two-Sided Timeline --- */
.timeline {
  position: relative;
  width: 100%;
  margin: 60px 0 40px 0;
  padding: 0;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: var(--primary-color);
  z-index: 0;
}
.timeline-item {
  position: relative;
  width: 50%;
  padding: 30px 0;
  box-sizing: border-box;
}
.timeline-item.left {
  left: 0;
  text-align: right;
}
.timeline-item.right {
  left: 50%;
  text-align: left;
}
.timeline-content {
  display: inline-block;
  background: var(--background-color);
  border: 1px solid var(--primary-color);
  border-radius: 10px;
  padding: 4px 12px;
  min-width: 250px;
  max-width: 90%;
  position: relative;
  z-index: 2;
}
.timeline-item.left .timeline-content {
  margin-right: 40px;
}
.timeline-item.right .timeline-content {
  margin-left: 40px;
}
.timeline-item::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background: var(--background-color);
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  z-index: 3;
}
.timeline-item.left::after {
  left: auto;
  right: -9px;
}
.timeline-item.right::after {
  left: -9px;
}
.timeline-content .company {
  /* font-weight: bold; */
  font-size: 1.1em;
  color: var(--secondary-color);
  margin-bottom: 4px;
}
.timeline-content .role {
  color: var(--primary-color);
  font-size: 1.08em;
  font-weight: bold;
  margin-bottom: 4px;
}
.timeline-content .date {
  color: var(--light-text);
  font-size: 0.97em;
}
@media (max-width: 900px) {
  .timeline::before {
    left: 20px;
    transform: none;
  }
  .timeline-item,
  .timeline-item.left,
  .timeline-item.right {
    width: 100%;
    left: 0;
    text-align: left;
    padding-left: 50px;
    padding-right: 0;
  }
  .timeline-item.left .timeline-content,
  .timeline-item.right .timeline-content {
    margin: 0 0 0 30px;
  }
  .timeline-item::after {
    left: 9px;
    right: auto;
  }
}
/* --- End Timeline --- */

/* Responsive Styles */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .hero-content,
    .about-content,
    .contact-content {
        flex-direction: column;
    }

    .hero-text,
    .about-text,
    .contact-info {
        padding-right: 0;
        margin-bottom: 50px;
    }

    .hero-buttons {
        display: flex;
        flex-direction: column;
    }

    .btn-outline {
        margin-left: 0;
        margin-top: 15px;
    }

    .section {
        padding: 70px 0;
    }

    .section-title h2 {
        font-size: 30px;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 36px;
    }

    .section-title h2 {
        font-size: 28px;
    }

    .project-card {
        width: 100%;
    }
}

.avatar-container {
    width: 300px;
    height: 300px;
    position: relative;
    border-radius: 50%;
    overflow: hidden;
}

#avatarCanvas {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}