/* Animation styles */
.cursor {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    background: var(--text-primary);
    margin-left: 2px;
    animation: blink 0.7s infinite;
    vertical-align: text-bottom;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.thinking-container {
    display: none;
    margin: 20px 0;
}

.thinking-container.active {
    display: flex;
    gap: 12px;
    align-items: center;
}

.thinking-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.thinking-dots {
    display: flex;
    gap: 4px;
}

.thinking-dots span {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: dotPulse 1.4s ease-in-out infinite;
}

.thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

.thinking-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.thinking-keyword {
    color: var(--accent-hover);
    font-weight: 500;
    min-width: 140px;
    display: inline-block;
    transition: opacity 0.15s;
}

.ai-response {
    display: none;
}

.ai-response.active {
    display: flex;
}

#introText span {
    opacity: 0;
}

#introText span.visible {
    opacity: 1;
    transition: opacity 0.05s;
}

.skip-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    z-index: 100;
    transition: all 0.2s;
}

.skip-btn:hover {
    background: var(--bg-chat);
    color: var(--text-primary);
}

.hidden {
    display: none !important;
}

img.avatar {
    object-fit: cover;
}

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-chat: #1a1a24;
    --text-primary: #e8e8ed;
    --text-secondary: #a0a0b0;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --proof-link: #38bdf8;
    --border: #2a2a3a;
}

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

body {
    font-family: 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

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

header {
    text-align: center;
    padding: 40px 0 30px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 30px;
}

h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.tagline {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.chat-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.message {
    display: flex;
    gap: 12px;
    animation: fadeIn 0.4s ease-out;
}

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

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.user-avatar {
    background: #374151;
}

.message-content {
    background: var(--bg-chat);
    padding: 16px 20px;
    border-radius: 16px;
    max-width: 85%;
    border: 1px solid var(--border);
}

.user-message .message-content {
    background: var(--accent);
    border: none;
    margin-left: auto;
}

.user-message {
    flex-direction: row-reverse;
}

h2 {
    font-size: 1.1rem;
    color: var(--accent-hover);
    margin: 20px 0 12px;
    font-weight: 600;
}

h2:first-child {
    margin-top: 0;
}

p {
    margin-bottom: 12px;
    color: var(--text-primary);
}

.proof-link {
    color: var(--proof-link);
    text-decoration: none;
    border-bottom: 1px dashed var(--proof-link);
    cursor: pointer;
    position: relative;
}

.proof-link:hover {
    color: #7dd3fc;
}

.external-link {
    color: var(--proof-link);
    text-decoration: none;
    border-bottom: 1px dashed var(--proof-link);
}

.external-link:hover {
    color: #7dd3fc;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 0.9rem;
}

th, td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-hover);
    font-weight: 600;
}

tr:hover {
    background: rgba(255,255,255,0.02);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.skill-tag {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-hover);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.skill-tag.security { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }
.skill-tag.ai-ml { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.skill-tag.backend { background: rgba(34, 197, 94, 0.2); color: #86efac; }
.skill-tag.frontend { background: rgba(6, 182, 212, 0.2); color: #67e8f9; }
.skill-tag.mobile { background: rgba(168, 85, 247, 0.2); color: #d8b4fe; }
.skill-tag.hardware { background: rgba(234, 179, 8, 0.2); color: #fde047; }
.skill-tag.gamedev { background: rgba(236, 72, 153, 0.2); color: #f9a8d4; }
.skill-tag.database { background: rgba(249, 115, 22, 0.2); color: #fdba74; }
.skill-tag.infra { background: rgba(107, 114, 128, 0.2); color: #d1d5db; }
.skill-tag.design { background: rgba(192, 132, 252, 0.2); color: #e9d5ff; }

.skill-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 0.8rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-dot.security { background: #fca5a5; }
.legend-dot.ai-ml { background: #93c5fd; }
.legend-dot.backend { background: #86efac; }
.legend-dot.frontend { background: #67e8f9; }
.legend-dot.mobile { background: #d8b4fe; }
.legend-dot.hardware { background: #fde047; }
.legend-dot.gamedev { background: #f9a8d4; }
.legend-dot.database { background: #fdba74; }
.legend-dot.infra { background: #d1d5db; }
.legend-dot.design { background: #e9d5ff; }

.timeline {
    position: relative;
    margin: 20px 0;
    padding-left: 24px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -28px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
}

.timeline-year {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
}

.timeline-title {
    color: var(--text-primary);
    font-weight: 500;
}

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

.strengths-list {
    list-style: none;
    margin: 12px 0;
}

.strengths-list li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
}

.strengths-list li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

.contact-box {
    background: rgba(99, 102, 241, 0.1);
    padding: 16px 20px;
    border-radius: 12px;
    margin-top: 16px;
}

.contact-box a {
    color: var(--proof-link);
    text-decoration: none;
}

footer {
    text-align: center;
    padding: 40px 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.section-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 24px 0;
}

ul {
    margin: 12px 0;
    padding-left: 24px;
}

li {
    margin-bottom: 6px;
}

/* Proof Preview Styles */
.proof-preview {
    position: fixed;
    display: none;
    z-index: 1000;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    max-width: min(400px, 85vw);
}

.proof-preview.active {
    display: block;
}

.preview-media {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.preview-media img,
.preview-media video {
    max-width: 100%;
    max-height: 40vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    display: block;
}

.preview-media img.vertical,
.preview-media video.vertical {
    max-height: 35vh;
    max-width: 250px;
}

.preview-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(99, 102, 241, 0.6);
    border: none;
    color: white;
    font-size: 24px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.preview-nav:hover {
    background: rgba(99, 102, 241, 1);
}

.preview-nav.prev {
    left: 15px;
}

.preview-nav.next {
    right: 15px;
}

.preview-caption {
    font-size: 12px;
    color: var(--text-secondary);
    padding: 10px 4px 4px;
    text-align: center;
    line-height: 1.4;
}

.preview-counter {
    font-size: 11px;
    color: var(--accent);
    text-align: center;
    padding-bottom: 4px;
}

.pin-hint {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    animation: pulseHint 1.5s ease-in-out infinite;
    z-index: 20;
    pointer-events: none;
}

.pin-hint::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--accent);
}

@keyframes pulseHint {
    0%, 100% {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
    50% {
        opacity: 0.7;
        transform: translateX(-50%) scale(1.05);
    }
}

.proof-preview.pinned .pin-hint {
    display: none;
}

.proof-preview.pinned {
    border-color: var(--accent);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .proof-preview {
        max-width: 80vw;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%);
    }

    .preview-media img,
    .preview-media video {
        max-height: 45vh;
    }

    .preview-nav {
        width: 32px;
        height: 32px;
        font-size: 20px;
    }

    .message-content {
        max-width: 95%;
        padding: 12px 14px;
    }

    table {
        font-size: 0.8rem;
    }

    th, td {
        padding: 6px 8px;
    }

    .skill-tags {
        gap: 6px;
    }

    .skill-tag {
        padding: 3px 8px;
        font-size: 0.75rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .tagline {
        font-size: 0.85rem;
    }

    .contact-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}
