/* Minimal Resume Styles - ATS-Friendly Foundation */

/* Color palette - Nord-inspired */
:root {
  --nord0: #2e3440;
  --nord1: #3b4252;
  --nord2: #434c5e;
  --nord3: #4c566a;
  --nord4: #d8dee9;
  --nord5: #e5e9f0;
  --nord6: #eceff4;
  --nord7: #8fbcbb;
  --nord8: #88c0d0;
  --nord9: #81a1c1;
  --nord10: #5e81ac;
  --nord11: #bf616a;
  --nord12: #d08770;
  --nord13: #ebcb8b;
  --nord14: #a3be8c;
  --nord15: #b48ead;

  --text: var(--nord0);
  --muted: var(--nord2);
  --meta: var(--nord3);
  --border: var(--nord4);
  --surface: var(--nord6);
  --surface-2: var(--nord5);
  --link: var(--nord10);
  --link-hover: var(--nord9);
  --accent: var(--nord10);
}

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

html {
  font-size: 16px;
  line-height: 1.6;
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--nord6);
  max-width: 50rem;
  margin: 0 auto;
  padding: 2rem 1rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-top: 0;
  color: var(--accent);
}

h2 {
  font-size: 1.375rem;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.375rem;
  margin-top: 2rem;
}

h3 {
  font-size: 1.125rem;
  color: var(--text);
}

h4 {
  font-size: 1rem;
  font-weight: 500;
  font-style: normal;
  color: var(--muted);
}

p {
  margin-bottom: 1rem;
  color: var(--text);
}

ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.375rem;
  color: var(--text);
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

/* Resume Structure */
.resume-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.resume-header h1 {
  margin-bottom: 0.25rem;
}

.resume-header .title {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.contact-info {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.9375rem;
}

.contact-info li {
  margin: 0;
}

.contact-info a {
  color: var(--link);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.contact-info .icon {
  display: inline-flex;
  width: 1rem;
  height: 1rem;
  color: currentColor;
}

.contact-info .icon svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

section {
  margin-bottom: 2rem;
}

/* UGtastic Archive */
.page .intro {
  color: var(--muted);
  margin-top: -0.25rem;
}

.video {
  padding: 1rem 0;
  border-bottom: 1px solid var(--surface-2);
  display: grid;
  grid-template-columns: minmax(160px, 240px) 1fr;
  gap: 1rem;
  align-items: start;
}

.video:last-of-type {
  border-bottom: none;
}

.video-thumb {
  display: block;
}

.video-thumb img {
  width: 100%;
  height: auto;
  border-radius: 0.375rem;
  border: 1px solid var(--border);
}

.video-body {
  min-width: 0;
}

.video-title a {
  font-weight: 600;
  font-size: 1.0625rem;
}

.video-meta {
  color: var(--meta);
  font-size: 0.9rem;
  margin-top: 0.125rem;
}

.video-subtitle {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

.video-kind {
  color: var(--accent);
  font-weight: 600;
}

.video-meta a.video-kind {
  text-decoration: none;
}

.video-meta a.video-kind:hover {
  text-decoration: underline;
}

.conference-list {
  display: grid;
  gap: 1rem;
}

.conference-card {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  background: var(--surface);
}

.conference-meta {
  color: var(--muted);
  font-weight: 600;
  margin-top: 0.25rem;
}

.conference-dates {
  color: var(--meta);
  font-size: 0.9rem;
  margin-top: 0.125rem;
}

.conference-count {
  color: var(--accent);
  font-weight: 600;
  margin-top: 0.5rem;
}

.video-actions {
  margin: 0.5rem 0 0.25rem;
}

.video-button {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border: 1px solid var(--accent);
  border-radius: 0.25rem;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
}

.video-button + .video-button {
  margin-left: 0.5rem;
}

.video-button.primary {
  background: var(--accent);
  color: #fff;
}

.video-button.primary:hover {
  background: var(--nord1);
  color: #fff;
}

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

.video-tags {
  margin: 0.5rem 0 0.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.tag {
  background: var(--surface);
  color: var(--accent);
  border: 1px solid var(--border);
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.video-description {
  color: var(--text);
  font-size: 0.95rem;
  margin-top: 0.375rem;
}

.video-description-label {
  color: var(--meta);
  font-weight: 600;
}

.video-transcript {
  margin-top: 0.5rem;
  color: var(--text);
  font-size: 0.95rem;
  white-space: pre-wrap;
}

.video-embed {
  margin-bottom: 1rem;
  background: var(--nord0);
  border-radius: 0.5rem;
  padding: 0.25rem;
}

.video-embed iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 0.375rem;
  border: none;
}

.video-embed video {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 0.375rem;
  border: none;
  display: block;
}

.video.video-detail {
  display: block;
  border-bottom: none;
  padding: 0;
}

.video.video-detail .video-body {
  padding-top: 0.5rem;
}

@media (max-width: 640px) {
  .video {
    grid-template-columns: 1fr;
  }
}

/* Position/Job entries */
.position {
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--surface-2);
}

.position:last-child {
  border-bottom: none;
}

.position-header {
  margin-bottom: 0.625rem;
}

.position-title {
  margin: 0;
  color: var(--text);
}

.position-company {
  font-weight: 600;
  color: var(--muted);
}

.position-meta {
  color: var(--meta);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.position-dates {
  font-style: normal;
  font-weight: 500;
}

/* Skills */
.skills-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skills-list li {
  background: var(--surface-2);
  color: var(--muted);
  padding: 0.3125rem 0.625rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  margin: 0;
  border: 1px solid var(--border);
}

/* Resume Actions Bar */
.resume-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border-radius: 0.375rem;
  border: 1px solid var(--border);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--meta);
  margin-bottom: 1.5rem;
}

.breadcrumbs a {
  color: var(--accent);
  font-weight: 600;
}

.breadcrumbs-separator {
  color: var(--border);
}

.breadcrumbs-current {
  color: var(--muted);
  font-weight: 600;
}

.home-resume {
  margin: 1.5rem 0 2rem;
}

.home-resume-link {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border: 2px solid var(--accent);
  border-radius: 0.375rem;
  font-weight: 700;
  color: var(--accent);
}

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

.home-links h2 {
  margin-top: 0;
}

.home-intro {
  color: var(--muted);
}

.home-hero {
  display: grid;
  gap: 1.5rem;
  margin: 1.5rem 0 2rem;
}

.home-hero-media img {
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
}

.home-caption {
  font-size: 0.85rem;
  color: var(--meta);
  margin-top: 0.375rem;
}

.home-hero-actions {
  display: grid;
  gap: 0.5rem;
}

.home-resume-note {
  color: var(--meta);
  font-size: 0.95rem;
}

.home-list {
  list-style: none;
  padding: 0;
}

.home-list li {
  margin-bottom: 0.5rem;
}

@media (min-width: 720px) {
  .home-hero {
    grid-template-columns: 2fr 1fr;
    align-items: start;
  }
}

.home-list {
  list-style: none;
  padding: 0;
}

.home-list li {
  margin-bottom: 0.5rem;
}

.resume-actions button,
.resume-actions a {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.resume-actions a.resume-actions-primary {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 0 0 2px rgba(136, 192, 208, 0.35);
}

.resume-actions a.resume-actions-primary:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 2px rgba(136, 192, 208, 0.5);
}

.resume-actions button:hover,
.resume-actions a:hover {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--accent);
}

/* Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  text-decoration: none;
  z-index: 100;
  border-radius: 0 0 0.25rem 0;
}

.skip-link:focus {
  top: 0;
}

:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

/* Archive & Posts */
.archive-note {
  background: var(--nord13);
  border: 1px solid var(--nord12);
  border-left: 4px solid var(--nord12);
  border-radius: 0.25rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
}

.archive-note p {
  margin: 0;
  color: var(--nord1);
}

.post-list {
  list-style: none;
  padding: 0;
}

.post-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--surface-2);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.post-list li:last-child {
  border-bottom: none;
}

