:root {
  --title-a:    rgba(140, 140, 255, 1.0);
  --title-b:    rgba(200, 200, 255, 1.0);
  --sub-title:  rgba(200, 200, 255, 1.0);
  --text:       rgba(233, 233, 244, 1.0);
  --text-hover: rgba(255, 255, 255, 1.0);
  --text-color: rgba(180, 180, 255, 1.0);
  --text-muted: rgba(140, 140, 200, 1.0);
  --bg-blur: 1px;
  --border-radius: 8px;
  --bg-color:               rgba(30, 30, 70, 0.1);
  --outline-color:          rgba(30, 30, 70, 0.2);
  --bg-color-emphasis:      rgba(100, 100, 240, 0.1);
  --outline-color-emphasis: rgba(90, 90, 140, 0.4);
  --bg-color-light:         rgba(255, 255, 255, 1.0);
  --bg-color-dark:         rgba(11, 11, 11, 1.0);
  --divider:        rgba(140, 140, 255, 0.2);
  --divider-subtle: rgba(40, 40, 70, 0.4);
  --shadow: rgba(0, 0, 0, 0.3);
  --bg-contrast: rgba(20, 20, 40, 0.9);
  --border:           rgba(100, 100, 150, 0.2);
  --border-selection: rgba(200, 200, 255, 0.4);
  --modal-bg: rgba(0, 0, 0, 0.7);
  --modal-blur: 3px;
}

html { scroll-behavior: smooth; }           /* smooth scrolling */

/* Transition */
.section {
	opacity: 0.0;
    transform: scale(0.95);
}

.is-visible { 
    transition: transform .4s ease-in, opacity .4s ease-in !important;
	transform: scale(1.0); 
	opacity: 1.0;
}

/* -------------  Sensitive image styles ------------- */
.sensitive {
	position: relative;              /* needed for absolute overlay */
	display: inline-block;           /* keeps container width to image width */
	cursor: pointer;                 /* cue the user */
	overflow: hidden;
	border-radius: var(--border-radius);
}
.sensitive img {
  /* The actual blur – change the value to tweak it */
	filter: blur(12px);
	transition: filter 3.5s ease;
}
.sensitive .overlay {
	position: absolute;
	inset: 0;                     /* top/right/bottom/left = 0 */
	background: rgba(0, 0, 0, 0.3);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.9rem;
	font-weight: 600;
	text-align: center;
	padding: 0.5rem;
	transition: opacity 1.5s ease;
	pointer-events: auto; /* allow click */
	border-radius: var(--border-radius);
}
.sensitive.revealed img   { filter: none; }            /* show plain image */
.sensitive.revealed .overlay { opacity: 0; pointer-events: none; }

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
	background: linear-gradient(135deg, #07070f 0%, #101020 50%, #131c2e 100%);
	color: var(--text);
	min-height: 100vh;
	padding: 2rem;
	position: relative;
	overflow-x: hidden;
}

.navbar {
	position:fixed;
	top:0; left:0; right:0;
	height: 3rem;
	background: linear-gradient(to top, var(--shadow), var(--modal-bg));
	backdrop-filter: blur(var(--modal-blur)); 
	display:flex;
	align-items:center;
	justify-content:center;
	transform:translateY(-100%);        /* start off the screen */
	transition:transform .3s ease;
	z-index:1000;
}

.navbar.is-visible {
	transform:translateY(0);           /* slide down into view */
}

.navbar a {
	color: var(--text-muted);
	text-decoration:none;
	padding: 0.3rem 0.8rem;
	border-radius: 2px;
	margin:0 0.2rem;
	font-weight:600;
}

.navbar a:hover { text-decoration:underline; }

.container {
	max-width: 1400px;
	margin: 0 auto;
}

.divider {
	margin-bottom: 6rem;
	margin-top: 2rem;
	border-top: 1px solid var(--divider);
}

