@font-face {
  font-family: 'Newsreader';
  src: url('/fonts/Newsreader.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --text-color: #333;
  --background-color: #fff;
  --accent-color: #888;
  --secondary-bg-color: #f9f9f9;
  --border-color: #ddd;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23f0f0f0' fill-opacity='0.4' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
  z-index: -1;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

body.dark-mode {
  --text-color: #e0e0e0;
  --background-color: #1a1a1a;
  --accent-color: #888;
  --secondary-bg-color: #2a2a2a;
  --border-color: #444;
}

body.dark-mode::before {
  opacity: 0.1;
}

h1,
h2,
h3,
h4,
p,
ul {
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
h4 {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 600;
  letter-spacing: 0;
}

a {
  color: inherit;
}

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  color: var(--accent-color);
  font-size: 0.9rem;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav button:hover,
.site-nav button:focus-visible {
  color: var(--text-color);
  outline: none;
}

.site-nav-standalone {
  width: min(100% - 40px, 880px);
  margin: 40px auto 0;
}

.site-nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  white-space: nowrap;
}

.site-nav-separator {
  color: var(--border-color);
}

.language-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--accent-color);
  font-size: 0.72rem;
  letter-spacing: 0;
  line-height: 1;
  user-select: none;
}

.language-switcher button {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 2px 3px;
  cursor: pointer;
}

.language-switcher button[aria-pressed="true"] {
  color: var(--text-color);
  font-weight: 600;
}

.circle-element {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
}

.control-button,
.theme-toggle {
  border: 1px solid var(--border-color);
  border-radius: 50%;
  background: transparent;
  color: var(--accent-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  transition: opacity 0.3s ease, border-color 0.3s ease, color 0.3s ease, background-color 0.3s ease;
}

.control-button:hover,
.control-button:focus-visible,
.theme-toggle:hover,
.theme-toggle:focus-visible {
  background-color: var(--secondary-bg-color);
  border-color: var(--accent-color);
  color: var(--text-color);
  outline: none;
}

.control-button svg,
.theme-toggle svg {
  width: 16px;
  height: 16px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
}

#scroll-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  opacity: 0;
}

#scroll-to-top.visible {
  opacity: 1;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 80px 20px;
}

.site-nav-standalone + .container {
  padding-top: 52px;
}

.home-header {
  text-align: center;
  margin-bottom: 100px;
}

.container h1 {
  font-size: 2.8em;
  margin-bottom: 20px;
}

.container h2 {
  font-size: 1.8em;
  margin-top: 60px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--accent-color);
  padding-bottom: 15px;
}

section {
  margin-bottom: 80px;
}

.contact-info {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 40px;
}

.contact-info a,
.contact-info button {
  color: var(--text-color);
  text-decoration: none;
  padding: 10px 20px;
  border: 1px solid var(--accent-color);
  border-radius: 25px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.contact-icon,
.contact-symbol {
  margin-right: 10px;
}

.contact-icon {
  width: 1em;
  height: 1em;
  fill: currentColor;
  flex: 0 0 auto;
}

.contact-symbol {
  font-weight: 600;
}

.email-button-main {
  display: flex;
  align-items: center;
}

.email-button-label {
  min-width: 3.2em;
  text-align: left;
}

.contact-info a:hover,
.contact-info a:focus,
.contact-info button:hover,
.contact-info button:focus {
  background-color: var(--accent-color);
  color: var(--background-color);
  outline: none;
}

ul {
  list-style-type: none;
}

li {
  margin-bottom: 20px;
}

.profile-image {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 30px;
  display: block;
  border: 3px solid var(--accent-color);
}

.about-me,
.skills-category,
.portfolio-item {
  background-color: var(--secondary-bg-color);
  border-radius: 8px;
}

.about-me {
  padding: 30px;
  margin-bottom: 60px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}

.skills-category {
  padding: 20px;
}

.skills-category h3 {
  margin-bottom: 15px;
}

.toggle-section h2 {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toggle-content {
  display: none;
  animation: fadeIn 0.5s ease;
}

.toggle-btn {
  font-size: 1.5em;
  transition: transform 0.3s ease;
}

.toggle-btn.open {
  transform: rotate(45deg);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
}

.portfolio-item {
  padding: 25px;
  margin: 15px 0;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.portfolio-item:hover {
  transform: translateY(-5px);
}

.portfolio-item h4 {
  margin-bottom: 15px;
}

.portfolio-item p {
  color: var(--accent-color);
}

.portfolio-item a {
  display: inline-block;
  margin-top: 15px;
  color: var(--text-color);
  text-decoration: none;
  font-weight: 600;
}

.view-all-blog {
  display: block;
  margin-top: 15px;
  color: var(--text-color);
  background-color: var(--secondary-bg-color);
  border: 1px solid var(--accent-color);
  padding: 10px 15px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.view-all-blog:hover,
.view-all-blog:focus {
  background-color: var(--accent-color);
  color: var(--background-color);
}

.experience-timeline {
  position: relative;
  padding-left: 40px;
}

.experience-timeline::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--accent-color);
}

.experience-item {
  position: relative;
  margin-bottom: 50px;
  padding-left: 25px;
}

.experience-item::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--background-color);
  border: 2px solid var(--accent-color);
}

