/* ==================== Variables ==================== */
:root {
	--accent-color: #00732e;
	--text-color: #333;
	--bg-color: #fff;
	--section-bg: #f9f9f9;
	--badge-bg: #f5f5f7;
	--badge-border: #dcdcdc;
}

body.dark-mode {
	--accent-color: #20cb17;
	--text-color: #e0e0e0;
	--bg-color: #121212;
	--section-bg: #1f1f1f;
	--badge-bg: rgba(42, 42, 42, 0.6);
	--badge-border: #333;
}

/* ==================== General ==================== */
html {
	scroll-padding-top: 80px;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	color: var(--text-color);
	background-color: var(--bg-color);
	transition: background 0.3s, color 0.3s;
}

/* Global hyperlink styling */
a {
	color: var(--accent-color);
	text-decoration: none;
	transition: color 0.3s, text-decoration 0.3s;
}

a:hover {
	text-decoration: underline;
	/* Optional: slightly darken accent color on hover */
	color: #005522; /* or pick a shade darker than --accent-color */
}

/* Ensure links in dark mode remain readable */
body.dark-mode a {
	color: var(--accent-color);
}

body.dark-mode a:hover {
	color: #005522; /* slightly darker shade in dark mode if needed */
}

/* ==================== Section Headings & Content ==================== */
section h2 {
	text-align: center;
	font-size: 1.8rem;
	margin: 1.5rem 0 1rem 0; /* reduce bottom margin */
	max-width: 800px;
	margin-left: 0;
	margin-right: 0;
}

.section-content {
	max-width: 800px;
	margin: 0;
	text-align: left;
}

/* ==================== Container ==================== */
.container {
	max-width: 1000px;
	margin: 0 auto;
	padding: 1.5rem 1.5rem;
}

/* ==================== Modern Glassmorphism Navbar ==================== */
.header-nav {
	position: sticky;
	top: 0;
	width: 100%;
	backdrop-filter: blur(20px) saturate(180%);
	-webkit-backdrop-filter: blur(20px) saturate(180%);
	background: rgba(255, 255, 255, 0.25); /* frosted glass */
	border-bottom: 1px solid rgba(255, 255, 255, 0.2);
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
	z-index: 1000;
	padding: 0.5rem 1rem;
	display: flex;
	justify-content: center;
	border-radius: 12px;
	transition: background 0.3s, box-shadow 0.3s, transform 0.3s;
}

body.dark-mode .header-nav {
	background: rgba(30, 30, 30, 0.45);
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.nav-container {
	display: flex;
	align-items: center;
	gap: 2rem;
}

/* Links styling */
.nav-container a.nav-link {
	position: relative;
	font-weight: 600;
	font-size: 0.95rem;
	color: var(--text-color);
	text-decoration: none;
	padding: 0.35rem 0.75rem;
	border-radius: 10px;
	transition: color 0.3s, background 0.3s, transform 0.2s;
}

/* Hover effect: subtle background fill with scale */
.nav-container a.nav-link:hover {
	background: rgba(0, 0, 0, 0.05);
	color: var(--accent-color);
	transform: scale(1.05);
}

/* Active link underline animation */
.nav-container a.nav-link::after {
	content: '';
	position: absolute;
	width: 0%;
	height: 2px;
	bottom: -3px;
	left: 0;
	background-color: var(--accent-color);
	border-radius: 2px;
	transition: width 0.3s;
}

.nav-container a.nav-link:hover::after,
.nav-container a.nav-link.active::after {
	width: 100%;
}

/* Toggle buttons */
#theme-toggle,
#menu-toggle {
	cursor: pointer;
	font-size: 1.2rem;
	padding: 0.25rem 0.5rem;
	border-radius: 8px;
	border: 1px solid var(--accent-color);
	background: rgba(255, 255, 255, 0.2);
	transition: background 0.3s, color 0.3s, transform 0.2s;
}

#theme-toggle:hover,
#menu-toggle:hover {
	background: var(--accent-color);
	color: #fff;
	transform: scale(1.15);
}

