/* =================================================================
   Shady Arnaout — Portfolio site stylesheet
   Mobile-first, responsive.
   ================================================================= */

/* ---------- Font loading (local) ---------- */
@font-face { font-family: 'Avenir'; src: url('assets/font/avenir-lt-w01_35-light1475496.woff2') format('woff2'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Avenir'; src: url('assets/font/avenir-lt-w01_85-heavy1475544.woff2') format('woff2'); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'DIN Next'; src: url('assets/font/din-next-w01-light.woff2') format('woff2'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Lulo Clean'; src: url('assets/font/lulo-clean-w01-one-bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Helvetica LT'; src: url('assets/font/helvetica-w01-roman.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: 'Avenir', 'Helvetica LT', Helvetica, Arial, sans-serif;
  font-weight: 300;
  color: #ffffff;
  background: #050505;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}
img, video, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

/* ---------- Design tokens ---------- */
:root {
  --bg: #050505;
  --bg-alt: #0d0d0d;
  --fg: #ffffff;
  --fg-muted: #b3b3b3;
  --accent: #00D646;
  --accent-alt: #6030A0;
  --border: rgba(255,255,255,.08);
  --wrap: 1200px;
  --gap: clamp(24px, 5vw, 60px);
}

/* ---------- Utilities ---------- */
.container {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 60px);
}
.section {
  padding-block: clamp(60px, 10vw, 120px);
}
.section-num {
  font-family: 'Lulo Clean', sans-serif;
  color: var(--accent);
  font-size: clamp(20px, 3vw, 32px);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.section-title {
  font-family: 'Avenir', sans-serif;
  font-weight: 800;
  font-size: clamp(28px, 5vw, 48px);
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin-bottom: clamp(24px, 4vw, 48px);
}
.section-subtitle {
  font-family: 'DIN Next', sans-serif;
  font-weight: 300;
  letter-spacing: 0.18em;
  font-size: clamp(13px, 1.5vw, 18px);
  color: var(--fg-muted);
  text-transform: uppercase;
  margin-bottom: clamp(32px, 5vw, 60px);
}

/* ---------- Header / nav ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(5,5,5,.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: transform .3s ease;
}
.site-header.hidden { transform: translateY(-100%); }
.nav {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 14px clamp(20px, 4vw, 60px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.nav-logo img { width: 36px; height: 36px; }
.nav-list {
  list-style: none;
  display: flex;
  gap: clamp(20px, 3vw, 40px);
  align-items: center;
}
.nav-list a {
  font-family: 'DIN Next', sans-serif;
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg);
  padding: 8px 4px;
  transition: color .2s;
}
.nav-list a:hover, .nav-list a.active { color: var(--accent); }

/* Resume pill in nav */
.nav-list a.nav-cta {
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 8px 18px;
  border-radius: 999px;
  transition: background .2s, color .2s;
}
.nav-list a.nav-cta:hover { background: var(--accent); color: var(--bg); }

/* Hero CTA buttons */
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: 'DIN Next', sans-serif;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: 999px;
  transition: transform .15s ease, background .2s, color .2s, border-color .2s;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
}
.btn-primary:hover { background: #00b93b; border-color: #00b93b; }
.btn-ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid rgba(255,255,255,.4);
}
.btn-ghost:hover { border-color: var(--fg); background: rgba(255,255,255,.06); }

.nav-toggle {
  display: none;
  width: 36px;
  height: 36px;
  padding: 8px;
  z-index: 101;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--fg);
  margin: 4px 0;
  transition: transform .25s, opacity .25s;
}

/* Mobile nav */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-list {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5,5,5,.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    gap: 32px;
    transform: translateX(100%);
    transition: transform .3s ease;
    padding: 80px 20px;
  }
  .nav-list a { font-size: 20px; }
  body.nav-open .nav-list { transform: translateX(0); }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  body.nav-open { overflow: hidden; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  background:
    linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.65)),
    url('assets/img/general_hero.webp') center/cover no-repeat;
}
.hero-content {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 40px clamp(20px, 4vw, 60px);
  width: 100%;
}
.hero-eyebrow {
  font-family: 'DIN Next', sans-serif;
  letter-spacing: 0.28em;
  font-size: clamp(12px, 1.5vw, 16px);
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 16px;
}
.hero-title {
  font-family: 'Lulo Clean', 'Avenir', sans-serif;
  font-weight: 700;
  font-size: clamp(32px, 7vw, 80px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 64px;
}
.hero-title .dot { color: var(--accent); }
.hero-subtitle {
  font-family: 'DIN Next', sans-serif;
  font-weight: 300;
  letter-spacing: 0.28em;
  font-size: clamp(16px, 2.5vw, 28px);
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 40px;
}
.hero-bio {
  font-size: clamp(14px, 1.25vw, 16px);
  color: var(--fg);
  max-width: 640px;
  line-height: 1.7;
}
.hero-dot-decor {
  position: absolute;
  right: clamp(20px, 5vw, 80px);
  bottom: clamp(30px, 5vw, 60px);
  width: clamp(40px, 5vw, 60px);
  opacity: 0.7;
}

/* ---------- Skills (Professional) ---------- */
.skills {
  background: var(--bg-alt);
}
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: clamp(20px, 3vw, 32px);
  margin-top: 32px;
}
.skill-item {
  display: flex;
  align-items: center;
  gap: 16px;
}
.skill-name {
  font-family: 'DIN Next', sans-serif;
  font-size: 15px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  flex-shrink: 0;
  min-width: 180px;
}
.skill-bar {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.skill-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-alt));
  width: 0;
  transition: width 1.2s cubic-bezier(.4,0,.2,1);
  border-radius: 3px;
}
.skill-fill.in-view { width: var(--pct, 0%); }
.skill-pct {
  font-family: 'DIN Next', sans-serif;
  font-size: 13px;
  color: var(--fg-muted);
  flex-shrink: 0;
  min-width: 40px;
  text-align: right;
}
@media (max-width: 560px) {
  .skill-item { flex-wrap: wrap; }
  .skill-name { min-width: 0; width: 100%; margin-bottom: 4px; }
  .skill-bar { order: 3; width: 100%; flex-basis: 100%; }
}

