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

:root {
    --bg: #000000;
    --bg-elevated: #040606;
    --surface: #0a0e0d;
    --surface-light: #121816;
    --border: rgba(255, 255, 255, 0.05);
    --border-hover: rgba(255, 255, 255, 0.12);
    --text: #eef1f0;
    --text-dim: #8a9694;
    --text-muted: #4a5654;
    --accent: #4ecdc4;
    --accent-2: #d4a054;
    --accent-3: #6ee7b7;
    --accent-soft: rgba(78, 205, 196, 0.10);
    --accent-glow: rgba(78, 205, 196, 0.30);
    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    --card-shine: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, transparent 40%, transparent 60%, rgba(255,255,255,0.02) 100%);
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--surface-light) var(--bg);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(78, 205, 196, 0.05) 0%, transparent 60%),
        radial-gradient(ellipse 60% 80% at 0% 50%, rgba(110, 231, 183, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse 60% 80% at 100% 80%, rgba(212, 160, 84, 0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--surface-light);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-soft);
}

::selection {
    background: rgba(78, 205, 196, 0.25);
    color: #fff;
}

.grain {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.018;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    animation: grain-drift 8s steps(10) infinite;
}

@keyframes grain-drift {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-2%, -2%); }
    30% { transform: translate(1%, -1%); }
    50% { transform: translate(-1%, 2%); }
    70% { transform: translate(2%, 1%); }
    90% { transform: translate(-1%, -1%); }
}

.glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(150px);
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    animation: glow-appear 2s ease forwards;
}

@keyframes glow-appear {
    to { opacity: 1; }
}

.glow-1 {
    width: 700px;
    height: 700px;
    top: -250px;
    right: -200px;
    background: radial-gradient(circle, rgba(78, 205, 196, 0.1), transparent 65%);
    animation-delay: 0.2s;
}

.glow-2 {
    width: 600px;
    height: 600px;
    bottom: 25%;
    left: -250px;
    background: radial-gradient(circle, rgba(110, 231, 183, 0.07), transparent 65%);
    animation-delay: 0.6s;
}

.glow-3 {
    width: 500px;
    height: 500px;
    top: 55%;
    right: -150px;
    background: radial-gradient(circle, rgba(212, 160, 84, 0.06), transparent 65%);
    animation-delay: 1s;
}

.container {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 24px;
}

.fade-in {
    opacity: 0;
    transform: translateY(50px) scale(0.98);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.glass-card {
    background: var(--glass-bg);
    background-image: var(--card-shine);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    box-shadow:
        var(--glass-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.02), transparent);
    transition: left 0.8s ease;
    pointer-events: none;
}

.glass-card:hover::before {
    left: 100%;
}

.glass-card:hover {
    border-color: rgba(78, 205, 196, 0.15);
    box-shadow:
        0 12px 48px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(78, 205, 196, 0.08),
        0 0 60px -20px rgba(78, 205, 196, 0.1);
    transform: translateY(-2px);
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
}

.hero-content {
    text-align: center;
    padding: 24px;
}

.hero-tag {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 28px;
    opacity: 0;
    animation: hero-fade-up 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.8rem, 7.5vw, 5.5rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.04em;
    color: var(--text);
    margin-bottom: 28px;
    opacity: 0;
    animation: hero-fade-up 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}

.gradient-text {
    background: linear-gradient(135deg, #4ecdc4 0%, #6ee7b7 30%, #d4a054 60%, #4ecdc4 100%);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 6s ease infinite;
}

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

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

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 6px;
    text-decoration-color: rgba(78, 205, 196, 0.35);
    text-decoration-thickness: 1px;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    position: relative;
    display: inline-block;
    padding: 6px 18px;
    background: var(--accent-soft);
    border-radius: 100px;
    border: 1px solid rgba(78, 205, 196, 0.1);
    opacity: 0;
    animation: hero-fade-up 1s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
}

