:root {
  --primary: #6b73ff; /* Soft periwinkle blue */
  --accent: #ff9f7a; /* Warm peach */
  --secondary: #98d8c8; /* Mint green */
  --bg: #f7f9fc; /* Very light blue-grey */
  --text: #2c3e50; /* Dark blue-grey */
  --card: #ffffff; /* Pure white for cards */
  --border: #e8f0fe; /* Very light blue border */
  --hover-bg: #f0f4ff; /* Light blue hover */
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #a5b4fc; /* Light lavender */
    --accent: #fdb4a6; /* Light salmon */
    --secondary: #a7f3d0; /* Light mint */
    --bg: #1a1d23; /* Dark navy */
    --text: #f1f5f9; /* Light grey */
    --card: #252a32; /* Dark card */
    --border: #374151; /* Grey border */
    --hover-bg: #2d3748; /* Dark hover */
  }
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Inter", "Segoe UI", Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 17px;
  letter-spacing: 0.01em;
  line-height: 1.65;
}

header {
  text-align: center;
  padding: 3rem 1rem 2rem 1rem;
  background: linear-gradient(135deg, var(--primary) 15, var(--secondary) 15);
  margin-bottom: 2rem;
}

.logo {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(107, 115, 255, 0.3);
  margin-bottom: 1rem;
  background: var(--card);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logo:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(107, 115, 255, 0.4);
}

h1 {
  margin: 1rem 0 0.5rem 0;
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--text);
}

.subtitle {
  color: var(--accent);
  font-size: 1.2rem;
  margin: 0.5rem 0;
  font-weight: 500;
}

.location {
  color: var(--secondary);
  font-size: 1rem;
  margin: 0.25rem 0 0 0;
  opacity: 0.9;
}

main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem 2rem 1.5rem;
}

section {
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border);
  margin-bottom: 2rem;
  padding: 2rem;
  transition: box-shadow 0.2s ease;
}

section:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.intro {
  background: linear-gradient(135deg, var(--hover-bg), var(--card));
  border-left: 4px solid var(--primary);
}

.intro p {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

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

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.project-grid .expertise-item:last-child:nth-child(3n-1) {
  grid-column: span 2;
}

.project-grid .expertise-item:last-child:nth-child(3n-2) {
  grid-column: span 3;
}

.expertise-item {
  background: var(--hover-bg);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: background-color 0.2s ease;
}

.expertise-item:hover {
  background: var(--card);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.expertise-item h3 {
  margin: 0 0 0.75rem 0;
  font-size: 1.15rem;
  color: var(--primary);
  font-weight: 600;
}

.expertise-item p {
  margin: 0;
  color: var(--text);
  opacity: 0.9;
  line-height: 1.6;
}

.project-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0 0;
}

.project-list li {
  margin-bottom: 1.75rem;
  padding: 1.25rem;
  background: var(--hover-bg);
  border-radius: 10px;
  border-left: 3px solid var(--secondary);
  transition: background-color 0.2s ease;
}

.project-list li:hover {
  background: var(--card);
}

.project-list li:last-child {
  margin-bottom: 0;
}

.project-list strong {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.project-list p {
  margin: 0;
  opacity: 0.9;
  line-height: 1.6;
}

.approach {
  background: linear-gradient(135deg, var(--secondary) 15, var(--hover-bg));
  border-left: 4px solid var(--secondary);
}

.approach p {
  font-size: 1.1rem;
  line-height: 1.7;
  margin: 0;
}

.contact {
  background: linear-gradient(135deg, var(--accent) 15, var(--hover-bg));
  border-left: 4px solid var(--accent);
}

.contact p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.contact-intro p {
  margin-bottom: 1rem;
}

.contact-intro p:last-child {
  margin-bottom: 1.5rem;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-list li {
  margin-bottom: 0.75rem;
  font-size: 1.05rem;
}

.contact-list li:last-child {
  margin-bottom: 0;
}

/* Writing Section Styles */
.writing {
  background: linear-gradient(135deg, var(--primary) 15, var(--hover-bg));
  border-left: 4px solid var(--primary);
}

.writing > p:first-of-type {
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.article {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 1rem;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.article:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.article:last-child {
  margin-bottom: 0;
}

.article-header {
  background: var(--hover-bg);
  padding: 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s ease;
}

.article-header:hover {
  background: var(--card);
}

.article-title {
  margin: 0;
  font-size: 1.15rem;
  color: var(--primary);
  font-weight: 600;
}

.post-meta {
  font-size: 0.9rem;
  color: var(--accent);
  margin: 0.25rem 0 0 0;
  font-weight: 500;
  opacity: 0.9;
}

.article-toggle {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 1.5rem;
  cursor: pointer;
  transition: transform 0.3s ease;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-toggle.expanded {
  transform: rotate(180deg);
}

.article-content {
  display: none;
  padding: 0 1.5rem 1.5rem 1.5rem;
  background: var(--card);  
}

.article-content.expanded {
  display: block;
  padding-top: 1rem;
}

.article-content h3 {
  color: var(--primary);
  font-size: 1.1rem;
  margin: 1.5rem 0 0.75rem 0;
  font-weight: 600;
}

.article-content h3:first-child {
  margin-top: 0;
  padding-top: 1rem;
}

.article-content p {
  margin: 0 0 1rem 0;  
  line-height: 1.6;
}

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

.article-content ul {
  margin: 0 0 1rem 0;
  padding-left: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-family: "Inter", "Segoe UI", Arial, Helvetica, sans-serif;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--primary);
  font-size: 1.5rem;
}

h3 {
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  font-family: "Inter", "Segoe UI", Arial, Helvetica, sans-serif;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--primary);
  font-size: 1.2rem;
}

h3:first-child {
  margin-top: 1rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

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

footer {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.95rem;
  color: var(--accent);
  background: none;
  opacity: 0.8;
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.two-column section {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  header {
    padding: 2rem 1rem 1.5rem 1rem;
  }

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

  h1 {
    font-size: 1.8rem;
  }

  main {
    padding: 0 1rem 2rem 1rem;
  }

  section {
    padding: 1.5rem;
  }

  .expertise-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .project-grid .expertise-item:last-child:nth-child(3n-1),
  .project-grid .expertise-item:last-child:nth-child(3n-2) {
    grid-column: span 1;
  }

  .expertise-item {
    padding: 1.25rem;
  }

  .two-column {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .article-header {
    padding: 1.25rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .article-content {
    padding: 0 1.25rem 1.25rem 1.25rem;
  }
}

@media (max-width: 480px) {
  header {
    padding: 1.5rem 0.75rem 1rem 0.75rem;
  }

  main {
    padding: 0 0.75rem 1.5rem 0.75rem;
  }

  section {
    padding: 1.25rem;
    margin-bottom: 1.5rem;
  }

  .article-header {
    padding: 1rem;
  }

  .article-content {
    padding: 0 1rem 1rem 1rem;
  }
}
