@import url(fontawesome-all.min.css);
@import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro:300italic,600italic,300,600");

/*
	Dimension by HTML5 UP
	html5up.net | @ajlkn
	Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
*/

html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
contact-me,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}

article,
aside,
contact-me,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
	display: block;
}

body {
	line-height: 1;
}

ol,
ul {
	list-style: none;
}

blockquote,
q {
	quotes: none;
}

blockquote:before,
blockquote:after,
q:before,
q:after {
	content: '';
	content: none;
}

table {
	border-collapse: collapse;
	border-spacing: 0;
}

body {
	-webkit-text-size-adjust: none;
}

mark {
	background-color: transparent;
	color: inherit;
}

input::-moz-focus-inner {
	border: 0;
	padding: 0;
}

input,
select,
textarea {
	-moz-appearance: none;
	-webkit-appearance: none;
	-ms-appearance: none;
	appearance: none;
}

/* Basic */



@-ms-viewport {
	width: device-width;
}

@media screen and (max-width: 480px) {

	html,
	body {
		min-width: 320px;
	}

}

html {
	box-sizing: border-box;
}

*,
*:before,
*:after {
	box-sizing: inherit;
}

body {
	background: #1b1f22;
}

body.is-preload *,
body.is-preload *:before,
body.is-preload *:after {
	-moz-animation: none !important;
	-webkit-animation: none !important;
	-ms-animation: none !important;
	animation: none !important;
	-moz-transition: none !important;
	-webkit-transition: none !important;
	-ms-transition: none !important;
	transition: none !important;
}

/* Type */

html {
	font-size: 16pt;
}

@media screen and (max-width: 1680px) {

	html {
		font-size: 12pt;
	}

}

@media screen and (max-width: 736px) {

	html {
		font-size: 11pt;
	}

}

@media screen and (max-width: 360px) {

	html {
		font-size: 10pt;
	}

}

body,
input,
select,
textarea {
	color: #ffffff;
	font-family: "Source Sans Pro", sans-serif;
	font-weight: 300;
	font-size: 1rem;
	line-height: 1.65;
}

a {
	-moz-transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out, border-bottom-color 0.2s ease-in-out;
	-webkit-transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out, border-bottom-color 0.2s ease-in-out;
	-ms-transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out, border-bottom-color 0.2s ease-in-out;
	transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out, border-bottom-color 0.2s ease-in-out;
	border-bottom: dotted 1px rgba(255, 255, 255, 0.5);
	text-decoration: none;
	color: inherit;
}

a:hover {
	border-bottom-color: transparent;
}

strong,
b {
	color: #ffffff;
	font-weight: 600;
}

em,
i {
	font-style: italic;
}

p {
	margin: 0 0 2rem 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	color: #ffffff;
	font-weight: 600;
	line-height: 1.5;
	margin: 0 0 1rem 0;
	text-transform: uppercase;
	letter-spacing: 0.2rem;
}

h1 a,
h2 a,
h3 a,
h4 a,
h5 a,
h6 a {
	color: inherit;
	text-decoration: none;
}

h1.major,
h2.major,
h3.major,
h4.major,
h5.major,
h6.major {
	border-bottom: solid 1px #ffffff;
	width: -moz-max-content;
	width: -webkit-max-content;
	width: -ms-max-content;
	width: max-content;
	padding-bottom: 0.5rem;
	margin: 0 0 2rem 0;
}

h1 {
	font-size: 2.25rem;
	line-height: 1.3;
	letter-spacing: 0.5rem;
}

h2 {
	font-size: 1.5rem;
	line-height: 1.4;
	letter-spacing: 0.5rem;
}

h3 {
	font-size: 1rem;
}

h4 {
	font-size: 0.8rem;
}

h5 {
	font-size: 0.7rem;
}

h6 {
	font-size: 0.6rem;
}

@media screen and (max-width: 736px) {

	h1 {
		font-size: 1.75rem;
		line-height: 1.4;
	}

	h2 {
		font-size: 1.25em;
		line-height: 1.5;
	}

}

sub {
	font-size: 0.8rem;
	position: relative;
	top: 0.5rem;
}

sup {
	font-size: 0.8rem;
	position: relative;
	top: -0.5rem;
}

blockquote {
	border-left: solid 4px #ffffff;
	font-style: italic;
	margin: 0 0 2rem 0;
	padding: 0.5rem 0 0.5rem 2rem;
}

code {
	background: rgba(255, 255, 255, 0.075);
	border-radius: 4px;
	font-family: "Courier New", monospace;
	font-size: 0.9rem;
	margin: 0 0.25rem;
	padding: 0.25rem 0.65rem;
}

pre {
	-webkit-overflow-scrolling: touch;
	font-family: "Courier New", monospace;
	font-size: 0.9rem;
	margin: 0 0 2rem 0;
}

pre code {
	display: block;
	line-height: 1.75;
	padding: 1rem 1.5rem;
	overflow-x: auto;
}

hr {
	border: 0;
	border-bottom: solid 1px #ffffff;
	margin: 2.75rem 0;
}

.align-left {
	text-align: left;
}

.align-center {
	text-align: center;
}

.align-right {
	text-align: right;
}

/* Skill list*/
.skills-list {
    display: flex;
    flex-wrap: wrap;
    list-style-type: disc;  /* Restores bullet points */
    padding-left: 20px;     /* Adjusts bullet indentation */
    margin: 0;
    gap: 20px;              /* Adds space between items */
  }
  
  .skills-list li {
    flex: 0 1 calc(25% - 20px);
    margin-bottom: 10px;
    font-size: 1.1rem;  /* Slightly larger font size */
  }

  h3 {
    margin-top: 20px;
  }

/* Form */

form {
	margin: 0 0 2rem 0;
}

form> :last-child {
	margin-bottom: 0;
}

form>.fields {
	display: -moz-flex;
	display: -webkit-flex;
	display: -ms-flex;
	display: flex;
	-moz-flex-wrap: wrap;
	-webkit-flex-wrap: wrap;
	-ms-flex-wrap: wrap;
	flex-wrap: wrap;
	width: calc(100% + 3rem);
	margin: -1.5rem 0 2rem -1.5rem;
}

form>.fields>.field {
	-moz-flex-grow: 0;
	-webkit-flex-grow: 0;
	-ms-flex-grow: 0;
	flex-grow: 0;
	-moz-flex-shrink: 0;
	-webkit-flex-shrink: 0;
	-ms-flex-shrink: 0;
	flex-shrink: 0;
	padding: 1.5rem 0 0 1.5rem;
	width: calc(100% - 1.5rem);
}

form>.fields>.field.half {
	width: calc(50% - 0.75rem);
}

form>.fields>.field.third {
	width: calc(100%/3 - 0.5rem);
}

form>.fields>.field.quarter {
	width: calc(25% - 0.375rem);
}

@media screen and (max-width: 480px) {

	form>.fields {
		width: calc(100% + 3rem);
		margin: -1.5rem 0 2rem -1.5rem;
	}

	form>.fields>.field {
		padding: 1.5rem 0 0 1.5rem;
		width: calc(100% - 1.5rem);
	}

	form>.fields>.field.half {
		width: calc(100% - 1.5rem);
	}

	form>.fields>.field.third {
		width: calc(100% - 1.5rem);
	}

	form>.fields>.field.quarter {
		width: calc(100% - 1.5rem);
	}

}

label {
	color: #ffffff;
	display: block;
	font-size: 0.8rem;
	font-weight: 300;
	letter-spacing: 0.2rem;
	line-height: 1.5;
	margin: 0 0 1rem 0;
	text-transform: uppercase;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
select,
textarea {
	-moz-appearance: none;
	-webkit-appearance: none;
	-ms-appearance: none;
	appearance: none;
	-moz-transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out;
	-webkit-transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out;
	-ms-transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out;
	transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out;
	background-color: transparent;
	border-radius: 4px;
	border: solid 1px #ffffff;
	color: inherit;
	display: block;
	outline: 0;
	padding: 0 1rem;
	text-decoration: none;
	width: 100%;
}

input[type="text"]:invalid,
input[type="password"]:invalid,
input[type="email"]:invalid,
input[type="tel"]:invalid,
select:invalid,
textarea:invalid {
	box-shadow: none;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
	background: rgba(255, 255, 255, 0.075);
	border-color: #ffffff;
	box-shadow: 0 0 0 1px #ffffff;
}

select {
	background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' preserveAspectRatio='none' viewBox='0 0 40 40'%3E%3Cpath d='M9.4,12.3l10.4,10.4l10.4-10.4c0.2-0.2,0.5-0.4,0.9-0.4c0.3,0,0.6,0.1,0.9,0.4l3.3,3.3c0.2,0.2,0.4,0.5,0.4,0.9 c0,0.4-0.1,0.6-0.4,0.9L20.7,31.9c-0.2,0.2-0.5,0.4-0.9,0.4c-0.3,0-0.6-0.1-0.9-0.4L4.3,17.3c-0.2-0.2-0.4-0.5-0.4-0.9 c0-0.4,0.1-0.6,0.4-0.9l3.3-3.3c0.2-0.2,0.5-0.4,0.9-0.4S9.1,12.1,9.4,12.3z' fill='%23ffffff' /%3E%3C/svg%3E");
	background-size: 1.25rem;
	background-repeat: no-repeat;
	background-position: calc(100% - 1rem) center;
	height: 2.75rem;
	padding-right: 2.75rem;
	text-overflow: ellipsis;
}

select option {
	color: #ffffff;
	background: #1b1f22;
}

select:focus::-ms-value {
	background-color: transparent;
}

select::-ms-expand {
	display: none;
}

input[type="text"],
input[type="password"],
input[type="email"],
select {
	height: 2.75rem;
}

textarea {
	padding: 0.75rem 1rem;
}

input[type="checkbox"],
input[type="radio"] {
	-moz-appearance: none;
	-webkit-appearance: none;
	-ms-appearance: none;
	appearance: none;
	display: block;
	float: left;
	margin-right: -2rem;
	opacity: 0;
	width: 1rem;
	z-index: -1;
}

input[type="checkbox"]+label,
input[type="radio"]+label {
	text-decoration: none;
	-moz-user-select: none;
	-webkit-user-select: none;
	-ms-user-select: none;
	user-select: none;
	color: #ffffff;
	cursor: pointer;
	display: inline-block;
	font-size: 0.8rem;
	font-weight: 300;
	margin: 0 0 0.5rem 0;
	padding-left: 2.65rem;
	padding-right: 0.75rem;
	position: relative;
}

input[type="checkbox"]+label:before,
input[type="radio"]+label:before {
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
	display: inline-block;
	font-style: normal;
	font-variant: normal;
	text-rendering: auto;
	line-height: 1;
	text-transform: none !important;
	font-family: 'Font Awesome 5 Free';
	font-weight: 900;
}

input[type="checkbox"]+label:before,
input[type="radio"]+label:before {
	-moz-transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out;
	-webkit-transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out;
	-ms-transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out;
	transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out;
	border-radius: 4px;
	border: solid 1px #ffffff;
	content: '';
	display: inline-block;
	height: 1.65rem;
	left: 0;
	line-height: 1.65rem;
	position: absolute;
	text-align: center;
	top: -0.15rem;
	width: 1.65rem;
}

input[type="checkbox"]:checked+label:before,
input[type="radio"]:checked+label:before {
	background: #ffffff !important;
	border-color: #ffffff !important;
	color: #1b1f22;
	content: '\f00c';
}

input[type="checkbox"]:focus+label:before,
input[type="radio"]:focus+label:before {
	background: rgba(255, 255, 255, 0.075);
	border-color: #ffffff;
	box-shadow: 0 0 0 1px #ffffff;
}

input[type="checkbox"]+label:before {
	border-radius: 4px;
}

input[type="radio"]+label:before {
	border-radius: 100%;
}

::-webkit-input-placeholder {
	color: rgba(255, 255, 255, 0.5) !important;
	opacity: 1.0;
}

:-moz-placeholder {
	color: rgba(255, 255, 255, 0.5) !important;
	opacity: 1.0;
}

::-moz-placeholder {
	color: rgba(255, 255, 255, 0.5) !important;
	opacity: 1.0;
}

:-ms-input-placeholder {
	color: rgba(255, 255, 255, 0.5) !important;
	opacity: 1.0;
}

.formerize-placeholder {
	color: rgba(255, 255, 255, 0.5) !important;
	opacity: 1.0;
}

/* Box */

.box {
	border-radius: 4px;
	border: solid 1px #ffffff;
	margin-bottom: 2rem;
	padding: 1.5em;
}

.box> :last-child,
.box> :last-child> :last-child,
.box> :last-child> :last-child> :last-child {
	margin-bottom: 0;
}

.box.alt {
	border: 0;
	border-radius: 0;
	padding: 0;
}

/* Icon */

.icon {
	text-decoration: none;
	border-bottom: none;
	position: relative;
}

.icon:before {
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
	display: inline-block;
	font-style: normal;
	font-variant: normal;
	text-rendering: auto;
	line-height: 1;
	text-transform: none !important;
	font-family: 'Font Awesome 5 Free';
	font-weight: 400;
}

.icon>.label {
	display: none;
}

.icon:before {
	line-height: inherit;
}

.icon.solid:before {
	font-weight: 900;
}

.icon.brands:before {
	font-family: 'Font Awesome 5 Brands';
}

/* Image */

.image {
	border-radius: 4px;
	border: 0;
	display: inline-block;
	position: relative;
}

.image:before {
	pointer-events: none;
	background-image: url("../../images/overlay.png");
	background-color: rgba(19, 21, 25, 0.5);
	border-radius: 4px;
	content: '';
	display: block;
	height: 100%;
	left: 0;
	opacity: 0.5;
	position: absolute;
	top: 0;
	width: 100%;
}

.image img {
	border-radius: 4px;
	display: block;
}

.image.left,
.image.right {
	max-width: 40%;
}

.image.left img,
.image.right img {
	width: 100%;
}

.image.left {
	float: left;
	padding: 0 1.5em 1em 0;
	top: 0.25em;
}

.image.right {
	float: right;
	padding: 0 0 1em 1.5em;
	top: 0.25em;
}

.image.fit {
	display: block;
	margin: 0 0 2rem 0;
	width: 100%;
}

.image.fit img {
	width: 100%;
}

.image.main {
	display: block;
	margin: 2.5rem 0;
	width: 100%;
}

.image.main img {
	width: 100%;
}

.image.skills {
	display: block;
	margin: 2.5rem 0;
	width: 100%;
	height: 125px; /* Set the height to make it a slim rectangle */
	overflow: hidden; /* Ensure anything outside the rectangle is hidden */
	border-radius: 15px; 
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.image.skills img {
	width: 100%;
	height: 100%;
	object-fit: cover; /* This crops the image while preserving aspect ratio */
}

.image.aboutme {
	display: block;
	margin: 2.5rem 0;
	width: 100%;
	height: 235px; /* Set the height to make it a slim rectangle */
	overflow: hidden; /* Ensure anything outside the rectangle is hidden */
	border-radius: 15px; 
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.image.aboutme img {
	width: 100%;
	height: 100%;
	object-fit: cover; /* This crops the image while preserving aspect ratio */
}

@media screen and (max-width: 736px) {

	.image.main {
		margin: 2rem 0;
	}

}

@media screen and (max-width: 480px) {

	.image.main {
		margin: 1.5rem 0;
	}

	.image.skills {
		margin: 1.5rem 0;
	}

}

/* List */

ol {
	list-style: decimal;
	margin: 0 0 2rem 0;
	padding-left: 1.25em;
}

ol li {
	padding-left: 0.25em;
}

ul {
	list-style: disc;
	margin: 0 0 2rem 0;
	padding-left: 1em;
}

ul li {
	padding-left: 0.5em;
}

ul.alt {
	list-style: none;
	padding-left: 0;
}

ul.alt li {
	border-top: solid 1px #ffffff;
	padding: 0.5em 0;
}

ul.alt li:first-child {
	border-top: 0;
	padding-top: 0;
}

dl {
	margin: 0 0 2rem 0;
}

dl dt {
	display: block;
	font-weight: 600;
	margin: 0 0 1rem 0;
}

dl dd {
	margin-left: 2rem;
}
/* Links */
#contact-links {
	text-align: center;
	margin-top: 2rem;
}

#contact-links h4 {
	font-size: 1.25rem; /* Further reduced heading size */
	color: #fff;
	margin-bottom: 1.5rem;
}

#contact-links .icons {
	list-style: none;
	padding: 0;
}

