/* Aman Talwar Portfolio. Everything is scoped under .ap-root so the theme is untouched. */

body.ap-full-page { margin: 0; background: #000000; }

.ap-root {
	--ap-accent: #0073ff;
	--ap-bg: #000000;
	--ap-surface: #040b1c;
	--ap-text: #f4f5fa;
	--ap-muted: #b6c3da;
	--ap-subtle: #9aa3b8;
	--ap-link: #7fb0ff;
	--ap-line: rgba(0,115,255, 0.45);
	--ap-line-soft: rgba(0,115,255, 0.14);
	--ap-glow: 0 0 30px rgba(0,115,255, 0.14);
	--ap-serif: "Instrument Serif", Georgia, serif;
	--ap-sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
	--ap-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

	background-color: var(--ap-bg);
	background-image: radial-gradient(rgba(0,115,255, 0.16) 1px, transparent 1px);
	background-size: 28px 28px;
	color: var(--ap-text);
	font-family: var(--ap-sans);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

/* Neutralise common theme styles inside the portfolio */
.ap-root *, .ap-root *::before, .ap-root *::after { box-sizing: border-box; }
.ap-root { overflow-wrap: break-word; }
.ap-root .ap-card, .ap-root .ap-chips li, .ap-root .ap-btn { overflow-wrap: anywhere; min-width: 0; }
.ap-root h1, .ap-root h2, .ap-root h3, .ap-root p, .ap-root ul, .ap-root ol { margin: 0; padding: 0; color: inherit; }
.ap-root h1, .ap-root h2, .ap-root h3 { text-transform: none; letter-spacing: normal; }
.ap-root ul, .ap-root ol { list-style: none; }
.ap-root a { color: var(--ap-link); text-decoration: none; box-shadow: none; }
.ap-root a:hover, .ap-root a:focus { color: #fff; }
.ap-root a:focus-visible { outline: 2px solid var(--ap-accent); outline-offset: 3px; }
html { scroll-behavior: smooth; }
.ap-root [id] { scroll-margin-top: 90px; }

/* Layout helpers */
.ap-wrap { max-width: 1200px; margin-left: auto; margin-right: auto; padding-left: 24px; padding-right: 24px; }
.ap-section { padding-top: 96px; padding-bottom: 96px; }
.ap-section--tight { padding-top: 24px; }
.ap-rule { border-top: 1px solid var(--ap-line-soft); }
.ap-center { text-align: center; }
.ap-stack { display: flex; flex-direction: column; gap: 20px; }
.ap-grid { display: grid; gap: 16px; }
.ap-grid--stats { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.ap-grid--builds { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 20px; }

/* Type */
.ap-display { font-family: var(--ap-serif); font-weight: 400; line-height: 1.05; }
.ap-h2 { font-size: clamp(36px, 5vw, 60px); }
.ap-root .ap-h3 { font-size: 34px; line-height: 1.1; margin-top: 10px; }
.ap-accent { color: var(--ap-accent); }
.ap-lead { max-width: 720px; font-size: 19px; color: var(--ap-muted); }
.ap-root .ap-lead--sm { max-width: 640px; font-size: 16px; margin: 18px auto 0; }
.ap-root .ap-lead--left { max-width: 620px; font-size: 16px; margin: 16px 0 40px; }
.ap-muted { color: var(--ap-muted); }
.ap-small { font-size: 15px; }
.ap-root .ap-label { font-weight: 600; margin-bottom: 6px; }
.ap-root .ap-eyebrow { font-family: var(--ap-mono); font-weight: 500; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ap-subtle); margin-bottom: 20px; }
.ap-kicker { font-family: var(--ap-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ap-link); }
.ap-kicker--plain { text-transform: none; letter-spacing: 0; }

/* Nav */
.ap-nav { position: sticky; top: 0; z-index: 50; background: rgba(0, 0, 0, 0.85); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(0,115,255, 0.18); }
.admin-bar .ap-nav { top: 32px; }
@media (max-width: 782px) { .admin-bar .ap-nav { top: 46px; } }
@media (max-width: 600px) { .admin-bar .ap-nav { top: 0; } }
.ap-nav__inner { padding-top: 16px; padding-bottom: 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.ap-root .ap-brand { display: flex; align-items: center; gap: 12px; color: var(--ap-text); }
.ap-brand__mark { width: 36px; height: 36px; border: 1px solid var(--ap-accent); transform: rotate(45deg); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 18px rgba(0,115,255, 0.45); }
.ap-brand__mark span { transform: rotate(-45deg); font-family: var(--ap-mono); font-size: 12px; font-weight: 500; }
.ap-brand__name { font-weight: 600; letter-spacing: 0.01em; }
.ap-nav__links { display: flex; flex-wrap: wrap; gap: 4px 20px; font-family: var(--ap-mono); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; }
.ap-nav__links a { padding: 10px 0; }

/* Blue bands (hero and contact), matching amantalwar.com */
.ap-band { background: var(--ap-accent); color: #fff; }
.ap-root .ap-band a { color: #fff; }
.ap-ink { color: #000; }

/* Hero */
.ap-hero { padding-top: 88px; padding-bottom: 88px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 48px; }
.ap-hero__text { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.ap-root .ap-pill { font-family: var(--ap-mono); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: #fff; border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 999px; padding: 6px 16px; }
.ap-hero__title { font-size: clamp(44px, 6.4vw, 84px); line-height: 1.02; letter-spacing: -0.01em; max-width: 900px; color: #fff; }
.ap-hero__lead { max-width: 680px; font-size: 19px; font-weight: 600; line-height: 1.55; color: #fff; }
.ap-hero__photo { flex: none; width: 260px; height: 260px; object-fit: cover; border: 6px solid #000; box-shadow: 14px 14px 0 rgba(0, 0, 0, 0.9); }
.ap-band .ap-actions { justify-content: flex-start; }
.ap-contact .ap-actions { justify-content: center; }

/* Social icons (your own icon images) */
.ap-socials { display: flex; flex-wrap: wrap; gap: 16px; }
.ap-socials a { display: block; line-height: 0; border-radius: 8px; transition: transform 0.15s ease; }
.ap-socials a:hover { transform: translateY(-3px); }
.ap-socials img { width: 56px; height: 56px; display: block; }
.ap-contact .ap-socials { justify-content: center; }

/* Buttons */
.ap-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; }
.ap-root .ap-btn { display: inline-flex; align-items: center; min-height: 48px; font-weight: 600; padding: 13px 25px; border-radius: 10px; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.ap-root .ap-btn--primary { background: var(--ap-accent); color: #fff; border: 1px solid var(--ap-accent); box-shadow: 0 0 28px rgba(0,115,255, 0.5); }
.ap-root .ap-btn--primary:hover { transform: translateY(-1px); box-shadow: 0 0 40px rgba(0,115,255, 0.7); }
.ap-root .ap-btn--ghost { color: var(--ap-text); border: 1px solid rgba(244, 245, 250, 0.3); }
.ap-root .ap-btn--ghost:hover { border-color: var(--ap-text); }
.ap-root .ap-band .ap-btn--ink { background: #000; color: #fff; border: 1px solid #000; }
.ap-root .ap-band .ap-btn--ink:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); }
.ap-root .ap-band .ap-btn--light { color: #fff; border: 1px solid rgba(255, 255, 255, 0.75); }
.ap-root .ap-band .ap-btn--light:hover { border-color: #fff; background: rgba(255, 255, 255, 0.1); }

/* Cards */
.ap-card { background: var(--ap-surface); border: 1px solid rgba(0,115,255, 0.35); border-radius: 16px; padding: 28px; }
.ap-card--glow { border-color: var(--ap-line); box-shadow: var(--ap-glow); }
.ap-root .ap-stat { font-family: var(--ap-serif); font-size: 64px; line-height: 1; color: #fff; margin-bottom: 12px; }

/* Timeline */
.ap-timeline { max-width: 1480px; margin: 56px auto 0; padding: 0 24px 8px; overflow-x: auto; }
.ap-timeline__track { --ap-cols: 8; min-width: calc(var(--ap-cols) * 140px); display: grid; grid-template-columns: repeat(var(--ap-cols), minmax(0, 1fr)); }
.ap-tl-col { display: flex; flex-direction: column; align-items: center; }
.ap-tl-slot { height: 270px; width: 100%; display: flex; flex-direction: column; align-items: center; }
.ap-tl-slot--top { justify-content: flex-end; }
.ap-tl-stem { width: 0; height: 40px; border-left: 1px dashed rgba(0,115,255, 0.7); }
.ap-tl-card { width: calc(100% - 12px); max-width: 168px; min-width: 0; overflow-wrap: anywhere; hyphens: auto; background: var(--ap-surface); border: 1px solid rgba(0,115,255, 0.55); border-radius: 10px; padding: 14px 7px; text-align: center; box-shadow: 0 0 22px rgba(0,115,255, 0.3); }
.ap-tl-card.is-current { border-color: var(--ap-accent); box-shadow: 0 0 28px rgba(0,115,255, 0.45); }
.ap-root .ap-tl-card__title { font-weight: 600; font-size: 13px; line-height: 1.3; }
.ap-tl-logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 10px; }
.ap-tl-logos img { display: block; width: auto; height: auto; max-height: 34px; max-width: 100%; min-width: 0; object-fit: contain; background: #fff; border-radius: 6px; padding: 5px 8px; box-sizing: border-box; }
.ap-tl-logos img:only-child { max-height: 40px; }
.ap-logos-plain .ap-tl-logos img { background: none; padding: 0; }
.ap-tl-ph { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 34px; padding: 0 10px; border: 1px dashed rgba(127, 176, 255, 0.55); border-radius: 8px; font-family: var(--ap-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--ap-link); }
.ap-logos-mono .ap-tl-logos img { filter: brightness(0) invert(1); opacity: 0.92; }
.ap-logos-plain .ap-tl-logos img:only-child { max-height: 32px; }
.ap-root .ap-tl-card__detail { margin-top: 6px; font-size: 12px; line-height: 1.4; color: var(--ap-link); }
.ap-tl-rail { width: 100%; display: flex; align-items: center; }
.ap-tl-line { flex: 1; height: 0; border-top: 1px dashed rgba(0,115,255, 0.6); }
.ap-tl-line.is-empty { border-top-color: transparent; }
.ap-tl-node { width: 46px; height: 46px; flex: none; transform: rotate(45deg); border: 1px solid var(--ap-accent); background: var(--ap-surface); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 18px rgba(0,115,255, 0.5); }
.ap-tl-node span { transform: rotate(-45deg); font-family: var(--ap-mono); font-size: 11px; }
.ap-tl-node.is-current { background: var(--ap-accent); color: #fff; box-shadow: 0 0 24px rgba(0,115,255, 0.75); }

/* Selected work */
.ap-section__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 40px; }
.ap-section__aside { max-width: 420px; }
.ap-case { display: flex; flex-wrap: wrap; gap: 32px; padding: 36px; }
.ap-case__head { flex: 1 1 280px; min-width: 0; }
.ap-case__body { flex: 2 1 480px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 24px; }

/* Images and links inside cards */
.ap-case__img { display: block; width: 100%; max-width: 360px; margin-top: 18px; border-radius: 10px; border: 1px solid rgba(0, 115, 255, 0.35); }
.ap-build__img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; margin-bottom: 4px; }
.ap-root .ap-more { display: inline-block; margin-top: 14px; font-weight: 600; }
.ap-root .ap-build__title a { color: var(--ap-text); }
.ap-root .ap-build__title a:hover { color: var(--ap-link); }

/* Builds */
.ap-build { display: flex; flex-direction: column; gap: 14px; padding: 30px; }
.ap-build__title { font-size: 22px; font-weight: 600; line-height: 1.3; font-family: var(--ap-sans); }
.ap-root .ap-build__stack { margin-top: auto; font-family: var(--ap-mono); font-size: 12px; color: var(--ap-subtle); }

/* Toolkit */
.ap-toolkit { display: flex; flex-wrap: wrap; gap: 48px; }
.ap-toolkit__creds { flex: 1 1 320px; min-width: 0; }
.ap-toolkit__skills { flex: 2 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.ap-root .ap-toolkit__skills .ap-eyebrow { font-size: 12px; margin-bottom: 12px; }
.ap-cred { border-top: 1px solid rgba(0,115,255, 0.3); padding-top: 16px; margin-top: 16px; }
.ap-root .ap-toolkit__creds .ap-h2 { margin-bottom: 12px; }
.ap-chips { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; }
.ap-chips li { border: 1px solid rgba(0,115,255, 0.4); border-radius: 999px; padding: 6px 14px; }

/* Contact */
.ap-contact { padding-top: 104px; padding-bottom: 72px; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.ap-contact__title { font-size: clamp(44px, 6vw, 80px); line-height: 1.02; max-width: 900px; }
.ap-root .ap-footer { margin-top: 48px; font-family: var(--ap-mono); font-size: 12px; color: #fff; }
.ap-contact__title { color: #fff; }

/* ---------- Responsive ---------- */

/* Tablets and phones: timeline becomes a vertical list */
@media (max-width: 1279px) {
	.ap-timeline { overflow: visible; padding: 0 24px; margin-top: 40px; }
	.ap-timeline__track { min-width: 0; display: flex; flex-direction: column; position: relative; max-width: 560px; margin: 0 auto; }
	.ap-tl-newest-first .ap-timeline__track { flex-direction: column-reverse; }
	.ap-timeline__track::before { content: ""; position: absolute; left: 23px; top: 24px; bottom: 24px; border-left: 1px dashed rgba(0, 115, 255, 0.6); }
	.ap-tl-col { flex-direction: row; align-items: center; gap: 22px; padding: 10px 0; position: relative; }
	.ap-tl-rail { width: auto; flex: none; order: -1; }
	.ap-tl-line, .ap-tl-stem, .ap-tl-slot.is-empty { display: none; }
	.ap-tl-slot { height: auto; flex: 1; min-width: 0; display: block; }
	.ap-tl-card { width: auto; max-width: none; text-align: left; padding: 14px 16px; }
	.ap-tl-logos { justify-content: flex-start; }
	.ap-hero__photo { width: 220px; height: 220px; }
}

/* Phones */
@media (max-width: 640px) {
	.ap-nav { position: static; }
	.ap-nav__inner { padding-top: 12px; padding-bottom: 12px; }
	.ap-nav__links { width: 100%; flex-wrap: wrap; gap: 0 16px; font-size: 12px; }
	.ap-nav__links a { white-space: nowrap; }
	.ap-wrap { padding-left: 20px; padding-right: 20px; }
	.ap-hero { padding-top: 48px; padding-bottom: 56px; gap: 28px; flex-direction: column-reverse; align-items: flex-start; }
	.ap-hero__text { flex-basis: auto; gap: 20px; }
	.ap-hero__photo { width: 140px; height: 140px; border-width: 4px; box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.9); }
	.ap-hero__lead { font-size: 17px; }
	.ap-root .ap-pill { font-size: 11px; }
	.ap-actions { width: 100%; }
	.ap-root .ap-btn { flex: 1 1 100%; justify-content: center; }
	.ap-socials { gap: 12px; }
	.ap-socials img { width: 48px; height: 48px; }
	.ap-section { padding-top: 64px; padding-bottom: 64px; }
	.ap-section--tight { padding-top: 40px; }
	.ap-case { padding: 22px; gap: 20px; }
	.ap-card { padding: 22px; }
	.ap-root .ap-h3 { font-size: 28px; }
	.ap-root .ap-stat { font-size: 52px; }
	.ap-toolkit { gap: 36px; }
	.ap-contact { padding-top: 72px; padding-bottom: 56px; }
	.ap-root .ap-footer { margin-top: 32px; line-height: 1.8; }
}
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.ap-root .ap-btn { transition: none; }
}
