@import url("./reset.css");
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
	--accent: #0891a2;
	--accent-bright: #08aabe;
	--accent-light: #22d3ee;
	--accent-dark: #0e7490;
	--text-primary: #0f172a;
	--text-secondary: #334155;
	--text-muted: #475569;
	--bg-primary: #ffffff;
	--bg-secondary: #f8fafc;
	--border: #e2e8f0;
	--font-heading: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
	--font-body: Charter, "Bitstream Charter", "Sitka Text", Cambria, serif;
}

html[data-theme="dark"] {
	--accent: #22d3ee;
	--accent-bright: #67e8f9;
	--accent-light: #a5f3fc;
	--accent-dark: #06b6d4;
	--text-primary: #f1f5f9;
	--text-secondary: #cbd5e1;
	--text-muted: #94a3b8;
	--bg-primary: #0f172a;
	--bg-secondary: #1e293b;
	--border: #334155;
}

html {
	scroll-behavior: smooth;
	transition: background-color 0.3s ease, color 0.3s ease;
}

body {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: center;
	padding-top: 20px;
	min-height: 100vh;
	background-color: var(--bg-primary);
	font-family: var(--font-body);
	font-size: 1.15rem;
	line-height: 1.6;
	color: var(--text-primary);
}

app-header,
section,
app-footer {
	max-width: 900px;
	width: 100%;
	padding: 0 1rem;
	margin: 0 auto;
}

app-header {
	display: block;
	margin-bottom: 1rem;

	header {
		position: relative;
		display: flex;
		justify-content: center;
		align-items: center;
		font-family: var(--font-heading);
		font-size: 1rem;
		padding-top: 1rem;
	}
}

app-header nav {
	display: flex;
	gap: 1.5rem;
}

app-header nav > a {
	text-decoration: none;
	color: var(--text-secondary);
	font-weight: 500;
	padding: 0.5rem 0;
	position: relative;
	transition: color 0.2s ease;
}

app-header nav > a::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	width: 0;
	height: 2px;
	background-color: var(--accent);
	transition: width 0.2s ease;
}

app-header nav > a:hover {
	color: var(--accent);
}

app-header nav > a:hover::after {
	width: 100%;
}

#theme-toggle {
	position: absolute;
	right: 0;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0.5rem;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.2s ease;
}

#theme-toggle:hover {
	background-color: var(--bg-secondary);
}

#theme-toggle svg {
	width: 20px;
	height: 20px;
	fill: var(--text-secondary);
	transition: fill 0.2s ease;
}

#theme-toggle:hover svg {
	fill: var(--accent);
}

main {
	width: 100%;
}

section {
	height: auto;
	margin-bottom: 3rem;
}

h1 {
	font-family: var(--font-heading);
	font-size: clamp(1.5rem, 4vw, 2.2rem);
	font-weight: 700;
	color: var(--text-primary);
	letter-spacing: -0.02em;
	margin-bottom: 1.5rem;
}

.anchor-link {
	font-size: 0.75em;
	font-weight: 400;
	color: var(--text-muted);
	opacity: 0;
	transition: opacity 0.2s ease;
	margin-left: 0.25rem;
}

h1:hover .anchor-link {
	opacity: 1;
}

.anchor-link:hover {
	color: var(--accent);
}

h2 {
	font-family: var(--font-heading);
	font-size: clamp(1.2rem, 3vw, 1.8rem);
	font-weight: 600;
	color: var(--text-primary);
	letter-spacing: -0.01em;
}

h3 {
	font-family: var(--font-heading);
	font-size: clamp(1rem, 2.5vw, 1.4rem);
	font-weight: 600;
	color: var(--text-primary);
}

.about-container {
	display: flex;
	gap: 3rem;
	align-items: flex-start;
	margin-top: 1rem;
}

.profile-photo {
	width: 320px;
	height: auto;
	border-radius: 12px;
	object-fit: cover;
	flex-shrink: 0;
	margin-top: 10px;
}

.about-content {
	flex: 1;
}

.about-content h2 {
	margin-bottom: 1rem;
}

.about-content p {
	margin-bottom: 0.75rem;
	color: var(--text-secondary);
}

