/* Paria Khamse — one-page portfolio
   Layout: an airy single column of four short sections. White page, one soft
   colour shape behind each picture (aqua for the portrait, powder blue for the
   toy, yellow for the cartoon), dark-grey type, nothing boxed inside anything. */

/* FONTS:START */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-grotesque-var.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("fonts/figtree-var.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}
/* FONTS:END */

:root {
  color-scheme: light;
  --white: #ffffff;
  --ink: #2b2e33;
  --ink-soft: #5b616a;
  --line: #e6e8eb;
  --aqua: #ddf3ef;
  --blue: #dde9f7;
  --yellow: #fff1bd;
  --green: #2f8a5b;
  --field: #7f868e;
  --error: #b42318;

  --f-head: "Bricolage Grotesque", ui-rounded, "Avenir Next", system-ui, sans-serif;
  --f-body: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(20px, 5vw, 56px);
  --space: clamp(4.5rem, 3rem + 7vw, 9rem);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
img, video, picture { display: block; max-width: 100%; }
[hidden] { display: none !important; }
img, video { height: auto; }
h1, h2, p, figure, blockquote, ul { margin: 0; }
ul { padding: 0; list-style: none; }
h1, h2 { font-family: var(--f-head); font-weight: 650; letter-spacing: -0.025em; line-height: 1.02; text-wrap: balance; }
p { text-wrap: pretty; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; border-radius: 6px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; z-index: 10;
  left: max(var(--gutter), env(safe-area-inset-left, 0px)); top: 12px;
  padding: 0.6rem 1rem; border-radius: 999px;
  background: var(--ink); color: var(--white); font-weight: 600; text-decoration: none;
  transform: translateY(-200%); transition: transform 0.2s var(--ease);
}
.skip:focus { transform: none; }

.wrap {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

/* Buttons and links */
.button {
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 52px; padding: 0.8rem 1.6rem;
  border-radius: 999px;
  background: var(--ink); color: var(--white);
  font-weight: 600; font-size: 1.0625rem; text-decoration: none;
  transition: transform 0.2s var(--ease), background-color 0.2s;
}
.button:hover { background: #40454d; }
@media (hover: hover) { .button:hover { transform: translateY(-2px); } }
.link {
  display: inline-flex; align-items: center; gap: 0.35rem;
  min-height: 44px; font-weight: 600;
}
.arrow { font-family: var(--f-body); transition: transform 0.2s var(--ease); }
a:hover .arrow { transform: translate(2px, -2px); }

/* Header */
.top { padding-block: clamp(1rem, 0.6rem + 1.5vw, 1.75rem); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.name {
  font-family: var(--f-head); font-weight: 650; font-size: 1.2rem; letter-spacing: -0.02em;
  text-decoration: none; padding-block: 0.5rem;
}
.top ul { display: flex; gap: clamp(0.75rem, 3vw, 2rem); }
.top nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  font-weight: 500; text-decoration: none;
}
.top nav a:hover { text-decoration: underline; }

/* 1 — Introduction */
.intro { padding-block: clamp(2rem, 1rem + 5vw, 5.5rem) var(--space); }
.intro-grid { display: grid; gap: clamp(2rem, 1rem + 3vw, 3rem); align-items: center; }
.portrait { position: relative; width: clamp(190px, 46vw, 370px); aspect-ratio: 1; }
.portrait::before, .portrait::after { content: ""; position: absolute; border-radius: 50%; }
.portrait::before { inset: 0; background: var(--aqua); transform: translate(9%, 7%); }
.portrait::after {
  width: 22%; aspect-ratio: 1; top: -2%; right: -6%;
  background: var(--yellow);
}
.portrait picture, .portrait img { position: relative; z-index: 1; width: 100%; height: 100%; border-radius: 50%; }
.portrait img { object-fit: cover; }

.intro-text { display: grid; gap: 1.4rem; justify-items: start; max-width: 36rem; }
.status { display: inline-flex; align-items: center; gap: 0.6rem; font-size: 0.975rem; font-weight: 500; color: var(--ink-soft); }
.status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px #dff1e7; }
.intro h1 { font-size: clamp(3.1rem, 1.9rem + 5vw, 5.75rem); }
.lede { font-size: clamp(1.2rem, 1.08rem + 0.55vw, 1.45rem); line-height: 1.5; color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.75rem; margin-top: 0.4rem; }

@media (min-width: 820px) {
  .intro-grid { grid-template-columns: auto minmax(0, 1fr); column-gap: clamp(3rem, 2rem + 4vw, 6.5rem); }
}

@media (prefers-reduced-motion: no-preference) {
  .intro-text > *, .portrait { animation: rise 0.9s var(--ease) both; }
  .portrait { animation-name: pop; }
  .intro-text > :nth-child(2) { animation-delay: 0.06s; }
  .intro-text > :nth-child(3) { animation-delay: 0.12s; }
  .intro-text > :nth-child(4) { animation-delay: 0.18s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }

/* 2 — Hamrah AI */
.hamrah { padding-bottom: var(--space); }
.hamrah-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-areas: "title" "toy" "text" "cartoon" "visit";
}
.hamrah h2 { grid-area: title; font-size: clamp(2.75rem, 1.8rem + 4vw, 5rem); }
.toy { grid-area: toy; position: relative; }
.toy-frame {
  overflow: hidden;
  border-radius: clamp(20px, 3vw, 36px);
  background: var(--blue);
  aspect-ratio: 4 / 5;
}
.toy-frame img { width: 100%; height: 100%; object-fit: cover; }
.toy figcaption, .cartoon figcaption { margin-top: 0.7rem; font-size: 0.9375rem; color: var(--ink-soft); }
.hamrah-text { grid-area: text; display: grid; gap: 1rem; max-width: 30rem; }
.hamrah-text p:not(.lede) { color: var(--ink-soft); }
.cartoon { grid-area: cartoon; max-width: 30rem; }
.visit { grid-area: visit; justify-self: start; }

.clip {
  position: relative; display: block;
  overflow: hidden; border-radius: 20px;
  aspect-ratio: 16 / 9;
  background: var(--yellow);
  box-shadow: 0 0 0 10px var(--yellow);
  margin: 10px;
  color: inherit;
}
.clip img, .clip iframe { width: 100%; height: 100%; object-fit: cover; border: 0; }
.clip picture { height: 100%; }
.play {
  position: absolute; inset: 0; margin: auto;
  width: 68px; height: 68px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.94); color: var(--ink);
  border: 0; cursor: pointer;
  box-shadow: 0 8px 24px rgba(43, 46, 51, 0.22);
  transition: transform 0.2s var(--ease);
}
.play svg { width: 22px; height: 22px; margin-left: 4px; }
@media (hover: hover) { .clip:hover .play { transform: scale(1.06); } }
.cartoon figcaption { margin-top: 1.1rem; margin-left: 10px; }
.cartoon figcaption strong { color: var(--ink); font-weight: 600; }

@media (min-width: 880px) {
  .hamrah-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    grid-template-areas:
      "toy title"
      "toy text"
      "toy cartoon"
      "toy visit";
    grid-template-rows: auto auto auto 1fr;
    column-gap: clamp(3rem, 2rem + 4vw, 6rem);
    row-gap: 1.6rem;
  }
  .hamrah h2 { align-self: end; margin-top: 1.5rem; }
  .cartoon { margin-top: 1rem; }
}

/* 3 — Experience and education */
.work { padding-bottom: clamp(3rem, 2rem + 4vw, 5rem); }
.edu { padding-bottom: var(--space); }
.work-inner { max-width: 50rem; }
.work h2, .edu h2 { font-size: 1.35rem; letter-spacing: -0.01em; margin-bottom: 0.75rem; }

.jobs > li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  column-gap: clamp(0.9rem, 0.6rem + 1vw, 1.25rem);
  align-items: start;
  padding-block: 1.35rem;
  border-top: 1px solid var(--line);
}
/* Organization mark: official logos keep their own proportions and colours */
.org-mark {
  width: 36px;
  height: 36px;
  object-fit: contain;
  justify-self: center;
  margin-top: 0.05rem;
}
.job-body { display: grid; gap: 0.4rem; min-width: 0; }
.jobs > li:last-child { border-bottom: 1px solid var(--line); }
.job-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.15rem 1.5rem;
}
.job-head h3 {
  margin: 0;
  font: 600 1.0625rem/1.45 var(--f-body);
  letter-spacing: 0;
}
.job-head .org { font-weight: 400; }
.dates {
  color: var(--ink-soft);
  font-size: 0.975rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.job-desc { max-width: 42rem; color: var(--ink-soft); font-size: 1rem; line-height: 1.6; }

.more { border-bottom: 1px solid var(--line); }
.more summary {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 56px;
  padding-block: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.more summary::-webkit-details-marker { display: none; }
.more summary::before {
  content: "";
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
  border-radius: 50%;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 10px 1.6px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 1.6px 10px no-repeat,
    var(--blue);
  transition: transform 0.25s var(--ease);
}
.more[open] summary::before { transform: rotate(45deg); }
.more summary:hover { text-decoration: underline; text-underline-offset: 0.22em; }
.more .jobs { padding-bottom: 0.5rem; }
.more .jobs > li:last-child { border-bottom: 0; }
.jobs.is-small .job-head h3 { font-size: 1rem; }
.jobs.is-small .job-desc { font-size: 0.95rem; }

.edu { padding-top: clamp(1rem, 0.5rem + 2vw, 2rem); }

/* Recommendations carousel */
.recs { padding-bottom: var(--space); }
.edu { padding-bottom: clamp(3.5rem, 2.5rem + 4vw, 5.5rem); }
.recs-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1.75rem;
}
.recs h2 { font-size: 1.35rem; letter-spacing: -0.01em; }
.recs-controls { display: flex; align-items: center; gap: 0.25rem; margin-top: 2rem; }
.recs-arrow {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1.5px solid var(--field);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}
.recs-arrow svg { width: 20px; height: 20px; }
.recs-arrow:hover { border-color: var(--ink); background: var(--blue); }
.recs-dots { display: flex; align-items: center; }
.recs-dot {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.recs-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--field);
  transition: width 0.25s var(--ease), background-color 0.25s;
}
.recs-dot[aria-current="true"]::before { width: 22px; background: var(--ink); }
.recs-dot:hover::before { background: var(--ink-soft); }
.recs-dot[aria-current="true"]:hover::before { background: var(--ink); }

