/*
Theme Name: TinkerRoom
Theme URI: https://tinkerroom.com
Author: TinkerRoom
Description: A warm, handcrafted workshop theme for software, electronics, AI, and robotics projects.
Version: 1.2.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: tinkerroom
*/

:root {
  --ink: #080705;
  --panel: #12100d;
  --panel-soft: #19140f;
  --line: #44301f;
  --cream: #f5e5c8;
  --muted: #c7b8a3;
  --amber: #ef8a24;
  --amber-deep: #a74406;
  --max: 1440px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(91, 45, 14, 0.14), transparent 34rem),
    var(--ink);
  color: var(--cream);
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
}

body.admin-bar .site-header {
  top: 32px;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

.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;
}

.site-shell {
  max-width: var(--max);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  background: rgba(5, 4, 3, 0.92);
  border-bottom: 1px solid rgba(239, 138, 36, 0.12);
  backdrop-filter: blur(14px);
}

.header-inner {
  min-height: 80px;
  display: grid;
  grid-template-columns: 290px 1fr auto;
  align-items: center;
  gap: 26px;
  padding: 0 40px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-lantern {
  width: 42px;
  height: 52px;
  color: #f6c47e;
  filter: drop-shadow(0 0 10px rgba(239, 138, 36, 0.4));
}

.brand-copy {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-style: italic;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -1px;
}

.brand-tagline {
  margin-top: 3px;
  color: var(--amber);
  font-size: 12px;
}

.main-nav ul {
  display: flex;
  justify-content: center;
  gap: 28px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.main-nav a {
  position: relative;
  display: block;
  padding: 28px 0 26px;
  color: #f6ead8;
  font-size: 16px;
  white-space: nowrap;
}

.main-nav a::after {
  position: absolute;
  right: 0;
  bottom: 17px;
  left: 0;
  height: 2px;
  background: var(--amber);
  content: "";
  opacity: 0;
  transform: scaleX(0.25);
  transition: 180ms ease;
}

.main-nav a:hover::after,
.main-nav .current-menu-item a::after {
  opacity: 1;
  transform: scaleX(1);
}

.header-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid #cb5e0b;
  border-radius: 9px;
  color: #ffd39b;
  font-weight: 600;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.header-cta {
  gap: 12px;
  min-width: 150px;
}

.header-cta:hover,
.button:hover {
  background: rgba(203, 94, 11, 0.14);
  border-color: var(--amber);
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, #ba4c05, #e67112);
  border-color: #f0801e;
  color: #fff9ef;
  box-shadow: 0 10px 30px rgba(125, 45, 0, 0.22);
}

.button-primary:hover {
  background: linear-gradient(135deg, #ca5709, #ef861f);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #100d0a;
  color: var(--cream);
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: currentColor;
}

.hero {
  position: relative;
  min-height: 448px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-image:
    linear-gradient(90deg, rgba(4, 3, 2, 0.93) 0%, rgba(4, 3, 2, 0.76) 25%, rgba(4, 3, 2, 0.18) 58%, rgba(4, 3, 2, 0.05) 100%),
    url("assets/images/workshop-hero.png");
  background-position: center;
  background-size: cover;
  border-bottom: 1px solid #302014;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 530px;
  padding: 58px 0 62px 56px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--amber);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin-top: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.hero h1 {
  margin-bottom: 12px;
  font-size: clamp(42px, 4.3vw, 62px);
  line-height: 1.05;
  text-shadow: 0 2px 20px #000;
}

.hero p {
  max-width: 480px;
  margin: 0;
  color: #f0a04f;
  font-size: 22px;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

.content-wrap {
  padding: 12px 48px 0;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.project-card {
  position: relative;
  height: 166px;
  min-height: 166px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #15110d;
  isolation: isolate;
}

.project-card::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  background-image: var(--card-image);
  background-position: center;
  background-size: cover;
  content: "";
  transition: transform 500ms ease;
}

.project-card::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, rgba(9, 7, 5, 0.97) 0%, rgba(9, 7, 5, 0.8) 43%, rgba(9, 7, 5, 0.14) 100%);
  content: "";
}

.project-card:hover::before {
  transform: scale(1.04);
}

.project-card-content {
  width: 58%;
  padding: 14px 0 12px 16px;
}

.project-card h2 {
  margin-bottom: 5px;
  color: #edc38e;
  font-size: 20px;
}

.project-card p {
  min-height: 52px;
  margin: 0 0 5px;
  color: #d0c2b0;
  font-size: 14px;
}

.text-link {
  color: var(--amber);
  font-size: 14px;
  font-weight: 600;
}

.featured-card {
  display: grid;
  grid-template-columns: 84px 1fr;
  padding: 8px;
}

.phone {
  position: relative;
  min-height: 148px;
  overflow: hidden;
  border: 3px solid #2d2c2c;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 72%, #e86f16 0 5%, transparent 6%),
    radial-gradient(circle at 45% 68%, #ffc367 0 3%, transparent 4%),
    linear-gradient(155deg, rgba(238, 119, 29, 0.14), transparent 45%),
    #080b0f;
  box-shadow: 0 10px 28px #000;
}

.phone::before {
  position: absolute;
  top: 7px;
  left: 50%;
  width: 31px;
  height: 5px;
  border-radius: 8px;
  background: #292929;
  content: "";
  transform: translateX(-50%);
}

.phone-screen {
  padding: 20px 8px 8px;
  color: #f5d49f;
  text-align: center;
}

.phone-screen strong {
  display: block;
  margin: 4px 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
}

.phone-fire {
  width: 46px;
  height: 46px;
  margin: 0 auto 10px;
  border-radius: 25px 25px 8px 8px;
  background: radial-gradient(circle at 50% 75%, #ffd27d, #d65309 28%, #3f1706 48%, #0a0908 70%);
  box-shadow: 0 0 22px rgba(232, 111, 22, 0.48);
}

.phone-lines {
  width: 64px;
  height: 18px;
  margin: auto;
  border-top: 2px solid #71431e;
  border-bottom: 2px solid #71431e;
}

.featured-copy {
  padding: 1px 4px 0 12px;
}

.featured-copy .kicker {
  color: #e9bd83;
  font-family: Georgia, "Times New Roman", serif;
}

.featured-copy h2 {
  margin: 5px 0 2px;
  font-size: 20px;
}

.featured-copy p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
}

.mini-button {
  display: inline-flex;
  padding: 6px 12px;
  border: 1px solid #755238;
  border-radius: 7px;
  color: #f4e6d2;
  font-size: 14px;
}

.lower-grid {
  display: grid;
  grid-template-columns: 1.18fr 0.96fr;
  gap: 24px;
  margin-top: 12px;
}

.panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(15, 12, 9, 0.84);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 8px;
}

.panel-heading h2,
.porch-copy h2 {
  margin: 0;
  font-size: 21px;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.post-card {
  min-width: 0;
  padding: 0 6px 10px;
  border-right: 1px solid rgba(68, 48, 31, 0.65);
}

.post-card:last-child {
  border-right: 0;
}

.post-thumb {
  height: 103px;
  border-radius: 8px 8px 0 0;
  background-position: center;
  background-size: cover;
}

.post-card h3 {
  margin: 7px 6px 2px;
  overflow: hidden;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-meta {
  margin: 0 6px;
  color: #ae9272;
  font-size: 12px;
}

.porch-panel {
  position: relative;
  min-height: 205px;
  display: flex;
  align-items: center;
  background-image:
    linear-gradient(90deg, rgba(8, 6, 4, 0.98) 0%, rgba(8, 6, 4, 0.88) 39%, rgba(8, 6, 4, 0.08) 74%),
    url("assets/images/porch.png");
  background-position: center;
  background-size: cover;
}

.porch-copy {
  width: 58%;
  padding: 20px;
}

.porch-copy p {
  margin: 10px 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.values {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin-top: 12px;
  border-top: 1px solid #22180f;
  border-bottom: 1px solid #22180f;
}

.value {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 62px;
  color: #dfb77d;
  font-size: 13px;
}

.value-icon {
  color: var(--amber);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
}

.site-footer {
  padding: 30px 24px 38px;
  color: #8f7b65;
  font-size: 13px;
  text-align: center;
}

@media (max-width: 1120px) {
  .header-inner {
    grid-template-columns: 240px 1fr auto;
    padding: 0 24px;
  }

  .main-nav ul {
    gap: 18px;
  }

  .main-nav a {
    font-size: 14px;
  }

  .content-wrap {
    padding-right: 24px;
    padding-left: 24px;
  }

  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 820px) {
  body.admin-bar .site-header {
    top: 46px;
  }

  .header-inner {
    grid-template-columns: 1fr auto;
    min-height: 70px;
  }

  .brand-name {
    font-size: 28px;
  }

  .brand-lantern {
    width: 34px;
    height: 43px;
  }

  .menu-toggle {
    display: block;
  }

  .header-cta {
    display: none;
  }

  .main-nav {
    position: absolute;
    top: 70px;
    right: 16px;
    left: 16px;
    display: none;
    padding: 10px 20px 18px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(8, 7, 5, 0.98);
    box-shadow: 0 18px 50px #000;
  }

  .main-nav.is-open {
    display: block;
  }

  .main-nav ul {
    display: block;
  }

  .main-nav a {
    padding: 10px 4px;
  }

  .main-nav a::after {
    bottom: 4px;
  }

  .hero {
    min-height: 570px;
    align-items: flex-end;
    background-image:
      linear-gradient(0deg, rgba(4, 3, 2, 0.98) 0%, rgba(4, 3, 2, 0.82) 42%, rgba(4, 3, 2, 0.14) 76%),
      url("assets/images/workshop-hero.png");
    background-position: 63% center;
  }

  .hero-content {
    width: auto;
    padding: 40px 24px;
  }

  .hero p {
    font-size: 18px;
  }

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

  .values {
    grid-template-columns: repeat(2, 1fr);
  }

  .value:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .content-wrap {
    padding-right: 16px;
    padding-left: 16px;
  }

  .brand-tagline {
    display: none;
  }

  .hero-content {
    padding-right: 18px;
    padding-left: 18px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero-actions {
    display: grid;
  }

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

  .project-card {
    height: 178px;
    min-height: 178px;
  }

  .project-card-content {
    width: 64%;
  }

  .featured-card {
    grid-template-columns: 100px 1fr;
  }

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

  .post-card {
    padding: 0 8px 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(68, 48, 31, 0.65);
  }

  .post-card:last-child {
    border-bottom: 0;
  }

  .porch-copy {
    width: 78%;
  }
}