.about-links {
	margin-top: 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.about-link-group {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.link-row {
	display: flex;
	gap: 1rem;
}

.link-row a {
	font-family: var(--font-heading);
	font-size: 0.95rem;
}

.greeting {
	margin-top: 80px;
	font-family: var(--font-heading);
	font-size: clamp(2.5rem, 6vw, 3.5rem);
	font-weight: 700;
	color: var(--text-primary);
	letter-spacing: -0.03em;
	/* Reserve space to prevent CLS during font load */
	min-height: 1.2em;
	line-height: 1.2;
}

.greeting .name {
	color: var(--accent-bright);
}

.career {
	margin-bottom: 2rem;
	padding: 1.5rem;
	background-color: var(--bg-secondary);
	border-radius: 12px;
	border: 1px solid var(--border);
}

.career h2 {
	color: var(--text-primary);
	margin-bottom: 0.25rem;
}

.career p {
	margin-bottom: 0.5rem;
}

.explanation {
	font-weight: 500;
	color: var(--text-secondary);
}

.tech-stack {
	font-size: 0.9rem;
	color: var(--text-muted);
	font-family: var(--font-heading);
}

ul {
	margin: 5px 0px;
}

#posts-container {
	padding-left: 1.5rem;
	list-style: disc;

	a {
		text-decoration: none;
	}
}

.about-me-keyword {
	font-family: var(--font-heading);
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

footer {
	display: flex;
	justify-content: center;
	column-gap: 1rem;
	margin-top: 40px;
	padding: 30px 0px;
	height: auto;
	border-top: 1px solid var(--border);

	a {
		margin: 0 5px;
		font-size: 0;
		transition: transform 0.2s ease;
	}

	a:hover {
		transform: translateY(-2px);
	}
}

.footer-icon {
	width: 24px;
	height: 24px;
	fill: var(--text-muted);
	transition: fill 0.2s ease;
}

a:hover .footer-icon {
	fill: var(--accent);
}

a {
	color: var(--accent);
	text-decoration: underline;
	text-underline-offset: 0.15rem;
	text-decoration-thickness: 1px;
	text-decoration-color: var(--accent);
	transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

a:hover {
	color: var(--accent-dark);
	text-decoration-color: var(--accent-dark);
}

.link {
	color: var(--accent);
	text-underline-offset: 0.15rem;
	text-decoration-thickness: 1px;
}

.tooltip {
	position: relative;
	display: inline-block;
}

.tooltip .tooltip-text {
	visibility: hidden;
	padding: 6px 10px;
	border-radius: 8px;
	background-color: var(--text-primary);
	color: #fff;
	text-align: center;
	font-family: var(--font-heading);
	font-size: 0.35em;
	font-weight: 500;
	min-width: 70px;
	white-space: nowrap;

	/* Position the tooltip */
	position: absolute;
	z-index: 1;
	bottom: 100%;
	left: 50%;
	transform: translateX(-50%);

	/* Add animation */
	opacity: 0;
	transition: opacity 0.2s ease;
}

.tooltip:hover .tooltip-text {
	visibility: visible;
	opacity: 1;
}

@media (max-width: 768px) {
	body {
		font-size: 1rem;
	}

	section {
		min-height: auto;
	}

	h1 {
		font-size: clamp(1.4rem, 5vw, 1.8rem);
	}

	h2 {
		font-size: clamp(1.2rem, 4vw, 1.5rem);
	}

	h3 {
		font-size: clamp(1.1rem, 3vw, 1.3rem);
	}

	.greeting {
		margin-top: 50px;
	}

	.about-container {
		flex-direction: column;
		gap: 1.5rem;
	}

	.profile-photo {
		width: 100%;
		max-width: 400px;
		margin-top: -10px;
	}

	iframe {
		width: 100%;
	}

	.about-me-keyword {
		font-size: 0.8rem;
	}

	.career {
		padding: 1rem;
	}

	footer {
		max-width: 100%;
		padding: 20px 0px;
	}
}


.not-found {
	text-align: center;
	margin-top: 80px;
}

.not-found h1 {
	font-size: clamp(4rem, 15vw, 8rem);
	color: var(--text-muted);
	margin-bottom: 0.5rem;
}

.not-found p {
	color: var(--text-secondary);
}
