/* =========================================================
   ayman — PORTFOLIO
   Palette: charcoal, warm white, muted sage
   ========================================================= */
:root {
  color-scheme: dark;
  --bg: #111412;
  --bg-soft: #171b18;
  --panel: #1c211d;
  --text: #f0f1e9;
  --muted: #a4aaa0;
  --subtle: #70796f;
  --accent: #b7c9a8;
  --accent-strong: #d0dfbf;
  --line: rgba(230, 237, 224, .13);
  --font-body: "DM Sans", sans-serif;
  --font-display: "Manrope", sans-serif;
  --max-width: 1180px;
  --ease: cubic-bezier(.2, .75, .25, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: .18;
  background-image: radial-gradient(rgba(235,240,230,.18) .6px, transparent .6px);
  background-size: 5px 5px;
}
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button, input, textarea { font: inherit; }
::selection { color: var(--bg); background: var(--accent); }
#particles-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: .48;
}
.site-header, main, .site-footer { position: relative; z-index: 1; }
.site-header {
  width: min(calc(100% - 64px), var(--max-width));
  height: 92px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  font: 800 1.5rem/1 var(--font-display);
  letter-spacing: -.09em;
}
.brand span, .portrait-placeholder span { color: var(--accent); }
.site-nav { display: flex; align-items: center; gap: clamp(22px, 3.4vw, 48px); }
.site-nav a {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .045em;
  transition: color .25s ease;
}
.site-nav a:hover, .site-nav a.active { color: var(--accent-strong); }
.site-nav .nav-contact { color: var(--text); }
.nav-contact span { color: var(--accent); padding-left: 5px; }
.menu-toggle { display: none; }

.hero {
  width: min(calc(100% - 64px), var(--max-width));
  min-height: min(790px, calc(100svh - 92px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  position: relative;
  isolation: isolate;
  padding: 74px 0 105px;
}
.hero-grid {
  position: absolute;
  z-index: -1;
  inset: 0 -9vw;
  opacity: .16;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
  pointer-events: none;
}
.hero-copy { max-width: 650px; padding: 0 0 30px; }
.eyebrow, .section-kicker {
  color: var(--accent);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.eyebrow { display: flex; align-items: center; gap: 10px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgba(183,201,168,.1); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--font-display); }
h1 {
  font-size: clamp(3.2rem, 6.7vw, 6.7rem);
  line-height: .99;
  letter-spacing: -.075em;
  font-weight: 600;
  margin: 27px 0 28px;
}
h1 span, h2 span { color: var(--accent); }
.hero-description { max-width: 470px; color: var(--muted); font-size: 1.04rem; line-height: 1.9; }
.hero-actions { display: flex; align-items: center; gap: 28px; margin-top: 34px; }
.button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 0 20px;
  font-size: .8rem;
  font-weight: 700;
  transition: transform .25s var(--ease), background .25s ease, border-color .25s ease;
}
.button:hover { transform: translateY(-3px); }
.button-primary { background: var(--accent); color: #172016; }
.button-primary:hover { background: var(--accent-strong); }
.text-link { font-size: .82rem; font-weight: 600; color: var(--muted); transition: color .2s ease; }
.text-link span { color: var(--accent); padding-left: 7px; }
.text-link:hover { color: var(--text); }

.hero-visual { min-height: 490px; position: relative; display: grid; place-items: center; }
.portrait-frame {
  width: min(77%, 360px);
  height: 435px;
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #30382e, #1a1f1b 65%);
  border: 1px solid rgba(183,201,168,.28);
  overflow: hidden;
  box-shadow: 0 30px 100px rgba(0,0,0,.28);
}
.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(240,241,233,.12);
  pointer-events: none;
}
.hero-img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform .7s var(--ease), filter .5s ease;
}
.portrait-frame:hover .hero-img { transform: scale(1.035); }
.portrait-frame.image-missing .hero-img { display: none; }
.portrait-placeholder {
  position: absolute;
  font: 800 clamp(4rem, 10vw, 7rem)/1 var(--font-display);
  letter-spacing: -.1em;
  color: rgba(240,241,233,.75);
}
.orbit { position: absolute; border: 1px solid rgba(183,201,168,.2); border-radius: 50%; pointer-events: none; }
.orbit-one { width: 450px; height: 450px; }
.orbit-two { width: 530px; height: 530px; border-style: dashed; opacity: .45; }
.floating-note {
  position: absolute;
  z-index: 3;
  background: rgba(25,30,26,.88);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 35px rgba(0,0,0,.18);
}
.note-top { top: 70px; right: -4px; padding: 14px 18px; display: grid; gap: 2px; }
.note-label { font-size: .6rem; color: var(--accent); letter-spacing: .14em; }
.note-top strong { font: 600 .88rem var(--font-display); }
.note-bottom { bottom: 45px; left: -2px; padding: 12px 15px; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .72rem; }
.mini-line { width: 23px; height: 1px; background: var(--accent); }
.visual-index { position: absolute; bottom: 2px; right: 0; font-size: .61rem; color: var(--subtle); letter-spacing: .15em; }
.hero-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  border-top: 1px solid var(--line);
  min-height: 65px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--subtle);
  font-size: .61rem;
  font-weight: 700;
  letter-spacing: .1em;
}
.hero-bottom i { color: var(--accent); font-style: normal; padding: 0 5px; }
.hero-bottom a { transition: color .2s ease; }
.hero-bottom a:hover { color: var(--accent); }