header.main {
	height: 100vh;
	text-align: center;
	position: relative;
	display: grid;
	place-items: center;
}

#scroll-down {
	height: 4rem;
	position: absolute;
	bottom: 1rem;
	animation: jump 1.2s linear infinite;
}

#scroll-down.not-visible {
	display: none;
}

@keyframes jump {
	0%   { transform: translateY(0); }
	30%  { transform: translateY(-30px); }
	100% { transform: translateY(0); }
}

header.new-section {
	height: 100%;
	text-align: center;
	padding-top: 4rem;
	padding-bottom: 4rem;
	position: relative;
}

header.subpage {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 30px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--divider);
}

.back-link {
	display: flex;
	align-items: center;
	color: var(--sub-title);
	text-decoration: none;
	font-size: 1.5rem;
	font-weight: 300;
	transition: color 0.3s;
}

.back-link:hover {
	color: var(--text-hover);
}

.back-link i {
	margin-right: 10px;
}

h1 {
	font-family: "Dotum", sans-serif;
	font-weight: 100;
	font-size: 4.5rem;
	margin-bottom: 0.5rem;
	background: linear-gradient(to right, var(--title-a), var(--title-b));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	text-shadow: 0 0 15px rgba(160, 196, 255, 0.3);
	letter-spacing: 2px;
}

h2 {
	font-family: "Dotum", sans-serif;
	font-weight: 100;
	font-size: 2rem;
	margin-bottom: 0.5rem;
	background: linear-gradient(to right, var(--title-a), var(--title-b));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	text-shadow: 0 0 15px rgba(160, 196, 255, 0.3);
	letter-spacing: 2px;
}

a {
	color: var(--text-color);
}

a:hover {
	color: var(--text-hover);
}

.subtitle {
	color: var(--sub-title);
	font-size: 1.2rem;
	opacity: 0.8;
	max-width: 600px;
	margin: 0 auto;
	line-height: 1.6;
}

.portfolio-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
	gap: 2rem;
	padding: 1rem 0;
}

.portfolio-item {
	position: relative;
	border-radius: var(--border-radius);
	overflow: hidden;
	height: 350px;
	box-shadow: 0 10px 20px var(--shadow);
	transition: all 0.4s ease;
	background: var(--bg-contrast);
	border: 1px solid var(--border);
}

.portfolio-item:hover {
	transform: translateY(-10px);
	box-shadow: 0 15px 30px  var(--shadow);
	border-color: var(--border-selection);
}

.portfolio-link {
	display: block;
	width: 100%;
	height: 100%;
	position: relative;
	overflow: hidden;
}

.portfolio-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-image {
	transform: scale(1.05);
}

.portfolio-overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: linear-gradient(to top, var(--bg-contrast), transparent);
	padding: 1.5rem 1rem 1rem;
	transform: translateY(100%);
	transition: transform 0.2s ease;
}

.portfolio-item:hover .portfolio-overlay {
	transform: translateY(0);
}

.portfolio-title {
	font-size: 1.4rem;
	margin-bottom: 0.5rem;
	color: var(--text-hover);
}

.portfolio-category {
	font-size: 0.9rem;
	color: var(--text-color);
	text-transform: uppercase;
	letter-spacing: 1px;
}

.content {
	display: flex;
	gap: 30px;
	margin-bottom: 40px;
}

/* -------------  Tools & Skills styles ------------- */

.skills-section {
	margin: 3rem 0;
}

/*  Grid of categories / columns  */
.skills-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 0.5rem;
}

/*  Category container  */
.skill-category {
	background: var(--bg-color);
	backdrop-filter: blur(var(--bg-blur));
	border-radius: var(--border-radius);
	padding: 1rem;
	margin: 0rem;
	transition: padding 0.2s ease-out, margin 0.2s ease-out;
	box-shadow: 0 2px 6px var(--shadow);
	border: 1px solid var(--outline-color);
	height:fit-content;
	text-decoration: none;
	color: var(--text);
}