#contact-links .icons li {
	display: inline-block;
	margin: 0 1rem;
}

#contact-links .icons a {
	font-size: 1.5rem;
	color: #fff;
	text-decoration: none;
	transition: color 0.3s ease;
	position: relative;
}

/* Light hover effect */
#contact-links .icons a:hover {
	color: var(--accent);
}

/* Tooltip for contact-links icons (Resume, GitHub, LinkedIn) */
#contact-links .icons a[data-tooltip] {
	position: relative;
}

#contact-links .icons a[data-tooltip]::after {
	content: attr(data-tooltip);
	position: absolute;
	bottom: -3rem;
	left: 50%;
	transform: translateX(-50%) translateY(4px);
	background-color: #333;
	color: #fff;
	padding: 0.5rem 1rem;
	border-radius: 5px;
	font-size: 0.9rem;
	white-space: nowrap;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
}

#contact-links .icons li:hover a[data-tooltip]::after {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
}

/* Icons */
#contact-links .icons .fab.fa-github:before {
	content: "\f09b"; /* GitHub icon */
}

#contact-links .icons .fab.fa-linkedin:before {
	content: "\f0e1"; /* LinkedIn icon */
}

/* Email link styling */
.email-link {
	margin-top: 1rem; /* Space above the email link */
	font-size: 1rem;
	color: #fff;
}

.email-link a {
	color: #fff;
	text-decoration: none;
	transition: color 0.3s ease;
}

.email-link a:hover {
	color: var(--accent); /* Hover effect color */
}
/* Actions */

ul.actions {
	display: -moz-flex;
	display: -webkit-flex;
	display: -ms-flex;
	display: flex;
	cursor: default;
	list-style: none;
	margin-left: -1rem;
	padding-left: 0;
}

ul.actions li {
	padding: 0 0 0 1rem;
	vertical-align: middle;
}

ul.actions.special {
	-moz-justify-content: center;
	-webkit-justify-content: center;
	-ms-justify-content: center;
	justify-content: center;
	width: 100%;
	margin-left: 0;
}

ul.actions.special li:first-child {
	padding-left: 0;
}

ul.actions.stacked {
	-moz-flex-direction: column;
	-webkit-flex-direction: column;
	-ms-flex-direction: column;
	flex-direction: column;
	margin-left: 0;
}

ul.actions.stacked li {
	padding: 1.3rem 0 0 0;
}

ul.actions.stacked li:first-child {
	padding-top: 0;
}

ul.actions.fit {
	width: calc(100% + 1rem);
}

ul.actions.fit li {
	-moz-flex-grow: 1;
	-webkit-flex-grow: 1;
	-ms-flex-grow: 1;
	flex-grow: 1;
	-moz-flex-shrink: 1;
	-webkit-flex-shrink: 1;
	-ms-flex-shrink: 1;
	flex-shrink: 1;
	width: 100%;
}

ul.actions.fit li>* {
	width: 100%;
}

ul.actions.fit.stacked {
	width: 100%;
}

@media screen and (max-width: 480px) {

	ul.actions:not(.fixed) {
		-moz-flex-direction: column;
		-webkit-flex-direction: column;
		-ms-flex-direction: column;
		flex-direction: column;
		margin-left: 0;
		width: 100% !important;
	}

	ul.actions:not(.fixed) li {
		-moz-flex-grow: 1;
		-webkit-flex-grow: 1;
		-ms-flex-grow: 1;
		flex-grow: 1;
		-moz-flex-shrink: 1;
		-webkit-flex-shrink: 1;
		-ms-flex-shrink: 1;
		flex-shrink: 1;
		padding: 1rem 0 0 0;
		text-align: center;
		width: 100%;
	}

	ul.actions:not(.fixed) li>* {
		width: 100%;
	}

	ul.actions:not(.fixed) li:first-child {
		padding-top: 0;
	}

	ul.actions:not(.fixed) li input[type="submit"],
	ul.actions:not(.fixed) li input[type="reset"],
	ul.actions:not(.fixed) li input[type="button"],
	ul.actions:not(.fixed) li button,
	ul.actions:not(.fixed) li .button {
		width: 100%;
	}

	ul.actions:not(.fixed) li input[type="submit"].icon:before,
	ul.actions:not(.fixed) li input[type="reset"].icon:before,
	ul.actions:not(.fixed) li input[type="button"].icon:before,
	ul.actions:not(.fixed) li button.icon:before,
	ul.actions:not(.fixed) li .button.icon:before {
		margin-left: -0.5em;
	}

}

/* Icons */

ul.icons {
	cursor: default;
	list-style: none;
	padding-left: 0;
}

ul.icons li {
	display: inline-block;
	padding: 0 0.75em 0 0;
}

ul.icons li:last-child {
	padding-right: 0;
}

ul.icons li a {
	border-radius: 100%;
	box-shadow: inset 0 0 0 1px #ffffff;
	display: inline-block;
	height: 2.25rem;
	line-height: 2.25rem;
	text-align: center;
	width: 2.25rem;
}

ul.icons li a:hover {
	background-color: rgba(255, 255, 255, 0.075);
}

ul.icons li a:active {
	background-color: rgba(255, 255, 255, 0.175);
}

/* Table */

.table-wrapper {
	-webkit-overflow-scrolling: touch;
	overflow-x: auto;
}

table {
	margin: 0 0 2rem 0;
	width: 100%;
}

table tbody tr {
	border: solid 1px #ffffff;
	border-left: 0;
	border-right: 0;
}

table tbody tr:nth-child(2n + 1) {
	background-color: rgba(255, 255, 255, 0.075);
}

table td {
	padding: 0.75em 0.75em;
}

table th {
	color: #ffffff;
	font-size: 0.9em;
	font-weight: 600;
	padding: 0 0.75em 0.75em 0.75em;
	text-align: left;
}

table thead {
	border-bottom: solid 2px #ffffff;
}

table tfoot {
	border-top: solid 2px #ffffff;
}

table.alt {
	border-collapse: separate;
}

table.alt tbody tr td {
	border: solid 1px #ffffff;
	border-left-width: 0;
	border-top-width: 0;
}

table.alt tbody tr td:first-child {
	border-left-width: 1px;
}

table.alt tbody tr:first-child td {
	border-top-width: 1px;
}

table.alt thead {
	border-bottom: 0;
}

table.alt tfoot {
	border-top: 0;
}

/* Button */

input[type="submit"],
input[type="reset"],
input[type="button"],
button,
.button {
	-moz-appearance: none;
	-webkit-appearance: none;
	-ms-appearance: none;
	appearance: none;
	-moz-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
	-webkit-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
	-ms-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
	transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
	background-color: transparent;
	border-radius: 4px;
	border: 0;
	box-shadow: inset 0 0 0 1px #ffffff;
	color: #ffffff !important;
	cursor: pointer;
	display: inline-block;
	font-size: 0.8rem;
	font-weight: 300;
	height: 2.75rem;
	letter-spacing: 0.2rem;
	line-height: 2.75rem;
	outline: 0;
	padding: 0 1.25rem 0 1.35rem;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	white-space: nowrap;
}

input[type="submit"]:hover,
input[type="reset"]:hover,
input[type="button"]:hover,
button:hover,
.button:hover {
	background-color: rgba(255, 255, 255, 0.075);
}

input[type="submit"]:active,
input[type="reset"]:active,
input[type="button"]:active,
button:active,
.button:active {
	background-color: rgba(255, 255, 255, 0.175);
}

input[type="submit"].icon:before,
input[type="reset"].icon:before,
input[type="button"].icon:before,
button.icon:before,
.button.icon:before {
	margin-right: 0.5em;
}

input[type="submit"].fit,
input[type="reset"].fit,
input[type="button"].fit,
button.fit,
.button.fit {
	width: 100%;
}

input[type="submit"].small,
input[type="reset"].small,
input[type="button"].small,
button.small,
.button.small {
	font-size: 0.6rem;
	height: 2.0625rem;
	line-height: 2.0625rem;
}

input[type="submit"].primary,
input[type="reset"].primary,
input[type="button"].primary,
button.primary,
.button.primary {
	background-color: #ffffff;
	color: #1b1f22 !important;
	font-weight: 600;
}

