/*
  -----------------------------------------------------------------------------
  This file is part of a personal project by Sarlin Tejada, shared for portfolio purposes only.
  All rights reserved. This code is provided for view-only access.

  Do not copy, modify, reuse, or distribute without prior written permission.
  For license details, see the LICENSE file in the root of this repository.
  -----------------------------------------------------------------------------
*/

/* ==========================================
   GLOBAL VARIABLES & RESET
========================================== */
:root {
	--primary-color: #333;
	--hover-color: #7293d9;
  	--text-light: #aaa;
  	--text-medium: #666;
  	--text-dark: #222;
  	--divider: #eee;

	--header-height: 65px; 
}
  
  /* Reset Default Styles */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}


/* ==========================================
   TYPOGRAPHY & BASE STYLES
========================================== */
html {
    scroll-behavior: smooth;
}

body {
	text-align: center;
	animation: fadeIn 1s ease-in-out;
    font-family: 'Montserrat', sans-serif;
	color: var(--primary-color);
}

img {
	margin: 5px;
	border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

img.center {
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: 90%;
}


/* ==========================================
   LAYOUT & CONTAINERS
========================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);   
  background: #fff;              
  border-bottom: 1px solid var(--divider);
  z-index: 1000;                  
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

.page-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  min-height: calc(100vh - 120px); 
  text-align: center;
  padding: 2rem; 
  padding-top: calc(var(--header-height) + 20px);
  
}

.site-footer{
  border-top:1px solid var(--divider);
  padding: 1rem;
  text-align: center;
  font-size: 0.95rem;
  max-width: 960px;      
  margin: 0 auto;
}

.site-footer .question {
  margin-top: 0;
  font-size: 1.25rem;
}

figure {
	margin: 10px 0;
}

figure img {
	width: 100%;
    max-width: 100%;
    height: auto;
}

figure figcaption {
 	text-align: center;
    color: var(--text-light);
    font-size: 0.89rem;
}

figure figcaption a {    
    color: var(--text-light);
} 

figure figcaption a:hover {
    color: var(--hover-color);
}

/* ==========================================
   HEADER & NAVIGATION
========================================== */
.site-logo {
	position: absolute;
	top: 20px;
	left: 30px;
	text-transform: uppercase;
	font-size: 1.25rem;
	letter-spacing: 1.5px;
  	font-weight: 500;
}
  
.site-logo a {
	text-decoration: none;
	color: var(--primary-color);
}

.menu-toggle:hover {
  color: var(--hover-color);
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

.nav-menu {
	position: absolute;
	top: 20px;
	right: 30px;
	z-index: 10;
}

.menu-toggle {
	background: none;
	border: none;
	color: #333;
	font-size: 1.5rem;
	cursor: pointer;
}

.menu-dropdown {
	display: none;
	flex-direction: column;
	background-color: white;
	border: 1px solid #ccc;
	border-radius: 6px;
	padding: 10px 15px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
	margin-top: 10px;
	position: absolute;
	right: 0;
	min-width: 180px;
}

.menu-dropdown a {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 0;
	text-decoration: none;
	color: #333;
	font-family: 'Montserrat', sans-serif;
	font-size: 0.9rem;
	transition: color 0.2s ease;
}

.menu-dropdown.open {
	display: flex;
}

h1, h2 {
	font-size: 1rem;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: #666;
	font-weight: 500;
	margin-top: 20px;
}

.question {
    color:#7293d9; 
    text-transform: capitalize;
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 2px;
    line-height: 1.3;
}

.quote {
    font-style: italic;  
    font-size: 0.8rem; 
    color: var(--text-light); 
    padding-left: 5px; 
    margin-left: 8px; 
    margin-top: 5px; 
    border-left: 2px solid var(--divider); 
}

.divider-subtle {
	width: 120px;
	border: none;
	border-top: 1px solid #ccc;
	margin: 20px auto 20px;

}

/* ==========================================
   LIST STYLES 
========================================== */
ul {
	list-style-type: disc;
}

ul, ol {
    margin: .5rem 0;
    padding-left: 3rem;
}

ul li, ol li {
    margin-bottom: 0.05rem;
    line-height: 1.5;
}

/* ==========================================
   ERROR & LINK STYLES
========================================== */
.error-code {
	font-size: 4.5rem;
	font-family: 'Montserrat', sans-serif;
	color: var(--primary-color);
	margin-bottom: 10px;
}

.error-message {
	margin-top: 20px;
	color: #666;
	font-family: 'Montserrat', sans-serif;
}
  
.back-home {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--primary-color);
	font-family: 'Montserrat', sans-serif;
	text-decoration: none;
	padding: 8px 0;
    margin-top: 30px;
}

a:hover {
	color: var(--hover-color);
}

/* ==========================================
   TABLE STYLES
========================================== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

th, td {
    border: 1px solid #ddd;
    padding: 0.75rem 1rem;
    text-align: left;
    vertical-align: top;
}

thead {
    background-color: #f5f5f5;
}

th {
    font-weight: 600;
    color: #222;
}

tbody tr:nth-child(odd) td:not([rowspan]) {
    background-color: #fafafa;
}

td[rowspan] {
    background-color: #fff;
	font-weight: 600;
}

/* ==========================================
   TABLE of CONTENTS STYLES
========================================== */
.toc {
    flex: 0 0 402px;
    position: sticky;
    top: 118px;
    align-self: flex-start;
    max-height: calc(100vh - 118px);
    overflow-y: auto;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    line-height: 1.6;
    color: #333;
    padding-right: 1rem;
    border-right: 1px solid #eee;
}

.toc h2 {
	font-weight: 500;
}

.toc h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #555;
    margin-top: 1rem;
    margin-bottom: 0;
}