.skill-category.skill-link:hover {
	background: var(--bg-color-emphasis);
	border: 1px solid var(--outline-color-emphasis);
	padding: 1.05rem;
	margin: -0.05rem;
	transition: padding 0.1s ease-out, margin 0.1s ease-out;
}

/*  Category header (icon + name)  */
.skill-category-header {
	display: flex;
	align-items: center;
	margin-bottom: 0.75rem;
}

.skill-category-name {
	font-weight: 600;
	font-size: 1.1rem;
}

/*  Category bar  */
.category-bar {
	width: 100%;
	height: 10px;
	background: var(--bg-color-emphasis);
	border: 1px solid var(--outline-color);
	border-radius: 5px;
	overflow: hidden;
	position: relative;
	margin-bottom: 1.25rem;
}

.category-bar .skill-fill {
	background: linear-gradient(to right, transparent, var(--title-a));
}

/*  Grid of tools inside a category  */
.tools-grid {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

/*  One tool row  */
.skill-item {
	display: flex;
	align-items: center;
}

.skill-icon {
	width: 32px; 
	height: 32px;
	object-fit: contain;
	margin-right: 0.6rem;
	border-radius: 3px;
}

.skill-icon.light-bg {
	background: var(--bg-color-light);
}

.skill-icon.modal-target {
	border: 1px solid var(--outline-color);
	border-radius: 16px;
	cursor: pointer;
}

.skill-icon.modal-target:hover {
	border: 1px solid var(--outline-color-emphasis);
}

/*  Text part (name + bar)  */
.skill-info {
	flex: 1;
}

/*  Tool name  */
.skill-name {
	font-weight: 600;
	font-size: 0.95rem;
	margin-bottom: 0.25rem;
	color: var(--text-muted);
}

/*  Tool bar  */
.skill-bar {
	width: 100%;
	height: 7px;
	background: var(--bg-color-emphasis);
	border: 1px solid var(--outline-color);
	border-radius: 4px;
	overflow: visible;
	position: relative;
}

.skill-fill {
	position: absolute;
	left: 0; 
	top: 0; 
	height: 100%;
	border-radius: 4px;
	width: 0;                 /* start from 0 */
	background: linear-gradient(to right, transparent, var(--title-b));
	display: flex;
	align-items: center;
}

.skill-fill.is-visible {
	animation: grow 2.2s ease forwards;
	animation-delay: 0.1s;
}

@keyframes grow {
	from { width: 0; }
	to   { width: var(--skill-percent); }
}

.skill-marker {
	position: absolute;
	right: 0;
	transform: translateX(50%);
	height: 40px;
}

/* Timeline */
.timeline {
	position: relative;
	margin: 0;
	border-radius: 50%;
}

.timeline::before {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	width: 2px;
	border-radius: 100%;
	background: linear-gradient(to bottom, #4a4a8a, #c0c0ff, #a0a0ff, #6a6aaa, #4a4a8a);
	left: 50%;
	transform: translateX(-50%);
}

.timeline-spacer {
	text-align: center;
	color: rgb(0,0,0,0);
	position: relative;
	margin-bottom: 75px;
	width: 100%;
}


.timeline-item {
	position: relative;
	margin-bottom: 100px;
	width: 100%;
}

.timeline-item:nth-child(odd) {
	padding-right: calc(50% + 20px);
	text-align: right;
}

.timeline-item:nth-child(even) {
	padding-left: calc(50% + 20px);
}

.timeline-date {
	position: absolute;
	top: 0;
	padding: 5px 1.5em;
	color: var(--text-color);
	background: var(--bg-color);
	border-radius: 1.2em;
	font-size: 1.2em;
	font-weight: 200;
	text-align: center;
	border: 1px solid var(--outline-color-emphasis);
}

.timeline-item:nth-child(odd) .timeline-date {
	margin-left: 50%;
	left: 20px;
}

.timeline-item:nth-child(even) .timeline-date {
	margin-right: 50%;
	right: 20px;
}

.timeline-content {
	background: var(--bg-color);
	border-radius: var(--border-radius);
	padding: 20px;
	border: 1px solid var(--outline-color);
	backdrop-filter: blur(var(--bg-blur));
}


.project-title {
	font-size: 1.4rem;
	margin-bottom: 15px;
	color: var(--text-color);
	font-weight: 200;
	font-size: 2.5em;
}

h3.project-title{
	text-align: left;
	font-size: 1.2rem;
	margin-bottom: 0px;
	font-weight: 600;
	color: var(--text-color);
}

.project-description {
	margin-bottom: 20px;
	line-height: 1.4;
	text-align: justify;
}

.project-bullets{
	text-align: left;
	padding-left: 1.4rem;
	margin-bottom: 20px;
	line-height: 1.4;
}

.project-images {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
	margin-bottom: 20px;
}

.project-image {
	width: 100%;
	height: 150px;
	object-fit: cover;
	border-radius: var(--border-radius);
	cursor: pointer;
	transition: transform 0.3s;
	border: 1px solid rgba(100, 100, 200, 0.2);
}

.project-image img{
	width: 100%;
	height: 150px;
	object-fit: cover;
}

.project-image:hover {
	transform: scale(1.05);
}

.video-container {
	position: relative;
	padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
	height: 0;
	overflow: hidden;
	border-radius: var(--border-radius);
}


.video-preview {
	position: absolute;
	top: -2%;
	left: -2%;
	width: 104%;
	height: 104%;
	border: none;
	filter: blur(3px);
	transition: top 0.3s ease, left 0.3s ease, width 0.3s ease, height 0.3s ease;
}

.video-text {
	position: absolute;
	width: 100%;
	padding: 5% 10%;
	color: var(--text);
	text-align: left;
	text-overflow: ellipsis;
	white-space: nowrap;
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent);
}
.video-title {
	font-size: 1.2rem;
	font-weight: 600;
}

.video-subtitle {
	font-size: 0.8rem;
	font-weight: 500;
}

.video-play {
	position: absolute;
	top: 50%; 
	left: 50%;
	transform: translate(-50%,-50%);
	width: 15%; 
	height: auto; 
	transition: width 0.1s ease;
}

.video-container:hover img.video-preview{
	top: 0%;
	left: 0%;
	width: 100%;
	height: 100%;
	filter: blur(0px) !important;
	transition: top 0.2s ease-out, left 0.2s ease-out, width 0.2s ease-out, height 0.2s ease-out;
}

.video-container:hover img.video-play{
	width: 16% !important;
	transition: width 0.2s ease;
}

/* Subppage gallery */

.gallery {
	flex: 1;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 20px;
	grid-auto-rows: min-content;
}

.gallery-item {
	position: relative;
	overflow: hidden;
	border-radius: var(--border-radius);
	cursor: pointer;
	aspect-ratio: 1/1;
	box-shadow: 0 4px 15px var(--shadow);
	transition: transform 0.3s, box-shadow 0.2s;
}

.gallery-item:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 25px var(--shadow);
	border: 1px solid var(--border-selection);
}

