/* ==========================================================
   Custom additions for Md. Ar Rafi Bin Arif's academic site
   (loaded after the template CSS)
   ========================================================== */

/* ---------- Theme toggle ---------- */
.theme-toggle {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	border: 1px solid var(--tj-theme-primary);
	background: transparent;
	color: var(--tj-white);
	font-size: 18px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-left: 15px;
	transition: 0.3s;
	cursor: pointer;
}
.theme-toggle:hover {
	background: var(--tj-theme-primary);
	color: var(--tj-white);
}
.theme-toggle .fa-sun-bright {
	display: none;
}
body.light-mode .theme-toggle {
	color: var(--tj-theme-accent-1);
}
body.light-mode .theme-toggle:hover {
	color: var(--tj-white);
}
body.light-mode .theme-toggle .fa-sun-bright {
	display: inline-block;
}
body.light-mode .theme-toggle .fa-moon {
	display: none;
}
.header-button {
	display: flex;
	align-items: center;
}
@media (max-width: 1199px) {
	.header-button .btn {
		display: none;
	}
}

/* ---------- Hero ---------- */
.hero-section .hero-sub-title {
	white-space: normal;
}
.hero-affiliation {
	color: var(--tj-grey-1);
	font-size: 16px;
	margin-top: -10px;
	margin-bottom: 20px;
}
.hero-affiliation {
	position: relative;
	padding-left: 22px;
	line-height: 1.5;
}
.hero-affiliation i {
	color: var(--tj-theme-primary);
	position: absolute;
	left: 0;
	top: 4px;
}

/* ---------- Tighter rhythm between sections (template default is 120px) ---------- */
.services-section,
.portfolio-section,
.resume-section,
.skills-section,
.testimonial-section,
.contact-section {
	padding-top: 90px;
	padding-bottom: 90px;
}
.section-header {
	margin-bottom: 40px;
}
@media (max-width: 767px) {
	.services-section,
	.portfolio-section,
	.resume-section,
	.skills-section,
	.testimonial-section,
	.contact-section {
		padding-top: 60px;
		padding-bottom: 60px;
	}
}

/* ---------- Research interests ---------- */
.interest-list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin-top: 25px;
	padding: 0;
	list-style: none;
}
.interest-list li {
	padding: 7px 16px;
	border-radius: 30px;
	border: 1px solid var(--tj-theme-secondary);
	background: var(--tj-theme-accent-2);
	color: var(--tj-grey-3);
	font-size: 14px;
	line-height: 1.4;
}
body.light-mode .interest-list li {
	background: #f6f3fc;
	border-color: #e4dcfb;
	color: #2a1454;
}

/* ---------- Keyword tags (popups + skill groups) ---------- */
.keyword-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 0 !important;
	margin: 0;
	list-style: none;
}
.keyword-list li,
.popup_content_area .portfolio_description ul.keyword-list li {
	list-style: none;
	margin: 0;
	padding: 5px 14px;
	border-radius: 30px;
	font-size: 14px;
	line-height: 1.4;
	background: #f1ecfe;
	color: #2a1454;
	border: 1px solid #e0d6fb;
}

/* ---------- Skill groups ---------- */
.skill-groups {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
	margin-top: 50px;
}
.skill-group {
	border-radius: 20px;
	padding: 24px 26px 26px;
	background: var(--tj-theme-accent-2);
	border: 1px solid var(--tj-theme-secondary);
	transition: border-color 0.3s;
}
.skill-group:hover {
	border-color: var(--tj-theme-primary);
}
.skill-group-head {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
}
.skill-group-head i {
	width: 42px;
	height: 42px;
	border-radius: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	color: var(--tj-white);
	background: linear-gradient(135deg, var(--tj-theme-primary), var(--tj-theme-secondary));
}
.skill-group-head h4 {
	font-size: 18px;
	margin: 0;
}
.skill-group .keyword-list li {
	background: transparent;
	color: var(--tj-grey-3);
	border-color: var(--tj-theme-secondary);
}
body.light-mode .skill-group {
	background: #ffffff;
	border-color: #e4dcfb;
}
body.light-mode .skill-group .keyword-list li {
	background: #f6f3fc;
	color: #2a1454;
	border-color: #e4dcfb;
}
@media (max-width: 991px) {
	.skill-groups {
		grid-template-columns: 1fr;
	}
}

