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

/* Ensure Font Awesome icons display properly */
.fas, .fab, .far, .fa {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
    font-weight: 900;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #ffffff;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    cursor: none;
}

/* Custom Cursor */
.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid #2563eb;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: all 0.1s ease;
    transform: translate(-50%, -50%);
}

.custom-cursor-dot {
    position: fixed;
    width: 6px;
    height: 6px;
    background: #2563eb;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transition: transform 0.15s ease;
    transform: translate(-50%, -50%);
}

.custom-cursor.hover {
    width: 40px;
    height: 40px;
    background: rgba(37, 99, 235, 0.1);
    border-color: #2563eb;
}

body.dark-mode .custom-cursor {
    border-color: #60a5fa;
}

body.dark-mode .custom-cursor-dot {
    background: #60a5fa;
}

body.dark-mode .custom-cursor.hover {
    background: rgba(96, 165, 250, 0.1);
    border-color: #60a5fa;
}

/* Hide custom cursor on mobile */
@media (hover: none) {
    body {
        cursor: auto;
    }
    .custom-cursor,
    .custom-cursor-dot {
        display: none;
    }
}

/* Dark Mode */
body.dark-mode {
    background: #1a1a1a;
    color: #e5e7eb;
}

body.dark-mode .navbar {
    background: #1f2937;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

body.dark-mode .nav-logo a {
    color: #60a5fa;
}

body.dark-mode .nav-link {
    color: #9ca3af;
}

body.dark-mode .nav-link:hover {
    color: #60a5fa;
}

body.dark-mode .bar {
    background: #60a5fa;
}

body.dark-mode .hero {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

body.dark-mode .hero h1 {
    color: #f3f4f6;
}

body.dark-mode .highlight {
    color: #60a5fa;
}

body.dark-mode .hero h2 {
    color: #9ca3af;
}

body.dark-mode .hero-description {
    color: #d1d5db;
}

body.dark-mode .btn-secondary {
    background: #374151;
    color: #60a5fa;
    border-color: #60a5fa;
}

body.dark-mode .btn-secondary:hover {
    background: #60a5fa;
    color: #ffffff;
}

body.dark-mode .about {
    background: #111827;
}

body.dark-mode .about-content p {
    color: #d1d5db;
}

body.dark-mode .section-title {
    color: #f3f4f6;
}

body.dark-mode .highlight-item {
    background: #1f2937;
}

body.dark-mode .highlight-item h3 {
    color: #f3f4f6;
}

body.dark-mode .highlight-item p {
    color: #9ca3af;
}

body.dark-mode .experience {
    background: #1a1a1a;
}

body.dark-mode .timeline::before {
    background: #374151;
}

body.dark-mode .timeline-content {
    background: #1f2937;
}

body.dark-mode .timeline-header h3 {
    color: #f3f4f6;
}

body.dark-mode .company {
    color: #60a5fa;
}

body.dark-mode .duration {
    color: #9ca3af;
}

body.dark-mode .timeline-details li {
    color: #d1d5db;
}

body.dark-mode .tech-stack span {
    background: #374151;
    color: #60a5fa;
}

body.dark-mode .skills {
    background: #111827;
}

body.dark-mode .skill-category {
    background: #1f2937;
}

body.dark-mode .skill-category h3 {
    color: #f3f4f6;
}

body.dark-mode .skill-items span {
    background: #374151;
    color: #d1d5db;
    border-color: #4b5563;
}

body.dark-mode .skill-items span:hover {
    background: #60a5fa;
    color: #ffffff;
    border-color: #60a5fa;
}

body.dark-mode .education {
    background: #1a1a1a;
}

body.dark-mode .education-item {
    background: #1f2937;
}

body.dark-mode .education-icon i {
    color: #60a5fa;
}

body.dark-mode .education-content h3 {
    color: #f3f4f6;
}

body.dark-mode .institution {
    color: #60a5fa;
}

body.dark-mode .contact {
    background: #111827;
}

body.dark-mode .contact-intro {
    color: #d1d5db;
}

body.dark-mode .contact-card {
    background: #1f2937;
}

body.dark-mode .contact-card i {
    color: #60a5fa;
}

body.dark-mode .contact-card h3 {
    color: #f3f4f6;
}

body.dark-mode .contact-card p {
    color: #9ca3af;
}

body.dark-mode .contact-card:hover {
    background: #60a5fa;
}

body.dark-mode .contact-card:hover i,
body.dark-mode .contact-card:hover h3 {
    color: #ffffff;
}

body.dark-mode .contact-card:hover p {
    color: #dbeafe;
}

body.dark-mode .game-container {
    background: #1f2937;
    border-color: #60a5fa;
}

body.dark-mode .game-header h3 {
    color: #60a5fa;
}

body.dark-mode .game-controls {
    color: #60a5fa;
}

body.dark-mode .game-header {
    border-bottom-color: #374151;
}

body.dark-mode .game-instructions {
    color: #9ca3af;
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -100px;
    left: 20px;
    z-index: 10000;
    background: #2563eb;
    color: #ffffff;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 20px;
}

body.dark-mode .skip-link {
    background: #60a5fa;
    color: #1f2937;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-logo a {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: #2563eb;
}

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

.nav-link {
    text-decoration: none;
    color: #4b5563;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #2563eb;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #2563eb;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

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

.bar {
    width: 25px;
    height: 3px;
    background: #2563eb;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.theme-toggle {
    background: transparent;
    border: 2px solid #2563eb;
    color: #2563eb;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.theme-toggle:hover {
    background: #2563eb;
    color: #ffffff;
    transform: rotate(20deg);
}

.theme-toggle i {
    font-size: 1rem;
}

body.dark-mode .theme-toggle {
    border-color: #60a5fa;
    color: #60a5fa;
}

body.dark-mode .theme-toggle:hover {
    background: #60a5fa;
    color: #1f2937;
}

/* Sections */
section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: #1f2937;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: #2563eb;
    border-radius: 2px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding-top: 70px;
}

.hero-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    max-width: 600px;
}

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

.profile-image-wrapper {
    position: relative;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #2563eb;
    box-shadow: 0 10px 40px rgba(37, 99, 235, 0.3);
    transition: all 0.3s ease;
}

.profile-image-wrapper:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 50px rgba(37, 99, 235, 0.4);
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.profile-image[loading="lazy"] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

body.dark-mode .profile-image-wrapper {
    border-color: #60a5fa;
    box-shadow: 0 10px 40px rgba(96, 165, 250, 0.3);
}

body.dark-mode .profile-image-wrapper:hover {
    box-shadow: 0 15px 50px rgba(96, 165, 250, 0.4);
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: #1f2937;
}

.highlight {
    color: #2563eb;
}

.hero h2 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: #6b7280;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    color: #4b5563;
    line-height: 1.8;
    text-align: justify;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-primary {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    background: #1d4ed8;
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.3);
    transform: translateY(-2px);
}