/* ==================== Mobile Menu ==================== */
#menu-toggle {
	display: none;
	cursor: pointer;
	font-size: 1.5rem;
	padding: 0.25rem 0.5rem;
	border-radius: 8px;
	border: 1px solid var(--accent-color);
	background: rgba(255, 255, 255, 0.25);
	backdrop-filter: blur(10px) saturate(180%);
	-webkit-backdrop-filter: blur(10px) saturate(180%);
	transition: background 0.3s, color 0.3s, transform 0.2s;
}

#menu-toggle:hover {
	background: var(--accent-color);
	color: #fff;
	transform: scale(1.1);
}

/* Mobile menu container */
.mobile-menu {
	display: none;
	flex-direction: column;
	gap: 0.75rem;
	text-align: center;
	margin-top: 0.5rem;
	padding: 1rem;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.25);
	backdrop-filter: blur(15px) saturate(180%);
	-webkit-backdrop-filter: blur(15px) saturate(180%);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
	transition: transform 0.3s, opacity 0.3s;
	opacity: 0;
	transform: translateY(-10px);
}

/* Show menu when toggled */
.mobile-menu.show {
	display: flex;
	opacity: 1;
	transform: translateY(0);
}

/* Mobile links */
.mobile-menu a.nav-link {
	font-weight: 600;
	font-size: 1rem;
	color: var(--text-color);
	text-decoration: none;
	padding: 0.5rem 1rem;
	border-radius: 8px;
	transition: background 0.3s, color 0.3s;
}

.mobile-menu a.nav-link:hover,
.mobile-menu a.nav-link.active {
	background: var(--accent-color);
	color: #fff;
}

/* Responsive trigger for mobile */
@media screen and (max-width: 768px) {
	#menu-toggle {
		display: block;
	}
	.nav-container a.nav-link {
		display: none;
	}
}

/* ==================== Hero Section ==================== */
.hero.container {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	text-align: center;
	gap: 2rem;
	padding: 3rem 1rem;
	opacity: 0;
	transform: translateY(20px);
	animation: fadeInUp 0.8s forwards;
}

.hero img {
	width: 250px;
	height: 250px;
	border-radius: 50%;
	object-fit: cover;
	border: 4px solid var(--accent-color);
	transition: width 0.3s, height 0.3s;
}

.hero-text {
	max-width: 500px;
	text-align: left;
}

/* ==================== Responsive ==================== */
@media screen and (max-width: 1024px) {
	.hero img {
		width: 200px;
		height: 200px;
	}
	.hero-text {
		max-width: 400px;
	}
}

@media screen and (max-width: 768px) {
	.hero.container {
		flex-direction: column;
		text-align: center;
		padding: 2rem 1rem;
	}
	.hero img {
		width: 150px;
		height: 150px;
		margin-bottom: 1rem;
	}
	.hero-text {
		max-width: 90%;
		text-align: center;
	}
}

@media screen and (max-width: 480px) {
	.hero img {
		width: 120px;
		height: 120px;
	}
	.hero-text {
		font-size: 0.95rem;
	}
}

/* ==================== Experience / Jobs ==================== */
.job {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-start;
}

#experience-container .job {
    background: var(--bg-color);
    padding: 1.2rem 1rem 1rem 1rem;
    margin-bottom: 1rem;
    border-radius: 10px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.05);
    text-align: left;
    position: relative; /* for toggle icon */
    transition: transform 0.3s, box-shadow 0.3s;
}

#experience-container .job:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.job h3 {
    margin-top: 0;
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
}

.job-info {
    font-size: 0.95rem;
    color: gray;
    margin-bottom: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.job-info .company {
    font-weight: 500;
    color: var(--accent-color);
}

.job-info .period {
    font-style: italic;
}

.job-summary {
    margin: 0.5rem 0;
}

.job-details {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.4s ease, opacity 0.3s ease;
	opacity: 0;
    padding: 0;
    margin: 0; 
}

.job-details.show {
	max-height: 1000px;
	opacity: 1;
    padding-left: 1rem;
    margin: 0.5rem 0;
}

.job-details li {
    margin-bottom: 0.3rem;
}

/* Toggle button */
.job-toggle-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    width: 28px;
    height: 28px;
}

