html, body {
	margin: 0 auto;
	padding: 0;
	font-family: 'quicksand', sans-serif;
	background-color: var(--background-color);
	color: var(--font-dark);
	scroll-behavior: smooth;
	scroll-padding-top: 60px; /* Offset for sticky nav on mobile */
}

:root {
	--primary-color: #fafafa;
	--secondary-color: #ff9800;
	--font-dark: #333;
	--font-bright: #fff;
	--bg-bright: #f4f4f4;
	--bg-dark: #363636;
	--background-color: #fffffffb;
	--blue-default: #376597;
	--blue-matte: #2c4a6e;
	--blue-matte-bright: #607fa0;
	--neon-pink: #ff6ec4;
	--neon-blue: #06c5ff;
	--neon-green: #39ff14;
	--shadow: rgba(0, 0, 0, 0.8);
}

 @font-face {
     font-family: 'quicksand';
     src: url('../font/quicksand.ttf') format('truetype');
 }

 .scanlines {
     position: fixed;
     top: clamp(0px, 0vh, 0px);
	 inset: 0;
     background: repeating-linear-gradient(0deg,
             var(--blue-default),
             rgb(255, 255, 255) 2px,
             transparent 2px,
             transparent 2px);

     pointer-events: none;
     z-index: 1;
 }

 .overlay {
     position: fixed;
     top: clamp(0px, 0vh, 0px);
     inset: 0;
     background: radial-gradient(circle at 25% 15%, rgb(255, 255, 255) 10%, #37659765 80%);
     pointer-events: none;
     z-index: 1;
 }


 
nav {
	background-color: var(--blue-matte);
	color: var(--font-bright);
	padding: 0.75rem 1rem;
	text-align: center;
	box-shadow: 0 2px 10px var(--shadow);
	display: none;
	position: sticky;
	top: 0;
	z-index: 1000;
}

nav a {
	color: var(--font-bright);
	text-decoration: none;
	padding: 0.5rem 0.75rem;
	margin: 0 0.25rem;
	border-radius: 5px;
	font-size: clamp(0.8rem, 2vw, 0.95rem);
	font-weight: 500;
	transition: background-color 0.2s ease, transform 0.1s ease;
	display: inline-block;
}

nav a:hover {
	background-color: var(--blue-default);
	transform: translateY(-2px);
}

nav a:active {
	transform: translateY(0);
}

#root {
	display: 		flex;
	margin: 		0 auto;
	margin-top: 	1rem;
	align-items: 	stretch;
	align-content:	stretch;
	max-width: 		1600px;
	gap: clamp(1rem, 2vw, 2rem);
	flex-wrap: wrap;
}

.col {
	flex: 1;
	padding: 1rem;
}

/* ========== BASE CARD (root level) ========== */
.card {
	border: 1px solid var(--blue-matte);
	border-radius: 5px;
	padding: 1rem;
	margin-bottom: 1rem;
	background-color: var(--bg-bright);
	box-shadow: 1px 1px 5px var(--shadow);
	max-width: 370px;
	z-index: 2;
}

/* ========== SECTION CARDS (main CV sections) ========== */
.section-card {
	background-color: var(--primary-color);
	color: var(--font-dark);
	cursor: default;
}

.section-card h2 {
	color: var(--blue-matte);
	text-align: center;
	margin-bottom: 1rem;
}

/* ========== SUB-CARDS (items inside sections) ========== */
.sub-card {
	background-color: var(--bg-bright);
	border: 1px solid var(--blue-matte);
	border-radius: 8px;
	padding: 1rem;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sub-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 4px 15px var(--shadow);
}

/* Sub-card header styling */
.sub-card-header {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.5rem 1rem;
	margin-bottom: 0.75rem;
}

.sub-card-header h3,
.sub-card h3 {
	font-size: clamp(1rem, 1.4vw, 1.3rem);
	color: var(--blue-matte);
	margin: 0;
}

/* ========== CARD GRID (flex container for sub-cards) ========== */
.card-grid {
	display: flex;
	flex-wrap: wrap;
	gap: clamp(1rem, 2vw, 1.5rem);
}

