/* =========================================================================
   AlokPotro 2.0 — "Field Journal of the Cosmos" visual skin
   -------------------------------------------------------------------------
   Design tokens
   Color   : Ink Navy #10151F · Warm Paper #F6F4EC · Deep Teal #0F8F82
             Signal Amber #E8A33D · Hairline #DAD5C8
   Type    : Fraunces (display) / IBM Plex Sans (body) / IBM Plex Mono (meta)
   Signature: rotating "orbit ring" gradient outline on card hover
   ========================================================================= */

:root {
    --ap-ink:        #10151F;
    --ap-ink-soft:    #4B5361;
    --ap-paper:       #F6F4EC;
    --ap-paper-2:     #EDEAE0;
    --ap-card:        #FFFFFF;
    --ap-teal:        #0F8F82;
    --ap-teal-deep:   #0B6E63;
    --ap-amber:       #E8A33D;
    --ap-line:        #DAD5C8;
    --ap-radius:      16px;
    --ap-font-display: 'Fraunces', Georgia, serif;
    --ap-font-body:    'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --ap-font-mono:    'IBM Plex Mono', 'SFMono-Regular', Menlo, monospace;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

::selection { background: var(--ap-amber); color: var(--ap-ink); }

/* -------------------------------------------------------------------------
   Base / Typography
   ------------------------------------------------------------------------- */
body {
    background: var(--ap-paper);
    color: var(--ap-ink);
    font-family: var(--ap-font-body);
}

h1, h2, h3, h4,
.post-title, .page-title h1, .page-title h2,
.entry-title, .widget-title, #footer .widget-title {
    font-family: var(--ap-font-display);
    font-weight: 620;
    letter-spacing: -0.01em;
    color: var(--ap-ink);
}

a { color: var(--ap-teal); }
a:hover { color: var(--ap-teal-deep); }

:focus-visible {
    outline: 2px solid var(--ap-amber);
    outline-offset: 2px;
}

/* Meta / labels everywhere use the mono utility face like a specimen tag */
.post-category,
.post-meta,
.meta-single,
.entry-meta,
.widget-title,
.alokpotro-cluster-title,
.alokpotro-hub-subcategory-title {
    font-family: var(--ap-font-mono);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.post-category {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--ap-teal-deep);
}
.post-category a { color: inherit; }
.post-category::before {
    content: "";
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--ap-amber);
    margin-right: 7px;
    vertical-align: middle;
}

/* -------------------------------------------------------------------------
   Header
   ------------------------------------------------------------------------- */
#header {
    background: var(--ap-ink);
    border-bottom: 1px solid var(--ap-ink);
}

#header .site-title a,
#header .site-title,
#header a.logo {
    font-family: var(--ap-font-display);
    color: var(--ap-paper) !important;
    letter-spacing: -0.01em;
}

#header .site-description {
    font-family: var(--ap-font-mono);
    color: #9AA3AF;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.7rem;
}

#header .nav-container,
#header nav#nav-main,
#header .nav-wrap {
    background: transparent;
}

#header .nav li a,
#header .nav-container a {
    font-family: var(--ap-font-mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #D9D6CC;
    transition: color .25s ease;
}

#header .nav li a:hover,
#header .nav li.current-menu-item > a {
    color: var(--ap-amber);
}

#header-nav-topbar,
#header .top-menu-container {
    background: #0A0D14;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* -------------------------------------------------------------------------
   Card system — applies to every post grid tile sitewide (content.php)
   plus the homepage theme-cluster grid and Cluster Hub subcategory grids
   ------------------------------------------------------------------------- */
.grid-item .post-inner,
.alokpotro-hub-grid > article .post-inner {
    position: relative;
    isolation: isolate;
    background: var(--ap-card);
    border: 1px solid var(--ap-line);
    border-radius: var(--ap-radius);
    overflow: hidden;
    padding: 0 0 20px;
    box-shadow: 0 1px 2px rgba(16,21,31,0.04);
    transition: transform .35s cubic-bezier(.2,.7,.3,1), box-shadow .35s ease;
}

.grid-item .post-inner:hover,
.alokpotro-hub-grid > article .post-inner:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 34px -18px rgba(16,21,31,0.35);
}

