/*
Theme Name: Abu Usof
Theme URI: https://abuusof.com/
Author: Abu Usof
Description: Personal portfolio — warm editorial design: cream and peach gradients, oversized display type with serif-italic accents, numbered services, stats band, skills timeline.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: abuusof
*/

:root {
  --cream: #F7F2EA;
  --panel: #FFFFFF;
  --ink: #0C0C0D;
  --muted: #6E6A64;
  --line: #E6DFD3;
  --peach: #FFDCA8;
  --peach-soft: #FFF3E2;
  --orange: #F97B2F;
  --grad: linear-gradient(160deg, #FFE3B6 0%, #FFF4E5 55%, #F7F2EA 100%);
  --ease: cubic-bezier(.22, .8, .3, 1);
  --sans: "Archivo", "Segoe UI", system-ui, sans-serif;
  --serif: "Playfair Display", Georgia, serif;
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--cream); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.sr-only, .screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 3px; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 300; background: var(--ink); color: #fff; padding: 10px 18px; }
.skip:focus { left: 0; }

/* ---------- HEADER ---------- */
.site-head { position: sticky; top: 0; z-index: 90; background: rgba(247, 242, 234, 0.9); backdrop-filter: blur(10px); transition: box-shadow .3s; }
.site-head.scrolled { box-shadow: 0 1px 0 var(--line); }
.head-in { display: flex; align-items: center; gap: 36px; height: 78px; }
.wordmark { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 1.45rem; letter-spacing: -0.01em; }
.wordmark::after { content: "."; color: var(--orange); }
.head-nav { margin: 0 auto; display: flex; gap: 34px; }
.head-nav a { font-size: 0.93rem; font-weight: 500; color: #3B3833; padding: 4px 0; position: relative; }
.head-nav a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1.5px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.head-nav a:hover::after { transform: scaleX(1); }
.btn-pill {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: #fff; font-weight: 600; font-size: 0.93rem;
  padding: 13px 28px; border-radius: 999px; transition: transform .25s var(--ease), background .25s;
}
.btn-pill:hover { transform: translateY(-2px); background: #232324; }
@media (max-width: 860px) { .head-nav { display: none; } .head-in { justify-content: space-between; } }

/* ---------- HERO (mirrors the reference layout) ---------- */
.hero {
  position: relative; padding: 10px 0 0; overflow: hidden;
  background: linear-gradient(180deg, #FFDFAC 0%, #FFF0D9 42%, #FCFAF6 100%);
}
.hero-in { position: relative; display: flex; align-items: flex-end; justify-content: center; }
.hey {
  position: absolute; top: clamp(28px, 4.5vw, 62px); left: 0; right: 0;
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(3rem, 7.6vw, 6.4rem); white-space: nowrap; z-index: 1; letter-spacing: -0.02em;
}
/* Each word anchors to the head, not to one centred box — "there" is wider than
   "Hey," and a shared box pulls the gap left into the face. The portrait is a fixed
   620px on desktop, so the hair edges sit at constant px from centre (-83 / +143 at
   the text band); a 2px breath separates each word from the silhouette. */
.hey span { position: absolute; top: 0; }
.hey span:first-child { right: calc(50% + 85px); }
.hey span:last-child { left: calc(50% + 145px); }
.portrait {
  position: relative; z-index: 2; width: min(620px, 88vw);
  /* head top lands in the lower half of the greeting band — words peek over the hair */
  margin: clamp(58px, 6.6vw, 114px) auto 0; align-self: flex-end;
}
.portrait img { width: 100%; display: block; }
.portrait.is-cutout img { filter: drop-shadow(0 26px 44px rgba(160, 95, 20, 0.22)); }
.portrait:not(.is-cutout) img { border-radius: 18px; box-shadow: 0 30px 60px rgba(180, 120, 40, 0.25); }
.portrait-ph {
  aspect-ratio: 4 / 5; border-radius: 18px;
  background:
    radial-gradient(120% 90% at 50% 10%, rgba(255,255,255,0.65), transparent 60%),
    linear-gradient(165deg, #FFCf8E 0%, #F7A65B 60%, #E88433 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 30px 60px rgba(180, 120, 40, 0.25);
}
.portrait-ph span { font-weight: 900; font-size: clamp(5rem, 14vw, 9rem); letter-spacing: -0.04em; color: rgba(255,255,255,0.9); }
.badge {
  position: absolute; z-index: 3; top: 42%; left: 0;
  display: inline-flex; align-items: center; gap: 10px;
  background: #fff; border-radius: 999px; padding: 11px 20px;
  font-size: 0.85rem; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.badge i { width: 10px; height: 10px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(249,123,47,0.2); }
.spec {
  position: absolute; z-index: 3; top: 40%; right: 0;
  max-width: 250px; font-size: 0.92rem; color: #4A463F; line-height: 1.65;
}
.hero-name {
  position: absolute; z-index: 3; left: 0; bottom: 2.5%;
  font-weight: 900; text-transform: uppercase; line-height: 0.92; letter-spacing: -0.03em;
  font-size: clamp(3rem, 8.2vw, 7.2rem);
}
/* "Usof" overlaps the figure on desktop and reads in cream, like the reference. */
.hero-name .nm-last { color: #FFE8C4; }
.hero-role {
  position: absolute; z-index: 3; right: 0; bottom: 8%; text-align: left;
  font-weight: 900; text-transform: uppercase; line-height: 1.12; letter-spacing: -0.01em;
  font-size: clamp(1.05rem, 2.2vw, 1.75rem); max-width: 290px;
}
@media (max-width: 860px) {
  .hero { padding-top: 16px; }
  .hero-in { min-height: 0; display: flex; flex-direction: column; align-items: center; }
  .hey, .portrait, .badge, .spec, .hero-name, .hero-role { position: static; transform: none; }
  .hey { display: flex; justify-content: center; gap: 26px; margin-bottom: 4px; font-size: clamp(2.6rem, 11vw, 4rem); }
  .hey span { position: static; }
  .badge { order: -1; margin: 10px 0 6px; }
  .portrait { margin: 10px auto 0; }
  .hero-name { text-align: center; margin-top: 24px; }
  .hero-name .nm-last { color: inherit; } /* cream only works over the photo — PC view */
  .hero-role { text-align: center; margin-top: 14px; max-width: none; }
  .spec { max-width: 420px; text-align: center; margin: 18px 0 28px; order: 5; }
}

/* trusted line */
.trusted { padding: 26px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.trusted p { font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }

/* ---------- SECTIONS ---------- */
section { padding: 110px 0; }
.sec-title {
  text-align: center; font-weight: 900; text-transform: uppercase; letter-spacing: -0.02em;
  font-size: clamp(2rem, 5.4vw, 3.6rem); line-height: 1.04; margin-bottom: 64px;
}
.sec-title .it { font-family: var(--serif); font-style: italic; font-weight: 500; text-transform: none; letter-spacing: 0; }

/* about */
.about { padding: 30px 0 110px; }
.about-grid { display: grid; grid-template-columns: 360px 1fr; gap: 70px; align-items: center; }
.about-media { position: relative; }
.about-media::before {
  content: ""; position: absolute; inset: 18px -14px -14px 14px;
  background: linear-gradient(160deg, #FFDFAC, #FFE8C4); border-radius: 22px;
  transform: rotate(-3deg); z-index: 0;
}
.about-media img { position: relative; z-index: 1; width: 100%; display: block; border-radius: 18px; box-shadow: 0 24px 48px rgba(160, 95, 20, 0.18); }
.about-body .sec-title { text-align: left; margin-bottom: 28px; }
.about-body p { color: #4A463F; line-height: 1.8; max-width: 62ch; }
.about-body p + p { margin-top: 16px; }
.about-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.about-facts span { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; font-size: 0.78rem; font-weight: 600; color: #4A463F; }
@media (max-width: 980px) {
  .about-grid { grid-template-columns: 1fr; gap: 44px; }
  .about-media { max-width: 340px; margin: 0 auto; }
  .about-body .sec-title { text-align: center; }
  .about-body p { margin-left: auto; margin-right: auto; text-align: center; }
  .about-facts { justify-content: center; }
}

/* projects */
.projects { padding-top: 90px; }
.proj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 980px) { .proj-grid { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; } }
.proj { border-radius: 20px; overflow: hidden; background: var(--panel); box-shadow: 0 2px 0 var(--line); transition: transform .4s var(--ease), box-shadow .4s var(--ease); display: flex; flex-direction: column; }
.proj:hover { transform: translateY(-6px); box-shadow: 0 24px 48px rgba(30, 20, 5, 0.12); }
.proj-cover { aspect-ratio: 16 / 11; display: flex; align-items: flex-end; padding: 26px; position: relative; }
.proj-cover.c1 { background: linear-gradient(150deg, #16181D 0%, #2E3341 70%, #4A4030 100%); }
.proj-cover.c2 { background: linear-gradient(150deg, #0C0A0B 0%, #33191B 60%, #C4442E 130%); }
.proj-cover.c3 { background: linear-gradient(150deg, #0A2C42 0%, #10517A 70%, #38ACE0 140%); }
.proj-cover b { color: #fff; font-weight: 900; text-transform: uppercase; font-size: 1.5rem; letter-spacing: -0.01em; line-height: 1.1; }
.proj-cover .tag { position: absolute; top: 20px; left: 24px; font-size: 0.64rem; letter-spacing: 0.24em; text-transform: uppercase; color: rgba(255,255,255,0.75); }
.proj-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.proj-body p { color: var(--muted); font-size: 0.95rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.chips span { border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; font-size: 0.74rem; font-weight: 500; color: #4A463F; }
.proj-link { display: inline-block; margin-top: 16px; font-size: 0.86rem; font-weight: 700; color: var(--orange); }
.proj-link:hover { color: var(--ink); }

/* services 01-04 */
.services { background: var(--grad); }
.svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 34px; }
@media (max-width: 980px) { .svc-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .svc-grid { grid-template-columns: 1fr; } }
.svc { border-top: 2px solid var(--ink); padding-top: 20px; }
.svc .num { font-size: 1.5rem; font-weight: 900; color: #C9B693; }
.svc h3 { font-size: 1.12rem; font-weight: 700; margin: 12px 0 10px; }
.svc p { font-size: 0.92rem; color: var(--muted); }

/* stats + system */
.vision-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 60px; align-items: center; }
@media (max-width: 980px) { .vision-grid { grid-template-columns: 1fr; } }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 42px 30px; }
.stat b { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 900; letter-spacing: -0.03em; display: block; line-height: 1; }
.stat b em { font-style: normal; color: var(--orange); }
.stat span { display: block; margin-top: 8px; color: var(--muted); font-size: 0.86rem; letter-spacing: 0.06em; text-transform: uppercase; }
.system {
  border-radius: 22px; background: var(--ink); color: #fff; padding: 40px 38px;
  box-shadow: 0 32px 64px rgba(20, 12, 2, 0.25);
}
.system h3 { font-size: 0.72rem; letter-spacing: 0.24em; text-transform: uppercase; color: #B8B2A6; margin-bottom: 26px; }
.sys-row { display: flex; align-items: baseline; gap: 18px; padding: 16px 0; border-top: 1px solid rgba(255,255,255,0.12); }
.sys-row:last-child { border-bottom: 1px solid rgba(255,255,255,0.12); }
.sys-row .k { font-weight: 700; min-width: 92px; color: var(--peach); }
.sys-row .v b { display: block; font-weight: 600; }
.sys-row .v span { color: #A9A399; font-size: 0.88rem; }

/* skills timeline */
.skills .row { display: grid; grid-template-columns: 150px 1fr auto; gap: 22px; align-items: baseline; padding: 26px 0; border-top: 1px solid var(--line); }
.skills .row:last-child { border-bottom: 1px solid var(--line); }
@media (max-width: 760px) { .skills .row { grid-template-columns: 1fr; gap: 10px; } }
.skills .yr { color: var(--muted); font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.skills .cat { font-size: 1.3rem; font-weight: 700; }
.skills .tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; max-width: 460px; }
@media (max-width: 760px) { .skills .tags { justify-content: flex-start; } }
.skills .tags span { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 13px; font-size: 0.76rem; color: #4A463F; }

/* testimonials */
.quotes { padding: 90px 0 30px; }
.quote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 54px; }
.quote { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 30px 28px; }
.quote blockquote { margin: 0; font-family: var(--serif); font-style: italic; font-size: 1.05rem; line-height: 1.7; color: #35322D; }
.quote figcaption { margin-top: 18px; display: flex; flex-direction: column; gap: 2px; }
.quote figcaption b { font-size: 0.92rem; }
.quote figcaption span { font-size: 0.8rem; color: var(--muted); }
@media (max-width: 860px) { .quote-grid { grid-template-columns: 1fr; } }

/* CTA / footer */
.cta { background: var(--grad); text-align: center; padding: 130px 0 120px; }
.cta h2 { font-weight: 900; text-transform: uppercase; letter-spacing: -0.02em; font-size: clamp(2.2rem, 6.5vw, 4.6rem); line-height: 1.02; }
.cta h2 .it { font-family: var(--serif); font-style: italic; font-weight: 500; text-transform: none; }
.cta p { margin: 22px auto 0; max-width: 46ch; color: var(--muted); }
.cta .btn-pill { margin-top: 40px; padding: 17px 38px; font-size: 1rem; }
.cta .mail { display: block; margin-top: 18px; font-weight: 600; color: #4A463F; }
.cta .mail:hover { color: var(--ink); }
.cta .loc { margin-top: 22px; font-size: 0.88rem; color: var(--muted); }
.foot { border-top: 1px solid var(--line); padding: 30px 0; }
.foot-pages { display: flex; flex-wrap: wrap; gap: 18px; font-size: 0.85rem; color: var(--muted); padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.foot .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 0.85rem; color: var(--muted); }
.foot a { color: inherit; font-weight: 600; }
.foot a:hover { color: var(--ink); }
.foot-links { display: flex; flex-wrap: wrap; gap: 18px; }

/* inner pages (privacy policy etc.) */
.page-wrap { max-width: 820px; }
.page-title { text-align: left; font-size: clamp(1.9rem, 4.6vw, 3rem); margin-bottom: 40px; }
.page-prose { max-width: 70ch; }
.page-prose h2 { font-size: 1.3rem; font-weight: 800; margin: 36px 0 12px; }
.page-prose p { margin: 0 0 14px; color: #35322D; line-height: 1.75; }
.page-prose ul { margin: 0 0 14px 22px; }
.page-prose li { margin-bottom: 8px; line-height: 1.65; }
.page-prose a { color: var(--orange); font-weight: 600; }
.page-prose a:hover { color: var(--ink); }
.page-prose h3 { font-size: 1.05rem; font-weight: 800; margin: 26px 0 10px; }
.page-prose ol { margin: 0 0 14px 22px; }
.page-prose ol li { margin-bottom: 8px; line-height: 1.65; }
.page-prose pre {
  background: #17130D; color: #EFE8DC; border-radius: 12px; padding: 18px 20px;
  overflow-x: auto; font-size: 0.84rem; line-height: 1.6; margin: 0 0 16px;
}
.page-prose code { font-family: Consolas, "Courier New", monospace; }
.page-prose p code, .page-prose li code {
  background: rgba(0,0,0,0.06); border-radius: 5px; padding: 1px 6px; font-size: 0.86em;
}
.page-prose .tbl-wrap { overflow-x: auto; margin: 0 0 16px; }
.page-prose table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 0.9rem; }
.page-prose th { text-align: left; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #6B6257; padding: 10px 12px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.page-prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.page-prose .callout {
  background: #FFF0DC; border: 1px solid #EBDDC6; border-radius: 12px;
  padding: 16px 20px; margin: 0 0 16px;
}
.page-prose .dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 0 0 16px; }
.page-prose .dl-card {
  display: block; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 18px; color: var(--ink); font-weight: 400;
}
.page-prose .dl-card b { display: block; color: var(--orange); margin-bottom: 4px; }
.page-prose .dl-card span { font-size: 0.85rem; color: #6B6257; }
.page-prose .dl-card:hover { border-color: var(--orange); }
.post-meta { display: flex; flex-wrap: wrap; gap: 16px; align-items: baseline; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.post-meta .pcat a { color: var(--orange); font-weight: 700; }
.blog-intro { color: #4A463F; max-width: 62ch; margin: -28px 0 40px; }
.post-list { max-width: 74ch; }
.post-card { padding: 26px 0; border-top: 1px solid var(--line); }
.post-card:last-child { border-bottom: 1px solid var(--line); }
.post-card h2 { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 8px; line-height: 1.25; }
.post-card h2 a { color: var(--ink); }
.post-card h2 a:hover { color: var(--orange); }
.post-card .post-meta { margin-bottom: 8px; }
.post-x { color: #4A463F; margin: 0 0 10px; }
.post-more { font-weight: 700; font-size: 0.9rem; color: var(--orange); }
.post-more:hover { color: var(--ink); }
.pagination { margin-top: 30px; }
.pagination .nav-links { display: flex; gap: 10px; }
.pagination a, .pagination span { padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font-weight: 600; font-size: 0.9rem; }
.pagination .current { background: var(--ink); color: #fff; }
.faq-block { max-width: 70ch; margin-top: 44px; }
.faq-block h2 { font-size: 1.3rem; font-weight: 800; margin: 0 0 16px; }
.faq { border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: 10px; padding: 0 18px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; color: var(--orange); font-weight: 900; margin-right: 10px; }
.faq[open] summary::before { content: "–"; }
.faq p { margin: 0; padding: 0 0 16px 22px; color: #4A463F; line-height: 1.7; }
.page-cta { margin-top: 44px; background: var(--grad); border-radius: 16px; padding: 36px 28px; text-align: center; max-width: 70ch; }
.page-cta p { font-weight: 800; font-size: 1.15rem; margin: 0 0 18px; }
.page-cta-alt { display: block; margin-top: 14px; font-weight: 600; color: #4A463F; }
.page-cta-alt:hover { color: var(--ink); }

/* scroll animation */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 300;
  background: var(--orange); transform: scaleX(0); transform-origin: 0 50%;
  pointer-events: none;
}
.trusted { overflow: hidden; }

/* reveals */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.001s !important; animation-duration: 0.001s !important; }
  .reveal { opacity: 1; transform: none; }
}