.card-list {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

/* ========== TAGS (skill-tags, tech-tags) ========== */
.tag-container {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.tag {
	color: var(--font-bright);
	padding: 0.25rem 0.6rem;
	border-radius: 15px;
	font-size: clamp(0.7rem, 0.9vw, 0.85rem);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tag:hover {
	transform: translateY(-2px);
	box-shadow: 0 2px 8px var(--shadow);
}

.tag-primary {
	background-color: var(--blue-matte);
}

.tag-secondary {
	background-color: var(--blue-matte-bright);
	padding: 0.15rem 0.5rem;
	border-radius: 10px;
	font-size: clamp(0.65rem, 0.8vw, 0.75rem);
}

/* ========== PERSONAL SECTION ========== */
.personal{
	display: flex;
	background-color: var(--blue-matte);
	color: var(--font-bright);
	flex-direction: column;
	font-family: Arial, Helvetica, sans-serif;
	max-width: 250px !important;
}
.personal a {
	color: var(--font-bright);
	text-decoration: none;
	font-size: clamp(0.8rem, 0.7vw, 1rem);
	font-weight: bold;
	margin: 0.5rem;
	animation: pulse 5s infinite;
}
.personal a:hover {
	text-decoration: underline;
}

@keyframes pulse {
	0% { text-shadow: none; }
	50% { 
		text-shadow: 0 0 5px #e0e0e084;
	}
	100% { text-shadow: none; }
}

.personal h2, .personal h3{
	margin: 0.2rem;
	text-align: center;
}

.img-wrapper {
  position: relative;
  width: 250px;
  height: 250px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  transform: translateX(-3px); /* centers the image */
  border-radius: 50%;  
  box-shadow: 0px 0px 5px var(--bg-bright);
}
.img-bg {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: linear-gradient(to right, var(--blue-matte), white, var(--blue-matte));
	animation: rotateBg 4s ease-in-out infinite;
	z-index: 1;
}
.img-wrapper img {
  inset: 0;
  border-radius: 50%;
  z-index: 2;
  width: 100%;
  height: 100%;
}
@keyframes rotateBg {
  100% { 
	transform: rotate(180deg); 
  }
}


.icon {
	width: 20px;
	height: 20px;
	vertical-align: middle;
	margin-right: 8px;
}

.separator {
	width: 100%;
	height: 1px;
	background: linear-gradient(to right, var(--blue-matte), white, var(--blue-matte));
	margin: 0.5rem auto;
}

.inverse-separator {
	width: 100%;
	height: 1px;
	background: linear-gradient(to right,  white, var(--blue-matte),  white);
	margin: 0.5rem auto;
}
/* ========== ABOUT SECTION ========== */
.about {
	flex: 1 1 400px;
}

.about p {
	padding: 0px;
	margin: 0.6rem 0;
}

/* ========== SKILLS SECTION ========== */
.skills {
	flex: 1 1 300px;
}


.skill-category {
	flex: 2 1;
	min-width: 100px;
	padding: 0.1rem 1rem 1rem 1rem;
	text-align: center;
}

.skill-category h3 {
	font-size: clamp(0.9rem, 1.2vw, 1.1rem);
	margin-bottom: 0.5rem;
	padding-bottom: 0.25rem;
}

.skill-category:hover {
	transform: translateY(-2px);
	box-shadow: 0 2px 8px var(--shadow);
}

/* ========== PORTFOLIO SECTION ========== */
.portfolio {
	flex: 1 1 100%;
}

.project-card {
	flex: 1 1 300px;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.project-card .summary {
	font-size: clamp(0.85rem, 1vw, 1rem);
	color: var(--font-dark);
	margin: 0;
}

.project-actions {
	display: flex;
	gap: 0.5rem;
	margin-top: auto;
}

/* ========== BUTTONS ========== */
.btn {
	padding: 0.5rem 1rem;
	border: none;
	border-radius: 5px;
	cursor: pointer;
	font-size: clamp(0.8rem, 1vw, 0.9rem);
	transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-primary {
	background-color: var(--blue-matte);
	color: var(--font-bright);
}

.btn-primary:hover {
	background-color: var(--blue-default);
	transform: scale(1.02);
}

.btn-secondary {
	background-color: transparent;
	color: var(--blue-matte);
	border: 1px solid var(--blue-matte);
}

.btn-secondary:hover {
	background-color: var(--blue-matte);
	color: var(--font-bright);
}

.btn-center {
	margin: 15px auto 0;
	display: block;
}

/* ========== EDUCATION SECTION ========== */
.education,
.employment {
	flex: 1 1 100%;
}

.section-intro {
	margin-bottom: 1.5rem;
	padding: 0.75rem;
	background-color: var(--bg-bright);
	border-left: 3px solid var(--blue-matte);
	border-radius: 4px;
}

.section-intro p {
	font-size: clamp(0.85rem, 1vw, 0.95rem);
	margin: 0;
	line-height: 1.5;
	font-style: italic;
	color: var(--font-dark);
	opacity: 0.9;
}

.item-subtitle {
	font-size: clamp(0.9rem, 1.1vw, 1rem);
	color: var(--font-dark);
	font-weight: bold;
}

.item-period {
	font-size: clamp(0.8rem, 1vw, 0.9rem);
	color: var(--font-dark);
	opacity: 0.8;
	margin-left: auto;
	font-style: italic;
}

.item-details p {
	font-size: clamp(0.85rem, 1vw, 0.95rem);
	margin: 0 0 0.5rem 0;
	line-height: 1.5;
}

/* Courses modal styling */
.courses-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.course-item {
	padding: 0.75rem;
	background-color: var(--bg-bright);
	border-radius: 6px;
	border-left: 3px solid var(--blue-matte);
}

.course-item h4 {
	font-size: clamp(0.9rem, 1.1vw, 1rem);
	color: var(--blue-matte);
	margin: 0 0 0.25rem 0;
}

.course-description {
	font-size: clamp(0.8rem, 0.95vw, 0.9rem);
	margin: 0;
	color: var(--font-dark);
	opacity: 0.9;
}

/* ========== PROJECT MODAL ========== */
.modal-overlay {
	position: fixed;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.7);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
	opacity: 1;
	visibility: visible;
}

.modal-content {
	background-color: var(--primary-color);
	border-radius: 10px;
	padding: 1.5rem;
	max-width: 600px;
	width: 90%;
	max-height: 80vh;
	overflow-y: auto;
	transform: scale(0.9);
	transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
	transform: scale(1);
}

.modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--blue-matte);
}

.modal-header h2 {
	margin: 0;
	font-size: clamp(1.2rem, 2vw, 1.6rem);
	color: var(--blue-matte);
}

.modal-close {
	background: none;
	border: none;
	font-size: 1.5rem;
	cursor: pointer;
	color: var(--font-dark);
	transition: color 0.2s ease;
}

.modal-close:hover {
	color: var(--blue-default);
}

.modal-section {
	margin-bottom: 1rem;
}

.modal-section h3 {
	font-size: clamp(0.95rem, 1.2vw, 1.1rem);
	color: var(--blue-matte);
	margin-bottom: 0.5rem;
}

.modal-section ul {
	margin: 0;
	padding-left: 1.2rem;
}

.modal-section li {
	font-size: clamp(0.85rem, 1vw, 0.95rem);
	margin-bottom: 0.3rem;
}

.modal-footer {
	display: flex;
	gap: 0.5rem;
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid var(--background-color);
}

/* ========== RESPONSIVE TEXT ========== */
h1 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h2 { font-size: clamp(1.2rem, 2vw, 1.8rem); }
h3 { font-size: clamp(1rem, 1.5vw, 1.3rem); }
p  { font-size: clamp(0.9rem, 1.1vw, 1rem); }

/* ========== RESPONSIVE GRID ========== */
@media (max-width: 750px) {
	#root {
		flex-direction: column;
		padding: 0.5rem;
		margin: 0 auto;	
		align-content: center;
		align-items: center;
		justify-content: center;
		width: 100% !important;
		scroll-padding-top: 60px; /* Offset for sticky nav */
	}

	nav {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		gap: 0.25rem;
		width: 100% !important;
		padding: 0.5rem;
	}

	nav a {
		padding: 0.4rem 0.6rem;
		font-size: 0.85rem;
	}

	.scanlines, .overlay {
		width: 100% !important;
		height: 100% !important;
	}
	.scanlines {
		background: repeating-linear-gradient(0deg,
			 var(--blue-default),
			 rgb(255, 255, 255));
	}

	.personal {
		width: 85% !important;
		margin: 0 auto !important;
	}

	.card {
		max-width: 85% !important;
	}
	.skills {
		max-width: 85% !important;
		flex-direction: column !important;
		flex-wrap: wrap !important;
	}
	.img-wrapper {
		width: 80%;
		height: 80%;
	}

	.skill-category {
		
		width: 100% !important;
		min-width: 100px !important;
		max-width: 100% !important;
	}

}


