/* --- Variables --- */
:root {
	--primary-color: #5B8FB9; /* Muted Blue */
	--secondary-color: #A2D2FF; /* Lighter Blue */
	--accent-color: #B19CD9; /* Lavender/Purple */
	--text-color: #333;
	--light-text-color: #f4f4f4;
	--background-color: #F8F9FA; /* Off-white / light grey */
	--card-background: #FFFFFF;
	--footer-bg: #2B2D42; /* Darker Blue-Grey */
	--border-color: #E0E0E0;
	--shadow-light: rgba(0, 0, 0, 0.05);
	--shadow-medium: rgba(0, 0, 0, 0.15);
	--spacing-unit: 1.5rem;

	/* For rgba shadows with variable */
	--primary-color-rgb: 91, 143, 185;
}

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

html {
	scroll-behavior: smooth;
}

body {
	font-family: 'Inter', sans-serif;
	line-height: 1.7;
	color: var(--text-color);
	background-color: var(--background-color);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 var(--spacing-unit);
}

a {
	text-decoration: none;
	color: var(--primary-color);
	transition: color 0.3s ease;
}

a:hover {
	color: var(--accent-color);
}

h1, h2, h3 {
	font-family: 'Poppins', sans-serif;
	color: var(--text-color);
	margin-bottom: 0.8rem;
	line-height: 1.2;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.6rem; }

p {
	margin-bottom: 1rem;
}

/* Screen Reader Only */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* --- Navbar --- */
.navbar {
	background-color: var(--card-background);
	padding: 1rem 0;
	box-shadow: 0 2px 10px var(--shadow-light);
	position: sticky;
	top: 0;
	z-index: 1000;
}

