/* Import Instrumental Sans Font */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap');

/* Skeleton Loading Styles */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

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

.skeleton-hero {
    margin-bottom: 40px;
}

.skeleton-hero h1 {
    height: 48px;
    width: 60%;
    margin-bottom: 16px;
}

.skeleton-hero p {
    height: 24px;
    width: 80%;
    margin-bottom: 16px;
}

.skeleton-hero .hero-email-container {
    height: 20px;
    width: 40%;
}

.skeleton-about {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 32px;
    align-items: start;
}

.skeleton-about-photo {
    width: 200px;
    height: 200px;
    border-radius: 8px;
}

.skeleton-about-text {
    display: flex;
    flex-direction: column;
}

.skeleton-about-text .skeleton-line {
    height: 16px;
    margin-bottom: 12px;
    border-radius: 4px;
}

.skeleton-about-text .skeleton-line:nth-child(1) { width: 100%; }
.skeleton-about-text .skeleton-line:nth-child(2) { width: 95%; }
.skeleton-about-text .skeleton-line:nth-child(3) { width: 88%; }
.skeleton-about-text .skeleton-line:nth-child(4) { width: 75%; }

.skeleton-social {
    display: flex;
    gap: 16px;
    margin-top: 24px;
}

.skeleton-social-item {
    height: 40px;
    width: 100px;
    border-radius: 8px;
}

.skeleton-tech {
    margin-bottom: 40px;
}

.skeleton-tech-category {
    margin-bottom: 32px;
}

.skeleton-tech-title {
    height: 28px;
    width: 150px;
    margin-bottom: 16px;
    border-radius: 6px;
}

.skeleton-tech-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skeleton-tech-skill {
    height: 32px;
    border-radius: 16px;
}

.skeleton-tech-skill:nth-child(1) { width: 80px; }
.skeleton-tech-skill:nth-child(2) { width: 100px; }
.skeleton-tech-skill:nth-child(3) { width: 90px; }
.skeleton-tech-skill:nth-child(4) { width: 70px; }
.skeleton-tech-skill:nth-child(5) { width: 110px; }
.skeleton-tech-skill:nth-child(6) { width: 95px; }

.skeleton-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid rgba(230, 230, 230, 0.8);
}

.skeleton-card-title {
    height: 28px;
    width: 70%;
    margin-bottom: 16px;
    border-radius: 6px;
}

.skeleton-card-meta {
    height: 16px;
    width: 40%;
    margin-bottom: 16px;
    border-radius: 4px;
}

.skeleton-card-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.skeleton-card-tech-tag {
    height: 24px;
    border-radius: 12px;
}

.skeleton-card-tech-tag:nth-child(1) { width: 60px; }
.skeleton-card-tech-tag:nth-child(2) { width: 80px; }
.skeleton-card-tech-tag:nth-child(3) { width: 70px; }

.skeleton-card-summary {
    margin-bottom: 16px;
}

.skeleton-card-summary .skeleton-line {
    height: 16px;
    margin-bottom: 8px;
    border-radius: 4px;
}

.skeleton-card-summary .skeleton-line:nth-child(1) { width: 100%; }
.skeleton-card-summary .skeleton-line:nth-child(2) { width: 95%; }
.skeleton-card-summary .skeleton-line:nth-child(3) { width: 80%; }

.skeleton-card-links {
    display: flex;
    gap: 12px;
}

.skeleton-card-link {
    height: 32px;
    width: 80px;
    border-radius: 6px;
}

.skeleton-timeline-item {
    margin-bottom: 32px;
    padding-left: 40px;
    position: relative;
}

.skeleton-timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e0e0e0;
}

.skeleton-timeline-title {
    height: 24px;
    width: 60%;
    margin-bottom: 8px;
    border-radius: 6px;
}

.skeleton-timeline-meta {
    height: 16px;
    width: 40%;
    margin-bottom: 12px;
    border-radius: 4px;
}

