/*
Theme Name: ASK Steve 2026
Theme URI: https://askstevekorea.com
Author: Steve Seo, PE
Author URI: https://askstevekorea.com
Description: Engineering World - Professional Engineering Knowledge Hub
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: asksteve2026
*/

/* ============================================================
   FONTS — loaded via wp_enqueue_style in functions.php
   ============================================================ */

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
    --navy-dark:   #0B1F4E;
    --navy:        #1A3A8F;
    --navy-light:  #2A52C9;
    --gold:        #C9850A;
    --gold-light:  #F5A623;
    --steel:       #4A6280;
    --bg-light:    #F0F4FA;
    --bg-white:    #FFFFFF;
    --text-dark:   #1E293B;
    --text-mid:    #475569;
    --text-light:  #94A3B8;
    --border:      #CBD5E1;
    --shadow:      rgba(11, 31, 78, 0.12);
    --font-en:     'Barlow', 'Barlow Condensed', sans-serif;
    --font-kr:     'Noto Sans KR', sans-serif;
    --font-code:   'Source Code Pro', monospace;
    --radius:      6px;
    --radius-lg:   12px;
    --transition:  0.25s ease;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 17px; scroll-behavior: smooth; }

body {
    font-family: var(--font-kr);
    font-weight: 400;
    color: var(--text-dark);
    background: var(--bg-white);
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.01em;
}

a { color: var(--navy); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold); }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-en);
    font-weight: 700;
    line-height: 1.2;
    color: var(--navy-dark);
}

p { margin-bottom: 1rem; }

ul, ol { padding-left: 1.5rem; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 80px 0;
}

.section-alt {
    background: var(--bg-light);
}

/* ============================================================
   SITE HEADER
   ============================================================ */
#site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--navy-dark);
    border-bottom: 3px solid var(--gold);
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 24px;
}

.site-logo {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex-shrink: 0;
}

.site-logo .logo-main {
    font-family: var(--font-en);
    font-weight: 800;
    font-size: 1.2rem;
    color: #FFFFFF;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    line-height: 1;
}

.site-logo .logo-sub {
    font-family: var(--font-code);
    font-size: 0.7rem;
    color: var(--gold-light);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-top: 4px;
}

.site-logo a:hover .logo-main { color: var(--gold-light); }

/* Primary Navigation */
#primary-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    margin: 0;
}

#primary-nav ul li a {
    display: block;
    padding: 7px 12px;
    font-family: var(--font-en);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.8);
    border-radius: var(--radius);
    transition: all var(--transition);
    white-space: nowrap;
}

#primary-nav ul li a:hover,
#primary-nav ul li.current-menu-item a {
    color: #fff;
    background: rgba(255,255,255,0.12);
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: var(--radius);
    color: white;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
    background: linear-gradient(135deg, var(--navy-dark) 0%, #0F2B6B 60%, #1A3A8F 100%);
    color: white;
    padding: 90px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
}

.hero-inner {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(201,133,10,0.15);
    border: 1px solid rgba(245,166,35,0.4);
    border-radius: 50px;
    padding: 6px 16px;
    font-family: var(--font-code);
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gold-light);
    margin-bottom: 28px;
}

.hero-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--gold-light);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-title {
    font-family: var(--font-en);
    font-weight: 800;
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    line-height: 1.05;
    color: #FFFFFF;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.hero-title .slash {
    color: var(--gold);
    margin: 0 8px;
}

.hero-subtitle-en {
    font-family: var(--font-en);
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: rgba(255,255,255,0.75);
    font-weight: 400;
    margin-bottom: 10px;
    letter-spacing: 0.3px;
}

.hero-subtitle-kr {
    font-family: var(--font-kr);
    font-size: 1.05rem;
    color: rgba(255,255,255,0.6);
    margin-bottom: 40px;
    line-height: 1.7;
}

.hero-credentials {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 0;
}

.credential-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius);
    padding: 7px 14px;
    font-family: var(--font-en);
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    letter-spacing: 0.5px;
}

.credential-badge .icon { font-size: 1rem; }

/* ============================================================
   6 PILLARS SECTION
   ============================================================ */
.pillars-section {
    padding: 80px 0;
    background: var(--bg-white);
}

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-label {
    display: inline-block;
    font-family: var(--font-code);
    font-size: 0.75rem;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 14px;
    border-bottom: 2px solid var(--gold);
    padding-bottom: 5px;
}

.section-title {
    font-family: var(--font-en);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    color: var(--navy-dark);
    margin-bottom: 12px;
}

.section-desc {
    font-family: var(--font-kr);
    font-size: 1rem;
    color: var(--text-mid);
    max-width: 560px;
    margin: 0 auto;
}

/* Pillar Grid */
.pillars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.pillar-card {
    position: relative;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 28px 32px;
    transition: all var(--transition);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pillar-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--navy);
    transition: background var(--transition);
}

.pillar-card:hover {
    transform: translateY(-4px);
    border-color: var(--navy);
    box-shadow: 0 12px 40px var(--shadow);
}

