/* ==========================================================================
   Design System & Styling Rules - Autonomous Navigation & AI Profile Page
   ========================================================================== */

:root {
    /* Color Palette */
    --bg-dark: #070913;
    --bg-card: rgba(15, 23, 42, 0.7);
    --bg-card-sub: rgba(30, 41, 59, 0.5);
    --bg-modal: rgba(10, 15, 30, 0.85);
    
    --border-color: rgba(56, 189, 248, 0.2);
    --border-highlight: rgba(56, 189, 248, 0.5);
    
    --primary-cyan: #38bdf8;
    --primary-glow: rgba(56, 189, 248, 0.3);
    --accent-purple: #818cf8;
    --accent-emerald: #34d399;
    --accent-amber: #fbbf24;
    
    --text-main: #f8fafc;
    --text-sub: #94a3b8;
    --text-muted: #64748b;
    
    /* Typography */
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-code: 'Fira Code', monospace;
    
    /* Shadows & Glassmorphism */
    --glass-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    --glow-cyan: 0 0 25px rgba(56, 189, 248, 0.35);
    
    /* Transitions */
    --tr-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --tr-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Variables */
[data-theme="light"] {
    --bg-dark: #f0f4f9;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-card-sub: rgba(241, 245, 249, 0.8);
    --bg-modal: rgba(255, 255, 255, 0.95);
    
    --border-color: rgba(14, 165, 233, 0.25);
    --border-highlight: rgba(14, 165, 233, 0.6);
    
    --primary-cyan: #0284c7;
    --primary-glow: rgba(2, 132, 199, 0.2);
    --accent-purple: #6366f1;
    --accent-emerald: #059669;
    
    --text-main: #0f172a;
    --text-sub: #475569;
    --text-muted: #64748b;
    
    --glass-shadow: 0 15px 40px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Interactive Canvas Background */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

.glow-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--primary-glow) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: 0;
    pointer-events: none;
    opacity: 0.7;
}

/* App Layout */
.app-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 860px;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Top Navigation Bar */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    box-shadow: var(--glass-shadow);
}

.brand-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    background-color: var(--accent-emerald);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-emerald);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.25); opacity: 0.7; }
}

.brand-text {
    font-family: var(--font-code);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--primary-cyan);
}

.nav-controls {
    display: flex;
    gap: 0.5rem;
}

.icon-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--tr-fast);
}

.icon-btn:hover {
    background: var(--primary-glow);
    border-color: var(--primary-cyan);
    color: var(--primary-cyan);
    transform: translateY(-2px);
}

/* Profile Card Styling */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}

.glass-subpanel {
    background: var(--bg-card-sub);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    transition: var(--tr-normal);
}

.glass-subpanel:hover {
    border-color: var(--border-highlight);
    box-shadow: var(--glow-cyan);
    transform: translateY(-3px);
}

/* Card Header Badge */
.card-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.9rem;
    background: var(--primary-glow);
    border: 1px solid var(--border-highlight);
    border-radius: 999px;
    color: var(--primary-cyan);
    font-family: var(--font-code);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
/* ==========================================================================
   Presentation Card & Button Additions
   ========================================================================== */

/* 발표자료 패널 강조 (필요 시 테두리나 배경 그라데이션 포인트) */
.presentation-panel {
    position: relative;
    overflow: hidden;
}

.presentation-panel .info-card-header i {
    color: var(--accent-emerald); /* PDF/발표 느낌을 살리는 에메랄드/시안 포인트 */
}

/* 발표자료 메인 버튼 스타일링 */
.presentation-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.85rem 1.25rem;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(52, 211, 153, 0.15));
    border: 1px solid var(--border-highlight);
    border-radius: 12px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: var(--tr-fast);
}

.presentation-btn i {
    color: var(--primary-cyan);
    font-size: 0.9rem;
    transition: var(--tr-fast);
}

/* 하버 효과: 사이버틱한 글로우 및 화살표 밀기 인터랙션 */
.presentation-btn:hover {
    background: linear-gradient(135deg, var(--primary-cyan), var(--accent-emerald));
    color: #070913;
    border-color: transparent;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
    transform: translateY(-2px);
}

.presentation-btn:hover i {
    color: #070913;
    transform: translateX(4px);
}

/* 라이트 모드 대응 */
[data-theme="light"] .presentation-btn {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.1), rgba(5, 150, 105, 0.1));
    color: var(--text-main);
}

[data-theme="light"] .presentation-btn:hover {
    color: #ffffff;
}

[data-theme="light"] .presentation-btn:hover i {
    color: #ffffff;
}

