/* About Me Page Styles - Updated */
.about-me-page {
    grid-template-areas: 
        "header header header"
        "main main main"
        "footer footer footer";
}

.about-me-page nav,
.about-me-page .toc {
    display: none;
}

.about-me-main {
    grid-area: main;
    padding: 0;
}

.back-btn {
    color: white;
    font-size: 1.2rem;
    margin-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.back-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Hero Section */
.about-hero {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 4rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60vh;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.hero-content h2 {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    font-weight: 400;
    opacity: 0.9;
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
    opacity: 0.8;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
}

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

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

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

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

.hero-visual {
    position: relative;
    width: 400px;
    height: 300px;
}

.circuit-animation {
    position: relative;
    width: 100%;
    height: 100%;
}

.node {
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.node:nth-child(1) { top: 20%; left: 20%; animation-delay: 0s; }
.node:nth-child(2) { top: 60%; left: 40%; animation-delay: 0.5s; }
.node:nth-child(3) { top: 30%; left: 70%; animation-delay: 1s; }
.node:nth-child(4) { top: 70%; left: 80%; animation-delay: 1.5s; }

.connection {
    position: absolute;
    background: white;
    height: 3px;
    transform-origin: left center;
    animation: connect 3s infinite;
}

.connection:nth-child(5) {
    top: 25%;
    left: 25%;
    width: 100px;
    transform: rotate(30deg);
    animation-delay: 0s;
}

.connection:nth-child(6) {
    top: 65%;
    left: 45%;
    width: 120px;
    transform: rotate(-20deg);
    animation-delay: 0.5s;
}

.connection:nth-child(7) {
    top: 35%;
    left: 75%;
    width: 80px;
    transform: rotate(10deg);
    animation-delay: 1s;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

@keyframes connect {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Section Styles */
.about-section, .skills-section, .projects-section, 
.journey-section, .values-section, .contact-section {
    padding: 5rem 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.header-line {
    width: 80px;
    height: 4px;
    background: var(--primary);
    margin: 0 auto;
    border-radius: 2px;
}

.section-header p {
    max-width: 600px;
    margin: 1rem auto 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
    transition: transform 0.3s ease;
}

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

.stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

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

.image-placeholder {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    position: relative;
}

.image-placeholder i {
    margin: 0 0.5rem;
}

.image-placeholder .fa-arrow-right {
    font-size: 1.5rem;
}

/* Skills Section */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px var(--shadow);
}

.skill-category h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.skill-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skill-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.skill-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
    width: 0;
    transition: width 1.5s ease-in-out;
}

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

.project-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px var(--shadow);
}

.project-icon {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.project-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.project-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    background: var(--bg-tertiary);
    color: var(--primary);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-link {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
    margin-top: auto;
}

.project-link:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Journey Section */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
}

.timeline-item {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 3rem;
    position: relative;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-date {
    width: 100px;
    text-align: center;
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
    z-index: 2;
    background: var(--bg-secondary);
    padding: 0.5rem;
}

.timeline-content {
    width: calc(50% - 70px);
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: 0 5px 15px var(--shadow);
    margin: 0 1.5rem;
    position: relative;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 50%;
    width: 20px;
    height: 20px;
    background: var(--bg-secondary);
    transform: translateY(-50%) rotate(45deg);
}

.timeline-item:nth-child(odd) .timeline-content::before {
    right: -10px;
}

.timeline-item:nth-child(even) .timeline-content::before {
    left: -10px;
}

.timeline-content h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.timeline-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Values Section */
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.value-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 15px var(--shadow);
    transition: transform 0.3s ease;
}

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

.value-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.value-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.value-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.contact-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 15px var(--shadow);
    transition: transform 0.3s ease;
}

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

.contact-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.contact-card h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}



.contact-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.contact-link {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.contact-link:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Experience Section Styles */
.experience-section {
    padding: 5rem 2rem;
    background: linear-gradient(to bottom, var(--bg-primary), var(--bg-secondary));
}

.experience-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.experience-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.exp-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.exp-header h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.exp-company {
    display: block;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.exp-duration {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.exp-details ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.exp-details li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.exp-details li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.exp-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Timeline adjustments for experience */
.timeline-item {
    margin-bottom: 2.5rem;
}

.timeline-date {
    width: 120px;
    text-align: center;
    font-weight: 700;
    color: var(--primary);
    font-size: 1rem;
    z-index: 2;
    background: var(--bg-secondary);
    padding: 0.8rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Profile Photo Styles */
.profile-photo-container {
    position: relative;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 4px solid var(--bg-secondary);
    transition: all 0.4s ease;
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s ease;
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(79, 70, 229, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
    border-radius: 50%;
}

.overlay-content {
    color: white;
    text-align: center;
    font-size: 1.8rem;
}

.overlay-content i {
    margin: 0 0.3rem;
    transition: all 0.3s ease;
}

/* Hover effects */
.profile-photo-container:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
    border-color: var(--primary);
}

.profile-photo-container:hover .profile-photo {
    transform: scale(1.1);
}

.profile-photo-container:hover .photo-overlay {
    opacity: 1;
}

.profile-photo-container:hover .overlay-content i:nth-child(1) {
    animation: bounce 1s ease infinite;
}

.profile-photo-container:hover .overlay-content i:nth-child(2) {
    animation: slide 1s ease infinite 0.2s;
}

.profile-photo-container:hover .overlay-content i:nth-child(3) {
    animation: pulse 1s ease infinite 0.4s;
}

/* Animations for overlay icons */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes slide {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Responsive design */
@media (max-width: 1024px) {
    .profile-photo-container {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 768px) {
    .about-image {
        margin-top: 2rem;
    }
    
    .profile-photo-container {
        width: 180px;
        height: 180px;
    }
    
    .overlay-content {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .profile-photo-container {
        width: 150px;
        height: 150px;
        border-width: 3px;
    }
    
    .overlay-content {
        font-size: 1.2rem;
    }
}

/* Fallback if image doesn't load */
.profile-photo-container {
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
}

.profile-photo:before {
    content: "\f007"; /* FontAwesome user icon */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: var(--text-muted);
    z-index: 0;
}

/* Responsive experience section */
@media (max-width: 768px) {
    .experience-section {
        padding: 3rem 1rem;
    }
    
    .experience-card {
        padding: 1.5rem;
    }
    
    .exp-header h3 {
        font-size: 1.2rem;
    }
    
    .exp-details li {
        font-size: 0.9rem;
    }
    
    .skill-tag {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
    
    .timeline-date {
        width: 100px;
        font-size: 0.9rem;
        padding: 0.6rem;
    }
}

/* Animation for experience cards */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.experience-card {
    animation: slideInUp 0.6s ease forwards;
}

.experience-card:nth-child(1) { animation-delay: 0.1s; }
.experience-card:nth-child(2) { animation-delay: 0.2s; }
.experience-card:nth-child(3) { animation-delay: 0.3s; }

/* Highlight effect for current role */
.experience-card:first-child {
    border-left-color: var(--accent);
    position: relative;
}

.experience-card:first-child::before {
    position: absolute;
    top: -10px;
    right: 20px;
    background: var(--accent);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .about-hero {
        flex-direction: column;
        text-align: center;
        padding: 3rem 1rem;
    }
    
    .hero-content {
        margin-bottom: 3rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        flex-direction: row !important;
        justify-content: flex-start;
        padding-left: 60px;
    }
    
    .timeline-date {
        position: absolute;
        left: 0;
        text-align: left;
        width: 50px;
    }
    
    .timeline-content {
        width: 100%;
        margin: 0;
    }
    
    .timeline-content::before {
        left: -10px !important;
        right: auto !important;
    }
    
    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.8rem;
    }
    
    .hero-content h2 {
        font-size: 1.4rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary, .btn-secondary {
        width: 200px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .skills-container,
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .values-grid {
        grid-template-columns: 1fr;
    }
    
    .about-section, .skills-section, .projects-section, 
    .journey-section, .values-section, .contact-section {
        padding: 3rem 1rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .image-placeholder {
        width: 150px;
        height: 150px;
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero-content h2 {
        font-size: 1.2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .skill-category,
    .project-card,
    .value-card,
    .contact-card {
        padding: 1.5rem;
    }
    
    .project-icon,
    .value-icon,
    .contact-icon {
        font-size: 2rem;
    }
}

/* Animation for skill bars */
@keyframes fillBar {
    from { width: 0; }
    to { width: attr(data-width); }
}

/* Custom icon for transformer */
.fa-transformer:before {
    content: "T";
    font-weight: bold;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}