.pillar-card:hover::before {
    background: var(--gold);
}

.pillar-card.active {
    border-color: var(--navy);
}

.pillar-card.active::before {
    background: var(--gold);
}

.pillar-card.coming-soon {
    background: #FAFBFD;
}

.pillar-number {
    font-family: var(--font-code);
    font-size: 0.72rem;
    letter-spacing: 1.5px;
    color: var(--text-light);
    margin-bottom: 14px;
    font-weight: 600;
}

.pillar-icon {
    font-size: 2.2rem;
    margin-bottom: 14px;
    line-height: 1;
}

.pillar-title-en {
    font-family: var(--font-en);
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--navy-dark);
    line-height: 1.25;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.pillar-title-kr {
    font-family: var(--font-kr);
    font-size: 0.9rem;
    color: var(--text-mid);
    margin-bottom: 14px;
    font-weight: 500;
}

.pillar-desc {
    font-family: var(--font-kr);
    font-size: 0.88rem;
    color: var(--text-mid);
    line-height: 1.7;
    flex-grow: 1;
    margin-bottom: 20px;
}

.pillar-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-en);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 50px;
    margin-bottom: 16px;
}

.pillar-status.active-status {
    background: rgba(21, 128, 61, 0.1);
    color: #15803D;
    border: 1px solid rgba(21, 128, 61, 0.25);
}

.pillar-status.coming-status {
    background: rgba(100,116,139,0.08);
    color: var(--steel);
    border: 1px solid var(--border);
}

.pillar-status .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.pillar-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-en);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--navy);
    padding: 10px 18px;
    border: 2px solid var(--navy);
    border-radius: var(--radius);
    transition: all var(--transition);
    align-self: flex-start;
    margin-top: auto;
}

.pillar-link:hover {
    background: var(--navy-dark);
    border-color: var(--navy-dark);
    color: white;
}

.pillar-card.coming-soon .pillar-link {
    color: var(--text-light);
    border-color: var(--border);
    pointer-events: none;
}

/* ============================================================
   ABOUT STRIP
   ============================================================ */
.about-strip {
    background: var(--navy-dark);
    padding: 60px 0;
    color: white;
}

.about-strip-inner {
    display: flex;
    align-items: center;
    gap: 48px;
}

.about-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--navy);
    border: 3px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    flex-shrink: 0;
}

.about-text h3 {
    font-family: var(--font-en);
    font-size: 1.4rem;
    color: white;
    font-weight: 800;
    margin-bottom: 4px;
}

.about-text .about-title {
    font-family: var(--font-code);
    font-size: 0.72rem;
    color: var(--gold-light);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.about-text p {
    font-family: var(--font-kr);
    font-size: 0.92rem;
    color: rgba(255,255,255,0.7);
    max-width: 600px;
    margin: 0;
    line-height: 1.7;
}

.about-divider {
    width: 1px;
    height: 80px;
    background: rgba(255,255,255,0.15);
    flex-shrink: 0;
}

/* ============================================================
   RECENT POSTS
   ============================================================ */
.recent-posts-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.post-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px var(--shadow);
}

.post-card-body {
    padding: 24px;
}

.post-category-tag {
    display: inline-block;
    font-family: var(--font-en);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--navy);
    background: rgba(26,58,143,0.08);
    border-radius: 4px;
    padding: 4px 10px;
    margin-bottom: 12px;
}

.post-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.45;
}

.post-card h3 a { color: var(--navy-dark); }
.post-card h3 a:hover { color: var(--gold); }

.post-card-meta {
    font-family: var(--font-en);
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.no-posts-msg {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-light);
    font-family: var(--font-kr);
    padding: 40px;
}

/* ============================================================
   SITE FOOTER
   ============================================================ */
#site-footer {
    background: #06122E;
    color: rgba(255,255,255,0.6);
    padding: 48px 0 32px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 40px;
}

.footer-brand .logo-main {
    font-family: var(--font-en);
    font-weight: 800;
    font-size: 1.1rem;
    color: white;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.footer-brand .logo-sub {
    font-family: var(--font-code);
    font-size: 0.62rem;
    color: var(--gold-light);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.footer-brand p {
    font-family: var(--font-kr);
    font-size: 0.82rem;
    color: rgba(255,255,255,0.45);
    line-height: 1.7;
    margin: 0;
}

.footer-col h4 {
    font-family: var(--font-en);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold-light);
    margin-bottom: 16px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    font-family: var(--font-en);
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    transition: color var(--transition);
}

.footer-col ul li a:hover { color: var(--gold-light); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-en);
    font-size: 0.75rem;
    color: rgba(255,255,255,0.3);
}

.footer-bottom .pe-badge {
    color: var(--gold-light);
    font-weight: 600;
}

/* ============================================================
   SINGLE POST
   ============================================================ */
.post-header {
    background: var(--navy-dark);
    padding: 60px 0 48px;
    color: white;
}