.experience-item h3 {
  margin-bottom: 10px;
}

.experience-item p {
  font-style: italic;
  margin-bottom: 20px;
  color: var(--accent-color);
}

.experience-item:last-child,
.education-item:last-child {
  margin-bottom: 0;
}

.education-item {
  margin-bottom: 40px;
}

.page-shell {
  width: min(100% - 40px, 880px);
  margin: 0 auto;
  padding: 72px 0 80px;
}

.page-shell .site-nav {
  margin-bottom: 72px;
}

.blog-hero {
  margin-bottom: 56px;
}

.eyebrow,
.post-date,
.post-meta {
  color: var(--accent-color);
  font-size: 0.85rem;
}

.eyebrow {
  margin: 0 0 14px;
}

.page-shell h1,
.page-shell h2,
.page-shell h3 {
  line-height: 1.08;
}

.page-shell h1 {
  max-width: 760px;
  margin: 0;
  font-size: 3.25rem;
}

.article-dek {
  max-width: 680px;
  margin: 18px 0 0;
  color: var(--accent-color);
  font-size: 1.08rem;
}

.post-list {
  display: grid;
  gap: 22px;
}

.post-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 24px;
  padding: 18px 0;
  border-top: 1px solid var(--border-color);
  text-decoration: none;
}

.post-card:last-child {
  border-bottom: 1px solid var(--border-color);
}

.post-card:hover .post-title,
.post-card:focus-visible .post-title {
  color: var(--accent-color);
}

.post-card:focus-visible {
  outline: 1px solid var(--accent-color);
  outline-offset: 8px;
}

.post-card img {
  width: 190px;
  height: 124px;
  object-fit: cover;
  display: block;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.post-card-content {
  min-width: 0;
}

.post-title {
  margin: 3px 0 8px;
  font-size: 1.45rem;
  transition: color 0.2s ease;
}

.post-summary {
  margin: 0;
  color: var(--accent-color);
}

.article-header {
  margin-bottom: 34px;
}

.article-header h1 {
  margin-top: 10px;
}

.article-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 430px;
  object-fit: cover;
  display: block;
  margin: 0 0 42px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.article-body {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.03rem;
  line-height: 1.78;
}

.article-body p,
.article-body ul {
  margin: 0 0 1.25em;
}

.article-body ul {
  padding-left: 1.25rem;
}

.article-body li {
  margin-bottom: 0.55em;
}

.article-body h3 {
  margin: 2.2em 0 0.8em;
  font-size: 1.4rem;
}

.article-body a {
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.footnote {
  color: var(--accent-color);
  font-size: 0.9rem;
}

@media (max-width: 700px) {
  .site-nav-standalone,
  .page-shell {
    width: min(100% - 32px, 880px);
  }

  .site-nav-standalone {
    margin-top: 32px;
  }

  .site-nav-actions {
    gap: 10px;
  }

  .language-switcher {
    font-size: 0.7rem;
  }

  .theme-toggle {
    width: 28px;
    height: 28px;
  }

  .container {
    padding: 60px 20px;
  }

  .site-nav-standalone + .container {
    padding-top: 44px;
  }

  .container h1 {
    font-size: 2.2em;
  }

  .container h2 {
    font-size: 1.5em;
  }

  .experience-timeline {
    padding-left: 30px;
  }

  .experience-item {
    padding-left: 20px;
  }

  .experience-item::before {
    left: -5px;
  }

  .page-shell {
    padding-top: 56px;
  }

  .page-shell .site-nav {
    margin-bottom: 54px;
  }

  .page-shell h1 {
    font-size: 2.1rem;
  }

  .blog-hero {
    margin-bottom: 44px;
  }

  .article-dek {
    font-size: 1rem;
  }

  .post-card {
    grid-template-columns: 104px 1fr;
    gap: 14px;
    padding: 16px 0;
  }

  .post-card img {
    width: 104px;
    height: 78px;
  }

  .post-title {
    font-size: 1.08rem;
  }

  .post-summary {
    font-size: 0.92rem;
  }

  .article-body {
    font-size: 1rem;
  }
}
