/* ==========================================
   Page Styles
   ========================================== */

/* Page Header */
.page-header {
    position: relative;
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.page-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.page-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-gradient {
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
}

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
    animation: subtle-zoom 20s ease-in-out infinite;
}

@keyframes subtle-zoom {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5));
    z-index: 2;
}

.page-hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
}

.page-hero-logo {
    width: min(45vh, 35vw);
    height: min(45vh, 35vw);
    min-width: 280px;
    min-height: 280px;
    margin: 5vh auto 2rem;
    display: block;
    animation: pendulum 3s ease-in-out forwards;
    position: relative;
    top: 3vh;
    transform-origin: center center;
}

.page-hero-logo img {
    transform: none !important;
    display: block;
    width: 100%;
    height: 100%;
}

@keyframes float {
    0% {
        transform: translateY(0);
    }
    25% {
        transform: translateY(-10px);
    }
    50% {
        transform: translateY(-20px);
    }
    75% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}

@keyframes pendulum {
    0% {
        transform: rotate(-30deg);
    }
    25% {
        transform: rotate(30deg);
    }
    50% {
        transform: rotate(-30deg);
    }
    75% {
        transform: rotate(30deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

.page-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.animated-title {
    animation: fade-in-up 1s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes fade-in-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Moving Letters Effect #5 */
.ml5 {
    position: relative;
    text-align: center;
    margin-bottom: 1rem;
    color: #ffffff;
}

.ml5 .text-wrapper {
    position: relative;
    display: inline-block;
    padding-top: 0.1em;
    padding-right: 0.05em;
    padding-bottom: 0.1em;
    line-height: 1.2em;
}

.ml5 .letters {
    display: inline-block;
    opacity: 1;
}

.ml5 .letters-line1 {
    display: block;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 0.1em;
}

.ml5 .letters-line2 {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 255, 255, 0.3);
    letter-spacing: 0.5px;
}

.ml5 .letter {
    display: inline-block;
    line-height: 1em;
    opacity: 0;
}

/* Fallback for no-js */
.no-js .ml5 .letters {
    opacity: 1 !important;
}

.no-js .ml5 .letter {
    opacity: 1 !important;
}

.page-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 255, 255, 0.3);
    max-width: 600px;
    margin: 0 auto;
    letter-spacing: 0.5px;
}

.animated-subtitle {
    animation: fade-in-up 1s ease-out 0.3s forwards;
    opacity: 0;
    transform: translateY(30px);
}

/* Animated Particles */
.animated-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.animated-particles .particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: particle-float 15s infinite linear;
}

.animated-particles .particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 12s;
}

.animated-particles .particle:nth-child(2) {
    left: 20%;
    animation-delay: 2s;
    animation-duration: 15s;
}

.animated-particles .particle:nth-child(3) {
    left: 30%;
    animation-delay: 4s;
    animation-duration: 18s;
}

.animated-particles .particle:nth-child(4) {
    left: 40%;
    animation-delay: 6s;
    animation-duration: 14s;
}

.animated-particles .particle:nth-child(5) {
    left: 50%;
    animation-delay: 8s;
    animation-duration: 16s;
}

.animated-particles .particle:nth-child(6) {
    left: 60%;
    animation-delay: 10s;
    animation-duration: 13s;
}

.animated-particles .particle:nth-child(7) {
    left: 70%;
    animation-delay: 12s;
    animation-duration: 17s;
}

.animated-particles .particle:nth-child(8) {
    left: 80%;
    animation-delay: 14s;
    animation-duration: 19s;
}

@keyframes particle-float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Page Content */
.page-content {
    padding: 4rem 0;
    background: white;
}