.gallery-item-viewer {
	position: relative;
	overflow: hidden;
	border-radius: var(--border-radius);
	aspect-ratio: 1/1;
	box-shadow: 0 4px 15px var(--shadow);
}

.viewer {
	width: 100%;
	height: 100%;
	border: none;
}

.gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s;
}

.gallery-item:hover img {
	transform: scale(1.05);
}

.info-panel {
	width: 350px;
	background: var(--bg-color);
	border-radius: var(--border-radius);
	padding: 25px;
	backdrop-filter: blur(var(--bg-blur));
	border: 1px solid var(--outline-color);
	box-shadow: 0 8px 32px var(--shadow);
	height:fit-content; 
}

.info-panel h2 {
	font-weight: 300;
	font-size: 1.8rem;
	margin-bottom: 20px;
	color: var(--title);
}

.info-panel p {
	line-height: 1.6;
	margin-bottom: 25px;
	font-size: 1.05rem;
}

.tools {
	margin-top: 20px;
}

.tools h3 {
	font-weight: 400;
	margin-bottom: 15px;
	font-size: 1.2rem;
	color: var(--text-muted);
}

.tools-list {
	list-style: none;
}

.tools-list li {
	margin-bottom: 12px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--divider-subtle);
}

.tools-list li:last-child {
	border-bottom: none;
	margin-bottom: 0;
}

