/* ==========================================================
   semihbceylan.com
   ========================================================== */
:root {
	--bg: #0f1114;
	--surface: #16191d;
	--surface-hover: #1b1f24;
	--border: #262a30;
	--border-strong: #343941;
	--text: #e9ebee;
	--text-muted: #a0a6b0;
	--text-dim: #6f7680;
	--accent: #4f9fe0;
	--accent-hover: #6cb2ea;
	--accent-soft: rgba(79, 159, 224, 0.12);
	--success: #3ecf8e;
	--danger: #ff6b81;
	--radius: 14px;
	--radius-sm: 10px;
	--container: 1120px;
	--header-h: 68px;
	--font: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + 16px);
	-webkit-text-size-adjust: 100%;
}

body {
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.6;
	color: var(--text);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

img,
svg {
	display: block;
	max-width: 100%;
}

a {
	color: inherit;
	text-decoration: none;
}

ul,
ol {
	list-style: none;
}

button,
input,
textarea {
	font: inherit;
	color: inherit;
}

::selection {
	background: rgba(79, 159, 224, 0.35);
}

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
	border-radius: 6px;
}

.icon {
	width: 1.1em;
	height: 1.1em;
	flex-shrink: 0;
}

.container {
	width: min(100% - 2.5rem, var(--container));
	margin-inline: auto;
}

.skip-link {
	position: absolute;
	left: 1rem;
	top: -100px;
	z-index: 100;
	padding: 0.6rem 1rem;
	background: var(--text);
	color: var(--bg);
	border-radius: var(--radius-sm);
	font-weight: 600;
}

.skip-link:focus {
	top: 1rem;
}

/* ---------- Background ---------- */
/* Very faint neutral grid lines */
.bg-grid {
	position: fixed;
	inset: 0;
	z-index: -1;
	background-image:
		linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
	background-size: 3rem 3rem;
	pointer-events: none;
}

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	height: 46px;
	padding: 0 1.4rem;
	border-radius: 999px;
	border: 1px solid transparent;
	font-weight: 600;
	font-size: 0.95rem;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s;
}

.btn-primary {
	background: var(--accent);
	color: #fff;
}

.btn-primary:hover {
	background: var(--accent-hover);
}

.btn-ghost {
	background: transparent;
	border-color: var(--border-strong);
}

.btn-ghost:hover {
	background: var(--surface-hover);
	border-color: var(--text-dim);
}

.btn-small {
	height: 38px;
	padding: 0 1rem;
	font-size: 0.88rem;
}

.btn-block {
	width: 100%;
}

.btn[disabled] {
	opacity: 0.6;
	cursor: wait;
}

/* ---------- Header / nav ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	height: var(--header-h);
	background: rgba(15, 17, 20, 0.85);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border-bottom: 1px solid transparent;
	transition: border-color 0.3s;
}

.site-header.scrolled {
	border-bottom-color: var(--border);
}

.nav {
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.nav-logo {
	font-family: var(--font-mono);
	font-weight: 700;
	font-size: 1.25rem;
	letter-spacing: 0.08em;
}

.nav-logo span {
	color: var(--accent);
}

.nav-menu {
	display: flex;
	align-items: center;
	gap: 1.75rem;
}

.nav-links {
	display: flex;
	gap: 1.5rem;
}

.nav-links a {
	position: relative;
	color: var(--text-muted);
	font-size: 0.93rem;
	font-weight: 500;
	transition: color 0.2s;
}

.nav-links a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -6px;
	height: 2px;
	border-radius: 2px;
	background: var(--accent);
	transform: scaleX(0);
	transition: transform 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
	color: var(--text);
}

.nav-links a.active::after {
	transform: scaleX(1);
}

.nav-toggle {
	display: none;
	width: 42px;
	height: 42px;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
	background: var(--surface);
	cursor: pointer;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 5px;
}

.nav-toggle span {
	display: block;
	width: 18px;
	height: 2px;
	background: var(--text);
	border-radius: 2px;
	transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
	opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Typography helpers ---------- */
.eyebrow {
	font-family: var(--font-mono);
	font-size: 0.8rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--accent);
}

