/* Portfolio: ffelixlucas.github.io
   Visual direction: warm paper + ink, bold type, minimal but intentional motion */

:root {
  --bg: #f6f1ea;
  --bg-2: #f1ede6;
  --ink: #11100f;
  --muted: rgba(17, 16, 15, 0.72);
  --faint: rgba(17, 16, 15, 0.12);
  --card: rgba(255, 255, 255, 0.68);
  --card-strong: rgba(255, 255, 255, 0.92);

  --a: #1e7f72; /* teal */
  --b: #d0653f; /* copper */
  --c: #1f6feb; /* cobalt */

  --shadow: 0 18px 45px rgba(0, 0, 0, 0.12);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.1);

  --radius: 18px;
  --radius-sm: 12px;

  --font-body: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
  --font-display: "Fraunces", ui-serif, Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --container: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: light;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(900px circle at 20% -10%, color-mix(in srgb, var(--a) 36%, transparent), transparent 60%),
    radial-gradient(800px circle at 92% 18%, color-mix(in srgb, var(--b) 30%, transparent), transparent 58%),
    radial-gradient(720px circle at 80% 110%, color-mix(in srgb, var(--c) 22%, transparent), transparent 55%),
    repeating-linear-gradient(135deg, rgba(17, 16, 15, 0.03) 0 1px, transparent 1px 10px),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 55%, var(--bg) 100%);
  line-height: 1.55;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

button,
input,
textarea {
  font: inherit;
}

::selection {
  background: color-mix(in srgb, var(--b) 22%, transparent);
}

.container {
  width: min(var(--container), calc(100% - 40px));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--card-strong);
  box-shadow: var(--shadow-soft);
  transform: translateY(-140%);
  transition: transform 160ms ease;
  z-index: 9999;
}
.skip-link:focus {
  transform: translateY(0);
  outline: 3px solid color-mix(in srgb, var(--c) 45%, transparent);
  outline-offset: 2px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(246, 241, 234, 0.72);
  border-bottom: 1px solid rgba(17, 16, 15, 0.08);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}