input[type="submit"].disabled,
input[type="submit"]:disabled,
input[type="reset"].disabled,
input[type="reset"]:disabled,
input[type="button"].disabled,
input[type="button"]:disabled,
button.disabled,
button:disabled,
.button.disabled,
.button:disabled {
	pointer-events: none;
	cursor: default;
	opacity: 0.25;
}

input[type="submit"],
input[type="reset"],
input[type="button"],
button {
	line-height: calc(2.75rem - 2px);
}

/* BG */

#bg {
	-moz-transform: scale(1.0);
	-webkit-transform: scale(1.0);
	-ms-transform: scale(1.0);
	transform: scale(1.0);
	-webkit-backface-visibility: hidden;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100vh;
	z-index: 1;
}

#bg:before,
#bg:after {
	content: '';
	display: block;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

#bg:before {
	-moz-transition: background-color 1.0s ease-in-out;
	-webkit-transition: background-color 1.0s ease-in-out;
	-ms-transition: background-color 1.0s ease-in-out;
	transition: background-color 1.0s ease-in-out;
	-moz-transition-delay: 0.45s;
	-webkit-transition-delay: 0.45s;
	-ms-transition-delay: 0.45s;
	transition-delay: 0.35s;
	background-image: linear-gradient(to top, rgba(19, 21, 25, 0.5), rgba(19, 21, 25, 0.5)), url("../../images/overlay.png");
	background-size: auto,
		256px 256px;
	background-position: center,
		center;
	background-repeat: no-repeat,
		repeat;
	z-index: 2;
}

/* Keyframes for bidirectional background animation */
@keyframes moveBackground {
    0% {
        background-position: 0% 0%;
    }
    50% {
        background-position: 100% 100%;
    }
    100% {
        background-position: 0% 0%;
    }
}

/* Apply animation to the #bg element */
#bg:after {
    -moz-transform: scale(1.125);
    -webkit-transform: scale(1.125);
    -ms-transform: scale(1.125);
    transform: scale(1.125);
    -moz-transition: -moz-transform 0.325s ease-in-out, -moz-filter 0.325s ease-in-out;
    -webkit-transition: -webkit-transform 0.325s ease-in-out, -webkit-filter 0.325s ease-in-out;
    -ms-transition: -ms-transform 0.325s ease-in-out, -ms-filter 0.325s ease-in-out;
    transition: transform 0.325s ease-in-out, filter 0.325s ease-in-out;
    background-image: url("../../images/coding3.jpg");
    background-position: 0% 0%;
    background-size: cover;
    background-repeat: no-repeat;
    z-index: 1;
    animation: moveBackground 60s linear infinite;
}


body.is-article-visible #bg:after {
	-moz-transform: scale(1.0825);
	-webkit-transform: scale(1.0825);
	-ms-transform: scale(1.0825);
	transform: scale(1.0825);
	-moz-filter: blur(0.2rem);
	-webkit-filter: blur(0.2rem);
	-ms-filter: blur(0.2rem);
	filter: blur(0.2rem);
}

body.is-preload #bg:before {
	background-color: #000000;
}

/* Wrapper */

#wrapper {
	display: -moz-flex;
	display: -webkit-flex;
	display: -ms-flex;
	display: flex;
	-moz-flex-direction: column;
	-webkit-flex-direction: column;
	-ms-flex-direction: column;
	flex-direction: column;
	-moz-align-items: center;
	-webkit-align-items: center;
	-ms-align-items: center;
	align-items: center;
	-moz-justify-content: space-between;
	-webkit-justify-content: space-between;
	-ms-justify-content: space-between;
	justify-content: space-between;
	position: relative;
	min-height: 100vh;
	width: 100%;
	padding: 4rem 2rem;
	z-index: 3;
}

#wrapper:before {
	content: '';
	display: block;
}

@media screen and (max-width: 1680px) {

	#wrapper {
		padding: 3rem 2rem;
	}

}

@media screen and (max-width: 736px) {

	#wrapper {
		padding: 2rem 1rem;
	}

}

@media screen and (max-width: 480px) {

	#wrapper {
		padding: 1rem;
	}

}

/* Header */

#header {
	display: -moz-flex;
	display: -webkit-flex;
	display: -ms-flex;
	display: flex;
	-moz-flex-direction: column;
	-webkit-flex-direction: column;
	-ms-flex-direction: column;
	flex-direction: column;
	-moz-align-items: center;
	-webkit-align-items: center;
	-ms-align-items: center;
	align-items: center;
	-moz-transition: -moz-transform 0.325s ease-in-out, -moz-filter 0.325s ease-in-out, opacity 0.325s ease-in-out;
	-webkit-transition: -webkit-transform 0.325s ease-in-out, -webkit-filter 0.325s ease-in-out, opacity 0.325s ease-in-out;
	-ms-transition: -ms-transform 0.325s ease-in-out, -ms-filter 0.325s ease-in-out, opacity 0.325s ease-in-out;
	transition: transform 0.325s ease-in-out, filter 0.325s ease-in-out, opacity 0.325s ease-in-out;
	background-image: -moz-radial-gradient(rgba(0, 0, 0, 0.25) 25%, rgba(0, 0, 0, 0) 55%);
	background-image: -webkit-radial-gradient(rgba(0, 0, 0, 0.25) 25%, rgba(0, 0, 0, 0) 55%);
	background-image: -ms-radial-gradient(rgba(0, 0, 0, 0.25) 25%, rgba(0, 0, 0, 0) 55%);
	background-image: radial-gradient(rgba(0, 0, 0, 0.25) 25%, rgba(0, 0, 0, 0) 55%);
	max-width: 100%;
	text-align: center;
}

#header>* {
	-moz-transition: opacity 0.325s ease-in-out;
	-webkit-transition: opacity 0.325s ease-in-out;
	-ms-transition: opacity 0.325s ease-in-out;
	transition: opacity 0.325s ease-in-out;
	position: relative;
	margin-top: 3.5rem;
}

#header>*:before {
	content: '';
	display: block;
	position: absolute;
	top: calc(-3.5rem - 1px);
	left: calc(50% - 1px);
	width: 1px;
	height: calc(3.5rem + 1px);
	background: #ffffff;
}

#header> :first-child {
	margin-top: 0;
}

#header> :first-child:before {
	display: none;
}

#header .logo {
    width: 5.5rem;
    height: 5.5rem;
    line-height: 5.5rem;
    border: solid 3px #ffffff;
    border-radius: 100%;
    overflow: hidden; /* Ensure that the image doesn't overflow the circle */
    display: flex;
    align-items: center;
    justify-content: center;
}

#header .logo img {
    width: 100%; /* Make the image fill the circle */
    height: 100%;
    object-fit: cover; /* Ensure the image covers the circle area */
}

#header .content {
	border-style: solid;
	border-color: #ffffff;
	border-top-width: 1px;
	border-bottom-width: 1px;
	max-width: 100%;
}

#header .content .inner {
	-moz-transition: max-height 0.55s ease, padding 0.55s ease, opacity 0.325s ease-in-out;
	-webkit-transition: max-height 0.55s ease, padding 0.55s ease, opacity 0.325s ease-in-out;
	-ms-transition: max-height 0.55s ease, padding 0.55s ease, opacity 0.325s ease-in-out;
	transition: max-height 0.55s ease, padding 0.55s ease, opacity 0.325s ease-in-out;
	-moz-transition-delay: 0.25s;
	-webkit-transition-delay: 0.25s;
	-ms-transition-delay: 0.25s;
	transition-delay: 0.25s;
	padding: 3rem 2rem;
	max-height: 40rem;
	overflow: hidden;
}

#header .content .inner> :last-child {
	margin-bottom: 0;
}

#header .content p {
	text-transform: uppercase;
	letter-spacing: 0.2rem;
	font-size: 0.8rem;
	line-height: 2;
}

#header nav ul {
	display: -moz-flex;
	display: -webkit-flex;
	display: -ms-flex;
	display: flex;
	margin-bottom: 0;
	list-style: none;
	padding-left: 0;
	border: solid 1px #ffffff;
	border-radius: 4px;
}

#header nav ul li {
	padding-left: 0;
	border-left: solid 1px #ffffff;
}

#header nav ul li:first-child {
	border-left: 0;
}

#header nav ul li a {
	display: block;
	min-width: 7.5rem;
	height: 2.75rem;
	line-height: 2.75rem;
	padding: 0 1.25rem 0 1.45rem;
	text-transform: uppercase;
	letter-spacing: 0.2rem;
	font-size: 0.8rem;
	border-bottom: 0;
}

#header nav ul li a:hover {
	background-color: rgba(255, 255, 255, 0.075);
}

#header nav ul li a:active {
	background-color: rgba(255, 255, 255, 0.175);
}

#header nav.use-middle:after {
	content: '';
	display: block;
	position: absolute;
	top: 0;
	left: calc(50% - 1px);
	width: 1px;
	height: 100%;
	background: #ffffff;
}

#header nav.use-middle ul li.is-middle {
	border-left: 0;
}

body.is-article-visible #header {
	-moz-transform: scale(0.95);
	-webkit-transform: scale(0.95);
	-ms-transform: scale(0.95);
	transform: scale(0.95);
	-moz-filter: blur(0.1rem);
	-webkit-filter: blur(0.1rem);
	-ms-filter: blur(0.1rem);
	filter: blur(0.1rem);
	opacity: 0;
}

body.is-preload #header {
	-moz-filter: blur(0.125rem);
	-webkit-filter: blur(0.125rem);
	-ms-filter: blur(0.125rem);
	filter: blur(0.125rem);
}

body.is-preload #header>* {
	opacity: 0;
}

body.is-preload #header .content .inner {
	max-height: 0;
	padding-top: 0;
	padding-bottom: 0;
	opacity: 0;
}

@media screen and (max-width: 980px) {

	#header .content p br {
		display: none;
	}

}

@media screen and (max-width: 736px) {

	#header>* {
		margin-top: 2rem;
	}

	#header>*:before {
		top: calc(-2rem - 1px);
		height: calc(2rem + 1px);
	}

	#header .logo {
		width: 4.75rem;
		height: 4.75rem;
		line-height: 4.75rem;
	}

	#header .logo .icon:before {
		font-size: 1.75rem;
	}

	#header .content .inner {
		padding: 2.5rem 1rem;
	}

	#header .content p {
		line-height: 1.875;
	}

}

@media screen and (max-width: 480px) {

	#header {
		padding: 1.5rem 0;
	}

	#header .content .inner {
		padding: 2.5rem 0;
	}

	#header nav ul {
		-moz-flex-direction: column;
		-webkit-flex-direction: column;
		-ms-flex-direction: column;
		flex-direction: column;
		min-width: 10rem;
		max-width: 100%;
	}

	#header nav ul li {
		border-left: 0;
		border-top: solid 1px #ffffff;
	}

	#header nav ul li:first-child {
		border-top: 0;
	}

	#header nav ul li a {
		height: 3rem;
		line-height: 3rem;
		min-width: 0;
		width: 100%;
	}

	#header nav.use-middle:after {
		display: none;
	}

}

/* Main */

#main {
	-moz-flex-grow: 1;
	-webkit-flex-grow: 1;
	-ms-flex-grow: 1;
	flex-grow: 1;
	-moz-flex-shrink: 1;
	-webkit-flex-shrink: 1;
	-ms-flex-shrink: 1;
	flex-shrink: 1;
	display: -moz-flex;
	display: -webkit-flex;
	display: -ms-flex;
	display: flex;
	-moz-align-items: center;
	-webkit-align-items: center;
	-ms-align-items: center;
	align-items: center;
	-moz-justify-content: center;
	-webkit-justify-content: center;
	-ms-justify-content: center;
	justify-content: center;
	-moz-flex-direction: column;
	-webkit-flex-direction: column;
	-ms-flex-direction: column;
	flex-direction: column;
	position: relative;
	max-width: 100%;
	z-index: 3;
}

