:root {
  /* Light theme (default) */
  --primary: #18181b;
  --secondary: #ffffff;
  --text: #18181b;
  --text-secondary: #71717a;
  --background: #fafafa;
  --border: #e4e4e7;
  --container-bg: #ffffff;
  --social-hover: #f4f4f5;
  --editor-bg: #18181b;
  --editor-text: #e4e4e7;
  --editor-line-number: #71717a;
  --editor-header: #27272a;
  --editor-tab-active: #18181b;
  --editor-tab-inactive: #27272a;
  --editor-keyword: #60a5fa;
  --editor-string: #fda4af;
  --editor-function: #34d399;
}

[data-theme="dark"] {
  --primary: #e4e4e7;
  --primary-rgb: 228, 228, 231;
  --secondary: #18181b;
  --text: #e4e4e7;
  --text-secondary: #a1a1aa;
  --background: #09090b;
  --border: #27272a;
  --container-bg: #18181b;
  --social-hover: #27272a;
  --editor-bg: #000000;
  --editor-text: #e4e4e7;
  --editor-line-number: #71717a;
  --editor-header: #09090b;
  --editor-tab-active: #000000;
  --editor-tab-inactive: #09090b;
  --editor-keyword: #60a5fa;
  --editor-string: #fda4af;
  --editor-function: #34d399;
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--background);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  width: 100%;
  max-width: 800px;
  background-color: var(--container-bg);
  border-radius: 1.5rem;
  padding: 3rem;
  transition: background-color 0.3s ease;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
}

.theme-toggle {
  position: fixed;
  top: 2rem;
  right: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.5rem;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  color: var(--text);
  background-color: var(--social-hover);
}

.theme-toggle svg {
  width: 24px;
  height: 24px;
}

.hero {
  width: 100%;
  text-align: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.typing-container {
  font-size: 1rem;
  line-height: 1.5;
  width: 100%;
  max-width: 700px;
  position: relative;
  background: var(--editor-bg);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.editor-header {
  background: var(--editor-header);
  padding: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.window-controls {
  display: flex;
  gap: 0.375rem;
  padding-right: 0.5rem;
}

.window-control {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  border: none;
}

.window-close {
  background: #ff5f56;
}

.window-minimize {
  background: #ffbd2e;
}

.window-maximize {
  background: #27c93f;
}

.editor-tabs {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.editor-tab {
  background: var(--editor-tab-active);
  color: var(--editor-text);
  padding: 0.375rem 1rem;
  border-radius: 0.25rem 0.25rem 0 0;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.editor-tab svg {
  width: 1rem;
  height: 1rem;
  opacity: 0.7;
}

.editor-content {
  display: flex;
  padding: 1rem 0;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  min-height: 12rem;
  background: var(--editor-bg);
}

.line-numbers {
  padding: 0 1rem;
  color: var(--editor-line-number);
  text-align: right;
  user-select: none;
  border-right: 1px solid var(--editor-line-number);
  opacity: 0.5;
  min-width: 3rem;
  font-variant-numeric: tabular-nums;
}

.editor-text {
  padding: 0 0 0 1rem;
  color: var(--editor-text);
  flex: 1;
  text-align: left;
  font-size: 0.9rem;
  line-height: 1.5;
}

.type {
  display: inline;
}

.typed-cursor {
  width: 2px;
  height: 1.2em;
  background-color: currentColor;
  color: var(--editor-text);
  margin-left: 1px;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

.keyword {
  color: var(--editor-keyword);
}

.string {
  color: #E9A98E;
}

.function {
  color: #4EC9B0;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.button-primary {
  background-color: var(--primary);
  color: var(--secondary);
}

.button-primary:hover {
  background-color: var(--text);
  transform: translateY(-2px);
}

.button-secondary {
  background-color: var(--secondary);
  color: var(--primary);
  border: 1px solid var(--border);
}

.button-secondary:hover {
  background-color: var(--border);
  transform: translateY(-2px);
}

.social-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

.social-link {
  color: var(--text-secondary);
  transition: all 0.2s ease;
  padding: 0.5rem;
  border-radius: 0.5rem;
}

.social-link:hover {
  color: var(--text);
  background-color: var(--social-hover);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .container {
    padding: 2rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .typing-container {
    font-size: 1.25rem;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
  }

  .button {
    width: 100%;
    justify-content: center;
  }
}