@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Playfair+Display:wght@500;600;700&display=swap');

/**
 * Saeed Portfolio — Sliim-inspired light theme
 * Base: white / #f7f7f7 surfaces, #404854 text
 * Accent: blue #2196f3 (Sliim blue skin, replacing orange)
 */

:root {
	--bg: #FFFFFF;
	--bg-soft: #F7F7F7;
	--bg-muted: #E9ECEF;
	--text: #404854;
	--text-muted: #666666;
	--heading: #383838;
	--blue: #2196F3;
	--blue-dark: #1976D2;
	--blue-soft: rgba(33, 150, 243, 0.12);
	--border: #DDDDDD;
	--white: #FFFFFF;
	--radius: 0;
	--shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
	--font-body: 'IBM Plex Mono', ui-monospace, monospace;
	--font-display: 'Playfair Display', Georgia, serif;
	--container: 1140px;
	--header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 1rem;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; transition: color .2s, background .2s, border-color .2s; }
a:hover { color: var(--blue-dark); }

h1, h2, h3, h4 {
	font-family: var(--font-display);
	font-weight: 700;
	color: var(--heading);
	line-height: 1.15;
	margin: 0 0 .75rem;
}

.container { width: min(100% - 2rem, var(--container)); margin-inline: auto; }

/* Header — dark bar with logo + enhanced nav */
.site-header {
	position: fixed; top: 0; left: 0; right: 0; z-index: 200;
	background: rgba(11, 20, 38, 0.92);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	transition: background .3s, border-color .3s, box-shadow .3s;
}

