
@import url('https://fonts.googleapis.com/css2?family=DotGothic16&display=swap');

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

body {
	background: #000;
	color: #00ff00;
	font-family: 'DotGothic16', monospace;
	overflow-x: hidden;
	image-rendering: pixelated;
	cursor: crosshair;
}

/* CRT effect */
.crt {
	/* animation: flicker 0.15s infinite; */
}

.crt::before {
	content: " ";
	display: block;
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;
	background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
	z-index: 2;
	background-size: 100% 2px, 3px 100%;
	pointer-events: none;
}

.crt::after {
	content: " ";
	display: block;
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;
	background: rgba(18, 16, 16, 0.1);
	opacity: 0;
	z-index: 2;
	pointer-events: none;
	animation: flicker 0.15s infinite;
}

@keyframes flicker {
	0% { opacity: 0.27861; }
	5% { opacity: 0.34769; }
	10% { opacity: 0.23604; }
	15% { opacity: 0.90626; }
	20% { opacity: 0.18128; }
	25% { opacity: 0.83891; }
	30% { opacity: 0.65583; }
	35% { opacity: 0.67807; }
	40% { opacity: 0.26559; }
	45% { opacity: 0.84693; }
	50% { opacity: 0.96019; }
	55% { opacity: 0.08594; }
	60% { opacity: 0.20313; }
	65% { opacity: 0.71988; }
	70% { opacity: 0.53455; }
	75% { opacity: 0.37288; }
	80% { opacity: 0.71428; }
	85% { opacity: 0.70419; }
	90% { opacity: 0.7003; }
	95% { opacity: 0.36108; }
	100% { opacity: 0.24387; }
}

.container {
	max-width: 640px;
	margin: 0 auto;
	padding: 20px;
	position: relative;
	z-index: 1;
}

/* PC-98 style window */
.window {
	border: 2px solid #00ffff;
	background: #000080;
	margin: 20px 0;
	box-shadow: 4px 4px 0 #000;
}

.window-title {
	background: #00ffff;
	color: #000;
	padding: 4px 8px;
	font-size: 14px;
	border-bottom: 2px solid #00ffff;
	display: flex;
	justify-content: space-between;
}

.window-content {
	padding: 15px;
	color: #fff;
}

/* ASCII art header */
.ascii-header {
	color: #ff00ff;
	font-size: 10px;
	line-height: 1.2;
	white-space: pre;
	overflow-x: auto;
	text-align: center;
	margin: 20px 0;
	text-shadow: 2px 2px 0 #000;
}

/* Navigation menu */
.menu {
	background: #000;
	border: 2px solid #ffff00;
	padding: 10px;
	margin: 20px 0;
}

.menu-item {
	color: #ffff00;
	padding: 8px;
	margin: 5px 0;
	border: 1px solid #ffff00;
	cursor: pointer;
	transition: all 0.1s;
	display: block;
	text-decoration: none;
}

.menu-item:hover {
	background: #ffff00;
	color: #000;
	box-shadow: 2px 2px 0 #ffff00;
}

.menu-item::before {
	content: "▶ ";
}

/* Retro status bar */
.status-bar {
	background: #555;
	color: #0f0;
	padding: 5px 10px;
	font-size: 12px;
	border-top: 1px solid #777;
	display: flex;
	justify-content: space-between;
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 3;
}

.blink {
	animation: blink 1s infinite;
}

@keyframes blink {
	0%, 49% { opacity: 1; }
	50%, 100% { opacity: 0; }
}

/* Pixel art decorations */
.pixel-art {
	width: 100%;
	height: 4px;
	background: repeating-linear-gradient(
		90deg,
		#ff00ff 0px,
		#ff00ff 2px,
		#00ffff 2px,
		#00ffff 4px,
		#ffff00 4px,
		#ffff00 6px
	);
	margin: 10px 0;
}

/* Japanese text styling */
.jp-text {
	color: #ff00ff;
	font-size: 18px;
	text-shadow: 2px 2px 0 #000;
}

/* Visitor counter */
.counter {
	background: #000;
	border: 2px solid #0f0;
	padding: 10px;
	text-align: center;
	color: #0f0;
	margin: 20px 0;
	font-size: 20px;
}

/* Scrolling text */
.marquee {
	background: #000;
	padding: 10px;
	border: 1px solid #f0f;
	overflow: hidden;
	white-space: nowrap;
}

.marquee span {
	display: inline-block;
	padding-left: 100%;
	animation: marquee 15s linear infinite;
	color: #f0f;
}

@keyframes marquee {
	0% { transform: translate(0, 0); }
	100% { transform: translate(-100%, 0); }
}

/* Links */
a {
	color: #00ffff;
	text-decoration: none;
	border-bottom: 1px dotted #00ffff;
}

a:hover {
	color: #ffff00;
	border-bottom-color: #ffff00;
}

/* Boot screen */
.boot-screen {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: #000;
	color: #0f0;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	font-family: monospace;
	animation: fadeout 3s forwards;
}

@keyframes fadeout {
	0%, 80% { opacity: 1; }
	100% { opacity: 0; pointer-events: none; }
}

.boot-text {
	font-size: 14px;
	line-height: 1.5;
}

/* Dithered background effect */
.dither-bg {
	background-image: 
		repeating-linear-gradient(0deg, #000 0px, #000 1px, transparent 1px, transparent 2px),
		repeating-linear-gradient(90deg, #001a4d 0px, #001a4d 1px, transparent 1px, transparent 2px);
}

/* Logo styling */
.logo-container {
	text-align: center;
	margin: 20px 0;
	position: relative;
}

.logo-frame {
	display: inline-block;
	border: 3px solid #ff00ff;
	padding: 10px;
	background: #000;
	box-shadow: 
		0 0 10px #ff00ff,
		inset 0 0 10px rgba(255, 0, 255, 0.3),
		4px 4px 0 #000;
	position: relative;
}

.logo-frame::before {
	content: '';
	position: absolute;
	top: -3px;
	left: -3px;
	right: -3px;
	bottom: -3px;
	border: 1px solid #00ffff;
	pointer-events: none;
}

.logo-img {
	width: 120px;
	height: 120px;
	image-rendering: pixelated;
	filter: contrast(1.1) brightness(1.05);
	display: block;
}

.logo-scanline {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: repeating-linear-gradient(
		0deg,
		rgba(0, 255, 255, 0.03) 0px,
		rgba(0, 255, 255, 0.03) 1px,
		transparent 1px,
		transparent 2px
	);
	pointer-events: none;
}

/* Ensure portfolio images stay within window bounds */
.portfolio-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
    width: 100%; /* Ensure gallery doesn't overflow */
}

.portfolio-item {
    border: 2px solid #00ffff;
    padding: 10px;
    background: #000;
    box-shadow: 2px 2px 0 #00ffff;
    transition: all 0.2s;
    /* Remove aspect-ratio from here */
}

/* Add a new wrapper for just the image */
.portfolio-item-image {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    margin-bottom: 8px;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    display: block;
    image-rendering: pixelated;
    cursor: pointer;
    object-fit: cover;
    object-position: center;
    max-width: 100%;
}

.portfolio-item p {
    color: #00ffff;
    font-size: 12px;
    margin-top: 8px;
    text-align: center;
}

.portfolio-item-image a {
    display: block;
    text-decoration: none;
    border: none;
}

.portfolio-item-image a:hover {
    opacity: 0.9;
}