.navbar .container {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.navbar .logo {
	font-family: 'Poppins', sans-serif;
	font-size: 1.8rem;
	font-weight: 700;
	color: var(--primary-color);
	transition: color 0.3s ease;
}

.navbar .logo:hover {
	color: var(--accent-color);
}

.nav-links {
	list-style: none;
	display: flex;
	gap: 1.5rem;
}

.nav-links li a {
	color: var(--text-color);
	font-weight: 500;
	position: relative;
	padding-bottom: 0.2rem;
}

.nav-links li a::after {
	content: '';
	position: absolute;
	width: 0;
	height: 2px;
	display: block;
	margin-top: 5px;
	left: 0; /* Changed from right to left for modern underline effect */
	background: var(--primary-color);
	transition: width 0.3s ease;
}

.nav-links li a:hover::after {
	width: 100%;
}

.nav-toggle {
	display: none; /* Hidden on desktop */
	background: none;
	border: none;
	cursor: pointer;
	padding: 0.5rem;
	position: relative;
	z-index: 1001;
}

.nav-toggle .hamburger {
	display: block;
	width: 25px;
	height: 3px;
	background-color: var(--text-color);
	margin: 5px 0;
	transition: all 0.3s ease;
}

/* Mobile Nav Open State */
.nav-toggle.active .hamburger:nth-child(1) {
	transform: translateY(8px) rotate(45deg);
}
.nav-toggle.active .hamburger:nth-child(2) {
	opacity: 0;
}
.nav-toggle.active .hamburger:nth-child(3) {
	transform: translateY(-8px) rotate(-45deg);
}

/* --- Navbar adjustments for the new element --- */
.navbar .container {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.logo-group { /* Styles for the new logo wrapper */
	display: flex;
	align-items: center;
	gap: 1rem; /* Space between logo text and the animation element */
}

/* Container for the circle and text */
.shining-black-hole-animation {
	display: flex; /* Use flexbox to align circle and text side-by-side */
	align-items: center; /* Vertically center them */
	gap: 0.5rem; /* Space between the circle and the text */
	/* No background/border on this container itself, it just holds the two parts */
}

/* --- The actual animating circle --- */
.black-hole-circle {
	width: 20px; /* Size of the circle */
	height: 20px;
	border-radius: 50%; /* Makes it a perfect circle */
	background-color: black; /* Initial color: black */
	transition: background-color 0.5s ease-in-out, box-shadow 0.5s ease-in-out; /* Smooth transition for non-animation properties */

	/* Animation properties for the circle */
	animation: circleColorPulse 8s infinite ease-in-out; /* 8s duration, infinite, smooth */
	box-shadow: 0 0 5px rgba(0, 0, 0, 0.4); /* Initial subtle shadow for black hole */
}

/* --- The static text part --- */
.black-hole-text {
	color: var(--text-color); /* Matches surrounding text for readability */
	font-family: 'Inter', sans-serif;
	font-size: 0.9rem; /* Slightly smaller than the logo */
	font-weight: 500;
	white-space: nowrap; /* Prevent text from wrapping */
}


/* --- Animation Keyframes for the circle --- */
@keyframes circleColorPulse {
	0% {
		background-color: black;
		box-shadow: 0 0 5px rgba(0, 0, 0, 0.4); /* Subtle shadow for black hole */
	}
	20% {
		background-color: var(--primary-color); /* Muted Blue */
		box-shadow: 0 0 15px rgba(var(--primary-color-rgb), 0.7); /* Stronger glow */
	}
	40% {
		background-color: var(--secondary-color); /* Lighter Blue */
		box-shadow: 0 0 20px rgba(var(--primary-color-rgb), 0.8);
	}
	60% {
		background-color: var(--accent-color); /* Lavender/Purple */
		box-shadow: 0 0 15px rgba(var(--primary-color-rgb), 0.7);
	}
	80% {
		background-color: var(--primary-color); /* Muted Blue */
		box-shadow: 0 0 10px rgba(var(--primary-color-rgb), 0.6);
	}
	100% {
		background-color: black; /* Back to black */
		box-shadow: 0 0 5px rgba(0, 0, 0, 0.4);
	}
}

/* --- Responsive adjustments for the new element --- */
@media (max-width: 768px) {
	.logo-group {
		gap: 0.5rem; /* Reduce gap on smaller screens */
	}
	.black-hole-circle {
		width: 16px; /* Make circle smaller */
		height: 16px;
	}
	.black-hole-text {
		font-size: 0.8rem; /* Make text smaller */
	}
}

@media (max-width: 550px) { /* Adjust based on your logo and screen size */
	.shining-black-hole-animation {
		display: none; /* Hide animation (circle + text) on very small screens to save space */
	}
}

/* --- Hero Section --- */
.hero {
	background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
	color: var(--light-text-color);
	padding: 5rem 0 3rem;
	text-align: center;
	position: relative;
	overflow: hidden;
}

.profile-img {
	width: 180px;
	height: 180px;
	border-radius: 50%;
	object-fit: cover;
	border: 6px solid var(--light-text-color);
	box-shadow: 0 8px 20px var(--shadow-medium);
	margin-bottom: 1.5rem;
	transition: transform 0.3s ease-in-out;
}

.profile-img:hover {
	transform: scale(1.05) rotate(2deg);
}

.hero h1 {
	color: var(--light-text-color);
	font-size: 3.5rem;
	margin-top: 1rem;
	margin-bottom: 0.5rem;
}

.tagline {
	font-size: 1.4rem;
	opacity: 0.9;
	max-width: 700px;
	margin: 0 auto 2rem;
}

.social-links {
	margin-top: 2rem;
	margin-bottom: 2rem;
}

.social-links a {
	color: var(--light-text-color);
	font-size: 1.8rem;
	margin: 0 1rem;
	display: inline-block;
	transition: transform 0.2s ease-out, color 0.3s ease;
}

.social-links a:hover {
	transform: translateY(-5px) scale(1.1);
	color: var(--accent-color);
}

/* --- Buttons --- */
.btn {
	display: inline-flex; /* Use flex for icon alignment */
	align-items: center;
	justify-content: center;
	padding: 0.9rem 2rem;
	border-radius: 50px; /* Pill shape */
	font-weight: 600;
	text-align: center;
	transition: all 0.3s ease;
	cursor: pointer;
	font-size: 1rem;
	border: none;
	gap: 0.5rem; /* Space between text and icon */
}

.btn-primary {
	background-color: var(--accent-color);
	color: white;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
	background-color: var(--primary-color);
	transform: translateY(-3px);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.btn-secondary {
	background-color: transparent;
	color: var(--primary-color);
	border: 2px solid var(--primary-color);
	padding: calc(0.9rem - 2px) calc(2rem - 2px); /* Adjust padding for border */
}

.btn-secondary:hover {
	background-color: var(--primary-color);
	color: white;
	transform: translateY(-2px);
	box-shadow: 0 4px 10px var(--shadow-light);
}

.scroll-down {
	margin-top: 2rem;
	animation: bounce 2s infinite;
}

@keyframes bounce {
	0%, 20%, 50%, 80%, 100% {
		transform: translateY(0);
	}
	40% {
		transform: translateY(-10px);
	}
	60% {
		transform: translateY(-5px);
	}
}

/* --- Main Content Sections --- */
main {
	padding: 3rem 0;
}

.section-card {
	background: var(--card-background);
	padding: 3rem;
	margin-bottom: var(--spacing-unit);
	border-radius: 12px;
	box-shadow: 0 6px 20px var(--shadow-light);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 30px var(--shadow-medium);
}

.section-title {
	color: var(--primary-color);
	margin-bottom: 2rem;
	position: relative;
	padding-bottom: 0.5rem;
	text-align: center;
}

.section-title::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 60px;
	height: 4px;
	background-color: var(--accent-color);
	border-radius: 2px;
}

/* --- Skills Section --- */
.skills-title {
	margin-top: 2rem; /* Add some space between About text and Skills title */
}

.skills-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 0.8rem;
	margin-top: 1rem;
	justify-content: center; /* Center align skill tags */
}

.skill-tag {
	background: var(--background-color);
	color: var(--text-color);
	padding: 0.6rem 1.2rem;
	border-radius: 50px;
	font-size: 0.95rem;
	font-weight: 500;
	transition: all 0.3s ease;
	border: 1px solid var(--border-color);
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.skill-tag:hover {
	background: var(--primary-color);
	color: white;
	transform: translateY(-3px);
	box-shadow: 0 4px 10px var(--shadow-light);
}

/* --- Projects Section --- */
.projects-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 2rem;
	margin-top: 2rem;
}

.project-card {
	border: 1px solid var(--border-color);
	border-radius: 12px;
	overflow: hidden;
	background-color: var(--card-background);
	box-shadow: 0 4px 15px var(--shadow-light);
	display: flex;
	flex-direction: column; /* Allows content to push button to bottom */
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 15px 30px var(--shadow-medium);
}

.project-img {
	width: 100%;
	height: 200px;
	object-fit: cover;
	display: block;
	border-bottom: 1px solid var(--border-color);
}

.project-info {
	padding: 1.5rem;
	flex-grow: 1; /* Allows info section to expand and push button down */
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.project-info .btn {
	margin-top: auto; /* Pushes the button to the bottom */
}

.project-title {
	font-size: 1.35rem;
	margin-bottom: 0.7rem;
	color: var(--text-color);
}

.project-info p {
	font-size: 0.95rem;
	color: #666;
	margin-bottom: 1.2rem;
}

/* --- Contact Section --- */
.contact-intro {
	text-align: center;
	max-width: 600px;
	margin: 0 auto 2rem;
	font-size: 1.1rem;
	color: #555;
}

.contact-form {
	display: grid;
	gap: 1.2rem;
	max-width: 600px;
	margin: 0 auto;
}

.form-group {
	margin-bottom: 0.5rem;
}

input[type="text"],
input[type="email"],
textarea {
	width: 100%;
	padding: 1rem 1.2rem;
	border: 1px solid var(--border-color);
	border-radius: 8px;
	font-family: 'Inter', sans-serif;
	font-size: 1rem;
	color: var(--text-color);
	background-color: var(--background-color);
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
	border-color: var(--primary-color);
	box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.2);
	outline: none;
}

textarea {
	min-height: 160px;
	resize: vertical; /* Allow vertical resizing */
}

.btn-full-width {
	width: 100%;
	margin-top: 1rem;
	padding: 1rem;
}

/* --- Footer --- */
footer {
	background-color: var(--footer-bg);
	color: var(--light-text-color);
	text-align: center;
	padding: 3rem 0;
	margin-top: 4rem;
	font-size: 0.9rem;
}

footer .container {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
}

.footer-social-links {
	margin-top: 1rem;
}

.footer-social-links a {
	color: var(--light-text-color);
	font-size: 1.5rem;
	margin: 0 0.8rem;
	transition: color 0.3s ease, transform 0.2s ease;
}

.footer-social-links a:hover {
	color: var(--accent-color);
	transform: translateY(-3px);
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
	.hero h1 {
		font-size: 3rem;
	}
	.tagline {
		font-size: 1.2rem;
	}
	.section-card {
		padding: 2.5rem;
	}
	.projects-grid {
		grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	}
}

@media (max-width: 768px) {
	.navbar .container {
		flex-wrap: wrap;
		position: relative; /* For absolute positioning of nav-links */
	}
	.nav-links {
		display: none; /* Hidden by default on mobile */
		flex-direction: column;
		width: calc(100% - 3rem); /* Full width minus container padding */
		text-align: center;
		background-color: var(--card-background);
		box-shadow: 0 5px 15px var(--shadow-light);
		padding: 1rem 0;
		margin-top: 1rem;
		border-radius: 8px;
		position: absolute; /* Positioned relative to .navbar .container */
		top: calc(100% + 10px); /* Position below navbar */
		left: 1.5rem; /* Align with container padding */
	}
	.nav-links.active {
		display: flex; /* Show when active */
	}
	.nav-links li {
		margin: 0.5rem 0;
	}
	.nav-links li a::after {
		left: 50%;
		transform: translateX(-50%);
	}
	.nav-toggle {
		display: block; /* Show hamburger on mobile */
	}

	.hero {
		padding: 4rem 0 2rem;
	}
	.hero h1 {
		font-size: 2.5rem;
	}
	.tagline {
		font-size: 1.1rem;
	}
	.profile-img {
		width: 150px;
		height: 150px;
	}
	.social-links a {
		font-size: 1.5rem;
		margin: 0 0.6rem;
	}
	.section-card {
		padding: 2rem;
	}
	h2 {
		font-size: 2rem;
	}
	.skills-grid {
		justify-content: center;
	}
	.projects-grid {
		grid-template-columns: 1fr; /* Stack projects on small screens */
	}
	.project-img {
		height: 180px;
	}
	.contact-form {
		padding: 0; /* Remove extra padding for forms */
	}
}

@media (max-width: 480px) {
	h1 {
		font-size: 2rem;
	}
	h2 {
		font-size: 1.8rem;
	}
	.tagline {
		font-size: 1rem;
	}
	.section-card {
		padding: 1.5rem;
	}
	.skill-tag {
		font-size: 0.85rem;
		padding: 0.5rem 1rem;
	}
	.btn {
		padding: 0.8rem 1.5rem;
		font-size: 0.9rem;
	}
}