.site-header.is-scrolled {
	background: rgba(11, 20, 38, 0.98);
	border-bottom-color: rgba(33, 150, 243, 0.2);
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.site-header__inner {
	display: flex; align-items: center; justify-content: space-between;
	min-height: var(--header-h); gap: 2rem;
}

.site-brand--logo {
	display: inline-flex; align-items: center; flex-shrink: 0;
	line-height: 0; transition: opacity .2s;
}

.site-brand--logo:hover { opacity: .88; }

.site-brand__logo {
	display: block; width: auto; height: 46px; max-width: 200px; object-fit: contain;
}

.site-brand {
	font-family: var(--font-display);
	font-size: 1.2rem; font-weight: 700; color: var(--heading);
}

.site-brand span { color: var(--blue); }

.nav-toggle {
	display: none; background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 6px; padding: .55rem .65rem; cursor: pointer;
	flex-direction: column; gap: 4px; align-items: center; justify-content: center;
	transition: border-color .2s, background .2s;
}

.nav-toggle:hover {
	border-color: rgba(33, 150, 243, 0.5);
	background: rgba(33, 150, 243, 0.12);
}

.nav-toggle__bar {
	display: block; width: 20px; height: 2px;
	background: #FFFFFF; border-radius: 1px;
	transition: transform .2s, opacity .2s;
}

.primary-nav { display: flex; align-items: center; }

.primary-nav ul,
.nav-anchor-list {
	display: flex; flex-wrap: wrap; align-items: center;
	gap: .35rem .15rem;
	list-style: none; margin: 0; padding: 0;
}

.primary-nav a,
.nav-anchor {
	color: rgba(255, 255, 255, 0.88); font-size: .78rem; font-weight: 600;
	text-transform: uppercase; letter-spacing: .06em;
	position: relative; padding: .55rem .9rem;
	border-radius: 6px; transition: color .2s, background .2s;
}

.primary-nav a::before,
.nav-anchor::before { display: none; }

.primary-nav a::after,
.nav-anchor::after {
	content: ''; position: absolute; left: 50%; bottom: .35rem;
	transform: translateX(-50%) scaleX(0);
	width: calc(100% - 1.4rem); height: 2px;
	background: var(--blue); border-radius: 2px;
	transition: transform .25s;
}

.primary-nav a:hover,
.nav-anchor:hover {
	color: #FFFFFF; background: rgba(255, 255, 255, 0.06);
}

.primary-nav a.is-active,
.nav-anchor.is-active {
	color: var(--blue); background: rgba(33, 150, 243, 0.12);
}

.primary-nav a.is-active::after,
.nav-anchor.is-active::after,
.primary-nav a:hover::after,
.nav-anchor:hover::after {
	transform: translateX(-50%) scaleX(1);
}

/* Hero */
.hero {
	position: relative; min-height: 100vh;
	display: flex; align-items: center;
	padding: calc(var(--header-h) + 3rem) 0 5rem; overflow: hidden;
	background: var(--bg);
}

.hero__bg {
	position: absolute; inset: 0;
	background:
		radial-gradient(circle at 20% 80%, rgba(33, 150, 243, 0.08) 0%, transparent 50%),
		radial-gradient(circle at 80% 20%, rgba(33, 150, 243, 0.06) 0%, transparent 45%),
		var(--bg);
}

.hero__bg::after {
	content: ''; position: absolute; inset: 0;
	background-image: radial-gradient(circle at center, rgba(33, 150, 243, 0.14) 10%, transparent 20%);
	background-size: 19px 18px; opacity: .35;
}

.hero__grid {
	position: relative; z-index: 1;
	display: grid; grid-template-columns: 1fr 320px;
	gap: 3rem; align-items: center;
}

.hero__title {
	font-size: clamp(2.5rem, 6vw, 4.25rem);
	font-weight: 500; margin-bottom: 1rem; color: var(--heading);
	line-height: 1.05;
}

.hero__tagline {
	font-size: clamp(.95rem, 2vw, 1.05rem);
	color: var(--blue); font-weight: 500; margin-bottom: 1.25rem; line-height: 1.6;
	font-family: var(--font-body);
}

.hero__intro {
	font-size: 1.05rem; color: var(--text-muted);
	max-width: 560px; margin-bottom: 2rem; line-height: 1.9;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.hero__photo {
	width: 100%; max-width: 320px; aspect-ratio: 1;
	border-radius: 0; object-fit: cover;
	border: 4px solid var(--border);
	box-shadow: var(--shadow);
}

.hero__photo--placeholder {
	display: flex; align-items: center; justify-content: center;
	background: var(--bg-soft);
	font-family: var(--font-display); font-size: 3.5rem; font-weight: 700; color: var(--blue);
	margin-inline: auto;
}

/* Buttons — Sliim style */
.btn {
	display: inline-flex; align-items: center; justify-content: center;
	padding: .85rem 2rem; border-radius: 0;
	font-weight: 600; font-size: .82rem; border: 1px solid transparent;
	text-transform: uppercase; letter-spacing: .06em;
	cursor: pointer; font-family: inherit;
	transition: background .2s, color .2s, border-color .2s, transform .2s;
}

.btn:hover { transform: translateY(-1px); }

.btn--primary {
	background: var(--blue); color: var(--white) !important;
	border-color: var(--blue);
}

.btn--primary:hover {
	background: var(--blue-dark); border-color: var(--blue-dark);
	color: var(--white) !important;
}

.btn--outline {
	border-color: var(--blue); color: var(--blue) !important; background: transparent;
}

.btn--outline:hover {
	background: var(--blue); color: var(--white) !important;
}

.text-link {
	font-weight: 600; font-size: .85rem; background: none; border: none;
	color: var(--blue); cursor: pointer; padding: 0; font-family: inherit;
	text-transform: uppercase; letter-spacing: .04em;
}

.text-link:hover { color: var(--blue-dark); }

/* Sections */
.section { padding: 5.5rem 0; }
.section--about { background: var(--bg-soft); }
.section--education { background: var(--bg); }
.section--experience { background: var(--bg-soft); }
.section--extracurricular { background: var(--bg-soft); }
.section--honors { background: var(--bg); }
.section--projects { background: var(--bg-soft); }
.section--contact { background: var(--bg); padding-bottom: 6rem; }

.section__head {
	display: flex; align-items: baseline; justify-content: space-between;
	gap: 1rem; margin-bottom: 2.5rem; flex-wrap: wrap;
}

.section__head--stack { flex-direction: column; align-items: flex-start; }

.section__title {
	font-size: clamp(2rem, 4vw, 3rem);
	position: relative; padding-left: 1.25rem;
}

.section__title::before {
	content: ''; position: absolute; left: 0; top: .15em;
	width: 5px; height: calc(100% - .2em);
	background: var(--blue); border-radius: 0 10px 10px 0;
}

.section__intro { color: var(--text-muted); font-size: 1rem; max-width: 640px; margin: 0; line-height: 1.8; }

.section__title--center {
	text-align: center; padding-left: 0; margin-bottom: 0;
}

.section__title--center::before { display: none; }

.section__title--center span { color: var(--blue); }

.section__head--center {
	align-items: center; text-align: center; justify-content: center;
}

.section__head--center .section__intro { margin-inline: auto; text-align: center; }

/* About — Sliim-style */
.section--about { background: var(--bg); }

.about-header { text-align: center; margin-bottom: 3.5rem; }

.about-header .section__title {
	font-size: clamp(2.5rem, 5vw, 4rem);
	font-weight: 700; line-height: 1.05;
}

.about-grid {
	display: grid; grid-template-columns: minmax(260px, 420px) 1fr;
	gap: 3rem 4rem; align-items: start;
}

.about-grid__photo { position: relative; }

.about-profile, .profile-photo {
	width: 100%; max-width: 420px; height: auto; aspect-ratio: 3/4;
	border-radius: 0; object-fit: cover; border: 4px solid var(--border);
	box-shadow: var(--shadow);
}

.profile-photo--placeholder {
	aspect-ratio: 3/4; max-width: 420px;
}

.about-grid__content { padding-top: .5rem; }

.about-body { margin-bottom: 2rem; }

.about-body p {
	margin: 0; color: var(--text); font-size: 1.05rem;
	line-height: 2; max-width: 640px;
}

.about-infos {
	list-style: none; margin: 0 0 2.25rem; padding: 0;
	display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem 2rem;
}

.about-infos__item {
	display: grid; grid-template-columns: 24px auto 1fr;
	gap: .65rem .75rem; align-items: baseline;
	font-size: .92rem; line-height: 1.5;
}

.about-infos__icon {
	display: inline-flex; align-items: center; justify-content: center;
	color: var(--text-muted); margin-top: .15rem;
}

.about-infos__label {
	font-weight: 600; color: var(--heading); white-space: nowrap;
}

.about-infos__value { color: var(--text-muted); word-break: break-word; }

.about-infos__value a { color: var(--text-muted); }

.about-infos__value a:hover { color: var(--blue); }

.profile-photo--placeholder {
	display: flex; align-items: center; justify-content: center;
	background: var(--bg-soft);
	font-family: var(--font-display); font-size: 3rem; font-weight: 700; color: var(--blue);
}

.about-cv { margin-top: .5rem; }

/* Timeline */
.timeline {
	list-style: none; margin: 0; padding: 0;
	position: relative; max-width: 760px;
}

.timeline::before {
	content: ''; position: absolute; left: 19px; top: 8px; bottom: 8px;
	width: 2px; background: var(--bg-muted);
}

.timeline__item {
	display: grid; grid-template-columns: 40px 1fr; gap: 1.5rem;
	padding-bottom: 2.5rem; position: relative;
}

.timeline__item:last-child { padding-bottom: 0; }

.timeline__marker { position: relative; z-index: 1; }

.timeline__icon {
	display: flex; align-items: center; justify-content: center;
	width: 40px; height: 40px; border-radius: 50%;
	background: var(--blue); border: none; color: var(--white);
}

.timeline__content {
	padding: 1.75rem; background: var(--bg-soft); border: 1px solid var(--border);
}

.timeline__title { font-size: 1.25rem; margin-bottom: .75rem; }
.timeline__body p { margin: 0 0 .75rem; color: var(--text-muted); font-size: .92rem; line-height: 1.8; }
.timeline__body p:last-child { margin-bottom: 0; }

/* Cards */
.entries-grid { display: grid; gap: 1.5rem; }
.entries-grid--3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.entry-card {
	background: var(--bg-soft); border: 1px solid var(--border);
	border-radius: 0; overflow: hidden;
	transition: transform .25s, box-shadow .25s, border-color .25s;
}

.entry-card:hover {
	transform: translateY(-4px);
	border-color: rgba(33, 150, 243, 0.35);
	box-shadow: var(--shadow);
}

.entry-card__media { aspect-ratio: 16/9; overflow: hidden; }
.entry-card__media img { width: 100%; height: 100%; object-fit: cover; }

.entry-card__media--placeholder {
	background: linear-gradient(135deg, var(--bg-muted) 0%, var(--bg-soft) 100%);
	min-height: 160px;
}

.entry-card__body { padding: 1.5rem; }
.entry-card__title { font-size: 1.15rem; margin-bottom: .65rem; }
.entry-card__excerpt { color: var(--text-muted); font-size: .92rem; line-height: 1.7; }
.entry-card__excerpt p { margin: 0 0 .65rem; }
.entry-card__excerpt p:last-child { margin-bottom: 0; }

/* Experience cards */
.experience-card { display: flex; flex-direction: column; }

.experience-card__icon {
	display: flex; align-items: center; justify-content: center;
	width: 48px; height: 48px; margin: 1.25rem 1.25rem 0;
	border-radius: 0; background: var(--blue-soft); color: var(--blue);
}

.experience-card__subtitle {
	font-size: .78rem; font-weight: 600; color: var(--blue);
	text-transform: uppercase; letter-spacing: .06em; margin: 0 0 .5rem;
}

/* Honors gallery */
.honors-grid {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 1.25rem;
}

.honor-card {
	display: block; width: 100%; padding: 0; border: none; background: none;
	text-align: left; cursor: pointer; font-family: inherit; color: inherit;
}

.honor-card__media {
	position: relative; border-radius: 0; overflow: hidden;
	border: 1px solid var(--border);
	aspect-ratio: 4/3; background: var(--bg-soft);
	transition: border-color .25s, transform .25s;
}

.honor-card:hover .honor-card__media {
	border-color: var(--blue);
	transform: translateY(-3px);
}

.honor-card__media img { width: 100%; height: 100%; object-fit: cover; }

.honor-card__placeholder {
	display: flex; align-items: center; justify-content: center;
	height: 100%; color: var(--blue); opacity: .75;
}

.honor-card__overlay {
	position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
	background: rgba(33, 150, 243, 0.88); color: var(--white);
	font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em;
	opacity: 0; transition: opacity .25s;
}

.honor-card:hover .honor-card__overlay { opacity: 1; }

.honor-card__title {
	font-size: 1rem; margin: .85rem 0 0; color: var(--heading); line-height: 1.4;
}

/* Lightbox */
.lightbox {
	position: fixed; inset: 0; z-index: 500;
	display: flex; align-items: center; justify-content: center;
	padding: 1.5rem;
}

.lightbox[hidden] { display: none; }

.lightbox__backdrop {
	position: absolute; inset: 0; background: rgba(56, 56, 56, 0.85);
	backdrop-filter: blur(4px);
}

.lightbox__panel {
	position: relative; z-index: 1; width: min(100%, 560px);
	background: var(--white); border: 1px solid var(--border);
	border-radius: 0; padding: 2rem; box-shadow: var(--shadow);
	max-height: 90vh; overflow-y: auto;
}

.lightbox__close {
	position: absolute; top: .75rem; right: .75rem;
	background: transparent; border: none; color: var(--text-muted);
	font-size: 1.75rem; line-height: 1; cursor: pointer; padding: .25rem .5rem;
}

.lightbox__close:hover { color: var(--heading); }

.lightbox__media { margin-bottom: 1rem; overflow: hidden; }
.lightbox__media img { width: 100%; }

.lightbox__title { font-size: 1.35rem; margin-bottom: .75rem; }
.lightbox__description { color: var(--text-muted); margin: 0; line-height: 1.7; }

/* Projects */
.projects-grid {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 1.5rem;
}

.project-card__short { color: var(--text-muted); font-size: .92rem; margin: 0 0 .75rem; }
.project-card__full { color: var(--text); font-size: .92rem; margin-bottom: .75rem; }
.project-card__full p { margin: 0 0 .65rem; }
.project-card__actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }

/* Extracurricular */
.extracurricular-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 2rem;
}