.tools-list a {
	color: var(--text-muted);
	text-decoration: none;
	display: flex;
	align-items: center;
	transition: color 0.3s;
}

.tools-list a:hover {
	color: var(--text-hover);
}

.tools-list a img {
	margin-right: 10px;
	height: 1.2rem;
	width: auto;
}

/* Modal */
.modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: var(--modal-bg);
	backdrop-filter: blur(var(--modal-blur));
	z-index: 1000;
	align-items: center;
	justify-content: center;
}

.modal-content {
	position: relative;
	max-width: 90%;
	max-height: 90%;
}

.modal-image {
	max-width: 100%;
	max-height: 80vh;
	border-radius: var(--border-radius);
	box-shadow: 0 0 30px var(--shadow);
}

.close-modal {
	position: absolute;
	top: -40px;
	right: 0;
	color: var(--text);
	font-size: 30px;
	cursor: pointer;
	background: none;
	border: none;
}

/* Stars */
.stars {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: -1;
}

.star {
	position: absolute;
	background-color: #fff;
	border-radius: 50%;
	animation: twinkle var(--duration, 5s) infinite ease-in-out;
}

@keyframes twinkle {
	0%, 100% { opacity: 0.2; }
	50% { opacity: 1; }
}

footer {
	color: var(--text-muted);
	text-align: center;
	padding: 3rem 0 2rem;
	margin-top: 2rem;
	border-top: 1px solid var(--divider);
	font-size: 0.9rem;
	opacity: 0.7;
}

.social-links {
	display: flex;
	justify-content: center;
	margin: 1.5rem 0;
	gap: 1.5rem;
}

.social-links a {
	color: var(--text-color);
	background-size: contain;
	background-position: center;
	background-repeat: no-repeat;
	transition: all 0.3s ease;
	height: 2.0rem;
	width: 3.0rem;
}

.social-links div {
	padding-left: 1.5rem;
	color: var(--text-muted);
	text-align: center;
}

.social-links a:hover {
	transform: translateY(-5px);
}

.email {
	padding: 2px 5px;
	color: var(--text-color);
	text-decoration: none;
	background-image: url("e-mail_white.png");
}

.email:hover {
	background-image: url("e-mail_colour.png");
}

.linkedin {
	background-image: url("LinkedIn_white.png");
}

.linkedin:hover {
	background-image: url("LinkedIn_colour.png");
}

.youtube {
	background-image: url("YouTube_white.png");
}

.youtube:hover {
	background-image: url("YouTube_colour.png");
}

@media (max-width: 768px) {
	.portfolio-grid {
		grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	}
	
	.timeline::before {
		left: 20px;
	}
	
	.timeline-item {
		padding-left: 50px !important;
		padding-right: 0 !important;
		text-align: left !important;
	}
	
	.timeline-date {
		position: relative;
		left: 0 !important;
		right: 0 !important;
		margin-bottom: 10px;
		margin-left: 0px !important;
		margin-right: 0px !important;
		display: inline-block;
	}
	
	.project-images {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 480px) {
	.portfolio-grid {
		grid-template-columns: 1fr;
	}
}


@media (max-width: 900px) {
	.content {
		flex-direction: column;
	}
	
	.info-panel {
		width: 100%;
	}
	
	header.subpage {
		flex-direction: column;
		text-align: center;
	}
}






