/* HUFS Financial Engineering Lab — plain static stylesheet */

body {
	margin: 0;
	background: #FFFFFF;
	font-family: Palatino, "Palatino Linotype", "Book Antiqua", "Noto Serif KR", serif;
	font-size: 16px;
	line-height: 1.65;
	color: #1A1A1A;
}

h1, h2, h3, h4 {
	margin: 0;
	padding: 0;
	font-weight: normal;
	color: #1A1A1A;
}

h2 {
	font-size: 1.05em;
	text-transform: uppercase;
	letter-spacing: 2px;
	color: #0B3D6E;
}

h3 {
	font-size: 1.2em;
	margin-top: 1.4em;
}

p, ul, ol { margin-top: 0; }

a { color: #0B3D6E; text-decoration: none; border-bottom: 1px solid #B7C6D8; }
a:hover { border-bottom-color: #0B3D6E; }

#wrapper {
	width: 1080px;
	max-width: 100%;
	margin: 0 auto;
	padding: 0 24px 40px;
	box-sizing: border-box;
}

/* Header */

#header {
	padding: 40px 0 14px;
	border-bottom: 3px double #1A1A1A;
}

#header h1 {
	font-size: 2.1em;
	letter-spacing: -0.5px;
	line-height: 1.15;
}

#header h1 a {
	color: #1A1A1A;
	border: none;
}

#header p {
	margin: 4px 0 0;
	font-size: 0.95em;
	color: #555;
}

/* Menu */

#menu {
	border-bottom: 1px solid #1A1A1A;
}

#menu ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

#menu li {
	display: inline-block;
	margin-right: 28px;
}

#menu a {
	display: block;
	padding: 10px 0;
	color: #1A1A1A;
	border: none;
	font-size: 0.95em;
	letter-spacing: 0.5px;
}

#menu a:hover {
	color: #0B3D6E;
}

#menu .current_page_item a {
	color: #0B3D6E;
	box-shadow: inset 0 -2px 0 #0B3D6E;
}

/* Sections */

.section {
	padding: 34px 0 10px;
}

.section h2 {
	padding-bottom: 12px;
}

.section ul {
	padding-left: 20px;
}

.section li {
	margin-bottom: 6px;
}

.lead {
	font-size: 1.15em;
	line-height: 1.6;
}

.pub-list {
	list-style: none;
	padding-left: 0 !important;
}

.pub-list li {
	margin-bottom: 12px;
	padding-left: 1.4em;
	text-indent: -1.4em;
}

.year-heading {
	margin-top: 1.6em;
	font-size: 1em;
	color: #555;
	letter-spacing: 1px;
}

/* Two columns on home */

.columns {
	display: flex;
	gap: 64px;
}

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

.columns .side {
	flex: 0 0 260px;
	font-size: 0.92em;
	color: #333;
}

.side h2 {
	font-size: 0.85em;
}

.side p {
	margin-bottom: 14px;
}

/* Team */

.person {
	display: flex;
	gap: 28px;
	margin-bottom: 28px;
}

/* A member card is a link to the member's own page. */
a.person {
	color: inherit;
	border-bottom: none;
	border-radius: 4px;
	transition: box-shadow 0.15s;
}

a.person:hover { box-shadow: 0 2px 10px rgba(11, 61, 110, 0.12); }
a.person:hover .bio h4 { color: #0B3D6E; }
a.person .bio .interests { color: #555; }

.person .photo {
	flex: 0 0 150px;
	width: 150px;
	height: 190px;
	background: #EEE;
	border: 1px solid #DDD;
}

.person .photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.person .bio h3 {
	margin-top: 0;
}

.person .bio p {
	margin: 0 0 6px;
}

dl.news dt {
	margin-top: 14px;
	color: #0B3D6E;
	letter-spacing: 1px;
}

dl.news dd {
	margin: 0 0 6px 0;
}

/* Footer */

#footer {
	margin-top: 40px;
	padding-top: 16px;
	border-top: 1px solid #1A1A1A;
	font-size: 0.85em;
	color: #555;
}

#footer p {
	margin: 0 0 8px;
}

#footer a {
	color: #555;
	border-bottom-color: #CCC;
}

