/* =========================================================
   febwebdev
   Portfolio styles: friendly look + work log
   ========================================================= */

:root {
  --sky: #f3f7fc;
  --white: #ffffff;
  --navy: #1b2a4a;
  --navy-2: #24365a;
  --navy-line: #2f4266;
  --ink-soft: #3f4d68;
  --on-navy: #e6edf3;
  --on-navy-muted: #c9d4e4;
  --on-navy-faint: #a9b8cf;
  --sun: #ffd166;
  --sun-ink: #3a2e00;
  --blush: #fde0db;
  --blush-ink: #4a2620;
  --mist: #e3ecf7;
  --line: #d6e1ee;
  --accent: #c9412f;
  --green: #237a4b;

  --font-display: "Young Serif", Georgia, "Times New Roman", serif;
  --font-body: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Martian Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --container: 1180px;
  --header-height: 76px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
}

body {
  margin: 0;
  color: var(--navy);
  background: var(--sky);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

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

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.1;
  text-wrap: balance;
}

p {
  margin: 0;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: min(100% - 48px, var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--navy);
  color: var(--white);
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.01em;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(243, 247, 252, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 10px 24px -20px rgba(27, 42, 74, 0.5);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-height);
}

.brand {
  font-family: var(--font-display);
  font-size: 1.75rem;
  text-decoration: none;
}

.brand span {
  color: var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px 24px;
  font-weight: 500;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.site-nav .nav-cta {
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--white);
}

.site-nav .nav-cta:hover {
  text-decoration: none;
  background: #0d1630;
}

.nav-toggle {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
}

.nav-toggle-lines {
  display: grid;
  gap: 4px;
}

.nav-toggle-lines span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 200ms ease, opacity 200ms ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-lines span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-lines span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-lines span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---------- Buttons & chips ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 26px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 150ms ease, background-color 150ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--accent);
  color: var(--white);
}

.button-secondary {
  background: var(--white);
  border-color: var(--navy);
  color: var(--navy);
}

.button-dark {
  background: var(--navy);
  color: var(--white);
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  white-space: nowrap;
}

