/* Shady Thabet — Portfolio */
:root {
  --bg: #12140f;
  --bg-2: #1a1e16;
  --surface: #23281e;
  --text: #f3efe6;
  --muted: #a8ad9c;
  --line: rgba(243, 239, 230, 0.12);
  --accent: #e07a3a;
  --accent-2: #c9d67a;
  --olive: #5c6640;
  --radius: 18px;
  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(224, 122, 58, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(92, 102, 64, 0.35), transparent 50%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(201, 214, 122, 0.08), transparent 55%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(255, 255, 255, 0.015) 2px,
      rgba(255, 255, 255, 0.015) 3px
    );
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.wrap {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

/* Nav */
.nav {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(18, 20, 15, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s;
}

.nav.is-scrolled {
  border-bottom-color: var(--line);
}

.nav-inner {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.15rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  overflow: visible;
  max-width: none;
}

.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  object-fit: cover;
  background: #1a1c16;
}

.logo em {
  font-style: normal;
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  font-size: 0.92rem;
  color: var(--muted);
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent);
  color: #1a120c;
  font-weight: 700;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  font-size: 0.88rem;
}

.nav-mobile-resume {
  display: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--text);
  width: 42px;
  height: 42px;
  border-radius: 10px;
  cursor: pointer;
  place-items: center;
  padding: 0;
  flex-shrink: 0;
}

.nav-toggle-bars {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  position: relative;
  border-radius: 1px;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}

.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

/* Hero */
.hero {
  min-height: auto;
  display: grid;
  align-items: center;
  padding: 6rem 0 3rem;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-kicker {
  color: var(--accent-2);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin-bottom: 1rem;
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.1s forwards;
}

.hero-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.2rem, 9vw, 6.4rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  opacity: 0;
  animation: rise 1s var(--ease) 0.2s forwards;
}

.hero-name em {
  font-style: normal;
  color: var(--accent);
}

.hero-lead {
  margin-top: 1.35rem;
  max-width: 34ch;
  color: var(--muted);
  font-size: 1.12rem;
  opacity: 0;
  animation: rise 1s var(--ease) 0.35s forwards;
}

.hero-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  opacity: 0;
  animation: rise 1s var(--ease) 0.5s forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s, border-color 0.25s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--accent);
  color: #1a120c;
}

.btn-ghost {
  border-color: var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.hero-panel {
  position: relative;
  border-radius: calc(var(--radius) + 8px);
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 3 / 4;
  max-height: 560px;
  background: var(--surface);
  opacity: 0;
  animation: rise 1.1s var(--ease) 0.4s forwards;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.hero-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(18, 20, 15, 0.75), transparent 45%);
}

.hero-badge {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  z-index: 2;
  background: rgba(18, 20, 15, 0.82);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  font-size: 0.85rem;
}

.hero-badge strong {
  display: block;
  font-family: var(--font-display);
}

/* Sections */
section {
  padding: 5.5rem 0;
  position: relative;
  z-index: 1;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.section-head p {
  color: var(--muted);
  max-width: 36ch;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}

/* Work */
.work-featured {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.work-card {
  display: block;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s;
}

.work-card:hover {
  transform: translateY(-4px);
  border-color: rgba(224, 122, 58, 0.45);
}

.work-card .media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0d0f0b;
  position: relative;
}

.work-card .media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.6s var(--ease);
}

.work-card:hover .media img {
  transform: scale(1.04);
}

.work-card .body {
  padding: 1.15rem 1.25rem 1.35rem;
}

.work-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}

.tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-2);
  border: 1px solid rgba(201, 214, 122, 0.25);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

.work-card h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.work-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

/* Live status (server-refreshed) */
.live-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.1rem;
}

.live-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

.live-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.live-card .shot {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0d0f0a;
}

.live-card .shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.live-card .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
}

.live-card .meta strong {
  font-family: var(--font-display);
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}

.live-state {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(201, 214, 122, 0.16);
}

.live-dot.down {
  background: #e05555;
  box-shadow: 0 0 0 3px rgba(224, 85, 85, 0.16);
}

