/* Reset & base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --text: #1a1a1a;
  --muted: #555;
  --accent: #2563eb;
  --border: #e5e7eb;
  --bg: #ffffff;
  --max-w: 720px;
  --nav-h: 56px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

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

a:hover {
  text-decoration: underline;
}

ul {
  padding-left: 1.25rem;
}

li {
  margin-top: 0.3rem;
}

/* Nav */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
}

.nav-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}

nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 1.75rem;
}

nav ul a {
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 500;
  transition: color 0.15s;
}

nav ul a:hover {
  color: var(--text);
  text-decoration: none;
}

/* Main content */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

/* Hero */
#hero {
  padding: 5rem 0 3.5rem;
  border-bottom: 1px solid var(--border);
}

#hero h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

.hero-links {
  margin-top: 1.1rem;
  font-size: 0.9rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.divider {
  color: #ccc;
}

.hero-resume {
  margin-top: 1.25rem;
}

.resume-link {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.4rem 0.9rem;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}

.resume-link:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

/* Sections */
section {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
}

section:last-of-type {
  border-bottom: none;
}

h2 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.75rem;
}

section > p {
  color: var(--text);
  max-width: 60ch;
}

/* Entries (experience, projects, education) */
.entry {
  margin-bottom: 2rem;
}

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

.entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.entry-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}

.entry-date {
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
}

.entry-links {
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.entry-org,
.entry-meta {
  display: block;
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.15rem;
  margin-bottom: 0.6rem;
}

.entry ul {
  margin-top: 0.5rem;
}

.entry p {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: #333;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.skill-group h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.skill-group p {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Footer */
footer {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3rem;
  font-size: 0.85rem;
  color: var(--muted);
}

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

/* Mobile */
@media (max-width: 600px) {
  nav {
    padding: 0 1rem;
  }

  nav ul {
    gap: 1rem;
  }

  #hero h1 {
    font-size: 1.75rem;
  }

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