/* ============================================
   AZEBAKH PORTFOLIO — Main Stylesheet
   Colors: Black & Bordeaux
   ============================================ */

/* --- CSS Variables --- */
:root {
  --black: #0A0A0A;
  --black-light: #141414;
  --black-lighter: #1E1E1E;
  --gray-dark: #2A2A2A;
  --gray: #3A3A3A;
  --gray-mid: #666666;
  --gray-light: #999999;
  --white: #F0EDE8;
  --white-pure: #FFFFFF;

  --bordeaux: #800020;
  --bordeaux-light: #9B2335;
  --bordeaux-lighter: #B5384A;
  --bordeaux-dark: #5C0017;
  --bordeaux-glow: rgba(128, 0, 32, 0.3);

  --font-main: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-heading: 'Oswald', 'Impact', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background-color: var(--black);
  color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--bordeaux-light);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--bordeaux-lighter);
}

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

ul {
  list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 600;
}

h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  font-weight: 600;
}

/* --- Utility Classes --- */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 100px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 60px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--bordeaux);
  margin: 15px auto 0;
}

.text-bordeaux {
  color: var(--bordeaux-light);
}

.text-center {
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 0;
  transition: all var(--transition);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  padding: 12px 0;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.nav-logo span {
  color: var(--bordeaux-light);
}

.nav-links {
  display: flex;
  gap: 35px;
  align-items: center;
}

.nav-links a {
  color: var(--gray-light);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: relative;
  padding: 5px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--bordeaux);
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Hamburger Menu */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
  z-index: 1001;
}

.nav-hamburger span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--white);
  transition: all var(--transition);
}

.nav-hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-hamburger.active span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 20% 50%, var(--bordeaux-glow) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(128, 0, 32, 0.15) 0%, transparent 40%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-subtitle {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--bordeaux-light);
  margin-bottom: 15px;
  letter-spacing: 0.15em;
}

.hero-title {
  margin-bottom: 25px;
}

.hero-title span {
  display: block;
  color: var(--bordeaux-light);
}

.hero-description {
  font-size: 1.15rem;
  color: var(--gray-light);
  max-width: 550px;
  margin-bottom: 40px;
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--bordeaux);
  color: var(--white);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

.btn-primary:hover {
  background: var(--bordeaux-light);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--bordeaux-glow);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--gray);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

.btn-outline:hover {
  border-color: var(--bordeaux);
  color: var(--bordeaux-light);
  transform: translateY(-2px);
}

/* --- Skills Section --- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.skill-card {
  background: var(--black-light);
  border: 1px solid var(--gray-dark);
  padding: 35px 30px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--bordeaux);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.skill-card:hover {
  border-color: var(--bordeaux-dark);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.skill-card:hover::before {
  transform: scaleX(1);
}

.skill-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: var(--bordeaux-light);
}

.skill-card h3 {
  margin-bottom: 12px;
  font-size: 1.2rem;
}

.skill-card p {
  color: var(--gray-light);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --- Tech Stack Tags --- */
.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}

.tech-tag {
  background: var(--gray-dark);
  color: var(--gray-light);
  padding: 5px 14px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  border: 1px solid transparent;
  transition: all var(--transition);
}

.tech-tag:hover {
  border-color: var(--bordeaux);
  color: var(--bordeaux-light);
}

/* --- Projects / Games Section --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
}

.project-card {
  background: var(--black-light);
  border: 1px solid var(--gray-dark);
  overflow: hidden;
  transition: all var(--transition);
  position: relative;
}

.project-card:hover {
  border-color: var(--bordeaux-dark);
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.project-image {
  width: 100%;
  height: 220px;
  background: var(--gray-dark);
  position: relative;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--bordeaux);
  background: linear-gradient(135deg, var(--black-lighter) 0%, var(--gray-dark) 100%);
}

.project-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--bordeaux);
  color: var(--white);
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.project-content {
  padding: 25px;
}

.project-content h3 {
  margin-bottom: 10px;
  font-size: 1.4rem;
}

.project-content p {
  color: var(--gray-light);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--bordeaux-light);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.project-link:hover {
  color: var(--bordeaux-lighter);
  gap: 12px;
}

/* --- Game Detail Page --- */
.game-hero {
  min-height: 60vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(to bottom, var(--black) 0%, var(--black-light) 100%);
}

