/* Uzair portfolio — minimal editorial style, light & dark themes. */
:root {
  --bg: #fafaf8;
  --surface: #f1f0ec;
  --card: #ffffff;
  --ink: #111316;
  --ink-2: #3d4046;
  --muted: #6b6e74;
  --line: #e5e4df;
  --btn-bg: #111316;
  --btn-ink: #ffffff;
  --dark: #111316;
  --dark-ink: #f4f3ef;
  --dark-muted: #9a9ca1;
  --accent: #111316;
  --shadow: 0 1px 2px rgba(17, 19, 22, .06), 0 8px 24px rgba(17, 19, 22, .06);
  --radius: 14px;
  --sans: 'Geist', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --serif: 'Newsreader', Georgia, serif;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0e0f11;
  --surface: #16171a;
  --card: #18191c;
  --ink: #f2f2ee;
  --ink-2: #c4c5c8;
  --muted: #8d9095;
  --line: #26282c;
  --btn-bg: #f2f2ee;
  --btn-ink: #0e0f11;
  --dark: #1b1d21;
  --dark-ink: #f4f3ef;
  --dark-muted: #9a9ca1;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; transition: background .25s, color .25s; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--btn-bg); color: var(--btn-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { width: min(1200px, 100% - 48px); margin-inline: auto; }
.mono { font-family: var(--mono); }
.serif { font-family: var(--serif); font-weight: 400; }
.muted { color: var(--muted); }
.ic { flex-shrink: 0; }

/* Type */
.label { font: 500 12.5px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.h1 { font-size: clamp(38px, 5.2vw, 60px); line-height: 1.04; letter-spacing: -.035em; font-weight: 600; margin: 0 0 24px; }
.h2 { font-size: clamp(30px, 3.4vw, 40px); line-height: 1.12; letter-spacing: -.03em; font-weight: 600; margin: 0; }
.h2 em { font-style: italic; letter-spacing: -.01em; }
.h3 { font-size: 21px; line-height: 1.3; letter-spacing: -.015em; font-weight: 600; margin: 0 0 10px; }
.lede { font-size: 19px; line-height: 1.6; color: var(--ink-2); margin: 0 0 32px; max-width: 640px; }
.lede.sm { font-size: 18px; margin: 14px 0 0; }
.prose p { color: var(--ink-2); margin: 0 0 16px; }
.prose.big p { font-size: 19px; line-height: 1.6; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 24px; border-radius: 8px; background: var(--btn-bg); color: var(--btn-ink); border: 1px solid var(--btn-bg); font-weight: 500; font-size: 16px; line-height: 1.2; transition: transform .15s, opacity .15s, background .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); opacity: .9; }
.btn.outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.outline:hover { background: var(--ink); color: var(--bg); opacity: 1; }
.btn.sm { padding: 10px 20px; font-size: 15px; }
.btn.pill { border-radius: 999px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.text-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; border-bottom: 1px solid var(--line); padding-bottom: 2px; margin-top: 8px; }
.text-link:hover { border-color: var(--ink); }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.icon-btn:hover { border-color: var(--ink); }
.round { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); background: transparent; }
.round.sm { width: 40px; height: 40px; }
.round:hover { border-color: var(--ink); }

/* Theme toggle icons */
.i-sun { display: none; }
[data-theme="dark"] .i-sun { display: block; }
[data-theme="dark"] .i-moon { display: none; }
.i-sun, .i-moon { line-height: 0; }

