/* =========================================================================
   Omar Alazemi — portfolio
   White + mocha brown, professional/editorial. Plain CSS, no build step.
   Retheme from the :root variables below.
   ========================================================================= */

:root {
  /* Surfaces */
  --bg:        #fbf8f4;   /* warm ivory page          */
  --surface:   #ffffff;   /* cards                    */
  --tint:      #f4ede4;   /* soft mocha-tinted band   */
  --border:    #e8ddcf;   /* warm beige hairline      */
  --border-2:  #dccdb9;

  /* Mocha browns */
  --mocha:     #6f4e37;   /* primary mocha            */
  --mocha-dk:  #573b28;   /* hover / deep             */
  --espresso:  #2f231b;   /* darkest — headings       */
  --tan:       #a8896c;   /* light accent             */

  /* Text */
  --text:      #2c2520;   /* warm near-black body     */
  --muted:     #6c5d50;   /* secondary                */
  --faint:     #9a8b7d;   /* tertiary / captions      */

  --radius:    16px;
  --maxw:      1120px;
  --ease:      cubic-bezier(.22,.61,.36,1);

  --font-sans:    'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;

  --shadow:    0 22px 50px -28px rgba(74,52,36,.45);
  --shadow-sm: 0 10px 26px -18px rgba(74,52,36,.4);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* Keyboard focus — visible mocha ring for every interactive element */
:focus-visible { outline: 2px solid var(--mocha); outline-offset: 3px; border-radius: 5px; }
:focus:not(:focus-visible) { outline: none; }

/* Skip link — hidden until focused */
.skip-link {
  position: fixed; left: 14px; top: -64px; z-index: 100;
  background: var(--mocha); color: #fff; padding: .65rem 1.1rem;
  border-radius: 9px; font-weight: 600; font-size: .9rem;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 14px; }

.container { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }

/* ---- Navigation --------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  transition: background .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgba(251,248,244,.82);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav__brand { display: flex; align-items: center; gap: .65rem; font-weight: 600; color: var(--espresso); }
.nav__monogram {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 9px;
  font-family: var(--font-display); font-weight: 600; font-size: .85rem; letter-spacing: .01em;
  color: #fff; background: var(--mocha);
}
.nav__name { font-size: 1rem; letter-spacing: -.01em; }
.nav__links { display: flex; align-items: center; gap: 1.8rem; font-size: .95rem; color: var(--muted); }
.nav__links a { transition: color .2s var(--ease); }
.nav__links a:hover { color: var(--espresso); }
.nav__cta {
  color: var(--mocha) !important; padding: .45rem 1.05rem; border-radius: 999px;
  border: 1px solid var(--border-2); font-weight: 500;
}
.nav__cta:hover { background: var(--tint); color: var(--mocha-dk) !important; }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .82rem 1.5rem; border-radius: 999px; font-weight: 500; font-size: .98rem;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s var(--ease), box-shadow .25s var(--ease), background .2s var(--ease);
}
.btn--primary { color: #fff; background: var(--mocha); box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--mocha-dk); transform: translateY(-2px); }
.btn--ghost { color: var(--espresso); border-color: var(--border-2); background: var(--surface); }
.btn--ghost:hover { background: var(--tint); transform: translateY(-2px); }

/* ---- Hero --------------------------------------------------------------- */
.hero { padding: clamp(3.5rem, 11vh, 7rem) 0 clamp(2.5rem, 7vh, 4.5rem); }
.hero__eyebrow {
  font-size: .9rem; color: var(--mocha); font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase; margin: 0 0 1.3rem;
}
.hero__eyebrow::before {
  content: ""; display: inline-block; width: 26px; height: 1px; background: var(--tan);
  vertical-align: middle; margin-right: .7rem;
}
.hero__title {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1.08; letter-spacing: -.015em; font-weight: 500;
  color: var(--espresso); margin: 0;
}
.hero__title .accent { color: var(--mocha); font-style: italic; font-weight: 500; }
.hero__lead { max-width: 60ch; color: var(--muted); font-size: clamp(1.05rem, 1.6vw, 1.2rem); margin: 1.6rem 0 0; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.2rem; }
.hero__meta {
  margin: 2.6rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--border);
  color: var(--faint); font-size: .9rem; letter-spacing: .01em;
}

/* ---- Section scaffolding ------------------------------------------------ */
.section { padding: clamp(3.5rem, 9vh, 6rem) 0; }
.section__head { margin-bottom: clamp(2.5rem, 5vw, 4rem); max-width: 30ch; }
.section__kicker {
  display: inline-block; font-size: .82rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--tan); margin-bottom: .9rem;
}
.section__title {
  font-family: var(--font-display); font-optical-sizing: auto;
  font-weight: 500; letter-spacing: -.01em; color: var(--espresso);
  font-size: clamp(1.8rem, 3.8vw, 2.7rem); line-height: 1.15; margin: 0;
}

/* ---- Work / project rows ------------------------------------------------ */
.work {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center; padding: clamp(2.5rem, 6vh, 4.5rem) 0;
  border-top: 1px solid var(--border);
}
.work:first-of-type { border-top: none; padding-top: 0; }
.work--reverse .work__media { order: 2; }
.work--top { align-items: start; }

.work__index { font-size: .9rem; color: var(--muted); margin: 0 0 .85rem; font-weight: 500; }
.work__title { font-family: var(--font-display); font-weight: 600; color: var(--espresso);
  font-size: clamp(1.7rem, 3.4vw, 2.3rem); line-height: 1.1; margin: 0; letter-spacing: -.01em; }