.hero-subtitle:hover {
    background: rgba(78, 205, 196, 0.2);
    border-color: rgba(78, 205, 196, 0.3);
    text-decoration-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(78, 205, 196, 0.15);
}

.easter-egg:visited {
    color: var(--accent-2);
}

.scroll-indicator {
    margin-top: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    animation: hero-fade-up 1s cubic-bezier(0.16, 1, 0.3, 1) 1s forwards;
}

.scroll-line {
    width: 1px;
    height: 50px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scroll-pulse 2.5s ease-in-out infinite;
    transform-origin: top;
}

@keyframes scroll-pulse {
    0%, 100% { opacity: 0.2; transform: scaleY(0.4); }
    50% { opacity: 0.8; transform: scaleY(1); }
}

.scroll-text {
    display: block;
    margin-top: 14px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--text-muted);
    animation: scroll-text-pulse 2.5s ease-in-out infinite;
}

@keyframes scroll-text-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

.section-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 44px;
    position: relative;
    display: inline-block;
    padding-left: 20px;
}

.section-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
}

.section-sub {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-top: -28px;
    margin-bottom: 44px;
    padding-left: 20px;
}

.about {
    padding: 140px 0;
    position: relative;
    z-index: 1;
}

.about-card {
    max-width: 720px;
    position: relative;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--text-dim);
}

.works {
    padding: 80px 0 120px;
    position: relative;
    z-index: 1;
}

.work-item {
    margin-bottom: 56px;
}

.work-item .glass-card {
    border-left: 2px solid rgba(78, 205, 196, 0.2);
}

.work-item .glass-card:hover {
    border-left-color: var(--accent);
}

.work-header {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 16px;
}

.work-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.05em;
    background: var(--accent-soft);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(78, 205, 196, 0.1);
}

.work-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

.work-desc {
    font-size: 0.95rem;
    line-height: 1.85;
    color: var(--text-dim);
    margin-bottom: 24px;
}

.work-links {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    background: var(--accent-soft);
    border: 1px solid rgba(78, 205, 196, 0.15);
    border-radius: 10px;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
}

.link-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.15), transparent);
    opacity: 0;
    transition: opacity 0.35s ease;
}

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

.link-btn:hover {
    border-color: rgba(78, 205, 196, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.12);
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    border-radius: 14px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.video-container::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 14px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.15), transparent 50%, rgba(212, 160, 84, 0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 1;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 14px;
}

.works-note {
    margin-top: 72px;
    text-align: center;
}

.note-card {
    padding: 52px 36px;
    background: linear-gradient(145deg, rgba(78, 205, 196, 0.04), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(78, 205, 196, 0.12);
    position: relative;
}

.note-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: radial-gradient(ellipse at 50% 0%, rgba(78, 205, 196, 0.06), transparent 60%);
    pointer-events: none;
}

.note-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 18px;
    letter-spacing: -0.02em;
}

.note-desc {
    font-size: 1rem;
    color: var(--text-dim);
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.85;
}

.experience {
    padding: 80px 0 120px;
    position: relative;
    z-index: 1;
}

.lang-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 14px;
}

.lang-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 32px 16px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.lang-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.lang-card:hover::after {
    opacity: 0.4;
}

.lang-card:hover {
    transform: translateY(-6px);
    border-color: rgba(78, 205, 196, 0.2);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.4),
        0 0 40px -15px rgba(78, 205, 196, 0.15);
}

.lang-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.lang-card:hover .lang-icon {
    transform: scale(1.15) translateY(-2px);
    filter: drop-shadow(0 6px 20px rgba(78, 205, 196, 0.2));
}

.lang-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}

.lang-since {
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-family: 'Space Grotesk', sans-serif;
}

.contact {
    padding: 100px 0 80px;
    position: relative;
    z-index: 1;
}

.contact-card {
    text-align: center;
    position: relative;
}

.discord-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border);
}

