@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ---------- Base ---------- */
:root {
  --bg: #0b0d12;
  --bg-elevated: #12151d;
  --bg-elevated-2: #171b26;
  --text: #f2f4f8;
  --text-muted: #9aa1b1;
  --accent: #5b8cff;
  --accent-2: #8f5bff;
  --border: #232838;
  --max-width: 920px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(91, 140, 255, 0.15), transparent),
    radial-gradient(900px 400px at 90% 10%, rgba(143, 91, 255, 0.10), transparent),
    var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: #82a5ff;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 13, 18, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.logo {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

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

.main-nav {
  display: flex;
  gap: 24px;
  align-items: center;
}

.main-nav a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

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

.lang-switch {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  align-items: center;
}

.lang-switch a {
  color: var(--text-muted);
}

.lang-switch a.lang-current {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 96px 24px 64px;
}

.avatar-photo {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 28px;
  padding: 4px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 40px rgba(91, 140, 255, 0.25);
}

.hero h1 {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}

.hero .highlight {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline {
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 540px;
  margin: 0 auto 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(91, 140, 255, 0.35);
  color: white;
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}

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

/* ---------- Sections ---------- */
.section {
  padding: 56px 24px;
  border-top: 1px solid var(--border);
}

.section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.section p {
  color: var(--text-muted);
}

/* ---------- Game ---------- */
.game-wrap {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

#game {
  width: 100%;
  max-width: 360px;
  height: auto;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  touch-action: manipulation;
  cursor: pointer;
  outline: none;
}

#game:focus-visible {
  border-color: var(--accent);
}

/* ---------- Skills ---------- */
.skills-grid {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0;
}

.skills-grid li {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.88rem;
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.skills-grid li:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* ---------- Projects ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.project-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

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

.project-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
}

.project-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.project-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 14px 0 0;
}

.project-tags li {
  background: rgba(91, 140, 255, 0.10);
  border: 1px solid rgba(91, 140, 255, 0.25);
  color: #a9c0ff;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.74rem;
  font-weight: 500;
}

.project-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}

.project-card--soon {
  border-color: rgba(91, 140, 255, 0.4);
  background: linear-gradient(180deg, rgba(91, 140, 255, 0.06), transparent);
}

.badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ---------- Contact ---------- */
.contact-email {
  display: inline-block;
  margin-top: 8px;
  font-size: 1.1rem;
  font-weight: 600;
}

.contact-links {
  margin-top: 10px;
}

.contact-links a {
  font-size: 0.92rem;
  font-weight: 600;
}

/* ---------- Project detail page ---------- */
.detail-back {
  display: inline-block;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.detail-back:hover {
  color: var(--text);
}

.detail-header h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}

.detail-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 0 20px;
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.detail-gallery img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.detail-gallery figure {
  margin: 0;
}

.detail-gallery figcaption {
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .main-nav {
    display: none;
  }

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

  .hero {
    padding: 64px 20px 48px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .avatar-photo {
    width: 108px;
    height: 108px;
  }
}
