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

/* Performance optimizations */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0f0f0f 100%);
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
    /* Optimize for mobile */
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Reduce motion for accessibility */
    scroll-behavior: smooth;
}

/* Optimize images */
img {
    max-width: 100%;
    height: auto;
    /* Prevent layout shift */
    aspect-ratio: attr(width) / attr(height);
}

/* Optimize animations for performance */
.card {
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid rgba(255, 0, 0, 0.1);
    border-radius: 15px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    /* Optimize for mobile */
    will-change: transform;
}



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

/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 0, 0, 0.1);
    z-index: 1000;
    padding: 1rem 0;
    height: 80px; /* Fixed height for consistent spacing */
}

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

.profile-section {
    display: flex;
    align-items: center;
}

.profile-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 0, 0, 0.2);
    background: #1a1a1a;
    flex-shrink: 0;
}

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

.profile-icon:hover .profile-img {
    transform: scale(1.1);
}





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

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

.nav-link:hover {
    color: #ff0000;
}

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

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

/* Hero Section */
.hero {
    padding: 140px 0 80px; /* Increased top padding to account for fixed header */
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.05) 0%, rgba(26, 26, 26, 0.8) 100%);
    border-radius: 0 0 30px 30px;
    margin-bottom: 4rem;
    margin-top: 80px; /* Add margin to account for fixed header */
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #ff0000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #cccccc;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ff0000;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #cccccc;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Section Styles */
.section {
    margin-bottom: 4rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ffffff;
}

.section-line {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #ff0000, #cc0000);
    margin: 0 auto;
    border-radius: 2px;
}

/* Card Styles */

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff0000, #cc0000);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 0, 0, 0.3);
    box-shadow: 0 20px 40px rgba(255, 0, 0, 0.1);
}

.card:hover::before {
    opacity: 1;
}

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

.job-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.company-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 0, 0, 0.2);
    background: #1a1a1a;
    flex-shrink: 0;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.company-logo:hover .logo-img {
    transform: scale(1.1);
}

.job-info {
    flex: 1;
}

.card-content {
    color: #cccccc;
}

/* About Section */
.about-card {
    max-width: 1000px;
    margin: 0 auto;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
    margin-bottom: 2rem;
}

.about-text-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #ffffff;
    margin: 0;
}

.about-image-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}