#main article {
	-moz-transform: translateY(0.25rem);
	-webkit-transform: translateY(0.25rem);
	-ms-transform: translateY(0.25rem);
	transform: translateY(0.25rem);
	-moz-transition: opacity 0.325s ease-in-out, -moz-transform 0.325s ease-in-out;
	-webkit-transition: opacity 0.325s ease-in-out, -webkit-transform 0.325s ease-in-out;
	-ms-transition: opacity 0.325s ease-in-out, -ms-transform 0.325s ease-in-out;
	transition: opacity 0.325s ease-in-out, transform 0.325s ease-in-out;
	padding: 4.5rem 2.5rem 1.5rem 2.5rem;
	position: relative;
	width: 40rem;
	max-width: 100%;
	background-color: rgba(27, 31, 34, 0.85);
	border-radius: 4px;
	opacity: 0;
}

#main article.active {
	-moz-transform: translateY(0);
	-webkit-transform: translateY(0);
	-ms-transform: translateY(0);
	transform: translateY(0);
	opacity: 1;
}

#main article .close {
	display: block;
	position: absolute;
	top: 0;
	right: 0;
	width: 4rem;
	height: 4rem;
	cursor: pointer;
	text-indent: 4rem;
	overflow: hidden;
	white-space: nowrap;
}

#main article .close:before {
	-moz-transition: background-color 0.2s ease-in-out;
	-webkit-transition: background-color 0.2s ease-in-out;
	-ms-transition: background-color 0.2s ease-in-out;
	transition: background-color 0.2s ease-in-out;
	content: '';
	display: block;
	position: absolute;
	top: 0.75rem;
	left: 0.75rem;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 100%;
	background-position: center;
	background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='20px' height='20px' viewBox='0 0 20 20' zoomAndPan='disable'%3E%3Cstyle%3Eline %7B stroke: %23ffffff%3B stroke-width: 1%3B %7D%3C/style%3E%3Cline x1='2' y1='2' x2='18' y2='18' /%3E%3Cline x1='18' y1='2' x2='2' y2='18' /%3E%3C/svg%3E");
	background-size: 20px 20px;
	background-repeat: no-repeat;
}

#main article .close:hover:before {
	background-color: rgba(255, 255, 255, 0.075);
}

#main article .close:active:before {
	background-color: rgba(255, 255, 255, 0.175);
}

@media screen and (max-width: 736px) {

	#main article {
		padding: 3.5rem 2rem 0.5rem 2rem;
	}

	#main article .close:before {
		top: 0.875rem;
		left: 0.875rem;
		width: 2.25rem;
		height: 2.25rem;
		background-size: 14px 14px;
	}

}

@media screen and (max-width: 480px) {

	#main article {
		padding: 3rem 1.5rem 0.5rem 1.5rem;
	}

}
/* Contact */


#contact-me {
	-moz-transition: -moz-transform 0.325s ease-in-out, -moz-filter 0.325s ease-in-out, opacity 0.325s ease-in-out;
	-webkit-transition: -webkit-transform 0.325s ease-in-out, -webkit-filter 0.325s ease-in-out, opacity 0.325s ease-in-out;
	-ms-transition: -ms-transform 0.325s ease-in-out, -ms-filter 0.325s ease-in-out, opacity 0.325s ease-in-out;
	transition: transform 0.325s ease-in-out, filter 0.325s ease-in-out, opacity 0.325s ease-in-out;
}

body.is-article-visible #contact-me {
	-moz-transform: scale(0.95);
	-webkit-transform: scale(0.95);
	-ms-transform: scale(0.95);
	transform: scale(0.95);
	-moz-filter: blur(0.1rem);
	-webkit-filter: blur(0.1rem);
	-ms-filter: blur(0.1rem);
	filter: blur(0.1rem);
	opacity: 0;
}

body.is-preload #contact-me {
	opacity: 0;
}

/* Footer */

#footer {
	-moz-transition: -moz-transform 0.325s ease-in-out, -moz-filter 0.325s ease-in-out, opacity 0.325s ease-in-out;
	-webkit-transition: -webkit-transform 0.325s ease-in-out, -webkit-filter 0.325s ease-in-out, opacity 0.325s ease-in-out;
	-ms-transition: -ms-transform 0.325s ease-in-out, -ms-filter 0.325s ease-in-out, opacity 0.325s ease-in-out;
	transition: transform 0.325s ease-in-out, filter 0.325s ease-in-out, opacity 0.325s ease-in-out;
	width: 100%;
	max-width: 100%;
	margin-top: 2rem;
	text-align: center;
}

#footer .copyright {
	letter-spacing: 0.2rem;
	font-size: 0.6rem;
	opacity: 0.75;
	margin-bottom: 0;
	text-transform: uppercase;
}

body.is-article-visible #footer {
	-moz-transform: scale(0.95);
	-webkit-transform: scale(0.95);
	-ms-transform: scale(0.95);
	transform: scale(0.95);
	-moz-filter: blur(0.1rem);
	-webkit-filter: blur(0.1rem);
	-ms-filter: blur(0.1rem);
	filter: blur(0.1rem);
	opacity: 0;
}

body.is-preload #footer {
	opacity: 0;
}

/* ==========================================================================
   Custom: scroll-reveal, gradient headings, hover polish, cat mascot
   ========================================================================== */

/* YouTube facade — a static thumbnail + play button instead of a live
   iframe, so the ~1MB YouTube player bundle only loads if someone
   actually clicks play, not on every page load. */

.yt-facade {
	position: relative;
	display: block;
	width: 560px;
	max-width: 100%;
	aspect-ratio: 560 / 315;
	overflow: hidden;
	border-radius: 6px;
	background: #000;
	cursor: pointer;
	margin: 1rem 0;
}

.yt-facade img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	opacity: 0.85;
	transition: opacity 0.2s ease;
}

.yt-facade:hover img,
.yt-facade:focus-visible img {
	opacity: 1;
}

.yt-facade-play {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 68px;
	height: 48px;
	transform: translate(-50%, -50%);
	background: rgba(0, 0, 0, 0.75);
	border-radius: 12px;
	transition: background-color 0.2s ease;
	pointer-events: none;
}

.yt-facade:hover .yt-facade-play,
.yt-facade:focus-visible .yt-facade-play {
	background: var(--accent);
}

.yt-facade-play:after {
	content: '';
	position: absolute;
	top: 50%;
	left: 54%;
	transform: translate(-50%, -50%);
	border-style: solid;
	border-width: 12px 0 12px 20px;
	border-color: transparent transparent transparent #fff;
}

/* Accent palette — cool blue/cyan family, chosen to sit with the
   blue-purple background art. One system, reused everywhere below
   instead of mixing independent one-off colors. */

:root {
	--accent: #38bdf8;         /* primary cyan-blue */
	--accent-rgb: 56, 189, 248;
	--accent-soft: #7dd3fc;    /* lighter cyan, for glows/highlights */
	--accent-soft-rgb: 125, 211, 252;
	--accent-deep: #818cf8;    /* indigo, gradient depth, echoes the bg purple */
	--accent-deep-rgb: 129, 140, 248;
}

/* Scroll-reveal (generic elements) */

.reveal {
	opacity: 0;
	transform: translateY(22px);
	transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
	will-change: opacity, transform;
}

.reveal.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* Skills: back to a single stacked column (CSS multi-column layout was
   letting long chip labels overflow their column) — compactness instead
   comes from smaller chips/gaps/type so it's still a short scroll. */

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

.skill-group h3 {
	margin-top: 0;
	margin-bottom: 0.35rem;
	font-size: 0.85rem;
	letter-spacing: 0.1rem;
	opacity: 0.85;
}

.skill-group .skills-list {
	gap: 0.3rem;
	margin-bottom: 0;
}

#about h4 {
	margin-bottom: 1.1rem;
}

/* Experience: tighter vertical rhythm, and each entry's role + dates
   collapsed onto one flex row instead of two stacked headings — this is
   a long chronological list, so cutting a line per entry adds up fast. */

.experience h2 {
	margin-bottom: 0.3rem;
}

.experience ul {
	margin-bottom: 1rem;
}

.experience li {
	margin-bottom: 0.25rem;
	line-height: 1.45;
}

.experience hr {
	margin: 1.25rem 0;
}

.exp-entry {
	margin-bottom: 1.1rem;
}

.exp-entry:last-child {
	margin-bottom: 0;
}

.exp-head {
	margin-bottom: 0.5rem;
}

.exp-head h2 {
	margin: 0 0 0.15rem 0;
	font-size: 0.95rem;
	letter-spacing: 0.06rem;
}

.exp-date {
	display: block;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.04rem;
	color: var(--accent-soft);
	opacity: 0.8;
}

/* Highlighted Projects: each one is now a collapsible, opaque "starry"
   card instead of a flat resume-style list — click to expand. */

#work > h4 {
	margin-bottom: 1.5rem;
	opacity: 0.6;
}

/* Per-type accent so the 4 project categories read as visually distinct
   at a glance, instead of every card being the same blue. Still all
   drawn from one cohesive "nebula" family (cyan/violet/teal/pink) rather
   than reintroducing an off-palette color like the old orange. Set as a
   custom property on the card so every descendant (badge, star, toggle,
   hover fill) can just reference var(--type-rgb) and inherit it. */

.project-card {
	--type-rgb: var(--accent-rgb);
}

.project-card[data-type="personal"] { --type-rgb: 56, 189, 248; }
.project-card[data-type="academic"] { --type-rgb: 167, 139, 250; }
.project-card[data-type="industry"] { --type-rgb: 45, 212, 191; }
.project-card[data-type="hackathon"] { --type-rgb: 244, 114, 182; }

.project-card {
	position: relative;
	display: block;
	margin-bottom: 1rem;
	border-radius: 14px;
	overflow: hidden;
	background: #11142b;
	border: 1px solid rgba(var(--type-rgb), 0.3);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
	transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.project-card:last-child {
	margin-bottom: 0;
}

.project-card:hover {
	border-color: rgba(var(--type-rgb), 0.65);
	box-shadow: 0 4px 20px rgba(var(--type-rgb), 0.3);
}

.project-card:before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 2px;
	background: linear-gradient(90deg, transparent, rgb(var(--type-rgb)), rgba(var(--type-rgb), 0.3), transparent);
	opacity: 0.6;
}

.project-card.is-featured {
	border-color: rgba(var(--type-rgb), 0.55);
	box-shadow: 0 4px 22px rgba(var(--type-rgb), 0.35);
}

.project-card summary {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	list-style: none;
	cursor: pointer;
	padding: 1rem 1.25rem;
	user-select: none;
	transition: background-color 0.2s ease;
}

.project-card summary::-webkit-details-marker,
.project-card summary::marker {
	display: none;
	content: '';
}

.project-card summary:hover {
	background: rgba(var(--type-rgb), 0.14);
}

.project-card[open] summary {
	background: rgba(var(--type-rgb), 0.08);
}

.project-star {
	position: absolute;
	top: 12px;
	right: 44px;
	font-size: 11px;
	color: rgb(var(--type-rgb));
	animation: sparkleTwinkle 2.6s ease-in-out infinite;
	pointer-events: none;
}

.project-summary-main {
	flex: 1 1 auto;
	min-width: 0;
}

.project-summary-main h2 {
	margin: 0;
	font-size: 0.95rem;
	letter-spacing: 0.05rem;
}

.project-emoji {
	display: inline-block;
	margin-right: 0.45rem;
	font-size: 0.95em;
}

.project-type-badge {
	display: inline-block;
	font-size: 0.62rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 0.2rem 0.6rem;
	border-radius: 999px;
	margin-bottom: 0.4rem;
	background: rgba(var(--type-rgb), 0.18);
	border: 1px solid rgba(var(--type-rgb), 0.5);
	color: rgb(var(--type-rgb));
}

.project-fave {
	margin: 0.4rem 0 0 0;
	font-size: 0.78rem;
	font-style: italic;
	color: rgb(var(--type-rgb));
	opacity: 0.95;
}

.project-toggle {
	position: relative;
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: 1px solid rgba(var(--type-rgb), 0.5);
	transition: transform 0.25s ease, border-color 0.25s ease;
}

.project-toggle:before,
.project-toggle:after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	background: rgb(var(--type-rgb));
	transform: translate(-50%, -50%);
}

.project-toggle:before {
	width: 10px;
	height: 2px;
}

.project-toggle:after {
	width: 2px;
	height: 10px;
	transition: opacity 0.2s ease;
}

.project-card[open] .project-toggle {
	transform: rotate(180deg);
	border-color: rgb(var(--type-rgb));
}

.project-card[open] .project-toggle:after {
	opacity: 0;
}

.project-body {
	padding: 0 1.25rem 1.25rem 1.25rem;
}

