/*
Theme Name: TechUnpacked
Theme URI: https://techunpacked.net/
Author: TechUnpacked
Author URI: https://techunpacked.net/
Description: A clean, story-led editorial WordPress theme for explaining technology through accessible, technically grounded articles.
Version: 1.0.0
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: techunpacked
Tags: blog, news, education, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

:root {
  --tu-ink: #142b46;
  --tu-ink-soft: #263f5b;
  --tu-teal: #159d91;
  --tu-teal-dark: #087f77;
  --tu-text: #253448;
  --tu-muted: #66758a;
  --tu-line: #e4eaf0;
  --tu-paper: #ffffff;
  --tu-wash: #f3f6f9;
  --tu-radius: 16px;
  --tu-shadow: 0 12px 34px rgba(20, 43, 70, .08);
  --tu-width: 1160px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--tu-paper); color: var(--tu-text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px; line-height: 1.72; -webkit-font-smoothing: antialiased;
}
a { color: var(--tu-teal-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--tu-ink); }
img { max-width: 100%; height: auto; display: block; }
button, input, textarea { font: inherit; }
button, .button { cursor: pointer; }
:focus-visible { outline: 3px solid rgba(21,157,145,.35); outline-offset: 3px; }
.container { width: min(var(--tu-width), calc(100% - 40px)); margin-inline: auto; }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--tu-line); backdrop-filter: blur(12px); }
.header-inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.site-branding { min-width: 190px; }
.custom-logo { max-height: 48px; width: auto; }
.site-title { margin: 0; font-size: 1.55rem; line-height: 1.1; font-weight: 800; letter-spacing: -.055em; }
.site-title a { color: var(--tu-ink); text-decoration: none; }
.site-title .brand-dot { color: var(--tu-teal); }
.site-description { margin: 5px 0 0; color: var(--tu-muted); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
.primary-navigation { display: flex; align-items: center; gap: 25px; }
.primary-navigation ul { display: flex; align-items: center; gap: 23px; margin: 0; padding: 0; list-style: none; }
.primary-navigation a { color: var(--tu-ink); font-size: .9rem; font-weight: 650; text-decoration: none; }
.primary-navigation a:hover, .primary-navigation .current-menu-item > a { color: var(--tu-teal-dark); }
.header-search a { display: inline-flex; padding: 9px 13px; border: 1px solid var(--tu-line); border-radius: 999px; text-decoration: none; font-size: .85rem; }
.menu-toggle { display: none; border: 1px solid var(--tu-line); border-radius: 10px; background: white; color: var(--tu-ink); padding: 8px 12px; }
.hero { padding: 78px 0 66px; background: linear-gradient(135deg, #f4f8fb 0%, #edf7f6 100%); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 54px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--tu-teal-dark); font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow:before { content: ""; width: 22px; height: 2px; background: var(--tu-teal); }
.hero h1 { max-width: 680px; margin: 18px 0 18px; color: var(--tu-ink); font-size: clamp(2.55rem, 5vw, 4.5rem); line-height: 1.04; letter-spacing: -.065em; }
.hero h1 span { color: var(--tu-teal); }
.hero-copy { max-width: 610px; margin: 0; color: #52647a; font-size: 1.13rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 28px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 11px 19px; border-radius: 999px; background: var(--tu-ink); color: white; font-weight: 700; text-decoration: none; border: 1px solid var(--tu-ink); transition: .2s ease; }
.button:hover { color: white; background: var(--tu-teal-dark); border-color: var(--tu-teal-dark); transform: translateY(-1px); }
.button-secondary { background: transparent; color: var(--tu-ink); border-color: #cbd7e2; }
.button-secondary:hover { color: white; }
.hero-art { position: relative; min-height: 330px; border-radius: 28px; background: radial-gradient(circle at 68% 30%, rgba(21,157,145,.25), transparent 35%), linear-gradient(145deg, #142b46, #1e4961); box-shadow: var(--tu-shadow); overflow: hidden; }
.hero-art:before, .hero-art:after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.17); border-radius: 50%; }
.hero-art:before { width: 310px; height: 310px; right: -25px; top: 10px; }
.hero-art:after { width: 210px; height: 210px; right: 25px; top: 60px; }
.art-node { position: absolute; z-index: 2; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.1); color: white; border-radius: 15px; font-size: .8rem; font-weight: 700; backdrop-filter: blur(8px); box-shadow: 0 8px 25px rgba(0,0,0,.15); }
.art-node.main { width: 118px; height: 88px; left: 50%; top: 50%; transform: translate(-50%,-50%); background: var(--tu-teal); border-color: transparent; font-size: 1rem; }
.art-node.n1 { width: 105px; height: 58px; left: 10%; top: 18%; }
.art-node.n2 { width: 105px; height: 58px; right: 8%; top: 19%; }
.art-node.n3 { width: 105px; height: 58px; left: 10%; bottom: 17%; }
.art-node.n4 { width: 105px; height: 58px; right: 8%; bottom: 17%; }
.art-line { position: absolute; height: 1px; width: 34%; background: rgba(255,255,255,.3); top: 50%; left: 13%; transform: rotate(28deg); }
.art-line.two { left: 53%; transform: rotate(-28deg); }
.art-line.three { top: 66%; transform: rotate(-28deg); }
.art-line.four { top: 66%; left: 53%; transform: rotate(28deg); }
.section { padding: 68px 0; }
.section-muted { background: var(--tu-wash); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 27px; }
.section-heading h2 { margin: 0; color: var(--tu-ink); font-size: clamp(1.65rem, 3vw, 2.25rem); letter-spacing: -.045em; line-height: 1.2; }
.section-heading p { margin: 8px 0 0; color: var(--tu-muted); }
.text-link { font-weight: 750; text-decoration: none; white-space: nowrap; }
.topic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; }
.topic-card { display: block; min-height: 170px; padding: 23px; border: 1px solid var(--tu-line); border-radius: var(--tu-radius); background: white; text-decoration: none; transition: .2s ease; }
.topic-card:hover { transform: translateY(-3px); border-color: rgba(21,157,145,.45); box-shadow: var(--tu-shadow); }
.topic-icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 17px; border-radius: 12px; background: #e9f6f4; color: var(--tu-teal-dark); font-size: 1.15rem; font-weight: 800; }
.topic-card h3 { margin: 0 0 5px; color: var(--tu-ink); font-size: 1.05rem; }
.topic-card p { margin: 0; color: var(--tu-muted); font-size: .88rem; line-height: 1.55; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 23px; }
.post-card { overflow: hidden; border: 1px solid var(--tu-line); border-radius: var(--tu-radius); background: white; transition: .2s ease; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--tu-shadow); }
.post-card-image { display: block; aspect-ratio: 16/9; overflow: hidden; background: #e9eff4; }
.post-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.post-card:hover .post-card-image img { transform: scale(1.035); }
.post-card-body { padding: 20px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 9px; color: var(--tu-teal-dark); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.post-card h3 { margin: 10px 0 9px; color: var(--tu-ink); font-size: 1.18rem; line-height: 1.35; letter-spacing: -.025em; }
.post-card h3 a { color: inherit; text-decoration: none; }
.post-card p { margin: 0; color: var(--tu-muted); font-size: .9rem; line-height: 1.6; }
.read-more { display: inline-block; margin-top: 15px; font-size: .86rem; font-weight: 750; text-decoration: none; }
.newsletter { display: grid; grid-template-columns: 1fr auto; gap: 25px; align-items: center; padding: 35px; border-radius: 22px; background: var(--tu-ink); color: white; }
.newsletter h2 { margin: 0 0 7px; font-size: 1.7rem; letter-spacing: -.04em; }
.newsletter p { max-width: 620px; margin: 0; color: #c7d4df; }
.newsletter .button { background: var(--tu-teal); border-color: var(--tu-teal); }
.page-header { padding: 58px 0 35px; background: var(--tu-wash); }
.page-header h1 { margin: 10px 0; color: var(--tu-ink); font-size: clamp(2.1rem, 4vw, 3.2rem); letter-spacing: -.055em; line-height: 1.12; }
.page-header p { max-width: 700px; margin: 0; color: var(--tu-muted); }
.content-area { padding: 55px 0 75px; }
.archive-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 23px; }
.article-layout { display: grid; grid-template-columns: minmax(0, 760px) 250px; gap: 55px; justify-content: center; }
.article-header { margin-bottom: 28px; }
.article-header h1 { margin: 13px 0; color: var(--tu-ink); font-size: clamp(2.2rem, 4.8vw, 3.65rem); line-height: 1.1; letter-spacing: -.06em; }
.article-deck { color: var(--tu-muted); font-size: 1.15rem; }
.article-featured { width: 100%; max-height: 470px; object-fit: cover; border-radius: 18px; margin: 25px 0 32px; }
.entry-content { color: #2b3c50; font-size: 1.04rem; line-height: 1.85; }
.entry-content h2, .entry-content h3, .entry-content h4 { color: var(--tu-ink); line-height: 1.25; letter-spacing: -.035em; margin-top: 1.8em; }
.entry-content h2 { font-size: 1.8rem; }
.entry-content h3 { font-size: 1.35rem; }
.entry-content blockquote { margin: 28px 0; padding: 8px 22px; border-left: 4px solid var(--tu-teal); color: var(--tu-ink-soft); background: var(--tu-wash); }
.entry-content pre { overflow: auto; padding: 20px; border-radius: 12px; background: #142b46; color: #edf6fb; }
.entry-content code { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: .9em; }
.entry-content img { border-radius: 12px; }
.article-sidebar { position: sticky; top: 110px; align-self: start; padding: 20px; border: 1px solid var(--tu-line); border-radius: 14px; }
.article-sidebar h3 { margin: 0 0 10px; color: var(--tu-ink); font-size: 1rem; }
.article-sidebar p { margin: 0; color: var(--tu-muted); font-size: .88rem; }
.pagination, .nav-links { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 35px; }
.page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; padding: 6px 12px; border: 1px solid var(--tu-line); border-radius: 9px; text-decoration: none; }
.page-numbers.current { background: var(--tu-ink); color: white; border-color: var(--tu-ink); }
.search-form { display: flex; gap: 9px; max-width: 520px; }
.search-form label { flex: 1; }
.search-field { width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid #ccd7e1; border-radius: 10px; }
.search-submit { border: 0; }
.site-footer { padding: 48px 0 25px; background: #10243a; color: #d5e0e9; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-brand { color: white; font-size: 1.45rem; font-weight: 850; letter-spacing: -.05em; }
.footer-grid h3 { margin: 0 0 12px; color: white; font-size: .95rem; }
.footer-grid p { max-width: 390px; color: #aebdca; font-size: .9rem; }
.footer-grid ul { margin: 0; padding: 0; list-style: none; }
.footer-grid li { margin: 7px 0; }
.footer-grid a { color: #cbd7e1; text-decoration: none; font-size: .88rem; }
.footer-grid a:hover { color: white; }
.footer-bottom { display: flex; justify-content: space-between; gap: 15px; margin-top: 38px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.14); color: #aebdca; font-size: .78rem; }
.no-results { padding: 35px; border: 1px dashed #cbd7e1; border-radius: 14px; text-align: center; }
.alignwide { max-width: 1100px; margin-left: auto; margin-right: auto; }
.alignfull { 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; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-art { min-height: 290px; }
  .article-layout { grid-template-columns: minmax(0, 760px); }
  .article-sidebar { position: static; }
}
@media (max-width: 760px) {
  .container { width: min(var(--tu-width), calc(100% - 30px)); }
  .header-inner { min-height: 68px; }
  .menu-toggle { display: inline-flex; }
  .primary-navigation { display: none; position: absolute; top: 68px; left: 0; right: 0; padding: 18px 22px 22px; background: white; border-bottom: 1px solid var(--tu-line); box-shadow: var(--tu-shadow); }
  .primary-navigation.is-open { display: block; }
  .primary-navigation ul { display: grid; gap: 14px; }
  .primary-navigation .header-search { margin-top: 14px; }
  .hero { padding: 55px 0 45px; }
  .hero-art { min-height: 245px; }
  .section { padding: 48px 0; }
  .topic-grid, .post-grid, .archive-grid { grid-template-columns: repeat(2, 1fr); }
  .newsletter { grid-template-columns: 1fr; padding: 27px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .topic-grid, .post-grid, .archive-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: start; flex-direction: column; }
  .hero h1 { font-size: 2.65rem; }
  .hero-art { min-height: 220px; }
  .art-node.n1, .art-node.n3 { left: 5%; }
  .art-node.n2, .art-node.n4 { right: 5%; }
  .art-node { transform: scale(.86); }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid > div:first-child { grid-column: auto; }
  .footer-bottom { flex-direction: column; }
}
