/*
Theme Name: 3D Fosil
Theme URI: https://3dfosil.com/
Author: 3D Fosil
Description: An original animated WordPress blog theme for 3D printing, modeling and digital fabrication.
Version: 1.0.9
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: fosil
*/

:root {
  --ink: #f7f6f2;
  --muted: #a9a7a0;
  --bg: #0b0d0f;
  --panel: #121519;
  --panel-2: #171b20;
  --line: rgba(255, 255, 255, .09);
  --orange: #ff6b2c;
  --amber: #ffad33;
  --mint: #89e7bd;
  --radius: 30px;
  --content: 1180px;
  --shadow: 0 30px 80px rgba(0, 0, 0, .38);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 5%, rgba(255, 107, 44, .12), transparent 24rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea { font: inherit; }
.wrap { width: min(calc(100% - 40px), var(--content)); margin-inline: auto; }
.hero > .wrap { width: min(calc(100% - 32px), 1420px); }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 100; padding: 10px 14px; color: #111; background: #fff; border-radius: 8px; }
.skip-link:focus { top: 16px; }

.site-header { position: sticky; top: 0; z-index: 40; padding: 18px 0; backdrop-filter: blur(18px); }
.nav-shell { display: grid; grid-template-columns: 1fr auto 1fr; min-height: 68px; align-items: center; gap: 28px; padding: 0 20px; background: rgba(15, 18, 22, .86); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 18px 50px rgba(0,0,0,.22); }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 850; letter-spacing: -.03em; }
.site-header .brand, .site-header .custom-logo-link { justify-self: start; }
.custom-logo-link { display: inline-flex; align-items: center; }
.custom-logo { display: block; width: auto; max-width: 190px; max-height: 46px; object-fit: contain; }
.brand-mark { position: relative; width: 33px; height: 33px; color: var(--orange); }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; inset: 7px; border: 3px solid currentColor; transform: rotate(30deg) skew(-5deg); }
.brand-mark::after { inset: 12px 4px 4px 12px; opacity: .42; }
.brand-word span { color: var(--orange); }
.main-nav { margin: 0; justify-self: center; }
.main-nav ul { display: flex; align-items: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.main-nav a { display: block; padding: 11px 13px; color: #d8d8d4; font-size: .92rem; font-weight: 650; border-radius: 10px; }
.main-nav a:hover, .main-nav .current-menu-item a { color: #fff; background: rgba(255,255,255,.06); }
.nav-cta { justify-self: end; padding: 10px 16px; color: #151515; background: #fff; border-radius: 11px; font-size: .88rem; font-weight: 800; }
.nav-toggle { display: none; margin-left: auto; width: 42px; height: 42px; color: #fff; background: transparent; border: 1px solid var(--line); border-radius: 10px; }

.hero { padding: 32px 0 78px; }
.hero-shell { position: relative; overflow: hidden; display: grid; grid-template-columns: .88fr 1.12fr; gap: clamp(30px, 4vw, 64px); min-height: 620px; padding: clamp(34px, 4.4vw, 68px); border: 1px solid rgba(255,107,44,.25); border-radius: 38px; background:
  linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
  linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px),
  radial-gradient(circle at 12% 54%, rgba(255,107,44,.32), transparent 42%),
  linear-gradient(120deg, #25160f 0%, #11151a 62%, #090b0e 100%);
  background-size: 54px 54px, 54px 54px, auto, auto;
  box-shadow: var(--shadow);
}
.hero-shell::after { content: ""; position: absolute; inset: auto 8% -45% 15%; height: 60%; background: var(--orange); filter: blur(110px); opacity: .12; pointer-events: none; }
.hero-copy { position: relative; z-index: 2; align-self: center; padding-right: 32px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; padding: 7px 11px; color: #f1c5ae; border: 1px solid rgba(255,107,44,.38); border-radius: 999px; background: rgba(255,107,44,.08); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 7px; height: 7px; background: var(--orange); border-radius: 50%; box-shadow: 0 0 16px var(--orange); }
.hero h1 { max-width: 650px; margin: 24px 0 22px; font-size: clamp(2.6rem, 3.8vw, 4rem); line-height: 1.02; letter-spacing: -.05em; }
.hero h1 em { color: var(--orange); font-style: normal; }
.hero-lead { max-width: 620px; margin: 0; color: #c2c0ba; font-size: clamp(1rem, 1.5vw, 1.16rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 20px; border: 1px solid transparent; border-radius: 13px; font-weight: 800; transition: .25s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: #121212; background: #fff; }
.button-ghost { color: #fff; border-color: var(--line); background: rgba(255,255,255,.045); }

.printer-scene { position: relative; z-index: 2; align-self: center; min-height: 420px; perspective: 900px; }
.printer-card { position: absolute; inset: 0; overflow: hidden; border: 1px solid rgba(255,255,255,.12); border-radius: 28px; background: linear-gradient(150deg, rgba(255,255,255,.085), rgba(255,255,255,.018)); box-shadow: inset 0 1px rgba(255,255,255,.1), 0 35px 70px rgba(0,0,0,.35); backdrop-filter: blur(12px); transform: rotateY(-4deg) rotateX(2deg); }
.printer-status { position: absolute; z-index: 5; top: 20px; left: 20px; display: flex; align-items: center; gap: 8px; padding: 7px 10px; color: var(--mint); background: rgba(8,15,14,.66); border: 1px solid rgba(137,231,189,.2); border-radius: 999px; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.printer-status i { width: 7px; height: 7px; background: var(--mint); border-radius: 50%; box-shadow: 0 0 12px var(--mint); animation: pulse 1.4s infinite; }
.printer { position: absolute; inset: 52px 34px 30px; }
.printer-frame { position: absolute; inset: 10% 9% 16%; border: 9px solid #30363d; border-bottom-width: 13px; border-radius: 7px; box-shadow: inset 0 0 0 2px #111, 0 8px 20px rgba(0,0,0,.5); }
.printer-frame::before { content: ""; position: absolute; left: 8%; right: 8%; top: 16%; height: 6px; background: #69717b; box-shadow: 0 1px 0 #a8afb6; }
.filament { position: absolute; z-index: 3; left: 58%; top: -7%; width: 4px; height: 28%; background: linear-gradient(var(--orange), var(--amber)); border-radius: 5px; box-shadow: 0 0 12px rgba(255,107,44,.55); }
.print-head { position: absolute; z-index: 4; top: 22%; left: 39%; width: 68px; height: 54px; background: linear-gradient(135deg, #5d646c, #20252a); border: 2px solid #747c84; border-radius: 6px; box-shadow: 0 10px 24px rgba(0,0,0,.42); animation: head-path 6s ease-in-out infinite; }
.print-head::before { content: ""; position: absolute; left: 23px; top: 100%; width: 20px; height: 19px; background: linear-gradient(#d3a06c, #6d3e20); clip-path: polygon(20% 0,80% 0,62% 100%,38% 100%); }
.print-head::after { content: ""; position: absolute; left: 31px; top: calc(100% + 16px); width: 4px; height: 18px; background: var(--orange); box-shadow: 0 0 10px var(--orange); animation: extrude 1s linear infinite; }
.print-bed { position: absolute; z-index: 2; left: 17%; right: 17%; bottom: 18%; height: 11%; background: linear-gradient(170deg, #5d6267, #181c20 58%); border: 2px solid #737981; clip-path: polygon(9% 0, 91% 0, 100% 100%, 0 100%); animation: bed-move 3s ease-in-out infinite; }
.fossil-print { position: absolute; z-index: 3; left: 34%; right: 34%; bottom: 29%; height: 25%; filter: drop-shadow(0 0 16px rgba(255,107,44,.25)); }
.layer { position: absolute; left: 0; right: 0; height: 9%; border: 2px solid var(--orange); border-radius: 50%; background: rgba(255,107,44,.07); opacity: 0; animation: build-layer 6s steps(1) infinite; }
.layer:nth-child(1) { bottom: 0; animation-delay: 0s; }
.layer:nth-child(2) { bottom: 14%; width: 90%; left: 5%; animation-delay: .55s; }
.layer:nth-child(3) { bottom: 28%; width: 78%; left: 11%; animation-delay: 1.1s; }
.layer:nth-child(4) { bottom: 42%; width: 65%; left: 17.5%; animation-delay: 1.65s; }
.layer:nth-child(5) { bottom: 56%; width: 52%; left: 24%; animation-delay: 2.2s; }
.layer:nth-child(6) { bottom: 70%; width: 35%; left: 32.5%; animation-delay: 2.75s; }
.layer:nth-child(7) { bottom: 84%; width: 18%; left: 41%; animation-delay: 3.3s; }
.progress-label { position: absolute; z-index: 5; right: 20px; bottom: 18px; color: #aeb1b3; font-size: .76rem; font-variant-numeric: tabular-nums; }

@keyframes head-path { 0%,100% { transform: translateX(-58px); } 25% { transform: translateX(64px); } 50% { transform: translateX(-22px) translateY(24px); } 75% { transform: translateX(50px) translateY(42px); } }
@keyframes extrude { 0% { transform: scaleY(.2); opacity: .3; } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: translateY(7px) scaleY(.2); opacity: 0; } }
@keyframes bed-move { 0%,100% { transform: translateY(5px) scale(.96); } 50% { transform: translateY(-5px) scale(1); } }
@keyframes build-layer { 0%, 8% { opacity: 0; } 9%, 82% { opacity: 1; } 92%,100% { opacity: 0; } }
@keyframes pulse { 50% { opacity: .35; } }

.section { padding: 76px 0; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 30px; }
.section-heading h2 { max-width: 700px; margin: 12px 0 0; font-size: clamp(1.9rem, 3vw, 2.7rem); line-height: 1.08; letter-spacing: -.042em; }
.section-heading p { max-width: 390px; margin: 0; color: var(--muted); }
.topic-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.topic { position: relative; overflow: hidden; min-height: 190px; padding: 24px; border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(145deg, var(--panel-2), var(--panel)); }
.topic::after { content: attr(data-number); position: absolute; right: 12px; bottom: -30px; color: rgba(255,255,255,.035); font-size: 7rem; font-weight: 900; line-height: 1; }
.topic-icon { display: grid; width: 42px; height: 42px; place-items: center; color: var(--orange); border: 1px solid rgba(255,107,44,.32); border-radius: 12px; background: rgba(255,107,44,.06); }
.topic h3 { margin: 28px 0 6px; font-size: 1.02rem; }
.topic p { margin: 0; color: var(--muted); font-size: .9rem; }

.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.posts-grid.home-posts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.home-posts .post-card { display: flex; min-width: 0; flex-direction: column; border-radius: 26px; }
.home-posts .post-thumb { flex: 0 0 auto; aspect-ratio: 16/10; border-bottom: 1px solid var(--line); }
.home-posts .post-body { display: flex; flex: 1; flex-direction: column; padding: clamp(22px, 2.4vw, 32px); }
.home-posts .post-meta { display: none; }
.home-posts .post-card h3 { margin: 0 0 14px; font-size: clamp(1.25rem, 1.45vw, 1.5rem); line-height: 1.24; }
.home-posts .post-card p { display: -webkit-box; overflow: hidden; margin-bottom: 24px; font-size: 1rem; line-height: 1.75; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.post-category-badge { position: absolute; z-index: 2; top: 18px; left: 18px; display: none; align-items: center; min-height: 36px; padding: 0 15px; color: #fff; background: rgba(20, 22, 24, .78); border: 1px solid rgba(255,255,255,.22); border-radius: 999px; font-size: .78rem; font-weight: 800; backdrop-filter: blur(10px); }
.home-posts .post-category-badge { display: inline-flex; }
.home-posts .text-link { display: flex; width: 100%; min-height: 54px; margin-top: auto; justify-content: center; color: #fff; background: var(--orange); border-radius: 14px; font-size: .95rem; }
.home-posts .text-link span { color: #fff; }
.home-posts .text-link:hover { background: #ff7b43; }
.posts-grid.archive-posts { grid-template-columns: 1fr; gap: 22px; }
.archive-posts .post-card { display: grid; grid-template-columns: minmax(280px, 38%) 1fr; min-height: 250px; }
.archive-posts .post-thumb { height: 100%; min-height: 250px; aspect-ratio: auto; }
.archive-posts .post-body { display: flex; flex-direction: column; justify-content: center; padding: clamp(24px, 4vw, 48px); }
.archive-posts .post-card h3 { max-width: 760px; font-size: clamp(1.35rem, 2vw, 1.9rem); line-height: 1.2; }
.post-card { overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: var(--panel); transition: transform .3s, border-color .3s; }
.post-card:hover { transform: translateY(-5px); border-color: rgba(255,107,44,.35); }
.post-thumb { position: relative; overflow: hidden; aspect-ratio: 16/10; background: linear-gradient(135deg, #3a1c10, #17191c 60%); }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.post-card:hover .post-thumb img { transform: scale(1.035); }
.post-thumb-fallback { position: absolute; inset: 0; background: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px); background-size: 30px 30px; }
.post-thumb-fallback::before { content: "3D"; position: absolute; right: 20px; bottom: 2px; color: rgba(255,107,44,.22); font-size: 6rem; font-weight: 950; letter-spacing: -.09em; }
.post-body { padding: 22px; }
.post-meta { display: flex; align-items: center; gap: 8px; color: var(--orange); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.post-card h3 { margin: 10px 0 10px; font-size: 1.25rem; line-height: 1.25; letter-spacing: -.02em; }
.post-card p { margin: 0; color: var(--muted); font-size: .92rem; }
.text-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; font-size: .85rem; font-weight: 800; }
.text-link span { color: var(--orange); transition: transform .2s; }
.text-link:hover span { transform: translateX(4px); }

.newsletter { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 40px; padding: clamp(28px, 5vw, 54px); border: 1px solid rgba(255,107,44,.24); border-radius: 30px; background: radial-gradient(circle at 90% 10%, rgba(255,107,44,.18), transparent 33%), #121518; }
.newsletter h2 { margin: 0 0 8px; font-size: clamp(1.75rem, 2.5vw, 2.5rem); letter-spacing: -.035em; }
.newsletter p { margin: 0; color: var(--muted); }
.newsletter-form { display: flex; gap: 8px; min-width: min(100%, 410px); }
.newsletter-form input { width: 100%; min-height: 51px; padding: 0 16px; color: #fff; background: #0b0e11; border: 1px solid var(--line); border-radius: 12px; outline: none; }
.newsletter-form input:focus { border-color: var(--orange); }

.site-main { min-height: 55vh; }
.page-header { padding: 62px 0 30px; }
.page-header h1 { margin: 12px 0; font-size: clamp(2.4rem, 4.2vw, 3.5rem); line-height: 1.06; letter-spacing: -.045em; }
.page-header p { max-width: 620px; color: var(--muted); }
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 44px; padding-bottom: 80px; }
.content-layout.single-layout { display: block; }
.single-layout .article { max-width: 980px; margin-inline: auto; }
.article { max-width: 790px; }
.article-header h1 { margin: 14px 0 18px; font-size: clamp(2.35rem, 4vw, 3.75rem); line-height: 1.08; letter-spacing: -.045em; }
.article-meta { color: var(--muted); }
.article-cover { overflow: hidden; margin: 30px 0; border-radius: 26px; }
.article-content { color: #d5d3cd; font-size: 1.06rem; }
.article-content h2, .article-content h3 { margin-top: 2em; color: #fff; line-height: 1.22; letter-spacing: -.025em; }
.article-content h2 { font-size: clamp(1.65rem, 2.4vw, 2.1rem); }
.article-content h3 { font-size: clamp(1.35rem, 1.8vw, 1.6rem); }
.article-content a { color: var(--orange); text-decoration: underline; text-underline-offset: 3px; }
.article-content blockquote { margin: 2em 0; padding: 10px 0 10px 24px; border-left: 3px solid var(--orange); color: #fff; font-size: 1.25rem; }
.article-content pre { overflow: auto; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #060708; }
.sidebar { padding-top: 10px; }
.widget { margin-bottom: 18px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.widget-title { margin: 0 0 12px; font-size: .9rem; text-transform: uppercase; letter-spacing: .1em; }
.widget ul { margin: 0; padding: 0; list-style: none; }
.widget li + li { margin-top: 9px; }
.widget a { color: var(--muted); font-size: .9rem; }
.widget a:hover { color: var(--orange); }
.pagination { grid-column: 1 / -1; margin-top: 24px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.page-numbers { display: grid; min-width: 42px; height: 42px; place-items: center; border: 1px solid var(--line); border-radius: 10px; }
.page-numbers.current { color: #151515; background: #fff; }

.site-footer { padding: 40px 0 26px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 50px; padding: 30px 0 55px; }
.footer-about { max-width: 400px; color: var(--muted); }
.footer-title { margin-bottom: 14px; font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; }
.footer-menu { margin: 0; padding: 0; list-style: none; }
.footer-menu li + li { margin-top: 8px; }
.footer-menu a { color: var(--muted); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-top: 22px; color: #777b7f; border-top: 1px solid var(--line); font-size: .8rem; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }

@media (max-width: 960px) {
  .hero-shell { grid-template-columns: 1fr; }
  .hero-copy { padding: 10px 0 40px; }
  .printer-scene { min-height: 390px; }
  .topic-grid { grid-template-columns: repeat(2, 1fr); }
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .posts-grid.home-posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-layout { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .wrap { width: min(calc(100% - 24px), var(--content)); }
  .site-header { padding: 10px 0; }
  .nav-shell { min-height: 60px; }
  .nav-shell { display: flex; }
  .custom-logo { max-width: 150px; max-height: 40px; }
  .nav-toggle { display: grid; place-items: center; }
  .main-nav { position: absolute; top: 78px; left: 12px; right: 12px; display: none; padding: 12px; background: #111418; border: 1px solid var(--line); border-radius: 15px; }
  .main-nav.is-open { display: block; }
  .main-nav ul { align-items: stretch; flex-direction: column; }
  .nav-cta { display: none; }
  .hero { padding-top: 12px; }
  .hero-shell { min-height: 0; padding: 32px 22px; border-radius: 26px; }
  .hero h1 { font-size: clamp(2.35rem, 11vw, 3.25rem); }
  .section-heading h2 { font-size: clamp(1.8rem, 8vw, 2.35rem); }
  .page-header h1, .article-header h1 { font-size: clamp(2.15rem, 10vw, 3rem); }
  .printer-scene { min-height: 330px; }
  .printer-card { transform: none; }
  .printer { inset: 50px 8px 20px; }
  .section { padding: 54px 0; }
  .section-heading { align-items: start; flex-direction: column; }
  .posts-grid, .topic-grid, .sidebar { grid-template-columns: 1fr; }
  .posts-grid.home-posts { grid-template-columns: 1fr; }
  .archive-posts .post-card { grid-template-columns: 1fr; }
  .archive-posts .post-thumb { min-height: 210px; aspect-ratio: 16/9; }
  .newsletter { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; min-width: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