.post-header .post-cat {
    font-family: var(--font-en);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold-light);
    margin-bottom: 14px;
}

.post-header h1 {
    font-family: var(--font-en);
    font-size: clamp(1.6rem, 4vw, 2.6rem);
    font-weight: 800;
    color: white;
    line-height: 1.2;
    margin-bottom: 16px;
}

.post-header .post-meta {
    font-family: var(--font-en);
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
}

.post-content-wrap {
    padding: 60px 0 80px;
}

.post-content-inner {
    max-width: 800px;
    margin: 0 auto;
}

.post-content {
    font-family: var(--font-kr);
    font-size: 1rem;
    line-height: 1.85;
    color: var(--text-dark);
}

.post-content h2, .post-content h3, .post-content h4 {
    font-family: var(--font-en);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-content h2 { font-size: 1.6rem; border-left: 4px solid var(--gold); padding-left: 14px; }
.post-content h3 { font-size: 1.3rem; color: var(--navy); }

.post-content blockquote {
    border-left: 4px solid var(--navy);
    background: var(--bg-light);
    padding: 16px 20px;
    margin: 24px 0;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: var(--text-mid);
}

.post-content pre, .post-content code {
    font-family: var(--font-code);
    background: #1E293B;
    color: #E2E8F0;
    border-radius: var(--radius);
}

.post-content pre {
    padding: 20px;
    overflow-x: auto;
    margin: 24px 0;
    font-size: 0.85rem;
}

.post-content code {
    padding: 2px 6px;
    font-size: 0.87em;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 0.9rem;
}

.post-content table th {
    background: var(--navy-dark);
    color: white;
    padding: 10px 14px;
    text-align: left;
    font-family: var(--font-en);
    font-size: 0.78rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.post-content table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
}

.post-content table tr:nth-child(even) { background: var(--bg-light); }

/* ============================================================
   ARCHIVE PAGE
   ============================================================ */
.archive-header {
    background: linear-gradient(135deg, var(--navy-dark), var(--navy));
    padding: 60px 0;
    color: white;
}

.archive-header .arch-label {
    font-family: var(--font-code);
    font-size: 0.68rem;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--gold-light);
    margin-bottom: 10px;
}

.archive-header h1 {
    font-family: var(--font-en);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    color: white;
    text-transform: uppercase;
}

.archive-content {
    padding: 60px 0 80px;
}

.archive-posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.archive-post-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: all var(--transition);
    border-left: 4px solid var(--navy);
}

.archive-post-card:hover {
    border-left-color: var(--gold);
    box-shadow: 0 6px 24px var(--shadow);
    transform: translateX(4px);
}

.archive-post-card h2 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.archive-post-card h2 a { color: var(--navy-dark); }
.archive-post-card h2 a:hover { color: var(--gold); }

.archive-post-card .excerpt {
    font-family: var(--font-kr);
    font-size: 0.88rem;
    color: var(--text-mid);
    line-height: 1.6;
    margin-bottom: 14px;
}

.archive-post-card .card-meta {
    font-family: var(--font-en);
    font-size: 0.72rem;
    color: var(--text-light);
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-en);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--navy);
    margin-top: 10px;
    transition: color var(--transition);
}

.read-more-btn:hover { color: var(--gold); }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
}

.breadcrumb-inner {
    font-family: var(--font-en);
    font-size: 0.75rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.breadcrumb-inner a { color: var(--navy); }
.breadcrumb-inner a:hover { color: var(--gold); }
.breadcrumb-inner .sep { color: var(--border); }

/* ============================================================
   PAGE 404
   ============================================================ */
.error404-wrap {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 24px;
}

.error404-wrap .code {
    font-family: var(--font-code);
    font-size: 6rem;
    font-weight: 600;
    color: var(--border);
    line-height: 1;
    margin-bottom: 16px;
}

.error404-wrap h1 { font-size: 1.8rem; margin-bottom: 12px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-family: var(--font-en);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gold);
    color: var(--navy-dark);
}

.btn-primary:hover {
    background: var(--gold-light);
    color: var(--navy-dark);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
}

.btn-outline:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .pillars-grid { grid-template-columns: repeat(2, 1fr); }
    .posts-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
    #primary-nav { display: none; }
    #primary-nav.open { display: block; position: absolute; top: 68px; left: 0; right: 0; background: var(--navy-dark); padding: 16px; border-top: 1px solid rgba(255,255,255,0.1); }
    #primary-nav.open ul { flex-direction: column; gap: 4px; }
    .menu-toggle { display: block; }
    .pillars-grid { grid-template-columns: 1fr; }
    .posts-grid { grid-template-columns: 1fr; }
    .archive-posts-grid { grid-template-columns: 1fr; }
    .about-strip-inner { flex-direction: column; gap: 24px; }
    .about-divider { width: 80px; height: 1px; }
    .footer-inner { grid-template-columns: 1fr; gap: 32px; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
    .hero { padding: 60px 0 50px; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .hero-credentials { flex-direction: column; align-items: flex-start; }
}
