:root {
    --bg-dark: #050505;
    --box-bg: rgba(22, 22, 24, 0.4);
    --box-border: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent: #ffffff;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Noto Sans JP', 'Rajdhani', sans-serif;
    overflow-x: hidden;
    cursor: none; /* Hide default for custom cursor */
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; }

/* Background Noise Texture */
.bg-noise {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    pointer-events: none;
    z-index: 0;
    opacity: 0.25;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
}

/* Subtle inner glow in center */
.ambient-light {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 60vw; height: 60vh;
    background: radial-gradient(circle, rgba(255,255,255,0.02) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
    animation: ambientPulse 8s ease-in-out infinite alternate;
}

/* Custom Cursor Elements */
.cursor-dot {
    width: 6px; height: 6px;
    background: var(--text-primary);
    border-radius: 50%;
    position: fixed; pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
}

.cursor-ring {
    width: 36px; height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    position: fixed; pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9998;
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
                height 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
                background-color 0.3s;
}
.cursor-ring.active {
    width: 50px; height: 50px;
    background-color: rgba(255, 255, 255, 0.05);
}

/* Base Dashboard Container */
.dashboard {
    position: relative;
    z-index: 10;
    max-width: 1300px;
    margin: 0 auto;
    padding: 2vh 4vw 4vh;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Custom Top Nav */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0 40px;
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeInDown 0.8s ease forwards;
}

.logo {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 1.8rem;
    letter-spacing: 3px;
}
.logo .dot { color: #666; }

.nav-status {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.status-indicator {
    width: 8px; height: 8px;
    background-color: #00ff66;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 255, 102, 0.8);
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.3); }
    100% { opacity: 1; transform: scale(1); }
}

/* Bento Grid System */
.bento-layout {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: minmax(auto, auto);
    gap: 24px;
    flex: 1;
    margin-bottom: 80px; /* 固定フッターと被らないための余白 */
}

/* Individual Bento Box */
.bento-box {
    background: var(--box-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--box-border);
    border-radius: 24px;
    padding: 40px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s;
}

.bento-box > * { position: relative; z-index: 1; }

.bento-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(600px circle at var(--mouse-x) var(--mouse-y), rgba(255, 255, 255, 0.05), transparent 40%);
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.bento-box:hover::before { opacity: 1; }
.bento-box:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

/* Content Placement within Grid */
.hero-section { 
    min-height: 80vh; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: flex-start;
    position: relative;
}
.scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 0;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 3px;
    color: var(--text-secondary);
    animation: bounce 2s infinite;
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.profile-box { 
    grid-column: 1 / 3; 
    justify-content: flex-start;
}
.achievements-box {
    grid-column: 1 / 2;
    display: flex;
    flex-direction: column;
}
.apps-box { 
    grid-column: 2 / 3; 
}
.sns-box { 
    grid-column: 1 / 3; 
    display: flex; 
    flex-direction: column;
}

/* Achievements List */
.achievements-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}
.achievements-list li {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 0.95rem;
    color: var(--text-secondary);
    padding-left: 28px;
    position: relative;
    line-height: 1.5;
}
.achievements-list li::before {
    content: '[+]';
    position: absolute;
    left: 0; top: 0;
    font-family: 'Courier New', Courier, monospace;
    color: #ffffff;
    font-size: 0.9rem;
}

/* Typography styles */
.role-badge {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    letter-spacing: 5px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.main-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(to right, #ffffff, #666666, #ffffff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 2px;
    animation: gradientShift 6s linear infinite;
}

.tagline {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.5rem;
    color: var(--text-secondary);
}

.box-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 2px;
    color: var(--text-secondary);
    margin-bottom: 30px;
    text-transform: uppercase;
}

/* Profile / Terminal styling */
.terminal-ui {
    background: #080808;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.06);
    padding: 20px;
    margin-bottom: 25px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    color: #e0e0e0;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

.terminal-header {
    display: flex; gap: 8px; margin-bottom: 15px;
}
.terminal-header .btn {
    width: 12px; height: 12px; border-radius: 50%;
}
.close { background: #ff5f56; }
.min { background: #ffbd2e; }
.max { background: #27c93f; }

.terminal-body p { margin-bottom: 6px; }
.terminal-body p:last-child::after {
    content: '_';
    animation: blinkCursor 1s step-end infinite;
}
.jp-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* App list / cards */
.apps-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.app-card {
    display: flex;
    align-items: center;
    padding: 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.app-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(10px);
}
.app-card:hover .app-arrow {
    transform: translate(5px, -5px);
    color: #fff;
}
.app-icon {
    font-size: 2.5rem;
    width: 70px; height: 70px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    margin-right: 25px;
    animation: floatIcon 6s ease-in-out infinite;
}
.app-card:nth-child(1) .app-icon { animation-delay: 0s; }
.app-card:nth-child(2) .app-icon { animation-delay: 1s; }
.app-card:nth-child(3) .app-icon { animation-delay: 2s; }
.app-info h3 {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 6px;
    color: #ffffff;
}
.app-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.app-arrow {
    margin-left: auto;
    font-size: 1.5rem;
    color: #555;
    transition: all 0.4s;
}

/* SNS Buttons */
.sns-buttons {
    display: flex;
    flex-direction: row;
    gap: 15px;
    height: 100%;
    justify-content: flex-start;
}
.social-btn {
    flex: 1;
    /* remaining styles */
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.3);
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 2px;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}
.social-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 0%; height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 0;
}
.social-btn:hover::before { width: 100%; }
.social-btn .btn-text { position: relative; z-index: 1; }

.social-btn:hover { border-color: rgba(255, 255, 255, 0.3); }

/* Footer */
footer, .footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    padding: 10px 0;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    color: #888;
    letter-spacing: 2px;
    background: rgba(10, 10, 12, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 1000;
}

/* Reveal Animation on Scroll */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-on-scroll.active {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeInDown {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes ambientPulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes blinkCursor {
    50% { opacity: 0; }
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .bento-layout { display: flex; flex-direction: column; }
    .sns-buttons { flex-direction: column; }
}

@media (max-width: 768px) {
    .dashboard { padding: 2vh 6vw 4vh; }
    .main-title { font-size: 3.5rem; }
    .app-card { flex-direction: column; align-items: flex-start; }
    .app-icon { margin-bottom: 20px; }
    .app-arrow { margin-left: 0; margin-top: 15px; align-self: flex-end; }
}

@media (max-width: 480px) {
    .bento-layout { grid-template-columns: 1fr; }
    .hero-box, .profile-box, .apps-box, .sns-box { grid-column: 1; }
    .sns-buttons { flex-direction: column; }
    .social-btn { height: 70px; }
    .bento-box { padding: 30px; }
}
