/* ==========================================
   Lee Hammoud Portfolio — Styles
   No framework. Custom CSS with variables.
   ========================================== */

:root {
  --bg: #08080c;
  --bg-card: #111116;
  --bg-card-hover: #18181f;
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --text: #e4e4e7;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent: #7c6aef;
  --accent-soft: rgba(124, 106, 239, 0.12);
  --link: #818cf8;
  --radius: 12px;
  --radius-lg: 20px;
  --max-w: 1200px;
  --nav-h: 60px;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--text-muted) transparent;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover { color: var(--accent); }

img {
  display: block;
  max-width: 100%;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }

/* --- Wave Canvas --- */
#wave-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1rem, 4vw, 3rem);
  transition: background 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
  overflow: hidden;
}

.nav.scrolled {
  background: rgba(8, 8, 12, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-color: var(--border);
}

.nav__logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text);
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav__links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav__links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.nav__links a:hover { color: var(--text); }

/* --- Hero --- */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
  max-width: var(--max-w);
  margin: 0 auto;
}

.hero__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text);
}

.hero__title span {
  display: block;
  background: linear-gradient(135deg, var(--accent), #a78bfa, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  margin-top: 1.5rem;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.7;
}

.hero__tags {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero__tag {
  padding: 0.375rem 0.875rem;
  border-radius: 100px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 1px solid rgba(124, 106, 239, 0.18);
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* --- Section common --- */
.section {
  position: relative;
  z-index: 1;
  padding: clamp(4rem, 8vw, 7rem) clamp(1.5rem, 4vw, 3rem);
  max-width: var(--max-w);
  margin: 0 auto;
}

.section__label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* --- Stats --- */
.stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stat {
  background: var(--bg);
  padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1rem, 2vw, 2rem);
  text-align: center;
}

.stat__number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.stat__label {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* --- About --- */
.about__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  margin-top: 2rem;
}

.about__text {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.about__text p + p { margin-top: 1.25rem; }

.about__expertise {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-content: flex-start;
}

.about__skill {
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: border-color 0.3s, color 0.3s;
}

.about__skill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* --- Projects Grid --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.card {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
  cursor: default;
}

.card:hover { border-color: var(--border-hover); }

.card__image {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0d0d12;
}

.card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.card:hover .card__image img { transform: scale(1.04); }

.card__image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to top, var(--bg-card), transparent);
  pointer-events: none;
}

.card__tag {
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.card__tag--jam { color: #34d399; }
.card__tag--gamejam { color: #34d399; }
.card__tag--personal { color: #a1a1aa; }

.card__body { padding: 1.25rem; }

.card__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card__role {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  margin-top: 0.375rem;
}

.card__meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.card__desc {
  font-size: 0.825rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 0.75rem;
}

.card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--border);
}

.card__links {
  display: flex;
  gap: 0.75rem;
}

.card__link {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
}

.card__link:hover { color: var(--accent); }

.card__breakdown-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.375rem 0.875rem;
  border-radius: 100px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  font-family: inherit;
}

.card__breakdown-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* --- Notables --- */
.notables-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.notable {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color 0.3s;
}

.notable:hover {
  border-color: var(--border-hover);
}

.notable__link-wrap {
  display: block;
  color: inherit;
  text-decoration: none;
}

.notable__link-wrap:hover { color: inherit; }

.notable__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0d0d12;
}

.notable__thumb img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.notable:hover .notable__thumb img {
  transform: scale(1.04);
}

.notable__thumb::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to top, var(--bg-card), transparent);
  pointer-events: none;
}

.notable__info {
  padding: 1.25rem;
}

.notable__tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.625rem;
}

.notable__tag--talk {
  background: rgba(96, 165, 250, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.2);
}

.notable__tag--press {
  background: rgba(52, 211, 153, 0.12);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.2);
}

.notable__tag--award {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.notable__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.notable__subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.notable__cta {
  display: inline-block;
  margin-top: 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
  transition: opacity 0.2s;
}

.notable__link-wrap:hover .notable__cta {
  opacity: 0.7;
}

/* --- Modal --- */
.modal {
  border: none;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  color: var(--text);
  width: min(900px, 90vw);
  max-height: 85vh;
  padding: 0;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-card);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  z-index: 10;
}

.modal__title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1rem;
}

.modal__close {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.8rem;
  padding: 0.375rem 0.875rem;
  border-radius: 100px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s, color 0.2s;
}

.modal__close:hover {
  border-color: var(--text-secondary);
  color: var(--text);
}

.modal__body {
  padding: 1.5rem;
  overflow-y: auto;
  max-height: calc(85vh - 60px);
  line-height: 1.7;
  color: var(--text-secondary);
}

/* --- Contact --- */
.contact__grid {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.contact__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.contact__link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* --- Footer --- */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
}

/* --- GSAP reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .notables-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .about__content { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .projects-grid { grid-template-columns: 1fr; }
  .notables-grid { grid-template-columns: 1fr; }
  .nav__links { gap: 0.75rem; }
  .nav__links a { font-size: 0.75rem; }
  .nav__logo { font-size: 0.9rem; }
  .hero { min-height: 85vh; }
}

@media (max-width: 380px) {
  .nav { padding: 0 0.75rem; }
  .nav__links { gap: 0.5rem; }
  .nav__links a { font-size: 0.7rem; }
  .nav__logo { font-size: 0.8rem; }
}
