/* =========================================================================
   Kevin Major — Resume Site
   ========================================================================= */

:root {
  /* Type scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3.5rem;
  --text-6xl: 5rem;
  --text-7xl: 6.5rem;

  /* Spacing scale (4/8 base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Layout */
  --container: 72rem;
  --container-narrow: 48rem;

  /* Radii */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 20px;

  /* Type families */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Menlo, Monaco, Consolas, monospace;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 150ms;
  --dur: 250ms;
  --dur-slow: 400ms;
}

/* Dark theme (default) */
:root, [data-theme="dark"] {
  --bg: #0A0A0B;
  --bg-elev: #131316;
  --surface: #18181B;
  --surface-hover: #1F1F23;
  --border: #27272A;
  --border-strong: #3F3F46;
  --text: #FAFAFA;
  --text-muted: #A1A1AA;
  --text-faint: #71717A;
  --accent: #60A5FA;
  --accent-soft: rgba(96, 165, 250, 0.12);
  --accent-strong: #93C5FD;
  --success: #34D399;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* Light theme */
[data-theme="light"] {
  --bg: #FAFAFA;
  --bg-elev: #FFFFFF;
  --surface: #FFFFFF;
  --surface-hover: #F4F4F5;
  --border: #E4E4E7;
  --border-strong: #D4D4D8;
  --text: #09090B;
  --text-muted: #52525B;
  --text-faint: #71717A;
  --accent: #2563EB;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --accent-strong: #1D4ED8;
  --success: #059669;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
}

/* =========================================================================
   Reset & base
   ========================================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  font-feature-settings: "cv11", "ss01", "ss03";
  font-variation-settings: "opsz" 32;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100dvh;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}
a:hover { color: var(--accent-strong); }

h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.15;
  color: var(--text);
}

p { color: var(--text-muted); }

::selection { background: var(--accent-soft); color: var(--text); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* =========================================================================
   Layout primitives
   ========================================================================= */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

@media (min-width: 768px) {
  .container { padding-inline: var(--space-8); }
}

section { padding-block: var(--space-24); }
section:first-of-type { padding-top: var(--space-12); }

@media (max-width: 640px) {
  section { padding-block: var(--space-16); }
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: var(--space-4);
}
.section-label::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--border-strong);
}

.section-title {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-12);
  max-width: 36rem;
}

@media (min-width: 768px) {
  .section-title { font-size: var(--text-4xl); }
}

/* =========================================================================
   Nav
   ========================================================================= */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

@media (min-width: 768px) {
  .nav-inner { padding-inline: var(--space-8); }
}

.nav-brand {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--text-sm);
  color: var(--text);
  letter-spacing: 0.02em;
}

.nav-links {
  display: none;
  gap: var(--space-6);
}
@media (min-width: 768px) {
  .nav-links { display: flex; }
}

.nav-links a {
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
}
.theme-toggle:hover {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}
.theme-toggle svg { width: 16px; height: 16px; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* =========================================================================
   Hero
   ========================================================================= */

.hero {
  padding-block: var(--space-24) var(--space-20);
  position: relative;
}

@media (min-width: 768px) {
  .hero { padding-block: var(--space-32) var(--space-24); }
}

.hero-kicker {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-faint);
  margin-bottom: var(--space-5);
  letter-spacing: 0.02em;
}

.hero-name {
  font-size: clamp(3rem, 11vw, var(--text-7xl));
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.95;
  margin-bottom: var(--space-6);
}
.hero-name .accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lede {
  font-size: var(--text-xl);
  color: var(--text-muted);
  max-width: 38rem;
  line-height: 1.5;
  margin-bottom: var(--space-10);
}

@media (min-width: 768px) {
  .hero-lede { font-size: var(--text-2xl); }
}

.hero-stat {
  display: inline-flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-6) var(--space-8);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-10);
  position: relative;
  overflow: hidden;
}
.hero-stat::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-soft), transparent 60%);
  pointer-events: none;
}
.hero-stat-num {
  font-size: var(--text-4xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  font-feature-settings: "tnum";
}
.hero-stat-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  max-width: 28rem;
  line-height: 1.5;
}

