.hidden{
    display:none;
}

body{
    font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
    background-color: #fdf6ee;
    color: rgb(35, 63, 41);
    font-size: 20px;
    line-height: 1.4em;
    margin: 0;
}

/* navigation menu */
.topbar{
    display:flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: row-reverse;
}
nav{
    width: 100%;
    margin:0 50px;
}
nav ul{
    display: flex;
    max-width: 950px;
    justify-content: space-between;
    align-items:center;
}
nav li{
    list-style: none;
    width: 100%;
    padding: 10px;
    font-size: 23px;
}
nav li a:link{font-weight:500;}
button{
    width: 100px;
    height: 100px;
    background-color: transparent;
    border: none;
    margin: 10px;
}
.fa-bars{
    color:rgb(35, 63, 41);
}
.fa:hover{
    /* color: #beb784; */
    opacity: 0.7;
    cursor: pointer;
}

/* Home Page */
.home-main{
    display:flex;
    gap: 30px;
    width: 90%;
    margin: 0 auto;
}
.photo{flex-shrink: 1;}
.text{flex-shrink: 1.2;}

main{
    width: 80%;
    margin: auto;
}

/* Tech Page */
#littlecar_container{
    display:flex;
    gap:80px;
}
#littlecar_text{width: 60%;}
.littlecar{
    width:40%;
    min-width: 200px;
}

/* h1 */
h1 {
    font-family:'Kaiti TC', 'STKaiti', Cambria, Didot, 'Malayalam MN', serif;
    text-align: center;
    text-transform:uppercase;
    margin-top: 60px;
}
h1.secondh1{
    margin-top:40px;
    margin-bottom: 50px;
}

/* photo */
.selfphoto img{
    display: block;
    width: 100%;
    min-width: 400px;
    max-width: 800px;
    margin-left:auto;
    margin-right: auto;
    border-radius: 0% 25%;
}
.selfphoto {
    padding:0;
    margin:0;
}

/* logo */
.logo img {
    display: block;
    margin-right: 20px;
    margin-left: auto;
    width: 300px;
    margin-top: 10px;
    margin-bottom: -10px;
}

/* links */
a:link{
    color: rgb(35, 63, 41);
    text-decoration: none;
    font-weight: 700;
}
a:visited{
    color: rgb(35, 63, 41);
    text-decoration:none;
}
nav a:hover{
    color: rgb(35, 63, 41);
    text-decoration:underline;
    cursor: pointer;
}
a:hover{
    text-decoration: underline;
    cursor: pointer;
}

/* paragraph */
p {
    width: 100%;
    margin-left:auto;
    margin-right: auto;
    font-size: 19px;
}
p em{
    font-style: oblique;
    font-weight: 550;
}

/* annotation */
.annotation em{
    font-weight: normal;
    font-size: 18px;
}
.annotation{
    color:#939c8e;
    text-align: right;
    font-size: 16px;
    margin-top: 2px;
}
.annotation a{
    color:#939c8e;
}
p.codenote{
    font-style: italic;
}

/* blockquote */
blockquote{
    background: #dee4d337;
    border-left: 10px solid #adb79837;
    padding-left: 5px;
    padding-top: 1px;
    padding-bottom:1px;
    padding-right: 10px;
    margin: 40px auto 0px auto;
    width: 85%;
}
blockquote p{
    width: 90%;
    box-sizing: border-box;
    margin: 10px 50px 5px 18px;
}
blockquote footer{
    text-align: right;
    margin: 5px 15% 10px auto;
}

/* h2 */
h2{
    text-align: center;
    font-family: Didot, Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
    margin-top: 20px;
    line-height: 1.4em;
    letter-spacing:2px;
}
h2.h2-left{
    text-align: left;
    text-transform: capitalize;
    margin-top: 0.83em;
}
h2.h2-right{
    text-align: right;
    margin-right: 5%;
    text-transform: capitalize;
    margin-top: 0.83em;
}

/* h3 */
h3{
    font-family:'Snell Roundhand', 'Charmonman', 'Apple Chancery', 'Times New Roman', Times, serif;
    /* font-style: italic;  */
    margin-top: -10px;
}
h3.left{
    text-align: left;
}
h3.right{
    text-align: right;
    margin-right: 5%;
}

/* section */
section.bg{
    /* width:90%; */
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 50px;
}
section figure, iframe{
    display: block;
    min-width: 360px;
    max-width: 800px;
    width:100%;
    margin: auto;
}
.carousel{
    display: block;
    min-width: 360px;
    max-width: 800px;
    width:100%;
    margin: auto;
}

/* this rules out the self-photo on the homepage */
figcaption{
    text-align: center;
    font-size: medium;
    background-color: #dee4d337;
    color:#656c63;
}
section img{
    display: block;
    width:100%;
    margin: 20px auto 0px auto;
    border-radius: 20px;
}
.littlecar img{
    display: block;
    border-radius: 300px 300px 0 0;
}