/* Signature: rotating orbit-ring outline on hover */
.grid-item .post-inner::before,
.alokpotro-hub-grid > article .post-inner::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1.5px;
    background: conic-gradient(from 0deg, transparent 0 62%, var(--ap-amber) 78%, var(--ap-teal) 90%, transparent 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    z-index: 3;
    pointer-events: none;
    transition: opacity .4s ease;
    animation: ap-orbit-spin 3.4s linear infinite;
    animation-play-state: paused;
}

.grid-item .post-inner:hover::before,
.alokpotro-hub-grid > article .post-inner:hover::before {
    opacity: 1;
    animation-play-state: running;
}

@keyframes ap-orbit-spin {
    to { transform: rotate(360deg); }
}

.grid-item .post-thumbnail,
.alokpotro-hub-grid .post-thumbnail {
    margin: 0 0 16px;
    border-radius: 0;
    overflow: hidden;
}

/* Sharing/Like widgets (Jetpack or similar) belong on single posts, not
   inside grid teaser cards — some sharing plugins are configured to also
   show on archive/front-page excerpts, which breaks the card layout. */
.grid-item .sharedaddy,
.grid-item .sd-sharing,
.grid-item .sd-like,
.grid-item .jetpack-likes-widget,
.grid-item .likes-widget-container,
.alokpotro-hub-grid .sharedaddy,
.alokpotro-hub-grid .sd-sharing,
.alokpotro-hub-grid .sd-like,
.alokpotro-hub-grid .jetpack-likes-widget,
.alokpotro-hub-grid .likes-widget-container {
    display: none !important;
}

.grid-item .post-thumbnail img,
.alokpotro-hub-grid .post-thumbnail img {
    transition: transform .6s ease;
}

.grid-item .post-inner:hover .post-thumbnail img,
.alokpotro-hub-grid .post-inner:hover .post-thumbnail img {
    transform: scale(1.06);
}

.grid-item .post-meta,
.alokpotro-hub-grid .post-meta {
    padding: 0 20px;
    margin-bottom: 10px;
}

.grid-item .post-title,
.alokpotro-hub-grid .post-title {
    padding: 0 20px;
    font-size: 1.18rem;
    line-height: 1.32;
    margin-bottom: 10px;
}

.grid-item .entry.excerpt,
.alokpotro-hub-grid .entry.excerpt {
    padding: 0 20px;
    color: var(--ap-ink-soft);
    font-size: 0.92rem;
    line-height: 1.55;
}

.grid-item .entry.excerpt p,
.alokpotro-hub-grid .entry.excerpt p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

/* -------------------------------------------------------------------------
   Homepage Theme Cluster sections — bento layout, first card featured
   ------------------------------------------------------------------------- */
#alokpotro-theme-clusters {
    max-width: 1180px;
    margin: 0 auto;
    padding: 36px 20px 10px;
}

.alokpotro-cluster {
    margin-bottom: 52px;
    padding-top: 28px;
    border-top: 1px solid var(--ap-line);
}
.alokpotro-cluster:first-child { border-top: none; padding-top: 0; }

.alokpotro-cluster-title {
    font-family: var(--ap-font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ap-ink);
    margin: 0 0 22px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.alokpotro-cluster-title::before {
    content: "";
    width: 22px; height: 1px;
    background: var(--ap-amber);
    display: inline-block;
}
.alokpotro-cluster-title a { color: inherit; text-decoration: none; }
.alokpotro-cluster-title a:hover { color: var(--ap-teal-deep); }

.alokpotro-cluster-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Feature card — first post, shown large above the list */
.alokpotro-feature-card {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--ap-line);
}
.alokpotro-feature-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 8;
    border-radius: 14px;
    overflow: hidden;
    background: var(--ap-paper-2);
    margin-bottom: 16px;
}
.alokpotro-feature-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}
.alokpotro-feature-card:hover .alokpotro-feature-thumb img {
    transform: scale(1.04);
}
.alokpotro-feature-body .post-category {
    font-family: var(--ap-font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ap-teal-deep);
}
.alokpotro-feature-body .post-category a { color: inherit; }
.alokpotro-feature-title {
    font-family: var(--ap-font-display);
    font-weight: 640;
    font-size: clamp(1.35rem, 2.4vw, 1.8rem);
    line-height: 1.24;
    margin: 8px 0 10px;
}
.alokpotro-feature-title a { color: var(--ap-ink); }
.alokpotro-feature-title a:hover { color: var(--ap-teal-deep); }
.alokpotro-feature-excerpt {
    font-family: var(--ap-font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ap-ink-soft);
    max-width: 65ch;
}