/* ---------- Section spacing: Skills flows straight into Honors ---------- */
#skills-section {
	padding-bottom: 60px;
}
#honors-section {
	padding-top: 40px;
}

/* ---------- Hero stats: sit closer to the intro ---------- */
.hero-section .funfact-area {
	margin-top: 70px;
}

/* ---------- Experience items: dates ---------- */
.services-widget .service-item .service-date {
	display: block;
	width: 100%;
	font-size: 14px;
	font-weight: 500;
	color: inherit;
	opacity: 0.7;
	text-transform: none;
	margin-top: 6px;
}

/* ---------- Publications / projects grid ---------- */
/* Centred flex grid (isotope is removed in index.html) */
.portfolio-box.pub-grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	column-gap: 4%;
	height: auto !important;
}
.portfolio-box.pub-grid .portfolio-sizer,
.portfolio-box.pub-grid .gutter-sizer {
	display: none;
}
.portfolio-box.pub-grid .portfolio-item {
	position: relative !important;
	left: auto !important;
	top: auto !important;
}
.portfolio-box .portfolio-item.is-hidden {
	display: none;
}
.portfolio-box .portfolio-item.is-shown {
	animation: pubFadeIn 0.4s ease both;
}
@keyframes pubFadeIn {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}
/* Titles always visible below the image; whole card opens the popup */
.portfolio-box .portfolio-item {
	position: relative;
	padding-bottom: 0;
}
.portfolio-box .portfolio-item .content-box,
.portfolio-box .portfolio-item:hover .content-box {
	position: static;
	opacity: 1;
	visibility: visible;
	transform: none;
	width: 100%;
	margin: 22px 0 30px;
	padding: 18px 60px 18px 22px;
}
.portfolio-box .portfolio-item .content-box .portfolio-title {
	font-size: 21px;
	line-height: 1.35;
	margin-bottom: 6px;
}
.portfolio-box .portfolio-item .content-box p {
	font-size: 14px;
	opacity: 0.85;
}
.portfolio-box .portfolio-item .content-box i {
	top: auto;
	bottom: 62px;
	right: 60px;
	transform: none;
}
.portfolio-box .portfolio-item:hover .content-box i {
	transform: rotate(45deg);
}
.portfolio-box .portfolio-item .image-box img {
	transition: transform 0.4s;
}
.portfolio-box .portfolio-item:hover .image-box img {
	transform: scale(1.02);
}
.portfolio-item .content-box .pub-venue {
	font-style: italic;
}
@media (max-width: 767px) {
	.portfolio-box .portfolio-item {
		width: 100%;
		padding: 20px 20px 0;
	}
	.portfolio-box .portfolio-item .content-box i {
		right: 40px;
		bottom: 55px;
	}
}
.portfolio-item .image-box img {
	width: 100%;
	aspect-ratio: 1168 / 1000;
	object-fit: cover;
	background: #f5f7fb;
}

/* ---------- Popups ---------- */
.popup_modal_img img {
	max-height: 560px;
	width: auto;
	max-width: 100%;
}
.popup_content_area .portfolio_info_text .title {
	font-size: 28px;
	line-height: 1.3;
}
@media (max-width: 767px) {
	.popup_content_area .portfolio_info_text .title {
		font-size: 21px;
	}
	.popup_content_area .portfolio_description .title {
		font-size: 24px;
	}
}
.popup-kicker {
	display: inline-block;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--tj-theme-primary);
	margin-bottom: 10px;
}
.popup-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 20px;
}
.portfolio_info .portfolio_info_text .popup-actions .btn {
	margin-top: 0;
}
.popup-actions .copy-cite {
	cursor: pointer;
	background: transparent;
}
.cite-box {
	background: #f6f3fc;
	border: 1px solid #e4dcfb;
	border-left: 4px solid var(--tj-theme-primary);
	border-radius: 10px;
	padding: 14px 18px;
	font-size: 15px !important;
	line-height: 1.6;
	color: #2a1454 !important;
	word-break: break-word;
}
.popup_content_area .portfolio_description .desc > p + h3 {
	margin-top: 22px;
}
.popup_content_area .portfolio_info_text .authors {
	font-size: 15px;
	margin-bottom: 8px;
}
.popup_content_area .portfolio_info_text .authors strong {
	color: var(--tj-theme-primary);
}
.popup_content_area .portfolio_description {
	padding: 40px 40px 50px;
}
.popup_content_area .portfolio_description h3 {
	font-size: 20px;
	margin: 25px 0 12px;
	color: var(--tj-black-2);
}
.popup_content_area .portfolio_description ul {
	padding-left: 20px;
	color: var(--tj-theme-accent-1);
}
.popup_content_area .portfolio_description ul li {
	list-style: disc;
	margin-bottom: 8px;
	font-size: 16px;
}
.popup_content_area .portfolio_info_items .info_item .value a {
	word-break: break-all;
}
@media (max-width: 767px) {
	.popup_modal_content .portfolio_info .portfolio_info_text,
	.popup_modal_content .portfolio_info .portfolio_info_items {
		max-width: 100%;
	}
	.popup_content_area .portfolio_description {
		padding: 30px 20px 40px;
	}
}