/* ---------- Portfolio previews ---------- */
.portfolio-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: clamp(12px, 2vw, 20px);
  margin-top: 32px;
}
.portfolio-preview a {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg-alt);
  transition: transform .3s ease;
}
.portfolio-preview a:hover { transform: translateY(-4px); }
.portfolio-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.portfolio-preview a:hover img { transform: scale(1.05); }

.see-more {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: clamp(24px, 4vw, 40px);
  padding: 14px 28px;
  font-family: 'DIN Next', sans-serif;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  border: 1px solid rgba(255,255,255,.4);
  transition: transform .15s ease, background .2s, color .2s, border-color .2s;
}
.see-more:hover { border-color: var(--fg); background: rgba(255,255,255,.06); }
.see-more::after { content: '\2192'; }

/* ---------- Experience ---------- */
.experience {
  background: var(--bg);
}
.exp-list {
  display: grid;
  gap: clamp(32px, 5vw, 64px);
  margin-top: 32px;
}
.exp-item {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 3fr;
  gap: clamp(20px, 4vw, 60px);
  padding-block: clamp(24px, 4vw, 40px);
  border-top: 1px solid var(--border);
}
@media (max-width: 700px) {
  .exp-item { grid-template-columns: 1fr; }
}
.exp-meta { }
.exp-company {
  font-family: 'Avenir', sans-serif;
  font-weight: 800;
  font-size: clamp(18px, 2vw, 22px);
  margin-bottom: 4px;
  color: var(--fg);
}
.exp-dates {
  font-family: 'DIN Next', sans-serif;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.exp-role {
  font-family: 'DIN Next', sans-serif;
  font-size: clamp(14px, 1.4vw, 16px);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.exp-body ul {
  list-style: none;
  display: grid;
  gap: 12px;
}
.exp-body li {
  position: relative;
  padding-left: 22px;
  font-size: clamp(14px, 1.4vw, 16px);
  line-height: 1.7;
  color: var(--fg);
}
.exp-body li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- Contact ---------- */
.contact {
  background: var(--bg-alt);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  margin-top: 32px;
}
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}
.contact-info p {
  line-height: 1.8;
  margin-bottom: 24px;
  color: var(--fg);
}
.contact-info dl {
  display: grid;
  gap: 12px;
  font-family: 'DIN Next', sans-serif;
  letter-spacing: 0.06em;
}
.contact-info dt {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--fg-muted);
}
.contact-info dd {
  font-size: clamp(15px, 1.6vw, 17px);
  margin-bottom: 12px;
}
.contact-info a { color: var(--fg); border-bottom: 1px solid transparent; transition: border-color .2s, color .2s; }
.contact-info a:hover { color: var(--accent); border-color: var(--accent); }
.contact-info .social-bar a,
.contact-info .social-bar a:hover { border-bottom: 0; color: inherit; }