/* Header */
.nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.logo { display: inline-flex; align-items: center; gap: 4px; font-size: 22px; }
.logo img { height: 34px; width: auto; }
.logo-mark { font-family: var(--mono); font-weight: 500; letter-spacing: -.04em; }
.logo-mark b { font-family: var(--sans); font-weight: 600; font-size: 1.1em; }
.logo-text { font-weight: 300; letter-spacing: .5em; text-transform: uppercase; font-size: 18px; border-bottom: 1px solid currentColor; line-height: 1.1; margin-left: 4px; }
.menu { display: flex; gap: 30px; margin-left: auto; }
.menu a { font-size: 16px; font-weight: 500; padding: 4px 0; border-bottom: 1.5px solid transparent; }
.menu a:hover, .menu a.on { border-color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.burger { display: none; }
.mobile-menu[hidden] { display: none; }
.mobile-menu { border-top: 1px solid var(--line); padding: 12px 24px 24px; display: grid; gap: 4px; background: var(--bg); }
.mobile-menu a:not(.btn) { padding: 12px 0; font-size: 18px; font-weight: 500; border-bottom: 1px solid var(--line); }
.mobile-menu .btn { margin-top: 14px; justify-content: center; }

/* Hero */
.hero { padding: 96px 0 100px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 72px; align-items: center; }
.hero-photo { margin: 0; }
.hero-photo img { width: 100%; aspect-ratio: 800 / 990; max-height: 600px; object-fit: cover; border-radius: var(--radius); background: var(--surface); }
.hero-photo figcaption { display: flex; align-items: center; gap: 10px; margin-top: 18px; font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 0 currentColor; animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ink) 35%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* Stats & highlights */
.stats { background: var(--surface); border-block: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 46px 32px; border-left: 1px solid var(--line); display: grid; gap: 10px; }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat strong { font-size: clamp(36px, 4vw, 48px); font-weight: 500; letter-spacing: -.04em; line-height: 1; }
.stat span { font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.highlights { border-bottom: 1px solid var(--line); padding: 50px 0; }
.hl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.hl-grid .label { margin-bottom: 8px; }
.hl-grid p:last-child { margin: 0; font-weight: 500; }

/* Sections */
.section { padding: 110px 0; border-bottom: 1px solid var(--line); }
.section.tight { padding: 60px 0; border-bottom: 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 48px; }
.h3 + .prose { margin-top: 0; }
#about .h3 { margin-top: 40px; }

/* Projects carousel */
.carousel { position: relative; }
.car-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 48px) / 3); gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.car-track::-webkit-scrollbar { display: none; }
.project { scroll-snap-align: start; display: flex; flex-direction: column; align-items: flex-start; }
.project-img { display: block; width: 100%; border-radius: var(--radius); overflow: hidden; background: var(--surface); margin-bottom: 24px; aspect-ratio: 1200 / 850; }
.project-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.project:hover .project-img img { transform: scale(1.03); }
.project .label { margin-bottom: 8px; }
.project p.muted { margin: 0 0 20px; }
.project .btn { margin-top: auto; }
.car-btn { position: absolute; top: calc((100% - 120px) * .3); z-index: 2; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; box-shadow: var(--shadow); transition: opacity .2s; }
.car-btn.prev { left: -24px; }
.car-btn.next { right: -24px; }
.car-btn[disabled] { opacity: 0; pointer-events: none; }

/* Chips */
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.chips li { padding: 10px 20px; border: 1px solid var(--line); border-radius: 999px; font-weight: 500; font-size: 16px; background: var(--card); transition: border-color .2s; }
.chips li:hover { border-color: var(--ink); }