.btn-cta {
    position: relative;
    overflow: hidden;
    font-size: 1.1rem;
    padding: 14px 35px;
    font-weight: 600;
}

.btn-cta i {
    transition: transform 0.3s ease;
    margin-left: 0.5rem;
}

.btn-cta:hover i {
    transform: translateX(5px);
}

.btn-cta::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;
}

.btn-cta:hover::before {
    left: 100%;
}

.btn-secondary {
    background: #ffffff;
    color: #2563eb;
    border: 2px solid #2563eb;
}

.btn-secondary:hover {
    background: #2563eb;
    color: #ffffff;
    transform: translateY(-2px);
}

/* About Section */
.about {
    background: #ffffff;
}

.about-content p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #4b5563;
    line-height: 1.8;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: justify;
}

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

.highlight-item {
    text-align: center;
    padding: 2rem;
    background: #f9fafb;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.highlight-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.highlight-item i {
    font-size: 2.5rem;
    color: #2563eb;
    margin-bottom: 1rem;
}

.highlight-item h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.highlight-item p {
    color: #6b7280;
    font-weight: 500;
    text-align: center;
}

/* Experience Section */
.experience {
    background: #f9fafb;
}

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

.timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e5e7eb;
}

.timeline-item {
    position: relative;
    padding-left: 80px;
    margin-bottom: 3rem;
}

.timeline-marker {
    position: absolute;
    left: 20px;
    top: 0;
    width: 20px;
    height: 20px;
    background: #2563eb;
    border: 4px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 0 4px #dbeafe;
}

.timeline-content {
    background: #ffffff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateX(5px);
}

.timeline-header {
    margin-bottom: 1.5rem;
}

