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

:root {
  --bg: #000000;
  --text: #ffffff;
  --text-muted: #888888;
  --accent: #ff8c00;
  --font: "JetBrains Mono", monospace;
}

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

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Container */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 80px 24px;
  position: relative;
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 24px;
  gap: 8px;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
  animation-delay: 0.2s;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  cursor: pointer;
  padding: 4px 8px;
  transition: all 0.3s ease;
  position: relative;
}

.lang-btn::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

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

.lang-btn.active {
  color: var(--accent);
}

.lang-btn.active::after {
  width: 100%;
}

.lang-divider {
  color: var(--text-muted);
  font-size: 0.75rem;
  opacity: 0.5;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 80px;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s ease forwards;
}

.title {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  text-transform: lowercase;
}

.subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 300;
}

/* Projects */
.projects {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.project {
  display: flex;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.6s ease forwards;
  animation-delay: var(--delay, 0s);
}

.project:last-child {
  border-bottom: none;
}

.project-number {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 300;
  min-width: 32px;
  padding-top: 4px;
}

.project-content {
  flex: 1;
}

.project-title {
  font-size: 1.125rem;
  font-weight: 500;
  margin-bottom: 8px;
  transition: color 0.3s ease;
}

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

.project-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 300;
  margin-bottom: 16px;
  line-height: 1.7;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.4);
  transition: all 0.3s ease;
}

.project-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.project-link .arrow {
  width: 12px;
  height: 12px;
  transition: transform 0.3s ease;
}

.project-link:hover .arrow {
  transform: translate(2px, -2px);
}

/* Live Demo Button */
.project-link.live-demo {
  margin-left: 16px;
  color: var(--text);
  border-bottom-color: rgba(255, 255, 255, 0.4);
}

.project-link.live-demo:hover {
  color: #00ff88;
  border-bottom-color: #00ff88;
}

.live-dot {
  width: 6px;
  height: 6px;
  background: #00ff88;
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
  box-shadow: 0 0 8px #00ff88;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}

/* Footer */
.footer {
  margin-top: 80px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
  animation-delay: 1s;
}

/* Animations */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scramble effect highlight */
[data-scramble] {
  display: inline-block;
}

/* i18n transition */
[data-i18n] {
  transition: opacity 0.2s ease;
}

/* Responsive */
@media (max-width: 600px) {
  .container {
    padding: 48px 20px;
  }

  .lang-switcher {
    top: 16px;
    right: 20px;
  }

  .header {
    margin-bottom: 48px;
    padding-top: 32px;
  }

  .project {
    flex-direction: column;
    gap: 8px;
    padding: 24px 0;
  }

  .project-number {
    padding-top: 0;
  }

  .footer {
    margin-top: 48px;
  }
}
