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

/* Variables */
:root {
    --bg: #0a0a0a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --border: #1a1a1a;
    --accent: #ffffff;
    --hover-bg: #111111;
}

/* Base */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Subtle grain texture */
.grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    z-index: 1;
}

/* Container */
.container {
    max-width: 480px;
    width: 100%;
    position: relative;
    z-index: 2;
    animation: fadeIn 0.8s ease-out;
}

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

/* Profile Section */
.profile {
    text-align: center;
    margin-bottom: 48px;
}

.avatar {
    width: 96px;
    height: 96px;
    margin: 0 auto 24px;
    position: relative;
}

.avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
}

.name {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.title {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Links Grid */
.links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 48px;
}

.link-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.link-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--hover-bg);
    opacity: 0;
    transition: opacity 0.2s ease;
}

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

.link-item:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.link-item:active {
    transform: translateY(0);
}

.link-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 16px;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.link-icon svg {
    width: 100%;
    height: 100%;
}

.link-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.link-content h3 {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.link-content p {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* About Section */
.about {
    text-align: center;
    margin-bottom: 48px;
    padding: 0 20px;
}

.about p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 360px;
    margin: 0 auto;
}

/* Footer */
.footer {
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.footer p {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Selection */
::selection {
    background: var(--accent);
    color: var(--bg);
}

/* Responsive */
@media (max-width: 640px) {
    body {
        padding: 32px 16px;
    }

    .container {
        max-width: 100%;
    }

    .name {
        font-size: 24px;
    }

    .title {
        font-size: 14px;
    }

    .links-grid {
        gap: 10px;
    }

    .link-item {
        padding: 28px 16px;
    }

    .link-icon {
        width: 28px;
        height: 28px;
        margin-bottom: 12px;
    }

    .link-content h3 {
        font-size: 14px;
    }

    .link-content p {
        font-size: 12px;
    }

    .about {
        padding: 0 8px;
    }

    .about p {
        font-size: 13px;
    }
}

@media (max-width: 400px) {
    .links-grid {
        grid-template-columns: 1fr;
    }

    .link-item {
        flex-direction: row;
        justify-content: flex-start;
        padding: 20px;
        gap: 16px;
    }

    .link-icon {
        margin-bottom: 0;
    }

    .link-content {
        text-align: left;
    }
}

/* Smooth animations */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