@media (min-width: 768px) {
  .hero-stat-num { font-size: var(--text-5xl); }
  .hero-stat-label { font-size: var(--text-base); }
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.hero-meta a { color: var(--text-muted); }
.hero-meta a:hover { color: var(--accent); }
.hero-meta .sep { color: var(--text-faint); }

/* =========================================================================
   About
   ========================================================================= */

.about-grid {
  display: grid;
  gap: var(--space-8);
}

.about-grid p {
  font-size: var(--text-lg);
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 38rem;
}

.about-grid p strong { color: var(--text); font-weight: 500; }

/* =========================================================================
   Highlights
   ========================================================================= */

.highlights {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 640px) {
  .highlights { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .highlights { grid-template-columns: repeat(4, 1fr); }
}

.highlight {
  padding: var(--space-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.highlight:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.highlight-num {
  font-family: var(--font-mono);
  font-size: var(--text-3xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  font-feature-settings: "tnum";
  margin-bottom: var(--space-2);
}
.highlight-num .accent { color: var(--accent); }
.highlight-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.5;
}

/* =========================================================================
   Experience timeline
   ========================================================================= */

.timeline {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.role {
  position: relative;
  padding: var(--space-8);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--dur) var(--ease);
}
.role:hover { border-color: var(--border-strong); }

.role.featured {
  border-color: var(--border-strong);
  background: linear-gradient(135deg, var(--surface), var(--bg-elev));
}

.role-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

@media (min-width: 768px) {
  .role-head {
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--space-4);
  }
}

.role-title {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text);
}
.role-title .at { color: var(--text-faint); font-weight: 400; }
.role-title .company { color: var(--accent); }

.role-period {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-faint);
  letter-spacing: 0.05em;
  white-space: nowrap;
  text-transform: uppercase;
}

.role p {
  font-size: var(--text-base);
  margin-bottom: var(--space-4);
  max-width: 56rem;
}

.role-points {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.role-points li {
  position: relative;
  padding-left: var(--space-5);
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--text-muted);
}
.role-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 12px;
  height: 1px;
  background: var(--border-strong);
}
.role-points li strong { color: var(--text); font-weight: 500; }
.role-points li a { color: var(--accent); }

/* =========================================================================
   Projects
   ========================================================================= */

.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .project-grid { grid-template-columns: repeat(2, 1fr); }
}

.project {
  padding: var(--space-8);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.project:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.project-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-3);
  gap: var(--space-3);
}
.project-name {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text);
}
.project-tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  padding: var(--space-1) var(--space-2);
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
}

.project-tagline {
  font-style: italic;
  color: var(--text-faint);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
}

.project p {
  font-size: var(--text-base);
  line-height: 1.6;
  margin-bottom: var(--space-6);
  flex: 1;
}

.project-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--accent);
  align-self: flex-start;
}
.project-cta:hover { color: var(--accent-strong); }
.project-cta svg {
  width: 14px; height: 14px;
  transition: transform var(--dur-fast) var(--ease);
}
.project-cta:hover svg { transform: translateX(2px) translateY(-2px); }

/* =========================================================================
   Skills
   ========================================================================= */

.skills-groups {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

@media (min-width: 768px) {
  .skills-groups { grid-template-columns: repeat(2, 1fr); }
}

.skill-group h3 {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: var(--space-4);
  font-weight: 500;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  color: var(--text-muted);
  transition: all var(--dur-fast) var(--ease);
}
.tag:hover {
  border-color: var(--border-strong);
  color: var(--text);
  background: var(--surface-hover);
}
.tag.expert {
  color: var(--text);
  border-color: var(--border-strong);
}
.tag.expert::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: var(--space-2);
}

/* =========================================================================
   Languages
   ========================================================================= */

.languages {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
}
.language {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.language-name {
  font-size: var(--text-base);
  color: var(--text);
  font-weight: 500;
}
.language-level {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* =========================================================================
   Contact
   ========================================================================= */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

@media (min-width: 640px) {
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
}

.contact-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  transition: all var(--dur-fast) var(--ease);
}
.contact-card:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
  color: var(--text);
}
.contact-card svg {
  width: 18px; height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.contact-card:hover svg { color: var(--accent); }
.contact-card-label {
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 2px;
}
.contact-card-value {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text);
}

/* =========================================================================
   Quote / testimonial
   ========================================================================= */

.quote {
  padding: var(--space-8);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  font-size: var(--text-lg);
  line-height: 1.6;
  color: var(--text-muted);
  font-style: italic;
}
.quote-attr {
  display: block;
  margin-top: var(--space-4);
  font-style: normal;
  font-size: var(--text-sm);
  color: var(--text-faint);
  font-family: var(--font-mono);
}
.quote-attr a { color: var(--text-muted); }
.quote-attr a:hover { color: var(--accent); }

.quotes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (min-width: 768px) {
  .quotes-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================================
   Footer
   ========================================================================= */

.footer {
  padding-block: var(--space-12);
  border-top: 1px solid var(--border);
  margin-top: var(--space-16);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-faint);
  letter-spacing: 0.04em;
}
.footer-inner a { color: var(--text-faint); }
.footer-inner a:hover { color: var(--accent); }

/* =========================================================================
   Animations
   ========================================================================= */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
