/* ==========================================================
   Alaa Odat — page sections
   ========================================================== */

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 70% 45%, transparent 30%, rgba(var(--bg-rgb), 0.85) 85%),
    linear-gradient(to top, var(--bg) 2%, transparent 35%);
}
.hero-content { position: relative; z-index: 2; padding-top: 110px; padding-bottom: 6vh; pointer-events: none; }
.hero-content a { pointer-events: auto; }

.hero-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(64px, min(15vw, 22vh), 230px);
  line-height: 0.88;
  letter-spacing: -0.045em;
  margin-bottom: 36px;
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero-title .line:last-child { padding-left: 0.6em; }

.hero-role {
  display: flex;
  align-items: center; /* baseline alignment breaks on the clipped (overflow: hidden) word box */
  gap: 14px;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.5;
  margin-bottom: 22px;
}
.hero-role-label { color: var(--ink-2); height: 1.5em; }
.hero-role-words {
  position: relative;
  display: inline-block;
  height: 1.5em;
  line-height: inherit;
  overflow: hidden;
  min-width: 24ch;
  padding-right: 0.3em;
}
.hero-role-words span {
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
  font-family: var(--serif);
  font-style: italic;
  color: var(--brass);
  transform: translateY(110%);
}
.hero-role-words span:first-child { transform: none; }

.hero-lead { max-width: 440px; color: var(--ink-2); font-size: 15px; }

.hero-footer {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  padding-bottom: 32px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.scroll-cue { display: inline-flex; align-items: center; gap: 14px; }
.scroll-line {
  position: relative;
  width: 1px;
  height: 36px;
  background: var(--line);
  overflow: hidden;
}
.scroll-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--brass);
  animation: scroll-line 2.2s var(--ease) infinite;
}
@keyframes scroll-line {
  0% { transform: translateY(-100%); }
  60%, 100% { transform: translateY(100%); }
}
.socials { display: flex; gap: 28px; }
.socials a:hover { color: var(--brass); }

/* ---------- Marquee ---------- */

.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 26px 0;
  overflow: hidden;
  white-space: nowrap;
}
.marquee-track { display: inline-flex; align-items: center; gap: 40px; will-change: transform; }
.marquee span {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(28px, 4vw, 54px);
  letter-spacing: -0.02em;
}
.marquee span:nth-of-type(even) { font-style: italic; color: transparent; -webkit-text-stroke: 1px var(--ink-2); }
.marquee i { font-style: normal; color: var(--brass); font-size: 20px; }

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(40px, 7vw, 120px);
  align-items: start;
}
.about-media { position: sticky; top: 110px; }
.about-img-wrap {
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: 2px;
  clip-path: inset(100% 0 0 0);
}
.about-img-wrap img {
  width: 100%;
  height: 120%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  transform: scale(1.25);
}
.about-media figcaption {
  margin-top: 16px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.about-media figcaption span { color: var(--brass); }
.about-body .section-title { font-size: clamp(32px, 4vw, 58px); margin-bottom: 40px; }
.about-text { display: grid; gap: 20px; color: var(--ink-2); max-width: 620px; margin-bottom: 64px; }

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
}
.stat { padding: 28px 24px 28px 0; border-bottom: 1px solid var(--line); }
.stat:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--line); }
.stat dt {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1;
  color: var(--ink);
  margin-bottom: 12px;
}
.stat dd { font-size: 13px; color: var(--ink-3); line-height: 1.5; }

/* ---------- Resume ---------- */

.section-head { margin-bottom: clamp(48px, 7vw, 96px); }

.resume { background: var(--bg-2); }
.resume-grid { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(48px, 8vw, 140px); }
.col-title {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 32px;
}
.timeline { position: relative; padding-left: 40px; }
.timeline .col-title:not(:first-of-type) { margin-top: 64px; }
.timeline-rail {
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 0;
  width: 1px;
  background: var(--line);
}
.timeline-progress {
  position: absolute;
  inset: 0;
  background: linear-gradient(var(--brass), var(--brass-2));
  transform-origin: top;
  transform: scaleY(0);
}
.tl-item { position: relative; padding-bottom: 44px; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -44px;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 1px solid var(--brass);
}
.tl-date { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass); }
.tl-item h4 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.2;
  margin: 8px 0 4px;
}
.tl-org { color: var(--ink-2); font-size: 15px; }
.tl-points { margin-top: 18px; display: grid; gap: 8px; color: var(--ink-2); font-size: 14.5px; }
.tl-points li { position: relative; padding-left: 20px; }
.tl-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.8em;
  width: 10px;
  height: 1px;
  background: var(--ink-3);
}

.skills { align-self: start; position: sticky; top: 120px; }
.skill-group + .skill-group { margin-top: 48px; }
.skill-group-title { font-family: var(--serif); font-style: italic; font-size: 24px; margin-bottom: 18px; }
.skill { margin-bottom: 22px; }
.skill-row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 10px; }
.skill-row b { font-weight: 400; color: var(--brass); font-variant-numeric: tabular-nums; }
.skill-bar { height: 2px; background: var(--line); overflow: hidden; }
.skill-bar span {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--brass), var(--brass-2));
  transform-origin: left;
  transform: scaleX(0);
}

/* ---------- Contact ---------- */

.contact { text-align: left; }
.contact-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(44px, 8vw, 128px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  max-width: 13ch;
  margin-bottom: 48px;
}
.contact-mail {
  display: inline-flex;
  gap: 12px;
  font-size: clamp(20px, 2.6vw, 34px);
  border-bottom: 1px solid var(--brass);
  padding-bottom: 6px;
  margin-bottom: 96px;
  transition: color 0.3s;
}
.contact-mail:hover { color: var(--brass); }
.contact-grid { display: grid; grid-template-columns: 7fr 4fr; gap: clamp(48px, 8vw, 140px); }

.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 36px 28px; }
.field { position: relative; }
.field-wide { grid-column: 1 / -1; }
.field input,
.field textarea {
  width: 100%;
  padding: 14px 0 12px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font: inherit;
  resize: vertical;
  transition: border-color 0.3s;
}
.field input:focus,
.field textarea:focus { outline: none; border-color: var(--brass); }
.field label {
  position: absolute;
  left: 0;
  top: 14px;
  color: var(--ink-3);
  pointer-events: none;
  transform-origin: left;
  transition: transform 0.4s var(--ease), color 0.3s;
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label {
  transform: translateY(-26px) scale(0.78);
  color: var(--brass);
}
.form-actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.contact-feedback { font-size: 14px; color: var(--ink-2); }
.contact-feedback.is-error { color: var(--error); }

.contact-info { display: grid; gap: 28px; align-content: start; }
.contact-info li { display: grid; gap: 4px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.contact-info span { font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); }
.contact-info a:hover { color: var(--brass); }

/* ---------- Footer ---------- */

.footer {
  display: flex;
  justify-content: space-between;
  padding-top: 32px;
  padding-bottom: 32px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-3);
}
.to-top:hover { color: var(--brass); }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .about-grid,
  .resume-grid,
  .contact-grid { grid-template-columns: 1fr; }
  .about-media { position: relative; top: 0; max-width: 440px; }
  .skills { position: relative; top: 0; }
}

@media (max-width: 640px) {
  .hero-footer .socials { display: none; }
  .hero-title .line:last-child { padding-left: 0.3em; }
  .stats { grid-template-columns: 1fr; }
  .stat, .stat:nth-child(even) { padding: 22px 0; border-left: 0; }
  .contact-form { grid-template-columns: 1fr; }
}
