/*
Theme Name: 筑波大学人文社会系研究者アーカイブ
Description: 筑波大学人文社会系研究者紹介アーカイブ用のWordPressテーマ
Version: 1.0
Author: Tsukuba University
*/

@charset "UTF-8";
@import "style/common.css";


html {
	scroll-behavior: smooth;
	overscroll-behavior: auto;
	-webkit-overflow-scrolling: touch;
}

body {
	font-size: 16px;
	line-height: 24px;
	position: relative;
	background-color: transparent; // 背景色を透明に設定
	overflow-x: hidden;
	scroll-behavior: smooth;
	overscroll-behavior: auto;
	-webkit-overflow-scrolling: touch;
}

img {
	max-width: 100%;
}

a {
	text-decoration: none;
	color: #000;
}

// Background ------------------------------------
.bg {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: -2;
	overflow: hidden;
}

canvas {
	display: block; 
	position: fixed; 
	top: 0;
	left: 0;
	z-index: -1;
}

// Content ------------------------------------
.content {
	z-index: 2; 
	width: 100%;
	max-width: 1600px;
	margin: 0 auto;
	padding: 5em 0;
	position: relative;
	opacity: 0;
	transform: translateY(50px);
	transition: opacity 1s ease-out, transform 1s ease-out;
	visibility: hidden;
	
	&.show {
		opacity: 1;
		transform: translateY(0);
		visibility: visible;
	}
}


// Title ------------------------------------
.title {
	margin: 6em auto;
	text-align: center;
	h1 {
		font-size: 2em;
		line-height: 1.5;
		img {
			width: 50%;
			max-width: 400px;
		}
	}
	@include mq(lg) {
		margin: 3em auto;
		h1 {
			img {
				max-width: 300px;
			}
		}
	}
}	


// Search ------------------------------------
.search {
	margin: 6em auto;
	text-align: center;
	padding: 0 2em;
	h2 {
		font-weight: bold;
		font-size: 1.4em;
		margin-bottom: 2em;
		color: #fff;
	}
	ul {
		display: flex;
		justify-content: center;
		align-items: stretch;
		flex-wrap: wrap;
		gap: 2em;
		li {
			a {
				display: flex;
				align-items: center;
				justify-content: center;
				height: 100%;
				padding: 0.4em 1.6em;
				color: #fff;
				font-size: 1.1rem;
				border: 1px solid #fff;
				border-radius: 4px;
				transition: all 0.3s ease;
				&.active {
					background: #fff;
					color: #000;
					&:hover {
						background: #fff;
					}
				}
				&:hover {
					background: rgba(255, 255, 255, 0.2);
				}
			}
		}
		@include mq(lg) {
			gap: 1em;
			li {
				a {
					padding: 0.4em 1em;
				}
			}
		}
		@include mq(md) {
			display: block;
			li {
				margin-bottom: .5em;
			}
		}

	}
	@include mq(md) {
		margin: 3em auto;
	}
}


// List ------------------------------------
.list {
	ul {
		padding: 0 2em;
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		gap: 40px;
		@include mq(xl) {
			gap: 30px;
		}
		@include mq(lg) {
			grid-template-columns: repeat(2, 1fr);
			gap: 20px;
		}
		@include mq(sp) {
			grid-template-columns: 1fr;
			gap: 20px;
		}
		li {
			background: #fff;
			box-shadow: 0 10px 32px rgba(0, 0, 0, 0.1);
			border-radius: 5px;
			overflow: hidden;
			padding: 30px 30px 10px;
			opacity: 1;
			transition: all 0.3s ease-out;
			position: relative;
			top: 0;
			transform: translateY(0);
			&:hover {
				cursor: pointer;
				top: -8px;
				opacity: .9;
			}
			a {
				&:hover {
					.play-icon {
						box-shadow: none;
						opacity: 1;
						transform: scale(1.1);
						border-color: rgba(255, 255, 255, 1);
						background: rgba(255, 255, 255, 0.2);
					}
				}
			}
			.img {
				position: relative;
				img {
					width: 100%;
					border-radius: 4px;
				}
				.play-icon {
					position: absolute;
					bottom: 16px;
					right: 16px;
					transition: all 0.3s ease;
					pointer-events: none;
					z-index: 1;
					width: 32px;
					height: 32px;
					border: 2px solid rgba(255, 255, 255, 1);
					border-radius: 50%;
					display: flex;
					align-items: center;
					justify-content: center;
					backdrop-filter: blur(4px);
					svg {
						width: 20px;
						height: 20px;
					}
				}
			}
			.txt {
				margin: 1em auto;
				h3 {
					font-size: 1.2em;
					font-weight: bold;
					margin-bottom: 0.5em;
					&:after {
						content: '';
						display: block;
						width: 10px;
						height: 1px;
						background: #000;
						margin: 1em 0;
					}
				}
				.name {
					font-size: 1em;
					font-weight: bold;
				}
				.affiliation {
					font-size: 0.7em;
				}
			}
			@include mq(xl) {
				padding: 20px 20px 10px;
			}
			@include mq(md) {
				.txt {
					h3 {
						font-size: 1.1em;
					}
					.name {
						font-size: 0.9em;
					}
					.affiliation {
						font-size: 0.7em;
					}
				}
			}
		}
	}

}

