/*
Theme Name: TudorMihai
Theme URI: https://tudormihai.net/
Author: OpenAI for TudorMihai.net
Description: Editorial personal-tech WordPress theme.
Version: 1.6.0
Requires at least: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: tudormihai
*/
:root{--bg:#eaf0f5;--paper:#fdfefe;--panel:#f4f7fa;--ink:#111821;--muted:#66717d;--line:#ccd6df;--blue:#0867d8;--blue2:#074a9e;--soft:#e2edf9;--max:1180px}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--ink);font-family:Arial,"Helvetica Neue",sans-serif;line-height:1.55;-webkit-font-smoothing:antialiased}
body.tm-dark{--bg:#0d1218;--paper:#151b22;--panel:#1b232c;--ink:#edf3f8;--muted:#9aa6b3;--line:#2e3945;--blue:#67acff;--blue2:#9ac7ff;--soft:#17283a}
a{color:inherit;text-underline-offset:3px}
a:hover{color:var(--blue)}
img{max-width:100%;height:auto;display:block}
button,input,textarea,select{font:inherit}
.tm-wrap{width:min(calc(100% - 36px),var(--max));margin:auto}

/* Header */
.tm-site-header{background:var(--paper);border-top:4px solid var(--blue);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:40}
.tm-topbar{min-height:70px;display:flex;align-items:center;gap:34px}
.tm-brand{margin-right:auto;text-decoration:none}
.tm-brand strong{font-size:28px;letter-spacing:-1.45px}
.tm-brand span{color:var(--blue)}
.tm-nav ul{display:flex;gap:24px;list-style:none;margin:0;padding:0}
.tm-nav a{font-size:14px;font-weight:700;text-decoration:none}
.tm-header-actions{display:flex;gap:12px}
.tm-text-btn{border:0;background:transparent;color:var(--muted);cursor:pointer}
.tm-menu-toggle{display:none}

/* Front page */
.tm-home{padding:30px 0 76px}
.tm-front{
  display:grid;grid-template-columns:minmax(0,1.65fr) minmax(300px,.75fr);
  gap:18px;margin-bottom:18px
}
.tm-front-main{background:var(--paper);border:1px solid var(--line)}
.tm-front-image{display:block;position:relative;background:#dfe7f0}
.tm-front-image img{width:100%;height:330px;object-fit:cover}
.tm-front-copy{padding:25px 28px 27px}
.tm-label{font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:var(--blue);margin-bottom:7px}
.tm-front-copy h1{font-family:Georgia,"Times New Roman",serif;font-size:44px;line-height:1.04;letter-spacing:-1.1px;margin:0 0 12px}
.tm-front-copy h1 a{text-decoration:none}
.tm-front-excerpt{font-size:15px;color:var(--muted);max-width:68ch}
.tm-front-excerpt p{margin:0}
.tm-byline{font-size:11px;color:var(--muted);margin-top:14px}
.tm-byline span{padding:0 5px;color:var(--line)}
.tm-front-side{display:grid;grid-template-rows:1fr 1fr;gap:18px}
.tm-mini-story{background:var(--paper);border:1px solid var(--line);display:grid;grid-template-columns:145px 1fr;min-height:0}
.tm-mini-image{display:block;background:#dfe7f0;min-height:100%}
.tm-mini-image img{width:100%;height:100%;object-fit:cover}
.tm-mini-story>div{padding:17px 17px 14px}
.tm-mini-story h2{font-family:Georgia,"Times New Roman",serif;font-size:22px;line-height:1.12;margin:5px 0}
.tm-mini-story h2 a{text-decoration:none}
.tm-photo-fallback{min-height:330px;display:flex;align-items:center;justify-content:center;background:
linear-gradient(135deg,#e8eef5 0 49%,#dce8f5 49% 51%,#edf3f8 51%)}
.tm-dark .tm-photo-fallback{background:#182431}
.tm-photo-fallback b{font-size:68px;letter-spacing:-5px;color:var(--blue);font-family:Arial,sans-serif}
.tm-photo-fallback.tm-small{min-height:100%;height:100%}
.tm-photo-fallback.tm-small b{font-size:36px}

/* Topic strip */
.tm-strip{display:flex;align-items:center;gap:10px;overflow:auto;padding:11px 14px;background:var(--paper);border:1px solid var(--line);margin-bottom:32px;white-space:nowrap}
.tm-strip strong{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);margin-right:4px}
.tm-strip a{font-size:12px;font-weight:700;text-decoration:none;padding:5px 9px;background:var(--soft);color:var(--blue2);border-radius:2px}

/* Feed */
.tm-home-grid{display:grid;grid-template-columns:minmax(0,790px) 310px;gap:54px;justify-content:space-between}
.tm-section-head{display:flex;justify-content:space-between;align-items:baseline;border-bottom:3px solid var(--ink);padding-bottom:9px}
.tm-section-head h2{font-size:18px;margin:0;text-transform:uppercase;letter-spacing:.03em}
.tm-section-head>a{font-size:12px;color:var(--muted)}
.tm-post-card{display:grid;grid-template-columns:205px minmax(0,1fr);gap:22px;padding:25px 0;border-bottom:1px solid var(--line)}
.tm-post-card:not(:has(.tm-post-media)){grid-template-columns:1fr}
.tm-post-thumb{width:100%;aspect-ratio:16/10;object-fit:cover;border:1px solid var(--line)}
.tm-meta{display:flex;gap:12px;color:var(--muted);font-size:11px}
.tm-cat{font-weight:800;color:var(--blue)}
.tm-post-card h2{font-family:Georgia,"Times New Roman",serif;font-size:28px;line-height:1.08;letter-spacing:-.5px;margin:7px 0 9px}
.tm-post-card h2 a{text-decoration:none}
.tm-excerpt{font-size:14px;color:var(--muted)}
.tm-excerpt p{margin:0}
.tm-post-foot{display:flex;gap:18px;margin-top:11px;font-size:11px}
.tm-readmore{font-weight:700;color:var(--blue);text-decoration:none}
.tm-comments{color:var(--muted)}

/* Sidebar */
.tm-sidebar{display:flex;flex-direction:column;gap:25px}
.tm-widget{padding-top:12px;border-top:3px solid var(--ink)}
.tm-widget h3{font-size:13px;text-transform:uppercase;letter-spacing:.05em;margin:0 0 12px}
.tm-widget p{font-size:14px;color:var(--muted);margin:0 0 10px}
.tm-widget a{font-size:13px}
.tm-note{background:var(--blue);color:#fff;border:0;padding:20px 21px}
.tm-note h3{font-size:20px;text-transform:none;letter-spacing:0}
.tm-note p{color:rgba(255,255,255,.82)}
.tm-note a{color:#fff;font-weight:700}
.tm-quick .tm-widget-title{display:flex;justify-content:space-between;align-items:baseline}
.tm-quick .tm-widget-title span{font-size:10px;color:var(--muted);text-transform:uppercase}
.tm-quick ul{list-style:none;padding:0;margin:0}
.tm-quick li{display:grid;grid-template-columns:1fr auto;gap:12px;padding:11px 0;border-bottom:1px solid var(--line)}
.tm-quick li a{font-size:13px;font-weight:700;line-height:1.35;text-decoration:none}
.tm-quick li span{font-size:10px;color:var(--muted)}
.tm-category-list{list-style:none;margin:0;padding:0}
.tm-category-list li{display:flex;justify-content:space-between;border-bottom:1px solid var(--line);padding:7px 0;color:var(--muted);font-size:12px}
.tm-category-list a{color:var(--ink);font-size:14px;text-decoration:none}

/* Single */
.tm-article-shell{width:min(calc(100% - 36px),820px);margin:48px auto 80px}
.tm-article-header{border-bottom:1px solid var(--line);padding-bottom:24px}
.tm-article-header h1{font-family:Georgia,"Times New Roman",serif;font-size:clamp(38px,6vw,62px);line-height:1.02;letter-spacing:-1.4px}
.tm-content{font-family:Georgia,"Times New Roman",serif;font-size:19px;line-height:1.78}
.tm-content a{color:var(--blue)}
.tm-content h2,.tm-content h3{font-family:Arial,"Helvetica Neue",sans-serif}
.tm-content blockquote{border-left:4px solid var(--blue);padding-left:20px;color:var(--muted)}
.tm-content pre{overflow:auto;background:#10161d;color:#eaf3ff;padding:18px}
.tm-author-box,.comments-area{margin-top:36px;border-top:3px solid var(--ink);padding-top:18px}

/* Footer */
.tm-pagination{margin-top:30px}
.tm-pagination .page-numbers{display:inline-block;border:1px solid var(--line);background:var(--paper);padding:7px 11px;text-decoration:none;font-size:13px}
.tm-pagination .current{background:var(--blue);color:#fff;border-color:var(--blue)}
.tm-footer{background:var(--paper);border-top:1px solid var(--line)}
.tm-footer-inner{min-height:88px;display:flex;align-items:center;gap:28px}
.tm-footer-inner>strong{margin-right:auto}
.tm-footer ul{display:flex;gap:18px;list-style:none;padding:0}
.tm-footer-links{display:flex;gap:16px}
.tm-copyright{border-top:1px solid var(--line);padding:12px 0 20px;color:var(--muted);font-size:11px}

@media(max-width:920px){
  .tm-front{grid-template-columns:1fr}
  .tm-front-side{grid-template-columns:1fr 1fr;grid-template-rows:auto}
  .tm-home-grid{grid-template-columns:1fr}
  .tm-sidebar{display:grid;grid-template-columns:repeat(2,1fr)}
  .tm-nav ul{display:none;position:absolute;top:70px;left:18px;right:18px;background:var(--paper);border:1px solid var(--line);padding:18px;z-index:20;flex-direction:column}
  .tm-menu-toggle{display:block}
  body.tm-menu-open .tm-nav ul{display:flex}
}
@media(max-width:650px){
  .tm-wrap{width:min(calc(100% - 24px),var(--max))}
  .tm-home{padding-top:18px}
  .tm-front-copy{padding:22px}
  .tm-front-copy h1{font-size:37px}
  .tm-front-image img,.tm-photo-fallback{height:240px;min-height:240px}
  .tm-front-side{grid-template-columns:1fr}
  .tm-mini-story{grid-template-columns:115px 1fr}
  .tm-mini-story h2{font-size:19px}
  .tm-post-card{grid-template-columns:115px minmax(0,1fr);gap:14px}
  .tm-post-card h2{font-size:22px}
  .tm-excerpt{display:none}
  .tm-comments{display:none}
  .tm-sidebar{grid-template-columns:1fr}
  .tm-footer-inner{flex-direction:column;align-items:flex-start;padding:24px 0}
  .tm-footer-inner>strong{margin:0}
}

/* v1.5 — more depth, less white */
body{
  background:
    linear-gradient(180deg, rgba(8,103,216,.045), transparent 260px),
    var(--bg);
}
.tm-front-main,
.tm-mini-story,
.tm-strip,
.tm-footer,
.tm-site-header{
  box-shadow:0 1px 0 rgba(17,24,33,.025);
}
.tm-front-main{background:var(--paper)}
.tm-front-side .tm-mini-story:nth-child(2){background:var(--panel)}
.tm-strip{background:var(--panel)}
.tm-home-grid{position:relative}
.tm-feed{
  background:rgba(255,255,255,.34);
  border:1px solid rgba(204,214,223,.72);
  padding:0 22px 20px;
}
.tm-dark .tm-feed{background:rgba(255,255,255,.018)}
.tm-sidebar .tm-widget:not(.tm-note){
  background:var(--panel);
  border-left:1px solid var(--line);
  border-right:1px solid var(--line);
  border-bottom:1px solid var(--line);
  padding:14px 16px 16px;
}
.tm-sidebar .tm-widget:not(.tm-note){border-top-width:3px}
.tm-post-card:nth-child(even){background:rgba(8,103,216,.018);margin-inline:-12px;padding-inline:12px}
.tm-dark .tm-post-card:nth-child(even){background:rgba(103,172,255,.025)}
.tm-footer{background:var(--panel)}

/* Integrated theme switch */
.tm-theme-toggle{
  display:inline-flex;align-items:center;gap:8px;
  border:1px solid var(--line);background:var(--panel);color:var(--ink);
  min-height:34px;padding:6px 10px;border-radius:999px;
  cursor:pointer;font-size:12px;font-weight:700;
  transition:border-color .18s ease,background .18s ease,color .18s ease
}
.tm-theme-toggle:hover{border-color:var(--blue);color:var(--blue)}
.tm-theme-icon{
  width:18px;height:18px;display:inline-grid;place-items:center;
  border-radius:50%;background:var(--blue);color:#fff;font-size:12px;line-height:1
}
.tm-dark .tm-theme-toggle{background:#202a35}
.tm-dark .tm-theme-icon{background:#f1c75b;color:#171717}
.tm-dark .tm-site-header{background:#151b22}
.tm-dark .tm-note{background:#0b5bb9}
.tm-dark .tm-front-main,
.tm-dark .tm-mini-story{box-shadow:none}

@media(max-width:650px){
  .tm-theme-label{display:none}
  .tm-theme-toggle{padding:6px;min-width:34px;justify-content:center}
  .tm-feed{padding-inline:12px}
}

/* Customizable feed layouts */
.tm-no-sidebar .tm-home-grid{grid-template-columns:minmax(0,900px);justify-content:center}
.tm-card-compact .tm-post-card{grid-template-columns:125px minmax(0,1fr);padding:18px 0}
.tm-card-compact .tm-post-card h2{font-size:23px}.tm-card-compact .tm-excerpt{display:none}
.tm-card-large .tm-post-card{grid-template-columns:1fr;gap:13px}.tm-card-large .tm-post-media{order:-1}
.tm-card-large .tm-post-thumb{aspect-ratio:16/7}.tm-card-large .tm-post-card h2{font-size:34px}
