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

html {
    color-scheme: dark;
    scrollbar-gutter: stable;
}

body {
    background-color: #0a0a0a;
    color: #ffffff;
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    overflow-y: scroll;
    position: relative;
}

#bg-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(1000px circle at 20% 20%, rgba(76, 0, 255, 0.08), transparent 60%),
        radial-gradient(900px circle at 80% 30%, rgba(110, 4, 160, 0.08), transparent 55%),
        radial-gradient(1000px circle at 50% 85%, rgba(255, 255, 255, 0.04), transparent 60%),
        #0a0a0a;
}

.container {
    text-align: center;
    max-width: 920px;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.view-stack {
    position: relative;
    width: 100%;
    max-width: calc(100vw - 4rem);
    margin: 0 auto;
}

.view {
    position: relative;
}

#home-view {
    transform: none;
    opacity: 1;
}

#portfolio-view {
    transform: none;
    opacity: 1;
    margin-top: 2.5rem;
}

.view-stack.is-portfolio #home-view {
    transform: none;
    opacity: 1;
}

.view-stack.is-portfolio #portfolio-view {
    transform: none;
    opacity: 1;
}

.js .view-stack {
    width: 760px;
    max-width: calc(100vw - 4rem);
    margin: 0 auto;
    overflow: hidden;
}

.js .view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transition: transform 450ms ease, opacity 180ms ease;
    will-change: transform, opacity;
}

.js #home-view {
    position: relative;
    transform: translateX(0);
    opacity: 1;
}

.js #portfolio-view {
    transform: translateX(110%);
    opacity: 0;
    pointer-events: none;
    margin-top: 0;
}

.js .view-stack.is-portfolio #home-view {
    position: absolute;
    transform: translateX(-110%);
    opacity: 0;
    pointer-events: none;
}

.js .view-stack.is-portfolio #portfolio-view {
    position: relative;
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

#back-btn {
    display: none;
}

.js #back-btn {
    display: inline-block;
}

@media (prefers-reduced-motion: reduce) {
    .view {
        transition: none;
    }
}

#portfolio-view main {
    display: flex;
    flex-direction: column;
    align-items: center;
}

header h1 {
    font-family: 'Dancing Script', 'Brush Script MT', cursive;
    font-size: 4rem;
    font-weight: 400;
    margin-bottom: 1rem;
    color: #ffffff;
    background: linear-gradient(45deg, #ffffff, #cccccc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeIn 1s ease-in;
}

header h2 {
    font-family: 'Arial-rounded';
    font-size: 1.5rem;
    font-weight: 200;
    margin-bottom: 3rem;
    color: #ffffff;
    background: linear-gradient(45deg, #ffffff, #cccccc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeIn 1s ease-in;
}

@supports not (-webkit-background-clip: text) {
    header h1,
    header h2 {
        background: none;
        -webkit-text-fill-color: currentColor;
    }
}

.links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.link-item {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 300;
    padding: 1rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    transition: all 0.3s ease;
    display: inline-block;
    min-width: 200px;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    font-family: inherit;
    appearance: none;
}

.portfolio-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: left;
    margin: 0 auto 2rem;
    width: 50%;
}

.portfolio-item {
    padding: 0;
}

.portfolio-title {
    display: inline-block;
    color: #ffffff;
    text-decoration: none;
    position: relative;
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 0.75rem;
}

.portfolio-title::after {
    content: '';
    display: block;
    height: 1px;
    position: absolute;
    left: 0;
    right: -5.5rem;
    margin-top: 0.35rem;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.85) 0%,
        rgba(255, 255, 255, 0.55) 45%,
        rgba(255, 255, 255, 0) 100%
    );
}

.portfolio-desc {
    opacity: 0.9;
    margin-bottom: 0.4rem;
    line-height: 1.4;
    font-size: 0.98rem;
}

.portfolio-url {
    display: inline-block;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    font-size: 0.92rem;
}

.link-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
}

footer {
    margin-top: 4rem;
    opacity: 0.7;
    font-size: 0.9rem;
}


@media (max-width: 768px) {
    header h1 {
        font-size: 3rem;
    }
    
    .link-item {
        font-size: 1rem;
        padding: 0.8rem 1.5rem;
        min-width: 150px;
    }
}
