/*
Theme Name: DIY of Things Showcase
Theme URI: https://www.diyofthings.com/
Author: DIY of Things
Author URI: https://www.diyofthings.com/
Description: ธีมแสดงผลงาน (showcase) + แจกไฟล์ 3D สไตล์ makeryo โทน Industrial Dark ผลงานใช้ posts + category และมี session ข่าวเล็ก ๆ ด้านล่าง. Classic PHP theme.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: diyofthings
Tags: portfolio, dark, custom-colors, custom-menu, featured-images, translation-ready
*/

/* ============================================================
   Design tokens — Industrial Dark
   ============================================================ */
:root {
  --diy-orange:      #ff5a1f;
  --diy-orange-deep: #e64a12;
  --diy-lime:        #c6ff3a;

  --diy-bg:        #0d0d0f;
  --diy-surface:   #16161b;
  --diy-surface-2: #1e1e25;
  --diy-line:      #2b2b33;

  --diy-text:   #ececec;
  --diy-slate:  #b4b4be;
  --diy-muted:  #8a8a94;

  --diy-radius: 4px;
  --diy-maxw:   1200px;

  --font-head: 'Chakra Petch', 'Noto Sans Thai', sans-serif;
  --font-body: 'Noto Sans Thai', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: ui-monospace, 'Chakra Petch', Menlo, monospace;
}

/* ============================================================
   Base
   ============================================================ */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--diy-bg);
  color: var(--diy-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--diy-orange); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--diy-text); line-height: 1.2; letter-spacing: .2px; }
