:root {
    --primary-color: #00ff88;
    --secondary-color: #ff00ff;
    --accent-color: #00d4ff;
    --background-color: #0a0a0a;
    --text-color: #e0e0e0;
    --secondary-text: #888888;
    --card-bg: #0f0f0f;
    --border-color: #1a1a1a;
    --glow-color: rgba(0, 255, 136, 0.3);
    --shadow-color: rgba(0, 0, 0, 0.8);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 255, 136, 0.03) 2px,
            rgba(0, 255, 136, 0.03) 4px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(0, 255, 136, 0.03) 2px,
            rgba(0, 255, 136, 0.03) 4px
        );
    pointer-events: none;
    z-index: 1;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Grain texture overlay */
.grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.03;
    z-index: 9999;
    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='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 2;
}

.personal-site {
    padding: 4rem 0;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    position: relative;
}

.status-bar {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    margin-bottom: 3rem;
    font-size: 0.875rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-text {
    color: var(--secondary-text);
}

.glitch-text {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
    letter-spacing: -0.05em;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px var(--glow-color));
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
}

.glitch-text::before {
    animation: glitchBefore 3s infinite;
}

.glitch-text::after {
    animation: glitchAfter 3s infinite reverse;
}

@keyframes glitchBefore {
    0%, 95%, 100% {
        opacity: 0;
        transform: translate(0);
    }
    96% {
        opacity: 0.8;
        transform: translate(-3px, 3px);
        filter: hue-rotate(90deg);
    }
}

@keyframes glitchAfter {
    0%, 95%, 100% {
        opacity: 0;
        transform: translate(0);
    }
    96% {
        opacity: 0.8;
        transform: translate(3px, -3px);
        filter: hue-rotate(-90deg);
    }
}

@keyframes glitch {
    0%, 100% {
        opacity: 0;
        transform: translate(0);
    }
    33% {
        opacity: 1;
        transform: translate(-2px, 2px);
        color: #ff0080;
    }
    66% {
        opacity: 1;
        transform: translate(2px, -2px);
        color: #00ffff;
    }
}

.subtitle {
    font-size: 1.25rem;
    color: var(--secondary-text);
    max-width: 600px;
    margin-bottom: 3rem;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-text);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

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

.social-link svg {
    width: 20px;
    height: 20px;
}

/* Section Styling */
section {
    margin-bottom: 8rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
}

.title-number {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 900;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 10px var(--glow-color);
}

/* About Section */
.about-content p {
    font-size: 1.125rem;
    color: var(--secondary-text);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.tags {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.tag {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 2px solid var(--primary-color);
    border-radius: 0;
    font-size: 0.875rem;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    transition: left 0.3s ease;
    z-index: -1;
}

.tag:hover::before {
    left: 0;
}

.tag:hover {
    color: var(--background-color);
    transform: translateY(-2px) rotate(-2deg);
    box-shadow: 4px 4px 0 rgba(0, 255, 136, 0.3);
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-card {
    padding: 2rem;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 0;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.skill-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
}

.skill-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--card-bg);
    z-index: -1;
}

.skill-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px var(--shadow-color);
}

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

.skill-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.skill-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

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

/* Projects Section */
.project-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.project-card {
    padding: 2rem;
    background: var(--card-bg);
    border-left: 4px solid var(--primary-color);
    border-right: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
    position: relative;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
}

.project-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 14px;
    height: 14px;
    background: var(--primary-color);
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

.project-card:hover {
    border-left-width: 8px;
    transform: translateX(12px);
    box-shadow: -8px 8px 0 var(--primary-color), -16px 16px 40px var(--shadow-color);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.project-header h3 {
    font-size: 1.5rem;
    color: var(--text-color);
}

.project-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.project-link:hover {
    background: var(--primary-color);
    color: var(--background-color);
}

.project-card > p {
    color: var(--secondary-text);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.project-tech span {
    padding: 0.4rem 0.8rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--primary-color);
}

/* Contact Section */
.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-content p {
    font-size: 1.125rem;
    color: var(--secondary-text);
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 3rem;
    background: var(--primary-color);
    color: var(--background-color);
    border: none;
    border-radius: 0;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 8px 8px 0 rgba(0, 255, 136, 0.2);
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translate(4px, 4px);
    box-shadow: 4px 4px 0 rgba(0, 255, 136, 0.4);
}

.button-arrow {
    transition: transform 0.3s ease;
    font-size: 1.2rem;
}

.cta-button:hover .button-arrow {
    transform: translateX(8px);
    animation: arrowBounce 0.6s ease infinite;
}

@keyframes arrowBounce {
    0%, 100% { transform: translateX(8px); }
    50% { transform: translateX(12px); }
}

/* Footer */
.footer {
    text-align: center;
    padding: 3rem 0;
    color: var(--secondary-text);
    font-size: 0.875rem;
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
}

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

.footer a:hover {
    opacity: 0.7;
}

.copyright {
    margin-top: 0.5rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        max-width: 100%;
        padding: 2rem 1.5rem;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

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

    .personal-site {
        padding: 1rem 0;
    }

    .hero {
        min-height: auto;
        padding: 3rem 0;
    }

    .glitch-text {
        font-size: clamp(2rem, 10vw, 3.5rem);
    }

    .subtitle {
        font-size: 1.1rem;
    }

    section {
        margin-bottom: 3rem;
    }

    .section-title {
        font-size: 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

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

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .skill-card {
        padding: 1.5rem;
    }

    .social-links {
        gap: 1rem;
        flex-wrap: wrap;
    }

    .social-link {
        width: 36px;
        height: 36px;
    }

    .project-card {
        padding: 1.5rem;
    }

    .project-card:hover {
        transform: translateX(0);
        transform: scale(1.02);
    }

    .project-tech {
        gap: 0.75rem;
    }

    .project-tech span {
        font-size: 0.75rem;
        padding: 0.3rem 0.7rem;
    }

    .cta-button {
        padding: 0.875rem 1.75rem;
        font-size: 0.95rem;
    }

    .footer {
        padding: 2rem 0;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.75rem;
    }

    .status-bar {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .glitch-text {
        font-size: clamp(1.75rem, 12vw, 2.5rem);
        margin-bottom: 1rem;
    }

    .subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

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

    .about-content p {
        font-size: 1rem;
    }

    .tags {
        gap: 0.75rem;
    }

    .tag {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .skill-card {
        padding: 1.25rem;
    }

    .skill-icon {
        font-size: 2rem;
    }

    .skill-card h3 {
        font-size: 1.1rem;
    }

    .skill-card p {
        font-size: 0.9rem;
    }

    .project-card {
        padding: 1.25rem;
    }

    .project-header h3 {
        font-size: 1.25rem;
    }

    .project-link {
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
    }

    .project-card > p {
        font-size: 0.9rem;
    }

    .contact-content p {
        font-size: 1rem;
    }

    .cta-button {
        width: 100%;
        justify-content: center;
        padding: 1rem;
    }
}

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