.job-toggle-btn img {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.job-toggle-btn img.rotate {
    transform: rotate(45deg);
}

@media screen and (max-width: 768px) {
    .job-toggle-btn {
        top: 8px;
        right: 8px;
        width: 24px;
        height: 24px;
    }
    .job-toggle-btn img {
        width: 24px;
        height: 24px;
    }
}

/* ==================== Skills ==================== */
.skills-category {
	margin-bottom: 1.5rem;
	background: rgba(255, 255, 255, 0.15);
	backdrop-filter: blur(10px);
	padding: 0.8rem 1.2rem;
	border-radius: 12px;
	box-shadow: 0 6px 15px rgba(0, 0, 0, 0.05);
	text-align: left;
	transition: transform 0.3s, box-shadow 0.3s;
}

.skills-category:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.skills-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.skill-badge {
	padding: 0.3rem 0.6rem;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.25);
	border: 1px solid var(--badge-border);
	transition: all 0.3s;
	cursor: default;
}

.skill-badge:hover {
	background: var(--accent-color);
	color: #fff;
	border-color: var(--accent-color);
}

.skills-category h3 {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 1.1rem;
}

.skills-category h3 .category-icon {
	width: 22px;
	height: 22px;
	object-fit: contain;
}

/* ==================== Projects ==================== */
.projects {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1rem;
}

.project-card {
	background: var(--bg-color);
	padding: 0.8rem;
	border-radius: 8px;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
	transition: transform 0.3s, box-shadow 0.3s;
	text-align: left;
}

.project-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
}

/* ==================== Certifications ==================== */
.certifications {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	justify-content: center;
}

.cert-card {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	max-width: 280px;
	background: var(--bg-color);
	padding: 0.4rem 0.8rem;
	border-radius: 10px;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
	text-decoration: none;
	color: var(--text-color);
	transition: transform 0.3s, box-shadow 0.3s;
}

.cert-card img {
	width: 36px;
	height: 36px;
	object-fit: contain;
}

.cert-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 7px 15px rgba(0, 0, 0, 0.1);
	color: var(--accent-color);
}

/* ==================== Contact ==================== */
.contact-cards {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem;
}

.contact-card {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	max-width: 280px;
	padding: 0.4rem 0.8rem;
	border-radius: 10px;
	background: var(--bg-color);
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
	text-decoration: none;
	color: var(--text-color);
	transition: transform 0.3s, box-shadow 0.3s, background 0.3s, color 0.3s;
	position: relative; /* for tooltip positioning */
	cursor: pointer; /* indicate clickable */
}

.contact-card:hover {
	transform: translateY(-2px);
	background: var(--accent-color);
	color: #fff;
}

.contact-icon img {
	width: 20px;
	height: 20px;
	display: inline-block;
	vertical-align: middle;
}

/* ==================== Tooltip for copied ==================== */
.contact-card .tooltip {
	position: absolute;
	top: -25px;
	left: 50%;
	transform: translateX(-50%) translateY(0);
	background: var(--accent-color);
	color: #fff;
	font-size: 0.75rem;
	padding: 2px 6px;
	border-radius: 4px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s, transform 0.3s;
	white-space: nowrap;
}

.contact-card.show-tooltip .tooltip {
	opacity: 1;
	transform: translateX(-50%) translateY(-5px);
}

/* ==================== Footer ==================== */
footer {
	text-align: center;
	padding: 1.5rem 0;
	font-size: 0.85rem;
	color: gray;
	background: var(--section-bg);
}

footer.container{
    max-width: none;
}

/* ==================== Animations ==================== */
.scroll-reveal {
	opacity: 0;
	transform: translateY(15px);
	transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-reveal.show {
	opacity: 1;
	transform: translateY(0);
}

@keyframes fadeInUp {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ==================== Responsive ==================== */
@media screen and (max-width: 768px) {
	.hero.container {
		flex-direction: column;
		text-align: center;
	}

	.skills-category {
		text-align: center;
	}

	.skills-grid {
		justify-content: center;
	}

	.job-info {
		flex-direction: column;
		gap: 0.2rem;
	}
}