.extra-card {
	background: var(--bg);
	border: 1px solid var(--border);
	overflow: hidden;
	transition: transform .25s, box-shadow .25s, border-color .25s;
}

.extra-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow);
	border-color: rgba(33, 150, 243, 0.35);
}

.extra-card__media {
	background: var(--bg-soft);
	border-bottom: 1px solid var(--border);
	overflow: hidden;
}

.extra-card__image {
	width: 100%; height: auto; display: block; object-fit: cover;
	max-height: 320px;
}

.extra-card__placeholder {
	min-height: 220px;
	background: linear-gradient(135deg, var(--bg-muted) 0%, var(--bg-soft) 100%);
}

.extra-card__body { padding: 1.5rem 1.75rem 1.75rem; }

.extra-card__title {
	font-size: 1.15rem; margin-bottom: .85rem; line-height: 1.35;
}

.extra-card__text p {
	margin: 0; color: var(--text-muted); font-size: .92rem; line-height: 1.8;
}

/* Contact */
.contact-grid {
	display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start;
}

.contact-email { margin: 1.5rem 0; }
.contact-email a { font-size: 1.05rem; font-weight: 600; color: var(--blue); }

.contact-social { display: flex; gap: .75rem; margin-bottom: 1.75rem; }

.social-link {
	display: inline-flex; align-items: center; justify-content: center;
	width: 44px; height: 44px; border-radius: 0;
	border: 1px solid var(--border);
	color: var(--text-muted) !important;
	transition: border-color .2s, color .2s, background .2s;
}