.brand__name,
.footer__brand {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.brand__dot {
  color: var(--b);
}

.nav__menu {
  display: flex;
  align-items: center;
}
.nav__list {
  display: flex;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__link {
  display: inline-flex;
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--muted);
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}
.nav__link:hover {
  color: var(--ink);
  background: rgba(17, 16, 15, 0.06);
}
.nav__link.is-active {
  color: var(--ink);
  background: rgba(17, 16, 15, 0.09);
}

.nav__toggle,
.nav__close {
  display: none;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  border-radius: 12px;
}
.nav__toggle:hover,
.nav__close:hover {
  background: rgba(17, 16, 15, 0.06);
}

/* Sections */
.section {
  padding: clamp(64px, 8vh, 104px) 0;
}
.section--hero {
  padding-top: clamp(68px, 10vh, 120px);
}
.section__header {
  margin-bottom: 26px;
}
.section__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: clamp(28px, 3.2vw, 42px);
}
.section__subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 60ch;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(17, 16, 15, 0.14);
  background: rgba(255, 255, 255, 0.65);
  color: var(--ink);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.85);
}
.btn:active {
  transform: translateY(0);
}
.btn--solid {
  background: linear-gradient(135deg, color-mix(in srgb, var(--a) 84%, #ffffff 16%), color-mix(in srgb, var(--c) 72%, #ffffff 28%));
  border-color: rgba(17, 16, 15, 0.08);
  color: #0a0d0b;
}
.btn--solid:hover {
  background: linear-gradient(135deg, color-mix(in srgb, var(--a) 74%, #ffffff 26%), color-mix(in srgb, var(--c) 62%, #ffffff 38%));
}
.btn--ghost {
  background: transparent;
}
.btn--mini {
  padding: 10px 12px;
  font-size: 14px;
}

.icon-link {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(17, 16, 15, 0.14);
  background: rgba(255, 255, 255, 0.55);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.icon-link:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

/* Hero */
.hero__grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 26px;
  align-items: start;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 12px;
  color: rgba(17, 16, 15, 0.65);
  padding: 10px 12px;
  border: 1px solid rgba(17, 16, 15, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
}

.hero__title {
  margin: 18px 0 0;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: clamp(34px, 4.2vw, 56px);
  line-height: 1.05;
}
.hero__accent {
  background: linear-gradient(90deg, color-mix(in srgb, var(--b) 70%, transparent), color-mix(in srgb, var(--c) 70%, transparent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__lead {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 18px;
  max-width: 62ch;
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}
.hero__links {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.hero__side {
  display: grid;
  gap: 14px;
}

.portrait {
  border-radius: calc(var(--radius) + 8px);
  overflow: hidden;
  border: 1px solid rgba(17, 16, 15, 0.12);
  box-shadow: var(--shadow);
  background: rgba(255, 255, 255, 0.6);
}
.portrait img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.02);
}

.hero__meta {
  border-radius: var(--radius);
  border: 1px solid rgba(17, 16, 15, 0.12);
  background: rgba(255, 255, 255, 0.62);
  padding: 14px 14px;
  box-shadow: var(--shadow-soft);
}

.meta__line {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.meta__line + .meta__line {
  margin-top: 10px;
}
.meta__line--muted {
  color: rgba(17, 16, 15, 0.72);
  font-size: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(17, 16, 15, 0.1);
  background: rgba(255, 255, 255, 0.65);
  font-size: 13px;
}

.hero__highlights {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.highlight {
  border-radius: var(--radius);
  padding: 16px 16px;
  border: 1px solid rgba(17, 16, 15, 0.12);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadow-soft);
}
.highlight__title {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.highlight__text {
  margin: 8px 0 0;
  color: var(--muted);
}

/* About */
.about {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 18px;
  align-items: start;
}
.about__copy {
  border-radius: var(--radius);
  border: 1px solid rgba(17, 16, 15, 0.12);
  background: rgba(255, 255, 255, 0.62);
  padding: 18px 18px;
  box-shadow: var(--shadow-soft);
}
.about__copy p {
  margin: 0;
  color: rgba(17, 16, 15, 0.82);
  font-size: 16px;
}
.about__copy p + p {
  margin-top: 12px;
}
.about__note {
  font-weight: 500;
}

.about__facts {
  display: grid;
  gap: 12px;
}
.fact {
  border-radius: var(--radius);
  border: 1px solid rgba(17, 16, 15, 0.12);
  background: rgba(255, 255, 255, 0.62);
  padding: 16px 16px;
  box-shadow: var(--shadow-soft);
}
.fact__big {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.fact__small {
  margin: 6px 0 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

/* Chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid rgba(17, 16, 15, 0.12);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

/* Projects */
.projects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.project {
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
  border: 1px solid rgba(17, 16, 15, 0.12);
  background: rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-soft);
  display: grid;
  grid-template-rows: 120px 1fr;
}

.project__cover {
  background:
    radial-gradient(800px circle at 18% 10%, color-mix(in srgb, var(--p1) 55%, transparent), transparent 55%),
    radial-gradient(800px circle at 92% 22%, color-mix(in srgb, var(--p2) 55%, transparent), transparent 60%),
    linear-gradient(180deg, rgba(17, 16, 15, 0.06), rgba(17, 16, 15, 0));
  position: relative;
  border-bottom: 1px solid rgba(17, 16, 15, 0.08);
}

.project__mark {
  position: absolute;
  left: 14px;
  bottom: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 9px 10px;
  border-radius: 999px;
  border: 1px solid rgba(17, 16, 15, 0.14);
  background: rgba(255, 255, 255, 0.75);
}

.project__body {
  padding: 16px 16px 18px;
  display: grid;
  gap: 10px;
}
.project__title {
  margin: 0;
  font-weight: 800;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}
.project__desc {
  margin: 0;
  color: var(--muted);
}
.project__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(17, 16, 15, 0.12);
  background: rgba(255, 255, 255, 0.62);
}
.project__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
}

.projects__more {
  margin: 18px 0 0;
  color: var(--muted);
}
.projects__more a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* Contact */
.contact {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  align-items: start;
}

.contact__cards {
  display: grid;
  gap: 12px;
}
.contact-card {
  border-radius: var(--radius);
  border: 1px solid rgba(17, 16, 15, 0.12);
  background: rgba(255, 255, 255, 0.62);
  padding: 16px 16px;
  box-shadow: var(--shadow-soft);
}
.contact-card__title {
  margin: 0;
  font-weight: 600;
  display: inline-flex;
  gap: 10px;
  align-items: center;
}
.contact-card__value {
  margin: 10px 0 0;
  color: rgba(17, 16, 15, 0.8);
  font-family: var(--font-mono);
  font-size: 13px;
}
.contact-card__actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.contact__form {
  border-radius: var(--radius);
  border: 1px solid rgba(17, 16, 15, 0.12);
  background: rgba(255, 255, 255, 0.62);
  padding: 16px 16px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 12px;
}
.form__hint {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.field {
  display: grid;
  gap: 8px;
}
.field > span {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(17, 16, 15, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
input,
textarea {
  border-radius: 14px;
  border: 1px solid rgba(17, 16, 15, 0.14);
  padding: 12px 12px;
  background: rgba(255, 255, 255, 0.8);
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
input:focus,
textarea:focus {
  border-color: color-mix(in srgb, var(--c) 40%, rgba(17, 16, 15, 0.14));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 18%, transparent);
}

/* Footer */
.footer {
  border-top: 1px solid rgba(17, 16, 15, 0.08);
  background: rgba(246, 241, 234, 0.72);
  padding: 22px 0;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.footer__brand {
  margin: 0;
}
.footer__meta {
  margin: 0;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.footer__meta a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.footer__sep {
  opacity: 0.6;
}

/* Scroll top */
.scrolltop {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(17, 16, 15, 0.14);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease, background 160ms ease;
}
.scrolltop.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.scrolltop:hover {
  background: rgba(255, 255, 255, 0.92);
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(12px);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(17, 16, 15, 0.14);
  box-shadow: var(--shadow-soft);
  border-radius: 999px;
  padding: 10px 14px;
  color: rgba(17, 16, 15, 0.8);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}
.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 520ms ease, transform 520ms ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition-duration: 0ms !important;
    animation-duration: 0ms !important;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* Responsive */
@media (max-width: 980px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }
  .hero__side {
    grid-template-columns: 0.85fr 1.15fr;
    align-items: stretch;
  }
  .hero__highlights {
    grid-template-columns: 1fr;
  }
  .about {
    grid-template-columns: 1fr;
  }
  .contact {
    grid-template-columns: 1fr;
  }
  .projects {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .nav__toggle {
    display: inline-flex;
  }
  .nav__menu {
    position: fixed;
    inset: 0;
    padding: 18px;
    display: grid;
    align-content: start;
    gap: 14px;
    background: rgba(246, 241, 234, 0.86);
    backdrop-filter: blur(10px);
    transform: translateX(105%);
    transition: transform 220ms ease;
  }
  .nav__menu.is-open {
    transform: translateX(0);
  }
  .nav__list {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-top: 8px;
  }
  .nav__link {
    font-size: 18px;
    padding: 12px 14px;
  }
  .nav__close {
    display: inline-flex;
    justify-self: end;
  }
  .projects {
    grid-template-columns: 1fr;
  }
  .hero__side {
    grid-template-columns: 1fr;
  }
}