.discord-logo {
    width: 52px;
    height: 52px;
    color: #4ecdc4;
    flex-shrink: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    filter: drop-shadow(0 2px 10px rgba(78, 205, 196, 0.3));
}

.discord-logo:hover {
    transform: scale(1.15) rotate(-5deg);
    filter: drop-shadow(0 4px 20px rgba(78, 205, 196, 0.5));
}

.discord-details {
    text-align: left;
}

.discord-user {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
}

.discord-id {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: 'Space Grotesk', monospace;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

.cta-text {
    font-size: 1.05rem;
    color: var(--text-dim);
    line-height: 1.9;
}

.cta-text strong {
    color: var(--text);
    font-weight: 600;
    background: linear-gradient(135deg, var(--text), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cta-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-style: italic;
}

.fixed-logo {
    position: fixed;
    bottom: 36px;
    right: 36px;
    z-index: 100;
}

.fixed-logo img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    opacity: 0.4;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    border: 2px solid rgba(78, 205, 196, 0.1);
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.7),
        0 0 60px -20px rgba(78, 205, 196, 0.15);
}

.fixed-logo img:hover {
    opacity: 0.85;
    transform: scale(1.08);
    border-color: rgba(78, 205, 196, 0.3);
    box-shadow:
        0 14px 50px rgba(0, 0, 0, 0.8),
        0 0 80px -20px rgba(78, 205, 196, 0.25);
}

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

    .glass-card {
        padding: 26px;
        border-radius: 16px;
    }

    .hero-title {
        font-size: clamp(2rem, 10vw, 3.2rem);
    }

    .about {
        padding: 80px 0;
    }

    .works {
        padding: 40px 0 80px;
    }

    .work-header {
        flex-direction: column;
        gap: 6px;
    }

    .work-title {
        font-size: 1.3rem;
    }

    .work-links {
        flex-direction: column;
    }

    .link-btn {
        justify-content: center;
    }

    .lang-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 10px;
    }

    .lang-card {
        padding: 22px 12px;
        gap: 10px;
    }

    .lang-icon {
        width: 38px;
        height: 38px;
    }

    .discord-info {
        flex-direction: column;
        text-align: center;
    }

    .discord-details {
        text-align: center;
    }

    .experience {
        padding: 40px 0 80px;
    }

    .contact {
        padding: 60px 0 50px;
    }

    .section-label {
        margin-bottom: 30px;
    }

    .section-sub {
        margin-top: -18px;
        margin-bottom: 30px;
    }

    .note-title {
        font-size: 1.4rem;
    }

    .note-card {
        padding: 36px 22px;
    }

    .fixed-logo {
        bottom: 20px;
        right: 20px;
    }

    .fixed-logo img {
        width: 100px;
        height: 100px;
    }

    .glow-1 {
        width: 350px;
        height: 350px;
    }

    .glow-2 {
        width: 300px;
        height: 300px;
    }

    .glow-3 {
        width: 250px;
        height: 250px;
    }

    .hero::after {
        left: 5%;
        right: 5%;
    }
}

@media (max-width: 400px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .glass-card {
        padding: 18px;
        border-radius: 14px;
    }

    .about-text {
        font-size: 0.95rem;
    }

    .lang-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .lang-card {
        padding: 16px 8px;
    }

    .lang-icon {
        width: 30px;
        height: 30px;
    }

    .lang-name {
        font-size: 0.7rem;
    }

    .lang-since {
        font-size: 0.55rem;
    }

    .fixed-logo img {
        width: 80px;
        height: 80px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fade-in {
        transition: none;
        opacity: 1;
        transform: none;
    }

    .gradient-text {
        animation: none;
    }

    .scroll-line {
        animation: none;
    }

    .grain {
        animation: none;
    }

    .hero-tag,
    .hero-title,
    .hero-subtitle,
    .scroll-indicator {
        animation: none;
        opacity: 1;
    }

    .glass-card::before {
        display: none;
    }
}