.page-body {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.page-body h1,
.page-body h2,
.page-body h3,
.page-body h4,
.page-body h5,
.page-body h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.page-body h2 {
    font-size: 2rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.page-body h3 {
    font-size: 1.5rem;
    position: relative;
    padding-left: 1rem;
}

.page-body h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.page-body p {
    margin-bottom: 1.5rem;
}

.page-body ul,
.page-body ol {
    margin-bottom: 1.5rem;
    margin-top: 1rem;
    padding-left: 1.2em;
    list-style-position: outside;
}

.page-body li {
    margin-bottom: 0.8rem;
    line-height: 1.6;
    padding-left: 0.5em;
}

.page-body li:last-child {
    margin-bottom: 0;
}

.page-body blockquote {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-left: 4px solid var(--primary-color);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    font-style: italic;
}

.page-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    margin: 2rem 0;
}

/* About Page Specific Styles */
.about-intro {
    margin-bottom: 4rem;
}

/* Scroll-triggered animations */
.about-content {
    margin-bottom: 4rem;
}

.about-content .content-main {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.about-content .content-main.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.about-content .content-sidebar {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s;
}

.about-content .content-sidebar.animate-in {
    opacity: 1;
    transform: translateX(0);
}

/* Individual content sections with staggered animations */
.about-content h3 {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s ease-out;
}

.about-content h3.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.about-content p,
.about-content ul {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.6s ease-out;
}

.about-content p.animate-in,
.about-content ul.animate-in {
    opacity: 1;
    transform: translateX(0);
}

/* Staggered delays for different sections */
.about-content h3:nth-of-type(1) { transition-delay: 0.1s; }
.about-content h3:nth-of-type(2) { transition-delay: 0.2s; }
.about-content h3:nth-of-type(3) { transition-delay: 0.3s; }
.about-content h3:nth-of-type(4) { transition-delay: 0.4s; }

.about-content p:nth-of-type(1) { transition-delay: 0.15s; }
.about-content p:nth-of-type(2) { transition-delay: 0.25s; }
.about-content p:nth-of-type(3) { transition-delay: 0.35s; }
.about-content p:nth-of-type(4) { transition-delay: 0.45s; }

.about-content ul:nth-of-type(1) { transition-delay: 0.2s; }
.about-content ul:nth-of-type(2) { transition-delay: 0.3s; }

@keyframes slide-in-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.about-profile {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    align-items: center;
}

.profile-image {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    position: relative;
    animation: profile-reveal 1s ease-out 0.7s forwards;
    opacity: 0;
    transform: scale(0.8);
}

@keyframes profile-reveal {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.profile-image:hover img {
    transform: scale(1.1);
}

.profile-content h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    animation: slide-in-right 0.8s ease-out 0.9s forwards;
    opacity: 0;
    transform: translateX(30px);
}

@keyframes slide-in-right {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.profile-tagline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-style: italic;
    animation: slide-in-right 0.8s ease-out 1.1s forwards;
    opacity: 0;
    transform: translateX(30px);
}

.profile-stats {
    display: flex;
    gap: 2rem;
    animation: slide-in-right 0.8s ease-out 1.3s forwards;
    opacity: 0;
    transform: translateX(30px);
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-light);
}


.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.content-main {
    font-size: 1.125rem;
    line-height: 1.8;
}

.content-main ul {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    padding-left: 1.2em;
    list-style-position: outside;
}

.content-main li {
    margin-bottom: 0.8rem;
    line-height: 1.6;
    padding-left: 0.5em;
}

.content-main li:last-child {
    margin-bottom: 0;
}

.content-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.sidebar-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.sidebar-card:hover::before {
    left: 100%;
}

.sidebar-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.sidebar-card h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.skills-list {
    list-style: none;
    padding: 0;
}

.skills-list li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    font-size: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    opacity: 0;
    animation: skill-reveal 0.6s ease-out forwards;
    transform: translateX(-20px);
}

.skills-list li .skill-icon {
    display: inline-block;
    width: 2rem;
    text-align: center;
    flex-shrink: 0;
}

.skills-list li .skill-text {
    flex: 1;
    padding-left: 0.5rem;
}

.skills-list li:nth-child(1) {
    animation-delay: 0.1s;
}

.skills-list li:nth-child(2) {
    animation-delay: 0.2s;
}

.skills-list li:nth-child(3) {
    animation-delay: 0.3s;
}

.skills-list li:nth-child(4) {
    animation-delay: 0.4s;
}

.skills-list li:nth-child(5) {
    animation-delay: 0.5s;
}

@keyframes skill-reveal {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.skills-list li:last-child {
    border-bottom: none;
}

.skills-list li:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: translateX(5px);
    transition: all 0.3s ease;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
}

.contact-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(5px);
}

.contact-icon {
    font-size: 1.5rem;
}

/* Timeline Component */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    width: 45%;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 55%;
}

.timeline-content {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    position: relative;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 20px;
    width: 0;
    height: 0;
    border: 10px solid transparent;
}

.timeline-item:nth-child(odd) .timeline-content::before {
    right: -20px;
    border-left-color: white;
}

.timeline-item:nth-child(even) .timeline-content::before {
    left: -20px;
    border-right-color: white;
}

.timeline-date {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}

.timeline-item:nth-child(odd) .timeline-date {
    right: -120px;
}

.timeline-item:nth-child(even) .timeline-date {
    left: -120px;
}

.timeline-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.timeline-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Gallery Component */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    aspect-ratio: 16/9;
    cursor: pointer;
    transition: var(--transition);
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-title {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-header {
        height: 50vh;
        min-height: 300px;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .page-hero-logo {
        width: min(35vh, 45vw);
        height: min(35vh, 45vw);
        min-width: 200px;
        min-height: 200px;
        margin: 3vh auto 1.5rem;
        top: 2vh;
    }
    
    .about-profile {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .profile-image {
        width: 200px;
        height: 200px;
        margin: 0 auto;
    }
    
    .profile-stats {
        justify-content: center;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding-left: 50px;
    }
    
    .timeline-content::before {
        left: -20px !important;
        border-right-color: white !important;
        border-left-color: transparent !important;
    }
    
    .timeline-date {
        left: -40px !important;
        right: auto !important;
        transform: rotate(-90deg) translateX(-50%);
        transform-origin: left center;
    }
    
    .gallery {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .page-content {
        padding: 2rem 0;
    }
    
    .page-body {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .sidebar-card {
        padding: 1rem;
    }
    
    .profile-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .contact-methods {
        gap: 0.5rem;
    }
    
    .contact-item {
        padding: 0.75rem;
    }
}