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

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --secondary: #8b5cf6;
    --bg-dark: #0f172a;
    --bg-secondary: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --border-color: #334155;
    --success: #10b981;
    --error: #ef4444;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0f172a 100%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    animation: float 6s ease-in-out infinite;
}

body::after {
    content: '';
    position: fixed;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    animation: float 8s ease-in-out infinite reverse;
}

main, header, footer {
    position: relative;
    z-index: 2;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(30px);
    }
}

header {
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
    padding: 1.2rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
}

nav {
    display: flex;
    gap: 0.5rem;
}

nav button {
    background: none;
    border: none;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
}

nav button:hover {
    color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
}

nav button.active {
    color: var(--primary);
    background: rgba(59, 130, 246, 0.15);
    border-bottom: 2px solid var(--primary);
}

main {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.page {
    display: none;
    animation: pageIn 0.5s ease;
}

.page.active {
    display: block;
}

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

.hero {
    text-align: center;
    margin-bottom: 4rem;
    animation: heroFadeIn 0.8s ease 0.2s forwards;
    opacity: 0;
}

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

.profile-picture {
    width: 180px;
    height: 180px;
    margin: 0 auto 2rem;
    border-radius: 50%;
    border: 4px solid var(--primary);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.profile-picture:hover {
    transform: scale(1.08) rotateY(5deg);
}

.profile-name {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
}

.profile-title {
    font-size: 1.35rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 500;
}

.profile-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.about-box {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 16px;
    padding: 2.5rem;
    margin: 2rem auto;
    max-width: 800px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.1);
}

.about-box h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
    font-weight: 700;
}

.about-box p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

.skill-tag {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.5);
    color: var(--primary);
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin: 3rem 0 2.5rem;
    color: var(--primary);
    font-weight: 800;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.link-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 14px;
    padding: 2rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.link-card:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-color: var(--primary);
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.25);
}

.link-icon {
    font-size: 2.5rem;
    min-width: 70px;
    height: 70px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.link-content {
    flex: 1;
}

.link-title {
    font-weight: 700;
    margin-bottom: 0.35rem;
    font-size: 1.15rem;
}

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

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin: 3rem 0;
    flex-wrap: wrap;
    animation: socialLinksIn 0.8s ease 0.6s forwards;
    opacity: 0;
}

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

@keyframes socialIconPop {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.social-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.15);
    border: 2px solid rgba(59, 130, 246, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    animation: socialIconPop 0.5s cubic-bezier(0.16, 1, 0.3, 1) calc(0.8s + var(--icon-delay, 0s)) forwards;
}

.social-icon:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: var(--primary);
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.4);
}

.contact-form {
    max-width: 600px;
    margin: 3rem auto;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 16px;
    padding: 2.5rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.85rem 1.2rem;
    background: rgba(30, 41, 59, 0.6);
    border: 1.5px solid rgba(59, 130, 246, 0.3);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
}

.submit-btn:active {
    transform: translateY(-1px);
}

.message {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 600;
}

.message.success {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid var(--success);
    color: var(--success);
}

.message.error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid var(--error);
    color: var(--error);
}

.message.show {
    animation: slideInMessage 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.submit-btn.loading {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    opacity: 0.85;
}

.submit-btn.loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid white;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

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

.submit-btn.success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    transform: scale(1);
}

.submit-btn.success:hover {
    transform: scale(1);
}

.submit-btn.error {
    background: linear-gradient(135deg, var(--error) 0%, #dc2626 100%);
    transform: scale(1);
}

.submit-btn.error:hover {
    transform: scale(1);
}

.file-input-wrapper {
    position: relative;
    margin-top: 0.5rem;
}

#file {
    display: none;
}

.file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 2px dashed rgba(59, 130, 246, 0.4);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 0.5rem;
}

.file-label:hover {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.08) 100%);
}

.file-label.dragover {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(139, 92, 246, 0.1) 100%);
}

.file-icon {
    font-size: 1.5rem;
}

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

.file-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-top: 1.5rem;
}

.file-preview-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.file-preview-item:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
}

.file-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-preview-item .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: var(--error);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.file-preview-item:hover .remove-btn {
    opacity: 1;
}

.file-preview-item .remove-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.file-preview-item .file-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    font-size: 0.7rem;
    color: white;
    padding: 0.4rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    text-align: center;
    word-break: break-word;
    max-height: 40px;
    overflow: hidden;
}

.legal-page {
    max-width: 900px;
    margin: 0 auto;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 16px;
    padding: 3rem;
    backdrop-filter: blur(10px);
}

.legal-page h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.legal-page h2:first-of-type {
    margin-top: 1.5rem;
}

.legal-page p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.legal-page ul {
    list-style: none;
    margin-left: 0;
}

.legal-page ul li {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1rem;
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.legal-page ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.legal-page a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.legal-page a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.legal-page a:hover {
    color: var(--secondary);
}

.legal-page a:hover::after {
    width: 100%;
}

.legal-page strong {
    color: var(--text-primary);
}

footer {
    background: rgba(15, 23, 42, 0.98);
    border-top: 1px solid rgba(59, 130, 246, 0.3);
    padding: 1.5rem 2rem;
    margin-top: auto;
    backdrop-filter: blur(10px);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-copyright {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.footer-links-legal {
    display: flex;
    gap: 1.5rem;
}

.footer-links-legal a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    position: relative;
}

.footer-links-legal a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.footer-links-legal a:hover {
    color: var(--primary);
}

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

.footer-social {
    display: flex;
    gap: 0.8rem;
}

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.footer-social a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.footer-social a:hover::before {
    width: 100%;
    height: 100%;
}

.footer-social a:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
    color: white;
}

.footer-social a span {
    position: relative;
    z-index: 1;
}

.projects-section {
    margin: 4rem 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.project-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: scale(0.85) translateY(40px) rotateX(15deg);
    perspective: 1000px;
    will-change: transform, opacity;
    position: relative;
}

.project-card.visible {
    animation: projectPopIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) var(--delay, 0s) both;
}