.skeleton-timeline-desc {
    height: 16px;
    width: 80%;
    border-radius: 4px;
}

.skeleton-profile-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    text-align: center;
    border: 1px solid rgba(230, 230, 230, 0.8);
}

.skeleton-profile-title {
    height: 24px;
    width: 60%;
    margin: 0 auto 16px;
    border-radius: 6px;
}

.skeleton-profile-link {
    height: 32px;
    width: 100px;
    margin: 0 auto;
    border-radius: 6px;
}

.skeleton-hidden {
    display: none !important;
}

/* Responsive skeleton styles */
@media (max-width: 768px) {
    .skeleton-about {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 20px;
    }
    
    .skeleton-about-photo {
        width: 150px;
        height: 150px;
        justify-self: center;
    }
    
    .skeleton-social {
        justify-content: center;
    }
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* cursor: url('../images/cursor.png'), auto; */
}

body {
    font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #000;
    background-image: url('../images/bg.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
    position: relative;
    cursor: url('../images/cursor.webp'), auto;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(120, 160, 120, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(100, 140, 100, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(140, 180, 140, 0.1) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

/* Container */
main {
    max-width: 900px;
    margin: 100px auto 0 auto; /* Added top margin for space after navbar */
    padding: 10px 24px 24px 24px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    border-radius: 16px; /* Added corner radius */
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px; /* Reduced bottom margin for footer spacing */
}

/* Navigation */
#navbar {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    max-width: calc(100vw - 48px);
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(224, 224, 224, 0.8);
    border-radius: 12px;
    z-index: 1000;
    padding: 0 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.nav-container {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 48px;
    padding: 0 16px;
}

.nav-links {
    display: flex;
    gap: 20px;
    flex: 0 0 auto;
    margin-right: auto;
}

.nav-links a, .nav-resume a {
    text-decoration: none;
    color: #000;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #1b6dbf;
}

.nav-resume {
    position: relative;
    flex: 0 0 auto;
    margin-left: auto;
}

.nav-resume a {
    background: linear-gradient(135deg, #800020, #A0293D);
    color: white !important;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 600;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(128, 0, 32, 0.3);
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    isolation: isolate; /* Create stacking context */
}

.nav-resume a:hover {
    background: linear-gradient(135deg, #A0293D, #800020);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(128, 0, 32, 0.4);
}

/* Enhanced sliding shine effect */
.nav-resume a::before {
    content: "";
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
      );
    animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
    0% {
      left: -100%;
      transition-property: left;
    }
    17.8%,
    100% {
      left: 100%;
      transition-property: left;
    }
  }

/* Hamburger menu - hidden by default on desktop */
.hamburger-menu {
    display: none;
}

.mobile-nav-overlay {
    display: none;
}

/* Sections */
.section {
    margin: 48px 0;
    padding-bottom: 48px;
    border-bottom: 1px solid #f0f0f0;
}

.section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 24px;
}

.section h2 {
    font-size: 2rem;
    margin-bottom: 24px;
    color: #000;
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-link-icon {
    opacity: 0;
    transition: all 0.3s ease;
    cursor: pointer;
    color: #666;
    font-size: 1.1rem;
    text-decoration: none;
    padding: 6px;
    border-radius: 4px;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-variation-settings: normal;
}

.section h2:hover .section-link-icon {
    opacity: 1;
}

.section-link-icon:hover {
    background-color: rgba(27, 109, 191, 0.1);
    color: #1b6dbf;
    transform: scale(1.1);
}

.section-link-icon:active {
    transform: scale(0.95);
}

.section h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 60px;
    height: 2px;
    background: #1b6dbf;
}

/* Research Header */
.research-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.research-header h2 {
    margin-bottom: 0;
}

.scholar-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1b6dbf;
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid #1b6dbf;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 0.9rem;
    font-weight: 500;
}

.scholar-link:hover {
    background: #1b6dbf;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(27, 109, 191, 0.3);
}

.scholar-link i {
    font-size: 16px;
}

/* Hero Section */
#landing {
    text-align: center;
    padding: 60px 0;
    border-bottom: none;
    margin-bottom: -40px; /* Reduce gap to about section */
}

#hero-name {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #000;
}

#hero-tagline {
    font-size: 1.25rem;
    color: #333232;
    margin-bottom: 5px;
}

