/* Lauritzkean Eric Cayobit, portfolio styles */

/* Fonts (self-hosted, SIL Open Font License; see assets/fonts/LICENSE-*.txt) */

@font-face {
  font-family: "Space Grotesk";
  src: url("assets/fonts/space-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("assets/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  /* Color (light palette) */
  --color-bg: #f6f7fb;
  --color-text: #161a2b;
  --color-muted: #535a73;
  --color-border: #dcdfeb;
  --color-surface: #ffffff;
  --color-band-alt: #eaedf7;
  --color-accent: #4338ca;
  --color-dot: rgba(40, 50, 100, 0.14);

  /* Header band */
  --header-bg: #312e81;
  --header-text: #ffffff;
  --header-muted: #c7d2fe;
  --header-link: #e0e7ff;
  --header-dot: rgba(255, 255, 255, 0.1);
  --header-border: transparent;
  --avatar-bg: #4f46e5;
  --avatar-ring: rgba(255, 255, 255, 0.35);

  /* Skill group colors */
  --group-1: #0369a1; /* Front End */
  --group-2: #047857; /* Back End */
  --group-3: #b45309; /* Cloud */
  --group-4: #1d4ed8; /* Database */
  --group-5: #6d28d9; /* Architecture */
  --group-6: #4d7c0f; /* Infrastructure */
  --group-7: #be123c; /* SDLC */
  --group-8: #a21caf; /* AI */

  /* Type */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-display: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --text-name: clamp(2.25rem, 1.6rem + 3vw, 3.25rem);
  --text-heading: 1.5rem;
  --text-lead: 1.125rem;
  --text-body: 1.0625rem;
  --text-meta: 0.875rem;

  /* Space */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;

  /* Layout */
  --measure: 48rem;
  --gutter: 1.25rem;
  --tap-target: 2.75rem; /* 44px */
  --dot-spacing: 22px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0d1017;
    --color-text: #e8eaf3;
    --color-muted: #9aa1b9;
    --color-border: #272c3b;
    --color-surface: #1b2033;
    --color-band-alt: #141828;
    --color-accent: #a5b4fc;
    --color-dot: rgba(255, 255, 255, 0.07);

    --header-bg: #181b36;
    --header-text: #eef0fb;
    --header-muted: #a5b4fc;
    --header-link: #c7d2fe;
    --header-dot: rgba(255, 255, 255, 0.06);
    --header-border: #272c3b;
    --avatar-bg: #3730a3;
    --avatar-ring: rgba(255, 255, 255, 0.2);

    --group-1: #7dd3fc;
    --group-2: #6ee7b7;
    --group-3: #fcd34d;
    --group-4: #93c5fd;
    --group-5: #c4b5fd;
    --group-6: #bef264;
    --group-7: #fda4af;
    --group-8: #f0abfc;
  }
}

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

html {
  background-color: var(--color-bg);
  background-image: radial-gradient(circle at 1px 1px, var(--color-dot) 1px, transparent 0);
  background-size: var(--dot-spacing) var(--dot-spacing);
  color: var(--color-text);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-size: var(--text-body);
}

.container {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

h1,
h2,
h3,
p,
ul,
dl,
dd {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
}

ul {
  padding: 0;
  list-style: none;
}

/* Links */

a {
  color: var(--color-accent);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

.links a,
.project-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--tap-target);
  min-height: var(--tap-target);
}

.links a,
.project-links a {
  gap: var(--space-2);
  text-decoration-line: none;
}

.links a:hover,
.project-links a:hover {
  text-decoration-line: underline;
}

/* Icons (single color, inherit the surrounding text color) */

.icon {
  flex: none;
  width: 1.125em;
  height: 1.125em;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Header band */

.site-header {
  background-color: var(--header-bg);
  background-image: radial-gradient(circle at 1px 1px, var(--header-dot) 1px, transparent 0);
  background-size: var(--dot-spacing) var(--dot-spacing);
  border-bottom: 1px solid var(--header-border);
  color: var(--header-text);
}

.header-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-5);
  padding-block: var(--space-7) var(--space-6);
}

.avatar {
  flex: none;
  width: 5.5rem;
  height: 5.5rem;
  border: 3px solid var(--avatar-ring);
  border-radius: 50%;
  background: var(--avatar-bg);
  object-fit: cover;
}


