:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --text-primary: #0f1419;
  --text-secondary: #666;
  --text-tertiary: #555;
  --text-light: #999;
  --border-color: rgba(0, 0, 0, 0.06);
  --accent: #0066cc;
  --accent-dark: #0052a3;
  --card-bg: #ffffff;
  --shadow-light: rgba(0, 0, 0, 0.04);
}

body.dark-mode {
  --bg-primary: #0a0a0a;
  --bg-secondary: #1a1a1a;
  --text-primary: #ffffff;
  --text-secondary: #ccc;
  --text-tertiary: #bbb;
  --text-light: #999;
  --border-color: rgba(255, 255, 255, 0.1);
  --accent: #FFB800;
  --accent-dark: #FF9500;
  --card-bg: #1a1a1a;
  --shadow-light: rgba(255, 255, 255, 0.05);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  font-size: 16px;
  letter-spacing: -0.3px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--accent-dark);
}

/* Dark mode toggle button */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0.5rem;
  transition: all 0.3s ease;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  height: 1.5rem;
  width: 1.5rem;
}

.theme-toggle:hover {
  transform: rotate(20deg);
}

/* Navigation */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.logo {
  font-size: 1.3rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.logo:hover {
  opacity: 0.8;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2.5rem;
}

nav a {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
  position: relative;
  transition: color 0.2s ease;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

nav a:hover {
  color: var(--accent);
  background-color: var(--accent);
  color: #000;
  border-radius: 4px;
  padding: 0.25rem 0.75rem;
  margin: 0 -0.75rem;
}

nav a:hover::after {
  width: 0%;
}

/* Container */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 2rem 0 2rem;
  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  letter-spacing: -2px;
  white-space: nowrap;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-tertiary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
  font-weight: 400;
}

.cta-button {
  display: inline-block;
  padding: 0.875rem 2rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: white;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin: 0.5rem;
  border: 1px solid transparent;
  box-shadow: 0 2px 8px rgba(0, 102, 204, 0.2);
  cursor: pointer;
}

body.dark-mode .cta-button {
  box-shadow: 0 2px 8px rgba(255, 184, 0, 0.2);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 102, 204, 0.3);
}

body.dark-mode .cta-button:hover {
  box-shadow: 0 8px 20px rgba(255, 184, 0, 0.3);
}

/* Projects Grid */
.projects {
  margin: 2rem 0 2rem 0;
  padding: 1.5rem 0;
}

.projects h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: center;
  color: var(--text-primary);
  letter-spacing: -1px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.project-card {
  padding: 1.75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--card-bg);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 1px 3px var(--shadow-light);
}

.project-card:hover {
  border-color: var(--accent);
  box-shadow: 0 12px 24px rgba(0, 102, 204, 0.12);
  transform: translateY(-4px);
}

body.dark-mode .project-card:hover {
  box-shadow: 0 12px 24px rgba(255, 184, 0, 0.12);
}

.project-card h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-weight: 700;
}

.project-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.tag {
  font-size: 0.8rem;
  padding: 0.35rem 0.8rem;
  background: linear-gradient(135deg, rgba(0, 102, 204, 0.08) 0%, rgba(0, 82, 163, 0.08) 100%);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--accent);
  font-weight: 500;
}

body.dark-mode .tag {
  background: linear-gradient(135deg, rgba(255, 184, 0, 0.08) 0%, rgba(255, 149, 0, 0.08) 100%);
}

.project-link {
  display: inline-block;
  color: var(--accent);
  font-weight: 600;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.project-link:hover {
  background-color: var(--accent);
  color: #000;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transform: translateX(0);
}

/* Expertise Section */
.expertise {
  margin: 2rem 0 2rem 0;
  padding: 1.5rem 0;
}

.expertise h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: center;
  color: var(--text-primary);
  letter-spacing: -1px;
}

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.expertise-category {
  padding: 1.75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--card-bg);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 1px 3px var(--shadow-light);
}

.expertise-category:hover {
  border-color: var(--accent);
  box-shadow: 0 12px 24px rgba(0, 102, 204, 0.12);
  transform: translateY(-4px);
}

body.dark-mode .expertise-category:hover {
  box-shadow: 0 12px 24px rgba(255, 184, 0, 0.12);
}

.expertise-category h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--accent);
  font-weight: 700;
}

.expertise-category p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* About Section */
.about {
  margin: 2rem 0 1rem 0;
  padding: 2.5rem;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(0, 102, 204, 0.03) 100%);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

body.dark-mode .about {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(255, 184, 0, 0.03) 100%);
}

.about h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  font-weight: 700;
}

.about p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.about p strong {
  color: var(--text-primary);
  font-weight: 700;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 0;
  margin-top: 3rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-light);
  font-size: 0.9rem;
}

footer p {
  margin: 0.5rem 0;
}

footer a {
  color: var(--accent);
}

/* Blog Posts */
.posts-list {
  margin: 3rem 0;
}

.post-item {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.post-item:hover {
  padding-left: 1rem;
}

.post-item:last-child {
  border-bottom: none;
}

.post-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.post-title a {
  transition: all 0.2s ease;
}

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

.post-meta {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.post-excerpt {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Page */
.page-content {
  max-width: 800px;
  margin: 3rem auto;
  padding: 0 2rem;
}

.page-content h1 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.page-content h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.page-content h3 {
  font-size: 1.1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
}

.page-content h3 + p,
.page-content h3 + ul {
  margin-left: 1.5rem;
  padding-left: 0;
}

.page-content h3 + p + p,
.page-content h3 + p + ul {
  margin-left: 1.5rem;
}

.page-content ul {
  margin-left: 1.5rem;
}

.page-content a {
  font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  .hero {
    padding: 3rem 0 4rem;
  }

  .hero h1 {
    font-size: 2rem;
    letter-spacing: -0.5px;
  }

  .hero p {
    font-size: 1rem;
  }

  nav {
    flex-direction: column;
    gap: 1.5rem;
  }

  nav ul {
    gap: 1rem;
    flex-direction: column;
    text-align: center;
  }

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

  .projects {
    margin: 3rem 0;
    padding: 2rem 0;
  }

  .projects h2 {
    font-size: 1.6rem;
  }

  .about {
    padding: 2rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