.post-list a {
  font-weight: 500;
}

.post-meta {
  color: var(--meta);
  font-size: 0.875rem;
}

.post-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.post-header h1 {
  margin-bottom: 0.5rem;
}

.post-header .post-meta {
  margin-bottom: 1rem;
}

/* Code blocks */
pre {
  background: var(--nord0);
  color: var(--nord4);
  padding: 1rem;
  border-radius: 0.375rem;
  overflow-x: auto;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

code {
  font-family: "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.875em;
}

p code,
li code {
  background: var(--surface-2);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  color: var(--text);
}

pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* LinkedIn Export */
.linkedin-roles {
  display: grid;
  gap: 1.5rem;
}

.linkedin-card {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  background: var(--surface);
}

.linkedin-card-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.linkedin-card-header h3 {
  margin: 0;
  font-size: 1.0625rem;
}

.linkedin-dates {
  color: var(--meta);
  font-size: 0.9rem;
  white-space: nowrap;
}

.linkedin-card-actions {
  margin-bottom: 0.75rem;
}

.linkedin-copy-btn {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--accent);
  border-radius: 0.25rem;
  background: #fff;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.linkedin-copy-btn:hover {
  background: var(--accent);
  color: #fff;
}

.linkedin-copy-btn.copied {
  background: var(--nord14);
  border-color: var(--nord14);
  color: #fff;
}

.linkedin-textarea {
  width: 100%;
  min-height: 180px;
  font-family: "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  background: #fff;
  resize: vertical;
  box-sizing: border-box;
}

.linkedin-textarea-skills {
  min-height: 120px;
}

.linkedin-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.75rem;
}

.linkedin-all-skills {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
}

.linkedin-all-skills h2 {
  margin-top: 0;
}

@media print {
  .linkedin-roles,
  .linkedin-all-skills {
    display: none;
  }
}

/* Print styles */
@media print {
  body {
    max-width: none;
    padding: 0;
    font-size: 11pt;
  }

  h1, h2, h3, h4 {
    color: #000;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  .skip-link,
  .no-print {
    display: none;
  }

  .resume-header {
    border-bottom-color: #ccc;
  }

  h2 {
    border-bottom-color: #000;
  }

  .position {
    page-break-inside: auto;
    break-inside: auto;
    border-bottom-color: #ddd;
  }

  h2, h3, h4 {
    page-break-after: avoid;
    break-after: avoid-page;
  }

  .skills-list {
    gap: 0.25rem;
  }

  .skills-list li {
    background: none;
    border: none;
    padding: 0;
    font-size: 10pt;
  }

  .skills-list li::after {
    content: ",";
  }

  .skills-list li:last-child::after {
    content: "";
  }
}