p { margin: 0 0 1em; }
::selection { background: var(--diy-orange); color: #0d0d0f; }

.diy-container { max-width: var(--diy-maxw); margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.diy-section { padding: 44px 0; }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.diy-btn {
  display: inline-block; background: var(--diy-orange); color: #0d0d0f;
  font-family: var(--font-head); font-size: 12.5px; font-weight: 700;
  letter-spacing: .6px; text-transform: uppercase;
  padding: 12px 22px; border-radius: var(--diy-radius);
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.diy-btn:hover { background: var(--diy-lime); color: #0d0d0f; transform: translateY(-2px); }
.diy-btn--ghost {
  background: transparent; color: var(--diy-text);
  box-shadow: inset 0 0 0 1.5px var(--diy-line);
}
.diy-btn--ghost:hover { background: transparent; color: var(--diy-orange); box-shadow: inset 0 0 0 1.5px var(--diy-orange); }

.diy-badge {
  display: inline-block; font-family: var(--font-mono); font-size: 10.5px; font-weight: 700;
  color: var(--diy-lime); letter-spacing: 1px; text-transform: uppercase;
}

.diy-section-head {
  display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px;
  border-bottom: 1px solid var(--diy-line); padding-bottom: 12px;
}
.diy-section-head h2, .diy-section-head h3 { margin: 0; font-size: 16px; text-transform: uppercase; letter-spacing: 1px; }
.diy-section-head .more { font-family: var(--font-mono); font-size: 11.5px; color: var(--diy-orange); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }

/* Placeholder pattern */
.diy-ph {
  background:
    repeating-linear-gradient(135deg,#1a1a20 0px,#1a1a20 10px,#202028 10px,#202028 20px);
  display: flex; align-items: center; justify-content: center;
  color: var(--diy-muted); font: 10px var(--font-mono); text-align: center; padding: 8px;
}

/* ============================================================
   Top bar
   ============================================================ */
.diy-topbar { background: var(--diy-orange); padding: 8px 12px; text-align: center; }
.diy-topbar span {
  font-family: var(--font-head); font-size: 11.5px; font-weight: 700; color: #0d0d0f;
  letter-spacing: 1px; text-transform: uppercase;
}

/* ============================================================
   Header — logo + nav flush left, tools right
   ============================================================ */
.diy-header {
  background: rgba(13,13,15,.92); border-bottom: 1px solid var(--diy-line);
  position: sticky; top: 0; z-index: 50; backdrop-filter: blur(10px);
}
.diy-header__inner { display: flex; align-items: center; justify-content: space-between; padding: 15px 32px; }
.diy-header__left { display: flex; align-items: center; gap: 42px; }
.diy-brand { display: flex; align-items: center; gap: 12px; }
.diy-brand img { width: 34px; height: 34px; border-radius: var(--diy-radius); object-fit: cover; }
.diy-brand__name { font-family: var(--font-head); font-weight: 700; font-size: 18px; color: #fff; letter-spacing: .5px; text-transform: uppercase; }
.diy-nav { display: flex; gap: 26px; }
.diy-nav a { font-family: var(--font-head); font-size: 12.5px; font-weight: 600; color: var(--diy-muted); text-transform: uppercase; letter-spacing: .8px; }
.diy-nav a:hover, .diy-nav .current-menu-item > a { color: var(--diy-orange); }
.diy-header__tools { display: flex; align-items: center; gap: 14px; }
.diy-search-toggle { background: none; border: 0; cursor: pointer; padding: 4px; display: flex; }
.diy-search-toggle svg { stroke: var(--diy-slate); }
.diy-search-toggle:hover svg { stroke: var(--diy-orange); }
.diy-menu-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 4px; }
.diy-menu-toggle span { display: block; width: 22px; height: 2px; background: var(--diy-text); margin: 4px 0; }

.diy-searchbar { display: none; background: var(--diy-surface); border-bottom: 1px solid var(--diy-line); }
.diy-searchbar.is-open { display: block; }
.diy-searchbar form { display: flex; gap: 8px; padding: 14px 0; }
.diy-searchbar input[type="search"] {
  flex: 1; background: var(--diy-bg); border: 1px solid var(--diy-line); border-radius: var(--diy-radius);
  padding: 11px 16px; font-family: var(--font-body); font-size: 14px; color: var(--diy-text);
}
.diy-searchbar input[type="search"]:focus { outline: none; border-color: var(--diy-orange); }

/* ============================================================
   Hero — blueprint grid + glow + outlined DIY
   ============================================================ */
.diy-hero { position: relative; overflow: hidden; height: 480px; background: #0d0d0f; }
.diy-hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,90,31,.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,90,31,.10) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
}
.diy-hero__blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.diy-hero__blob--1 { bottom: -80px; left: -40px; width: 320px; height: 260px; background: var(--diy-orange); }
.diy-hero__blob--2 { top: -90px; right: -40px; width: 300px; height: 240px; background: #7a3bff; opacity: .4; }
.diy-hero__blob--3 { bottom: -60px; left: 44%; width: 240px; height: 200px; background: var(--diy-lime); opacity: .18; }
.diy-hero__word {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; font-size: 168px; letter-spacing: 2px;
  color: transparent; -webkit-text-stroke: 2px rgba(255,90,31,.6); user-select: none;
}
.diy-hero__card {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -52%) rotate(-4deg);
  width: 340px; height: 232px; border-radius: var(--diy-radius);
  border: 2px solid var(--diy-orange); overflow: hidden; background: var(--diy-surface);
  box-shadow: 0 0 0 6px rgba(255,90,31,.08), 0 30px 60px rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center;
}
.diy-hero__card img { width: 100%; height: 100%; object-fit: cover; }
.diy-hero__card .diy-ph { width: 100%; height: 100%; background: transparent; color: var(--diy-orange); }

/* ============================================================
   Intro
   ============================================================ */
.diy-intro { text-align: center; padding: 48px 32px 10px; }
.diy-intro h1 { font-size: 30px; margin: 0 0 10px; text-transform: uppercase; letter-spacing: .5px; }
.diy-intro p { font-size: 14px; color: var(--diy-muted); margin: 0; }

/* ============================================================
   Grids
   ============================================================ */
.diy-grid { display: grid; gap: 18px; }
.diy-grid--5 { grid-template-columns: repeat(5, 1fr); }
.diy-grid--4 { grid-template-columns: repeat(4, 1fr); }
.diy-grid--3 { grid-template-columns: repeat(3, 1fr); }

/* Featured work card */
.work-card__thumb {
  aspect-ratio: 1; border-radius: var(--diy-radius); overflow: hidden;
  border: 1px solid var(--diy-line); background: var(--diy-surface);
  transition: border-color .15s ease, transform .15s ease;
}
.work-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.work-card:hover .work-card__thumb { border-color: var(--diy-orange); transform: translateY(-3px); }
.work-card__name {
  font-family: var(--font-head); font-size: 13px; font-weight: 600; color: var(--diy-text);
  margin: 12px 0 5px; text-transform: uppercase; letter-spacing: .4px;
}
.work-card:hover .work-card__name { color: var(--diy-orange); }

/* ============================================================
   Showcase cards
   ============================================================ */
.showcase-card {
  position: relative; aspect-ratio: 4 / 3.4; border-radius: var(--diy-radius); overflow: hidden;
  display: flex; align-items: flex-end; padding: 18px; color: var(--diy-text);
  border: 1px solid var(--diy-line); transition: border-color .15s ease;
}
.showcase-card:hover { border-color: var(--diy-orange); }
.showcase-card::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: repeating-linear-gradient(135deg,#17171d 0px,#17171d 10px,#1f1f27 10px,#1f1f27 20px);
}
.showcase-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.showcase-card__body {
  position: relative; z-index: 2;
  background: linear-gradient(0deg, rgba(0,0,0,.85), rgba(0,0,0,0));
  margin: -18px; padding: 64px 18px 18px; width: calc(100% + 36px);
}
.showcase-card__name { font-family: var(--font-head); font-weight: 700; font-size: 17px; margin: 0 0 5px; color: #fff; text-transform: uppercase; letter-spacing: .4px; }
.showcase-card__sub { font-size: 12.5px; color: var(--diy-slate); margin: 0 0 10px; max-width: 240px; }
.showcase-card__more { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--diy-orange); text-transform: uppercase; letter-spacing: .5px; }

/* ============================================================
   Spotlight
   ============================================================ */
.diy-spotlight-intro { text-align: center; padding: 10px 32px 22px; }
.diy-spotlight-intro h2 { font-size: 24px; margin: 0 0 8px; text-transform: uppercase; letter-spacing: .5px; }
.diy-spotlight-intro p { font-size: 13.5px; color: var(--diy-muted); margin: 0 auto; max-width: 540px; }
.spotlight-card {
  border-radius: var(--diy-radius); background: var(--diy-surface-2);
  border: 1px solid var(--diy-line); border-left: 4px solid var(--diy-orange);
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  padding: 36px 44px; color: var(--diy-text);
}
.spotlight-card__label { font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--diy-lime); letter-spacing: 2px; margin-bottom: 12px; text-transform: uppercase; }
.spotlight-card__title { font-family: var(--font-head); font-size: 25px; font-weight: 700; margin: 0 0 18px; max-width: 360px; text-transform: uppercase; letter-spacing: .4px; }
.spotlight-card__media {
  width: 290px; height: 190px; flex: none; border-radius: var(--diy-radius); overflow: hidden;
  border: 1px solid var(--diy-line);
  background: repeating-linear-gradient(135deg,#1e1e25 0px,#1e1e25 10px,#26262e 10px,#26262e 20px);
}
.spotlight-card__media img { width: 100%; height: 100%; object-fit: cover; }

/* ============================================================
   Reels
   ============================================================ */
.reel-card {
  position: relative; aspect-ratio: 9 / 16; border-radius: var(--diy-radius); overflow: hidden;
  background: repeating-linear-gradient(135deg,#17171d 0px,#17171d 10px,#20202a 10px,#20202a 20px);
  display: block; border: 1px solid var(--diy-line);
  width: 100%; padding: 0; margin: 0; cursor: pointer; text-align: left; font: inherit; color: inherit;
}
.reel-card:hover { border-color: var(--diy-orange); }
.reel-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel-card__play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 46px; height: 46px; border-radius: 50%; background: var(--diy-orange);
  display: flex; align-items: center; justify-content: center;
  transition: background .15s ease, transform .15s ease;
}
.reel-card:hover .reel-card__play { background: var(--diy-lime); transform: translate(-50%,-50%) scale(1.08); }
.reel-card__play::after {
  content: ""; width: 0; height: 0; border-top: 8px solid transparent; border-bottom: 8px solid transparent;
  border-left: 12px solid #0d0d0f; margin-left: 3px;
}
.reel-card__meta { position: absolute; bottom: 10px; left: 10px; right: 10px; z-index: 2; }
.reel-card__label { font-family: var(--font-head); font-size: 11.5px; color: #fff; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.reel-card__plat { font-family: var(--font-mono); font-size: 9.5px; color: var(--diy-lime); text-transform: uppercase; letter-spacing: .5px; }
.reel-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.75), rgba(0,0,0,0) 55%); z-index: 1; }

/* Inline reel player */
.reel-card__trigger { position: absolute; inset: 0; z-index: 3; background: none; border: 0; padding: 0; cursor: pointer; }
.reel-card__iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 4; }
.reel-card.is-playing .reel-card__trigger,
.reel-card.is-playing .reel-card__play,
.reel-card.is-playing .reel-card__meta,
.reel-card.is-playing::before { display: none; }

/* ============================================================
   How we work — dark band with grid
   ============================================================ */
.diy-how {
  padding: 64px 32px; text-align: center; position: relative;
  background: var(--diy-surface);
  border-top: 1px solid var(--diy-line); border-bottom: 1px solid var(--diy-line);
}
.diy-how::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 46px 46px;
}
.diy-how h2 { font-size: 24px; margin: 0 0 12px; position: relative; text-transform: uppercase; letter-spacing: .5px; }
.diy-how h2::after { content: ""; display: block; width: 48px; height: 3px; background: var(--diy-orange); margin: 14px auto 0; }
.diy-how p { font-size: 14px; color: var(--diy-slate); max-width: 580px; margin: 0 auto; line-height: 1.8; position: relative; }

