@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('assets/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #fbf1c7;
  --card: #f9f5d7;
  --fg: #3c3836;
  --muted: #7c6f64;
  --border: #d5c4a1;
  --accent: #076678;
  --max: 760px;
}
[data-theme="dark"] {
  --bg: #282828;
  --card: #3c3836;
  --fg: #ebdbb2;
  --muted: #a89984;
  --border: #504945;
  --accent: #83a598;
}

* { box-sizing: border-box; }

html { font-size: 16px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

header.site-header {
  position: relative;
  text-align: center;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 0 1.5rem;
}

header.site-header .name {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}

header.site-header .role {
  color: var(--muted);
  margin: 0.35rem 0 0;
  font-size: 1rem;
}

nav {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
  border-bottom: 2px dashed var(--border);
  padding-bottom: 0.5rem;
}

nav a {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0.25rem 0;
  text-decoration: underline dashed;
  text-underline-offset: 4px;
  text-decoration-color: transparent;
}
nav a:hover {
  color: var(--fg);
  text-decoration-color: var(--muted);
}
nav a:nth-child(5n+1) { color: #cc241d; }
nav a:nth-child(5n+2) { color: #98971a; }
nav a:nth-child(5n+3) { color: #458588; }
nav a:nth-child(5n+4) { color: #b16286; }
nav a:nth-child(5n+5) { color: #d65d0e; }
[data-theme="dark"] nav a:nth-child(5n+1) { color: #fb4934; }
[data-theme="dark"] nav a:nth-child(5n+2) { color: #b8bb26; }
[data-theme="dark"] nav a:nth-child(5n+3) { color: #83a598; }
[data-theme="dark"] nav a:nth-child(5n+4) { color: #d3869b; }
[data-theme="dark"] nav a:nth-child(5n+5) { color: #fe8019; }

nav a:hover { color: var(--fg); text-decoration: none; }
.theme-toggle {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0.25rem;
  display: inline-flex;
  align-items: center;
}
.theme-toggle:hover { color: var(--fg); }
.theme-toggle svg {
  width: 20px;
  height: 20px;
}
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
.social {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}
.social {
  color: #3c3836;
}
[data-theme="dark"] .social {
  color: aliceblue;
}
.social a {
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.social .label {
  display: inline-block;
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: 0.85rem;
  transition: opacity 0.2s ease, max-width 0.2s ease, margin 0.2s ease;
  margin-left: 0;
}
.social a:hover .label {
  opacity: 1;
  max-width: 90px;
  margin-left: 0.15rem;
}
.social a:hover svg {
  transform: scale(1.2);
}
.social a {
  display: inline-flex;
  align-items: center;
  opacity: 0.75;
}
.social a:hover { opacity: 1; text-decoration: none; }
.social img, .social svg { width: 20px; height: 20px; }

main { padding: 2.5rem 0 4rem; }

section:first-of-type {
  margin-top: 1.25rem;
}
section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem 1.5rem 1rem;
  margin-bottom: 1.25rem;
}

.hicon {
  width: 18px;
  height: 18px;
  vertical-align: -3px;
  margin-right: 0.4rem;
  color: var(--muted);
}
h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--fg);
}

p { margin: 0 0 0.85rem; }

ul { margin: 0 0 0.85rem; padding-left: 1.25rem; }

li { margin-bottom: 0.3rem; }

.entry { margin-bottom: 1.25rem; }
.entry:last-child { margin-bottom: 0; }

.entry h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.2rem;
}

.entry .when {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 0.6rem;
}

.skills-list {
  display: flex;
  flex-direction: column;
}

.skill-row {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}

.skill-row.active-line {
  border-bottom: 1.5px solid var(--accent);
}

.skill-num {
  font-size: 2rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1;
  min-width: 2.5rem;
}

.skill-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.skill-name {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--fg);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.chips span {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  font-size: 0.75rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--muted);
}

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

.contact-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.contact-list svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
  flex-shrink: 0;
}

.contact-list img {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
}

footer {
  padding: 1.5rem 0;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

@media (max-width: 600px) {
  .skills-grid { grid-template-columns: 1fr; }
  header.site-header .name { font-size: 1.6rem; }
  section { padding: 1.25rem; }
}

[data-theme="dark"] .social img,
[data-theme="dark"] .contact-list img {
  filter: invert(1) brightness(0.9);
}
