/* Shared colors used throughout the page */
:root {
  --background: #0b1220;
  --surface: #111c2e;
  --text: #edf2fa;
  --muted: #b0bdd0;
  --accent: #8ab4ff;
  --border: #2a3950;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10;
  padding: 12px 20px;
  background: var(--accent);
  color: var(--background);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.resume-button {
  margin: 16px 0 0 12px;
  padding: 12px 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
}

.resume-button:hover { text-decoration: underline; }
.resume-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }

/* Include padding and borders in an element's width */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

/* Keep the page centered and comfortable to read */
header,
main,
footer {
  width: min(1100px, 90%);
  margin-inline: auto;
}

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

a:hover {
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}

/* Header and navigation */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-block: 24px;
  border-bottom: 1px solid var(--border);
}

header > a {
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

nav a {
  color: var(--muted);
  font-size: 14px;
}

/* Introductory section */
#home {
  padding-block: 100px;
}

#home > p:first-child {
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

h1 {
  margin-block: 20px 28px;
  font-size: clamp(44px, 7vw, 80px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

#home > p {
  max-width: 640px;
  font-size: 19px;
}

#home > a {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 22px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--background);
  font-size: 16px;
  font-weight: 600;
}

#home > a:hover {
  background: #b0cdff;
  text-decoration: none;
}

/* Remaining content */
section {
  padding-block: 56px;
  scroll-margin-top: 24px;
}

section + section {
  border-top: 1px solid var(--border);
}

h2 {
  margin: 0 0 16px;
  font-size: 30px;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

p {
  max-width: 720px;
  color: var(--muted);
}

footer {
  padding-block: 24px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}

/* Adjust the layout for smaller screens */
@media (max-width: 600px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  #home {
    padding-block: 64px;
  }

  section {
    padding-block: 40px;
  }
}

/* Respect visitors who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Experience cards */
.experience-list {
  display: grid;
  gap: 24px;
  margin-top: 32px;
}

.role {
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.role-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.role h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.4;
}

.role .company {
  margin: 6px 0 0;
  color: var(--accent);
  font-weight: 600;
}

.role-date {
  flex-shrink: 0;
  margin: 4px 0 0;
  font-size: 14px;
}

.role ul {
  max-width: 720px;
  margin-bottom: 0;
  padding-left: 20px;
  color: var(--muted);
}

.role li + li {
  margin-top: 10px;
}

.role li::marker {
  color: var(--accent);
}

@media (max-width: 600px) {
  .role {
    padding: 24px;
  }

  .role-heading {
    flex-direction: column;
    gap: 8px;
  }
}

/* Career focus: two columns on wider screens */
.focus-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  margin-top: 32px;
}

.focus-card {
  padding-top: 24px;
  border-top: 2px solid var(--accent);
}

.focus-card .focus-label {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.focus-card h3 {
  margin: 0 0 20px;
  font-size: 24px;
  line-height: 1.35;
}

.focus-card p:last-child {
  margin-bottom: 0;
}

/* Stack the columns on smaller screens */
@media (max-width: 700px) {
  .focus-grid {
    grid-template-columns: 1fr;
  }
}

/* Skills and credentials */
.skill-list {
  padding-left: 20px;
  color: var(--muted);
}

.skill-list li + li {
  margin-top: 10px;
}

.skill-list li::marker {
  color: var(--accent);
}

.credentials {
  margin-top: 32px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.credentials h3 {
  margin: 0;
  font-size: 20px;
}

.credentials ul {
  margin-bottom: 0;
}

/* Education */
.education-item {
  padding-block: 24px;
}

.education-item + .education-item {
  border-top: 1px solid var(--border);
}

.education-item h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.education-item p {
  margin: 4px 0;
}

.education-date {
  font-size: 14px;
}

/* Contact */
.contact-panel {
  padding: clamp(24px, 5vw, 48px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.contact-panel h2 {
  font-size: clamp(30px, 4vw, 42px);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  margin-top: 28px;
}

.contact-button {
  display: inline-block;
  padding: 12px 22px;
  background: var(--accent);
  color: var(--background);
  border-radius: 6px;
  font-weight: 600;
}

.contact-button:hover {
  background: #b0cdff;
  text-decoration: none;
}

.contact-email {
  margin-top: 24px;
  font-size: 14px;
  overflow-wrap: anywhere;
}

/* Personal wordmark */
header .brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;

  background: var(--accent);
  color: var(--background);
  border-radius: 10px 3px 10px 3px;

  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.08em;
}

.brand-name {
  font-size: 25px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.04em;
}

.brand-surname {
  font-weight: 750;
}

/* Tighter page spacing */
#home {
  padding-block: 56px;
}

section {
  padding-block: 36px;
}

.role {
  padding: 24px;
}

.experience-list {
  gap: 16px;
}

/* Tighter spacing on smaller screens */
@media (max-width: 600px) {
  #home {
    padding-block: 40px;
  }

  section {
    padding-block: 28px;
  }
}

/* Two-column introduction */
#home {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
}

