/*
Theme Name: WhatIsMyPublicIP
Theme URI: https://www.whatismypublicip.com/
Author: WhatIsMyPublicIP.com
Description: Dark, futuristic blog theme that matches the WhatIsMyPublicIP.com main site. Shares its stylesheet with the main site and adds blog-specific styles below.
Version: 1.0.0
Requires at least: 5.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: wimpi
*/

/* ============================================================
   Blog-specific styles. The base design (colors, nav, footer,
   buttons, cards) comes from the shared site stylesheet.
   ============================================================ */

/* ---------- Post grid ---------- */
.post-grid{display:grid; grid-template-columns:repeat(2,1fr); gap:22px; margin-top:8px;}
@media (max-width:760px){.post-grid{grid-template-columns:1fr;}}

.post-card{
  background:var(--bg-panel); border:1px solid var(--line); border-radius:16px; overflow:hidden;
  display:flex; flex-direction:column; transition:border-color .2s, transform .2s, box-shadow .2s;
}
.post-card:hover{border-color:var(--line-bright); transform:translateY(-3px); box-shadow:var(--glow);}
.post-card .post-thumb{
  display:block; aspect-ratio:16/9; overflow:hidden; background:linear-gradient(135deg, rgba(59,130,246,0.18), rgba(34,211,238,0.06));
  border-bottom:1px solid var(--line);
}
.post-card .post-thumb img{width:100%; height:100%; object-fit:cover; display:block; transition:transform .4s;}
.post-card:hover .post-thumb img{transform:scale(1.03);}
.post-card .post-thumb.no-image{display:flex; align-items:center; justify-content:center;}
.post-card .post-thumb.no-image svg{width:56px; height:56px; color:var(--cyan); opacity:0.7;}
.post-card .post-body{padding:24px 26px 26px; display:flex; flex-direction:column; flex:1;}
.post-cat{font-family:'JetBrains Mono', monospace; font-size:11px; color:var(--cyan); text-transform:uppercase; letter-spacing:0.05em;}
.post-card h2{font-size:18px; margin:12px 0 10px; font-weight:600; line-height:1.35;}
.post-card h2 a:hover{color:var(--cyan);}
.post-card .post-excerpt{color:var(--text-muted); font-size:14px; margin:0; flex:1;}
.post-card .post-excerpt p{margin:0;}
.post-meta{margin-top:16px; font-size:12.5px; color:var(--text-dim); display:flex; gap:14px; flex-wrap:wrap;}

/* First post spans full width on the first page of the main blog index */
.post-grid.has-featured .post-card:first-child{grid-column:1/-1; flex-direction:row;}
.post-grid.has-featured .post-card:first-child .post-thumb{width:48%; aspect-ratio:auto; border-bottom:none; border-right:1px solid var(--line);}
.post-grid.has-featured .post-card:first-child h2{font-size:24px;}
@media (max-width:760px){
  .post-grid.has-featured .post-card:first-child{flex-direction:column;}
  .post-grid.has-featured .post-card:first-child .post-thumb{width:100%; aspect-ratio:16/9; border-right:none; border-bottom:1px solid var(--line);}
}