.highlight {
	color: var(--accent);
}

.muted {
	color: var(--text-muted);
}

/* ---------- Hero ---------- */
.hero {
	display: grid;
	grid-template-columns: 1.25fr 1fr;
	align-items: center;
	gap: 4rem;
	padding-block: 5rem 4.5rem;
}

.status {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	margin-bottom: 1.5rem;
	padding: 0.35rem 0.85rem;
	border: 1px solid var(--border-strong);
	border-radius: 999px;
	color: var(--text-muted);
	font-size: 0.85rem;
	font-weight: 500;
}

.status-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--success);
}

.hero h1 {
	margin: 0.4rem 0 0.75rem;
	font-size: clamp(2.6rem, 6vw, 4.4rem);
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -0.03em;
}

.hero-tagline {
	font-size: clamp(1.2rem, 2.4vw, 1.55rem);
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: -0.01em;
	max-width: 32ch;
}

.hero-bio {
	margin-top: 1.25rem;
	max-width: 56ch;
	color: var(--text-muted);
	font-size: 1.05rem;
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 2rem;
}

.hero-photo {
	position: relative;
	justify-self: center;
	width: min(100%, 380px);
	aspect-ratio: 4 / 5;
	border-radius: 20px;
	border: 1px solid var(--border-strong);
	background: var(--surface);
	overflow: hidden;
}

.hero-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
}

/* Fixed-size icon buttons: same shape before and after anything loads */
.social {
	display: flex;
	gap: 0.6rem;
	margin-top: 1.75rem;
}

.social a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	border: 1px solid var(--border-strong);
	background: var(--surface);
	color: var(--text-muted);
	transition: color 0.2s, background-color 0.2s, border-color 0.2s;
}

.social a:hover {
	color: var(--text);
	background: var(--surface-hover);
	border-color: var(--text-dim);
}

.social .icon {
	width: 20px;
	height: 20px;
}

.social.small {
	margin-top: 0;
}

.social.small a {
	width: 38px;
	height: 38px;
	border-radius: 10px;
}

.social.small .icon {
	width: 17px;
	height: 17px;
}

.star {
	color: #e8b64c;
}

/* ---------- Sections ---------- */
.section {
	padding-block: 6rem 0;
}

.section-head {
	margin-bottom: 2.5rem;
}

.section-head h2 {
	margin-top: 0.4rem;
	font-size: clamp(2rem, 4vw, 2.6rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.15;
}

/* ---------- Experience / Education ---------- */
.exp-list {
	display: grid;
	gap: 1rem;
}

.exp-item {
	display: grid;
	grid-template-columns: 96px 1fr;
	align-items: start;
	gap: 1.5rem;
	padding: 1.5rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
	transition: border-color 0.25s;
}

.exp-item:hover {
	border-color: var(--border-strong);
}

.logo-tile {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 96px;
	height: 56px;
	padding: 8px 10px;
	border-radius: var(--radius-sm);
	background: #fff;
	overflow: hidden;
}

.logo-tile img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.exp-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
}

.exp-head h3 {
	font-size: 1.12rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1.35;
}

.exp-company {
	color: var(--text-muted);
	font-weight: 500;
	font-size: 0.95rem;
}

.exp-company a {
	border-bottom: 1px solid var(--border-strong);
	transition: color 0.2s, border-color 0.2s;
}

.exp-company a:hover {
	color: var(--text);
	border-color: var(--text-dim);
}

.exp-date {
	flex-shrink: 0;
	padding-top: 0.2rem;
	font-family: var(--font-mono);
	font-size: 0.8rem;
	color: var(--text-dim);
	white-space: nowrap;
}

.exp-points {
	display: grid;
	gap: 0.4rem;
	margin-top: 0.85rem;
	color: var(--text-muted);
	font-size: 0.95rem;
}

.exp-points li {
	position: relative;
	padding-left: 1.1rem;
}

.exp-points li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.7em;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: var(--text-dim);
}

.exp-body .tags {
	margin-top: 0.9rem;
}

/* ---------- Projects ---------- */
.project-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 1.25rem;
}

