:root {
    --bg-color: #030712;
    --text-main: #f9fafb;
    --text-muted: #9ca3af;
    --primary: #00f3ff;
    --primary-dark: #0077ff;
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(0, 243, 255, 0.2);
}

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

body, html {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    overflow-x: hidden;
    scroll-behavior: smooth;
    line-height: 1.6;
}

/* Custom animated background blob */
#blob {
    background: linear-gradient(to right, var(--primary), var(--primary-dark));
    height: 34vmax;
    aspect-ratio: 1;
    position: fixed;
    left: 50%;
    top: 50%;
    translate: -50% -50%;
    border-radius: 50%;
    animation: rotate 20s infinite;
    opacity: 0.3;
    z-index: -2;
}

#blur {
    height: 100vh;
    width: 100vw;
    position: fixed;
    z-index: -1;
    backdrop-filter: blur(12vmax);
    -webkit-backdrop-filter: blur(12vmax);
}

@keyframes rotate {
    from { rotate: 0deg; }
    to { rotate: 360deg; }
}

/* Typography */
h1, h2, h3 {
    font-weight: 800;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    background: linear-gradient(90deg, #fff, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.logo {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--primary);
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.4);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    transition: color 0.3s ease;
    position: relative;
}

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

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

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

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

.glitch {
    font-size: 6rem;
    position: relative;
    color: var(--text-main);
    text-shadow: 0 0 20px rgba(0, 243, 255, 0.5);
    margin-bottom: 1rem;
}

.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 red;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 blue;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(21px, 9999px, 83px, 0); }
    10% { clip: rect(32px, 9999px, 12px, 0); }
    20% { clip: rect(64px, 9999px, 94px, 0); }
    30% { clip: rect(45px, 9999px, 14px, 0); }
    40% { clip: rect(23px, 9999px, 86px, 0); }
    50% { clip: rect(76px, 9999px, 5px, 0); }
    60% { clip: rect(12px, 9999px, 90px, 0); }
    70% { clip: rect(8px, 9999px, 34px, 0); }
    80% { clip: rect(90px, 9999px, 45px, 0); }
    90% { clip: rect(34px, 9999px, 23px, 0); }
    100% { clip: rect(11px, 9999px, 78px, 0); }
}
@keyframes glitch-anim2 {
    0% { clip: rect(65px, 9999px, 100px, 0); }
    10% { clip: rect(43px, 9999px, 12px, 0); }
    20% { clip: rect(87px, 9999px, 45px, 0); }
    30% { clip: rect(12px, 9999px, 67px, 0); }
    40% { clip: rect(9px, 9999px, 21px, 0); }
    50% { clip: rect(54px, 9999px, 8px, 0); }
    60% { clip: rect(77px, 9999px, 99px, 0); }
    70% { clip: rect(32px, 9999px, 32px, 0); }
    80% { clip: rect(1px, 9999px, 56px, 0); }
    90% { clip: rect(89px, 9999px, 2px, 0); }
    100% { clip: rect(45px, 9999px, 11px, 0); }
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 600px;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    border: 1px solid var(--primary);
    border-radius: 30px;
    color: var(--primary);
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 2px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2), inset 0 0 15px rgba(0, 243, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.cta-button:hover {
    background: var(--primary);
    color: var(--bg-color);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.6);
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.7;
    animation: bounce 2s infinite;
}

.scroll-indicator p {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--text-main);
    border-radius: 15px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--primary);
    border-radius: 2px;
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 1.5s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes scroll {
    0% { top: 5px; opacity: 1; }
    100% { top: 20px; opacity: 0; }
}

/* About Section */
.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 4rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    text-align: center;
    transition: transform 0.3s ease;
}

.glass-panel:hover {
    transform: translateY(-5px);
}

.mystery-text {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 1.5rem;
}

.detail-text {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.interactive-btn {
    background: transparent;
    border: 2px dashed var(--primary);
    color: var(--primary);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    font-family: inherit;
}

.interactive-btn:hover {
    background: rgba(0, 243, 255, 0.1);
}

.hidden-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.8s cubic-bezier(0, 1, 0, 1), opacity 0.5s ease;
    opacity: 0;
    margin-top: 1.5rem;
    padding: 0 1rem;
    border-left: 3px solid var(--primary);
    text-align: left;
    color: var(--primary);
}

.hidden-content.open {
    max-height: 200px;
    opacity: 1;
    transition: max-height 0.8s ease-in-out, opacity 0.5s ease-in-out;
}

/* Portfolio Section */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 2rem;
}

.project-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.project-card:hover {
    transform: scale(1.05) translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 243, 255, 0.2);
}

.card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s;
    opacity: 0.8;
}

.project-card:hover .card-front img {
    opacity: 0.4;
}

.card-overlay {
    position: absolute;
    bottom: -100%;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(transparent, rgba(3, 7, 18, 0.9));
    transition: bottom 0.4s ease;
}

.project-card:hover .card-overlay {
    bottom: 0;
}

.card-overlay h3 {
    color: var(--primary);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

/* SNS Section */
.sns {
    text-align: center;
    padding-bottom: 5rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.social-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-main);
    text-decoration: none;
    padding: 2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    width: 140px;
    transition: all 0.3s ease;
}

.social-btn svg {
    transition: transform 0.3s ease, stroke 0.3s ease;
}

.social-btn:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 243, 255, 0.15);
    border-color: var(--primary);
    color: var(--primary);
}

.social-btn:hover svg {
    stroke: var(--primary);
    transform: scale(1.2);
}

footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .glitch { font-size: 4rem; }
    .glass-panel { padding: 2rem; }
    .nav-links { display: none; }
}