/* Profile Hero Layout */
.profile-hero {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.avatar-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.avatar-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--primary-cyan);
    position: relative;
    z-index: 2;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.avatar-glow {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-cyan), var(--accent-purple));
    opacity: 0.5;
    filter: blur(10px);
    z-index: 1;
}

.radar-sweep {
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    border-radius: 50%;
    border: 1px dashed var(--primary-cyan);
    opacity: 0.4;
    animation: spin 12s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.profile-identity {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.name-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.profile-name {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 30%, var(--primary-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .profile-name {
    background: linear-gradient(135deg, #0f172a 30%, var(--primary-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.verified-icon {
    color: var(--primary-cyan);
    font-size: 1.2rem;
}

.affiliation-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-purple);
    font-weight: 600;
    font-size: 0.95rem;
}

.profile-intro {
    color: var(--text-sub);
    font-size: 1rem;
    line-height: 1.6;
    margin-top: 0.2rem;
}

.divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    margin: 2rem 0;
}

/* Sections */
.section-block {
    margin-bottom: 2rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.section-title i {
    color: var(--primary-cyan);
}

/* Interests Pill Tags */
.interests-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card-sub);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-main);
    transition: var(--tr-fast);
    cursor: default;
}

.tag:hover {
    border-color: var(--primary-cyan);
    background: var(--primary-glow);
    color: var(--primary-cyan);
    transform: translateY(-2px) scale(1.03);
}

.tag-primary {
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(56, 189, 248, 0.1);
    color: var(--primary-cyan);
}

.tag-secondary {
    border-color: rgba(129, 140, 248, 0.4);
    background: rgba(129, 140, 248, 0.1);
    color: var(--accent-purple);
}

.tag-accent {
    border-color: rgba(52, 211, 153, 0.4);
    background: rgba(52, 211, 153, 0.1);
    color: var(--accent-emerald);
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
}

.info-card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.info-card-header i {
    color: var(--primary-cyan);
    font-size: 1.1rem;
}

.info-card-header h3 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
}

.info-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.course-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.4;
}

.course-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1rem;
    background: var(--primary-glow);
    border: 1px solid var(--border-highlight);
    border-radius: 12px;
    color: var(--primary-cyan);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--tr-fast);
}

.course-link-btn:hover {
    background: var(--primary-cyan);
    color: #000;
    box-shadow: var(--glow-cyan);
}

.links-stack {
    gap: 0.75rem;
}

.link-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.88rem;
    color: var(--text-main);
    text-decoration: none;
    transition: var(--tr-fast);
}

.link-item.interactive:hover {
    border-color: var(--primary-cyan);
    background: var(--primary-glow);
    color: var(--primary-cyan);
    transform: translateX(4px);
}

.link-text {
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-copy-btn {
    background: var(--primary-glow);
    border: 1px solid var(--border-highlight);
    border-radius: 6px;
    color: var(--primary-cyan);
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--tr-fast);
}

.mini-copy-btn:hover {
    background: var(--primary-cyan);
    color: #000;
}

.arrow-icon {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Footer */
.footer {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 0.5rem 0;
}

/* Modal Window */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    opacity: 1;
    transition: var(--tr-normal);
}

.modal-backdrop.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-card {
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--bg-modal);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--tr-fast);
}

.modal-close-btn:hover {
    color: var(--primary-cyan);
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

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

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-sub);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    transition: var(--tr-fast);
}

[data-theme="light"] .form-group input,
[data-theme="light"] .form-group textarea {
    background: rgba(240, 244, 249, 0.8);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-cyan);
    box-shadow: var(--glow-cyan);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.btn {
    padding: 0.7rem 1.4rem;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--tr-fast);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-sub);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.btn-primary {
    background: var(--primary-cyan);
    border: none;
    color: #000;
}

.btn-primary:hover {
    background: #7dd3fc;
    box-shadow: var(--glow-cyan);
    transform: translateY(-2px);
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    border: 1px solid var(--primary-cyan);
    border-radius: 999px;
    padding: 0.75rem 1.5rem;
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), var(--glow-cyan);
    z-index: 200;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.hidden {
    opacity: 0;
    transform: translate(-50%, 20px);
    pointer-events: none;
}

.toast i {
    color: var(--accent-emerald);
}

/* Responsive Styles */
@media (max-width: 680px) {
    .profile-hero {
        flex-direction: column;
        text-align: center;
    }

    .name-row {
        justify-content: center;
    }

    .affiliation-badge {
        justify-content: center;
    }

    .interests-tags {
        justify-content: center;
    }

    .glass-panel {
        padding: 1.75rem 1.25rem;
    }

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