.project-card {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
	overflow: hidden;
	transition: transform 0.25s ease, border-color 0.25s ease;
}

.project-card:hover {
	transform: translateY(-3px);
	border-color: var(--border-strong);
}

/* Reserved space + placeholder colour while the lazy image loads */
.project-thumb {
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-bottom: 1px solid var(--border);
	background: #1c2025;
	animation: placeholder 1.4s ease-in-out infinite alternate;
}

.project-thumb.loaded {
	animation: none;
}

@keyframes placeholder {
	to { background-color: #23282e; }
}

.project-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
}

.project-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 1.25rem 1.35rem 1.35rem;
}

.project-body h3 {
	font-size: 1.15rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	margin-bottom: 0.4rem;
}

.project-body > p {
	color: var(--text-muted);
	font-size: 0.93rem;
}

.badge {
	display: inline-flex;
	align-self: flex-start;
	align-items: center;
	gap: 0.35rem;
	margin-bottom: 0.7rem;
	padding: 0.2rem 0.6rem;
	border-radius: 999px;
	border: 1px solid var(--border-strong);
	color: var(--text) !important;
	font-size: 0.78rem !important;
	font-weight: 600;
}

.badge .icon {
	width: 12px;
	height: 12px;
}

.tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-top: 1rem;
}

.tags li {
	padding: 0.2rem 0.6rem;
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid var(--border);
	color: var(--text-muted);
	font-family: var(--font-mono);
	font-size: 0.72rem;
}

.project-links {
	display: flex;
	gap: 1.25rem;
	margin-top: auto;
	padding-top: 1.1rem;
}

.project-links a {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--accent);
	transition: color 0.2s;
}

.project-links a:hover {
	color: var(--accent-hover);
}

.project-links .icon {
	width: 15px;
	height: 15px;
}

/* Thumbnail for projects without a screenshot yet */
.project-thumb.placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	animation: none;
	background-color: #14171b;
	background-image:
		linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
	background-size: 1.5rem 1.5rem;
}

.project-thumb.placeholder span {
	font-family: var(--font-mono);
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--text-muted);
}

.project-grid.featured {
	grid-template-columns: repeat(2, 1fr);
}

.project-grid.featured .project-thumb {
	aspect-ratio: 2 / 1;
}

.project-thumb.contain {
	background: #fff;
	animation: none;
}

.project-thumb.contain img {
	object-fit: contain;
	object-position: center;
}

.sub-head {
	margin: 3.5rem 0 1.25rem;
	font-size: 1.2rem;
	font-weight: 700;
	color: var(--text-muted);
}

.more-link {
	margin-top: 2rem;
	text-align: center;
}

.more-link a {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--text-muted);
	font-weight: 600;
	transition: color 0.2s;
}

.more-link a:hover {
	color: var(--text);
}

/* ---------- Skills ---------- */
.skill-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 1.25rem;
}

.skill-card {
	padding: 1.5rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
}

.skill-card h3 {
	font-size: 1.05rem;
	font-weight: 700;
}

.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 1rem;
}

.chips li {
	display: inline-flex;
	align-items: center;
	height: 34px;
	padding: 0 0.85rem;
	border-radius: 999px;
	border: 1px solid var(--border-strong);
	font-size: 0.88rem;
	font-weight: 500;
}

/* ---------- Awards & languages ---------- */
.info-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.25rem;
	margin-top: 1.25rem;
}

.info-card {
	padding: 1.5rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
}

.info-card h3 {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-size: 1.05rem;
	font-weight: 700;
}

.info-card h3 .icon {
	width: 20px;
	height: 20px;
	color: var(--accent);
}

.info-list {
	display: grid;
	margin-top: 0.75rem;
	color: var(--text-muted);
	font-size: 0.95rem;
}

.info-list li {
	padding: 0.6rem 0;
	border-bottom: 1px solid var(--border);
}

.info-list li:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.lang-list li {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
}

.lang-list li span:first-child {
	color: var(--text);
	font-weight: 500;
}