.hero-copy,
.hero-panel {
  min-width: 0;
}

.hero-eyebrow {
  margin: 0 0 20px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.hero-copy h1 {
  margin: 0 0 24px;
  font-size: clamp(40px, 4.6vw, 64px);
}

.hero-intro {
  margin: 0;
  max-width: 600px;
  font-size: 18px;
}

.hero-button {
  display: inline-block;
  margin-top: 28px;
  padding: 12px 22px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--background);
  font-weight: 600;
}

.hero-button:hover {
  background: #b0cdff;
  text-decoration: none;
}

/* Career summary panel */
.hero-panel {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: 12px;
}

.hero-panel h2 {
  margin: 0 0 24px;
  font-size: 22px;
}

.glance-list {
  margin: 0;
}

.glance-list > div + div {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.glance-list dt {
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
}

.glance-list dd {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

/* Stack the introduction and panel on smaller screens */
@media (max-width: 850px) {
  #home {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media print {
  :root {
    --background: #fff;
    --surface: #fff;
    --text: #111;
    --muted: #333;
    --accent: #222;
    --border: #bbb;
  }
  @page { margin: 16mm; }
  body { font-size: 10pt; line-height: 1.45; }
  header, main, footer { width: 100%; }
  header { padding-block: 0 12px; }
  nav, .skip-link, .hero-button, .resume-button, .hero-panel, #about { display: none; }
  #home { display: block; padding-block: 20px; }
  .hero-copy h1 { font-size: 28pt; }
  .hero-intro { font-size: 11pt; }
  section { padding-block: 18px; }
  h2 { font-size: 18pt; }
  .role { padding: 12px 0; border: 0; border-radius: 0; break-inside: avoid; }
  .role h3 { font-size: 13pt; }
  .experience-list { gap: 6px; margin-top: 12px; }
  .role-heading { flex-direction: row; }
  .focus-grid { grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 12px; }
  .focus-card h3 { font-size: 12pt; margin-bottom: 8px; }
  .credentials, .contact-panel { padding: 12px 0; border: 0; }
  .education-item { padding-block: 10px; break-inside: avoid; }
  .contact-links { margin-top: 12px; }
  .contact-button { padding: 0; }
  a { text-decoration: none; }
}

/* Personal projects */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 28px;
}
.project-card {
  min-width: 0;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.project-category {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.project-card h3 {
  margin: 0 0 16px;
  font-size: 24px;
  line-height: 1.3;
}
.project-card > p:not(.project-category) { margin: 0; }
.project-card .project-detail {
  margin-top: 22px !important;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}
@media (max-width: 850px) {
  .project-grid { grid-template-columns: 1fr; }
}
@media print {
  .project-grid { grid-template-columns: 1fr; gap: 10px; margin-top: 12px; }
  .project-card { padding: 12px 0; border: 0; break-inside: avoid; }
  .project-card h3 { font-size: 13pt; margin-bottom: 6px; }
  .project-category { margin-bottom: 4px; }
  .project-card .project-detail { margin-top: 8px !important; padding-top: 0; border: 0; font-size: 10pt; }
}

/* Clickable project previews */
.project-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  color: var(--text);
  transition: border-color 160ms ease, transform 160ms ease;
}
.project-card:hover { border-color: var(--accent); transform: translateY(-3px); text-decoration: none; }
.project-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.project-preview { background: #080f1a; border-bottom: 1px solid var(--border); aspect-ratio: 1.455; overflow: hidden; }
.project-preview img { display: block; width: 100%; height: 100%; object-fit: contain; }
.project-copy { display: flex; flex-direction: column; flex: 1; padding: 24px; }
.project-copy > p:not(.project-category) { margin: 0; }
.project-copy .project-detail { margin-top: auto !important; padding-top: 18px; }
.project-copy > p:not(.project-category):not(.project-detail) { margin-bottom: 22px; }
.project-cta { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; color: var(--accent); font-size: 14px; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .project-card { transition: none; } .project-card:hover { transform: none; } }
@media print { .project-preview, .project-cta { display: none; } .project-card { display: block; padding: 12px 0; } .project-copy { display: block; padding: 0; } .project-copy .project-detail { margin-top: 8px !important; } }
