*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Trebuchet MS", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}

.theme-toggle-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
  padding: 0;
}

:root {
  --bg: #f6f4f1;
  --surface: #ffffff;
  --text: #1c1a17;
  --muted: #5a5852;
  --border: #e1ddd6;
  --accent: #2c2b29;
  --focus: #b45309;
  --toggle-sun-opacity: 0;
  --toggle-moon-opacity: 1;
  --toggle-sun-color: var(--text);
  --toggle-moon-color: var(--text);
  --toggle-sun-z: 1;
  --toggle-moon-z: 0;
  --toggle-sun-pointer: auto;
  --toggle-moon-pointer: none;
  --link-underline: rgba(28, 26, 23, 0.25);
  --link-hover-bg: rgba(44, 43, 41, 0.08);
}

:root[data-theme="dark"] {
  --bg: #121212;
  --surface: #1b1b1b;
  --text: #f3f2ee;
  --muted: #b5b2ab;
  --border: #2a2a2a;
  --accent: #e3ded6;
  --focus: #f59e0b;
  --toggle-sun-opacity: 1;
  --toggle-moon-opacity: 0;
  --toggle-sun-color: var(--text);
  --toggle-moon-color: var(--text);
  --toggle-sun-z: 0;
  --toggle-moon-z: 1;
  --toggle-sun-pointer: none;
  --toggle-moon-pointer: auto;
  --link-underline: rgba(243, 242, 238, 0.28);
  --link-hover-bg: rgba(227, 222, 214, 0.12);
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
}

.container {
  width: min(100% - 2rem, 70rem);
  margin: 0 auto;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 0;
}

main {
  flex: 1;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

h1 {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 2.6rem);
}

.role {
  margin: 0.15rem 0 0.3rem;
  color: var(--muted);
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.8rem;
}

.contact {
  font-style: normal;
}

.contact-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.contact-list svg {
  width: 1rem;
  height: 1rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  flex: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-list .icon-linkedin {
  fill: currentColor;
  stroke: none;
}

.contact-list .icon-github {
  fill: currentColor;
  stroke: none;
}

.contact-link,
.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.15rem 0.3rem;
  color: var(--text);
  text-decoration: none;
  box-shadow: none;
  text-shadow: none;
  transition: color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.contact-link:hover,
.contact-link:focus-visible {
  color: var(--accent);
  background-color: var(--link-hover-bg);
  box-shadow: inset 0 -2px 0 currentColor;
  text-shadow: 0.35px 0 0 currentColor, -0.35px 0 0 currentColor;
}


.theme-toggle {
  position: relative;
  width: 1.8rem;
  height: 1.8rem;
}

.toggle-icon {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.toggle-icon svg {
  width: 1.6rem;
  height: 1.6rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
}

.toggle-moon svg {
  fill: currentColor;
  stroke: none;
}

.toggle-sun {
  color: var(--toggle-sun-color);
  z-index: var(--toggle-sun-z);
  pointer-events: var(--toggle-sun-pointer);
  opacity: var(--toggle-sun-opacity);
  transition: opacity 160ms ease;
}

.toggle-moon {
  color: var(--toggle-moon-color);
  z-index: var(--toggle-moon-z);
  pointer-events: var(--toggle-moon-pointer);
  opacity: var(--toggle-moon-opacity);
  transition: opacity 160ms ease;
}

#theme-toggle:focus-visible + .page .theme-toggle {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
  border-radius: 999px;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 1.5rem;
  padding: 0.6rem 0 0.8rem;
}

section h2 {
  margin: 0 0 0.6rem;
  font-size: 1.35rem;
}

.summary-section {
  padding: 0.6rem 0 0.3rem;
}

.summary-section .summary {
  margin: 0;
  max-width: 60rem;
  line-height: 1.45;
  color: var(--text);
}

.skills-section {
  padding: 0.6rem 0 0.3rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  align-items: start;
}

.skills-group {
  display: grid;
  gap: 0.3rem;
  margin-bottom: 0;
  align-content: start;
}

.skills-group h3 {
  margin: 0 0 0.2rem;
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  line-height: 1.1;
  white-space: nowrap;
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.65rem;
}

.card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  padding: 0.5rem 0.65rem;
}

.card-header h3 {
  margin: 0 0 0.25rem;
  font-size: 0.98rem;
}

.meta {
  margin: 0 0 0.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.bullets {
  margin: 0.3rem 0 0;
  padding-left: 1.1rem;
}

.bullets li {
  margin-bottom: 0.2rem;
}

.skills {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.35rem;
  font-size: 0.8rem;
  color: var(--text);
}

.skills li {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  line-height: 1.2;
}


.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 0.4rem 0 0.5rem;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}


a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 9999;
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .header-top {
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    padding-right: 2.4rem;
  }

  .theme-toggle {
    position: absolute;
    right: 0;
    top: 0;
  }

  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 640px) {
  .skills-group h3 {
    white-space: normal;
  }

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

  .main-grid {
    padding: 1rem 0 1.25rem;
  }

  .footer-content {
    flex-direction: column;
    align-items: flex-start;
  }
}
