/* ============================================
   GLOBAL STYLES & VARIABLES
   ============================================ */
:root {
	/* Fonte global em estilo monospace para todo o projeto */
	--e-global-typography-primary-font-family: monospace;
}

* {
	font-family: var(--e-global-typography-primary-font-family) !important;
}

p, span, div, h1, h2, h3, h4, h5, h6, a, button, input, textarea, label {
	font-family: var(--e-global-typography-primary-font-family) !important;
}

/* ============================================
   HOVER EFFECTS
   ============================================ */
/* Hover azul clássico do Windows para elementos com underline */
a[style*="underline"], 
a[class*="underline"], 
[style*="text-decoration: underline"],
[class*="underline"],
.project-title,
.content-block a,
a {
	transition: color 0.2s ease;
}

a[style*="underline"]:hover, 
a[class*="underline"]:hover, 
[style*="text-decoration: underline"]:hover,
[class*="underline"]:hover,
.project-title:hover,
.content-block a:hover,
a:hover {
	color: #0000FF !important;
}

/* ============================================
   BODY & BASE ELEMENTS
   ============================================ */
body {
	color: #ccc;
	font-family: var(--e-global-typography-primary-font-family);
	font-size: 16px;
	background-color: #050505;
	margin: 0px;
	overflow: hidden;
	padding-bottom: 56px;
	/* altura do footer */
}

a {
	color: #41afff;
	text-decoration: underline;
}

canvas {
	display: block;
}

/* ============================================
   HEADER (#head)
   ============================================ */
#head {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100vw;
	height: 50px;
	padding: 2px 8px;
	background-color: #050505;
	background: rgba(0, 0, 0, 0.8);
	color: white;
	z-index: 100;
	gap: 0;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.head-logo {
	position: static;
	width: 36px;
	height: 24px;
	margin: 0 20px 0 8px;
	object-fit: contain;
	z-index: auto;
	pointer-events: auto;
}

.header-row,
#scene-row {
	display: inline-flex;
	align-items: center;
	height: auto;
	min-height: 0;
	padding: 0 8px 0 0;
	gap: 4px;
}

#scene-row {
	margin-left: auto;
}

#head img {
	height: 36px;
	vertical-align: middle;
}

#headRight {
	float: right;
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 4px 8px 0 0;
}

#headRight img {
	padding-bottom: 2px;
}

#head a {
	color: white;
	transition: color 0.2s ease;
}

#head a:hover {
	color: #0000FF;
}

#container {
	position: absolute;
	top: 0;
	left: 0;
}

/* ============================================
   WINDOWS 98 MODAL INTEGRATION
   ============================================ */
.desktop {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	pointer-events: none;
	z-index: 999;
}

.modal-window {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	pointer-events: auto;
	z-index: 1000;
	display: flex;
	width: 46%;
	max-width: 1200px;
	height: 75vh;
}

/* Portfolio Container Styles */
#portfolio-container {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 80%;
	max-width: 1200px;
	height: 80vh;
	border: 2px solid rgba(255, 255, 255, 0.3);
	background: rgba(0, 0, 0, 0.2);
	backdrop-filter: blur(5px);
	z-index: 1000;
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* Sobrescrever content-area para portfolio */
.modal-window .content-area {
	overflow: hidden;
}

/* ============================================
   PORTFOLIO STYLES
   ============================================ */
.portfolio-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-bottom: 10px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.portfolio-title {
	color: white;
	font-size: 28px;
	display: flex;
	align-items: center;
	gap: 1rem;
	font-family: var(--e-global-typography-primary-font-family);
}

.portfolio-title img {
	height: 32px;
	vertical-align: middle;
}

.portfolio-buttons {
	display: flex;
	gap: 15px;
	flex-wrap: wrap;
	justify-content: flex-end;
}

.portfolio-button {
	padding: 4px 8px;
	background: #c0c0c0;
	border: 1px solid;
	border-color: #dfdfdf #808080 #808080 #dfdfdf;
	color: #000;
	cursor: pointer;
	font-family: var(--e-global-typography-primary-font-family);
	font-size: 14px;
	margin: 0 2px;
}

.portfolio-button:hover {
	background: #000;
	color: white;
}

.portfolio-button.active {
	background: #000;
	color: white;
}

.portfolio-content {
	flex: 1;
	overflow-y: auto;
	color: #000;
	padding: 20px;
	background: white;
	font-family: var(--e-global-typography-primary-font-family);
	font-size: 16px;
}

/* Additional Portfolio Styles */
.portfolio-content h2 {
	margin-top: 0;
	color: #000;
	font-size: 32px;
	margin-bottom: 20px;
	font-family: var(--e-global-typography-primary-font-family);
}