/* ============================================================
   News small
   ============================================================ */
.news-item { display: flex; gap: 14px; align-items: center; padding: 16px 0; border-top: 1px solid var(--diy-line); }
.news-item:last-child { border-bottom: 1px solid var(--diy-line); }
.news-item__thumb { width: 76px; height: 56px; flex: none; border-radius: var(--diy-radius); overflow: hidden; border: 1px solid var(--diy-line); }
.news-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-item__title { font-family: var(--font-head); font-size: 13px; color: var(--diy-text); line-height: 1.45; margin: 0 0 5px; font-weight: 600; }
.news-item:hover .news-item__title { color: var(--diy-orange); }
.news-item__date { font-family: var(--font-mono); font-size: 10.5px; color: var(--diy-muted); letter-spacing: .5px; }

/* ============================================================
   Single work / download links
   ============================================================ */
.diy-single { padding: 44px 0; }
.diy-single__hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; }
.diy-single__media { border-radius: var(--diy-radius); overflow: hidden; border: 1px solid var(--diy-line); }
.diy-single__media img { width: 100%; }
.diy-single h1 { font-size: 30px; margin: 8px 0 14px; text-transform: uppercase; }
.diy-single__terms { margin-bottom: 16px; }
.diy-single__terms a { font-family: var(--font-mono); font-size: 11.5px; color: var(--diy-orange); font-weight: 700; text-transform: uppercase; }
.diy-links { display: flex; flex-direction: column; gap: 10px; margin: 22px 0; }
.diy-links a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--diy-surface); border: 1px solid var(--diy-line); border-radius: var(--diy-radius);
  padding: 13px 16px; font-family: var(--font-head); font-weight: 600; font-size: 13px;
  text-transform: uppercase; letter-spacing: .4px;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.diy-links a:hover { border-color: var(--diy-orange); color: var(--diy-orange); }
