:root {
	--bg-color: #000000;
	--text-main: #ffffff;
	--text-muted: #aaaaaa;
	--accent-red: #8b1e2f;
	--accent-red-hover: #a62438;
	--card-bg: #121212;
	--card-border: #2c2c2c;
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	background: var(--bg-color) url('images/background.png') no-repeat center top;
	background-size: cover;
	font-family: 'Inter', sans-serif;
	color: var(--text-main);
	line-height: 1.6;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	align-items: center;
	padding: 0 20px;
}

/* 1. The Navbar Container: Defined as a strict 3-column structural layout */
.main-navbar {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto 0 auto;
    padding: 0 20px;
    background: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    height: 70px;
    
    /* The Magic Setup: Left and Right slots take up equal fraction space (1fr). 
       The Middle slot takes up only as much room as the text links need (auto). */
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

/* 2. Column 1: Left-aligned logo block */
.nav-brand {
    grid-column: 1;
    justify-self: start;
    display: flex;
    align-items: center;
}

.nav-brand img {
    height: 58px;
    width: auto;
}

/* 3. Column 2: This column is mathematically locked to the absolute center of the 1000px bar */
.nav-links {
    grid-column: 2;
    display: flex;
    gap: 35px;
    /* Cleaned up: No more margins or translateX offsets needed! */
}

.nav-links a {
    display: inline-block;
    text-decoration: none;
    color: #999;
    font-size: 1rem;
    font-weight: 500;
    padding-bottom: 6px;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #fff;
}

.nav-links a.active {
    color: #fff;
    border-bottom: 3px solid #2ecc71;
}

/* Responsive clean override for smaller monitors */
@media (max-width: 768px) {
    .nav-links {
        transform: none;
        margin: 0 0 0 auto; /* Right aligns links cleanly on tiny viewport screens */
    }
}
main {
	width: 100%;
	max-width: 1000px;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	flex-grow: 1;
	padding-bottom: 60px;
	background: rgba(0,0,0,.7);	
}

.logo {
	margin: 40px 0;
}

img {
	max-width: 100%;
	height: auto;
}

h1 {
	font-size: 40px;
	font-weight: 700;
	margin-bottom: 15px;
	letter-spacing: -0.5px;
}

h2 {
	font-size: 40px;
	font-weight: 700;
	margin-bottom: 15px;
	letter-spacing: -0.5px;
}

.hero-description {
	color: var(--text-muted);
	font-size: 18px;
	max-width: 700px;
	margin-bottom: 35px;
	font-weight: 300;
}

/* Container sizing */
.contact-container {
	max-width: 800px;
	margin: 40px auto;
	padding: 0 15px;
}

/* The Glassmorphism Form Panel */
.contact-form {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	background: rgba(255, 255, 255, 0.03);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	padding: 40px;
}

/* Form Groups Layout placement */
.title-group    { grid-column: 1 / 2; }
.message-group  { grid-column: 1 / 2; grid-row: 2 / 5; }
.name-group     { grid-column: 2 / 3; }
.email-group    { grid-column: 2 / 3; }
.subject-group  { grid-column: 2 / 3; }
.captcha-group  { grid-column: 2 / 3; }
.submit-group   { grid-column: 1 / 3; text-align: right; }

/* Input Styling */
.form-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.form-group label {
	color: #ccc;
	font-size: 0.9rem;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.form-group input, 
.form-group textarea {
	background: rgba(0, 0, 0, 0.4);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 6px;
	padding: 12px;
	color: #fff;
	font-family: inherit;
	font-size: 1rem;
	transition: all 0.3s ease;
}

/* Focus State Glow */
.form-group input:focus, 
.form-group textarea:focus {
	outline: none;
	border-color: #2ecc71; /* Matches your active nav link green */
	box-shadow: 0 0 10px rgba(46, 204, 113, 0.2);
}

/* Textarea specific */
.form-group textarea {
	resize: vertical;
	height: 100%;
	min-height: 180px;
}

/* Captcha Box Wrapper */
.captcha-placeholder {
	background: rgba(46, 204, 113, 0.05);
	border: 1px dashed rgba(46, 204, 113, 0.3);
	border-radius: 6px;
	padding: 15px;
	display: flex;
	align-items: center;
	color: #2ecc71;
}

.captcha-placeholder input {
	margin-right: 10px;
	accent-color: #2ecc71;
}

/* Cyberpunk Submit Button */
.submit-btn {
	background: #2ecc71;
	color: #111;
	border: none;
	border-radius: 6px;
	padding: 12px 35px;
	font-size: 1rem;
	font-weight: bold;
	text-transform: uppercase;
	letter-spacing: 1px;
	cursor: pointer;
	transition: all 0.3s ease;
}

.submit-btn:hover {
	background: #27ae60;
	box-shadow: 0 0 15px rgba(46, 204, 113, 0.4);
	transform: translateY(-2px);
}

.form-status {
	padding: 15px;
	margin-bottom: 20px;
	border-radius: 6px;
	font-weight: bold;
	text-align: center;
}
.form-status.success {
	background: rgba(46, 204, 113, 0.15);
	border: 1px solid #2ecc71;
	color: #2ecc71;
}
.form-status.error {
	background: rgba(231, 76, 60, 0.15);
	border: 1px solid #e74c3c;
	color: #e74c3c;
}

/* Responsive collapse for tablets/phones */
@media (max-width: 768px) {
	.contact-form {
		grid-template-columns: 1fr;
	}
	.title-group, .name-group, .message-group, .email-group, .subject-group, .captcha-group, .submit-group {
		grid-column: 1 / -1;
	}
}

/* Container padding and boundaries */
.portfolio-container {
	max-width: 1000px;
	margin: 40px auto;
	padding: 0 15px;
	display: flex;
	flex-direction: column;
	gap: 25px; /* Creates the even gaps between rows */
}

/* The Glassmorphic Portfolio Row Card */
.portfolio-row-card {
	display: grid;
	grid-template-columns: 220px 1fr 200px;
	gap: 25px;
	background: rgba(255, 255, 255, 0.03);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	padding: 25px;
	align-items: center;
	transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Image Wrapper Box */
.project-image-wrapper {
	width: 100%;
	aspect-ratio: 16 / 10;
	background: rgba(0, 0, 0, 0.4);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 8px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.project-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Center Details Area */
.project-details {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.project-header {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	border-bottom: 1px solid rgba(255, 255, 255, 0.15);
	padding-bottom: 8px;
}

.project-title {
	margin: 0;
	font-size: 1.4rem;
	color: #fff;
	font-weight: 600;
}

.project-meta {
	font-family: monospace;
	font-size: 0.9rem;
	color: #888;
}

.project-version {
	margin-right: 15px;
	color: #2ecc71; /* Accent coloring matching your theme */
}

.project-description {
	margin: 0;
	color: #ccc;
	font-size: 0.95rem;
	line-height: 1.5;
}

/* Action/Download Column */
.project-actions {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* Styled Modern Download Controls */
.download-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	background: rgba(0, 0, 0, 0.6);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 6px;
	padding: 12px;
	color: #fff;
	text-decoration: none;
	font-size: 0.85rem;
	font-weight: bold;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	transition: all 0.2s ease;
}

.download-btn:hover {
	background: #fff;
	color: #111;
	border-color: #fff;
	box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.download-btn .btn-icon {
	font-size: 1.1rem;
}

/* Responsive Overrides (Collapse elegantly to vertical stack on tablets/phones) */
@media (max-width: 850px) {
	.portfolio-row-card {
		grid-template-columns: 1fr;
		gap: 20px;
		padding: 20px;
	}
	
	.project-image-wrapper {
		max-width: 350px;
		margin: 0 auto;
	}
	
	.project-header {
		flex-direction: column;
		gap: 5px;
	}
	
	.project-actions {
		flex-direction: row;
	}
	
	.download-btn {
		flex: 1;
	}
}

@media (max-width: 500px) {
	.project-actions {
		flex-direction: column;
	}
}

/* --- Call to Action Button --- */
.cta-btn {
	background-color: var(--accent-red);
	color: var(--text-main);
	text-decoration: none;
	padding: 14px 36px;
	font-weight: 600;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 2px;
	border-radius: 4px;
	border: 1px solid rgba(255,255,255,0.1);
	transition: background-color 0.3s, transform 0.2s;
	box-shadow: 0 4px 15px rgba(139, 30, 47, 0.2);
	margin-bottom: 60px;
}

.cta-btn:hover {
	background-color: var(--accent-red-hover);
	transform: translateY(-1px);
}

/* --- Portfolio Grid (Replacing old layout tables) --- */
.portfolio-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 15px;
	width: 100%;
	margin-bottom: 30px;
	padding: 0 15px;
	box-sizing: border-box;
}

.portfolio-card {
	background-color: var(--card-bg);
	border: 1px solid var(--card-border);
	border-radius: 8px;
	aspect-ratio: 16 / 10; /* Keeps boxes beautifully proportioned */
	display: flex;
	align-items: center;
	justify-content: center;
	color: #444444;
	font-size: 14px;
	font-weight: 600;
	transition: border-color 0.3s;
}

.portfolio-card:hover {
	border-color: #555555;
}

.grid-caption {
	color: var(--text-muted);
	font-size: 14px;
	font-weight: 300;
	max-width: 800px;
}

/* Container boundary */
.about-container {
	max-width: 950px;
	margin: 40px auto;
	padding: 0 15px;
}

/* The About Glass Panel */
.about-card {
	display: grid;
	grid-template-columns: 1.2fr 0.8fr;
	gap: 40px;
	background: rgba(255, 255, 255, 0.03);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	padding: 40px;
	align-items: center; /* Vertically centers text next to the image */
}

/* Left Content Styles */
.about-content h2 {
	color: #fff;
	font-size: 1.8rem;
	margin-top: 0;
	margin-bottom: 20px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.15);
	padding-bottom: 10px;
}

.about-content p {
	color: #ccc;
	font-size: 1rem;
	line-height: 1.6;
	margin-bottom: 15px;
}

.about-content p:last-child {
	margin-bottom: 0;
}

/* Right Image Framing */
.about-image-wrapper {
	width: 100%;
	aspect-ratio: 1 / 1; /* Keeps it a perfect square matching your sketch */
	background: rgba(0, 0, 0, 0.4);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 8px;
	overflow: hidden;
}

.about-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Mobile responsive collapse */
@media (max-width: 768px) {
	.about-card {
		grid-template-columns: 1fr;
		gap: 30px;
		padding: 25px;
	}
	
	.about-image-wrapper {
		max-width: 300px;
		margin: 0 auto;
		grid-row: 1; /* Moves the image to the top on mobile screens for better flow */
	}
}

/* --- Footer --- */
footer {
	width: 100%;
	max-width: 1000px;
	border-top: 1px solid #FFFFFF;
	padding: 15px 0;
	text-align: center;
	font-size: 12px;
	color: #555555;
	background: #272727;	
}

.back-to-top {
	display: block;
	color: var(--text-muted);
	text-decoration: none;
	margin-bottom: 10px;
	font-size: 14px;
}

/* --- Responsiveness (Goodbye Mobile Web Layout Worries) --- */
@media (max-width: 768px) {
	.portfolio-grid {
		grid-template-columns: 1fr; /* Stack vertically on mobile devices */
	}
	h1 {
		font-size: 28px;
	}
	.hero-description {
		font-size: 16px;
	}
}