/* 
   Thuan Kinh Quang Nguyen - Subsite stylesheet
   Aesthetic: "Sensing the Unseen, Connecting the Unconnected" - Modern Technical, Cyan & Cobalt accents, dark-themed widgets
*/

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

:root {
    --bg-main: #060813;        /* Dark Space Navy */
    --bg-sec: #0b0f26;         /* Deeper Cobalt for offsets */
    --bg-card: #0e1330;        /* Glassmorphic card fill */
    --border-color: rgba(0, 229, 255, 0.12); /* Cyan-infused borders */
    --border-hover: #00e5ff;   /* Neon Electric Cyan */
    --text-primary: #f8fafc;   /* Faint icy slate white */
    --text-secondary: #94a3b8; /* Cool slate grey */
    --text-muted: #64748b;     /* Muted grey */
    --accent-cyan: #00e5ff;    /* Core Radar Cyan */
    --accent-blue: #2563eb;    /* Deep Cobalt Blue */
    --accent-glow: rgba(0, 229, 255, 0.2);
    --nav-height: 80px;
    --font-outfit: 'Outfit', sans-serif;
    --font-inter: 'Inter', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-inter);
    line-height: 1.7;
    overflow-x: hidden;
    /* Electric micro-grid background */
    background-image: linear-gradient(rgba(0, 229, 255, 0.03) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(0, 229, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(6, 8, 19, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 40px;
}

.logo {
    margin-right: auto;
    font-family: var(--font-outfit);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo span {
    color: var(--accent-cyan);
}

nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-outfit);
    transition: all 0.25s ease;
    position: relative;
    padding: 8px 0;
}

nav a:hover, nav a.active {
    color: var(--accent-cyan);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-cyan);
    transition: width 0.25s ease;
}

nav a:hover::after, nav a.active::after {
    width: 100%;
}

.back-lab-btn {
    background: rgba(0, 229, 255, 0.08);
    color: var(--accent-cyan) !important;
    padding: 8px 18px !important;
    border-radius: 6px;
    font-size: 14px !important;
    transition: all 0.25s ease !important;
    border: 1px solid var(--border-color);
}

.back-lab-btn:hover {
    background: var(--accent-cyan);
    color: var(--bg-main) !important;
    box-shadow: 0 0 15px var(--accent-glow);
}

.back-lab-btn::after {
    display: none !important;
}

/* Page Layout */
main {
    max-width: 1200px;
    margin: 120px auto 60px;
    padding: 0 40px;
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    gap: 60px;
    padding: 80px 0;
    margin-bottom: 60px;
    border-bottom: 1px solid var(--border-color);
}

.hero-content {
    flex: 1.2;
}

.hero-tag {
    font-family: var(--font-outfit);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--accent-cyan);
    margin-bottom: 16px;
}

.hero-title {
    font-family: var(--font-outfit);
    font-size: 56px;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.hero-title span {
    background: linear-gradient(135deg, var(--text-primary), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-bio {
    font-size: 17px;
    color: var(--text-secondary);
    margin-bottom: 36px;
}

.hero-btn-group {
    display: flex;
    gap: 16px;
}

.btn-primary {
    background: var(--accent-cyan);
    color: var(--bg-main);
    padding: 14px 28px;
    border-radius: 8px;
    font-family: var(--font-outfit);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
    border: 1px solid var(--accent-cyan);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.btn-primary:hover {
    background: transparent;
    color: var(--accent-cyan);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 229, 255, 0.15);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    padding: 14px 28px;
    border-radius: 8px;
    font-family: var(--font-outfit);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
    border: 1px solid var(--border-color);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
}

.hero-img-box {
    flex: 0.8;
    position: relative;
}

.hero-img-card {
    background: var(--bg-sec);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 229, 255, 0.02);
    transform: rotate(-2deg);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-img-card:hover {
    transform: rotate(0deg) scale(1.02);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.1);
}

.hero-img {
    width: 100%;
    border-radius: 8px;
    object-fit: cover;
    aspect-ratio: 4/5;
}

/* Section Styling */
.section-header {
    margin-bottom: 50px;
}

.section-tag {
    font-family: var(--font-outfit);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-cyan);
    margin-bottom: 8px;
}

.section-title {
    font-family: var(--font-outfit);
    font-size: 38px;
    font-weight: 900;
    letter-spacing: -0.5px;
}

/* Grids & Cards */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 80px;
}

.card-thin {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-thin:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(0, 229, 255, 0.05);
}

.card-icon {
    font-size: 32px;
    color: var(--accent-cyan);
    margin-bottom: 20px;
}

