/* David McLean portfolio: plain CSS port of the original Tailwind design. */

:root {
  --radius: 0.625rem;
  --background: oklch(1 0 0);
  --foreground: oklch(0.129 0.042 264.695);
  --card: oklch(1 0 0);
  --primary: oklch(0.208 0.042 265.755);
  --primary-foreground: oklch(0.984 0.003 247.858);
  --muted: oklch(0.968 0.007 247.896);
  --muted-foreground: oklch(0.554 0.046 257.417);
  --accent: oklch(0.968 0.007 247.896);
  --border: oklch(0.929 0.013 255.508);
  --input: oklch(0.929 0.013 255.508);
  --ring: oklch(0.704 0.04 256.788);
}

:root.dark {
  --background: oklch(0.129 0.042 264.695);
  --foreground: oklch(0.984 0.003 247.858);
  --card: oklch(0.208 0.042 265.755);
  --primary: oklch(0.929 0.013 255.508);
  --primary-foreground: oklch(0.208 0.042 265.755);
  --muted: oklch(0.279 0.041 260.031);
  --muted-foreground: oklch(0.704 0.04 256.788);
  --accent: oklch(0.279 0.041 260.031);
  --border: oklch(1 0 0 / 10%);
  --input: oklch(1 0 0 / 15%);
  --ring: oklch(0.551 0.027 264.364);
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0 solid var(--border);
}

html {
  scroll-behavior: smooth;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background-color: var(--background);
  color: var(--foreground);
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button { background: none; cursor: pointer; }
h1, h2, h3 { font-size: inherit; font-weight: inherit; }

.icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-sm { width: 0.75rem; height: 0.75rem; }

.container {
  max-width: 56rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section { border-bottom: 1px solid color-mix(in oklab, var(--border) 60%, transparent); }
.section-pad { padding-top: 4rem; padding-bottom: 4rem; }

.section-title {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-foreground);
}

.link-hover { transition: color 150ms cubic-bezier(0.4, 0, 0.2, 1); }
.link-hover:hover { color: var(--foreground); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
  background: color-mix(in oklab, var(--background) 80%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.header-inner {
  display: flex;
  height: 3.5rem;
  align-items: center;
  justify-content: space-between;
}
.brand { font-size: 0.875rem; line-height: 1.25rem; font-weight: 600; letter-spacing: -0.025em; }
.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav-links { display: none; align-items: center; gap: 1.5rem; }
.nav-links a { font-size: 0.875rem; line-height: 1.25rem; color: var(--muted-foreground); }

.theme-toggle {
  display: inline-flex;
  width: 2.25rem;
  height: 2.25rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 9999px;
  color: var(--muted-foreground);
  transition: color 150ms cubic-bezier(0.4, 0, 0.2, 1), background-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
.theme-toggle:hover { color: var(--foreground); background: var(--accent); }
.theme-toggle .icon-sun { display: none; }
:root.dark .theme-toggle .icon-moon { display: none; }
:root.dark .theme-toggle .icon-sun { display: block; }

/* Hero */
.hero-inner { padding-top: 5rem; padding-bottom: 5rem; }
.location {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--muted-foreground);
}
.hero h1 {
  max-width: 42rem;
  font-size: 2.25rem;
  line-height: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.hero-lead {
  max-width: 42rem;
  margin-top: 1rem;
  font-size: 1.125rem;
  line-height: 1.625;
  color: var(--muted-foreground);
}
.hero-lead strong { font-weight: 500; color: var(--foreground); }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { background: color-mix(in oklab, var(--primary) 90%, transparent); }
.btn-outline { border: 1px solid var(--border); background: var(--background); color: var(--foreground); }
.btn-outline:hover { background: var(--accent); }

.social { display: flex; align-items: center; gap: 0.25rem; margin-left: 0; }
.social a {
  display: inline-flex;
  width: 2.25rem;
  height: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  color: var(--muted-foreground);
  transition: color 150ms cubic-bezier(0.4, 0, 0.2, 1), background-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
.social a:hover { background: var(--accent); color: var(--foreground); }

/* About */
.about-text {
  max-width: 48rem;
  margin-top: 1rem;
  font-size: 1rem;
  line-height: 1.625;
}
.badges { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  background: var(--card);
  font-size: 0.875rem;
  line-height: 1.25rem;
}
.badge .icon { color: var(--muted-foreground); }

/* Skills */
.skill-groups { margin-top: 1.5rem; }
.skill-groups > * + * { margin-top: 1.25rem; }
.skill-group { display: flex; flex-direction: column; gap: 0.5rem; }
.skill-label {
  display: flex;
  width: 11rem;
  flex-shrink: 0;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
}
.skill-label .icon { color: var(--muted-foreground); }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  background: color-mix(in oklab, var(--muted) 50%, transparent);
  font-size: 0.875rem;
  line-height: 1.25rem;
}

/* Projects */
.project-grid { display: grid; gap: 1rem; margin-top: 1.5rem; }
.project {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  background: var(--card);
  transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
.project:hover { background: color-mix(in oklab, var(--accent) 40%, transparent); }
.project h3 { font-size: 1rem; line-height: 1.5rem; font-weight: 600; }
.project p {
  flex: 1;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.625;
  color: var(--muted-foreground);
}
.tags { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-top: 1rem; }
.tag {
  padding: 0.125rem 0.625rem;
  border-radius: 9999px;
  background: var(--muted);
  font-size: 0.75rem;
  line-height: 1rem;
  color: var(--muted-foreground);
}
.project-links { display: flex; gap: 1rem; margin-top: 1rem; }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  text-underline-offset: 4px;
}
.text-link:hover { text-decoration: underline; }

/* Contact */
.contact-grid { display: grid; gap: 2.5rem; margin-top: 1.5rem; }
.contact-copy { font-size: 1rem; line-height: 1.625; color: var(--muted-foreground); }
.email-link { margin-top: 1rem; gap: 0.5rem; }
.email-link .icon { color: var(--muted-foreground); }
.contact-social { display: flex; align-items: center; gap: 1rem; margin-top: 1.5rem; }
.contact-social a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--muted-foreground);
}

.contact-form > * + * { margin-top: 0.75rem; }
.field {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--input);
  border-radius: calc(var(--radius) - 2px);
  background: var(--background);
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--foreground);
}
.field::placeholder { color: var(--muted-foreground); opacity: 1; }
.field:focus { outline: none; box-shadow: 0 0 0 2px var(--ring); }
textarea.field { resize: none; }
.contact-form .btn { width: 100%; }
.form-note { font-size: 0.875rem; line-height: 1.25rem; color: var(--muted-foreground); }
[hidden] { display: none !important; }

/* Footer */
.site-footer { border-top: 1px solid color-mix(in oklab, var(--border) 60%, transparent); }
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--muted-foreground);
}
.footer-links { display: flex; align-items: center; gap: 1.25rem; }

/* sm breakpoint (640px) */
@media (min-width: 640px) {
  .nav-links { display: flex; }
  .hero-inner { padding-top: 7rem; padding-bottom: 7rem; }
  .hero h1 { font-size: 3rem; line-height: 1; }
  .social { margin-left: 0.5rem; }
  .about-text { font-size: 1.125rem; line-height: 1.625; }
  .skill-group { flex-direction: row; align-items: baseline; gap: 1rem; }
  .project-grid, .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-inner { flex-direction: row; }
}