/* ---------- Contact ---------- */
.contact-card {
	display: grid;
	grid-template-columns: 1fr 1.15fr;
	gap: 3rem;
	padding: 2.75rem;
	border: 1px solid var(--border);
	border-radius: 20px;
	background: var(--surface);
}

.contact-info h2 {
	margin: 0.4rem 0 0.75rem;
	font-size: clamp(1.8rem, 3.5vw, 2.3rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.15;
}

.contact-list {
	display: grid;
	gap: 0.85rem;
	margin-top: 1.75rem;
}

.contact-list li {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	color: var(--text-muted);
}

.contact-list .icon {
	width: 18px;
	height: 18px;
	color: var(--text-dim);
}

.contact-list a:hover {
	color: var(--text);
}

.contact-form {
	display: grid;
	gap: 1rem;
	align-content: start;
}

.field-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

.field {
	display: grid;
	gap: 0.4rem;
}

.field span {
	font-size: 0.85rem;
	font-weight: 500;
	color: var(--text-muted);
}

.field input,
.field textarea {
	width: 100%;
	padding: 0.8rem 1rem;
	border-radius: var(--radius-sm);
	border: 1px solid var(--border-strong);
	background: var(--bg);
	transition: border-color 0.2s;
}

.field textarea {
	resize: vertical;
	min-height: 140px;
}

.field input:focus,
.field textarea:focus {
	outline: none;
	border-color: var(--accent);
}

.field.invalid input,
.field.invalid textarea {
	border-color: var(--danger);
}

.hp {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.form-status {
	min-height: 1.5em;
	font-size: 0.92rem;
}

.form-status.success {
	color: var(--success);
}

.form-status.error {
	color: var(--danger);
}

/* ---------- Footer ---------- */
.site-footer {
	margin-top: 6rem;
	border-top: 1px solid var(--border);
}

.footer-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-block: 1.75rem;
	color: var(--text-dim);
	font-size: 0.9rem;
}

.to-top:hover {
	color: var(--text);
}

/* ---------- Scroll reveal (only when JS is running) ---------- */
.js .reveal {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .reveal.show {
	opacity: 1;
	transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.hero {
		grid-template-columns: 1fr;
		gap: 2.5rem;
		min-height: 0;
		padding-block: 2.5rem 3rem;
	}

	.hero-photo {
		order: -1;
		width: min(100%, 260px);
		justify-self: start;
	}

	.contact-card {
		grid-template-columns: 1fr;
		gap: 2rem;
		padding: 2rem;
	}

	.project-grid.featured,
	.info-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 820px) {
	.nav-toggle {
		display: flex;
	}

	.nav-menu {
		position: absolute;
		top: var(--header-h);
		left: 0;
		right: 0;
		flex-direction: column;
		align-items: stretch;
		gap: 1rem;
		padding: 1rem 1.25rem 1.5rem;
		background: var(--bg);
		border-bottom: 1px solid var(--border);
		transform: translateY(-8px);
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
	}

	.nav-menu.open {
		transform: none;
		opacity: 1;
		visibility: visible;
	}

	.nav-links {
		flex-direction: column;
		gap: 0;
	}

	.nav-links a {
		display: block;
		padding: 0.8rem 0;
		font-size: 1.05rem;
		border-bottom: 1px solid var(--border);
	}

	.nav-links a::after {
		display: none;
	}
}

@media (max-width: 640px) {
	.section {
		padding-top: 4.5rem;
	}

	.exp-item {
		grid-template-columns: 1fr;
		gap: 1rem;
		padding: 1.25rem;
	}

	.logo-tile {
		width: 84px;
		height: 48px;
		padding: 6px 8px;
	}

	.exp-head {
		flex-direction: column;
		gap: 0.35rem;
	}

	.exp-date {
		order: -1;
		padding-top: 0;
	}

	.project-grid,
	.skill-grid {
		grid-template-columns: 1fr;
	}

	.field-row {
		grid-template-columns: 1fr;
	}

	.contact-card {
		padding: 1.5rem;
	}

	.footer-inner {
		flex-direction: column;
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
	}

	.js .reveal {
		opacity: 1;
		transform: none;
	}
}
