/*
Theme Name: The Dorm Logic
Theme URI: https://thedormlogic.com/
Author: The Dorm Logic
Description: A clean editorial WordPress theme for smart living, small spaces, home office and renter-friendly technology.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.9
License: GPL-2.0-or-later
Text Domain: the-dorm-logic
*/

:root{
  --ink:#171717;
  --muted:#686868;
  --paper:#fbfaf7;
  --white:#fff;
  --line:#dedbd4;
  --accent:#7f9188;
  --max:1240px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--sans);font-size:16px;line-height:1.65}
img{max-width:100%;height:auto;display:block}
a{color:inherit;text-decoration:none}
a:hover{opacity:.72}
.site-wrap{max-width:var(--max);margin:auto;padding:0 28px}
.site-header{background:var(--paper);border-bottom:1px solid var(--line)}
.topbar{height:34px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:center;font-size:10px;letter-spacing:.18em;text-transform:uppercase;color:var(--muted)}
.header-main{min-height:92px;display:flex;align-items:center;justify-content:space-between;gap:28px}
.brand{font-family:var(--serif);font-size:30px;letter-spacing:-.035em;white-space:nowrap}
.brand small{display:block;font-family:var(--sans);font-size:9px;letter-spacing:.24em;text-transform:uppercase;color:var(--muted);margin-top:-3px}
.main-nav ul{display:flex;list-style:none;margin:0;padding:0;gap:27px;align-items:center}
.main-nav a{font-size:13px;letter-spacing:.02em}
.menu-toggle{display:none;border:0;background:none;font-size:24px}
.hero{padding:54px 0 46px}
.hero-grid{display:grid;grid-template-columns:1.55fr .9fr;gap:18px}
.hero-main{position:relative;min-height:520px;background:#e7e4dc;overflow:hidden}
.hero-main .thumb-placeholder{height:520px}
.hero-main .hero-copy{position:absolute;left:38px;right:38px;bottom:34px;max-width:720px}
.kicker{font-size:10px;letter-spacing:.2em;text-transform:uppercase;color:var(--muted);font-weight:700}
.hero h1{font-family:var(--serif);font-weight:400;font-size:54px;line-height:1.02;letter-spacing:-.045em;margin:10px 0 14px}
.hero-excerpt{font-size:17px;max-width:620px;margin:0;color:#383838}
.hero-side{display:grid;grid-template-rows:1fr 1fr 1fr;gap:18px}
.feature-card{display:grid;grid-template-columns:40% 1fr;background:var(--white);border:1px solid var(--line);min-height:161px}
.feature-card .thumb-placeholder{min-height:100%}
.feature-card-content{padding:20px}
.feature-card h2{font-family:var(--serif);font-weight:400;font-size:22px;line-height:1.12;margin:7px 0}
.thumb-placeholder{background:linear-gradient(135deg,#dedbd2,#eeece6);position:relative;overflow:hidden}
.thumb-placeholder:after{content:"";position:absolute;inset:18% 14%;border:1px solid rgba(23,23,23,.12);transform:rotate(-5deg)}
.section{padding:42px 0 58px}
.section-head{display:flex;align-items:end;justify-content:space-between;border-top:1px solid var(--ink);padding-top:14px;margin-bottom:24px}
.section-title{font-family:var(--serif);font-size:31px;font-weight:400;letter-spacing:-.03em;margin:0}
.section-link{font-size:11px;letter-spacing:.15em;text-transform:uppercase}
.trending-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}
.article-card{background:var(--white)}
.article-card .thumb-placeholder{aspect-ratio:1.28}
.article-card-content{padding:15px 4px 0}
.article-card h3{font-family:var(--serif);font-weight:400;font-size:21px;line-height:1.15;margin:7px 0}
.article-card p{font-size:13px;color:var(--muted);margin:0}
.editorial-band{background:#efede7;padding:58px 0}
.band-grid{display:grid;grid-template-columns:1fr 1fr;gap:55px;align-items:center}
.band-copy{max-width:530px}
.band-copy h2{font-family:var(--serif);font-weight:400;font-size:43px;line-height:1.05;letter-spacing:-.04em;margin:8px 0 18px}
.band-copy p{color:#4d4d4d}
.button{display:inline-flex;padding:12px 20px;border:1px solid var(--ink);font-size:11px;text-transform:uppercase;letter-spacing:.14em;margin-top:12px}
.latest-grid{display:grid;grid-template-columns:2fr 1fr;gap:42px}
.post-list{display:grid;gap:20px}
.post-row{display:grid;grid-template-columns:235px 1fr;gap:22px;padding-bottom:20px;border-bottom:1px solid var(--line)}
.post-row .thumb-placeholder{aspect-ratio:1.45}
.post-row h2{font-family:var(--serif);font-size:28px;line-height:1.1;font-weight:400;margin:7px 0}
.post-row p{color:var(--muted);font-size:14px;margin:0}
.sidebar-box{border-top:1px solid var(--ink);padding-top:14px}
.sidebar-box h3{font-family:var(--serif);font-weight:400;font-size:27px;margin:0 0 13px}
.sidebar-box p{color:var(--muted);font-size:14px}
.newsletter{background:var(--ink);color:var(--white);padding:38px}
.newsletter h2{font-family:var(--serif);font-size:32px;font-weight:400;line-height:1.05;margin:0 0 10px}
.newsletter p{color:#d5d5d5;font-size:14px}
.newsletter input{width:100%;padding:13px;border:0;margin:8px 0;background:#fff}
.newsletter button{padding:13px 18px;background:var(--white);color:var(--ink);border:0;font-size:11px;letter-spacing:.12em;text-transform:uppercase}
.site-footer{border-top:1px solid var(--line);padding:48px 0 25px;margin-top:20px}
.footer-grid{display:grid;grid-template-columns:1.5fr 1fr 1fr 1fr;gap:30px}
.footer-brand{font-family:var(--serif);font-size:28px}
.footer-title{font-size:10px;text-transform:uppercase;letter-spacing:.17em;font-weight:700}
.footer-grid ul{list-style:none;padding:0;margin:12px 0}
.footer-grid li{margin:6px 0;font-size:13px;color:var(--muted)}
.copyright{border-top:1px solid var(--line);margin-top:35px;padding-top:18px;color:var(--muted);font-size:11px}
.single-header{padding:65px 0 35px;max-width:900px}
.single-header h1{font-family:var(--serif);font-size:58px;line-height:1.02;font-weight:400;letter-spacing:-.045em;margin:9px 0 20px}
.entry-meta{font-size:11px;text-transform:uppercase;letter-spacing:.12em;color:var(--muted)}
.entry-content{max-width:780px;font-size:18px}
.entry-content h2,.entry-content h3{font-family:var(--serif);font-weight:400;line-height:1.15}
.entry-content h2{font-size:34px;margin-top:42px}
.entry-content h3{font-size:26px;margin-top:34px}
.entry-content img{margin:30px 0}
.archive-header{padding:58px 0 30px;border-bottom:1px solid var(--line)}
.archive-header h1{font-family:var(--serif);font-size:52px;font-weight:400;line-height:1;margin:8px 0}
.pagination{padding:30px 0}
@media(max-width:900px){
  .site-wrap{padding:0 18px}
  .header-main{min-height:76px}
  .main-nav{display:none}
  .menu-toggle{display:block}
  .hero-grid,.band-grid,.latest-grid{grid-template-columns:1fr}
  .hero-main,.hero-main .thumb-placeholder{min-height:430px;height:430px}
  .hero h1{font-size:43px}
  .trending-grid{grid-template-columns:repeat(2,1fr)}
  .footer-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:560px){
  .brand{font-size:25px}
  .hero{padding-top:30px}
  .hero-main,.hero-main .thumb-placeholder{min-height:390px;height:390px}
  .hero-main .hero-copy{left:22px;right:22px;bottom:22px}
  .hero h1{font-size:37px}
  .hero-excerpt{font-size:14px}
  .hero-side{gap:10px}
  .feature-card{min-height:135px}
  .feature-card-content{padding:12px}
  .feature-card h2{font-size:18px}
  .trending-grid{grid-template-columns:1fr 1fr;gap:12px}
  .article-card h3{font-size:18px}
  .band-copy h2{font-size:35px}
  .post-row{grid-template-columns:120px 1fr;gap:13px}
  .post-row h2{font-size:21px}
  .post-row p{display:none}
  .footer-grid{grid-template-columns:1fr}
  .single-header h1{font-size:42px}
  .entry-content{font-size:17px}
}


/* --- Lightweight editorial motion: CSS-only, no libraries --- */
@keyframes tdl-fade-up{
  from{opacity:0;transform:translateY(12px)}
  to{opacity:1;transform:translateY(0)}
}
@keyframes tdl-fade-in{
  from{opacity:0}
  to{opacity:1}
}
.hero-main{animation:tdl-fade-in .55s ease-out both}
.hero-side .feature-card{animation:tdl-fade-up .55s ease-out both}
.hero-side .feature-card:nth-child(2){animation-delay:.08s}
.hero-side .feature-card:nth-child(3){animation-delay:.16s}
.section{animation:tdl-fade-up .55s ease-out both}

.article-card,
.post-row{
  transition:transform .22s ease, opacity .22s ease;
}
.article-card:hover,
.post-row:hover{
  transform:translateY(-3px);
}
.feature-card{
  transition:transform .22s ease, box-shadow .22s ease;
}
.feature-card:hover{
  transform:translateY(-3px);
  box-shadow:0 8px 24px rgba(23,23,23,.07);
}
.article-card img,
.feature-card img,
.post-row img,
.hero-main img{
  transition:transform .45s cubic-bezier(.2,.7,.2,1);
}
.article-card:hover img,
.feature-card:hover img,
.post-row:hover img{
  transform:scale(1.025);
}
.main-nav a{
  position:relative;
}
.main-nav a:after{
  content:"";
  position:absolute;
  left:0;
  right:100%;
  bottom:-7px;
  height:1px;
  background:var(--ink);
  transition:right .25s ease;
}
@media (hover:hover) and (pointer:fine){
  .main-nav a:hover{opacity:1}
  .main-nav a:hover:after{right:0}
  .article-card:hover h3 a,
  .feature-card:hover h2 a,
  .post-row:hover h2 a{
    opacity:.72;
  }
}
.button{
  transition:background-color .2s ease,color .2s ease,transform .2s ease;
}
.button:hover{
  opacity:1;
  background:var(--ink);
  color:var(--white);
  transform:translateY(-1px);
}
@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
  }
}


/* --- Author profile --- */
.author-box{
  max-width:780px;
  margin:58px 0 70px;
  padding:28px 0;
  border-top:1px solid var(--ink);
  border-bottom:1px solid var(--line);
  display:grid;
  grid-template-columns:86px 1fr;
  gap:22px;
  align-items:center;
}
.author-avatar{
  width:86px;
  height:86px;
  border-radius:50%;
  object-fit:cover;
}
.author-avatar-fallback{
  width:86px;height:86px;border-radius:50%;
  background:#e7e4dc;display:flex;align-items:center;justify-content:center;
  font-family:var(--serif);font-size:30px;
}
.author-label{
  font-size:9px;letter-spacing:.18em;text-transform:uppercase;
  color:var(--muted);font-weight:700;margin-bottom:5px;
}
.author-name{
  font-family:var(--serif);font-size:27px;line-height:1.1;
  margin:0 0 6px;font-weight:400;
}
.author-bio{margin:0;color:var(--muted);font-size:14px;line-height:1.6}
.author-link{
  display:inline-block;margin-top:9px;font-size:10px;
  letter-spacing:.13em;text-transform:uppercase;border-bottom:1px solid var(--ink);
}
.article-byline{
  display:flex;align-items:center;gap:10px;margin-top:18px;
  font-size:11px;color:var(--muted);
}
.article-byline img{width:30px;height:30px;border-radius:50%;object-fit:cover}
@media(max-width:560px){
  .author-box{grid-template-columns:64px 1fr;gap:15px;margin-top:42px}
  .author-avatar,.author-avatar-fallback{width:64px;height:64px}
  .author-name{font-size:23px}
}


/* --- AdSense placements --- */
.tdl-ad-section{
  padding-top:6px;
  padding-bottom:18px;
}
.tdl-ad-section-bottom{
  padding-top:8px;
  padding-bottom:8px;
}
.tdl-ad{
  width:100%;
  margin:0 auto;
  text-align:center;
  overflow:hidden;
}
.tdl-ad-label{
  font-size:9px;
  line-height:1;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:#8a8a8a;
  margin-bottom:8px;
}
.tdl-ad ins.adsbygoogle{
  display:block;
  width:100%;
}
.tdl-home-ad,
.tdl-article-top-ad,
.tdl-article-bottom-ad{
  max-width:1100px;
  min-height:90px;
}
.tdl-inline-ad{
  margin:34px 0 38px;
  width:100%;
}
.tdl-inline-ad .tdl-ad{
  max-width:760px;
  min-height:180px;
}
.tdl-sidebar-ad{
  margin:0 0 34px;
  min-height:250px;
}
.tdl-sidebar-ad .tdl-ad-label{
  text-align:left;
}
@media(max-width:820px){
  .tdl-sidebar-ad{min-height:120px;margin-bottom:28px}
  .tdl-ad-section{padding-top:2px;padding-bottom:12px}
  .tdl-home-ad,.tdl-article-top-ad,.tdl-article-bottom-ad{min-height:80px}
}
