/* ============================================
   THE AVERAGE GUY — main.css
   ============================================ */

/* Variables */
:root {
    --bg:          #0f1117;
    --bg-2:        #16181d;
    --bg-3:        #1e2028;
    --accent:      #0fce8b;
    --accent-dark: #0ba872;
    --text:        #f0f0f0;
    --text-muted:  #8b8fa8;
    --border:      #2a2d3a;
    --font:        'Raleway', sans-serif;
    --radius:      12px;
    --radius-sm:   8px;
    --transition:  0.25s ease;
    --max-w:       1180px;
    --max-w-narrow: 720px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ============================================
   LAYOUT
   ============================================ */

.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
}
.container--narrow {
    max-width: var(--max-w-narrow);
}

.section {
    padding: 80px 0;
}
.section--alt {
    background: var(--bg-2);
}

.section__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 40px;
}
.section__header h2 {
    font-size: 1.8rem;
    font-weight: 700;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4 {
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-block;
    background: var(--accent);
    color: #0a0e14;
    font-family: var(--font);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--accent);
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
    white-space: nowrap;
}
.btn:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
}
.btn--ghost {
    background: transparent;
    color: var(--accent);
}
.btn--ghost:hover {
    background: var(--accent);
    color: #0a0e14;
}
.btn--sm {
    padding: 8px 18px;
    font-size: 0.85rem;
}

/* ============================================
   NAVBAR
   ============================================ */

.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 17, 23, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.navbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.logo {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.03em;
}
.logo span { color: var(--accent); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}
.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color var(--transition);
}
.nav-link:hover { color: var(--text); }

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

/* ============================================
   HERO
   ============================================ */

.hero {
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(15, 206, 139, 0.06) 0%, transparent 70%);
    pointer-events: none;
}
.hero__inner {
    display: flex;
    flex-direction: column;
    gap: 40px;
}
.hero__label {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 16px;
}
.hero__title {
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}
.hero__sub {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 560px;
    line-height: 1.7;
    margin-bottom: 32px;
}
.hero__actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.hero__tags {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.tag {
    background: var(--bg-3);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 100px;
}

/* ============================================
   CARDS
   ============================================ */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.cards-grid--blog {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: border-color var(--transition), transform var(--transition);
    cursor: pointer;
}
.card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
}

.card__meta {
    display: flex;
    align-items: center;
    gap: 12px;
}
.card__category {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    background: rgba(15, 206, 139, 0.1);
    padding: 3px 10px;
    border-radius: 100px;
}
.card__date {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.card__title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    flex-grow: 1;
}
.card__excerpt {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card__cta {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    margin-top: auto;
    padding-top: 8px;
}

/* ============================================
   ABOUT STRIP
   ============================================ */

.about-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}
.about-strip__text h2 {
    font-size: 1.8rem;
    margin-bottom: 16px;
}
.about-strip__text p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 28px;
}
.about-strip__domains {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.domain-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.domain-item__icon {
    font-size: 1.2rem;
}

/* ============================================
   PAGE HEADER
   ============================================ */

.page-header {
    padding: 80px 0 48px;
    border-bottom: 1px solid var(--border);
}
.page-header__title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}
.page-header__sub {
    font-size: 1rem;
    color: var(--text-muted);
}

/* ============================================
   ARTICLE
   ============================================ */

.article {
    padding: 60px 0 100px;
}
.article__back {
    margin-bottom: 40px;
}
.article__header {
    margin-bottom: 48px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border);
}
.article__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.article__title {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 16px;
}
.article__excerpt {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* Article body typography */
.article__body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #d8dce8;
}
.article__body h2 {
    font-size: 1.5rem;
    margin: 48px 0 16px;
    color: var(--text);
}
.article__body h3 {
    font-size: 1.2rem;
    margin: 36px 0 12px;
    color: var(--text);
}
.article__body p {
    margin-bottom: 20px;
}
.article__body a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: rgba(15, 206, 139, 0.3);
    transition: text-decoration-color var(--transition);
}
.article__body a:hover {
    text-decoration-color: var(--accent);
}
.article__body ul, .article__body ol {
    padding-left: 24px;
    margin-bottom: 20px;
}
.article__body ul { list-style: disc; }
.article__body ol { list-style: decimal; }
.article__body li { margin-bottom: 6px; }
.article__body blockquote {
    border-left: 3px solid var(--accent);
    padding: 4px 0 4px 20px;
    margin: 28px 0;
    color: var(--text-muted);
    font-style: italic;
}
.article__body code {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 0.88em;
    font-family: 'Courier New', monospace;
    color: var(--accent);
}
.article__body pre {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px 24px;
    overflow-x: auto;
    margin: 24px 0;
}
.article__body pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.9rem;
    color: var(--text);
}
.article__body strong { color: var(--text); font-weight: 600; }
.article__body hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 40px 0;
}

.article__footer {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

/* ============================================
   ABOUT PAGE
   ============================================ */

.about-page .about-page__intro {
    font-size: 1.2rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 48px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border);
}
.about-page h2 {
    font-size: 1.3rem;
    margin: 36px 0 12px;
    color: var(--accent);
    font-weight: 600;
}
.about-page p {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 16px;
}
.about-page .btn {
    margin-top: 24px;
}

/* ============================================
   NEWSLETTER
   ============================================ */

.newsletter-cta {
    text-align: center;
    max-width: 520px;
    margin: 0 auto;
}
.newsletter-cta h2 {
    font-size: 1.8rem;
    margin-bottom: 12px;
}
.newsletter-cta p {
    color: var(--text-muted);
    margin-bottom: 28px;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.newsletter-form--centered {
    justify-content: center;
}
.newsletter-form input[type="email"] {
    flex: 1;
    min-width: 220px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 18px;
    color: var(--text);
    font-family: var(--font);
    font-size: 0.9rem;
    outline: none;
    transition: border-color var(--transition);
}
.newsletter-form input[type="email"]:focus {
    border-color: var(--accent);
}
.newsletter-form input[type="email"]::placeholder {
    color: var(--text-muted);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--bg-2);
    border-top: 1px solid var(--border);
    padding: 64px 0 32px;
}
.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 2fr;
    gap: 48px;
    margin-bottom: 48px;
}
.footer__tagline {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 10px;
}
.footer__nav h4,
.footer__newsletter h4 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.footer__nav ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.footer__nav a {
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: color var(--transition);
}
.footer__nav a:hover { color: var(--text); }
.footer__newsletter p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
}
.footer__bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ============================================
   MISC
   ============================================ */

.link-accent {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 500;
    transition: opacity var(--transition);
}
.link-accent:hover { opacity: 0.75; }

.empty-state {
    text-align: center;
    padding: 80px 0;
    color: var(--text-muted);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
    .cards-grid { grid-template-columns: 1fr 1fr; }
    .about-strip { grid-template-columns: 1fr; gap: 40px; }
    .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    .section { padding: 60px 0; }
    .hero { padding: 72px 0 60px; }
    .cards-grid { grid-template-columns: 1fr; }
    .footer__grid { grid-template-columns: 1fr; gap: 32px; }
    .section__header { flex-direction: column; gap: 8px; }

    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--bg-2);
        border-bottom: 1px solid var(--border);
        padding: 24px;
        gap: 20px;
        align-items: flex-start;
    }
    .nav-links.open { display: flex; }
    .menu-toggle { display: flex; }
}