/* ============================================
   SECTION CONTENT STYLES
   ============================================ */
.section-content {
	max-width: 800px;
	margin: 0 auto;
}

.sobre-gif {
	display: flex;
	justify-content: center;
	align-items: center;
	margin-bottom: 24px;
}

.sobre-gif img {
	max-width: 820px;
	width: 100%;
	height: auto;
	border-radius: 12px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}

.content-block {
	margin-bottom: 30px;
	text-align: left;
}

.content-block h3 {
	color: #000;
	font-size: 24px;
	margin-bottom: 10px;
	font-family: var(--e-global-typography-primary-font-family);
	background: #c0c0c0;
	border: 2px solid;
	border-color: #dfdfdf #808080 #808080 #dfdfdf;
	padding: 8px;
	text-align: center;
}

.content-block p {
	color: #000;
	line-height: 1.6;
	font-size: 18px;
	margin: 0;
}

.content-block strong {
	font-weight: 800;
	color: #000;
}

.content-block a {
	font-weight: 800;
	color: #000;
	text-decoration: underline;
}

.content-block a:hover {
	color: #0000FF;
	text-decoration: underline;
}

/* ============================================
   PROJECTS GRID
   ============================================ */
.projects-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
}

.project-cell,
.project-cell-center {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	background: #c0c0c0;
	border: 2px solid;
	border-color: #dfdfdf #808080 #808080 #dfdfdf;
	padding: 16px;
	margin-bottom: 0;
}

.project-cell-center {
	grid-column: 1 / span 2;
	justify-self: center;
}

.project-main {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
}

.project-tech {
	align-self: flex-start;
	font-size: 1.1em;
	margin-bottom: 0;
	color: #000;
	font-weight: bold;
}

.project-title {
	font-size: 1.3rem;
	color: #000;
	font-weight: bold;
	text-decoration: underline;
	display: block;
	margin-bottom: 8px;
	word-break: break-word;
}

.project-title:hover {
	color: #0000FF;
	text-decoration: underline;
}

.project-description {
	font-size: 1.1em;
	color: #000;
	line-height: 1.5;
	margin: 0;
	word-break: break-word;
}

.project-col-title {
	font-size: 1.2rem;
	font-weight: bold;
	color: #000;
	margin-bottom: 8px;
	text-align: center;
	letter-spacing: 0.5px;
	background: #c0c0c0;
	border: 2px solid;
	border-color: #dfdfdf #808080 #808080 #dfdfdf;
	padding: 8px;
	font-family: var(--e-global-typography-primary-font-family);
}

/* ============================================
   SKILLS GRID
   ============================================ */
.skills-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: 15px;
	padding: 20px 0;
}

.skill-item {
	background: #c0c0c0;
	border: 2px solid;
	border-color: #dfdfdf #808080 #808080 #dfdfdf;
	padding: 15px;
	text-align: center;
	color: #000;
	font-family: var(--e-global-typography-primary-font-family);
	font-weight: bold;
}

.skill-item:hover {
	background: #000;
	color: white;
}

/* ============================================
   CONTACT FORM
   ============================================ */
.contact-form {
	display: flex;
	flex-direction: column;
	gap: 15px;
	max-width: 500px;
	margin: 0 auto;
}

.contact-form input,
.contact-form textarea {
	padding: 10px;
	background: white;
	border: 2px solid;
	border-color: #808080 #dfdfdf #dfdfdf #808080;
	color: #000;
	font-size: 16px;
	font-family: var(--e-global-typography-primary-font-family);
}

.contact-form textarea {
	min-height: 150px;
	resize: vertical;
}

.contact-form button {
	padding: 10px 20px;
	background: #c0c0c0;
	border: 2px solid;
	border-color: #dfdfdf #808080 #808080 #dfdfdf;
	color: #000;
	font-size: 16px;
	font-family: var(--e-global-typography-primary-font-family);
	font-weight: bold;
	cursor: pointer;
}

.contact-form button:hover {
	background: #000;
	color: white;
}

#form-status {
	margin-top: 15px;
	padding: 10px;
	border-radius: 5px;
	text-align: center;
	display: none;
}

#form-status.status-sending {
	display: block;
	background: #c0c0c0;
	border: 2px solid;
	border-color: #dfdfdf #808080 #808080 #dfdfdf;
	color: #000;
	padding: 10px;
	font-size: 16px;
	font-family: var(--e-global-typography-primary-font-family);
}

#form-status.status-success {
	display: block;
	background: #c0c0c0;
	border: 2px solid;
	border-color: #dfdfdf #808080 #808080 #dfdfdf;
	color: #000;
	padding: 10px;
	font-size: 16px;
	font-family: var(--e-global-typography-primary-font-family);
}