.recs-track { display: grid; gap: 3rem; transition: height 0.35s var(--ease); }
.recs-track.is-moving { overflow: hidden; }
.rec { display: grid; gap: 1.5rem; max-width: 44rem; touch-action: pan-y; }
.rec blockquote { display: grid; gap: 0.9rem; }
.rec blockquote::before {
  content: "\201C";
  display: block;
  width: 2.6rem; height: 2.6rem;
  margin-bottom: 0.35rem;
  border-radius: 50%;
  background: var(--yellow);
  font-family: var(--f-head);
  font-size: 2.4rem; line-height: 3.35rem; text-align: center;
}
.rec blockquote p { font-size: clamp(1.075rem, 1.03rem + 0.25vw, 1.2rem); line-height: 1.7; }
.rec-by {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  column-gap: 0.85rem;
  align-items: start;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
}
.avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--ink);
  font: 600 0.75rem/1 var(--f-body);
  letter-spacing: 0.03em;
  object-fit: cover;
}
.avatar[data-tone="aqua"] { background: var(--aqua); }
.avatar[data-tone="yellow"] { background: var(--yellow); }
.rec-who { display: grid; gap: 0.05rem; min-width: 0; }
.rec-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.15rem 0.45rem; }
.rec-name { font-weight: 600; }
.rec-li {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-block: -4px;
  border-radius: 6px;
  color: var(--ink);
}
.rec-li::after { content: ""; position: absolute; inset: -8px; }
.rec-li .li-logo { width: 18px; height: 18px; }
.rec-title { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.45; }
.rec-context::before { content: " · "; }
.rec-by .avatar { margin-top: 0.5rem; }
.rec-by picture { display: block; width: 32px; height: 32px; }
.rec-by picture .avatar { margin-top: 0; }
.rec-by > picture { margin-top: 0.5rem; }
@media (max-width: 559px) {
  .rec-context { display: block; }
  .rec-context::before { content: none; }
}
.rec.is-entering-next { animation: rec-in-next 0.4s var(--ease) both; }
.rec.is-entering-prev { animation: rec-in-prev 0.4s var(--ease) both; }
@keyframes rec-in-next { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes rec-in-prev { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }

/* 4 — Contact */
.contact { padding-bottom: clamp(3rem, 2rem + 4vw, 5rem); }
.contact-panel {
  display: grid;
  gap: clamp(2rem, 1.5rem + 2vw, 3rem);
  padding: clamp(2.25rem, 1.5rem + 5vw, 5.5rem) clamp(1.25rem, 0.4rem + 4vw, 5.5rem);
  border-radius: clamp(24px, 4vw, 44px);
  background: var(--aqua);
}
.contact-intro { display: grid; gap: 1.25rem; align-content: start; }
.contact h2 { font-size: clamp(2.4rem, 1.7rem + 3vw, 4rem); }
.contact-intro p { max-width: 30rem; font-size: clamp(1.1rem, 1.05rem + 0.3vw, 1.25rem); }
@media (min-width: 900px) {
  .contact-panel { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); column-gap: clamp(3rem, 6vw, 6rem); }
  .contact-form { max-width: 28rem; }
}
/* "Get in touch" lands with a little breathing room above the panel */
#contact { scroll-margin-top: 12px; }