.social-link:hover {
	border-color: var(--blue); color: var(--white) !important;
	background: var(--blue);
}

.contact-form {
	background: var(--bg-soft); border: 1px solid var(--border);
	border-radius: 0; padding: 2rem;
}

.contact-form__hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

.form-field { margin: 0 0 1.25rem; }
.form-field label {
	display: block; font-size: .78rem; font-weight: 600;
	text-transform: uppercase; letter-spacing: .05em;
	margin-bottom: .4rem; color: var(--text-muted);
}

.form-field input,
.form-field textarea {
	width: 100%; padding: .75rem 1rem; border-radius: 0;
	border: 1px solid var(--border); background: var(--white);
	color: var(--text); font: inherit; transition: border-color .2s;
}

.form-field input:focus,
.form-field textarea:focus {
	outline: none; border-color: var(--blue);
}

.form-notice {
	padding: .85rem 1rem; border-radius: 0; margin-bottom: 1.25rem; font-size: .9rem;
}

.form-notice--success {
	background: var(--blue-soft); border: 1px solid rgba(33, 150, 243, 0.35); color: var(--blue-dark);
}

.form-notice--error {
	background: rgba(247, 58, 67, 0.08); border: 1px solid rgba(247, 58, 67, 0.25); color: #c62828;
}