/* Small screens */

@media (max-width: 640px) {
	#header { padding-top: 24px; }
	#header h1 { font-size: 1.6em; }
	#menu li { margin-right: 16px; }
	.columns { flex-direction: column; gap: 0; }
	.columns .side { flex: none; }
	.person { flex-direction: column; }
}

/* Projects */

dl.projects dt {
	margin-top: 18px;
	font-size: 1.05em;
}

dl.projects dt span {
	display: block;
	font-size: 0.85em;
	color: #555;
	letter-spacing: 0.5px;
}

dl.projects dd {
	margin: 4px 0 0 0;
}

/* Smaller member cards */

.person.small {
	margin-bottom: 20px;
}

.person.small .photo {
	flex: 0 0 110px;
	width: 110px;
	height: 140px;
}

.person.small .bio h4 {
	font-size: 1.1em;
	margin: 0 0 4px;
}

.section h3 + .person {
	margin-top: 14px;
}

/* Member grid and social links */

.member-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px 40px;
	margin-top: 14px;
}

.member-grid .person {
	margin-bottom: 20px;
}

.member-grid .bio {
	font-size: 0.95em;
}

.bio .links {
	margin-top: 4px;
}

.bio .links a {
	display: inline-block;
	color: #0B3D6E;
	border: none;
	vertical-align: middle;
	margin-right: 8px;
}

.bio .links a:hover {
	color: #072B4F;
}

.bio .links svg {
	display: block;
}

@media (max-width: 640px) {
	.member-grid { grid-template-columns: 1fr; }
}

/* Footer logo */

#footer .footer-logo {
	margin-bottom: 14px;
}

#footer .footer-logo a {
	border: none;
}

#footer .footer-logo img {
	height: 34px;
	width: auto;
	display: block;
}

/* Publication legend and member underline */

.legend {
	font-size: 0.85em;
	color: #555;
	margin: -4px 0 16px;
}

.pub-list u, .legend u {
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-color: #0B3D6E;
}

/* Team member page */

/* The photo sits in a column of its own, so short text never slips under it. */
.post.person-detail {
	position: relative;
	padding: 6px 0 26px 184px;
	min-height: 200px;
}

.person-detail .photo {
	position: absolute;
	left: 0;
	top: 4px;
	width: 150px;
	height: 190px;
	background: #EEE;
	border: 1px solid #DDD;
}

.person-detail .photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.person-detail .role {
	font-weight: 600;
	color: #0B3D6E;
	margin: 2px 0 12px;
}

.person-detail .period { color: #555; font-weight: normal; }

.person-detail h5 {
	margin: 18px 0 6px;
	font-size: 0.85em;
	font-weight: normal;
	text-transform: uppercase;
	letter-spacing: 1.5px;
	color: #555;
}

.person-detail .links { margin-top: 4px; }

.person-detail .links a {
	display: inline-block;
	color: #0B3D6E;
	border: none;
	vertical-align: middle;
	margin-right: 8px;
}

.person-detail .links svg { display: block; }

@media (max-width: 640px) {
	.post.person-detail { padding-left: 0; min-height: 0; }
	.person-detail .photo { position: static; margin: 0 0 14px; }
}

/* Bold member names */

.person .bio h3,
.person .bio h4 {
	font-weight: bold;
}

/* Footer: logo left, address right */

#footer {
	display: flex;
	align-items: flex-start;
	gap: 40px;
}

#footer .footer-logo {
	flex: 0 0 auto;
	margin: 0;
	padding-top: 4px;
}

#footer .footer-logo img {
	height: 40px;
}

#footer .footer-text {
	flex: 1 1 auto;
}

@media (max-width: 640px) {
	#footer { flex-direction: column; gap: 14px; }
}

/* Home notice */

.notice {
	margin-top: 28px;
	padding: 12px 16px;
	border: 1px solid #0B3D6E;
	border-left-width: 4px;
	background: #F4F7FA;
	font-size: 0.95em;
}

.notice b {
	color: #0B3D6E;
}

/* Menu: right-aligned item with external icon */

#menu ul {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
}