/* Testimonials */
.dark-card { background: var(--dark); color: var(--dark-ink); border-radius: 20px; padding: 64px; }
[data-theme="dark"] .dark-card { border: 1px solid var(--line); }
.dark-card .label { color: var(--dark-muted); }
.dark-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 36px; }
.slider-nav { display: flex; gap: 12px; }
.dark-card .round { border-color: #34363b; color: var(--dark-ink); }
.dark-card .round.light { background: #ece9e1; color: #111316; border-color: #ece9e1; }
.slide { margin: 0; }
.slide[hidden] { display: none; }
.slide.on { animation: fade .5s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.slide blockquote { margin: 0 0 40px; font-size: clamp(21px, 2.2vw, 26px); line-height: 1.45; max-width: 900px; }
.slide figcaption { display: flex; align-items: center; gap: 16px; }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: #ece9e1; color: #111316; display: grid; place-items: center; font-weight: 600; overflow: hidden; flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.slide figcaption strong { display: block; font-weight: 500; }
.slide figcaption small { font-size: 12px; letter-spacing: .1em; color: var(--dark-muted); text-transform: uppercase; }
.dots { display: flex; gap: 8px; margin-top: 28px; }
.dots button { width: 32px; height: 3px; border: 0; border-radius: 2px; background: #3a3c41; padding: 0; transition: width .3s, background .3s; }
.dots button.on { width: 40px; background: var(--dark-ink); }

/* Services rows */
.rows { list-style: none; margin: 48px 0 0; padding: 0; border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 96px 1fr 1.6fr; gap: 24px; padding: 34px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.row .num { font-size: 13px; color: var(--muted); }
.row .h3 { margin: 0; }
.row p { margin: 0; max-width: 620px; }

/* Process */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 64px; }
.step { border-top: 1px solid var(--line); padding-top: 40px; }
.big-num { display: block; font-size: 60px; line-height: 1; letter-spacing: -.04em; color: var(--ink-2); margin-bottom: 34px; }
.step p { margin: 0; }

/* Timeline */
.timeline { list-style: none; margin: 40px 0 0; padding: 0; border-top: 1px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 180px 1fr 1fr; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.timeline .mono { font-size: 13px; letter-spacing: .1em; color: var(--muted); }
.timeline strong { font-size: 21px; font-weight: 500; letter-spacing: -.01em; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 24px 0; font-size: 20px; font-weight: 600; letter-spacing: -.01em; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq .plus { transition: transform .25s; color: var(--muted); }
.faq details[open] .plus { transform: rotate(45deg); }
.faq .prose { padding-bottom: 20px; }

/* Contact */
.cta { border-bottom: 0; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.contact-list li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.contact-list a:hover { text-decoration: underline; }
.form { display: grid; gap: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.form label { display: grid; gap: 8px; font-size: 14px; font-weight: 500; }
.form input, .form select, .form textarea { width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--ink); }
.form textarea { resize: vertical; }
.form .btn { justify-self: start; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 14px 18px; border-radius: 10px; margin-bottom: 16px; font-weight: 500; }
.notice.ok { background: color-mix(in srgb, #16a34a 14%, transparent); color: #15803d; }
.notice.err { background: color-mix(in srgb, #dc2626 12%, transparent); color: #b91c1c; }
[data-theme="dark"] .notice.ok { color: #4ade80; }
[data-theme="dark"] .notice.err { color: #f87171; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 72px 0 32px; }
.foot-grid { display: grid; grid-template-columns: 1.8fr 1fr 1fr 1fr; gap: 40px; }
.foot-about { max-width: 380px; margin: 20px 0 24px; font-size: 16px; }
.socials { display: flex; gap: 8px; }
.foot-links { list-style: none; padding: 0; margin: 6px 0 20px; display: grid; gap: 14px; }
.foot-links a:hover { text-decoration: underline; }
.foot-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.foot-bl { display: flex; gap: 20px; }
.foot-bl a { text-decoration: underline; text-underline-offset: 3px; }

/* Floating buttons */
.float-q { position: fixed; right: 24px; bottom: 24px; z-index: 40; display: inline-flex; align-items: center; gap: 10px; padding: 15px 22px; border-radius: 10px; background: var(--btn-bg); color: var(--btn-ink); font-weight: 500; box-shadow: var(--shadow); transition: transform .15s; }
.float-q:hover { transform: translateY(-2px); }
.to-top { position: fixed; right: 24px; bottom: 92px; z-index: 40; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .25s; }
.to-top.show { opacity: 1; pointer-events: auto; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .dot, .slide.on { animation: none; }
}

/* 404 */
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 80px 0; }

/* Responsive */
@media (max-width: 1080px) {
  .car-track { grid-auto-columns: calc((100% - 24px) / 2); }
  .car-btn.prev { left: -12px; } .car-btn.next { right: -12px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .menu, .hide-m { display: none; }
  .burger { display: grid; }
  .hero { padding: 56px 0 72px; }
  .hero-grid, .two-col { grid-template-columns: 1fr; gap: 40px; }
  .hero-photo { order: -1; max-width: 460px; }
  .hero-photo img { max-height: 420px; object-position: center 20%; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat { padding: 32px 20px; border-left: 0; }
  .stat:nth-child(even) { border-left: 1px solid var(--line); }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stat:first-child, .stat:nth-child(3) { padding-left: 0; }
  .hl-grid { grid-template-columns: 1fr; gap: 24px; }
  .section { padding: 80px 0; }
  .sec-head { flex-direction: column; align-items: flex-start; }
  .row { grid-template-columns: 48px 1fr; }
  .row p { grid-column: 2; }
  .timeline li { grid-template-columns: 1fr; gap: 6px; }
  .dark-card { padding: 40px 28px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { width: calc(100% - 32px); }
  .car-track { grid-auto-columns: 86%; gap: 16px; }
  .car-btn { display: none; }
  .steps { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .form { padding: 22px; }
  .foot-grid { grid-template-columns: 1fr; }
  .dark-head { flex-direction: column; }
  .float-q { right: 16px; bottom: 16px; padding: 13px 18px; }
  .to-top { right: 16px; bottom: 80px; }
  .logo-text { letter-spacing: .35em; }
}