@keyframes projectPopIn {
    0% {
        opacity: 0;
        transform: scale(0.85) translateY(40px) rotateX(15deg);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0) rotateX(0deg);
    }
}

.project-card {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (max-width: 768px) {
    .project-card {
        transform: scale(0.9) translateY(30px) rotateX(10deg);
    }

    .project-card.visible {
        animation: projectPopInMobile 0.6s cubic-bezier(0.16, 1, 0.3, 1) var(--delay, 0s) both;
    }
}

@keyframes projectPopInMobile {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(30px) rotateX(10deg);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0) rotateX(0deg);
    }
}

.project-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center;
    display: block;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(139, 92, 246, 0.15) 100%);
    max-height: 400px;
}

.project-content {
    padding: 1.5rem;
}

.project-title {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.project-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    pointer-events: auto;
}

.project-description a {
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
    pointer-events: auto;
}

.project-description a:hover {
    color: var(--secondary);
    border-bottom-color: var(--primary);
}

.project-link-btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.65rem 1.2rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    border: 1px solid rgba(59, 130, 246, 0.5);
    border-radius: 8px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
    pointer-events: auto;
}

.project-link-btn:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.4) 0%, rgba(139, 92, 246, 0.3) 100%);
    border-color: var(--primary);
    transform: translateX(4px);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.2);
}

.project-card:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-color: var(--primary);
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.25);
}

.project-card:hover .project-image {
    color: rgba(59, 130, 246, 0.6);
}

.project-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(15, 23, 42, 0.9);
    border: 1.5px solid;
    border-radius: 12px;
    padding: 0.35rem 0.7rem;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    z-index: 10;
    backdrop-filter: blur(8px);
    letter-spacing: 0.5px;
}

.project-badge.active {
    border-color: var(--success);
    color: var(--success);
}

.project-badge.inactive {
    border-color: var(--error);
    color: var(--error);
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.project-badge.active .badge-dot {
    background: var(--success);
    animation: badgePulseGreen 2s ease-in-out infinite;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.9);
}

.project-badge.inactive .badge-dot {
    background: var(--error);
    animation: badgePulseRed 2s ease-in-out infinite;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.9);
}

@keyframes badgePulseGreen {
    0%, 100% {
        box-shadow: 0 0 6px rgba(16, 185, 129, 0.9);
    }
    50% {
        box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
    }
}

@keyframes badgePulseRed {
    0%, 100% {
        box-shadow: 0 0 6px rgba(239, 68, 68, 0.9);
    }
    50% {
        box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
    }
}

.uptime-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.uptime-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 12px;
    padding: 2rem;
    backdrop-filter: blur(8px);
    animation: uptimeSlideIn 0.6s ease forwards;
    opacity: 0;
    animation-delay: var(--delay, 0s);
}

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

.uptime-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.uptime-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.uptime-badge {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 700;
    white-space: nowrap;
    min-width: 70px;
    text-align: center;
}

.uptime-badge.excellent {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.uptime-badge.good {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.uptime-badge.poor {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.uptime-bar {
    height: 10px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(51, 65, 85, 0.3);
}

.uptime-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 12px currentColor;
}

.uptime-status {
    font-size: 0.95rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.uptime-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    margin-top: -1rem;
}

.refresh-btn {
    padding: 0.8rem 1.5rem;
    border: 1px solid rgba(59, 130, 246, 0.5);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.refresh-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    border-color: var(--primary);
    box-shadow: 0 0 16px rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
}

.refresh-btn:disabled {
    opacity: 0.7;
}

.refresh-btn.loading {
    animation: spinRefresh 1.5s linear infinite;
}

@keyframes spinRefresh {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    header {
        padding: 1rem;
    }

    .header-content {
        flex-direction: column;
        gap: 1.5rem;
    }

    nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    nav button {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    main {
        padding: 2rem 1rem;
    }

    .profile-name {
        font-size: 2.2rem;
    }

    .profile-title {
        font-size: 1.1rem;
    }

    .profile-picture {
        width: 140px;
        height: 140px;
        font-size: 3.5rem;
    }

    .about-box {
        padding: 1.5rem;
    }

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

    .link-card {
        padding: 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .legal-page {
        padding: 2rem 1.5rem;
    }

    .legal-page h2 {
        font-size: 1.1rem;
    }

    footer {
        padding: 1rem 1.5rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
    }

    .footer-copyright {
        font-size: 0.8rem;
    }

    .footer-links-legal {
        gap: 1rem;
        font-size: 0.8rem;
    }

    .footer-social a {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    main {
        padding: 1.5rem 1rem;
    }

    .profile-name {
        font-size: 1.8rem;
    }

    .profile-title {
        font-size: 1rem;
    }

    .profile-picture {
        width: 120px;
        height: 120px;
        font-size: 2.8rem;
    }

    .link-card {
        flex-direction: column;
        text-align: center;
    }

    .link-icon {
        margin: 0 auto;
    }

    .contact-form {
        padding: 1.5rem;
    }

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

    .uptime-card {
        padding: 1.5rem;
    }

    .uptime-header h3 {
        font-size: 1rem;
    }
}