.card-title {
    font-family: var(--font-outfit);
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 12px;
}

.card-desc {
    color: var(--text-secondary);
    font-size: 15px;
}

/* Timeline/Academic Journey */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto 80px;
    padding: 40px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 31px;
    width: 2px;
    height: 100%;
    background: var(--border-color);
}

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

.timeline-item::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 22px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-main);
    border: 4px solid var(--accent-cyan);
    z-index: 2;
    transition: all 0.3s ease;
}

.timeline-item:hover::after {
    background: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-cyan);
}

.timeline-year {
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 700;
    color: var(--accent-cyan);
    margin-bottom: 6px;
}

.timeline-title {
    font-family: var(--font-outfit);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}

.timeline-institution {
    font-size: 14px;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 10px;
}

.timeline-desc {
    color: var(--text-secondary);
    font-size: 15px;
}

/* Skill Badges */
.skill-category {
    margin-bottom: 24px;
}

.skill-cat-title {
    font-family: var(--font-outfit);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 12px;
}

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

.skill-badge {
    background: rgba(0, 229, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.25s ease;
}

.skill-badge:hover {
    background: var(--accent-cyan);
    color: var(--bg-main);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}

/* Slideshow Container */
.slideshow-section {
    margin-bottom: 80px;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 580px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--bg-sec);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 1s ease-in-out, transform 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

.slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.9);
}

.slide-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px 60px;
    background: linear-gradient(transparent, rgba(6, 8, 19, 0.95));
    color: #ffffff;
    z-index: 3;
}

.slide-title {
    font-family: var(--font-outfit);
    font-size: 24px;
    font-weight: 800;
    color: var(--accent-cyan);
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.slide-desc {
    font-size: 15px;
    color: #cbd5e1;
    max-width: 800px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(6, 8, 19, 0.6);
    border: 1px solid var(--border-color);
    color: var(--accent-cyan);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.25s ease;
}

.slider-btn:hover {
    background: var(--accent-cyan);
    color: var(--bg-main);
    box-shadow: 0 0 15px var(--accent-glow);
}

.slider-btn.prev { left: 24px; }
.slider-btn.next { right: 24px; }

.slider-counter {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(6, 8, 19, 0.85);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-cyan);
    z-index: 10;
}

/* Radar & Pulse Sensing Canvas Section */
.radar-section {
    padding: 60px 40px;
    background: var(--bg-sec);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    margin-bottom: 80px;
    position: relative;
    overflow: hidden;
}

.radar-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: center;
}

.canvas-wrapper {
    width: 100%;
    height: 400px;
    background: #02040a;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 30px rgba(0, 229, 255, 0.05);
}

#radar-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.radar-telemetry {
    background: #02040a;
    border: 1px solid var(--border-color);
    padding: 24px;
    border-radius: 12px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--accent-cyan);
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: inset 0 0 15px rgba(0, 229, 255, 0.03);
}

.telemetry-line {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed rgba(0, 229, 255, 0.08);
    padding-bottom: 6px;
}

.telemetry-val {
    color: var(--text-primary);
}

/* Contact Grid */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    margin-bottom: 60px;
}

.contact-card-box {
    display: flex;
    gap: 20px;
    background: var(--bg-sec);
    border: 1px solid var(--border-color);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 20px;
    transition: all 0.25s ease;
}

.contact-card-box:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 8px 16px rgba(0, 229, 255, 0.03);
}

.contact-card-icon {
    font-size: 24px;
    color: var(--accent-cyan);
    width: 48px;
    height: 48px;
    background: rgba(0, 229, 255, 0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
}

.contact-card-title {
    font-family: var(--font-outfit);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.contact-card-val a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.contact-card-val a:hover {
    color: var(--accent-cyan);
}

/* Form Styles */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-family: var(--font-outfit);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-cyan);
}

.form-input {
    background: var(--bg-sec);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: 8px;
    font-family: var(--font-inter);
    font-size: 14px;
    transition: all 0.25s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.1);
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
}

/* Mobile responsive */
@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }
    .hero-btn-group {
        justify-content: center;
    }
    .hero-img-box {
        order: -1;
        width: 100%;
        max-width: 320px;
    }
    .grid-2, .contact-grid {
        grid-template-columns: 1fr;
    }
    .radar-container {
        grid-template-columns: 1fr;
    }
    .slider-container {
        height: 400px;
    }
    .slide-overlay {
        padding: 24px 30px;
    }
    .timeline::before {
        left: 21px;
    }
    .timeline-item {
        padding-left: 50px;
    }
    .timeline-item::after {
        left: 12px;
    }
}