.content-section {
  width: min(calc(100% - 64px), var(--max-width));
  margin: 0 auto;
  padding: 135px 0;
  display: grid;
  grid-template-columns: .72fr 1.28fr;
  gap: 8%;
  border-top: 1px solid var(--line);
}
.section-kicker { padding-top: 10px; white-space: nowrap; }
.section-content h2, .contact-content h2 {
  font-size: clamp(2.5rem, 4.6vw, 4.7rem);
  line-height: 1.08;
  letter-spacing: -.07em;
  font-weight: 600;
  margin: 0 0 30px;
}
.large-copy { max-width: 680px; color: var(--text); font-size: clamp(1.12rem, 2vw, 1.45rem); line-height: 1.7; }
.section-content > p:not(.large-copy), .section-intro { max-width: 680px; color: var(--muted); font-size: .97rem; line-height: 1.9; }
.skill-list { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 30px; }
.skill-list span {
  padding: 8px 12px;
  color: var(--muted);
  font-size: .72rem;
  border: 1px solid var(--line);
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.skill-list span:hover { color: var(--accent-strong); border-color: rgba(183,201,168,.5); background: rgba(183,201,168,.06); }

.timeline { margin-top: 36px; border-top: 1px solid var(--line); }
.timeline-item {
  display: grid;
  grid-template-columns: 155px 1fr;
  gap: 24px;
  padding: 27px 0;
  border-bottom: 1px solid var(--line);
  transition: padding .25s var(--ease);
}
.timeline-item:hover { padding-left: 8px; }
.timeline-year { color: var(--accent); font-size: .68rem; font-weight: 700; letter-spacing: .07em; padding-top: 5px; }
.timeline-detail h3 { margin: 0 0 4px; font-size: 1.1rem; font-weight: 600; letter-spacing: -.025em; }
.timeline-detail p { color: var(--muted); margin: 0 0 10px; font-size: .87rem; }
.timeline-tag { color: var(--subtle); font-size: .58rem; letter-spacing: .12em; }

.interest-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 38px; }
.interest-card {
  position: relative;
  min-height: 240px;
  padding: 22px 19px;
  background: linear-gradient(145deg, rgba(255,255,255,.035), rgba(255,255,255,.008));
  border: 1px solid var(--line);
  transition: transform .3s var(--ease), border-color .3s ease, background .3s ease;
}
.interest-card:hover { transform: translateY(-6px); border-color: rgba(183,201,168,.4); background: rgba(183,201,168,.045); }
.card-number { font-size: .59rem; color: var(--subtle); letter-spacing: .12em; }
.card-icon { margin: 24px 0 15px; color: var(--accent); font-size: 1.6rem; }
.interest-card h3 { font-size: .97rem; margin: 0 0 9px; letter-spacing: -.025em; }
.interest-card p { color: var(--muted); font-size: .78rem; line-height: 1.75; margin: 0; }
.card-arrow { position: absolute; top: 19px; right: 18px; color: var(--subtle); transition: color .2s ease, transform .2s ease; }
.interest-card:hover .card-arrow { color: var(--accent); transform: translate(2px,-2px); }

