/*
Theme Name: SciFellow
Theme URI: https://scifellow.com/
Author: Sci Fellow
Description: A fast, simple theme for a science opportunities portal: header with search, a menu bar with every section (Jobs, PhD, JRF, Admit Card, Result, Answer Key, Syllabus and more), a full homepage, and clean post pages. Built to work with the SciFellow Positions plugin.
Version: 1.14.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: scifellow
*/

:root {
	--sf-ink: #172033;
	--sf-ink-2: #22304b;
	--sf-muted: #5a6476;
	--sf-rule: #dce2e8;
	--sf-wash: #f3f5f8;
	--sf-font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
	--sf-radius: 6px;
}

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

html {
	scroll-padding-top: 12px;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: #fff;
	color: var(--sf-ink);
	font-family: var(--sf-font);
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

a {
	color: #1f5fa8;
	text-underline-offset: 3px;
}

a:hover {
	color: var(--sf-ink);
}

img {
	max-width: 100%;
	height: auto;
}

:focus-visible {
	outline: 3px solid #1f6fb2;
	outline-offset: 2px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.sf-skip {
	position: absolute;
	left: 12px;
	top: -60px;
	z-index: 100;
	padding: 10px 14px;
	border-radius: var(--sf-radius);
	background: var(--sf-ink);
	color: #fff;
	font-weight: 600;
}

.sf-skip:focus {
	top: 12px;
	color: #fff;
}

.sf-wrap {
	width: 100%;
	max-width: 1220px;
	margin: 0 auto;
	padding: 0 20px;
}

/* ------------------------------------------------------------------ *
 * Header
 * ------------------------------------------------------------------ */

.sf-header {
	background: #fff;
}

.sf-header-in {
	display: flex;
	align-items: center;
	gap: 16px 28px;
	padding-top: 16px;
	padding-bottom: 16px;
}

.sf-brand {
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
	color: var(--sf-ink);
	text-decoration: none;
}

.sf-brand:hover {
	color: var(--sf-ink);
}

.sf-logo {
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: 58px;
	height: 58px;
	border: 2.5px solid var(--sf-ink);
	border-radius: 4px;
	font-size: 28px;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1;
}

.sf-logo-img {
	display: block;
	width: auto;
	max-height: 58px;
}

.sf-brand-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.sf-brand-name {
	font-size: 28px;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.015em;
}

.sf-brand-tag {
	margin-top: 3px;
	color: var(--sf-muted);
	font-size: 14px;
	line-height: 1.35;
}

.sf-search {
	display: flex;
	flex: 0 1 430px;
	gap: 6px;
	margin-left: auto;
}

.sf-search input[type="search"] {
	flex: 1 1 auto;
	min-width: 0;
	height: 44px;
	margin: 0;
	padding: 0 12px;
	border: 1.5px solid #c9d1da;
	border-radius: var(--sf-radius);
	background: #fff;
	color: var(--sf-ink);
	font: 400 15.5px/1 var(--sf-font);
}

.sf-search button {
	flex: 0 0 auto;
	height: 44px;
	padding: 0 18px;
	border: 0;
	border-radius: var(--sf-radius);
	background: var(--sf-ink);
	color: #fff;
	font: 600 15px/1 var(--sf-font);
	cursor: pointer;
}

.sf-search button:hover {
	background: var(--sf-ink-2);
}

/* Menu bar */

.sf-nav {
	background: var(--sf-ink);
	color: #fff;
}

.sf-nav-in {
	position: relative;
}

.sf-nav-toggle {
	display: none;
}

.sf-menu,
.sf-nav ul.menu {
	display: flex;
	flex-wrap: wrap;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sf-menu > li {
	position: relative;
	margin: 0;
}

.sf-menu > li > a {
	display: block;
	padding: 12px 11px;
	color: #fff;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.3;
	text-decoration: none;
	white-space: nowrap;
}

.sf-menu > li > a:hover,
.sf-menu > li.is-open > a {
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
}

.sf-menu > li.current-menu-item > a,
.sf-menu > li > a[aria-current="page"] {
	box-shadow: inset 0 -3px 0 #fff;
}

.sf-menu > li:first-child > a {
	padding-left: 0;
	padding-right: 14px;
}

.sf-menu > li:first-child > a:hover {
	background: none;
	text-decoration: underline;
	text-underline-offset: 5px;
}

.sf-menu .menu-item-has-children > a::after {
	content: "";
	display: inline-block;
	width: 6px;
	height: 6px;
	margin-left: 7px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: translateY(-3px) rotate(45deg);
}

.sf-menu .sub-menu {
	display: none;
	position: absolute;
	right: 0;
	top: 100%;
	z-index: 50;
	min-width: 220px;
	margin: 0;
	padding: 6px 0;
	border: 1px solid var(--sf-rule);
	border-radius: 0 0 var(--sf-radius) var(--sf-radius);
	background: #fff;
	box-shadow: 0 10px 30px rgba(23, 32, 51, 0.16);
	list-style: none;
}

.sf-menu .sub-menu a {
	display: block;
	padding: 9px 16px;
	color: var(--sf-ink);
	font-size: 15px;
	text-decoration: none;
}

.sf-menu .sub-menu a:hover {
	background: var(--sf-wash);
}

.sf-menu li.is-open > .sub-menu {
	display: block;
}

@media (hover: hover) and (min-width: 901px) {
	.sf-menu li:hover > .sub-menu,
	.sf-menu li:focus-within > .sub-menu {
		display: block;
	}

	.sf-menu li.is-dismissed > .sub-menu {
		display: none;
	}
}

/* ------------------------------------------------------------------ *
 * Main content
 * ------------------------------------------------------------------ */

.sf-main {
	padding-top: 24px;
	padding-bottom: 64px;
}

.sf-home {
	padding-top: 18px;
}

.sf-page-head {
	max-width: 900px;
	margin: 4px 0 18px;
}

.sf-page-head h1 {
	margin: 0 0 6px;
	color: var(--sf-ink);
	font-size: clamp(27px, 4vw, 38px);
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -0.01em;
}

.sf-page-intro,
.sf-page-intro p {
	margin: 0;
	color: var(--sf-muted);
	font-size: 17px;
	max-width: 68ch;
}

.sf-article {
	max-width: 900px;
}

.sf-entry {
	max-width: 860px;
	font-size: 16.5px;
	line-height: 1.65;
}

.sf-entry-wide {
	max-width: none;
}

.sf-entry > p,
.sf-entry > ul,
.sf-entry > ol,
.sf-entry > blockquote {
	max-width: 70ch;
}

.sf-entry h2 {
	margin: 34px 0 10px;
	font-size: 23px;
	font-weight: 600;
	line-height: 1.3;
}

.sf-entry h3 {
	margin: 26px 0 8px;
	font-size: 19px;
	font-weight: 600;
	line-height: 1.35;
}

.sf-entry ul,
.sf-entry ol {
	padding-left: 1.3em;
}

.sf-entry li {
	margin: 4px 0;
}

.sf-entry blockquote {
	margin: 20px 0;
	padding: 4px 0 4px 18px;
	border-left: 3px solid var(--sf-rule);
	color: #3b4558;
}

.sf-entry table:not(.sfp-table) {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}

.sf-entry table:not(.sfp-table) th,
.sf-entry table:not(.sfp-table) td {
	padding: 9px 12px;
	border: 1px solid var(--sf-rule);
	text-align: left;
	vertical-align: top;
}

.sf-entry table:not(.sfp-table) thead th {
	background: var(--sf-wash);
}

/* Post lists */

.sf-list {
	display: grid;
	gap: 14px;
	max-width: 900px;
}

.sf-card {
	padding: 16px 18px;
	border: 1px solid var(--sf-rule);
	border-radius: var(--sf-radius);
}

.sf-card-title {
	margin: 0;
	font-size: 19px;
	font-weight: 600;
	line-height: 1.35;
}

.sf-card-title a {
	color: var(--sf-ink);
	text-decoration: none;
}

.sf-card-title a:hover {
	text-decoration: underline;
}

.sf-card-meta {
	margin: 4px 0 0;
	color: var(--sf-muted);
	font-size: 14px;
}

.sf-card-excerpt p {
	margin: 8px 0 0;
	color: #3b4558;
}

.sf-empty {
	padding: 24px;
	border: 1.5px dashed var(--sf-rule);
	border-radius: var(--sf-radius);
	max-width: 900px;
}

.sf-empty .search-form {
	display: flex;
	gap: 8px;
}

.navigation.pagination {
	margin-top: 24px;
}

.navigation.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.navigation.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--sf-rule);
	border-radius: var(--sf-radius);
	color: var(--sf-ink);
	text-decoration: none;
}

.navigation.pagination .page-numbers.current {
	background: var(--sf-ink);
	border-color: var(--sf-ink);
	color: #fff;
}

/* Forms (comments, search) */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
textarea {
	font: inherit;
}

.sf-comments {
	max-width: 860px;
	margin-top: 40px;
	padding-top: 24px;
	border-top: 1px solid var(--sf-rule);
}

.sf-comments input[type="text"],
.sf-comments input[type="email"],
.sf-comments input[type="url"],
.sf-comments textarea {
	display: block;
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #c9d1da;
	border-radius: var(--sf-radius);
}

.sf-comments .submit {
	padding: 11px 18px;
	border: 0;
	border-radius: var(--sf-radius);
	background: var(--sf-ink);
	color: #fff;
	font: 600 15px/1 var(--sf-font);
	cursor: pointer;
}

/* ------------------------------------------------------------------ *
 * Footer
 * ------------------------------------------------------------------ */

.sf-footer {
	background: var(--sf-ink);
	color: #c8cfda;
	font-size: 15px;
}

.sf-footer-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 0.8fr);
	gap: 28px 36px;
	padding-top: 40px;
	padding-bottom: 32px;
}