#menu li.menu-right {
	margin-left: auto;
	margin-right: 0;
}

#menu svg.ext {
	vertical-align: -1px;
	margin-left: 2px;
	opacity: 0.7;
}

/* Blog */

.blog-intro {
	color: #555;
	margin-bottom: 6px;
}

.post {
	padding: 22px 0 26px;
	border-bottom: 1px solid #E5E5E5;
}

.post:last-child {
	border-bottom: none;
}

.post-meta {
	font-size: 0.85em;
	color: #555;
	letter-spacing: 0.3px;
	margin-bottom: 4px;
}

/* Category chip, on post pages and on the blog cards */
.tag {
	display: inline-block;
	padding: 0 8px;
	border: 1px solid #B7C6D8;
	border-radius: 0;
	color: #0B3D6E;
}

.post-meta .tag {
	font-size: 0.95em;
}

.post-kr {
	color: #555;
	margin-bottom: 10px;
}

.post-body {
	margin-bottom: 12px;
}

.post-body p {
	margin-bottom: 10px;
}

.gallery {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
	margin-top: 14px;
}

.gallery.n1 { grid-template-columns: minmax(0, 620px); }
.gallery.n2 { grid-template-columns: repeat(2, 1fr); }

.gallery figure {
	margin: 0;
}

.gallery a {
	border: none;
	display: block;
}

.gallery img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	display: block;
	border: 1px solid #DDD;
	border-radius: 3px;
	background: #EEE;
}

.gallery figcaption {
	font-size: 0.82em;
	color: #555;
	margin-top: 5px;
	line-height: 1.45;
}

@media (max-width: 640px) {
	#menu li.menu-right { margin-left: 0; }
	.gallery, .gallery.n2 { grid-template-columns: 1fr 1fr; }
	.gallery.n1 { grid-template-columns: 1fr; }
}

/* Blog cards */

.cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
	margin: 14px 0 30px;
}

.card {
	display: flex;
	flex-direction: column;
	border: 1px solid #DDD;
	border-radius: 0;
	background: #fff;
	color: #1A1A1A;
	overflow: hidden;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.card:hover {
	border-color: #0B3D6E;
	box-shadow: 0 2px 10px rgba(11, 61, 110, 0.12);
}

.card .thumb {
	aspect-ratio: 4 / 3;
	background: #EEF2F6;
	overflow: hidden;
}

.card .thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.card .thumb-blank {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 3em;
	color: #B7C6D8;
}

.card-body {
	padding: 14px 16px 12px;
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
}

.card-meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 0.8em;
	color: #555;
	margin-bottom: 8px;
}

.card h4 {
	font-size: 1.1em;
	line-height: 1.35;
	margin: 0 0 2px;
}

.card .post-kr {
	font-size: 0.9em;
	margin-bottom: 6px;
}

.card-summary {
	font-size: 0.9em;
	color: #444;
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin-bottom: 10px;
}

.card-foot {
	flex-wrap: wrap;
	gap: 4px 12px;
	margin-top: auto;
	display: flex;
	justify-content: space-between;
	font-size: 0.82em;
	color: #555;
}

.card-foot .more {
	color: #0B3D6E;
}

/* Single post page */

.crumb {
	font-size: 0.9em;
	margin-bottom: 4px;
}

.crumb a { border: none; }

.post.single {
	border-bottom: none;
	padding-top: 6px;
}

.post-title {
	font-size: 1.7em;
	text-transform: none;
	letter-spacing: 0;
	color: #1A1A1A;
	margin-bottom: 2px;
}

@media (max-width: 900px) {
	.cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
	.cards { grid-template-columns: 1fr; }
}

/* Member period */

.person .period {
	color: #555;
}

/* A single gallery image keeps its own proportions (screenshots, posters) */

.gallery.n1 img {
	aspect-ratio: auto;
	height: auto;
}

/* Post references */

.post-links {
	margin-top: 22px;
	padding-top: 12px;
	border-top: 1px solid #E5E5E5;
}

.post-links h5 {
	margin: 0 0 6px;
	font-size: 0.85em;
	font-weight: normal;
	text-transform: uppercase;
	letter-spacing: 1.5px;
	color: #555;
}