.contact-section {
  position: relative;
  overflow: hidden;
  width: min(calc(100% - 64px), var(--max-width));
  margin: 0 auto 100px;
  padding: 70px 8%;
  display: grid;
  grid-template-columns: .72fr 1.28fr;
  gap: 8%;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}
.contact-orb { position: absolute; width: 370px; height: 370px; border: 1px solid rgba(183,201,168,.15); border-radius: 50%; right: -130px; bottom: -210px; box-shadow: 0 0 0 40px rgba(183,201,168,.025), 0 0 0 80px rgba(183,201,168,.02); pointer-events: none; }
.contact-content { position: relative; z-index: 1; }
.contact-content .eyebrow { margin-bottom: 20px; }
.contact-content h2 { margin-bottom: 18px; }
.contact-copy { max-width: 440px; color: var(--muted); font-size: .95rem; margin-bottom: 28px; }
.contact-hint { margin: 13px 0 0; color: var(--subtle); font-size: .68rem; }
.site-footer {
  width: min(calc(100% - 64px), var(--max-width));
  margin: 0 auto;
  padding: 28px 0 35px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
}
.site-footer p, .site-footer > span { margin: 0; color: var(--subtle); font-size: .65rem; }
.site-footer > span { letter-spacing: .06em; }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .75s var(--ease), transform .75s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr .8fr; gap: 10px; }
  h1 { font-size: clamp(3.2rem, 8vw, 5.5rem); }
  .hero-visual { min-height: 430px; }
  .portrait-frame { height: 365px; width: 80%; }
  .orbit-one { width: 370px; height: 370px; }
  .orbit-two { width: 440px; height: 440px; }
  .note-top { right: -4px; }
  .content-section, .contact-section { grid-template-columns: 1fr; gap: 35px; }
  .interest-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  html { scroll-padding-top: 70px; }
  .site-header, .hero, .content-section, .contact-section, .site-footer { width: calc(100% - 36px); }
  .site-header { height: 72px; }
  .menu-toggle {
    width: 42px; height: 42px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px;
    background: transparent; border: 1px solid var(--line); color: var(--text); cursor: pointer;
  }
  .menu-toggle span { display: block; width: 17px; height: 1px; background: var(--text); transition: transform .2s ease; }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .site-nav {
    position: absolute; top: 61px; left: 0; right: 0; padding: 15px;
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    background: #191e1a; border: 1px solid var(--line); box-shadow: 0 18px 35px rgba(0,0,0,.25);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 13px 8px; }
  .hero { min-height: auto; padding: 72px 0 88px; grid-template-columns: 1fr; gap: 15px; }
  .hero-copy { padding: 0; }
  h1 { font-size: clamp(3.2rem, 15vw, 5rem); margin: 23px 0; }
  .hero-description { font-size: .93rem; }
  .hero-actions { gap: 18px; flex-wrap: wrap; }
  .hero-visual { min-height: 390px; margin-top: 20px; }
  .portrait-frame { height: 340px; width: min(72%, 300px); }
  .orbit-one { width: 330px; height: 330px; }
  .orbit-two { width: 390px; height: 390px; }
  .note-top { top: 55px; right: 0; }
  .note-bottom { bottom: 28px; left: 0; }
  .visual-index { bottom: 0; }
  .hero-bottom { min-height: 58px; flex-wrap: wrap; justify-content: space-between; gap: 3px 12px; padding: 12px 0; font-size: .53rem; }
  .hero-bottom > span:nth-child(2) { display: none; }
  .content-section { padding: 82px 0; gap: 25px; }
  .section-content h2, .contact-content h2 { font-size: clamp(2.6rem, 11vw, 3.7rem); }
  .large-copy { font-size: 1.1rem; }
  .timeline-item { grid-template-columns: 1fr; gap: 7px; padding: 21px 0; }
  .timeline-detail h3 { font-size: 1rem; }
  .interest-grid { grid-template-columns: 1fr; }
  .interest-card { min-height: 195px; padding: 20px; }
  .card-icon { margin: 17px 0 12px; }
  .contact-section { margin-bottom: 65px; padding: 38px 24px; gap: 24px; }
  .site-footer { flex-wrap: wrap; padding: 23px 0; }
  .site-footer p { order: 3; width: 100%; }
  .site-footer > span { font-size: .55rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