.contact-form { display: grid; gap: 1.5rem; align-content: start; width: 100%; min-width: 0; }
#contact-form { display: grid; gap: 1.25rem; }
.field { display: grid; gap: 0.45rem; }
.field label { font-weight: 600; }
.field input,
.field textarea {
  width: 100%;
  min-height: 54px;
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--field);
  border-radius: 14px;
  background: var(--white);
  color: var(--ink);
  font: 400 1.0625rem/1.4 var(--f-body);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:hover, .field textarea:hover { border-color: var(--ink-soft); }
.field textarea { min-height: 9rem; resize: vertical; line-height: 1.55; }
.field input:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(43, 46, 51, 0.18); }
.field [aria-invalid="true"] { border-color: var(--error); }
.error { color: var(--error); font-size: 0.9375rem; font-weight: 500; }
.error:empty { display: none; }
#contact-form .button { justify-self: start; margin-top: 0.35rem; border: 0; cursor: pointer; font-family: var(--f-body); }
#contact-form .button[disabled] { opacity: 0.75; cursor: progress; transform: none; }
.form-status { font-size: 0.975rem; color: var(--ink-soft); }
.form-status:empty { display: none; }
.form-status.is-error { color: var(--error); font-weight: 500; }
.form-status:focus { outline: none; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.sent { display: grid; gap: 0.5rem; padding: 1.5rem 1.6rem; border-radius: 18px; background: var(--white); }
.sent-title { font-family: var(--f-head); font-weight: 600; font-size: 1.4rem; line-height: 1.25; }
.sent:focus { outline: none; }

.linkedin {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  justify-self: start;
  min-height: 44px;
  font-size: 0.975rem;
  font-weight: 600;
  text-decoration: none;
}
.linkedin .li-logo { width: 20px; height: 20px; flex: none; }
.linkedin:hover > span:not(.sr-only) { text-decoration: underline; text-underline-offset: 0.22em; }

.foot { padding-block: 0 2.5rem; color: var(--ink-soft); font-size: 0.9375rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Keep the toy render comfortably sized on tablets */
@media (max-width: 879px) { .toy { max-width: 32rem; } }

.intro .linkedin { font-size: 1.0625rem; }

/* Phones: full-width send button under full-width fields */
@media (max-width: 639px) {
  #contact-form .button { justify-self: stretch; justify-content: center; }
}