/* List rows — remaining 4 posts */
.alokpotro-list-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--ap-line);
}
.alokpotro-list-card:last-child { border-bottom: none; padding-bottom: 0; }

.alokpotro-list-thumb {
    flex: 0 0 108px;
    width: 108px;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    overflow: hidden;
    background: var(--ap-paper-2);
    display: block;
}
.alokpotro-list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}
.alokpotro-list-card:hover .alokpotro-list-thumb img {
    transform: scale(1.08);
}
.alokpotro-list-thumb-fallback {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--ap-paper-2), var(--ap-line));
}

.alokpotro-list-body { min-width: 0; }

.alokpotro-list-body .post-category {
    font-family: var(--ap-font-mono);
    font-size: 0.66rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ap-teal-deep);
}
.alokpotro-list-body .post-category a { color: inherit; }

.alokpotro-list-title {
    font-family: var(--ap-font-display);
    font-weight: 620;
    font-size: 1.02rem;
    line-height: 1.32;
    margin: 4px 0 6px;
}
.alokpotro-list-title a { color: var(--ap-ink); }
.alokpotro-list-title a:hover { color: var(--ap-teal-deep); }

.alokpotro-list-excerpt {
    font-family: var(--ap-font-body);
    font-size: 0.86rem;
    line-height: 1.5;
    color: var(--ap-ink-soft);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 420px) {
    .alokpotro-list-thumb { flex-basis: 84px; width: 84px; }
    .alokpotro-list-excerpt { display: none; }
}

/* -------------------------------------------------------------------------
   Cluster Hub pillar page
   ------------------------------------------------------------------------- */
.alokpotro-hub-subcategory {
    margin: 40px 0;
    padding-top: 26px;
    border-top: 1px solid var(--ap-line);
}
.alokpotro-hub-subcategory-title {
    font-size: 0.82rem;
    margin-bottom: 18px;
}
.alokpotro-hub-subcategory-title a { color: var(--ap-ink); text-decoration: none; }
.alokpotro-hub-subcategory-title a:hover { color: var(--ap-teal-deep); }

.alokpotro-hub-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.alokpotro-hub-grid .post-thumbnail { aspect-ratio: 4 / 3; }
.alokpotro-hub-grid .post-thumbnail img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 640px) {
    .alokpotro-hub-grid { grid-template-columns: 1fr; }
}

.alokpotro-hub-more {
    margin-top: 6px;
    font-family: var(--ap-font-mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.alokpotro-hub-more a { color: var(--ap-teal); text-decoration: none; }
.alokpotro-hub-more a:hover { color: var(--ap-teal-deep); }

/* -------------------------------------------------------------------------
   Single post
   ------------------------------------------------------------------------- */
.single .post-inner .post-title,
.single-post .entry-title {
    font-size: clamp(1.7rem, 4vw, 2.6rem);
    line-height: 1.18;
}

.single .entry blockquote,
.single-post blockquote {
    font-family: var(--ap-font-display);
    font-size: 1.25rem;
    font-style: italic;
    color: var(--ap-ink);
    border-left: none;
    position: relative;
    padding: 4px 0 4px 34px;
    margin: 28px 0;
}
.single .entry blockquote::before,
.single-post blockquote::before {
    content: "\201C";
    position: absolute;
    left: 0; top: -6px;
    font-size: 2.4rem;
    color: var(--ap-amber);
    font-family: Georgia, serif;
}

/* -------------------------------------------------------------------------
   Sidebar widgets
   ------------------------------------------------------------------------- */
.widget {
    background: var(--ap-card);
    border: 1px solid var(--ap-line);
    border-radius: 12px;
    padding: 22px;
}
.widget-title {
    font-size: 0.76rem;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--ap-line);
}

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */
#footer {
    background: var(--ap-ink);
    color: #B8BFC9;
}
#footer .widget-title { color: var(--ap-paper); border-color: rgba(255,255,255,0.12); }
#footer .widget { background: transparent; border: none; padding: 0; }
#footer a { color: #D9D6CC; }
#footer a:hover { color: var(--ap-amber); }
#footer-bottom { background: #0A0D14; }
#copyright p { font-family: var(--ap-font-mono); font-size: 0.72rem; letter-spacing: 0.03em; }

#back-to-top {
    background: var(--ap-teal);
    transition: background .25s ease;
}
#back-to-top:hover { background: var(--ap-amber); }
