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

:root {
  --primary: #7C3AED;
  --primary-light: #EDE9FE;
  --primary-muted: #A78BFA;
  --text: #1E293B;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --bg: #FAFAFA;
  --card: #FFFFFF;
  --border: #E2E8F0;
  --border-light: #F1F5F9;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  max-width: 700px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

/* === Typography === */
h1, h2 {
  font-family: 'Space Grotesk', sans-serif;
}

h1 {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
}

h2 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--primary);
  margin-bottom: 1.25rem;
}

h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px dotted var(--primary-muted);
  border-radius: 3px;
  padding: 1px 5px;
  margin: 0 -5px;
  transition: color 0.25s, border-color 0.25s, background-color 0.25s;
  cursor: pointer;
}

a:hover {
  color: #6D28D9;
  border-bottom-color: transparent;
  background-color: var(--primary-light);
}

/* === Header === */
header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
  padding-bottom: 2.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.header-photo img {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--primary-light);
}

.subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 300;
  color: #374151;
  margin-top: -0.5rem;
  letter-spacing: 0.5px;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1rem;
  font-size: 0.88rem;
}

.contact-links .sep {
  color: var(--border);
}

.contact-links a {
  color: var(--primary);
}

.contact-links span:not(.sep) {
  color: var(--text-secondary);
}

/* === Sections === */
main {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* === Summary === */
#summary p {
  color: var(--text-secondary);
  line-height: 1.8;
}

/* === Skills === */
.skill-group {
  margin-bottom: 1.25rem;
}

.skill-group:last-child {
  margin-bottom: 0;
}

.skill-group h3 {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tags span {
  font-size: 0.82rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--primary-muted);
  border-radius: 20px;
  color: var(--primary);
  line-height: 1.4;
  background: var(--primary-light);
  transition: border-color 0.3s, background-color 0.3s;
}

.tags span {
  cursor: default;
}

.tags span:hover {
  border-color: var(--primary);
  background: #DDD6FE;
}

/* === Experience === */
#experience article {
  margin-bottom: 1.75rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border-light);
}

#experience article:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.role-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.6rem;
}

.role-info h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.4;
}

.role-info .company {
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  display: block;
  margin-top: 0.1rem;
}

.role-info .company a {
  color: var(--text);
}

.role-info .company a:hover {
  color: var(--primary);
}

.role-date {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 0.1rem;
}

#experience ul {
  list-style: none;
  padding-left: 0;
}

#experience li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.35rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

#experience li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--primary-muted);
}

/* === Education === */
#education ul {
  list-style: none;
}

#education li {
  margin-bottom: 0.75rem;
}

#education strong {
  display: block;
  font-weight: 500;
  color: var(--text);
}

#education .institution {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* === Footer === */
footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.download-btn {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.65rem 1.75rem;
  margin: 0;
  border: 1.5px solid var(--primary);
  border-radius: 6px;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: 0.3px;
  transition: all 0.2s;
  cursor: pointer;
}

.download-btn:hover {
  background-color: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

footer p {
  margin-top: 1.25rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

/* === Responsive === */
@media (min-width: 640px) {
  body {
    padding: 4rem 2rem;
  }

  header {
    flex-direction: row;
    text-align: left;
    gap: 1.75rem;
  }

  .header-photo {
    flex-shrink: 0;
  }

  .contact-links {
    justify-content: flex-start;
  }
}

/* === Accessibility === */
a:focus-visible,
.download-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 2px;
}

.company-nolink {
  cursor: not-allowed;
}

@media print {
  .download-btn {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