.hero-email-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
}

#hero-email {
    font-size: 1rem;
}

.hero-email-link {
    color: #1b6dbf;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.hero-email-link:hover {
    color: #154a8a;
    text-decoration: underline;
}

.copy-email-btn {
    background: rgba(27, 109, 191, 0.1);
    border: 1px solid #1b6dbf;
    border-radius: 6px;
    padding: 8px 10px;
    cursor: pointer;
    transition: all 0.2s;
    color: #1b6dbf;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.copy-email-btn:hover {
    background: #1b6dbf;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(27, 109, 191, 0.3);
}

.copy-email-btn i {
    font-size: 14px;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 32px;
    align-items: start;
}

.about-photo img {
    width: 200px;
    height: 200px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #e0e0e0;
}

.about-text p {
    margin-bottom: 24px;
    color: #272626;
    line-height: 1.7;
}

.social-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.social-link {
    color: #1b6dbf;
    text-decoration: none;
    padding: 12px 16px;
    border: 1px solid #1b6dbf;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.social-link:hover {
    background: #1b6dbf;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(27, 109, 191, 0.3);
}

.social-link i {
    font-size: 16px;
}

/* Tech Stack */
#techstack-content {
    display: grid;
    gap: 24px;
}

.tech-category {
    border: 1px solid rgba(224, 224, 224, 0.8);
    border-radius: 6px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.tech-category h3 {
    font-size: 1.25rem;
    margin-bottom: 16px;
    color: #000;
}

.tech-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-skill {
    background: #f5f5f5;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #333;
    border: 1px solid #e0e0e0;
}

/* Cards (Projects, Research, Achievements, Certifications) */
.card {
    border: 1px solid rgba(224, 224, 224, 0.8);
    border-radius: 6px;
    padding: 24px;
    padding-right: 60px;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: #000;
}

.card-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.card-summary {
    color: #333;
    line-height: 1.6;
    margin-bottom: 16px;
}

.card-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.tech-tag {
    background: #1b6dbf;
    color: #fff;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 0.8rem;
}

.card-links {
    display: flex;
    gap: 16px;
    align-items: center;
}

.card-links a {
    color: #1b6dbf;
    text-decoration: none;
    font-size: 0.9rem;
}

.card-links a:hover {
    text-decoration: underline;
}

.expand-btn {
    background: none;
    border: 1px solid #1b6dbf;
    color: #1b6dbf;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.expand-btn:hover {
    background: #1b6dbf;
    color: #fff;
}

.copy-link {
    position: absolute;
    top: 24px;
    right: 24px;
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    font-size: 1rem;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.copy-link:hover {
    color: #1b6dbf;
    background-color: rgba(27, 109, 191, 0.1);
    transform: scale(1.1);
}

.copy-link:active {
    transform: scale(0.95);
}

.copy-link i {
    transition: all 0.3s ease;
    font-variation-settings: normal;
}

/* Enhanced Material Symbols transitions */
.material-symbols-outlined {
    transition: all 0.3s ease;
    font-variation-settings: normal;
}

.copy-link.copying i {
    color: #28a745;
    transform: scale(1.2);
}

.detail-content {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
    color: #333;
    line-height: 1.6;
}

/* Timeline (Experience, Education) */
.timeline {
    position: relative;
    padding-left: 32px;
}

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

.timeline-item {
    position: relative;
    margin-bottom: 32px;
    padding: 20px;
    border: 1px solid rgba(224, 224, 224, 0.8);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 24px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #800020;
    border: 2px solid #fff;
    transition: background-color 0.3s ease;
    z-index: 2;
}

.timeline-item.timeline-active::before {
    background: #1b6dbf;
}

.timeline-item h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #000;
}

.timeline-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.timeline-description {
    color: #333;
    line-height: 1.6;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.pagination button {
    background: none;
    border: 1px solid #e0e0e0;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    color: #333;
    transition: all 0.2s;
}

.pagination button:hover {
    border-color: #1b6dbf;
    color: #1b6dbf;
}

.pagination button.active {
    background: #1b6dbf;
    color: #fff;
    border-color: #1b6dbf;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Load More Button */
.load-more-btn {
    display: block;
    margin: 24px auto 0;
    background: none;
    border: 1px solid #1b6dbf;
    color: #1b6dbf;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.load-more-btn:hover {
    background: #1b6dbf;
    color: #fff;
}

/* Contact Section */
.contact-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.contact-info p {
    margin-bottom: 16px;
    color: #333;
}

.contact-email-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: #333;
}

.email-link {
    color: #1b6dbf;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.email-link:hover {
    color: #154a8a;
    text-decoration: underline;
}

.contact-social {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.contact-social-link {
    color: #1b6dbf;
    text-decoration: none;
    padding: 12px 16px;
    border: 1px solid #1b6dbf;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.contact-social-link:hover {
    background: #1b6dbf;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(27, 109, 191, 0.3);
}

.contact-social-link i {
    font-size: 16px;
}

/* Contact Form Styling */
.contact-form-container {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 32px;
    border: 1px solid rgba(224, 224, 224, 0.4);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.form-header {
    text-align: center;
    margin-bottom: 32px;
}

.form-header h3 {
    font-size: 1.8rem;
    color: #000;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-header p {
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: stretch;
}

.contact-form .btn-submit {
    align-self: center;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 0.95rem;
}

.form-control {
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
}

.form-control:focus {
    outline: none;
    border-color: #1b6dbf;
    box-shadow: 0 0 0 3px rgba(27, 109, 191, 0.1);
    background: rgba(255, 255, 255, 1);
}

.form-control::placeholder {
    color: #999;
    font-style: italic;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
    line-height: 1.5;
}

.btn-submit {
    background: #1b6dbf;
    color: white;
    border: 2px solid #1b6dbf;
    padding: 12px 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    text-transform: none;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(27, 109, 191, 0.2);
    width: 140px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 auto;
}

.btn-submit .btn-icon {
    font-size: 0.9rem;
    margin: 0;
}

.btn-submit .btn-text {
    white-space: nowrap;
}

.btn-submit:hover:not(:disabled) {
    background: transparent;
    color: #1b6dbf;
    border-color: #1b6dbf;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(27, 109, 191, 0.25);
}

.btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(27, 109, 191, 0.2);
}

.btn-submit:disabled {
    cursor: not-allowed;
    transform: none;
    opacity: 0.8;
}

/* Submitting state */
.btn-submit:disabled .btn-icon.fa-spin {
    animation: fa-spin 1s infinite linear;
    color: white;
}

/* Submitted state - white checkmark */
.btn-submit .btn-icon.fa-check {
    color: white;
}

/* Override hover when disabled */
.btn-submit:disabled:hover {
    background: #1b6dbf;
    color: white;
    border-color: #1b6dbf;
    transform: none;
    box-shadow: 0 2px 8px rgba(27, 109, 191, 0.2);
}

@keyframes fa-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(255, 140, 0, 0.3);
    }
    50% {
        transform: scale(1.01);
        box-shadow: 0 4px 12px rgba(255, 140, 0, 0.4);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(255, 140, 0, 0.3);
    }
}

.form-sending {
    opacity: 0.8;
    pointer-events: none;
}

.form-sending .form-control {
    background: rgba(255, 255, 255, 0.6);
    border-color: #ddd;
}

.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.form-status {
    margin-top: 20px;
    padding: 16px 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    display: none;
    transition: all 0.3s ease;
}

.form-status.success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border: 2px solid #c3e6cb;
    display: block;
    animation: slideInUp 0.4s ease-out;
}