.project-body > *:first-child {
	margin-top: 0;
}

.project-body > .image.main,
.project-body > .yt-facade,
.project-body > .project-shots {
	margin: 0 0 1rem 0;
}

.project-body > p {
	margin-bottom: 0.85rem;
}

.project-body > ul {
	margin-bottom: 1rem;
}

.project-body li {
	margin-bottom: 0.3rem;
	line-height: 1.5;
}

/* Links moved to the top of the expanded card (instead of buried at the
   bottom) so they're visible without scrolling through the whole thing —
   styled as a bold, pulsing quick-links bar so it's impossible to miss. */

.project-links {
	position: relative;
	margin: 0 0 1.1rem 0;
	padding: 0.65rem 1rem;
	background: linear-gradient(90deg, rgba(var(--type-rgb), 0.32), rgba(var(--type-rgb), 0.12));
	border: 1.5px solid rgba(var(--type-rgb), 0.75);
	border-radius: 8px;
	animation: projectLinksPulse 2.6s ease-in-out infinite;
}

.project-links:before {
	content: '\1F517\00A0';
}

.project-links a {
	color: #ffffff;
	font-weight: 700;
	border-bottom: 2px solid rgba(var(--type-rgb), 0.8);
}

.project-links a:hover {
	color: rgb(var(--type-rgb));
	border-bottom-color: #ffffff;
}

@keyframes projectLinksPulse {
	0%, 100% {
		box-shadow: 0 0 0 0 rgba(var(--type-rgb), 0.35);
		border-color: rgba(var(--type-rgb), 0.6);
	}
	50% {
		box-shadow: 0 0 16px 2px rgba(var(--type-rgb), 0.6);
		border-color: rgba(var(--type-rgb), 1);
	}
}

/* Screenshot strip (School Life Sims) */

.project-shots {
	display: flex;
	gap: 0.6rem;
	flex-wrap: wrap;
}

.project-shots img {
	flex: 1 1 140px;
	height: 120px;
	object-fit: cover;
	border-radius: 8px;
	border: 1px solid rgba(var(--accent-soft-rgb), 0.25);
}

/* Cap project screenshots to a sane height instead of however tall the
   source screenshot happens to be — keeps each project skimmable. */

.project-body .image.main {
	height: 260px;
	overflow: hidden;
}

.project-body .image.main img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
}

/* Screenshot carousel: a handful of shots for one project, flip-through
   with arrows/dots instead of dumping them all in the flow at once. */

.project-carousel {
	position: relative;
	margin: 0 0 1rem 0;
}

.carousel-viewport {
	position: relative;
	height: 260px;
	overflow: hidden;
	border-radius: 8px;
	border: 1px solid rgba(var(--accent-soft-rgb), 0.25);
}

.carousel-viewport img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
	opacity: 0;
	transition: opacity 0.4s ease;
	pointer-events: none;
}

.carousel-viewport img.is-active {
	opacity: 1;
	pointer-events: auto;
}

.carousel-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 2.2rem;
	height: 2.2rem;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(10, 12, 20, 0.55);
	border: 1px solid rgba(var(--type-rgb), 0.5);
	border-radius: 50%;
	color: #ffffff;
	font-size: 0.85rem;
	line-height: 1;
	cursor: pointer;
	backdrop-filter: blur(2px);
	transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.carousel-arrow:hover,
.carousel-arrow:focus-visible {
	background: rgba(var(--type-rgb), 0.55);
	border-color: rgba(var(--type-rgb), 0.9);
	transform: translateY(-50%) scale(1.08);
}

.carousel-prev {
	left: 0.6rem;
}

.carousel-next {
	right: 0.6rem;
}

.carousel-dots {
	position: absolute;
	left: 50%;
	bottom: 0.6rem;
	transform: translateX(-50%);
	display: flex;
	gap: 0.4rem;
}

.carousel-dot {
	width: 0.45rem;
	height: 0.45rem;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.4);
	border: 1px solid rgba(255, 255, 255, 0.5);
	padding: 0;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
}

.carousel-dot.is-active {
	background: rgb(var(--type-rgb));
	border-color: rgb(var(--type-rgb));
	transform: scale(1.2);
}

/* Skills chips */

.skills-list {
	list-style: none;
	padding-left: 0;
}

.skills-list li {
	list-style: none;
	background-color: rgba(255, 255, 255, 0.06);
	border: solid 1px rgba(255, 255, 255, 0.14);
	border-radius: 999px;
	padding: 0.38rem 0.85rem;
	font-size: 0.9rem;
	flex: 0 0 auto;
	transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
		background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.skills-list li.reveal-chip {
	opacity: 0;
	transform: translateY(14px) scale(0.9);
}

.skills-list li.reveal-chip.is-visible {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.skills-list li:hover {
	cursor: default;
	background-color: rgba(var(--accent-rgb), 0.15);
	border-color: var(--accent);
	transform: translateY(-4px) scale(1.05);
	box-shadow: 0 6px 18px rgba(var(--accent-rgb), 0.25);
}

/* Gradient-animated headings */

@keyframes gradientShift {
	0%, 100% { background-position: 0% 50%; }
	50% { background-position: 100% 50%; }
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {

	#header .content .inner h1,
	#main article > h2.major {
		background-image: linear-gradient(90deg, #ffffff 0%, var(--accent) 35%, var(--accent-deep) 55%, #ffffff 100%);
		background-size: 300% auto;
		-webkit-background-clip: text;
		background-clip: text;
		-webkit-text-fill-color: transparent;
		color: transparent;
		animation: gradientShift 7s ease-in-out infinite;
	}

}

/* Profile picture glow */

@keyframes profileGlow {
	0%, 100% {
		box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.35), 0 0 18px 2px rgba(var(--accent-rgb), 0.15);
	}
	50% {
		box-shadow: 0 0 0 6px rgba(var(--accent-rgb), 0), 0 0 26px 6px rgba(var(--accent-rgb), 0.35);
	}
}

#header .logo {
	animation: profileGlow 3.4s ease-in-out infinite;
}

/* Nav — the "outside" chrome, so this is where the starry theme gets to
   be more decorative; the article content it links to stays plain. */

#header nav ul {
	border-color: rgba(var(--accent-soft-rgb), 0.3);
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(var(--accent-deep-rgb), 0.05));
	box-shadow: 0 0 18px rgba(var(--accent-soft-rgb), 0.12);
}

#header nav ul li {
	border-left-color: rgba(255, 255, 255, 0.2);
}

#header nav ul li a {
	position: relative;
	transition: color 0.25s ease, background-color 0.2s ease-in-out;
}

#header nav ul li a::after {
	content: '';
	position: absolute;
	left: 50%;
	bottom: 0;
	width: 0;
	height: 2px;
	background: var(--accent);
	transition: width 0.25s ease, left 0.25s ease;
}

#header nav ul li a::before {
	/* a little star that twinkles in above the underline on hover */
	content: '✦';
	position: absolute;
	bottom: 3px;
	left: 50%;
	font-size: 10px;
	color: var(--accent-soft);
	text-shadow: 0 0 6px rgba(var(--accent-soft-rgb), 0.9);
	opacity: 0;
	transform: translate(-50%, 0) scale(0.4);
	transition: opacity 0.25s ease, transform 0.25s ease;
	pointer-events: none;
}

#header nav ul li a:hover {
	color: var(--accent);
}

#header nav ul li a:hover::after {
	width: 60%;
	left: 20%;
}

#header nav ul li a:hover::before {
	opacity: 1;
	transform: translate(-50%, -8px) scale(1);
}

/* Twinkling sparkle accent (name + section headings) — reuses the same
   4 <i> markup that used to be equalizer bars, just re-themed. */

.eq {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	height: 0.85em;
	margin-right: 0.65rem;
	vertical-align: -0.05em;
}

.eq i {
	display: block;
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: var(--accent-soft);
	box-shadow: 0 0 6px rgba(var(--accent-soft-rgb), 0.9);
	animation: sparkleTwinkle 1.8s ease-in-out infinite;
}

.eq i:nth-child(1) { width: 3px; height: 3px; animation-delay: -1.4s; }
.eq i:nth-child(2) {
	width: 5px;
	height: 5px;
	margin-top: -3px;
	animation-delay: -0.6s;
	background: var(--accent);
	box-shadow: 0 0 7px rgba(var(--accent-rgb), 0.9);
}
.eq i:nth-child(3) { width: 3px; height: 3px; margin-top: 2px; animation-delay: -1.0s; }
.eq i:nth-child(4) {
	width: 4px;
	height: 4px;
	animation-delay: -0.2s;
	background: var(--accent-deep);
	box-shadow: 0 0 6px rgba(var(--accent-deep-rgb), 0.9);
}

@keyframes sparkleTwinkle {
	0%, 100% { opacity: 0.35; transform: scale(0.7); }
	50% { opacity: 1; transform: scale(1.15); }
}

/* Stars bursting from wherever you click */

.click-spark {
	position: fixed;
	left: 0;
	top: 0;
	font-size: 15px;
	text-shadow: 0 0 6px currentColor;
	pointer-events: none;
	z-index: 10001;
	will-change: transform, opacity;
	animation: clickSparkFly 850ms ease-out forwards;
}

@keyframes clickSparkFly {
	0% {
		opacity: 0;
		transform: translate(-50%, -50%) scale(0.4) rotate(0deg);
	}
	25% {
		/* a little twinkle-pulse right as it appears */
		opacity: 1;
		transform: translate(calc(-50% + var(--dx, 20px) * 0.3), calc(-50% + var(--dy, -50px) * 0.3)) scale(1.3) rotate(calc(var(--rot, 15deg) * 0.4));
	}
	100% {
		opacity: 0;
		transform: translate(calc(-50% + var(--dx, 20px)), calc(-50% + var(--dy, -50px))) scale(1) rotate(var(--rot, 15deg));
	}
}

/* Scroll progress bar, styled like a track scrubber */

#scroll-progress {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 3px;
	background: rgba(255, 255, 255, 0.06);
	z-index: 10000;
	pointer-events: none;
}

#scroll-progress-bar {
	position: relative;
	height: 100%;
	width: 0%;
	background: linear-gradient(90deg, var(--accent-deep), var(--accent-soft));
	box-shadow: 0 0 8px 1px rgba(var(--accent-rgb), 0.45);
	transition: width 0.12s linear;
}

#scroll-progress-bar:after {
	content: '';
	position: absolute;
	top: 50%;
	right: -4px;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--accent-soft);
	box-shadow: 0 0 8px 2px rgba(var(--accent-soft-rgb), 0.85);
	transform: translateY(-50%);
}

/* Starfield — a handful of box-shadow "stars" per layer, painted in a
   single element each. Positions are generated once at load (custom.js);
   the only ongoing cost is a compositor-friendly opacity animation, so
   this stays cheap regardless of how many stars are in it. */

#starfield {
	position: fixed;
	inset: 0;
	z-index: 2;
	pointer-events: none;
	overflow: hidden;
}

.star-layer {
	position: absolute;
	top: 0;
	left: 0;
	width: 1px;
	height: 1px;
	background: transparent;
	border-radius: 50%;
}

.star-layer-1 {
	animation: starTwinkle 3.2s ease-in-out infinite;
}

.star-layer-2 {
	animation: starTwinkle 4.6s ease-in-out infinite;
	animation-delay: -1.5s;
}

.star-layer-3 {
	width: 2px;
	height: 2px;
	animation: starTwinkle 5.8s ease-in-out infinite;
	animation-delay: -3s;
}

@keyframes starTwinkle {
	0%, 100% { opacity: 0.4; }
	50% { opacity: 1; }
}

/* Occasional shooting stars — one element each, mostly idle; only
   "active" for a small slice of a long CSS cycle, so no JS scheduling
   is needed to keep them rare rather than constant. */

.shooting-star {
	position: fixed;
	top: -4%;
	width: 2px;
	height: 2px;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 0 6px 1px rgba(255, 255, 255, 0.9);
	z-index: 2;
	pointer-events: none;
	opacity: 0;
}

.shooting-star:before {
	content: '';
	position: absolute;
	top: 50%;
	right: 0;
	width: 90px;
	height: 1px;
	background: linear-gradient(90deg, rgba(255, 255, 255, 0.9), transparent);
	transform: translateY(-50%) rotate(180deg);
	transform-origin: right center;
}

