@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'JetBrains Mono', monospace;
    background: linear-gradient(135deg, #000000 0%, #1a1a2e 50%, #16213e 100%);
    color: #ffffff;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Loading screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.dna-loader {
    width: 60px;
    height: 60px;
    position: relative;
    margin-bottom: 20px;
}

.dna-strand {
    position: absolute;
    width: 4px;
    height: 100%;
    background: #00f5ff;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.loading-text {
    color: #00f5ff;
    font-size: 1.2rem;
    font-weight: 500;
    opacity: 0;
}

/* Animated background particles */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    opacity: 0;
}

.particle:nth-child(odd) {
    width: 3px;
    height: 3px;
    background: rgba(0, 245, 255, 0.8);
}

.particle:nth-child(even) {
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.7);
}

.particle:nth-child(3n) {
    width: 4px;
    height: 4px;
    background: rgba(0, 245, 255, 0.6);
    box-shadow: 0 0 6px rgba(0, 245, 255, 0.8);
}

.particle:nth-child(4n) {
    width: 1px;
    height: 1px;
    background: rgba(255, 255, 255, 0.9);
}

.particle:nth-child(5n) {
    width: 5px;
    height: 5px;
    background: radial-gradient(circle, rgba(0, 245, 255, 0.9) 0%, rgba(0, 245, 255, 0.3) 100%);
    box-shadow: 0 0 10px rgba(0, 245, 255, 0.6);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    background: rgba(0, 0, 0, 0.9);

    z-index: 1000;
    transition: all 0.2s ease;
    transform: translateY(-100%);
}

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

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #00f5ff;
    text-decoration: none;
    transition: color 0.3s ease;
    opacity: 0;
}

.logo:hover {
    color: #ffffff;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links li {
    opacity: 0;
}

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

.nav-links a:hover {
    color: #00f5ff;
}

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

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

/* Main Content */
.main-content {
    margin-top: 80px;
    padding: 0 20px;
    opacity: 0;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 50px 0 30px 0;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #00fcf0, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    transform: translateY(20px);
    text-shadow: 0 0 20px rgba(0, 245, 255, 0.5);
}

.hero-subtitle {
    font-size: 1rem;
    font-weight: 300;
    color: #999;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(15px);
    line-height: 1.6;
}

.bio-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
}

.stat-card:hover {
    transform: translateY(-10px) scale(1);
    box-shadow: 0 20px 40px rgba(0, 245, 255, 0.2);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: #00f5ff;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1.1rem;
    color: #cccccc;
}

/* Resume button animation prep */
#resumeToggleBtn {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
}

/* Experience Section */
.experience {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0 60px 0;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: #00fcf0;
    opacity: 0;
    transform: translateY(20px);
}

.experience-card {
    background: rgba(255, 255, 255, 0.05);
    
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    opacity: 0;
    transform: translateX(-20px);
}

.experience-card:hover {
    transform: translateX(5px);
    box-shadow: 0 15px 30px rgba(0, 245, 255, 0.1);
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.experience-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #00fcf0;
}

.experience-company {
    font-size: 1.3rem;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 5px;
}

.experience-date {
    font-size: 1rem;
    color: #cccccc;
    font-weight: 300;
}

.experience-description {
    color: #dddddd;
    line-height: 1.6;
}

.experience-highlights {
    list-style: none;
    margin-top: 20px;
}

.experience-highlights li {
    padding: 8px 0;
    position: relative;
    padding-left: 20px;
    opacity: 0;
    transform: translateX(-15px);
}

.experience-highlights li::before {
    content: '–';
    position: absolute;
    left: 0;
    color: #00f5ff;
}

/* Projects Section */
.projects {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-top: 40px;
}

.project-card {
    background: rgba(255, 255, 255, 0.05);
    
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    opacity: 0;
    transform: translateY(30px) scale(0.97);
    position: relative;
}

.project-card::after {
    content: 'Click to expand →';
    position: absolute;
    bottom: 16px;
    right: 20px;
    font-size: 0.85rem;
    color: rgba(0, 245, 255, 0.4);
    font-weight: 500;
    transition: all 0.2s ease;
    pointer-events: none;
}

.project-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
    border-color: rgba(0, 245, 255, 0.3);
}

.project-card:hover::after {
    color: rgba(0, 245, 255, 0.9);
}

.project-card:hover .project-title {
    color: #ffffff;
}

.project-card:active {
    transform: translateY(-4px) scale(1.0);
}

.project-image {
    width: 100%;
    height: 350px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #00f5ff;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.project-content {
    padding: 30px;
}

.project-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #00f5ff;
    margin-bottom: 15px;
}