// Pager ------------------------------------
.pager {
	margin: 5em auto 2em;
	display: flex;
	justify-content: center;
	gap: 1em;
	.pager-item {
		a {
			display: block;
			padding: .8em 1em;
			color: #fff;
			border: 1px solid #fff;
			border-radius: 4px;
			transition: all 0.3s ease;
			&:hover {
				background: #fff;
				color: #000;
			}
			&.active {
				background: #fff;
				color: #000;
			}
		}
	}
}

// Footer ------------------------------------
footer {
	margin: 5em auto;
	text-align: center;
	.footer-logo {
		margin-bottom: 2em;
		img {
			width: 50%;
			max-width: 360px;
		}
	}
	p {
		font-family: 'Arial', sans-serif;
		font-size: 0.7em;
		color: #fff;
	}
	@include mq(md) {
		margin: 3em auto;
	}
	@include mq(sp) {
		margin: 0em auto 2em;
		p {
			font-size: 0.6em;
		}
	}
}

// Opening Animation ------------------------------------
.opening-container {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #0c0311 0%, #220449 100%);
	z-index: 10000;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	overflow: hidden;
	
	// 筑波大ロゴシェイプ
	.loading-bg-logo {
		position: absolute;
		top: 47%;
		left: 50%;
		width: 100%;
		height: 100%;
		transform: translate(-50%, -50%);
		opacity: .05;
		display: flex;
		align-items: center;
		justify-content: center;
		img {
			width: 220px;
		}
	}

	// ローディングバー
	.loading-container {
		text-align: center;
		z-index: 2;
		
		.loading-bar {
			width: 300px;
			height: 4px;
			background: rgba(255, 255, 255, 0.2);
			border-radius: 2px;
			overflow: hidden;
			margin-bottom: 1em;
			position: relative;
			
			.loading-progress {
				height: 100%;
				background: linear-gradient(90deg, #bbff1b, #c92370);
				background-size: 200% 100%;
				animation: progressFill 3s ease-in-out forwards, gradientMove 2s ease-in-out infinite;
				width: 0%;
			}
		}
		
		.loading-text {
			color: #fff;
			font-size: 0.9em;
			letter-spacing: 2px;
			animation: textPulse 2s ease-in-out infinite;
		}
	}
}

@keyframes logoPulse {
	0%, 100% {
		transform: scale(1);
		box-shadow: 
			0 0 50px rgba(255, 255, 255, 0.1),
			inset 0 0 50px rgba(255, 255, 255, 0.05);
	}
	50% {
		transform: scale(1.05);
		box-shadow: 
			0 0 80px rgba(255, 255, 255, 0.2),
			inset 0 0 80px rgba(255, 255, 255, 0.1);
	}
}

@keyframes gradientShift {
	0% {
		background-position: 0% 50%;
	}
	50% {
		background-position: 100% 50%;
	}
	100% {
		background-position: 0% 50%;
	}
}


@keyframes progressFill {
	0% {
		width: 0%;
	}
	100% {
		width: 100%;
	}
}

@keyframes textPulse {
	0%, 100% {
		opacity: 0.6;
	}
	50% {
		opacity: 1;
	}
}

@keyframes backgroundPulse {
	0%, 100% {
		opacity: 0.3;
		transform: scale(1);
	}
	50% {
		opacity: 0.6;
		transform: scale(1.1);
	}
}

@keyframes shimmer {
	0% {
		transform: translateX(-100%) translateY(-100%) rotate(45deg);
	}
	100% {
		transform: translateX(100%) translateY(100%) rotate(45deg);
	}
}

// レスポンシブ対応
@include mq(md) {
	.opening-container {
		.logo-container {
			.logo-circle {
				width: 150px;
				height: 150px;
				
				.logo-inner .logo-img {
					width: 90px;
				}
			}
		}
		
		.title-text-container {
			.main-title {
				font-size: 2em;
			}
		}
		
		.loading-container {
			.loading-bar {
				width: 250px;
			}
		}
	}
}

@include mq(sp) {
	.opening-container {
		.logo-container {
			.logo-circle {
				width: 120px;
				height: 120px;
				
				.logo-inner .logo-img {
					width: 70px;
				}
			}
		}
		
		.title-text-container {
			.main-title {
				font-size: 1.5em;
			}
		}
		
		.loading-container {
			.loading-bar {
				width: 200px;
			}
		}
	}
}

// Modal ------------------------------------
.modal {
	display: none;
	position: fixed;
	z-index: 1000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background-color: rgba(0, 0, 0, 0.8);
	opacity: 0;
	transition: opacity 0.3s ease;
	
	&.show {
		display: flex;
		justify-content: center;
		align-items: center;
		opacity: 1;
	}
	
	.modal-content {
		position: relative;
		background-color: #fefefe;
		margin: auto;
		padding: 30px;
		border-radius: 10px;
		width: 90%;
		max-width: 1000px;
		box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
		transform: scale(0.7);
		transition: transform 0.3s ease;
		
		.modal.show & {
			transform: scale(1);
		}
	}
	
	.close-button {
		position: absolute;
		top: 10px;
		right: 20px;
		color: #333;
		font-size: 28px;
		font-weight: bold;
		cursor: pointer;
		z-index: 1001;
		
		&:hover {
			color: #000;
		}
	}
	
	.video-container {
		position: relative;
		padding-bottom: 56.25%; /* 16:9 アスペクト比 */
		height: 0;
		overflow: hidden;
		margin: 0 -10px; /* ネガティブマージンで少し広げる */
		
		iframe {
			position: absolute;
			top: 0;
			left: 0;
			width: 100%;
			height: 100%;
		}
	}
}