.post-links ul {
	margin: 0;
	padding-left: 18px;
	font-size: 0.92em;
}

.post-links li {
	margin-bottom: 4px;
}

/* Publications toolbar: year jump links and totals */
.pub-tools {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 20px;
	justify-content: space-between;
	align-items: baseline;
	margin: 0 0 22px;
	padding-bottom: 10px;
	border-bottom: 1px solid #E5E5E5;
	font-size: 0.9em;
}

.pub-tools .jump a {
	margin-right: 10px;
}

.pub-tools .pub-stats {
	color: #555;
}

/* Citation count and BibTeX expander on a publication */
.pub-list .cited {
	color: #555;
	font-size: 0.88em;
	white-space: nowrap;
}

.pub-list .cited a {
	border-bottom-color: #D5DEE8;
}

details.bib {
	display: inline;
}

details.bib > summary {
	display: inline;
	list-style: none;
	cursor: pointer;
	margin-left: 6px;
	font-size: 0.82em;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: #0B3D6E;
	border-bottom: 1px solid #B7C6D8;
}

details.bib > summary::-webkit-details-marker { display: none; }

details.bib > summary:hover {
	border-bottom-color: #0B3D6E;
}

details.bib[open] > summary {
	color: #555;
	border-bottom-color: #CCC;
}

details.bib > pre {
	/* .pub-list li has a -1.4em hanging indent; without this it also pulls the
	   first line of the BibTeX block outside the box. */
	text-indent: 0;
	margin: 10px 0 4px;
	padding: 12px 14px;
	background: #F7F8FA;
	border-left: 2px solid #B7C6D8;
	font-family: Consolas, "Courier New", monospace;
	font-size: 0.82em;
	line-height: 1.55;
	/* pre-wrap, not pre: an inline <details> mis-measures a scrolling child and
	   clips the first character. Wrapping also keeps long author lists visible,
	   and BibTeX ignores line breaks inside braces, so copying still works. */
	white-space: pre-wrap;
	word-break: break-word;
}

/* Blog filters. The radios stay in the DOM (off-screen, not display:none)
   so they can still be reached with the keyboard. */
.bfilter {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}

.filters {
	margin: 0 0 20px;
}

.filter-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 5px;
	margin: 0 0 6px;
}

.filter-label {
	width: 78px;
	flex: 0 0 auto;
	font-size: 0.72em;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: #777;
}

.filters label {
	padding: 2px 9px;
	border: 1px solid #CBD5E1;
	border-radius: 0;
	font-size: 0.78em;
	letter-spacing: 0.3px;
	color: #333;
	cursor: pointer;
	user-select: none;
}

.filters label:hover {
	border-color: #0B3D6E;
	color: #0B3D6E;
}

.bfilter:focus-visible ~ .filters label {
	outline: 2px solid #0B3D6E;
	outline-offset: 2px;
}

/* Shown only for the year/category pairs that match nothing (see build.js). */
.blog .empty {
	display: none;
	color: #777;
	font-size: 0.95em;
	padding: 8px 0 24px;
}

@media (max-width: 640px) {
	.filter-label { width: 100%; }
}

/* Conference-trip globe on the Blog page (drawn by globe.js) */

.globe {
	margin: 18px 0 34px;
	padding-bottom: 22px;
	border-bottom: 1px solid #E5E5E5;
}

.globe h3 {
	margin: 0 0 4px;
	font-size: 1.05em;
}

.globe-stage {
	position: relative;
	width: 100%;
	overflow: visible;
}

.globe-stage canvas {
	display: block;
	/* No browser gestures on the globe: globe.js turns it, pinches it, and
	   scrolls the page itself for a one-finger vertical swipe. */
	touch-action: none;
	user-select: none;
	-webkit-user-select: none;
}

.globe-photos {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

/* Each photo starts folded up on the destination (--x0/--y0) and drifts out to
   its slot (--x/--y), a little tilted, like prints laid on a table. */
.gphoto {
	position: absolute;
	left: 0;
	top: 0;
	width: 180px;
	margin: 0;
	padding: 6px 6px 7px;
	background: #fff;
	border: 1px solid #D5D5D5;
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.16);
	pointer-events: auto;
	opacity: 0;
	transform: translate(calc(var(--x0) - 90px), calc(var(--y0) - 70px)) rotate(0deg) scale(0.2);
	transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.25, 1), opacity 0.35s;
}