.game-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 30% 50%, var(--bordeaux-glow) 0%, transparent 60%);
  pointer-events: none;
}

.game-hero-content {
  position: relative;
  z-index: 1;
  padding-top: 80px;
}

.game-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 25px;
}

.game-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gray-light);
  font-size: 0.9rem;
}

.game-meta-item strong {
  color: var(--bordeaux-light);
}

.game-section {
  padding: 80px 0;
}

.game-section:nth-child(even) {
  background: var(--black-light);
}

.game-description {
  font-size: 1.1rem;
  line-height: 1.9;
  color: var(--gray-light);
  max-width: 800px;
}

.game-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.game-feature {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.game-feature-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--bordeaux-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bordeaux-lighter);
  font-size: 1.2rem;
}

.game-feature p {
  color: var(--gray-light);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 15px;
}

.gallery-item {
  aspect-ratio: 16/10;
  background: var(--gray-dark);
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-mid);
  font-size: 0.9rem;
}

/* --- Lame Jam Section --- */
.jam-timeline {
  position: relative;
  padding-left: 40px;
}

.jam-timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gray-dark);
}

.jam-entry {
  position: relative;
  margin-bottom: 60px;
}

.jam-entry::before {
  content: '';
  position: absolute;
  left: -33px;
  top: 8px;
  width: 12px;
  height: 12px;
  background: var(--bordeaux);
  border: 2px solid var(--bordeaux-light);
  border-radius: 50%;
}

.jam-entry h3 {
  margin-bottom: 8px;
  color: var(--white);
}

.jam-entry .jam-theme {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--bordeaux-light);
  margin-bottom: 15px;
}

.jam-entry p {
  color: var(--gray-light);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.jam-video {
  width: 100%;
  max-width: 700px;
  aspect-ratio: 16/9;
  background: var(--gray-dark);
  border: 1px solid var(--gray);
  overflow: hidden;
}

.jam-video iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.jam-video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--gray-mid);
}

.jam-video-placeholder .play-icon {
  font-size: 3rem;
  color: var(--bordeaux);
}

/* --- Footer --- */
.footer {
  background: var(--black-light);
  border-top: 1px solid var(--gray-dark);
  padding: 50px 0 30px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.footer-brand h3 span {
  color: var(--bordeaux-light);
}

.footer-brand p {
  color: var(--gray-mid);
  font-size: 0.9rem;
}

.footer-links h4 {
  font-size: 0.9rem;
  color: var(--white);
  margin-bottom: 15px;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: var(--gray-mid);
  font-size: 0.85rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--bordeaux-light);
}

.footer-social {
  display: flex;
  gap: 15px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-dark);
  color: var(--gray-light);
  font-size: 1.1rem;
  transition: all var(--transition);
}

.footer-social a:hover {
  background: var(--bordeaux);
  color: var(--white);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid var(--gray-dark);
  color: var(--gray-mid);
  font-size: 0.8rem;
}

/* --- Back to top --- */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 45px;
  height: 45px;
  background: var(--bordeaux);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  z-index: 999;
  border: none;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--bordeaux-light);
  transform: translateY(-3px);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: var(--black-light);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 25px;
    transition: right var(--transition);
    border-left: 1px solid var(--gray-dark);
  }

  .nav-links.active {
    right: 0;
  }

  .nav-hamburger {
    display: flex;
  }

  .hero-cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .game-meta {
    flex-direction: column;
    gap: 10px;
  }

  .section {
    padding: 60px 0;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .jam-timeline {
    padding-left: 30px;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  .container {
    width: 95%;
    padding: 0 10px;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }
}