.about-image {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 15px;
    border: 2px solid rgba(255, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.about-image:hover {
    border-color: rgba(255, 0, 0, 0.5);
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(255, 0, 0, 0.2);
}

.profile-image {
    max-width: 200px;
}

.skills h3 {
    color: #ffffff;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

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

.skill-tag {
    background: rgba(255, 0, 0, 0.1);
    color: #ff0000;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(255, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: rgba(255, 0, 0, 0.2);
    transform: translateY(-2px);
}

/* Experience Section */
.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.job-title {
    font-size: 1.4rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.job-period {
    color: #ff0000;
    font-weight: 600;
    font-size: 0.9rem;
}

.job-description {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.achievements h4 {
    color: #ffffff;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.achievements ul {
    list-style: none;
    padding-left: 0;
}

.achievements li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #cccccc;
}

.achievements li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #ff0000;
    font-weight: bold;
}

/* Awards Section */
.awards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.award-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.award-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 0, 0, 0.2);
    background: #1a1a1a;
    flex-shrink: 0;
}

.icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.award-icon:hover .icon-img {
    transform: scale(1.1);
}

.award-info {
    flex: 1;
}

.award-title {
    font-size: 1.3rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.award-date {
    color: #ff0000;
    font-weight: 600;
    font-size: 0.9rem;
}

.award-description {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Writeups Section */
.writeups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.writeup-title {
    font-size: 1.3rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.writeup-date {
    color: #ff0000;
    font-weight: 600;
    font-size: 0.9rem;
}

.writeup-image-container {
    margin-bottom: 1.5rem;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 0, 0, 0.05);
    border: 1px solid rgba(255, 0, 0, 0.1);
}

.writeup-image {
    width: 100%;
    height: 250px; /* Increased from 200px to 250px */
    object-fit: cover;
    transition: all 0.3s ease;
}

.writeup-image-container:hover .writeup-image {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.writeup-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    background: rgba(255, 0, 0, 0.1);
    color: #ff0000;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(255, 0, 0, 0.2);
}

.read-more {
    color: #ff0000;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: #cc0000;
}

/* Posts Section */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ff0000;
    font-size: 0.9rem;
}

.post-content {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.post-stats {
    display: flex;
    gap: 1.5rem;
}

.post-stats .stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #cccccc;
    font-size: 0.9rem;
}

.post-stats .stat i {
    color: #ff0000;
}

.tweet-embed-container {
    margin-bottom: 1rem;
}

.tweet-embed-container .twitter-tweet {
    margin: 0 auto;
    max-width: 100%;
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.contact-card h3 {
    color: #ffffff;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.contact-card p {
    margin-bottom: 2rem;
    line-height: 1.7;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #cccccc;
    text-decoration: none;
    padding: 1rem;
    border-radius: 10px;
    background: rgba(255, 0, 0, 0.05);
    border: 1px solid rgba(255, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.social-link:hover {
    background: rgba(255, 0, 0, 0.1);
    color: #ff0000;
    transform: translateX(5px);
}

.social-link i {
    font-size: 1.2rem;
    color: #ff0000;
}

.programs {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
    position: relative;
    height: 200px;
}

.platform-link {
    text-decoration: none;
    color: inherit;
    position: absolute;
}

.platform-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    overflow: visible;
    border: 2px solid rgba(255, 0, 0, 0.2);
    background: rgba(26, 26, 26, 0.8);
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    position: relative;
    cursor: pointer;
}

.jump-arrow {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    color: #ff0000;
    font-size: 1.2rem;
    font-weight: bold;
    animation: jump 1.5s ease-in-out infinite;
    z-index: 10;
}

@keyframes jump {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-8px);
    }
}

.platform-link:nth-child(1) {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.platform-link:nth-child(2) {
    bottom: 0;
    left: 0;
}

.platform-link:nth-child(3) {
    bottom: 0;
    right: 0;
}

.platform-link:hover .platform-icon {
    border-color: rgba(255, 0, 0, 0.5);
    box-shadow: 0 8px 20px rgba(255, 0, 0, 0.2);
    transform: translateY(-2px);
}

.platform-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
}

.platform-link:hover .platform-img {
    transform: scale(1.05);
}

.platform-link:hover .jump-arrow {
    animation: jump 0.8s ease-in-out infinite;
}

/* Footer */
.footer {
    text-align: center;
    padding: 3rem 0;
    border-top: 1px solid rgba(255, 0, 0, 0.1);
    margin-top: 4rem;
}

.footer-content p {
    color: #cccccc;
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        height: 70px; /* Slightly smaller header for mobile */
        padding: 0.5rem 0;
    }
    
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 20px;
    }
    
    .nav {
        gap: 1rem;
    }
    
    .mobile-menu-toggle {
        display: block !important;
        margin-left: auto;
    }
    
    .hero {
        padding: 110px 0 60px; /* Adjusted for smaller mobile header */
        margin-top: 70px; /* Account for smaller mobile header */
    }
    
    .hero-title {
        font-size: 2.2rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .hero-stats {
        gap: 1.5rem;
        flex-wrap: wrap;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .section {
        margin-bottom: 3rem;
    }
    
    .experience-grid,
    .awards-grid,
    .writeups-grid,
    .posts-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .about-image {
        max-width: 280px; /* Increased from 200px to 280px */
    }
    
    .card {
        padding: 1.2rem;
        margin-bottom: 1rem;
    }
    
    .job-header-content,
    .award-header-content {
        gap: 0.8rem;
    }
    
    .company-logo,
    .award-icon {
        width: 40px;
        height: 40px;
    }
    
    .job-title {
        font-size: 1.2rem;
    }
    
    .skill-tags {
        gap: 0.6rem;
    }
    
    .skill-tag {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .writeup-image {
        height: 200px; /* Increased from 150px to 200px */
    }
    
    .tweet-embed-container {
        margin-bottom: 0.5rem;
    }
    
    .tweet-embed-container .twitter-tweet {
        font-size: 0.9rem;
    }
    
    .programs {
        height: 160px;
    }
    
    .profile-icon {
        width: 40px;
        height: 40px;
    }
    
    .platform-icon {
        width: 70px;
        height: 70px;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .header-content {
        padding: 0.5rem 15px;
    }
    
    .hero {
        padding: 90px 0 50px; /* Adjusted for smaller mobile header */
        margin-top: 70px; /* Account for smaller mobile header */
        margin-bottom: 2rem;
    }
    
    .hero-title {
        font-size: 1.8rem;
        line-height: 1.1;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        padding: 0 0.5rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stat-number {
        font-size: 1.6rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .card {
        padding: 1rem;
        margin-bottom: 0.8rem;
    }
    
    .about-image {
        max-width: 240px; /* Increased from 180px to 240px */
    }
    
    .writeup-image {
        height: 160px; /* Increased from 120px to 160px */
    }
    
    .skill-tags {
        gap: 0.4rem;
    }
    
    .skill-tag {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
    
    .company-logo,
    .award-icon {
        width: 35px;
        height: 35px;
    }
    
    .job-title {
        font-size: 1.1rem;
    }
    
    .tweet-embed-container .twitter-tweet {
        font-size: 0.85rem;
    }
    
    .programs {
        height: 140px;
    }
    
    .profile-icon {
        width: 35px;
        height: 35px;
    }
    
    .platform-icon {
        width: 60px;
        height: 60px;
        padding: 8px;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

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

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #ff0000;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #cc0000;
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
} 