/* ---------- Education / work notes ---------- */
.resume-widget .resume-item .resume-note {
	font-size: 14px;
	color: var(--tj-grey-1);
	margin: 8px 0 0;
}

/* ---------- AR monogram logo (inline SVG, follows the theme) ---------- */
.site-logo {
	display: block;
	width: 100%;
	height: auto;
	color: var(--tj-white);
	transition: color 0.3s;
}
.site-logo .ring {
	transition: transform 0.3s;
	transform-box: fill-box;
	transform-origin: center;
}
.logo-box a:hover .site-logo .ring,
.footer-logo-box a:hover .site-logo .ring {
	transform: scale(1.35);
}
body.light-mode .tj-header-area .site-logo {
	color: var(--tj-theme-accent-1);
}
.tj-header-area .logo-box {
	max-width: 68px;
}

/* ---------- Skills: tool names instead of percentages ---------- */
.skills-widget {
	align-items: flex-start !important;
}
.skills-widget .skill-inner {
	height: 250px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}
.skills-widget .skill-item .skill-inner .icon-box {
	height: 130px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 20px;
}
.skills-widget .skill-item .skill-inner .icon-box img {
	max-height: 130px;
	width: auto;
	max-width: 100%;
	object-fit: contain;
}
.skills-widget .skill-item .number.tool-name {
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
}
@media (max-width: 575px) {
	.skills-widget .skill-item {
		max-width: calc(50% - 10px);
	}
	.skills-widget .skill-inner {
		height: 200px;
	}
	.skills-widget .skill-item .skill-inner .icon-box {
		height: 95px;
	}
	.skills-widget .skill-item .skill-inner .icon-box img {
		max-height: 95px;
	}
}

/* ---------- Honors list ---------- */
.honor-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 20px;
	margin-top: 50px;
}
.honor-card {
	border-radius: 20px;
	padding: 24px 26px;
	background: var(--tj-theme-accent-2);
	border: 1px solid var(--tj-theme-secondary);
}
.honor-card h4 {
	font-size: 18px;
	margin-bottom: 6px;
}
.honor-card p {
	margin: 0;
	font-size: 14px;
	color: var(--tj-grey-1);
}
.honor-card .year {
	color: var(--tj-theme-primary);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	display: block;
	margin-bottom: 6px;
}
body.light-mode .honor-card {
	background: #ffffff;
	border-color: #e4dcfb;
}

/* ---------- Mentors (testimonial carousel) ---------- */
.testimonial-item .quote.mentor-note {
	font-size: 17px;
	font-style: normal;
	flex-grow: 1;
}
/* Equal-height mentor cards: stretch every slide to the tallest one */
.testimonial-carousel .owl-stage {
	display: flex;
}
.testimonial-carousel .owl-item {
	display: flex;
}
.testimonial-carousel .testimonial-item {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
}

/* ---------- Contact ---------- */
.contact-intro p {
	font-size: 17px;
}
.contact-intro .button-box {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	margin-top: 30px;
}
.contact-info-list .icon-box i.fa-light,
.contact-info-list .icon-box i.fa-brands {
	font-size: 22px;
}