/* footer */
div.foot{
    background-color: rgb(35, 63, 41);
    color:#fdf6ee;
    width:100%;
    margin-top: 100px;
}
div.foot .chatbox{
    margin: 20px auto 20px 0;
    border: 1.5px solid #fdf6ee;
    border-radius: 30px;
    padding: 10px 20px;
    width:fit-content;
    font-variant:small-caps ;
    font-size: 20px;
    font-family: Cambria, Cochin,'Gill Sans', sans-serif;
    letter-spacing: 0.05em;
    font-weight: bold;
}
div.foot section{
    margin-bottom: 0;
    padding: 15px;
    padding-bottom: 30px;
}
div.foot a:link{
    color:#fdf6ee;
    text-decoration: underline;
    text-decoration-color: #fdf6ee;
    font-weight: 500;
}
div.foot a:hover{
    color: #c8d5c5;
    text-decoration-color: #c8d5c5;
    cursor: pointer;
}
div.foot address{
    font-style: normal;
    line-height: 0.8em;
}

/* cut line */
.cutting-line-left {
    position: relative;
    width: 200px;
    height: 2px;
    background-color: rgb(35, 63, 41);
    margin: 20px 0;
  }
.cutting-line-left::before {
    content: "";
    position: absolute;
    background-color:rgb(35, 63, 41);
    top: 50%;
    left: 0;
    transform: translate(0, -50%);
  }
.cutting-line-right {
    position: relative;
    width: 200px;
    height: 2px;
    background-color: rgb(35, 63, 41);
    margin: 20px 5% 20px auto;
  }
.cutting-line-right::before {
    content: "";
    position: absolute;
    background-color:rgb(35, 63, 41);
    top: 50%;
    left: 0;
    transform: translate(0, -50%);
  }

abbr{
    text-decoration: none;
    font-weight: 700;
}
#applewebsite{
    text-decoration-line: underline;
    font-weight: 800;
}
#applewebsite:hover{
    text-shadow: 1px 1px 1px rgba(35, 63, 41, 0.3);
}

* {
	box-sizing: border-box;
}

.gallery_container {
	margin: 0;
	padding: 1rem;
	min-height: 100vh;
	display: flex;
	justify-content: center;
	align-items: center;
	background: #fdf6ee;
}

.gallery_container img {
	width: 100%;
	display: block;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	transition: transform 1000ms;
}

.gallery_container ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.5rem;
	grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
	max-width: 100%;
	width: 70rem;
}

.gallery_container figure {
	margin: 0;
	position: relative;
	overflow: hidden;
}

.gallery_container figure::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 200%;
	height: 200%;
	background: rgba(0, 0, 0, 0.5);
	transform-origin: center;
	opacity: 0;
	transform: scale(2);
	transition: opacity 300ms;
}

.gallery_container figcaption {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	justify-content: center;
	place-items: center;
	text-align: center;
	padding: 1rem;
	color: white;
	font-size: 1.2rem;
	z-index: 1;
	opacity: 0;
	transition: opacity 600ms, transform 600ms;
}

a:is(:hover, :focus) figure::after {
	opacity: 1;
}

a:is(:hover, :focus) figcaption {
	opacity: 1;
	transition: opacity 600ms;
}

@media (prefers-reduced-motion: no-preference) {
	.gallery_container figcaption {
		transform: translate3d(0, 2rem, 0);
	}

	.gallery_container figure::after {
		border-radius: 50%;
		opacity: 1;
		transform: scale(0);
		transition: transform 900ms;
	}

	a:is(:hover, :focus) figure::after {
		transform: scale(2.5);
	}

	a:is(:hover, :focus) figcaption {
		opacity: 1;
		transform: translate3d(0, 0, 0);
		transition: opacity 600ms 400ms, transform 600ms 400ms;
	}

	a:is(:hover, :focus) img {
		transform: scale(1.2);
	}
}

.center_text{
    display:block;
    width:90%;
    margin:auto;
    text-align: center;
}

@media (max-width: 1030px){
    #littlecar_container{
        flex-direction: column;
        gap: 0;
    }
    #littlecar_text{width: 100%;}
    .littlecar{
        width:70%;
    }
}

@media (max-width: 950px){
    #hamburger_menu{
        display: inline-block !important;
    }

    /* navigation bar */
    .topbar{
        flex-direction: column;
    }
    .nar-tb{
        display:flex;
        justify-content: space-between;
        width: 100%;
    }
    nav{
        width: 100%;
    }
    nav ul{
        padding-left: 20px;
        flex-direction: column;
        align-items: baseline;
        border-bottom: 1px solid #c3c9bf;
        margin-top: 0px;
        font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;

        /* font-family: 'Tsukushi A Round Gothic','Koho', sans-serif; */
    }
    nav li:hover{
        background-color: #dee4d337;
        border-left: 10px solid #adb79837;
        cursor: pointer;
    }


    /* Home Page */
    .home-main{
        flex-direction: column;
        width:90%;
    }
    main{
        width: 90%;
    }
    .littlecar{
        width: 60%;
        min-width: 300px;
    }

}