/* Social bar */
.social-bar {
  list-style: none;
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding: 0;
}
.social-bar a {
  position: relative;
  display: block;
  width: 34px;
  height: 34px;
  text-decoration: none;
}
.social-bar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  transition: opacity .25s ease;
}
.social-bar img.icon-hover { opacity: 0; }
.social-bar a:hover img.icon-default,
.social-bar a:focus-visible img.icon-default { opacity: 0; }
.social-bar a:hover img.icon-hover,
.social-bar a:focus-visible img.icon-hover { opacity: 1; }

.contact-form {
  display: grid;
  gap: 16px;
}
.contact-form label {
  display: block;
  font-family: 'DIN Next', sans-serif;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 6px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  color: var(--fg);
  font: inherit;
  border-radius: 4px;
  transition: border-color .2s;
  -webkit-appearance: none;
  appearance: none;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.contact-form textarea {
  min-height: 140px;
  resize: vertical;
  font-family: inherit;
}
.contact-form button[type="submit"] {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--accent);
  color: var(--bg);
  font-family: 'DIN Next', sans-serif;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 13px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  transition: transform .15s ease, background .2s, border-color .2s;
}
.contact-form button[type="submit"]:hover:not(:disabled) { background: #00b93b; border-color: #00b93b; }
.contact-form button[type="submit"]:disabled { opacity: 0.6; cursor: wait; }
#form-status {
  display: none;
  padding: 14px 18px;
  border-radius: 4px;
  font-size: 14px;
  text-align: center;
}
#form-status.show { display: block; }
#form-status.ok { background: rgba(0,214,70,.15); color: var(--accent); border: 1px solid rgba(0,214,70,.4); }
#form-status.err { background: rgba(255,120,120,.15); color: #ff7878; border: 1px solid rgba(255,120,120,.4); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg);
  padding: 40px 20px;
  text-align: center;
  border-top: 1px solid var(--border);
  font-family: 'DIN Next', sans-serif;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

/* ---------- Portfolio page ---------- */
.page-hero {
  padding: 140px 0 60px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
}
.page-hero .section-num {
  display: inline-block;
  margin-bottom: 12px;
}
.page-hero h1 {
  font-family: 'Avenir', sans-serif;
  font-weight: 800;
  font-size: clamp(36px, 6vw, 64px);
  margin-bottom: 12px;
}
.page-hero p {
  color: var(--fg-muted);
  max-width: 600px;
  margin: 0 auto;
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.6;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: clamp(12px, 1.5vw, 20px);
  padding-block: clamp(40px, 6vw, 80px);
}
.gallery-item {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg-alt);
  cursor: pointer;
}
.gallery-item img,
.gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease, opacity .3s ease;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item .play-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  background: rgba(0,214,70,.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s;
  z-index: 2;
  pointer-events: none;
}
.gallery-item .play-badge svg {
  width: 16px;
  height: 16px;
  fill: var(--bg);
  margin-left: 2px;
}
.gallery-item.is-playing .play-badge { display: none; }
.gallery-item.is-playing img { display: none; }
.gallery-item .caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 16px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.75));
  color: var(--fg);
  font-family: 'DIN Next', sans-serif;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .3s ease, transform .3s ease;
  pointer-events: none;
}
.gallery-item:hover .caption {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.94);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  transition: opacity .25s ease;
  cursor: zoom-out;
}
.lightbox.open {
  display: flex;
  opacity: 1;
}
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  cursor: default;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  color: var(--fg);
  font-size: 28px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.lightbox-close:hover { background: rgba(255,255,255,.2); }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Accessibility: respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