#liveUpdated {
  color: var(--accent-2);
}

/* Creative */
.creative-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.video-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  min-height: 280px;
  display: flex;
  flex-direction: column;
  color: inherit;
}

a.video-fallback:hover {
  border-color: rgba(224, 122, 58, 0.45);
  transform: translateY(-3px);
  transition: transform 0.35s var(--ease), border-color 0.35s;
}

.video-card iframe {
  width: 100%;
  flex: 1;
  min-height: 320px;
  border: 0;
  background: #000;
}

.video-card .cap {
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.creative-note {
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.creative-note a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.skill-block {
  padding: 1.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(35, 40, 30, 0.9), rgba(18, 20, 15, 0.4));
}

.skill-block h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 0.65rem;
}

.skill-block ul {
  list-style: none;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.95rem;
}

.skill-block li::before {
  content: "→ ";
  color: var(--accent);
}

/* Experience */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 2px solid var(--line);
  margin-left: 0.5rem;
}

.tl-item {
  padding: 0 0 1.75rem 1.5rem;
  position: relative;
}

.tl-item::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(224, 122, 58, 0.2);
}

.tl-item h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.tl-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.25rem 0 0.55rem;
}

.tl-item ul {
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: start;
}

.about-copy p {
  color: var(--muted);
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.stat {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: -0.03em;
}

.stat span {
  color: var(--muted);
  font-size: 0.85rem;
}

.edu-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: var(--bg-2);
}

.edu-logo {
  width: 100%;
  max-width: 220px;
  height: auto;
  object-fit: contain;
  background: #ffffff;
  border-radius: 14px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
}

.edu-card h3 {
  font-family: var(--font-display);
  margin-bottom: 0.5rem;
}

.edu-card p {
  color: var(--muted);
}

/* Contact */
.contact {
  padding-bottom: 6rem;
}

.contact-panel {
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid var(--line);
  padding: clamp(1.75rem, 4vw, 3rem);
  background:
    linear-gradient(135deg, rgba(224, 122, 58, 0.12), transparent 40%),
    linear-gradient(225deg, rgba(92, 102, 64, 0.35), var(--bg-2));
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
}

.contact-panel h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 0.75rem;
}

.contact-panel p {
  color: var(--muted);
  max-width: 40ch;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.contact-links a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  transition: border-color 0.25s, transform 0.25s var(--ease);
}

.contact-links a:hover {
  border-color: var(--accent);
  transform: translateX(4px);
}

.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.1rem;
  margin-top: 1.15rem;
  font-size: 0.92rem;
}

.social-row a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.social-row a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.social-row--footer {
  margin-top: 0;
}

footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.88rem;
  position: relative;
  z-index: 1;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Floating WhatsApp */
.wa-float {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  height: 56px;
  padding: 0 16px;
  border-radius: 999px;
  background: #25d366;
  color: #0f2716;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.wa-float svg {
  width: 28px;
  height: 28px;
  fill: #fff;
  flex: none;
}

.wa-float-label {
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.wa-float:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.48);
}

.wa-float:active {
  transform: translateY(0);
}

.wa-float:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

@media (max-width: 1023px) {
  .wa-float {
    width: 56px;
    padding: 0;
    justify-content: center;
  }

  .wa-float-label {
    display: none;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .work-featured,
  .about-grid,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .work-grid,
  .creative-grid,
  .skills-grid,
  .live-grid,
  #lata {
    grid-template-columns: 1fr !important;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(18, 20, 15, 0.96);
    flex-direction: column;
    padding: 1rem 1.25rem 1.25rem;
    border-bottom: 1px solid var(--line);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links.is-open .nav-mobile-resume {
    display: block;
    margin-top: 0.5rem;
    color: var(--accent);
    font-weight: 700;
  }

  .nav-toggle {
    display: grid;
  }

  .nav-cta {
    display: none;
  }

  .hero {
    padding: 6rem 0 2.5rem;
  }

  .hero-panel {
    aspect-ratio: 4 / 3;
    max-height: 420px;
  }

  .stat-row {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}
