/* custom property */
:root {
	--accent-color: #800000;  /* could also be coded #800 */
	--gradient-color: #f6bb73;

	--light_menu: white;
	--mid_menu: antiquewhite;
	--dark_menu: black;
}

/* reset */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

/* default styles */
body {
	font-family: Arial, Helvetica, sans-serif;
    font-size: calc(15px + .2vw);
	width: min(80%, 1024px);
	line-height: 1.5;
	margin: auto;
	border: 2px solid var(--accent-color);
}
h1, h2, h3, p, ul {
	padding: .25em 0;
}
a:hover, a:focus{
	font-style: italic;
	color: var(--accent-color);
}
h1 {
	font-size: 150%;
}
h2 {
	font-size: 130%;
	color: var(--accent-color);
}
h3 {
	font-size: 105%;
}
ul {
	margin-left: 2em;
}

/* the styles for the header */
header {
	text-align: center;
	line-height: 1.2;
	border-bottom: 2px solid var(--accent-color);
	background-image: linear-gradient(
	    30deg, var(--gradient-color) 0%, white 30%, white 65%, var(--gradient-color) 100%);
	& h2 {
		font-size: 175%;
		padding: .5em 0 0 0;
	}
	& h3 {
		font-size: 130%;
		font-style: italic;
		padding-bottom: 1em;
	}
	& img {
		display: none;
	}
}

/* the styles for the main content */
main {
	display: flex;
	flex-direction: column-reverse;
	padding: 0 1em 1em;
	& blockquote {
		font-style: italic;
		padding-left: 1em;
	}
	& h3 + img { /* speaker images */
		width: clamp(40px, 50%, 75px);
		border: 4px double var(--accent-color);
		border-radius: 10px;
	}
}

/* the styles for the section */
section {
	padding-left: .5em;
	border-bottom: 8px double var(--accent-color);
	& img {
		width: clamp(100px, 50%, 250px);
		float: right;
		margin: 0 1em .25em;
	}
}

/* the styles for the aside */
aside {
	padding-right: .5em;
}

/* the styles for the footer */
footer {
	background-color: var(--accent-color);
	& p {
		text-align: center;
		color: white;
		padding: 1em 0;
	}
}

/* CSS class */
.featured {
	border-top: 2px solid var(--accent-color);
	border-bottom: 2px solid var(--accent-color);
	padding: .5em 0 1em;
}
.speaker {
	& h1 {
		color: var(--accent-color);
	}
	& h2 {
		color: black;
	}
	& p {
		padding: .5em 0; 
	}	
}
.large {
	font-size: 125%;
}

/* styles for the menu */
.menu {
	position: absolute;
	left: 0;
	background-color: var(--accent-color);
	width: 40%;
	display: none;
}

.navbar {
	clear: left;
	position: relative;
	background-color: var(--accent-color);
	& a {
		display: block;
		padding: 1em;
		text-decoration: none;
		margin: 0 2px 2px 0;
	}
	& a:link, a:visited { 
		color: var(--light_menu);
	}
	& a:hover, a:focus, a.current {
		background-color: var(--mid_menu);
		color: var(--dark_menu);
	}
	& ul {
		list-style-type: none;
		padding: 0;
		margin: 0;
	}
}

.menu-btn {                                
    display: block;
    padding: 1em;
    color: var(--light_menu); 
}
.menu-btn::after { 
    content: "\2630";                    /* hamburger symbol */
}

#checkbox-toggle { display: none; }      /* checkbox is always hidden */

/* when checkbox is checked, show menu and change icon */
#checkbox-toggle:checked ~ .menu { 
    display: block; 
}
#checkbox-toggle:checked ~ .menu-btn::after {
    content: "\2716";                    /* close (X) symbol */
}

.menu li:has(.submenu) {
	position: relative;
	& small::after { content: "\25b6"; }  /* right triangle */
	& small { margin-left: .25em; }
	&:hover > .submenu {
		display: block;
	}
}

.submenu {
	position: absolute;
	top:0;
	left: 100%;
	width: 100%;
	background-color: var(--accent-color);
	color: var(--light_menu);
	display: none;
	& > li a { margin: 2px; }
}


/* media queries */
@media only screen and (min-width: 922px) {
	main {
		flex-direction: row;
	}
	
	section {
		flex-basis: 75%;
		border-bottom: none;
	}
	
	aside {
		flex-basis: 25%;
	}
}

@media only screen and (min-width: 786px) {
	.menu {
		display: flex;
		position: relative;
		width: 100%;
		& li { 
			flex-basis: 20%; 
			text-align: center;
		}
	}

	section {
		border-bottom: none;
	}
	
	.menu-btn { display: none; }

	#checkbox-toggle:checked ~ .menu { display: flex; }

	.menu li:has(.submenu) {
		& small::after { content: "\25bc"; }  /* down triangle */
	}
	
	.submenu {
		top: auto;
		left: 0;
		right: 0;
		& > li a { margin: 0 2px 2px; }
	}

	.navbar {
		& a {
			margin: 0 1px 2px;
		}
	}

	.menu > li:first-child a { margin-left: 0; }
	.menu > li:last-child a { margin-right: 0; }
}

@media only screen and (min-width: 658px) {
	section {
		border-bottom: none;
	}

	header {
		text-align: left;
		& img {
			display: block;
			width: clamp(40px, 15%, 80px);
			float: left;
			margin: .75em 1em;
		}
	}
}