.diy-links a .ext { font-family: var(--font-mono); font-size: 13px; color: var(--diy-muted); }
.diy-links a.is-primary { background: var(--diy-orange); color: #0d0d0f; border-color: var(--diy-orange); }
.diy-links a.is-primary .ext { color: #0d0d0f; }
.diy-links a.is-primary:hover { background: var(--diy-lime); color: #0d0d0f; border-color: var(--diy-lime); }
.diy-content { max-width: 760px; margin: 40px auto 0; }
.diy-content img { border-radius: var(--diy-radius); margin: 1em 0; }

/* ============================================================
   Post / page / archive
   ============================================================ */
.diy-article { max-width: 760px; margin: 0 auto; padding: 48px 0; }
.diy-article__meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--diy-muted); margin-bottom: 12px; letter-spacing: .5px; }
.diy-article__meta a { color: var(--diy-orange); }
.diy-article h1.entry-title { font-size: 32px; margin: 10px 0 22px; text-transform: uppercase; }
.diy-article__thumb { border-radius: var(--diy-radius); overflow: hidden; margin-bottom: 30px; border: 1px solid var(--diy-line); }
.entry-content a { color: var(--diy-orange); text-decoration: underline; }

.diy-archive-head { text-align: center; padding: 52px 32px 10px; }
.diy-archive-head h1 { font-size: 30px; margin: 0 0 10px; text-transform: uppercase; }
.diy-archive-head h1 span { color: var(--diy-orange); }
.diy-archive-head p { color: var(--diy-muted); margin: 0; }

.diy-pagination { display: flex; justify-content: center; gap: 8px; padding: 36px 0; }
.diy-pagination .page-numbers {
  display: inline-flex; min-width: 40px; height: 40px; align-items: center; justify-content: center;
  border-radius: var(--diy-radius); border: 1px solid var(--diy-line); font-family: var(--font-head);
  font-size: 13px; font-weight: 600; padding: 0 10px; color: var(--diy-text);
}
.diy-pagination a.page-numbers:hover { border-color: var(--diy-orange); color: var(--diy-orange); }
.diy-pagination .page-numbers.current { background: var(--diy-orange); color: #0d0d0f; border-color: var(--diy-orange); }

/* ============================================================
   Footer
   ============================================================ */
.diy-footer { background: #0d0d0f; color: var(--diy-muted); border-top: 2px solid var(--diy-orange); }
.diy-footer__inner { display: flex; justify-content: space-between; align-items: center; padding: 30px 32px; flex-wrap: wrap; gap: 16px; }
.diy-footer__inner > div:first-child { font-family: var(--font-mono); font-size: 12px; letter-spacing: .5px; }
.diy-footer a { color: var(--diy-muted); }
.diy-footer a:hover { color: var(--diy-orange); }
.diy-footer__social { display: flex; gap: 10px; }
.diy-footer__social a {
  width: 34px; height: 34px; border-radius: var(--diy-radius); background: var(--diy-surface-2);
  border: 1px solid var(--diy-line); display: flex; align-items: center; justify-content: center;
}
.diy-footer__social a:hover { background: var(--diy-orange); border-color: var(--diy-orange); }

/* widgets */
.widget-title { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .5px; color: var(--diy-text); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
  .diy-grid--5 { grid-template-columns: repeat(3, 1fr); }
  .diy-single__hero { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .diy-container { padding-left: 20px; padding-right: 20px; }
  .diy-header__inner { padding: 14px 20px; }
  .diy-header__left { gap: 0; }
  .diy-nav { display: none; }
  .diy-nav.is-open {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 100%; left: 0; right: 0; background: var(--diy-surface);
    border-bottom: 1px solid var(--diy-line); padding: 8px 20px 16px; z-index: 60;
  }
  .diy-nav.is-open a { padding: 12px 0; border-bottom: 1px solid var(--diy-line); }
  .diy-menu-toggle { display: block; }
  .diy-header { position: relative; }
  .diy-hero { height: 360px; }
  .diy-hero__word { font-size: 104px; }
  .diy-hero__card { width: 250px; height: 172px; }
  .spotlight-card { flex-direction: column; align-items: flex-start; }
  .spotlight-card__media { width: 100%; }
}
@media (max-width: 560px) {
  .diy-grid--5, .diy-grid--4, .diy-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .diy-intro h1 { font-size: 24px; }
  .diy-hero__word { font-size: 76px; }
}
