/* CSS Variables - Light theme (default) */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f6f8fa;
  --bg-tertiary: #eef1f4;
  --text-primary: #1f2328;
  --text-secondary: #59636e;
  --text-muted: #8b949e;
  --accent: #0969da;
  --border-color: #d1d9e0;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Dark theme */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    --accent: #58a6ff;
    --border-color: #30363d;
  }
}

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

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* Container */
.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

/* Hero */
.hero {
  margin-bottom: 3rem;
  padding-top: 1rem;
}

.hero-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.logo {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

h1 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  padding-left: calc(56px + 1rem);
  font-family: var(--font-mono);
}

.subtitle .cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background-color: var(--accent);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Sections */
section {
  margin-bottom: 3rem;
}

h2 {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

/* About */
.about p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

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

/* Services */
.services-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.service-card {
  padding: 1rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.service-card:hover {
  background-color: var(--bg-tertiary);
  border-color: var(--accent);
}

.service-card strong {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
}

.service-card span {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Contact */
.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-secondary);
}

.contact-list a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.contact-list a:hover {
  color: var(--accent);
}

.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--text-muted);
}

/* Footer */
footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.copyright {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 100;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  max-width: 560px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 1.5rem;
  position: relative;
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  line-height: 1;
  transition: color 0.15s ease;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-right: 2rem;
}

.modal h4 {
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.modal p {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.modal ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.modal li {
  color: var(--text-secondary);
  font-size: 0.95rem;
  padding-left: 1rem;
  position: relative;
}

.modal li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 4px;
  height: 4px;
  background-color: var(--text-muted);
  border-radius: 50%;
}

/* Responsive */
@media (max-width: 500px) {
  .container {
    padding: 2rem 1.25rem;
  }

  .hero-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .logo {
    width: 48px;
    height: 48px;
  }

  h1 {
    font-size: 1.5rem;
  }

  .subtitle {
    padding-left: 0;
  }

  .services-list {
    grid-template-columns: 1fr;
  }

  .modal {
    padding: 1.25rem;
  }
}

/* Selection */
::selection {
  background-color: var(--accent);
  color: var(--bg-primary);
}

/* Focus styles */
a:focus-visible,
.service-card:focus-visible,
.modal-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