.chip-fixed { background: var(--green); color: var(--white); }
.chip-shipped { background: var(--sun); color: var(--navy); }
.chip-demo { background: #b4c8ff; color: var(--navy); }
.chip-dark { background: var(--navy); color: var(--white); }

.hl {
  background: var(--sun);
  padding: 0 0.12em;
  border-radius: 6px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ---------- Hero ---------- */

.hero {
  padding: 40px 0 80px;
}

.hero-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: center;
}

.hero-copy {
  flex: 999 1 540px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-copy .mono {
  color: #4a5a78;
}

.hero h1 {
  font-size: clamp(2.5rem, 5.4vw, 4.4rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.hero-lede {
  max-width: 56ch;
  font-size: 1.18rem;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-art {
  flex: 1 1 340px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.avatar-wrap {
  position: relative;
  width: 300px;
  max-width: 100%;
  height: 280px;
}

.avatar {
  position: absolute;
  left: 0;
  top: 10px;
  width: 260px;
  height: 260px;
  margin: 0;
  border-radius: 50%;
  background: var(--sun);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sticker-stat {
  position: absolute;
  right: 0;
  top: 0;
  padding: 12px 16px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 16px 30px -18px rgba(27, 42, 74, 0.45);
  transform: rotate(3deg);
}

.sticker-stat strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.75rem;
  line-height: 1.2;
}

.sticker-stat span {
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.sticker-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  width: 100%;
}

.status-card,
.learning-card {
  flex: 1 1 200px;
  max-width: 260px;
}

.status-card {
  overflow: hidden;
  border-radius: 14px;
  background: var(--navy);
  color: var(--on-navy);
  box-shadow: 0 16px 30px -18px rgba(27, 42, 74, 0.6);
  transform: rotate(-2deg);
}

.status-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--navy-line);
  color: var(--on-navy-faint);
}

.status-card p {
  padding: 12px 14px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
}

.learning-card {
  padding: 12px 16px;
  border: 2px dashed var(--accent);
  border-radius: 18px;
  background: var(--white);
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--ink-soft);
  transform: rotate(1.5deg);
}

.learning-card strong {
  display: block;
  color: var(--navy);
}

/* ---------- Sections ---------- */

.section {
  padding: clamp(64px, 9vw, 96px) 0;
}

.section-white {
  background: var(--white);
}

.section-navy {
  background: var(--navy);
  color: var(--on-navy);
}

.section-title {
  font-size: clamp(2rem, 3.6vw, 2.8rem);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px 40px;
  margin-bottom: 26px;
}

.section-head p {
  max-width: 46ch;
  font-size: 1rem;
}

/* ---------- About ---------- */

.about-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
}

.about-copy {
  flex: 1 1 360px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.about-copy > p {
  color: var(--ink-soft);
}

.about-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 6px;
}

.about-numbers strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2.1rem;
  line-height: 1.1;
}

.about-numbers span {
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.about-side {
  flex: 1 1 420px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about-side > .mono {
  color: var(--accent);
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pill-list li {
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--mist);
  font-weight: 500;
}

.pill-list .pill-sun { background: var(--sun); }
.pill-list .pill-blush { background: var(--blush); }

.quote {
  margin: 8px 0 0;
  padding: 20px 22px;
  border-radius: 18px;
  background: var(--sky);
}

.quote blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.4;
}

.quote figcaption {
  margin-top: 8px;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.stars {
  color: var(--accent);
  letter-spacing: 2px;
}

/* ---------- Work log ---------- */

.section-navy .section-head p {
  color: var(--on-navy-faint);
}

.log {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ticket {
  display: flex;
  flex-wrap: wrap;
  overflow: hidden;
  border-radius: 18px;
  background: var(--navy-2);
}

.ticket-body {
  flex: 3 1 480px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px;
}

.ticket-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--on-navy-faint);
}

.ticket h3 {
  font-size: 1.6rem;
}

.ticket dl {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 8px 16px;
  margin: 0;
  font-size: 1rem;
}

.ticket dt {
  padding-top: 4px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--sun);
}

.ticket dd {
  margin: 0;
  color: var(--on-navy-muted);
}

.ticket dd:last-of-type {
  color: var(--on-navy);
}

.ticket-shot {
  flex: 2 1 320px;
  min-width: 0;
  max-width: 100%;
  height: 300px;
  object-fit: cover;
  object-position: top;
  background: var(--mist);
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 18px;
}

.mini {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  border-radius: 18px;
  background: var(--navy-2);
}

.mini h3 {
  font-size: 1.4rem;
}

.mini p {
  font-size: 1rem;
  color: var(--on-navy-muted);
}

.mini a {
  margin-top: auto;
  font-weight: 600;
  color: var(--sun);
}

.mini-sun {
  background: var(--sun);
  color: var(--navy);
}

.mini-sun p {
  color: var(--sun-ink);
}

.mini-sun a {
  color: var(--navy);
}

.mini-blush {
  background: var(--blush);
  color: var(--navy);
}

.mini-blush p {
  color: var(--blush-ink);
}

/* ---------- Toolbox ---------- */

.tool-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.tool-intro {
  flex: 1 1 300px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tool-intro p {
  color: var(--ink-soft);
}

.tool-grid {
  flex: 999 1 560px;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 14px;
  font-size: 0.95rem;
}

.tool-grid > div {
  padding: 18px;
  border-radius: 16px;
  background: var(--white);
}

.tool-grid .mono {
  display: block;
  margin-bottom: 6px;
  font-size: 0.68rem;
  color: var(--accent);
}

/* ---------- FAQ ---------- */

.faq {
  max-width: 860px;
}

.faq h2 {
  margin-bottom: 16px;
}

.faq details {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-weight: 600;
  font-size: 1.18rem;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--accent);
  transition: transform 200ms ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  margin-top: 10px;
  color: var(--ink-soft);
}

/* ---------- Contact ---------- */

.contact-card {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 40px;
  padding: clamp(28px, 5vw, 64px);
  border-radius: 32px;
  background: var(--sun);
}

.contact-copy {
  flex: 1 1 340px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-copy h2 {
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  line-height: 1.05;
}

.contact-copy p {
  color: var(--sun-ink);
}

.contact-form {
  flex: 1 1 360px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-form label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: var(--white);
  color: var(--navy);
  font: inherit;
}

.contact-form textarea {
  padding: 12px 16px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--navy);
}

.contact-form .button {
  margin-top: 4px;
}

.contact-form .button:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

.form-status {
  min-height: 1.6em;
  font-weight: 600;
  color: var(--sun-ink);
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 40px 0;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* ---------- Case study "coming soon" page ---------- */

.soon {
  padding: clamp(48px, 8vw, 96px) 0;
}

.soon-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  max-width: 820px;
}

.soon h1 {
  font-size: clamp(2.4rem, 5.4vw, 4rem);
}

.soon-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--line);
  font-weight: 500;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
}

.soon-points {
  display: grid;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 22px 26px;
  list-style: none;
  border-radius: 18px;
  background: var(--white);
}

.soon-points li {
  position: relative;
  padding-left: 22px;
}

.soon-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--accent);
}

/* ---------- Responsive ---------- */

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-grid;
  }

  .site-nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px 24px 20px;
    background: var(--sky);
    border-bottom: 1px solid var(--line);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 200ms ease, transform 200ms ease, visibility 200ms;
  }

  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .site-nav a {
    padding: 12px 4px;
    font-size: 1.1rem;
  }

  .site-nav .nav-cta {
    margin-top: 6px;
    text-align: center;
  }

  .ticket dl {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .ticket dd {
    margin-bottom: 10px;
  }

  .ticket-shot {
    height: 220px;
  }

  .hero-actions .button {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