#form-status.status-error {
	display: block;
	background: #c0c0c0;
	border: 2px solid;
	border-color: #dfdfdf #808080 #808080 #dfdfdf;
	color: #000;
	padding: 10px;
	font-size: 16px;
	font-family: var(--e-global-typography-primary-font-family);
}

.portfolio-button.active {
	background: rgba(255, 255, 255, 0.3);
	border-color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   MOBILE RESPONSIVE (max-width: 700px)
   ============================================ */
@media (max-width: 700px) {
	.sobre-gif {
		display: none !important;
	}

	/* Desktop do modal ocupa a tela inteira, mas deixa espaço para o header */
	.desktop {
		position: fixed;
		top: 105px;
		left: 0;
		width: 100vw;
		height: 80vh;
		display: flex;
		align-items: flex-start;
		justify-content: center;
		padding-top: 90px; /* espaço para o header mobile */
		box-sizing: border-box;
	}

	/* Janela do portfolio responsiva em mobile */
	.modal-window {
		position: relative;
		top: 0;
		left: 0;
		transform: none;
		width: calc(100vw - 24px);
		max-width: 100%;
		/* Usa a altura disponível do "desktop" mobile sem estourar a tela */
		height: 100%;
		max-height: 100%;
		margin: 0 12px;
	}

	/* Em mobile não mostra controle de maximizar nem handle de resize */
	.control-button.maximize {
		display: none;
	}

	.resize-handle {
		display: none;
	}

	/* Área interna com scroll usando bem o espaço vertical */
	.modal-window .content-area {
		flex: 1;
		min-height: 0;
	}

	.projects-grid {
		display: grid;
		grid-template-columns: 1fr !important;
		padding: 0;
	}

	.project-col-title {
		display: none !important;
	}

	.project-cell,
	.project-cell-center {
		grid-column: auto !important;
		width: 100% !important;
		max-width: 100% !important;
		box-sizing: border-box;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}

	.section-content>h2 {
		display: block;
		text-align: center;
		margin-bottom: 18px;
	}

	.portfolio-title {
		display: none !important;
	}

	.portfolio-buttons {
		display: grid !important;
		grid-template-columns: 1fr 1fr;
		grid-template-rows: repeat(2, auto);
		gap: 10px;
		width: 100%;
		justify-items: stretch;
	}

	.portfolio-button {
		width: 100%;
		min-width: 0;
		box-sizing: border-box;
		margin: 0;
	}

	/* Header mobile */
	#head {
		display: grid !important;
		grid-template-columns: 1fr 2fr 1fr;
		grid-template-rows: repeat(5, 24px);
		align-items: center;
		justify-items: center;
		gap: 0;
		padding: 8px 0;
		height: auto;
		position: relative;
		background-color: #050505;
		background: rgba(0, 0, 0, 0.8);
		color: white;
		z-index: 100;
	}

	.head-logo {
		position: absolute;
		top: 38%;
		transform: translateY(-50%);
		width: min(18vw, 80px);
		height: min(18vw, 80px);
		max-width: 80px;
		max-height: 80px;
		min-width: 40px;
		min-height: 40px;
		object-fit: contain;
		z-index: 1;
		pointer-events: none;
		margin: 0;
	}

	.head-logo.left {
		left: max(4vw, 16px);
	}

	.head-logo.right {
		right: max(4vw, 16px);
	}

	.header-row {
		grid-column: 2;
		width: 100%;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: center;
		gap: 6px;
		height: 24px;
		min-height: 0;
		padding: 0;
	}

	.header-row:nth-of-type(1) {
		grid-row: 1;
	}

	.header-row:nth-of-type(2) {
		grid-row: 2;
	}

	.header-row:nth-of-type(3) {
		grid-row: 3;
	}

	.header-row:nth-of-type(4) {
		grid-row: 4;
	}

	.header-row:nth-of-type(5) {
		grid-row: 5;
	}

	.header-row#scene-row {
		grid-row: 4;
		margin-top: 1rem;
	}

	.header-label {
		font-size: 0.95em;
		white-space: nowrap;
	}

	#head a {
		display: inline-block;
		width: auto;
		min-width: 0;
		text-align: left;
		margin: 0;
		padding: 2px 0;
		font-size: 0.95em;
		line-height: 1.1;
	}

	#sceneSelect {
		font-size: 0.92em;
		padding: 0 2px;
		height: 18px;
		min-width: 60px;
		max-width: 125px;
		margin-left: 2px;
		margin-right: 0;
		border-radius: 3px;
		border: 1px solid #444;
		background: #222;
		color: #fff;
		box-sizing: border-box;
	}

	#scene-row {
		justify-content: flex-end;
		height: 40px;
		margin-left: 0;
	}

	#headRight {
		display: none !important;
	}
}