.shooting-star-1 {
	left: 65%;
	animation: shootingStar1 26s linear infinite;
}

.shooting-star-2 {
	left: 25%;
	top: -6%;
	animation: shootingStar2 34s linear infinite;
	animation-delay: -12s;
}

.shooting-star-2:before {
	/* This one travels down-right, so its trail (opposite the direction
	   of travel) points up-left — the pseudo's un-rotated default. */
	transform: translateY(-50%) rotate(0deg);
}

@keyframes shootingStar1 {
	0% { opacity: 0; transform: translate(0, 0); }
	2% { opacity: 1; }
	13% { opacity: 0; transform: translate(-360px, 360px); }
	100% { opacity: 0; transform: translate(-360px, 360px); }
}

@keyframes shootingStar2 {
	0% { opacity: 0; transform: translate(0, 0); }
	2% { opacity: 1; }
	11% { opacity: 0; transform: translate(300px, 320px); }
	100% { opacity: 0; transform: translate(300px, 320px); }
}

@media screen and (max-width: 480px) {

	.shooting-star {
		display: none;
	}

}

/* Animated signal dividers (replaces plain <hr> in Experience) */

.experience hr {
	height: 2px;
	border-bottom: none;
	background: linear-gradient(90deg,
		rgba(var(--accent-deep-rgb), 0) 0%,
		rgba(var(--accent-deep-rgb), 0.85) 35%,
		rgba(var(--accent-soft-rgb), 0.85) 65%,
		rgba(var(--accent-soft-rgb), 0) 100%);
	background-size: 220% 100%;
	animation: signalSweep 5s linear infinite;
}

@keyframes signalSweep {
	0% { background-position: 0% 0; }
	100% { background-position: -220% 0; }
}

/* Image hover polish */

.image.main,
.image.skills,
.image.aboutme {
	overflow: hidden;
	transition: box-shadow 0.4s ease;
}

.image.main:hover,
.image.skills:hover,
.image.aboutme:hover {
	box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}

.image.main img,
.image.skills img,
.image.aboutme img {
	transition: transform 0.5s ease, filter 0.4s ease;
}

.image.main:hover img,
.image.skills:hover img,
.image.aboutme:hover img {
	transform: scale(1.06);
	filter: saturate(1.15) brightness(1.05);
}

/* Contact icon hover polish */

#contact-links .icons li a {
	display: inline-block;
	transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.25s ease;
}

#contact-links .icons li a:hover {
	transform: translateY(-4px) scale(1.15);
}

/* ==========================================================================
   Cat mascot
   ========================================================================== */

#cat {
	position: fixed;
	right: 1.75rem;
	top: 1.5rem;
	width: 96px;
	height: 108px;
	z-index: 9999;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	animation: catPatrol 9s ease-in-out infinite;
}

.cat-glow {
	position: absolute;
	left: 50%;
	bottom: 4px;
	width: 150px;
	height: 150px;
	background: radial-gradient(circle, rgba(var(--accent-soft-rgb), 0.4) 0%, rgba(var(--accent-soft-rgb), 0.14) 45%, rgba(var(--accent-soft-rgb), 0) 72%);
	transform: translateX(-50%);
	border-radius: 50%;
	animation: catGlowPulse 3.2s ease-in-out infinite;
	pointer-events: none;
}

.cat-note {
	position: absolute;
	top: 4px;
	font-size: 15px;
	line-height: 1;
	color: var(--accent-soft);
	text-shadow: 0 0 6px rgba(var(--accent-soft-rgb), 0.85);
	opacity: 0;
	pointer-events: none;
	animation: catNoteFloat 3.6s ease-in infinite;
}

.cat-note-1 {
	left: 58px;
	animation-delay: 0.3s;
}

.cat-note-2 {
	left: 68px;
	font-size: 11px;
	animation-delay: 1.9s;
}

.cat-body {
	/* Plain positioning box only — the actual torso shape lives on
	   :after (see below) so clip-path there doesn't clip the ears,
	   eyes, muzzle, headphones etc. that live outside this box. */
	position: absolute;
	left: 50%;
	bottom: 8px;
	width: 72px;
	height: 52px;
	transform: translateX(-50%);
	animation: catBob 3.1s ease-in-out infinite;
}

.cat-body:after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(160deg, #3a3a3a, #050505 65%);
	/* Rounded-hexagon torso (narrow shoulders, wide haunches, tapered
	   base) instead of a plain oval — pairs with the wedge head so the
	   whole body reads as "cat", not two stacked circles. */
	clip-path: polygon(
		30% 0%, 70% 0%,
		92% 20%, 100% 55%,
		90% 85%, 75% 100%,
		25% 100%, 10% 85%,
		0% 55%, 8% 20%
	);
	filter: drop-shadow(0 0 12px rgba(var(--accent-rgb), 0.3));
}