h1 {
  font-size: var(--text-name);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.title {
  margin-top: var(--space-2);
  color: var(--header-muted);
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
}

.site-header a {
  color: var(--header-link);
}

.site-header a:focus-visible {
  outline-color: var(--header-link);
}

.links {
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--space-5);
  margin-top: var(--space-3);
}

/* Sections (full-width bands; every other band gets the second background) */

.band {
  padding-block: var(--space-7);
}

.band-alt {
  background: var(--color-band-alt);
}

h2 {
  margin-bottom: var(--space-4);
  font-size: var(--text-heading);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

h2::before {
  content: "// " / "";
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-weight: 500;
}

/* Bio */

.bio p {
  font-size: var(--text-lead);
}

.bio p + p {
  margin-top: var(--space-4);
}

/* Tech stack and skills */

.skills {
  --pill-height: 2rem;
  display: grid;
  gap: var(--space-5);
}

.skills > div:nth-child(1) { --group: var(--group-1); }
.skills > div:nth-child(2) { --group: var(--group-2); }
.skills > div:nth-child(3) { --group: var(--group-3); }
.skills > div:nth-child(4) { --group: var(--group-4); }
.skills > div:nth-child(5) { --group: var(--group-5); }
.skills > div:nth-child(6) { --group: var(--group-6); }
.skills > div:nth-child(7) { --group: var(--group-7); }
.skills > div:nth-child(8) { --group: var(--group-8); }

.skills dt {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
}

.skills dt::before {
  content: "";
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--group);
}

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

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.3em 0.8em;
  border: 1px solid var(--color-border);
  border-color: color-mix(in srgb, var(--group) 30%, transparent);
  border-radius: 999px;
  background: var(--color-surface);
  background: color-mix(in srgb, var(--group) 9%, var(--color-surface));
  font-size: 0.9375rem;
  line-height: 1.4;
}

.pill .icon {
  color: var(--group);
}

/* Projects */

.project {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  background: var(--color-surface);
}

.project + .project {
  margin-top: var(--space-6);
}

/* Screenshot fades into the card at its bottom edge (no blur) */
.project-shot {
  display: block;
  width: 100%;
  height: auto;
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent);
  mask-image: linear-gradient(to bottom, #000 60%, transparent);
}

.project-body {
  padding: var(--space-4);
}

.project-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
}

h3 {
  font-size: var(--text-lead);
  font-weight: 600;
  line-height: 1.35;
}

.project-status {
  padding: 0 var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.project-description {
  margin-top: var(--space-2);
}

.project-tech {
  --group: var(--color-accent);
  margin-top: var(--space-3);
}

.project-tech .pill {
  font-size: 0.8125rem;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--space-5);
  margin-top: var(--space-2);
}

/* Certifications */

.certs {
  display: grid;
  gap: var(--space-3);
}

.cert {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  height: 100%;
  min-height: var(--tap-target);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  background: var(--color-surface);
  color: var(--color-text);
  text-decoration-line: none;
}

.cert:hover {
  border-color: var(--color-accent);
}

.cert:focus-visible {
  border-radius: 0.5rem;
}

.cert > .icon {
  width: 1.5rem;
  height: 1.5rem;
}

.cert > .icon:first-child {
  color: var(--color-accent);
}

.cert-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.cert-name {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
}

.cert-issuer {
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.cert > .cert-arrow {
  width: 1rem;
  height: 1rem;
  color: var(--color-accent);
}

/* Footer */

footer {
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

footer p {
  padding-block: var(--space-6);
}

/* Wider screens */

@media (min-width: 40em) {
  .header-inner {
    flex-direction: row;
    align-items: center;
    gap: var(--space-6);
    padding-block: var(--space-8) var(--space-7);
  }

  .avatar {
    width: 8rem;
    height: 8rem;
  }


  /* Label and pills start at the top of the row; the label is centered on the first row of pills */
  .skills > div {
    display: grid;
    grid-template-columns: 8rem 1fr;
    column-gap: var(--space-5);
    align-items: start;
  }

  .skills dt {
    min-height: var(--pill-height);
    margin-bottom: 0;
  }

  .skills .pill {
    min-height: var(--pill-height);
  }

  .project-body {
    padding: var(--space-5);
  }

  .certs {
    grid-template-columns: 1fr 1fr;
  }
}