.empty-state {
	text-align: center; color: var(--text-muted); padding: 3rem;
	border: 1px dashed var(--border); border-radius: 0;
}

/* Footer */
.site-footer {
	background: var(--bg-soft); border-top: 1px solid var(--border);
	padding: 2rem 0;
}

.site-footer__inner {
	display: flex; align-items: center; justify-content: space-between;
	gap: 1rem; flex-wrap: wrap;
}

.site-footer__copy { margin: 0; font-size: .875rem; color: var(--text-muted); }

.site-footer__social { display: flex; gap: .65rem; }

.site-footer__social a {
	display: inline-flex; color: var(--text-muted) !important;
	transition: color .2s;
}

.site-footer__social a:hover { color: var(--blue) !important; }

/* Animations */
.saeed-animate {
	opacity: 0; transform: translateY(24px);
	transition: opacity .7s ease, transform .7s ease;
}

.saeed-animate.is-visible { opacity: 1; transform: translateY(0); }

.stagger-children > * {
	opacity: 0; transform: translateY(18px);
	transition: opacity .55s ease, transform .55s ease;
}

.stagger-children.is-visible > * { opacity: 1; transform: translateY(0); }
.stagger-children.is-visible > *:nth-child(1) { transition-delay: .05s; }
.stagger-children.is-visible > *:nth-child(2) { transition-delay: .12s; }
.stagger-children.is-visible > *:nth-child(3) { transition-delay: .19s; }
.stagger-children.is-visible > *:nth-child(4) { transition-delay: .26s; }
.stagger-children.is-visible > *:nth-child(5) { transition-delay: .33s; }
.stagger-children.is-visible > *:nth-child(6) { transition-delay: .4s; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.saeed-animate, .stagger-children > * { opacity: 1; transform: none; transition: none; }
	.entry-card, .honor-card__media { transition: none; }
}

