:root{
    /* --white: #fdfbf7; */
    --white: #f9f9f9;
    --black: #36383F;
    --grey: #6f7376;
    --light: #f2f2f3;
}

/* Reset */
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body{
    background-color: var(--white);
    width: 100%;
    margin: 1rem auto;
    color: var(--black);
}

a{
    text-decoration: none;
    color: var(--black);
}

a[aria-current="page"]{
    text-decoration: underline blue 2px;
}

ul{
    list-style: none;
}

/* Logo */
.logo{
    display: inline-block;
    margin-left: 2rem;
}

.footer{
    margin: 0;
    width: 100%;
    height: 100%;
    background-color: var(--light);
}

.footer-text{
    margin: 0;
    padding: 2rem;
    width: 100%;
    height: 100%;
    background-color: var(--light);
}

hr{
    color: var(--light);
}

/* Nav menu */
.nav{
    width: 100%;
    height: 100%;
    position: fixed;
    background-color: var(--grey);
    overflow: hidden;
}

.menu a{
    display: block;
    padding: 2rem;
    color: var(--light);
}

.menu a:hover{
    background-color: var(--white);
    color: var(--grey);
}

.nav{
    max-height: 0;
    transition: max-height .5s ease-out;
}



/* Menu Icon */

.hamb{
    cursor: pointer;
    float: right;
    padding: 20px 20px;
}


.hamb-line{
    background: var(--black);
    display: block;
    height: 2px;
    position: relative;
    width: 24px;
    margin-top: auto;
    margin-bottom: auto;
}

.hamb-line::before,
.hamb-line::after{
    background: var(--black);
    content: '';
    display: block;
    height: 100%;
    position: absolute;
    transition: all .2s ease-out;
    width: 100%;
}

.hamb-line::before{
    top: 5px;
}

.hamb-line::after{
    top: -5px;
}

.side-menu{
    display: none;
}

/* Toggle menu icon */

.side-menu:checked ~ nav{
    max-height: 75%;
}

.side-menu:checked ~ .hamb .hamb-line {
    background: transparent;
}

.side-menu:checked ~ .hamb .hamb-line::before {
    transform: rotate(-45deg);
    top:0;

}

.side-menu:checked ~ .hamb .hamb-line::after {
    transform: rotate(45deg);
    top:0;
}

/* Article */

.container{
    display: flex;
    margin: 2rem 2rem;
    gap: 20px;
    flex-direction: column; 
}

.article-feed{
    display: flex;
    flex-direction: column;   /* Stacks articles vertically */
    max-width: 720px;         /* Ideal width for quick scanning */
    margin: 0 auto;           /* Centers the entire feed horizontally */
    gap: 20px;
}

.article-meta{
    color: var(--grey);
}

.article-txt-img{
    float: right;
    height: 75px;
    max-width: 75px;
}

/* Side info */

.side-info{
    display: flex;
    gap: 32px;
    flex-direction: column;
}

.author{
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.author-txt-img{
    float: left;
    height: 75px;
    max-width: 75px;
    margin-right: 5px;
    border-radius: 50%;
}

.tags{
    display: flex;
}


/* Responsiveness */

@media screen and (max-width: 768px) {
    .article-thumbnail, .author-thumbnail, .nav-xl{
	    display: none;
    }
}

@media screen and (min-width: 769px) {
    .nav, .menu{
        display: none;
    }
    
    .side-menu, .hamb{
        display: none;
    }

    .article-txt-img, .author-txt-img{
	display: none;
    }

    .header{
	display: grid;
	grid-template-columns: 1fr 2fr;
	grid-template-areas:
	"h-logo h-menu";
	margin: 0;
	gap: 0;
    }

    .logo{
	grid-area: h-logo;
	display: inline-flex;
    	margin-left: 4rem;
    }

    .nav-xl{
	    grid-area: h-menu;
        display: flex;
        margin: 0;
	    justify-content: center;
    }

    .menu-xl{
	    display: flex;
        margin: 0rem;
	align-self: center;
	gap: 2rem;
    }

    .menu-xl a{
    	color: var(--black);
    }

    .menu-xl a:hover{
        background-color: transparent;
        color: var(--grey);
    }
    
    .container{
	display: grid;
	grid-template-columns: 2fr auto 1fr;
	grid-template-areas:
	"A . B";
	margin: 0 auto auto 5rem;
	gap: 20px;
    }

    .article-feed{
	grid-area: A;
	justify-self: end;
	display: flex;
	flex-direction: column;   /* Stacks articles vertically */
  	max-width: 620px;         /* Ideal width for quick scanning */
  	margin: 3rem auto 2rem auto;
	gap: 60px;
    }

    .article-item{
 	display: flex;
  	justify-content: space-between; /* Pushes text left, image right */
  	gap: 2rem;                      /* Clean breathing room */
  	border-bottom: 1px solid #f2f2f2; /* Subtle divider between posts */
    }

	/* Text Container: Takes up the majority of the row width */
    .article-text{
  	flex: 1;
	/* display: flex;
	flex-direction: column; */
	gap: 10px;
    }

    .separator hr{
	height: 500px;;
	margin-left: 10px;
	color: var(--light);
    }

	/* Image Wrapper: Locks the thumbnail aspect ratio and sizing */
    .article-thumbnail, .author-thumbnail{
  	flex: 0 0 120px;          /* Prevents the image container from shrinking */
  	height: 120px;
	max-width: 120px;
    }

    .article-thumbnail img{
        margin-top: 1rem;
  	width: 100%;
  	height: 100%;
  	object-fit: cover;        /* Prevents image distortion */
  	border-radius: 4px;
    }

    .side-info{
	grid-area: B;
	display: flex;
	flex-direction: column;
	gap: 32px;
	max-width: 300px;
        flex-grow: 2;
	margin: 3rem auto auto 1rem;
    }
    
    .author{
	align-items: center;
    }

    .author-thumbnail img{
  	width: 100%;
  	height: 100%;
  	object-fit: cover;        /* Prevents image distortion */
  	border-radius: 50%;
    }

    .footer-text{
    	padding: 2rem 4rem 4rem 4rem;
    }

}