.sf-footer h2 {
	margin: 0 0 12px;
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0;
}

.sf-footer-name {
	margin: 0 0 8px;
	color: #fff;
	font-size: 20px;
	font-weight: 700;
}

.sf-footer p {
	margin: 0 0 10px;
	line-height: 1.6;
}

.sf-footer ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.sf-footer li {
	margin: 0 0 8px;
	break-inside: avoid;
}

.sf-footer-cols {
	column-count: 2;
	column-gap: 24px;
}

.sf-footer a {
	color: #e8ecf2;
	text-decoration: none;
}

.sf-footer a:hover {
	color: #fff;
	text-decoration: underline;
}

.sf-footer-bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 20px;
	padding-top: 16px;
	padding-bottom: 22px;
	background: linear-gradient(rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.12)) 20px 0 / calc(100% - 40px) 1px no-repeat;
	font-size: 13.5px;
}

.sf-footer-bottom p {
	margin: 0;
}

/* ------------------------------------------------------------------ *
 * Small screens
 * ------------------------------------------------------------------ */

@media (max-width: 1060px) {
	.sf-footer-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 900px) {
	.sf-header-in {
		flex-wrap: wrap;
	}

	.sf-search {
		flex: 1 1 100%;
		margin-left: 0;
	}

	.sf-nav-toggle {
		display: inline-flex;
		align-items: center;
		gap: 10px;
		height: 48px;
		padding: 0;
		border: 0;
		background: none;
		color: #fff;
		font: 600 16px/1 var(--sf-font);
		cursor: pointer;
	}

	.sf-nav-toggle::before {
		content: "";
		width: 20px;
		height: 14px;
		background: linear-gradient(#fff, #fff) 0 0 / 100% 2px no-repeat, linear-gradient(#fff, #fff) 0 50% / 100% 2px no-repeat, linear-gradient(#fff, #fff) 0 100% / 100% 2px no-repeat;
	}

	.sf-menu,
	.sf-nav ul.menu {
		display: none;
		flex-direction: column;
		padding-bottom: 10px;
	}

	.sf-menu.is-open,
	.sf-nav ul.menu.is-open {
		display: flex;
	}

	.sf-menu > li > a,
	.sf-menu > li:first-child > a {
		padding: 11px 0;
		border-top: 1px solid rgba(255, 255, 255, 0.1);
	}

	.sf-menu .sub-menu {
		position: static;
		display: block;
		min-width: 0;
		padding: 0 0 6px 14px;
		border: 0;
		background: none;
		box-shadow: none;
	}

	.sf-menu .sub-menu a {
		padding: 8px 0;
		color: #dfe4ec;
	}

	.sf-menu .sub-menu a:hover {
		background: none;
		color: #fff;
	}

	.sf-menu .menu-item-has-children > a::after {
		display: none;
	}
}

@media (max-width: 560px) {
	.sf-logo {
		width: 46px;
		height: 46px;
		font-size: 22px;
	}

	.sf-brand-name {
		font-size: 23px;
	}

	.sf-brand-tag {
		font-size: 13px;
	}

	.sf-footer-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (prefers-reduced-motion: reduce) {
	* {
		scroll-behavior: auto !important;
	}
}
