/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-color: #2E7D32;
    --secondary-color: #A5D6A7;
    --background-color: #F9FBF9;
    --text-color: #263238;
    --border-color: #CFD8DC;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Page Load Border Animation */
body::before,
body::after,
.main-container::before,
.main-container::after {
    content: '';
    position: fixed;
    background: var(--primary-color);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s;
}

body.loaded::before,
body.loaded::after,
body.loaded .main-container::before,
body.loaded .main-container::after {
    opacity: 0;
}

body::before {
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    animation: loadTop 1.5s ease-in-out;
}

body::after {
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    animation: loadBottom 1.5s ease-in-out 0.5s;
}

.main-container::before {
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    animation: loadLeft 1.5s ease-in-out 0.25s;
}

.main-container::after {
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    animation: loadRight 1.5s ease-in-out 0.75s;
}

@keyframes loadTop {
    0% { transform: translateX(-100%); opacity: 1; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes loadBottom {
    0% { transform: translateX(100%); opacity: 1; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes loadLeft {
    0% { transform: translateY(100%); opacity: 1; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes loadRight {
    0% { transform: translateY(-100%); opacity: 1; }
    100% { transform: translateY(0); opacity: 1; }
}

/* Progress Bar */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 9998;
}

.progress-bar {
    height: 4px;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.1s ease;
}

/* Main Container */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    padding-top: 80px;
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--background-color);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    border-bottom: 2px solid var(--border-color);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

/* Desktop Navigation */
.nav-desktop ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-desktop a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 1rem;
    padding: 8px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-desktop a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.nav-desktop a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-desktop a:hover::after {
    width: 80%;
}

.nav-desktop a.active {
    color: var(--primary-color);
    background-color: rgba(165, 214, 167, 0.2);
}

/* Mobile Navigation */
.nav-mobile {
    display: none;
}

.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

.mobile-menu {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: var(--background-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border-top: 1px solid var(--border-color);
    z-index: 999;
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 1.2rem;
    padding: 12px 15px;
    border-radius: 5px;
    display: block;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.mobile-menu a:hover,
.mobile-menu a.active {
    color: var(--primary-color);
    background-color: rgba(165, 214, 167, 0.2);
    border-left: 3px solid var(--primary-color);
}

/* Page Sections */
.page-section {
    margin-bottom: 80px;
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 40px;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background-color: var(--secondary-color);
    border-radius: 2px;
}

/* Home Page Styles */
.hero {
    display: flex;
    align-items: center;
    gap: 50px;
    margin-bottom: 80px;
    flex-wrap: wrap;
}

.profile-image-container {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    border-radius: 15px;
    overflow: hidden;
    border: 3px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-image-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.profile-image {
    width: 97%;
    height: 385px;
    object-fit: cover;
    display: block;
    object-position: center 15%;
    border-radius: 12px;
}

.profile-image-missing {
    width: 100%;
    height: 400px;
    background-color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.2rem;
}

.hero-content {
    flex: 2;
    min-width: 300px;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: var(--text-color);
    opacity: 0.9;
}

.bio {
    font-size: 1.1rem;
    margin-bottom: 30px;
    line-height: 1.8;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-icon {
    width: 24px;
    height: 24px;
    color: var(--primary-color);
}

.detail-label {
    font-weight: 600;
    color: var(--text-color);
}

.detail-value {
    color: var(--text-color);
    opacity: 0.9;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(46, 125, 50, 0.2);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    background-color: #1b5e20;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(46, 125, 50, 0.3);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--text-color);
    box-shadow: 0 4px 10px rgba(165, 214, 167, 0.3);
}

.btn-secondary:hover {
    background-color: #94c997;
}

/* Skills Section */
.skills-section {
    margin-bottom: 80px;
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.skill-icon {
    width: 80px;
    height: 80px;
    padding: 1px;
    border-radius: 10px;
    background-color: white;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.skill-icon:hover {
    transform: translateY(-5px) scale(1.05);
    border-color: var(--primary-color);
    box-shadow: 0 8px 15px rgba(46, 125, 50, 0.15);
}

.skill-icon img {
    width: 80%;
    height: auto;
}

/* Connections */
.connections {
    display: flex;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.connection-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background-color: white;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.connection-link:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.connection-icon {
    width: 24px;
    height: 24px;
}

/* Career Timeline */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background-color: var(--border-color);
    transform: translateX(-50%);
}

.timeline-item {
    margin-bottom: 50px;
    position: relative;
    width: 100%;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: auto;
    margin-right: 0;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 0;
    margin-right: auto;
}

.timeline-dot {
    position: absolute;
    top: 20px;
    left: 50%;
    width: 20px;
    height: 20px;
    background-color: var(--primary-color);
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 1;
    border: 3px solid var(--background-color);
}

.timeline-content {
    width: 45%;
    padding: 25px;
    background-color: white;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
}

.timeline-content:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.timeline-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.timeline-date {
    display: inline-block;
    padding: 5px 12px;
    background-color: var(--secondary-color);
    color: var(--text-color);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.timeline-details {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.timeline-detail {
    display: flex;
    align-items: center;
    gap: 8px;
}

.timeline-detail-icon {
    width: 18px;
    height: 18px;
    color: var(--primary-color);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.project-tile {
    background-color: white;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    padding: 25px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.project-tile:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--primary-color);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.project-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--secondary-color);
    border-radius: 50%;
    color: var(--primary-color);
    font-size: 2rem;
}

.project-tile h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.project-thumbnail {
    display: none;
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* Project Description Page */
.project-header {
    margin-bottom: 40px;
    text-align: center;
}

.project-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.project-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: var(--secondary-color);
    border-radius: 20px;
    font-weight: 600;
}

.project-image-main {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    margin-bottom: 40px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.project-section {
    margin-bottom: 50px;
}

.project-section h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.project-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.project-image:hover {
    transform: scale(1.03);
    border-color: var(--primary-color);
}

.project-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 40px;
}

/* Achievements Page */
.achievement-section {
    margin-bottom: 60px;
}

.achievement-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.achievement-card {
    background-color: white;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    padding: 25px;
    transition: all 0.3s ease;
}

.achievement-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.achievement-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.achievement-date {
    padding: 5px 15px;
    background-color: var(--secondary-color);
    color: var(--text-color);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.achievement-title {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.achievement-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin-top: 10px;
    word-break: break-all;
}

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

.achievement-image-container {
    width: 100%;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 2px solid var(--border-color);
}

.achievement-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.achievement-image-missing {
    width: 100%;
    height: 100%;
    background-color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-weight: 600;
}

.achievement-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.achievement-label {
    padding: 5px 12px;
    background-color: var(--secondary-color);
    color: var(--text-color);
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Hobbies Page */
.hobbies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.hobby-tile {
    background-color: white;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    padding: 25px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.hobby-tile:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--primary-color);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.hobby-image-container {
    width: 100%;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 2px solid var(--border-color);
}

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

.hobby-tile:hover .hobby-image {
    transform: scale(1.05);
}

.hobby-image-missing {
    width: 100%;
    height: 100%;
    background-color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-weight: 600;
}

.hobby-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

/* Click Spark Effect */
.spark {
    position: fixed;
    width: 10px;
    height: 10px;
    background-color: var(--primary-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    opacity: 0;
    animation: sparkAnim 0.5s ease-out;
}

@keyframes sparkAnim {
    0% { transform: scale(0); opacity: 1; }
    100% { transform: scale(3); opacity: 0; }
}

/* Responsive Styles */
@media (max-width: 992px) {
    .timeline::before {
        left: 30px;
    }
    
    .timeline-content {
        width: calc(100% - 80px);
        margin-left: 80px !important;
        margin-right: 0 !important;
    }
    
    .timeline-dot {
        left: 30px;
    }
    
    .hero h1 {
        font-size: 2.4rem;
    }
}

@media (max-width: 768px) {
    .nav-desktop {
        display: none;
    }
    
    .nav-mobile {
        display: block;
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
    }
    
    .details-grid {
        justify-content: center;
    }
    
    .detail-item {
        justify-content: center;
    }
    
    .connections {
        justify-content: center;
    }
    
    .project-meta {
        flex-direction: column;
        align-items: center;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .main-container {
        padding: 15px;
        padding-top: 70px;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .projects-grid,
    .achievement-cards,
    .hobbies-grid {
        grid-template-columns: 1fr;
    }
    
    .project-links {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
}