.project-description {
    color: #dddddd;
    line-height: 1.6;
    margin-bottom: 20px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-tag {
    background: transparent;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
    opacity: 0;
    transform: scale(0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ccc;
    transition: all 0.2s ease;
}

/* Category colors for tech tags */
.tech-tag[data-cat="lang"]     { color: #f47067; border-color: #f47067; }
.tech-tag[data-cat="ai"]      { color: #f47067; border-color: #f47067; }
.tech-tag[data-cat="hw"]      { color: #6cb6ff; border-color: #6cb6ff; }
.tech-tag[data-cat="eng"]     { color: #f0c040; border-color: #f0c040; }
.tech-tag[data-cat="bio"]     { color: #57d364; border-color: #57d364; }
.tech-tag[data-cat="data"]    { color: #d2a8ff; border-color: #d2a8ff; }
.tech-tag[data-cat="infra"]   { color: #f69d50; border-color: #f69d50; }

/* Skills Section */
.skills {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 0;
}

.skills-categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.skill-category {
    background: rgba(255, 255, 255, 0.05);

    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    opacity: 0;
    transform: translateY(15px);
}

.skill-category h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    text-align: center;
}
.skill-category:nth-child(1) h3 { color: #57d364; }
.skill-category:nth-child(2) h3 { color: #f47067; }
.skill-category:nth-child(3) h3 { color: #f0c040; }
.skill-category:nth-child(4) h3 { color: #6cb6ff; }

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-item {
    background: transparent;
    color: #ffffff;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.2s ease;
    opacity: 0;
    transform: scale(0.92);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.skill-item:hover {
    transform: scale(1.05);
}

/* Category coloring for skill sections */
/* 1: Lab Techniques = green */
.skill-category:nth-child(1) .skill-item { color: #57d364; border-color: #57d364; }
.skill-category:nth-child(1) .skill-item:hover { background: rgba(87, 211, 100, 0.1); }

/* 2: Programming & AI = red */
.skill-category:nth-child(2) .skill-item { color: #f47067; border-color: #f47067; }
.skill-category:nth-child(2) .skill-item:hover { background: rgba(244, 112, 103, 0.1); }

/* 3: Engineering & CAD = yellow */
.skill-category:nth-child(3) .skill-item { color: #f0c040; border-color: #f0c040; }
.skill-category:nth-child(3) .skill-item:hover { background: rgba(240, 192, 64, 0.1); }

/* 4: Hardware & Embedded = blue */
.skill-category:nth-child(4) .skill-item { color: #6cb6ff; border-color: #6cb6ff; }
.skill-category:nth-child(4) .skill-item:hover { background: rgba(108, 182, 255, 0.1); }

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(22, 33, 62, 0.95));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 245, 255, 0.3);
    border-radius: 20px;
    margin: 5% auto;
    padding: 0;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    opacity: 0;
    transform: scale(0.95) translateY(15px);
}

.modal-header {
    padding: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.modal-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 20px;
}

.modal-video {
    width: 100%;
    height: 400px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #00f5ff;
    margin-bottom: 10px;
}

.modal-subtitle {
    font-size: 1.2rem;
    color: #cccccc;
    margin-bottom: 20px;
}

.modal-body {
    padding: 0 30px 30px 30px;
}

.modal-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #dddddd;
    margin-bottom: 30px;
}

.modal-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.modal-detail-section h4 {
    color: #00f5ff;
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.modal-detail-section ul {
    list-style: none;
    padding: 0;
}

.modal-detail-section li {
    padding: 8px 0;
    color: #dddddd;
    position: relative;
    padding-left: 20px;
}

.modal-detail-section li::before {
    content: '–';
    position: absolute;
    left: 0;
    color: #00f5ff;
    font-size: 0.8rem;
}

.modal-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.modal-tech-tag {
    background: transparent;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ccc;
}

.modal-tech-tag[data-cat="lang"]   { color: #f47067; border-color: #f47067; }
.modal-tech-tag[data-cat="ai"]    { color: #f47067; border-color: #f47067; }
.modal-tech-tag[data-cat="hw"]    { color: #6cb6ff; border-color: #6cb6ff; }
.modal-tech-tag[data-cat="eng"]   { color: #f0c040; border-color: #f0c040; }
.modal-tech-tag[data-cat="bio"]   { color: #57d364; border-color: #57d364; }
.modal-tech-tag[data-cat="data"]  { color: #d2a8ff; border-color: #d2a8ff; }
.modal-tech-tag[data-cat="infra"] { color: #f69d50; border-color: #f69d50; }

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #cccccc;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #00f5ff;
}

/* Contact Section */
.contact {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 0;
    text-align: center;
}

.contact-info {
    display: flex !important;
    flex-direction: column !important;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #cccccc;
    font-size: 1.1rem;
    opacity: 0;
    transform: translateY(15px);
}

.contact-item a {
    color: #00f5ff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: #ffffff;
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #cccccc;
    opacity: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .bio-stats {
        grid-template-columns: 1fr;
    }
    
    .experience-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        flex-direction: column;
        gap: 20px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        max-height: 90vh;
    }
    
    .modal-title {
        font-size: 2rem;
    }
    
    .modal-header, .modal-body {
        padding: 20px;
    }
    
    .modal-image, .modal-video {
        height: 250px;
    }
}

@media (max-width: 600px) {
    .made-btn {
        padding: 20px 40px !important;
        font-size: 1.5rem !important;
        max-width: 90% !important;
        width: auto !important;
    }
    
    .experience-card {
        padding: 16px;
        margin: 16px 10px;
    }
    
    .experience-header {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .experience-header > div {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    
    .experience-header img {
        height: 30px;
        width: auto;
    }
    
    .experience-company {
        font-size: 1.1rem;
    }
    
    .experience-title {
        font-size: 1rem;
    }
    
    .experience-date {
        font-size: 0.9rem;
        margin-top: 4px;
    }
    
    .experience-description {
        margin-top: 8px;
    }
    
    .experience-highlights li {
        font-size: 0.85rem;
        line-height: 1.4;
        padding: 4px 0;
        padding-left: 2.5rem;
    }
    
    .experience-highlights li::before {
        left: 0.5rem;
    }
}

/* ensure the inverted-logo img fits */
.logo {
    display: inline-block;
}

.logo img {
    width: 4.5rem;
    height: auto;
    object-fit: contain;
}
/* CSS-driven particle float animation — runs on compositor thread */
@keyframes particle-float {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    8% {
        opacity: 0.8;
    }
    85% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-120vh) translateX(40px);
        opacity: 0;
    }
}

.particle {
    animation: particle-float linear infinite;
    will-change: transform, opacity;
}