/* Responsive */
@media (max-width: 768px) {
	.nav-toggle { display: flex; }
	.primary-nav {
		display: none; position: absolute; top: 100%; left: 0; right: 0;
		background: rgba(11, 20, 38, 0.98);
		border-bottom: 1px solid rgba(33, 150, 243, 0.2);
		box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
		padding: .75rem 1rem 1rem;
	}
	.primary-nav.is-open { display: block; }
	.primary-nav ul, .nav-anchor-list { flex-direction: column; align-items: stretch; gap: .25rem; }
	.primary-nav a, .nav-anchor {
		display: block; padding: .75rem 1rem; border-radius: 8px;
	}
	.primary-nav a::after, .nav-anchor::after { display: none; }
	.site-brand__logo { height: 40px; max-width: 170px; }
	.site-header__inner { position: relative; flex-wrap: wrap; gap: 1rem; }

	.hero { min-height: auto; padding: calc(var(--header-h) + 2rem) 0 3.5rem; }
	.hero__grid { grid-template-columns: 1fr; text-align: center; }
	.hero__media { order: -1; }
	.hero__photo, .hero__photo--placeholder { max-width: 220px; margin-inline: auto; }
	.hero__intro { margin-inline: auto; }
	.hero__actions { justify-content: center; flex-direction: column; align-items: stretch; }

	.about-grid { grid-template-columns: 1fr; gap: 2rem; }
	.about-grid__photo { max-width: 320px; margin: 0 auto; }
	.about-grid__content { text-align: left; }
	.about-body p { max-width: none; }
	.about-infos { grid-template-columns: 1fr; gap: .85rem; }
	.about-profile, .profile-photo { max-width: 100%; margin: 0 auto; }

	.timeline::before { left: 15px; }
	.timeline__item { grid-template-columns: 32px 1fr; gap: 1rem; }
	.timeline__icon { width: 32px; height: 32px; }
	.timeline__icon svg { width: 16px; height: 16px; }

	.entries-grid--3, .projects-grid, .honors-grid, .extracurricular-grid { grid-template-columns: 1fr; }
	.contact-grid { grid-template-columns: 1fr; }
	.site-footer__inner { flex-direction: column; text-align: center; }
}

@media (min-width: 1440px) {
	.container { max-width: 1200px; }
}
