/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Prevent horizontal overflow on all elements */
*, *::before, *::after {
    max-width: 100%;
    box-sizing: border-box;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    border: 2px solid #f1f1f1;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

/* Firefox Scrollbar */
html {
    scrollbar-width: thin;
    scrollbar-color: #667eea #f1f1f1;
}

html, body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.back-to-top:active {
    transform: translateY(-1px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    max-width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

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

.nav-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c5aa0;
}

.nav-logo i {
    margin-right: 10px;
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: #2c5aa0;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.hero-text {
    flex: 1;
    color: white;
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
}

.hero-text h2 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-text p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.8;
    max-width: 500px;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    animation: fadeInUp 1s ease 0.6s both;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
}

.btn-primary {
    background: #ff6b6b;
    color: white;
}

.btn-primary:hover {
    background: #ff5252;
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background: white;
    color: #667eea;
}

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

.aircraft-silhouette {
    font-size: 15rem;
    color: rgba(255, 255, 255, 0.1);
    animation: float 3s ease-in-out infinite;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

/* About Section */
.about {
    padding: 100px 0;
    background: #f8f9fa;
}

.about h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c5aa0;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    text-align: justify;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.skill-item {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

.skill-item i {
    font-size: 3rem;
    color: #2c5aa0;
    margin-bottom: 1rem;
}

.skill-item h4 {
    font-size: 1.2rem;
    color: #333;
}

/* Experience Section */
.experience {
    padding: 100px 0;
    background: white;
}

.experience h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c5aa0;
}

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

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #2c5aa0;
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 3rem;
}

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

.timeline-marker {
    position: absolute;
    width: 20px;
    height: 20px;
    background: #2c5aa0;
    border-radius: 50%;
    top: 0;
}

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

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

.timeline-content {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.timeline-content h3 {
    color: #2c5aa0;
    margin-bottom: 0.5rem;
}

.timeline-date {
    color: #666;
    font-weight: 500;
    font-size: 0.9rem;
}

.timeline-content p {
    margin-top: 1rem;
    color: #555;
}

/* Achievements Section */
.achievements {
    padding: 100px 0;
    background: #f8f9fa;
}

.achievements h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c5aa0;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.achievement-card {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

.achievement-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.achievement-icon i {
    font-size: 2rem;
    color: white;
}

.achievement-card h3 {
    color: #2c5aa0;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.achievement-card p {
    color: #666;
    line-height: 1.6;
}

/* Contact Section */
.contact {
    padding: 100px 0;
    background: white;
}

.contact h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c5aa0;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info h3 {
    color: #2c5aa0;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.contact-info p {
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #555;
}

.contact-method i {
    color: #2c5aa0;
    width: 20px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2c5aa0;
}

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

/* Footer - Redesigned */
.footer {
    background: #2c5aa0;
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
    width: 100%;
}

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

.footer-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copyright h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    color: white;
}

.footer-social {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.social-link {
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.social-link:hover {
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.footer-credit {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-credit small {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}

.footer-credit a {
    color: #ff6b6b;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.footer-credit a:hover {
    color: #ff5252;
    text-decoration: underline;
}

/* Ensure no white space at bottom */
html {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    position: relative;
}

/* Remove any potential spacing from last elements */
section:last-of-type {
    margin-bottom: 0;
    padding-bottom: 0;
}

.footer {
    margin-top: 4rem;
    margin-bottom: 0;
    padding-bottom: 0;
    position: relative;
    bottom: 0;
    width: 100%;
}

/* Ensure footer sticks to bottom */
.footer::after {
    content: '';
    display: block;
    height: 0;
    clear: both;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-aircraft {
    font-size: 4rem;
    color: white;
    animation: loadingFly 2s ease-in-out infinite;
    margin-bottom: 2rem;
}

.loading-text {
    color: white;
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 2px;
    animation: loadingPulse 1.5s ease-in-out infinite;
}

.loading-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin-top: 2rem;
    overflow: hidden;
}

.loading-progress {
    height: 100%;
    background: white;
    border-radius: 2px;
    animation: loadingProgress 3s ease-in-out;
}

/* Animation Classes for Scroll Effects */
.animate-on-scroll {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-on-scroll.animated {
    opacity: 1;
}

.fade-in-up {
    transform: translateY(50px);
}

.fade-in-up.animated {
    transform: translateY(0);
}

.fade-in-left {
    transform: translateX(-50px);
}

.fade-in-left.animated {
    transform: translateX(0);
}

.fade-in-right {
    transform: translateX(50px);
}

.fade-in-right.animated {
    transform: translateX(0);
}

.scale-in {
    transform: scale(0.8);
}

.scale-in.animated {
    transform: scale(1);
}

.rotate-in {
    transform: rotate(-10deg) scale(0.8);
}

.rotate-in.animated {
    transform: rotate(0deg) scale(1);
}

.slide-in-bottom {
    transform: translateY(100px);
}

.slide-in-bottom.animated {
    transform: translateY(0);
}

.flip-in {
    transform: rotateY(-90deg);
}

.flip-in.animated {
    transform: rotateY(0deg);
}

.bounce-in {
    transform: scale(0.3);
    animation-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.bounce-in.animated {
    transform: scale(1);
}

/* Staggered Animation Delays */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* Keyframe Animations */
@keyframes loadingFly {
    0%, 100% {
        transform: translateX(-20px) rotate(-5deg);
    }
    50% {
        transform: translateX(20px) rotate(5deg);
    }
}

@keyframes loadingPulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

@keyframes loadingProgress {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-10px) translateX(-50%);
    }
    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

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

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

@keyframes zoomIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes rotateIn {
    0% {
        transform: rotate(-180deg) scale(0.5);
        opacity: 0;
    }
    100% {
        transform: rotate(0deg) scale(1);
        opacity: 1;
    }
}

@keyframes flipInX {
    0% {
        transform: perspective(400px) rotateX(-90deg);
        opacity: 0;
    }
    40% {
        transform: perspective(400px) rotateX(-10deg);
    }
    70% {
        transform: perspective(400px) rotateX(10deg);
    }
    100% {
        transform: perspective(400px) rotateX(0deg);
        opacity: 1;
    }
}

@keyframes bounceInUp {
    0% {
        transform: translateY(100px);
        opacity: 0;
    }
    60% {
        transform: translateY(-20px);
        opacity: 1;
    }
    80% {
        transform: translateY(10px);
    }
    100% {
        transform: translateY(0);
    }
}

/* Hover Effects for Interactive Elements */
.skill-item {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.skill-item:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 20px 40px rgba(44, 90, 160, 0.2);
}

.achievement-card {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.achievement-card:hover {
    transform: translateY(-15px) rotateY(5deg);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.timeline-item {
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-content {
    transform: scale(1.02);
    box-shadow: 0 15px 30px rgba(44, 90, 160, 0.15);
}

/* Parallax Elements */
.parallax-element {
    transition: transform 0.1s ease-out;
}

/* Floating Elements */
.floating-element {
    animation: gentleFloat 4s ease-in-out infinite;
}

.floating-element:nth-child(2n) {
    animation-delay: -2s;
}

@keyframes gentleFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-10px) rotate(1deg);
    }
    66% {
        transform: translateY(5px) rotate(-1deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    * {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    html, body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }
    
    .container {
        padding: 0 15px;
        width: 100%;
        max-width: 100%;
    }
    
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero-content {
        flex-direction: column;
        text-align: center;
        width: 100%;
        max-width: 100%;
        padding: 0 15px;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
        word-wrap: break-word;
        max-width: 100%;
    }
    
    .aircraft-silhouette {
        font-size: 8rem;
        margin-top: 2rem;
        max-width: 100%;
        overflow: hidden;
    }
    
    .hero-buttons {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }
    
    .btn {
        min-width: 120px;
        text-align: center;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding-left: 3rem !important;
        padding-right: 0 !important;
    }
    
    .timeline-marker {
        left: 10px !important;
        right: auto !important;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-container {
        padding: 0 15px;
    }
    
    .footer-main {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .footer-copyright h3 {
        font-size: 1.4rem;
        font-weight: 700;
        margin-bottom: 0;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-credit {
        text-align: center;
        padding-top: 1rem;
    }
    
    .footer-credit small {
        font-size: 0.75rem;
        line-height: 1.5;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}