.cat-body:before {
	content: '';
	position: absolute;
	top: -28px;
	left: 50%;
	width: 50px;
	height: 42px;
	background: linear-gradient(160deg, #3a3a3a, #050505 65%);
	/* A tapered wedge (flat brow, round cheeks, pointed jaw) reads as
	   a cat face; a border-radius blob just reads as a circle. */
	clip-path: polygon(
		24% 0%, 76% 0%,
		96% 24%, 94% 54%,
		78% 88%, 62% 100%,
		38% 100%, 22% 88%,
		6% 54%, 4% 24%
	);
	transform: translateX(-50%);
}

.cat-ear {
	position: absolute;
	top: -34px;
	width: 0;
	height: 0;
	border-left: 8px solid transparent;
	border-right: 8px solid transparent;
	border-bottom: 15px solid #0a0a0a;
	animation: catEarTwitch 4.6s ease-in-out infinite;
}

.cat-ear-left {
	left: 9px;
	transform: rotate(-18deg);
	transform-origin: bottom center;
}

.cat-ear-right {
	right: 9px;
	transform: rotate(18deg);
	transform-origin: bottom center;
	animation-name: catEarTwitchRight;
	animation-delay: 0.4s;
}

.cat-eye {
	position: absolute;
	top: -15px;
	width: 8px;
	height: 8px;
	background: var(--accent-soft);
	/* A little 4-point sparkle instead of a plain dot — glowing star
	   eyes, since he's meant to read as a star-cat now. */
	clip-path: polygon(50% 0%, 63% 37%, 100% 50%, 63% 63%, 50% 100%, 37% 63%, 0% 50%, 37% 37%);
	filter: drop-shadow(0 0 4px rgba(var(--accent-soft-rgb), 0.9));
	animation: catBlink 4.5s ease-in-out infinite;
}

.cat-eye-left {
	left: 27px;
}

.cat-eye-right {
	right: 27px;
	animation-delay: 0.15s;
}

.cat-muzzle {
	position: absolute;
	top: 2px;
	left: 50%;
	width: 16px;
	height: 10px;
	background: linear-gradient(160deg, #3a3a3a, #050505 65%);
	border-radius: 45% 45% 50% 50% / 55% 55% 45% 45%;
	transform: translateX(-50%);
}

.cat-muzzle:after {
	content: '';
	position: absolute;
	top: -2px;
	left: 50%;
	width: 5px;
	height: 4px;
	background: var(--accent);
	border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
	box-shadow: 0 0 4px 1px rgba(var(--accent-rgb), 0.6);
	transform: translateX(-50%);
}

.cat-whiskers {
	position: absolute;
	top: 3px;
	width: 18px;
	height: 1.5px;
	background: rgba(255, 255, 255, 0.5);
	border-radius: 1px;
	pointer-events: none;
}

.cat-whiskers:before,
.cat-whiskers:after {
	content: '';
	position: absolute;
	left: 0;
	width: 16px;
	height: 1.5px;
	background: rgba(255, 255, 255, 0.36);
	border-radius: 1px;
	transform-origin: left center;
}

.cat-whiskers:before {
	top: 6px;
	transform: rotate(12deg);
}

.cat-whiskers:after {
	top: -5px;
	transform: rotate(-10deg);
}

.cat-whiskers-left {
	left: -10px;
	transform: rotate(-6deg);
}

.cat-whiskers-right {
	right: -10px;
	transform: rotate(6deg) scaleX(-1);
}

.cat-paw {
	position: absolute;
	bottom: -3px;
	width: 18px;
	height: 9px;
	background: linear-gradient(160deg, #2c2c2c, #050505 70%);
	/* Rounder on top, flatter on the bottom — reads as a resting paw
	   instead of another plain circle. */
	border-radius: 50% 50% 35% 35% / 65% 65% 30% 30%;
}

.cat-paw-left {
	left: 12px;
}

.cat-paw-right {
	right: 12px;
}

.cat-headphones {
	position: absolute;
	top: -32px;
	left: 14px;
	width: 44px;
	height: 20px;
	border: 3px solid var(--accent-soft);
	border-bottom: none;
	border-radius: 50% 50% 0 0 / 100% 100% 0 0;
	box-shadow: 0 0 8px 1px rgba(var(--accent-soft-rgb), 0.6);
	pointer-events: none;
}

.cat-headphones:after {
	/* A little star charm on the headband — the star-cat signature,
	   without changing the headphones themselves. */
	content: '';
	position: absolute;
	top: -7px;
	left: 50%;
	width: 7px;
	height: 7px;
	background: #fff;
	clip-path: polygon(50% 0%, 63% 37%, 100% 50%, 63% 63%, 50% 100%, 37% 63%, 0% 50%, 37% 37%);
	filter: drop-shadow(0 0 4px rgba(var(--accent-soft-rgb), 0.9));
	transform: translateX(-50%);
	animation: sparkleTwinkle 2.4s ease-in-out infinite;
}

.cat-headphone-cup {
	position: absolute;
	top: -15px;
	width: 13px;
	height: 15px;
	background: linear-gradient(160deg, var(--accent-soft), var(--accent));
	border-radius: 40% 40% 45% 45%;
	box-shadow: 0 0 6px 1px rgba(var(--accent-soft-rgb), 0.7);
}

.cat-headphone-cup-left {
	left: -4px;
}

.cat-headphone-cup-right {
	right: -4px;
}

.cat-tail {
	position: absolute;
	right: 4px;
	bottom: 14px;
	width: 9px;
	height: 34px;
	background: linear-gradient(#050505, #3a3a3a);
	border-radius: 10px;
	transform-origin: bottom center;
	animation: catTailSwish 2.6s ease-in-out infinite;
}

.cat-bubble {
	position: absolute;
	right: 0;
	top: 100%;
	margin-top: 0.5rem;
	background: #fff;
	color: #1b1f22;
	padding: 0.4rem 0.75rem;
	border-radius: 10px;
	font-size: 0.75rem;
	font-weight: 600;
	white-space: nowrap;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
	opacity: 0;
	transform: translateY(-6px) scale(0.9);
	transform-origin: top right;
	pointer-events: none;
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.cat-bubble:after {
	content: '';
	position: absolute;
	bottom: 100%;
	right: 14px;
	border: 5px solid transparent;
	border-bottom-color: #fff;
}

#cat.is-talking .cat-bubble {
	opacity: 1;
	transform: translateY(0) scale(1);
}

#cat.is-jumping .cat-body {
	animation: catJump 0.5s ease;
}

@keyframes catBob {
	0%, 100% { transform: translateX(-50%) translateY(0); }
	50% { transform: translateX(-50%) translateY(-4px); }
}

@keyframes catEarTwitch {
	0%, 88%, 100% { transform: rotate(-18deg); }
	91% { transform: rotate(-30deg); }
	94% { transform: rotate(-12deg); }
}

@keyframes catEarTwitchRight {
	0%, 88%, 100% { transform: rotate(18deg); }
	91% { transform: rotate(30deg); }
	94% { transform: rotate(12deg); }
}

@keyframes catBlink {
	0%, 92%, 100% { transform: scaleY(1); }
	95% { transform: scaleY(0.1); }
}

@keyframes catTailSwish {
	0%, 100% { transform: rotate(-18deg); }
	50% { transform: rotate(18deg); }
}

@keyframes catJump {
	0% { transform: translateX(-50%) translateY(0) scale(1, 1); }
	30% { transform: translateX(-50%) translateY(-22px) scale(0.92, 1.08); }
	55% { transform: translateX(-50%) translateY(-22px) scale(1.05, 0.95); }
	100% { transform: translateX(-50%) translateY(0) scale(1, 1); }
}

@keyframes catPatrol {
	0%, 100% { transform: translateX(0); }
	50% { transform: translateX(-28px); }
}

@keyframes catGlowPulse {
	0%, 100% { opacity: 0.55; transform: translateX(-50%) scale(1); }
	50% { opacity: 0.9; transform: translateX(-50%) scale(1.1); }
}

@keyframes catNoteFloat {
	0% { opacity: 0; transform: translateY(0) scale(0.8) rotate(-6deg); }
	15% { opacity: 1; }
	80% { opacity: 0.75; }
	100% { opacity: 0; transform: translateY(-42px) scale(1.05) rotate(6deg); }
}

@media screen and (max-width: 480px) {

	#cat {
		right: 0.75rem;
		top: 1rem;
		width: 66px;
		height: 72px;
		transform: scale(0.85);
		transform-origin: top right;
		animation: none;
	}

}

/* Respect reduced-motion preference */

@media (prefers-reduced-motion: reduce) {

	.reveal,
	.skills-list li.reveal-chip {
		transition-duration: 0.01s !important;
	}

	#header .content .inner h1,
	#main article > h2.major,
	#header .logo,
	#cat,
	.cat-body,
	.cat-ear,
	.cat-ear-right,
	.cat-eye,
	.cat-tail,
	.cat-glow,
	.cat-note,
	.cat-headphones:after,
	.eq i,
	.experience hr,
	.star-layer,
	.shooting-star,
	.project-star,
	.project-links {
		animation: none !important;
	}

	.star-layer {
		opacity: 0.7;
	}

	.cat-glow {
		opacity: 0.6;
	}

	.project-links {
		box-shadow: 0 0 12px 1px rgba(var(--type-rgb), 0.45);
		border-color: rgba(var(--type-rgb), 0.9);
	}

	#scroll-progress-bar {
		transition: none !important;
	}

}


/* ==========================================================================
   Battle System — Mewo Fighter
   ========================================================================== */

.battle-modal {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	background: radial-gradient(circle at 50% 40%, rgba(20, 24, 55, 0.92) 0%, rgba(4, 5, 14, 0.96) 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	padding: 1rem;
	transition: opacity 0.25s ease;
}

.battle-modal.hidden {
	display: none;
	opacity: 0;
	pointer-events: none;
}

.battle-content {
	position: relative;
	background: linear-gradient(150deg, #14183a 0%, #1a1f42 55%, #11142b 100%);
	border: 2px solid var(--accent);
	border-radius: 16px;
	padding: 1.75rem;
	max-width: 620px;
	width: 100%;
	max-height: 90vh;
	overflow-x: hidden;
	overflow-y: auto;
	box-shadow:
		0 0 0 1px rgba(var(--accent-soft-rgb), 0.25),
		0 0 55px 6px rgba(var(--accent-rgb), 0.45),
		0 20px 60px rgba(0, 0, 0, 0.6);
	animation: battlePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
	box-sizing: border-box;
}

@keyframes battlePop {
	0% { transform: scale(0.7); opacity: 0; }
	100% { transform: scale(1); opacity: 1; }
}

/* Twinkling sparkle backdrop behind all battle screens */
.battle-sparkles {
	position: absolute;
	inset: 0;
	border-radius: 14px;
	pointer-events: none;
	overflow: hidden;
	z-index: 0;
}

.battle-sparkles::before,
.battle-sparkles::after {
	content: '';
	position: absolute;
	inset: 0;
	background-repeat: no-repeat;
	background-image:
		radial-gradient(2px 2px at 8% 15%, rgba(255,255,255,0.9), transparent),
		radial-gradient(2px 2px at 22% 68%, rgba(var(--accent-soft-rgb),0.9), transparent),
		radial-gradient(1.5px 1.5px at 38% 32%, rgba(255,255,255,0.7), transparent),
		radial-gradient(2px 2px at 55% 82%, rgba(var(--accent-rgb),0.8), transparent),
		radial-gradient(1.5px 1.5px at 68% 12%, rgba(255,255,255,0.8), transparent),
		radial-gradient(2px 2px at 82% 55%, rgba(var(--accent-soft-rgb),0.85), transparent),
		radial-gradient(1.5px 1.5px at 92% 28%, rgba(255,255,255,0.7), transparent),
		radial-gradient(2px 2px at 15% 90%, rgba(var(--accent-rgb),0.7), transparent),
		radial-gradient(1.5px 1.5px at 72% 78%, rgba(255,255,255,0.6), transparent);
	animation: battleSparkleTwinkle 3.4s ease-in-out infinite;
}

.battle-sparkles::after {
	background-position: 5% 5%;
	animation-delay: 1.4s;
	animation-duration: 4.2s;
	opacity: 0.7;
}

@keyframes battleSparkleTwinkle {
	0%, 100% { opacity: 0.35; }
	50% { opacity: 1; }
}

.battle-screen {
	position: relative;
	z-index: 1;
	text-align: center;
}

.battle-screen.hidden {
	display: none;
}

.battle-screen h2 {
	color: var(--accent-soft);
	margin: 0 0 0.75rem 0;
	font-size: 1.9em;
	text-shadow: 0 0 18px rgba(var(--accent-rgb), 0.7);
	letter-spacing: 0.02em;
}

.battle-screen p {
	color: #d8dcf5;
	margin: 0.5rem 0;
	font-size: 1.05em;
	line-height: 1.5;
}

.battle-buttons {
	display: flex;
	gap: 1rem;
	justify-content: center;
	margin-top: 1.5rem;
	flex-wrap: wrap;
}

.battle-btn {
	/* Reset the theme's aggressive default button sizing (fixed 2.75rem
	   height/line-height, 0.2rem letter-spacing, uppercase, nowrap) —
	   otherwise text gets squeezed off-center and can overflow. */
	height: auto;
	line-height: 1.35;
	letter-spacing: normal;
	text-transform: none;
	white-space: normal;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;

	padding: 0.8rem 1.5rem;
	background: linear-gradient(135deg, var(--accent), var(--accent-deep));
	color: #060714;
	border: 2px solid var(--accent-soft);
	border-radius: 8px;
	font-weight: 700;
	font-size: 1em;
	cursor: pointer;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
	box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.35);
}

.battle-btn:hover {
	transform: translateY(-2px) scale(1.03);
	box-shadow: 0 0 26px rgba(var(--accent-rgb), 0.7);
}

.battle-btn:active {
	transform: translateY(0) scale(0.98);
}

.battle-btn.cancel {
	background: linear-gradient(135deg, #2a2d42, #1b1d30);
	color: #b9bdd6;
	border-color: #454866;
	box-shadow: none;
}

.battle-btn.cancel:hover {
	box-shadow: 0 0 16px rgba(120, 125, 160, 0.35);
}

.battle-btn.exit-btn {
	width: 100%;
	margin-top: 1rem;
	background: linear-gradient(135deg, #2a2d42, #1b1d30);
	color: #b9bdd6;
	border-color: #454866;
	box-shadow: none;
}

.battle-btn.exit-btn:hover {
	box-shadow: 0 0 16px rgba(220, 90, 90, 0.35);
	border-color: #e06666;
	color: #ffb3b3;
}

/* ===== Battle Header: health + VS banner ===== */

.battle-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1.25rem;
	gap: 0.75rem;
}

.battle-opponent,
.battle-player {
	flex: 1;
	min-width: 0;
	text-align: center;
}

.battle-opponent h3,
.battle-player h3 {
	color: var(--accent-soft);
	margin: 0 0 0.4rem 0;
	font-size: 1.2em;
	text-shadow: 0 0 10px rgba(var(--accent-rgb), 0.5);
}

.vs-text {
	color: #fff;
	font-size: 1.1em;
	font-weight: 900;
	font-style: italic;
	flex-shrink: 0;
	padding: 0 0.5rem;
	text-shadow:
		0 0 8px rgba(var(--accent-rgb), 0.9),
		0 0 18px rgba(var(--accent-deep-rgb), 0.7);
	animation: vsPulse 1.6s ease-in-out infinite;
}

@keyframes vsPulse {
	0%, 100% { transform: scale(1) rotate(-4deg); }
	50% { transform: scale(1.15) rotate(-4deg); }
}

.player-note {
	color: var(--accent-soft);
	font-size: 0.85em;
	margin: 0;
	font-weight: 600;
}

.mewo-health-container {
	margin-top: 0.4rem;
}

.mewo-health-bar {
	position: relative;
	width: 100%;
	height: 18px;
	background: #14172b;
	border: 2px solid var(--accent);
	border-radius: 5px;
	overflow: hidden;
	margin-bottom: 0.3rem;
	box-shadow: inset 0 0 6px rgba(0,0,0,0.6);
}

.health-fill {
	height: 100%;
	width: 100%;
	background: linear-gradient(90deg, #38bdf8, #7dd3fc);
	transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease;
	box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.7);
}

.health-bar-shine {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 45%;
	background: linear-gradient(180deg, rgba(255,255,255,0.35), transparent);
	pointer-events: none;
}

.mewo-health-container.is-low .health-fill {
	background: linear-gradient(90deg, #f87171, #fca5a5);
	box-shadow: 0 0 12px rgba(248, 113, 113, 0.8);
	animation: healthLowPulse 0.8s ease-in-out infinite;
}

@keyframes healthLowPulse {
	0%, 100% { filter: brightness(1); }
	50% { filter: brightness(1.35); }
}

.health-text {
	color: #9fa4c4;
	font-size: 0.75em;
	font-weight: 600;
}

/* ===== Arena ===== */

.battle-arena-visual {
	position: relative;
	height: 240px;
	margin: 1.25rem 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: radial-gradient(ellipse at 50% 70%, rgba(var(--accent-rgb), 0.14) 0%, rgba(var(--accent-rgb), 0.03) 55%, transparent 80%);
	border-radius: 10px;
	padding: 1rem;
	border: 1px solid rgba(var(--accent-rgb), 0.3);
	overflow: hidden;
}

.arena-floor {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 40%;
	background: linear-gradient(180deg, transparent, rgba(var(--accent-rgb), 0.12));
	border-top: 1px solid rgba(var(--accent-soft-rgb), 0.25);
}

/* ===== Battle Mewo Sprite ===== */

.battle-mewo {
	position: relative;
	width: 160px;
	height: 170px;
	z-index: 2;
	animation: bmIdleBob 2.6s ease-in-out infinite;
}

@keyframes bmIdleBob {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-6px); }
}

.bm-glow {
	position: absolute;
	left: 50%;
	bottom: 10px;
	width: 190px;
	height: 190px;
	background: radial-gradient(circle, rgba(var(--accent-soft-rgb), 0.55) 0%, rgba(var(--accent-soft-rgb), 0.18) 45%, rgba(var(--accent-soft-rgb), 0) 72%);
	transform: translateX(-50%);
	border-radius: 50%;
	animation: bmGlowPulse 2.4s ease-in-out infinite;
	pointer-events: none;
}

@keyframes bmGlowPulse {
	0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
	50% { opacity: 1; transform: translateX(-50%) scale(1.12); }
}

.bm-tail {
	position: absolute;
	right: 6px;
	bottom: 30px;
	width: 16px;
	height: 62px;
	background: linear-gradient(160deg, #5c6086, #24263f 70%);
	border-radius: 16px;
	transform-origin: bottom center;
	box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.25);
	animation: bmTailSwish 1.8s ease-in-out infinite;
}

@keyframes bmTailSwish {
	0%, 100% { transform: rotate(-16deg); }
	50% { transform: rotate(16deg); }
}

.bm-body {
	position: absolute;
	left: 50%;
	bottom: 14px;
	width: 118px;
	height: 88px;
	transform: translateX(-50%);
}

.bm-body::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(160deg, #6b7099, #2b2e4d 70%);
	clip-path: polygon(
		30% 0%, 70% 0%,
		92% 20%, 100% 55%,
		90% 85%, 75% 100%,
		25% 100%, 10% 85%,
		0% 55%, 8% 20%
	);
	filter: drop-shadow(0 0 22px rgba(var(--accent-rgb), 0.6));
}

.bm-body::before {
	content: '';
	position: absolute;
	top: -46px;
	left: 50%;
	width: 82px;
	height: 68px;
	background: linear-gradient(160deg, #767caa, #2b2e4d 70%);
	clip-path: polygon(
		24% 0%, 76% 0%,
		96% 24%, 94% 54%,
		78% 88%, 62% 100%,
		38% 100%, 22% 88%,
		6% 54%, 4% 24%
	);
	filter: drop-shadow(0 0 16px rgba(var(--accent-rgb), 0.5));
	transform: translateX(-50%);
}

.bm-ear {
	position: absolute;
	top: -56px;
	width: 0;
	height: 0;
	border-left: 13px solid transparent;
	border-right: 13px solid transparent;
	border-bottom: 24px solid #2b2e4d;
	filter: drop-shadow(0 0 6px rgba(var(--accent-rgb), 0.4));
	animation: bmEarTwitch 2.2s ease-in-out infinite;
}

.bm-ear-left {
	left: 16px;
	transform: rotate(-18deg);
	transform-origin: bottom center;
}

.bm-ear-right {
	right: 16px;
	transform: rotate(18deg);
	transform-origin: bottom center;
	animation-delay: 0.3s;
}

@keyframes bmEarTwitch {
	0%, 85%, 100% { transform: rotate(-18deg); }
	90% { transform: rotate(-30deg); }
}

.bm-eye {
	position: absolute;
	top: -22px;
	width: 15px;
	height: 15px;
	background: var(--accent-soft);
	clip-path: polygon(50% 0%, 63% 37%, 100% 50%, 63% 63%, 50% 100%, 37% 63%, 0% 50%, 37% 37%);
	filter: drop-shadow(0 0 8px rgba(var(--accent-soft-rgb), 1));
	animation: bmBlink 3.2s ease-in-out infinite;
}

.bm-eye-left { left: 42px; }
.bm-eye-right { right: 42px; animation-delay: 0.2s; }

@keyframes bmBlink {
	0%, 90%, 100% { transform: scaleY(1); }
	94% { transform: scaleY(0.1); }
}

.bm-muzzle {
	position: absolute;
	top: 4px;
	left: 50%;
	width: 26px;
	height: 16px;
	background: linear-gradient(160deg, #767caa, #2b2e4d 70%);
	border-radius: 45% 45% 50% 50% / 55% 55% 45% 45%;
	transform: translateX(-50%);
}

.bm-muzzle::after {
	content: '';
	position: absolute;
	top: -3px;
	left: 50%;
	width: 8px;
	height: 6px;
	background: var(--accent);
	border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
	box-shadow: 0 0 6px 2px rgba(var(--accent-rgb), 0.7);
	transform: translateX(-50%);
}

.bm-whiskers {
	position: absolute;
	top: 6px;
	width: 30px;
	height: 2px;
	background: rgba(255, 255, 255, 0.55);
	border-radius: 2px;
	pointer-events: none;
}

.bm-whiskers::before,
.bm-whiskers::after {
	content: '';
	position: absolute;
	left: 0;
	width: 26px;
	height: 2px;
	background: rgba(255, 255, 255, 0.4);
	border-radius: 2px;
	transform-origin: left center;
}

.bm-whiskers::before { top: 9px; transform: rotate(12deg); }
.bm-whiskers::after { top: -8px; transform: rotate(-10deg); }

.bm-whiskers-left { left: -18px; transform: rotate(-6deg); }
.bm-whiskers-right { right: -18px; transform: rotate(6deg) scaleX(-1); }

.bm-paw {
	position: absolute;
	bottom: -4px;
	width: 28px;
	height: 15px;
	background: linear-gradient(160deg, #565a80, #24263f 70%);
	border-radius: 50% 50% 35% 35% / 65% 65% 30% 30%;
}

.bm-paw-left { left: 18px; }
.bm-paw-right { right: 18px; }

.bm-headphones {
	position: absolute;
	top: -52px;
	left: 22px;
	width: 74px;
	height: 32px;
	border: 5px solid var(--accent-soft);
	border-bottom: none;
	border-radius: 50% 50% 0 0 / 100% 100% 0 0;
	box-shadow: 0 0 14px 2px rgba(var(--accent-soft-rgb), 0.7);
	pointer-events: none;
}

.bm-cup {
	position: absolute;
	top: -24px;
	width: 20px;
	height: 24px;
	background: linear-gradient(160deg, var(--accent-soft), var(--accent));
	border-radius: 40% 40% 45% 45%;
	box-shadow: 0 0 10px 2px rgba(var(--accent-soft-rgb), 0.8);
}

.bm-cup-left { left: -8px; }
.bm-cup-right { right: -8px; }

/* Hit flash overlay: brief white silhouette flash on impact */
.bm-flash {
	position: absolute;
	inset: -10px;
	background: #fff;
	border-radius: 50%;
	opacity: 0;
	pointer-events: none;
	mix-blend-mode: screen;
}

.battle-mewo.is-hit {
	animation: bmHitShake 0.4s ease;
}

.battle-mewo.is-hit .bm-flash {
	animation: bmHitFlash 0.4s ease;
}

.battle-mewo.is-hit .bm-body::after,
.battle-mewo.is-hit .bm-body::before {
	filter: drop-shadow(0 0 26px rgba(248, 113, 113, 0.9));
}

@keyframes bmHitShake {
	0%, 100% { transform: translateX(0) rotate(0deg); }
	15% { transform: translateX(-10px) rotate(-4deg); }
	30% { transform: translateX(9px) rotate(4deg); }
	45% { transform: translateX(-7px) rotate(-3deg); }
	60% { transform: translateX(6px) rotate(2deg); }
	75% { transform: translateX(-3px) rotate(-1deg); }
}

@keyframes bmHitFlash {
	0% { opacity: 0; }
	15% { opacity: 0.45; }
	100% { opacity: 0; }
}

/* Faint (KO) state */
.battle-mewo.is-defeated {
	animation: bmDefeated 0.6s ease forwards;
}

@keyframes bmDefeated {
	0% { transform: translateY(0) rotate(0deg); opacity: 1; }
	100% { transform: translateY(14px) rotate(-12deg); opacity: 0.4; }
}

/* ===== Attack projectile + impact effects ===== */

.attack-display {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 3;
}

.attack-animation {
	position: absolute;
	left: 10%;
	bottom: 30%;
	font-size: 2.6em;
	pointer-events: none;
	filter: drop-shadow(0 0 10px rgba(var(--accent-rgb), 0.8));
}

@keyframes attackFly {
	0% {
		opacity: 1;
		transform: translate(0, 0) scale(0.7) rotate(0deg);
	}
	65% {
		opacity: 1;
		transform: translate(120px, -30px) scale(1.5) rotate(180deg);
	}
	100% {
		opacity: 0;
		transform: translate(160px, -40px) scale(1.9) rotate(220deg);
	}
}

.impact-burst {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 4;
}

.impact-spark {
	position: absolute;
	top: 45%;
	left: 50%;
	font-size: 1.4em;
	color: #fff;
	pointer-events: none;
	text-shadow: 0 0 8px rgba(255,255,255,0.9);
	animation: impactSparkFly 0.55s ease-out forwards;
}

@keyframes impactSparkFly {
	0% {
		opacity: 1;
		transform: translate(0, 0) scale(0.6);
	}
	100% {
		opacity: 0;
		transform: translate(var(--ix), var(--iy)) scale(1.1);
	}
}

.dmg-popup-layer {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 5;
}

.dmg-popup {
	position: absolute;
	top: 25%;
	left: 50%;
	font-size: 1.7em;
	font-weight: 900;
	color: #ffe36e;
	text-shadow:
		0 0 6px rgba(0,0,0,0.8),
		0 0 14px rgba(255, 210, 80, 0.8);
	pointer-events: none;
	animation: dmgPopupFloat 0.9s ease-out forwards;
}

@keyframes dmgPopupFloat {
	0% { opacity: 0; transform: translate(-50%, 0) scale(0.6); }
	20% { opacity: 1; transform: translate(-50%, -10px) scale(1.15); }
	100% { opacity: 0; transform: translate(-50%, -55px) scale(1); }
}

/* ===== Dialogue ===== */

.mewo-dialogue {
	position: relative;
	z-index: 1;
	background: rgba(var(--accent-rgb), 0.12);
	border: 2px solid var(--accent-soft);
	border-radius: 8px;
	padding: 0.9rem 1.1rem;
	color: var(--accent-soft);
	font-style: italic;
	font-weight: 600;
	font-size: 0.98em;
	margin: 1rem 0;
	min-height: 2.6em;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	overflow-wrap: break-word;
	word-break: break-word;
	box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.25);
	animation: dialogueFade 0.4s ease-out;
}

@keyframes dialogueFade {
	0% { opacity: 0; transform: translateY(-8px); }
	100% { opacity: 1; transform: translateY(0); }
}

/* ===== Attack buttons ===== */

.battle-actions {
	position: relative;
	z-index: 1;
	margin-top: 1.25rem;
}

.attack-buttons {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.65rem;
	margin-bottom: 1rem;
}

@media (max-width: 500px) {
	.attack-buttons {
		grid-template-columns: minmax(0, 1fr);
	}

	.battle-content {
		padding: 1.25rem;
	}

	.battle-header {
		flex-direction: column;
		gap: 0.6rem;
	}

	.vs-text {
		transform: rotate(90deg);
		margin: 0.3rem 0;
	}

	.battle-mewo {
		width: 130px;
		height: 140px;
	}
}

.attack-btn {
	/* Same theme-default reset as .battle-btn — this is the fix for text
	   overflowing the button: the theme's base `button` rule forces a
	   fixed 2.75rem height/line-height plus 0.2rem letter-spacing and
	   uppercase, which inflates and vertically squashes the label. */
	height: auto;
	letter-spacing: normal;
	text-transform: none;
	box-sizing: border-box;

	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.1rem;
	min-width: 0;
	width: 100%;
	min-height: 68px;
	padding: 0.55rem 0.4rem;
	background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.22), rgba(var(--accent-deep-rgb), 0.12));
	color: var(--accent-soft);
	border: 2px solid rgba(var(--accent-rgb), 0.5);
	border-radius: 8px;
	font-weight: 600;
	font-size: 0.78em;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
	text-align: center;
	line-height: 1.2;
	overflow-wrap: break-word;
	word-break: break-word;
	white-space: normal;
}

.attack-btn .atk-emoji {
	font-size: 1.35em;
	line-height: 1;
	filter: drop-shadow(0 0 4px rgba(var(--accent-rgb), 0.6));
}

.attack-btn .atk-name {
	font-weight: 800;
	color: #fff;
	font-size: 0.9em;
	max-width: 100%;
}

.attack-btn .atk-desc {
	font-weight: 500;
	color: rgba(var(--accent-soft-rgb), 0.85);
	font-size: 0.78em;
	max-width: 100%;
}

.attack-btn:hover:not(:disabled) {
	background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.38), rgba(var(--accent-deep-rgb), 0.22));
	border-color: var(--accent-soft);
	transform: translateY(-3px) scale(1.03);
	box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.55);
}

