/* ============================================
   PORTFOLIO — Game Developer & Technical Designer
   ============================================ */

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

:root {
  --bg:        #0a0a0f;
  --bg-alt:    #12121a;
  --surface:   #1a1a26;
  --border:    #2a2a3a;
  --text:      #e8e8f0;
  --text-dim:  #8888a0;
  --accent:    #6c5ce7;
  --accent2:   #00cec9;
  --accent3:   #fd79a8;
  --font:      'Inter', system-ui, -apple-system, sans-serif;
  --mono:      'JetBrains Mono', 'Fira Code', monospace;
}

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent2); }

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

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Nav --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}

.nav--scrolled { border-bottom-color: var(--border); }

.nav__logo {
  font-family: var(--mono);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.5px;
}

.nav__links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav__links a {
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color .2s;
}

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

/* --- Lang Toggle --- */
.lang-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  margin-left: 16px;
}

.lang-toggle:hover {
  border-color: var(--accent);
  background: var(--bg-alt);
}

.lang-toggle__label {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent2);
  letter-spacing: 0.5px;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}

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

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 30% 40%, rgba(108,92,231,0.15), transparent),
    radial-gradient(ellipse 500px 350px at 70% 60%, rgba(0,206,201,0.1), transparent);
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: 0 24px;
}

.hero__tag {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent2);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero__title {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1.1;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-dim);
  max-width: 520px;
  margin: 0 auto 36px;
}

.hero__cta { display: flex; gap: 16px; justify-content: center; }

.hero__scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 0.75rem;
  letter-spacing: 1px;
  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.4; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  border: 2px solid transparent;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}
.btn--primary:hover {
  background: #5a4bd6;
  color: #fff;
  transform: translateY(-1px);
}

.btn--outline {
  border-color: var(--border);
  color: var(--text-dim);
  background: transparent;
}
.btn--outline:hover {
  border-color: var(--accent);
  color: var(--text);
}

.btn--sm {
  padding: 8px 18px;
  font-size: 0.8rem;
}

/* --- Sections --- */
.section {
  padding: 100px 0;
}

.section--alt {
  background: var(--bg-alt);
}

.section__title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 12px;
  position: relative;
  display: inline-block;
}

.section__title::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.section__subtitle {
  color: var(--text-dim);
  margin-bottom: 48px;
  max-width: 500px;
}

/* --- About --- */
.about {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 48px;
  margin-top: 40px;
}

.about__text p {
  color: var(--text-dim);
  margin-bottom: 16px;
  line-height: 1.8;
}

.about__text p:last-child { margin-bottom: 0; }

.about__details { display: flex; flex-direction: column; gap: 16px; }

.about__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.about__card-label {
  font-size: 0.75rem;
  color: var(--accent2);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.about__card-value {
  font-size: 0.95rem;
  font-weight: 500;
}

/* --- Skills --- */
.skills {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-top: 40px;
}

.skill-group__title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

.skill-group__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-block;
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.82rem;
  color: var(--text-dim);
  font-weight: 500;
  transition: border-color .2s, color .2s;
}

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

.tag--sm {
  padding: 4px 10px;
  font-size: 0.75rem;
}

/* --- Projects --- */
.projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-top: 12px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color .3s, transform .3s;
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.project-card--wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
}

.project-card__video {
  position: relative;
  padding-top: 56.25%;
  background: var(--bg-alt);
}

.project-card__video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.project-card__image {
  height: 180px;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-card__placeholder {
  font-size: 3rem;
  opacity: 0.6;
}

.project-card__body { padding: 24px; }

.project-card__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.project-card__title {
  font-size: 1.15rem;
  font-weight: 600;
}

.project-card__role {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent2);
  white-space: nowrap;
}

.project-card__meta {
  display: block;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.project-card__desc {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 16px;
}

.project-card__desc-sub {
  font-size: 0.82rem;
  color: var(--text-dim);
  opacity: 0.8;
}

.project-card__features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.project-card__feature {
  font-size: 0.85rem;
  line-height: 1.6;
}

.project-card__feature strong {
  display: block;
  color: var(--text);
  font-size: 0.85rem;
  margin-bottom: 2px;
}

.project-card__feature p {
  color: var(--text-dim);
  margin: 0;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.project-card__links { display: flex; gap: 10px; }

/* --- Contact --- */
.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 32px;
}

.contact__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-dim);
  font-weight: 500;
  transition: border-color .2s, color .2s, transform .2s;
}

.contact__link:hover {
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-2px);
}

.contact__icon {
  font-size: 1.2rem;
  width: 32px;
  text-align: center;
}

/* --- Footer --- */
.footer {
  padding: 32px 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.82rem;
  border-top: 1px solid var(--border);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav__toggle { display: flex; }

  .nav__links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 260px;
    height: 100vh;
    flex-direction: column;
    background: var(--bg-alt);
    padding: 80px 32px 32px;
    gap: 24px;
    transition: right .3s;
    border-left: 1px solid var(--border);
  }

  .nav__links--open { right: 0; }

  .lang-toggle {
    position: fixed;
    top: 16px;
    right: 70px;
    z-index: 101;
  }

  .about { grid-template-columns: 1fr; }
  .skills { grid-template-columns: 1fr; }
  .projects { grid-template-columns: 1fr; }
  .project-card--wide { grid-template-columns: 1fr; }

  .hero__cta { flex-direction: column; align-items: center; }
  .contact { flex-direction: column; }
}

/* --- Animations --- */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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