.toc ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.toc a {
    text-decoration: none;
    color: #555;
    transition: color 0.2s ease;
}

.toc a:hover {
    color: var(--hover-color);
    font-weight: 600;
}

.toc a.active {
    font-weight: 700;
    color: var(--hover-color);
}

.toc a.active::before {
    content: '›';
    position: absolute;
    left: -1rem;
    color: var(--hover-color);
}


.toc ul ul {
    margin-left: 1rem;
    border-left: 1px solid #ddd;
    padding-left: 0.75rem;
}

a {
    color: var(--primary-color);
}
/* ==========================================
   RESPONSIVE STYLES
========================================== */

/* === Tablet landscape & small laptop (768–1023px) ============= */
@media (max-width: 1023px) {
  /* Shrink TOC width so article still breathes */
  .toc { flex: 0 0 260px; font-size: 0.85rem; }
  /* Tighten gap between sidebar and content */
  .page-wrapper.with-sidebar { gap: 2.5rem; }
}

/* === Mobile & portrait tablet (≤767px) ======================== */
@media (max-width: 767px) {

  /* Hide the sidebar by default, turn it into an off-canvas drawer */
  .toc {
    position: fixed;
    left: 0; top: 0;
    width: min(85vw, 320px);
    height: 100vh;
    transform: translateX(-105%);
    transition: transform .3s ease;
    background: #fff;
    box-shadow: 2px 0 12px rgba(0,0,0,.08);
    z-index: 999;
    padding: 1.25rem 1rem;
    overflow-y: auto;
  }
  /* When visible, slide in */
  .toc.open { transform: translateX(0); }

  /* Toggle button styling */
  .toc-toggle {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    border: 1px solid var(--divider);
    background: #fff;
    font-size: .9rem;
    padding: .5rem .75rem;
    border-radius: 6px;
    position: fixed;
    left: 1rem; bottom: 1rem;   /* sits like a floating action button */
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    color:#7293d9; 
  }
}

/* === Utility: hide toggle on large screens ==================== */
@media (min-width: 768px) {
  .toc-toggle { display: none; }
}

