/* === Tokens === */
:root{
  --header-h: 64px;
  --sidebar-w: 200px;
  --gap: 16px;
  --max: 72ch;

  --bg: #fff;
  --text: #0c0d0e;
  --accent: darkgreen;

  /* fluid type scale */
  --fs-0: clamp(14px, 1.6vw + 10px, 16px); /* body */
  --fs-1: clamp(18px, 2.0vw + 12px, 22px); /* h2/h3 */
  --fs-2: clamp(24px, 3.5vw + 14px, 32px); /* h1 */
}

/* === Global Styles === */
* {
  box-sizing: border-box;
	margin: 0;
	padding: 0; 
}

body {
  font-family: sans-serif;
	background-color: white;
  /*display: flex;
  height: 100vh; */
}

.grid-layout {
	display: grid;
	grid-template-columns: 200px 1fr 250px;
	grid-template-areas: 
		"sidebar content info";
	grid-template-rows: 1fr;
	gap: 1rem; 
	height: calc(100vh - 100px);
}

.sidebar { grid-area: sidebar; }
.content { grid-area: content; }
.info-box { grid-area: info; }


/* === Header styles === */
.header {
	position: sticky;
	text-align: center;
	height: var(--header-h);
	width: 100%;
	max-width: none;
	/*border: 1px dashed red;*/
}
	
.header h1 {
	margin: 0 auto;
	margin-top: 20px;
	color: darkgreen;
	font-size: 2em;
	font-weight: bold;
	font-style: italic;
}

.header a {
  text-decoration: none;
}
.header a:hover h1 {
  color: green;
}


/* Sidebar styles */
.sidebar {
  display: flex;
	justify-content: center;
	gap: 1rem;
}

.sidebar ul {
  list-style: none;
}
.sidebar li {
  margin-bottom: 1rem;
}
.sidebar a {
  text-decoration: none;
  color: black;
}

.sidebar.sidebar-home{
  display: flex;
  flex-direction: column;
  justify-content: center;         /* vertical centering */
  align-items: center;             /* horizontal centering */
  gap: .25rem;
  min-height: calc(100dvh - var(--header-h));
  width: 100%;
}


/* Sidebar animations */
nav a {
		position: relative;
	  display: block;
	  margin: 20px 0;

	  font-weight: bold;
	  text-decoration: none;
	  color: black;
	  font-size: 1.2em;
	  
	}
nav a:hover {
	  color: darkgreen;
	}
nav a::after {
	  content: '';
	  display: block;
	  width: 0;
	  height: 2px;
	  background: green;
	  transition: width 0.3s;
	  position: absolute;
	  bottom: -4px;
	  left: 0;
	}
nav a:hover::after {
	  width: 100%;
	}
nav .active {
	  color: darkgreen;
	}

/* === Main Content === */
.content {
	max-width: var(--max);
  padding: 1rem 0;
	margin-inline: auto;
  height: 100%;
	/* border: 2px solid black; */
}

p { 
	margin-left: 1rem;
}
.content h2 {
  text-align: center;
  margin-bottom: 1rem;
}
.content h3, h4, h5, h6 {
	margin-left : 1rem;
	margin-bottom: .5rem;
}
li { 
	margin-left: 1.5rem;
	margin-right: 1rem;
}

pre {
	tab-size: 2;
	-moz-tab-size: 2; /* for Firefox support */
	background-color: lightgrey;
	padding: 1rem;
}

/* About section styles */
.about-textbox {
	margin-top: 200px;
}

.about-photo img {
	top: 200px;
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  background: #eee;
}

/* Fixed Info Box (Right Panel) */
.info-box {
	font-weight:bold;
	margin-top: 200px;
  position: fixed;
  top: 80px;
  right: 200px;
  width: 250px;
  height: calc(100vh - 80px);
  background: white;
  /*border: 2px solid black;*/
  padding: 1rem;
  overflow-y: auto;
}

#map {
  height: 200px;
  margin-top: 1rem;
}

img { 
	max-width: 100%;
	height: auto;
	display: block;
	margin: 0 auto;
}

/*Bullet points*/
ul {
	list-style-type: disc;
	margin-left: 20px;
	margin-bottom: 1rem;
}

ul a {
	text-decoration: none;
	font-weight: bold;
	color: darkgreen;
}

ul a {
  position: relative;           /* Needed for ::after positioning */
  display: inline-block;        /* Ensures underline is correct width */
  text-decoration: none;
  font-weight: bold;
  color: darkgreen;
}

ul a::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background: green;
  transition: width 0.3s;
  position: absolute;
  bottom: -.5px;
  left: 0;
}

ul a:hover::after {
  width: 100%;
}
/* --- Mobile Overrides --- */
@media (max-width: 2000px) {
  .grid-layout {
    display: block;              /* stop being a grid */
    
    height: auto;
  }

  .sidebar {
    position: static;            /* cancel fixed/absolute */
    width: auto;
    height: auto;
		overflow-x: auto;
    
  }

  .content {
    max-width: var(--max);
    margin-inline: auto;
    padding: 1rem 0;
  }

  .info-box {
    position: static;            /* no longer fixed */
    width: auto;
    height: auto;
    margin-top: var(--gap);
  }
	
}

/* === Desktop Overrides === */
@media (min-width: 2001px) {
	.sidebar {
		position: sticky;       
		display: inline-block;      /* stay in place */
		top: 0;
		left: 0;
		width: var(--sidebar-w);
		height: 100%;
		padding: var(--gap);
		background: white;
		/* border-right: 1px solid #ccc; */ /* optional border */
		margin-top: 120%;
    margin-left: 100%;
    justify-self: center; 

	}
 .sidebar-home {
    position: static !important;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    min-height: 0;
    background: none;
    box-shadow: none;
    margin: 0 auto;
    gap: 1.5rem;
  }
}