.attack-btn:active:not(:disabled) {
	transform: translateY(-1px) scale(0.98);
}

.attack-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
	transform: none;
}

/* ===== Victory ===== */

.victory-unlock {
	color: var(--accent-soft);
	font-size: 1em;
	margin: 1rem 0;
	font-weight: 700;
	text-shadow: 0 0 10px rgba(var(--accent-rgb), 0.6);
	animation: victoryGlow 1.6s ease-in-out infinite;
}

@keyframes victoryGlow {
	0%, 100% { opacity: 0.75; }
	50% { opacity: 1; }
}

#battle-victory h2 {
	animation: victoryTitlePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes victoryTitlePop {
	0% { transform: scale(0.5); opacity: 0; }
	100% { transform: scale(1); opacity: 1; }
}

/* ===== Reduced motion adjustments ===== */
@media (prefers-reduced-motion: reduce) {
	.battle-content,
	.battle-sparkles::before,
	.battle-sparkles::after,
	.battle-mewo,
	.bm-glow,
	.bm-tail,
	.bm-ear,
	.bm-eye,
	.mewo-dialogue,
	.attack-animation,
	.impact-spark,
	.dmg-popup,
	.battle-mewo.is-hit,
	.battle-mewo.is-hit .bm-flash,
	.battle-mewo.is-defeated,
	.vs-text,
	.mewo-health-container.is-low .health-fill,
	.victory-unlock,
	#battle-victory h2 {
		animation: none !important;
	}

	.battle-btn,
	.attack-btn,
	.health-fill {
		transition: none !important;
	}
}