.timeline-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.company {
    font-size: 1.1rem;
    color: #2563eb;
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

.duration {
    color: #6b7280;
    font-size: 0.95rem;
    display: block;
}

.timeline-details {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.timeline-details li {
    margin-bottom: 0.75rem;
    color: #4b5563;
    line-height: 1.6;
    text-align: justify;
}

.timeline-details {
    list-style-type: disc;
}

.timeline-details li ul {
    list-style-type: none;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    padding-left: 2rem;
}

.timeline-details li ul li::before {
    content: '- ';
    margin-right: 0.5em;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-stack span {
    background: #eff6ff;
    color: #2563eb;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Skills Section */
.skills {
    background: #ffffff;
}

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

.skill-category {
    background: #f9fafb;
    padding: 2rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.skill-category h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-category h3 i {
    color: #2563eb;
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-items span {
    background: #ffffff;
    color: #4b5563;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.skill-items span:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    transform: translateY(-2px);
    cursor: pointer;
}

.skill-items span {
    position: relative;
    overflow: hidden;
}

.skill-items span::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.2), transparent);
    transition: left 0.5s ease;
}

.skill-items span:hover::before {
    left: 100%;
}

/* Education Section */
.education {
    background: #f9fafb;
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.education-item {
    background: #ffffff;
    padding: 2rem;
    border-radius: 12px;
    display: flex;
    gap: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.education-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.education-icon {
    flex-shrink: 0;
}

.education-icon i {
    font-size: 2.5rem;
    color: #2563eb;
}

.education-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.institution {
    color: #2563eb;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.achievement {
    color: #059669;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.duration {
    color: #6b7280;
    font-size: 0.9rem;
}

/* Contact Section */
.contact {
    background: #ffffff;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-intro {
    font-size: 1.1rem;
    color: #4b5563;
    margin-bottom: 2rem;
    line-height: 1.8;
    text-align: justify;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.contact-card {
    background: #f9fafb;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.contact-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.contact-card:hover::after {
    width: 300px;
    height: 300px;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    background: #2563eb;
}

.contact-card i {
    font-size: 2.5rem;
    color: #2563eb;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
    position: relative;
    z-index: 1;
}

.contact-card:hover i {
    color: #ffffff;
}

.contact-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
    position: relative;
    z-index: 1;
}

.contact-card:hover h3 {
    color: #ffffff;
}

.contact-card p {
    color: #6b7280;
    transition: color 0.3s ease;
    position: relative;
    z-index: 1;
}

.contact-card:hover p {
    color: #dbeafe;
}

.form-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1.5rem;
}

.contact-form {
    background: #f9fafb;
    padding: 2rem;
    border-radius: 12px;
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background: #ffffff;
    color: #1f2937;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.contact-form input.error,
.contact-form textarea.error {
    border-color: #ef4444;
}

.contact-form input.error:focus,
.contact-form textarea.error:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

.form-group {
    position: relative;
}

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

.btn-submit {
    width: 100%;
    cursor: pointer;
    border: none;
    justify-content: center;
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    display: none;
}

.form-message.success {
    display: block;
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.form-message.error {
    display: block;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

body.dark-mode .form-title {
    color: #f3f4f6;
}

body.dark-mode .contact-form {
    background: #1f2937;
}

body.dark-mode .contact-form label {
    color: #d1d5db;
}

body.dark-mode .contact-form input,
body.dark-mode .contact-form textarea {
    background: #374151;
    border-color: #4b5563;
    color: #f3f4f6;
}

body.dark-mode .contact-form input:focus,
body.dark-mode .contact-form textarea:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

body.dark-mode .form-message.success {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    border-color: #10b981;
}

body.dark-mode .form-message.error {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border-color: #ef4444;
}

body.dark-mode .form-error {
    color: #fca5a5;
}

body.dark-mode .contact-form input.error,
body.dark-mode .contact-form textarea.error {
    border-color: #ef4444;
}

body.dark-mode .contact-form input.error:focus,
body.dark-mode .contact-form textarea.error:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* Footer */
.footer {
    background: #1f2937;
    color: #ffffff;
    text-align: center;
    padding: 2rem 0;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: #1d4ed8;
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.scroll-to-top:active {
    transform: translateY(-2px);
}

.scroll-to-top i {
    font-size: 1.2rem;
}

body.dark-mode .scroll-to-top {
    background: #60a5fa;
    color: #1f2937;
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.4);
}

body.dark-mode .scroll-to-top:hover {
    background: #3b82f6;
    box-shadow: 0 6px 20px rgba(96, 165, 250, 0.5);
}

/* Floating CTA Button */
.floating-cta {
    position: fixed;
    bottom: 90px;
    right: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 998;
    font-size: 0.95rem;
}

.floating-cta.visible {
    opacity: 1;
    visibility: visible;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(102, 126, 234, 0.7);
    }
}

.floating-cta:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 30px rgba(102, 126, 234, 0.6);
}

.floating-cta i {
    font-size: 1.1rem;
}

.floating-cta-text {
    font-weight: 600;
}

@media (max-width: 768px) {
    .floating-cta {
        bottom: 80px;
        right: 20px;
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .floating-cta-text {
        display: none;
    }

    .floating-cta {
        width: 50px;
        height: 50px;
        padding: 0;
        border-radius: 50%;
        justify-content: center;
    }

    .scroll-to-top {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
}

/* Easter Egg Game Styles */
.game-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.game-modal.active {
    display: flex;
}

.game-container {
    background: #ffffff;
    border: 2px solid #2563eb;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 0 50px rgba(37, 99, 235, 0.5);
    text-align: center;
    max-width: 500px;
    width: 90%;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.game-header h3 {
    color: #2563eb;
    font-size: 1.5rem;
    margin: 0;
}

.game-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #2563eb;
}

.close-btn {
    background: transparent;
    border: 2px solid #ef4444;
    color: #ef4444;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #ef4444;
    color: #ffffff;
}

#game-canvas {
    border: 2px solid #2563eb;
    background: #000;
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.3);
    margin: 1rem 0;
}

.game-instructions {
    color: #6b7280;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.game-instructions p {
    margin: 0.5rem 0;
}

.easter-egg-hint {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.3);
    color: #2563eb;
    padding: 1rem;
    border-radius: 10px;
    font-size: 0.8rem;
    backdrop-filter: blur(10px);
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    pointer-events: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.easter-egg-hint.show {
    opacity: 1;
    transform: translateY(0);
}

.easter-egg-hint p {
    margin: 0;
}

/* Tablet Layout (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 90%;
    }

    .hero-wrapper {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .profile-image-wrapper {
        width: 280px;
        height: 280px;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .about-highlights {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .education-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-methods {
        grid-template-columns: repeat(2, 1fr);
    }

    .timeline-item {
        padding-left: 60px;
    }

    .nav-menu {
        gap: 1.5rem;
    }
}

/* Mobile Layout (max-width: 768px) */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: #ffffff;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.1);
        padding: 2rem 0;
    }

    body.dark-mode .nav-menu {
        background-color: #1f2937;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-wrapper {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-image {
        order: -1;
    }

    .profile-image-wrapper {
        width: 250px;
        height: 250px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .section-title {
        font-size: 2rem;
    }

    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }

    .about-highlights {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        left: 10px;
    }

    .timeline-item {
        padding-left: 50px;
    }

    .timeline-marker {
        left: 0;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .education-grid {
        grid-template-columns: 1fr;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .contact-methods {
        grid-template-columns: 1fr;
    }
}

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

    .hero h2 {
        font-size: 1.2rem;
    }

    .btn {
        padding: 10px 25px;
        font-size: 0.9rem;
    }

    .education-grid {
        grid-template-columns: 1fr;
    }

    .education-item {
        flex-direction: column;
        text-align: center;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Print Stylesheet */
@media print {
    /* Hide non-essential elements */
    .navbar,
    .nav-toggle,
    .theme-toggle,
    .scroll-to-top,
    .floating-cta,
    .hero-buttons,
    .contact-form,
    .game-modal,
    .easter-egg-hint,
    .skip-link {
        display: none !important;
    }

    /* Reset page margins */
    @page {
        margin: 1cm;
        size: A4;
    }

    /* Body styles */
    body {
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 11pt;
        line-height: 1.5;
    }

    /* Remove backgrounds and shadows */
    * {
        background: transparent !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    /* Hero section */
    .hero {
        padding: 20pt 0 !important;
        page-break-after: avoid;
    }

    .hero-wrapper {
        display: block !important;
    }

    .hero h1 {
        font-size: 24pt !important;
        color: #000000 !important;
        margin-bottom: 8pt !important;
    }

    .hero h2 {
        font-size: 14pt !important;
        color: #333333 !important;
        margin-bottom: 12pt !important;
    }

    .hero-description {
        font-size: 11pt !important;
        color: #333333 !important;
        margin-bottom: 16pt !important;
        text-align: left !important;
    }

    .hero-image {
        display: none !important;
    }

    /* Section titles */
    .section-title {
        font-size: 18pt !important;
        color: #000000 !important;
        margin-top: 16pt !important;
        margin-bottom: 12pt !important;
        border-bottom: 2pt solid #000000 !important;
        padding-bottom: 4pt !important;
        page-break-after: avoid;
    }

    .section-title::after {
        display: none !important;
    }

    section {
        padding: 0 !important;
        page-break-inside: avoid;
    }

    /* Timeline */
    .timeline::before {
        display: none !important;
    }

    .timeline-item {
        padding-left: 0 !important;
        margin-bottom: 16pt !important;
        page-break-inside: avoid;
    }

    .timeline-marker {
        display: none !important;
    }

    .timeline-content {
        border: 1pt solid #cccccc !important;
        padding: 12pt !important;
    }

    .timeline-header h3 {
        font-size: 14pt !important;
        color: #000000 !important;
    }

    .company {
        color: #000000 !important;
        font-weight: bold !important;
    }

    .duration {
        color: #333333 !important;
    }

    .tech-stack span {
        border: 1pt solid #333333 !important;
        padding: 2pt 6pt !important;
        font-size: 9pt !important;
        color: #000000 !important;
    }

    /* Skills */
    .skill-category {
        border: 1pt solid #cccccc !important;
        padding: 12pt !important;
        break-inside: avoid;
    }

    .skill-items span {
        border: 1pt solid #333333 !important;
        padding: 2pt 6pt !important;
        font-size: 9pt !important;
        color: #000000 !important;
    }

    /* Education */
    .education-icon {
        display: none !important;
    }

    .education-item {
        border: 1pt solid #cccccc !important;
        padding: 12pt !important;
        break-inside: avoid;
    }

    /* Contact */
    .contact-form-section {
        display: none !important;
    }

    .contact-card {
        border: 1pt solid #cccccc !important;
        padding: 12pt !important;
    }

    /* Footer */
    .footer {
        margin-top: 16pt !important;
        border-top: 1pt solid #000000 !important;
        color: #000000 !important;
    }

    /* Links */
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #666666;
    }

    a[href^="#"]:after,
    a[href^="/"]:after {
        content: "";
    }

    h1, h2, h3 {
        page-break-after: avoid;
    }

    .highlight {
        color: #000000 !important;
        font-weight: bold !important;
    }
}

/* PWA Install Prompt */
.pwa-install-prompt {
    position: fixed;
    bottom: -300px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    max-width: 450px;
    width: 90%;
    transition: bottom 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    cursor: auto; /* Override body cursor:none */
}

.pwa-install-prompt * {
    cursor: auto !important; /* Force normal cursor for all children */
}

.pwa-install-prompt.show {
    bottom: 20px;
}

.pwa-prompt-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    color: white;
    position: relative;
    backdrop-filter: blur(10px);
}

.pwa-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    line-height: 1;
    z-index: 10001;
    pointer-events: auto;
}

.pwa-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.pwa-prompt-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    animation: bounce 2s infinite;
}

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

.pwa-prompt-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.pwa-prompt-content p {
    opacity: 0.95;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.pwa-prompt-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.pwa-prompt-buttons .btn {
    flex: 1;
    min-width: 120px;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.pwa-prompt-buttons .btn-primary {
    background: white;
    color: #667eea;
}

.pwa-prompt-buttons .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.pwa-prompt-buttons .btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.pwa-prompt-buttons .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    .pwa-install-prompt {
        width: 95%;
    }

    .pwa-prompt-content {
        padding: 1.25rem;
    }

    .pwa-prompt-content h3 {
        font-size: 1.25rem;
    }

    .pwa-prompt-icon {
        font-size: 2.5rem;
    }
}

/* Dark mode support for PWA prompt */
.dark-mode .pwa-install-prompt {
    /* Already has gradient, looks good in dark mode */
}