.work__subtitle { color: var(--tan); font-style: italic; font-family: var(--font-display);
  font-size: 1.1rem; margin: .35rem 0 1.1rem; }
.work__desc { color: var(--muted); margin: 0 0 1.4rem; }
.work__desc strong { color: var(--text); font-weight: 600; }

.status {
  display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .03em;
  padding: .16rem .55rem; border-radius: 999px; vertical-align: middle;
  text-transform: uppercase;
}
.status--live { color: #3f6b4c; background: #e6f0e7; }
.status--beta { color: var(--mocha); background: var(--tint); }
.status--dev  { color: #92642a; background: #f6ecda; }

.chips { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; padding: 0; margin: 0 0 1.5rem; }
.chips li {
  font-size: .8rem; color: var(--mocha-dk); padding: .3rem .7rem;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
}

.work__links { display: flex; flex-wrap: wrap; gap: 1.3rem; align-items: center; }
.link { font-size: .95rem; font-weight: 600; color: var(--mocha); transition: color .2s var(--ease); }
.link:hover { color: var(--mocha-dk); }
.link--muted { color: var(--faint); font-weight: 500; cursor: default; }
.link .arrow { display: inline-block; transition: transform .2s var(--ease); }
.link:hover .arrow { transform: translate(2px, -2px); }

/* ---- Screenshot frames -------------------------------------------------- */
.shot {
  margin: 0; border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow); transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.shot:hover { transform: translateY(-5px); box-shadow: 0 30px 60px -30px rgba(74,52,36,.55); }
.shot img { width: 100%; height: auto; }

.shot--browser .shot__bar {
  display: flex; align-items: center; gap: 7px; padding: 0 14px; height: 38px;
  background: #f3ece3; border-bottom: 1px solid var(--border);
}
.shot__bar i { width: 11px; height: 11px; border-radius: 50%; background: #d9c9b6; }
.shot__bar i:first-child { background: #d98a72; }
.shot__bar i:nth-child(2) { background: #e6c178; }
.shot__bar i:nth-child(3) { background: #a7c79a; }
.shot__bar em {
  margin-left: 10px; font-style: normal; font-size: .76rem; color: var(--faint);
  letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Inkwell secondary thumbnails — stacked full-width, shown uncropped */
.work__gallery { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 1rem; }
.shot--mini { border-radius: 12px; box-shadow: var(--shadow-sm); }
.shot--mini img { width: 100%; height: auto; display: block; }

/* Visit panel — replaces a screenshot for live projects */
.visit-panel {
  display: flex; flex-direction: column; justify-content: center; gap: .45rem;
  min-height: 300px; padding: clamp(2rem, 4vw, 3rem); text-align: left;
  border-radius: var(--radius); border: 1px solid var(--border);
  background:
    radial-gradient(130% 130% at 100% 0%, rgba(111,78,55,.12), transparent 58%),
    var(--surface);
  box-shadow: var(--shadow); color: var(--espresso);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.visit-panel:hover { transform: translateY(-5px); box-shadow: 0 30px 60px -30px rgba(74,52,36,.55); border-color: var(--border-2); }
.visit-panel__eyebrow { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--tan); font-weight: 600; }
.visit-panel__title { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2rem); font-weight: 600; line-height: 1.08; letter-spacing: -.01em; }
.visit-panel__cta { font-weight: 600; color: var(--mocha); font-size: 1.05rem; margin-top: .5rem; }
.visit-panel__cta .arrow { display: inline-block; transition: transform .2s var(--ease); }
.visit-panel:hover .visit-panel__cta .arrow { transform: translate(3px, -3px); }
.visit-panel__url { font-size: .85rem; color: var(--faint); }

/* ---- About -------------------------------------------------------------- */
.section--about { background: var(--tint); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.about .section__title { margin-bottom: 1.4rem; }
.lead-para { color: var(--text) !important; font-size: 1.15rem; }
.about__text p { color: var(--muted); margin: 0 0 1.1rem; }
.about__stack {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.6rem 1.7rem; box-shadow: var(--shadow-sm);
}
.about__stack h3 {
  margin: 0 0 1.1rem; font-family: var(--font-display); font-size: .8rem; color: var(--tan);
  font-weight: 600; text-transform: uppercase; letter-spacing: .1em;
}
.stack { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.stack li { font-size: .92rem; color: var(--text); padding-left: 1.2rem; position: relative; }
.stack li::before { content: ""; position: absolute; left: 0; top: .68em; width: 6px; height: 6px; border-radius: 50%; background: var(--mocha); }

/* ---- Contact ------------------------------------------------------------ */
.section--contact { text-align: center; }
.contact { display: flex; flex-direction: column; align-items: center; }
.contact .section__title { margin-bottom: 1rem; }
.contact__lead { color: var(--muted); max-width: 48ch; margin: 0; }

/* ---- Footer ------------------------------------------------------------- */
.footer { border-top: 1px solid var(--border); padding: 2.2rem 0; background: var(--surface); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer__brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 600; font-size: .95rem; color: var(--espresso); }
.footer__copy { color: var(--faint); font-size: .85rem; }

/* ---- Reveal-on-scroll --------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .shot:hover { transform: none; }
}

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 820px) {
  .nav__name { display: none; }
  .work { grid-template-columns: 1fr; gap: 1.8rem; }
  .work--reverse .work__media { order: 0; }
  .about { grid-template-columns: 1fr; gap: 1.8rem; }
}
