:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-card: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #6b7280;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --border: #e5e7eb;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    background-image:
        radial-gradient(at 20% 10%, rgba(102, 126, 234, 0.05) 0px, transparent 50%),
        radial-gradient(at 80% 90%, rgba(118, 75, 162, 0.05) 0px, transparent 50%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
}

/* Language Toggle */
.lang-toggle {
    position: fixed;
    top: 24px;
    right: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
}

.lang-toggle:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.lang-option {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 12px;
}

.lang-option.active {
    color: var(--accent);
    background: rgba(59, 130, 246, 0.1);
}

.lang-divider {
    color: var(--border);
    font-size: 0.875rem;
}

.container {
    max-width: 680px;
    width: 100%;
    animation: fadeIn 0.6s ease-out;
}

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

.header {
    text-align: center;
    margin-bottom: 48px;
}

.profile-section {
    animation: slideDown 0.8s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.avatar-placeholder {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.logo {
    width: 140px;
    height: 140px;
    margin: 0 auto 32px;
    display: block;
    object-fit: contain;
    animation: logoFloat 3s ease-in-out infinite, logoGlow 4s ease-in-out infinite;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.08));
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes logoGlow {
    0%, 100% {
        filter: drop-shadow(0 4px 12px rgba(59, 130, 246, 0.1));
    }
    50% {
        filter: drop-shadow(0 4px 20px rgba(102, 126, 234, 0.3));
    }
}

.name {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #1a1a1a 0%, #374151 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title {
    font-size: 1.125rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 8px;
}

.bio {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 48px;
}

.tech-badge {
    padding: 8px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.tech-badge:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.links-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 48px;
}

.link-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.link-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #667eea, #764ba2, #667eea);
    border-radius: 12px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.5s ease;
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.link-card:hover::after {
    opacity: 0.15;
}

.link-card:hover {
    border-color: var(--accent);
    transform: translateX(8px);
    box-shadow: var(--shadow-lg);
}

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

.link-card:hover .link-arrow {
    transform: translateX(4px);
}

.link-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--bg-secondary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    transition: all 0.3s ease;
    z-index: 1;
    border: 1px solid var(--border);
}

.link-card:hover .link-icon {
    background: var(--accent);
    color: white;
}

.link-content {
    flex: 1;
    z-index: 1;
}

.link-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.link-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.link-arrow {
    font-size: 1.5rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    z-index: 1;
}

.resume-card {
    background: var(--gradient);
    border: none;
}

.resume-card .link-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.resume-card .link-content p {
    color: rgba(255, 255, 255, 0.9);
}

.resume-card .link-arrow {
    color: white;
}

.resume-card:hover .link-icon {
    background: white;
    color: var(--accent);
}

.projects-preview {
    margin-bottom: 48px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.project-card {
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.project-details-btn {
    margin-top: 16px;
    padding: 10px 20px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow);
}

.project-details-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.project-details-btn svg {
    transition: transform 0.3s ease;
}

.project-details-btn:hover svg {
    transform: translateX(4px);
}

.project-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 0.95rem;
}

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

.project-tech span {
    padding: 4px 12px;
    background: var(--bg-secondary);
    border-radius: 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.footer {
    text-align: center;
    padding: 32px 0;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.footer-email {
    margin-top: 8px;
}

.footer-email a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-email a:hover {
    color: var(--accent-hover);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 20px;
    max-width: 900px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease-out;
    margin: auto;
}

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

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.modal-close:hover {
    background: var(--accent);
    color: white;
    transform: rotate(90deg);
}

.modal-header {
    text-align: center;
    padding: 40px 40px 32px;
    border-bottom: 1px solid var(--border);
}

.modal-logo {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    display: block;
    animation: logoFloat 3s ease-in-out infinite;
}

.modal-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.modal-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.modal-body {
    padding: 32px 40px 40px;
}

.modal-section {
    margin-bottom: 40px;
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}

/* Download Layout - 2 Column */
.download-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    margin-top: 20px;
    align-items: start;
}

/* QR Display Area (Left) */
.qr-display-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.qr-placeholder-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 280px;
    padding: 24px;
    background: var(--bg-secondary);
    border: 2px dashed var(--border);
    border-radius: 12px;
    text-align: center;
}

.qr-placeholder-box svg {
    color: var(--text-secondary);
    opacity: 0.5;
    margin-bottom: 12px;
}

.qr-placeholder-box p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.qr-code-box {
    width: 100%;
    min-height: 280px;
    padding: 16px;
    background: var(--bg-card);
    border: 2px solid var(--accent);
    border-radius: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.qr-code {
    width: 180px;
    height: 180px;
    margin: 0 auto 12px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-code svg,
.qr-code img,
.qr-code canvas {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 4px;
}

.qr-hint {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Download Buttons (Right) */
.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 280px;
    justify-content: center;
}

.simple-download-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    cursor: pointer;
    width: 100%;
    font-size: 0.95rem;
}

.simple-download-btn:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.simple-download-btn svg {
    flex-shrink: 0;
    color: var(--accent);
}

.simple-download-btn.web-btn {
    background: var(--gradient);
    color: white;
    border: none;
}

.simple-download-btn.web-btn svg {
    color: white;
}

/* Feature List */
.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list svg {
    flex-shrink: 0;
    color: var(--accent);
    margin-top: 2px;
}

.feature-list span {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Usage Steps */
.usage-steps {
    padding-left: 0;
    counter-reset: step-counter;
}

.usage-steps li {
    list-style: none;
    padding: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 16px;
    position: relative;
    padding-left: 70px;
    counter-increment: step-counter;
}

.usage-steps li:last-child {
    margin-bottom: 0;
}

.usage-steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: 20px;
    top: 20px;
    width: 36px;
    height: 36px;
    background: var(--gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.125rem;
}

.usage-steps strong {
    display: block;
    font-size: 1.05rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.usage-steps p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

/* Responsive */
@media (max-width: 640px) {
    .name {
        font-size: 2rem;
    }

    .link-card {
        padding: 16px 20px;
    }

    .link-icon {
        width: 40px;
        height: 40px;
    }

    .avatar-placeholder {
        width: 100px;
        height: 100px;
    }

    .logo {
        width: 100px;
        height: 100px;
    }

    .lang-toggle {
        top: 16px;
        right: 16px;
        padding: 6px 12px;
    }

    .lang-option {
        font-size: 0.8rem;
        padding: 3px 6px;
    }

    /* Modal Responsive */
    .modal.active {
        padding: 20px 10px;
    }

    .modal-header {
        padding: 24px 20px 20px;
    }

    .modal-header h2 {
        font-size: 1.5rem;
    }

    .modal-body {
        padding: 24px 20px;
    }

    .modal-section h3 {
        font-size: 1.25rem;
    }

    .download-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .qr-placeholder-box,
    .qr-code-box {
        min-height: 240px;
    }

    .download-buttons {
        min-height: auto;
    }

    .qr-code {
        width: 150px;
        height: 150px;
    }

    .simple-download-btn {
        padding: 14px 16px;
        font-size: 0.9rem;
    }

    .usage-steps li {
        padding: 16px 16px 16px 60px;
    }

    .usage-steps li::before {
        width: 32px;
        height: 32px;
        font-size: 1rem;
        left: 16px;
        top: 16px;
    }
}

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

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