/* ---------- Pagination ---------- */
.pagination{margin-top:40px;}
.pagination .nav-links{display:flex; flex-wrap:wrap; gap:8px; align-items:center; justify-content:center;}
.pagination .page-numbers{
  min-width:40px; height:40px; padding:0 14px; display:inline-flex; align-items:center; justify-content:center;
  border:1px solid var(--line); border-radius:10px; background:var(--bg-panel); color:var(--text-muted);
  font-size:14px; font-weight:500; transition:all .2s;
}
.pagination a.page-numbers:hover{border-color:var(--line-bright); color:var(--text);}
.pagination .page-numbers.current{background:linear-gradient(135deg, var(--blue), var(--cyan)); color:#04141a; border-color:transparent; font-weight:600;}
.pagination .page-numbers.dots{border:none; background:none;}

/* ---------- Single post / page ---------- */
.article-header{padding:56px 0 8px;}
.article-header h1{font-size:clamp(28px,4vw,40px); font-weight:600; line-height:1.2;}
.article-meta{margin-top:16px; font-size:13.5px; color:var(--text-dim); display:flex; gap:16px; flex-wrap:wrap;}
.article-hero-img{margin:32px 0 8px; border-radius:16px; overflow:hidden; border:1px solid var(--line);}
.article-hero-img img{display:block; width:100%; height:auto;}
.entry-content{max-width:none; font-size:16px; line-height:1.75;}
.entry-content > *:first-child{margin-top:0;}
.entry-content h2{color:var(--text); font-size:26px; margin:40px 0 14px; font-weight:600;}
.entry-content h3{color:var(--text); font-size:20px; margin:32px 0 10px;}
.entry-content h4{color:var(--text); font-size:17px; margin:26px 0 8px;}
.entry-content p{margin:0 0 18px;}
.entry-content a{color:var(--cyan); text-decoration:underline; text-underline-offset:3px;}
.entry-content a:hover{color:#ffffff;}
.entry-content ul, .entry-content ol{margin:0 0 20px; padding-left:22px;}
.entry-content li{margin-bottom:8px;}
.entry-content img{max-width:100%; height:auto; border-radius:12px; border:1px solid var(--line);}
.entry-content figure{margin:28px 0;}
.entry-content figcaption, .wp-caption-text{font-size:13px; color:var(--text-dim); margin-top:10px; text-align:center;}
.entry-content blockquote{
  margin:28px 0; padding:18px 24px; border-left:3px solid var(--cyan);
  background:var(--bg-panel); border-radius:0 12px 12px 0; color:var(--text);
}
.entry-content blockquote p:last-child{margin-bottom:0;}
.entry-content code{
  font-family:'JetBrains Mono', monospace; font-size:0.88em; color:var(--cyan);
  background:rgba(59,130,246,0.1); border:1px solid rgba(59,130,246,0.2); padding:2px 7px; border-radius:6px;
}
.entry-content pre{
  background:var(--bg-panel); border:1px solid var(--line); border-radius:12px;
  padding:18px 20px; overflow-x:auto; margin:0 0 22px; font-size:14px; line-height:1.6;
}
.entry-content pre code{background:none; border:none; padding:0; color:var(--text);}
.entry-content table{width:100%; border-collapse:collapse; margin:0 0 24px; font-size:14.5px;}
.entry-content th, .entry-content td{text-align:left; padding:12px 14px; border-bottom:1px solid var(--line);}
.entry-content th{color:var(--text); font-weight:600; background:var(--bg-panel);}
.entry-content hr{border:none; height:1px; background:linear-gradient(90deg, transparent, var(--line), transparent); margin:40px 0;}
.entry-content .alignleft{float:left; margin:6px 24px 14px 0;}
.entry-content .alignright{float:right; margin:6px 0 14px 24px;}
.entry-content .aligncenter{display:block; margin-left:auto; margin-right:auto;}
.entry-content iframe, .entry-content video{max-width:100%; border-radius:12px;}
.entry-content::after{content:''; display:block; clear:both;}

.post-tags{margin-top:36px; display:flex; flex-wrap:wrap; gap:8px;}
.post-tags a{
  font-family:'JetBrains Mono', monospace; font-size:12px; color:var(--blue);
  background:rgba(59,130,246,0.1); border:1px solid rgba(59,130,246,0.25); padding:4px 10px; border-radius:6px; transition:all .2s;
}
.post-tags a:hover{color:var(--cyan); border-color:var(--line-bright);}

.post-nav{margin-top:48px; display:grid; grid-template-columns:1fr 1fr; gap:16px;}
@media (max-width:640px){.post-nav{grid-template-columns:1fr;}}
.post-nav a{
  display:block; background:var(--bg-panel); border:1px solid var(--line); border-radius:14px; padding:20px 22px;
  transition:all .2s; height:100%;
}
.post-nav a:hover{border-color:var(--line-bright); transform:translateY(-2px);}
.post-nav .label{font-size:11px; letter-spacing:0.06em; text-transform:uppercase; color:var(--text-dim); display:block; margin-bottom:6px;}
.post-nav .title{font-family:'Space Grotesk', sans-serif; font-size:15px; font-weight:600; color:var(--text); line-height:1.4;}
.post-nav .next{text-align:right;}

/* ---------- Comments ---------- */
.comments-area{margin-top:56px; padding-top:32px; border-top:1px solid var(--line);}
.comments-area h2, .comment-reply-title{font-size:22px; margin-bottom:20px;}
.comment-list{list-style:none; padding:0; margin:0 0 32px;}
.comment-list .children{list-style:none; padding-left:24px;}
.comment-body{background:var(--bg-panel); border:1px solid var(--line); border-radius:14px; padding:20px 22px; margin-bottom:14px;}
.comment-author{font-weight:600; color:var(--text);}
.comment-author img{border-radius:50%; vertical-align:middle; margin-right:10px; border:none;}
.comment-metadata{font-size:12.5px; color:var(--text-dim); margin:4px 0 10px;}
.comment-content p{margin:0 0 10px; color:var(--text-muted); font-size:15px;}
.reply a{font-size:13px; color:var(--cyan);}
.comment-form label{display:block; font-size:12.5px; font-weight:600; color:var(--text-muted); margin-bottom:8px;}
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea{
  width:100%; background:rgba(0,0,0,0.3); border:1px solid var(--line); border-radius:10px;
  padding:13px 16px; color:var(--text); font-family:'Inter', sans-serif; font-size:14.5px; outline:none;
}
.comment-form input:focus, .comment-form textarea:focus{border-color:var(--cyan);}
.comment-form p{margin:0 0 16px;}
.comment-form .submit{
  background:linear-gradient(135deg, var(--blue), var(--cyan)); color:#04141a; font-weight:600;
  padding:13px 26px; border-radius:9px; font-size:14.5px; border:none; cursor:pointer; font-family:'Inter', sans-serif; width:auto;
}

/* ---------- Empty / 404 ---------- */
.empty-state{text-align:center; padding:48px 0;}
.empty-state p{color:var(--text-muted); margin:12px 0 24px;}
.search-form{display:flex; gap:12px; max-width:480px; margin:0 auto; flex-wrap:wrap;}
.search-form input[type="search"]{
  flex:1; min-width:200px; background:rgba(0,0,0,0.3); border:1px solid var(--line); border-radius:10px;
  padding:13px 16px; color:var(--text); font-family:'Inter', sans-serif; font-size:14.5px; outline:none;
}
.search-form input[type="search"]:focus{border-color:var(--cyan);}
.search-form button{
  background:linear-gradient(135deg, var(--blue), var(--cyan)); color:#04141a; font-weight:600;
  padding:13px 24px; border-radius:9px; border:none; cursor:pointer; font-family:'Inter', sans-serif; font-size:14.5px;
}

/* WordPress core helpers */
.screen-reader-text{border:0; clip:rect(1px,1px,1px,1px); clip-path:inset(50%); height:1px; margin:-1px; overflow:hidden; padding:0; position:absolute; width:1px; word-wrap:normal !important;}
.screen-reader-text:focus{background:var(--bg-panel); clip:auto !important; clip-path:none; color:var(--text); display:block; height:auto; left:8px; padding:12px 18px; top:8px; width:auto; z-index:100000;}
.sticky{}
.bypostauthor{}
.gallery-caption{}

/* Font fallback for the brand link (shared stylesheet has none) */
.brand{font-family:'Space Grotesk', 'Inter', system-ui, sans-serif;}