.form-status.error {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border: 2px solid #f5c6cb;
    display: block;
    animation: slideInUp 0.4s ease-out;
}

.form-status.loading {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
    border: 2px solid #bee5eb;
    display: block;
    animation: slideInUp 0.4s ease-out;
}

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

/* Profiles Section */
#profiles-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.profile-card {
    border: 1px solid rgba(224, 224, 224, 0.8);
    border-radius: 6px;
    padding: 24px;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.profile-card h3 {
    margin-bottom: 16px;
    color: #000;
}

.profile-card a {
    color: #1b6dbf;
    text-decoration: none;
    font-weight: 500;
}

.profile-card a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1024px) {
    /* Tablet adjustments */
    #navbar {
        width: calc(100vw - 32px);
        left: 16px;
        right: 16px;
        transform: none;
    }
    
    main {
        margin: 120px 16px 20px 16px;
        max-width: none;
    }
}

@media (max-width: 768px) {
    /* Mobile adjustments */
    #navbar {
        position: fixed;
        top: 8px;
        left: 8px;
        right: 8px;
        width: auto;
        max-width: none;
        background: rgba(255, 255, 255, 0.4);
        backdrop-filter: blur(10px);
        margin: 0;
        padding: 0 16px;
        transform: none;
        box-sizing: border-box;
    }

    .nav-container {
        flex-direction: row;
        height: 44px;
        padding: 0;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        max-width: none;
        margin: 0;
    }

    /* Hide regular navigation links on mobile */
    .nav-links {
        display: none;
    }

    /* Hamburger menu button */
    .hamburger-menu {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 30px;
        height: 30px;
        cursor: pointer;
        background: none;
        border: none;
        padding: 5px;
        border-radius: 4px;
        transition: background-color 0.2s;
    }

    .hamburger-menu:hover {
        background-color: rgba(0, 0, 0, 0.1);
    }

    .hamburger-line {
        width: 20px;
        height: 2px;
        background-color: #000;
        margin: 2px 0;
        transition: 0.3s;
        border-radius: 1px;
    }

    /* Hamburger animation when active */
    .hamburger-menu.active .hamburger-line:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

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

    .hamburger-menu.active .hamburger-line:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    /* Mobile dropdown overlay */
    .mobile-nav-overlay {
        display: none;
        position: fixed;
        top: 60px;
        left: 8px;
        right: 8px;
        background: rgba(255, 255, 255, 0.6);
        backdrop-filter: blur(10px);
        border-radius: 12px;
        padding: 20px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        z-index: 999;
        animation: slideDown 0.3s ease-out;
    }

    .mobile-nav-overlay.active {
        display: block;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .mobile-nav-links {
        display: flex;
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }

    .mobile-nav-links a {
        text-decoration: none;
        color: #000;
        font-weight: 500;
        font-size: 1.1rem;
        padding: 8px 16px;
        border-radius: 6px;
        transition: all 0.2s;
        width: 100%;
        text-align: center;
    }

    .mobile-nav-links a:hover {
        background-color: rgba(27, 109, 191, 0.1);
        color: #1b6dbf;
    }

    /* Keep resume button visible */
    .nav-resume {
        margin-left: 0;
        flex: 0 0 auto;
    }

    .nav-resume a {
        padding: 8px 22px;
        font-size: 1rem;
        border-radius: 22px;
    }

    main {
        margin: 80px 8px 20px 8px;
        padding: 16px;
        max-width: none;
        border-radius: 12px;
    }

    #hero-name {
        font-size: 2.5rem !important;
    }

    #hero-tagline {
        font-size: 1.1rem;
    }

    .hero-email-container {
        gap: 8px;
        flex-wrap: wrap;
    }

    .copy-email-btn {
        padding: 6px 8px;
        font-size: 12px;
    }

    .copy-email-btn i {
        font-size: 12px;
    }

    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 20px;
    }

    .about-photo {
        justify-self: center;
    }

    .about-photo img {
        width: 150px;
        height: 150px;
    }

    .contact-form-container {
        padding: 24px 20px;
        border-radius: 8px;
    }

    .form-header h3 {
        font-size: 1.5rem;
    }

    .form-header p {
        font-size: 0.9rem;
    }

    .contact-form {
        gap: 20px;
    }

    .form-control {
        padding: 12px 14px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .btn-submit {
        padding: 10px 28px;
        font-size: 0.9rem;
        border-radius: 6px;
    }

    .btn-submit.btn-sending {
        animation: pulse 1.5s infinite;
    }

    .timeline {
        padding-left: 24px;
    }

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

    .timeline-item {
        padding: 16px;
        margin-bottom: 20px;
    }

    .timeline-item::before {
        left: -18px;
        top: 20px;
        width: 10px;
        height: 10px;
    }

    .card {
        padding: 16px;
        padding-right: 50px;
        margin-bottom: 16px;
    }

    .tech-category {
        padding: 16px;
    }

    .section h2 {
        font-size: 1.5rem;
    }

    /* Research header mobile styles */
    .research-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .scholar-link {
        align-self: stretch;
        justify-content: center;
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 4px;
    }

    .pagination button {
        padding: 6px 8px;
        font-size: 0.8rem;
    }

    /* About social mobile styles */
    .social-links {
        gap: 12px;
    }

    .social-link {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    /* Contact email mobile styles */
    .contact-email-container {
        gap: 8px;
        flex-wrap: wrap;
    }

    /* Contact social mobile styles */
    .contact-social {
        gap: 12px;
    }

    .contact-social-link {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    /* Footer mobile styles */
    #footer {
        margin-top: 20px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
        padding: 0 16px;
    }

    .footer-socials {
        gap: 20px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    /* Small mobile adjustments */
    .nav-links {
        gap: 4px;
    }

    .nav-links a {
        font-size: 0.65rem;
        padding: 3px 4px;
    }

    .nav-resume a {
        font-size: 1rem;
        padding: 8px 18px;
        border-radius: 22px;
    }

    main {
        margin: 70px 4px 20px 4px;
        padding: 12px;
    }

    #hero-name {
        font-size: 2rem !important;
    }

    .card {
        padding: 12px;
        padding-right: 45px;
    }

    .about-photo img {
        width: 120px;
        height: 120px;
    }

    .section h2 {
        font-size: 1.3rem;
    }

    .contact-form-container {
        padding: 20px 16px;
    }

    .form-header h3 {
        font-size: 1.3rem;
    }

    .form-header p {
        font-size: 0.85rem;
    }

    .contact-form {
        gap: 18px;
    }

    .form-group label {
        font-size: 0.9rem;
    }

    .form-control {
        padding: 10px 12px;
    }

    .btn-submit {
        padding: 9px 24px;
        font-size: 0.85rem;
        border-radius: 6px;
    }

    .btn-submit.btn-sending {
        animation: pulse 1.5s infinite;
    }
}

/* Footer */
#footer {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(224, 224, 224, 0.8);
    margin-top: 30px;
    padding: 20px 0;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.footer-content p {
    margin: 0;
    color: #666;
    font-size: 0.85rem;
}

.footer-socials {
    display: flex;
    gap: 16px;
}

.footer-socials a {
    color: #666;
    text-decoration: none;
    transition: all 0.2s;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.footer-socials a:hover {
    color: #1b6dbf;
    background: rgba(27, 109, 191, 0.1);
    transform: translateY(-2px);
}

.footer-socials i {
    font-size: 18px;
}



/* Selection */
::selection {
    background: #1b6dbf;
    color: #fff;
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}