.gphoto.in {
	opacity: 1;
	transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(1);
}

.gphoto.out {
	opacity: 0;
	transform: translate(calc(var(--x0) - 90px), calc(var(--y0) - 70px)) rotate(0deg) scale(0.4);
	transition: transform 0.4s ease-in, opacity 0.3s;
}

.gphoto a { display: block; border: none; }

.gphoto img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	background: #EEF2F6;
}

.gphoto figcaption {
	font-size: 0.72em;
	line-height: 1.35;
	color: #555;
	padding: 6px 2px 0;
}

.gphoto.gnote {
	width: 170px;
	padding: 12px 14px;
	font-size: 0.85em;
	line-height: 1.4;
}

/* The conference logo, hung like a banner over the top of the globe: logo on
   the left, the trip's name beside it. */
.gphoto.glogo {
	width: auto;
	max-width: 280px;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 16px 8px 10px;
}

.gphoto.glogo img {
	aspect-ratio: auto;
	width: auto;
	max-width: 160px;
	height: 44px;
	object-fit: contain;
	background: none;
}

.gphoto.glogo figcaption {
	padding: 0;
	font-style: italic;
	font-size: 0.85em;
	white-space: nowrap;
	color: #B4262A;
}

.gphoto.glogo.planned figcaption { color: #8B95A1; }

.gphoto:hover { border-color: #0B3D6E; z-index: 2; }

/* Zoom buttons in the corner of the stage; the wheel and pinch do the same. */
.globe-zoom {
	position: absolute;
	right: 0;
	bottom: 8px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.globe-zoom button {
	width: 28px;
	height: 28px;
	padding: 0;
	font: 18px/1 Palatino, "Palatino Linotype", "Book Antiqua", serif;
	border: 1px solid #CBD5E1;
	border-radius: 0;
	background: #fff;
	color: #0B3D6E;
	cursor: pointer;
}

.globe-zoom button:hover { border-color: #0B3D6E; }

.globe-trips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 8px;
	margin: 6px 0 6px;
}

.globe-trips button {
	font: inherit;
	font-size: 0.85em;
	padding: 4px 11px 4px 6px;
	border: 1px solid #CBD5E1;
	border-radius: 0;
	background: #fff;
	color: #1A1A1A;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.globe-trips button .n {
	display: inline-block;
	min-width: 18px;
	height: 18px;
	line-height: 18px;
	text-align: center;
	border-radius: 9px;
	font-size: 0.8em;
	background: #EEF2F6;
	color: #0B3D6E;
}

.globe-trips button .when {
	color: #777;
	font-size: 0.9em;
}

.globe-trips button:hover { border-color: #0B3D6E; color: #0B3D6E; }

/* Planned trips: the post is hidden, only its route is on the globe. */
.globe-trips button.planned { color: #777; border-style: dashed; }
.globe-trips button.planned .n { color: #777; }

.globe-trips button.on {
	border-color: #0B3D6E;
	background: #0B3D6E;
	color: #fff;
}

.globe-trips button.on .n { background: #fff; }
.globe-trips button.on .when { color: #CFD9E5; }

.globe-hint {
	font-size: 0.8em;
	color: #777;
	margin: 0;
}

.globe-list { margin: 8px 0 0; padding-left: 20px; }

/* Narrow screens: no room beside the globe, so the photos line up under it. */
@media (max-width: 700px) {
	.globe-photos {
		position: static;
		display: flex;
		flex-wrap: wrap;
		gap: 10px;
		padding-top: 8px;
	}
	.gphoto {
		position: static;
		width: calc(50% - 5px);
		box-sizing: border-box;
		transform: none;
		transition: opacity 0.35s;
	}
	.gphoto.in, .gphoto.out { transform: none; }
	/* The logo banner takes a row of its own above the photos. */
	.gphoto.glogo { width: 100%; max-width: none; justify-content: center; }
}
