/* 1. FONTS */
@font-face { font-family: 'Merriweather'; font-style: italic; font-weight: 300; src: url(https://fonts.gstatic.com/s/merriweather/v33/u-4c0qyriQwlOrhSvowK_l5-eTxCVx0ZbwLvKH2Gk9hLmp0v5yA-xXPqCzLvF-udrHOg7iA.woff2) format('woff2'); }
@font-face { font-family: 'Merriweather'; font-style: italic; font-weight: 700; src: url(https://fonts.gstatic.com/s/merriweather/v33/u-4c0qyriQwlOrhSvowK_l5-eTxCVx0ZbwLvKH2Gk9hLmp0v5yA-xXPqCzLvF-udrHOg7iA.woff2) format('woff2'); }
@font-face { font-family: 'Merriweather'; font-style: normal; font-weight: 300; src: url(https://fonts.gstatic.com/s/merriweather/v33/u-4e0qyriQwlOrhSvowK_l5UcA6zuSYEqOzpPe3HOZJ5eX1WtLaQwmYiSeqqJ-mXq1Gi.woff2) format('woff2'); }
@font-face { font-family: 'Merriweather'; font-style: normal; font-weight: 700; src: url(https://fonts.gstatic.com/s/merriweather/v33/u-4e0qyriQwlOrhSvowK_l5UcA6zuSYEqOzpPe3HOZJ5eX1WtLaQwmYiSeqqJ-mXq1Gi.woff2) format('woff2'); }
@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: url(https://fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTS-mu0SC55I.woff2) format('woff2'); }
@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 700; src: url(https://fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTS-mu0SC55I.woff2) format('woff2'); }

/* 2. ICONS MAPPING */
[class^="icon-"]::before, [class*=" icon-"]::before {
    font-family: "Open Sans", sans-serif;
    font-style: normal; font-weight: normal; font-variant: normal;
    text-transform: none; line-height: 1;
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
.icon-arrow-left::before { content: "\2193"; }

/* 3. RESET & BASICS */
html { 
    height: auto; 
    min-height: 100%; 
    font-size: 62.5%; 
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0); 
}
body {
    height: auto; 
    min-height: 100%;
    font-family: "Merriweather", serif;
    letter-spacing: 0.01rem;
    font-size: 1.8rem;
    line-height: 1.75em;
    color: #3A4145;
    margin: 0;
    -webkit-font-feature-settings: 'kern' 1; font-feature-settings: 'kern' 1;
}

h1, h2, h3, h4, h5, h6 {
    font-feature-settings: 'dlig' 1, 'liga' 1, 'lnum' 1, 'kern' 1;
    color: #2E2E2E; line-height: 1.15em; margin: 0 0 0.4em 0; font-family: "Open Sans", sans-serif;
}
h1 { font-size: 5rem; letter-spacing: -2px; text-indent: -3px; }
h2 { font-size: 3.6rem; letter-spacing: -1px; }
a { color: #4A4A4A; transition: color ease 0.3s; text-decoration: none; }
a:hover { color: #111; }
p, ul, ol, dl { margin: 0 0 1.75em 0; }
img { border: 0; max-width: 100%; height: auto; }
.clearfix::before, .clearfix::after { content: " "; display: table; }
.clearfix::after { clear: both; }
.hidden { text-indent: -9999px; visibility: hidden; display: none; }
.inner { position: relative; width: 80%; max-width: 710px; margin: 0 auto; }

/* 4. HEADER */
.main-header {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 5rem;
    text-align: center;
    background: #222 no-repeat center center;
    background-size: cover;
    overflow: hidden;
}

.main-nav { position: absolute; top: 0; right: 0; padding: 35px 40px; margin: 0; width: 100%; box-sizing: border-box; }

/* Replaces inline style on BMC wrapper */
.nav-bmc {
    float: right; 
    transform: scale(0.85); 
    transform-origin: right top;
}

.scroll-down {
    display: block; position: absolute; z-index: 100; bottom: 45px; left: 50%;
    margin-left: -16px; width: 34px; height: 34px; font-size: 34px; text-align: center;
    text-decoration: none; color: rgba(255,255,255,0.7);
    -webkit-animation: bounce 4s 2s infinite; animation: bounce 4s 2s infinite;
}

.no-cover.main-header { min-height: 160px; padding: 4rem 0; background: #f5f8fa; }
.no-cover .page-title { color: rgba(0,0,0,0.8); }
.no-cover .page-description { color: rgba(0,0,0,0.5); }
.no-cover .scroll-down { display: none; }

.page-title { margin: 10px 0 10px 0; font-size: 5rem; letter-spacing: -1px; font-weight: 700; font-family: "Open Sans", sans-serif; color: #fff; }
.page-description { margin: 0; font-size: 2rem; line-height: 1.5em; font-weight: 400; font-family: "Merriweather", serif; letter-spacing: 0.01rem; color: rgba(255,255,255,0.8); }

/* 5. MAIN CONTENT & INTRO */
.content {
    max-width: 1000px; /* moved from inline style */
    margin: 0 auto;
}

/* Replaces inline style on <article> */
.intro-post {
    border-bottom: none; 
    padding-bottom: 0; 
    max-width: 710px; 
    margin: 0 auto 4rem;
}

/* Replaces inline style on <p> */
.intro-lead {
    font-size: 1.1em; 
    border-left: 4px solid #3A4145; 
    padding-left: 20px;
}

.section-title {
    text-align: center; 
    margin-bottom: 30px;
}

.section-divider {
    margin: 50px 0;
    border: 0;
    border-top: 1px solid #EBF2F6;
}

.post {
    position: relative; width: 80%; max-width: 710px; margin: 4rem auto; padding-bottom: 4rem;
    border-bottom: #EBF2F6 1px solid; word-break: break-word;
}

/* 6. PROJECT GRID */
.project-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 0 auto 4rem;
    padding: 0 20px;
    max-width: 1100px;
}

.project-card {
    flex: 1 1 300px;
    max-width: 400px; /* Relaxed from 350px for better centering */
    border: 1px solid #EBF2F6;
    padding: 20px;
    border-radius: 4px;
    background: #fff;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    border-color: #9EABB3;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.project-title { margin: 0 0 10px 0; font-size: 1.8rem; font-weight: 700; }
.project-desc { font-size: 1.4rem; color: #50585D; margin-bottom: 15px; flex-grow: 1; }
.tech-stack { font-size: 1.1rem; color: #9EABB3; text-transform: uppercase; letter-spacing: 0.5px; margin-top: auto; }

/* 7. CAROUSEL / LOGIC LOG */
.feed__head {
    text-align: center;
}
.feed__title {
    /* inherits h3 styles */
}
.feed__subtitle {
    font-size: 0.9em; 
    color: #999;
}

.feed__wrap {
    position: relative;
    display: flex;
    align-items: center;
    margin-top: 20px;
}

.feed__viewport {
    width: 100%;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 20px 0;
}
.feed__viewport::-webkit-scrollbar { display: none; }

.feed__shelf {
    display: flex;
    gap: 20px;
    padding: 0 10px;
    margin: 0;
    list-style: none;
}

.feed__item {
    scroll-snap-align: center;
    flex: 0 0 350px;
    min-width: 300px;
    border: 1px solid #EBF2F6;
    border-radius: 8px;
    background: #fff;
    padding: 15px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease;
}
.feed__item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    border-color: #9EABB3;
}

.feed__item-title {
    font-size: 1.4rem;
}

/* LINKEDIN EMBED FIX */
.linkedin-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 130%; /* Aspect Ratio for standard posts */
    overflow: hidden;
    background: #f3f2ef;
    border-radius: 4px;
    margin-bottom: 10px;
}

.linkedin-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.feed__nav {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 40px; height: 40px;
    cursor: pointer;
    z-index: 2;
    flex-shrink: 0;
    color: #555;
    transition: all 0.2s;
}
.feed__nav:hover { background: #3A4145; color: #fff; }
.feed__prev { margin-right: 10px; }
.feed__next { margin-left: 10px; }

@media (max-width: 768px) {
    .feed__nav { display: none; }
}

/* 8. META & FOOTER */
.post-meta {
    display: flex; align-items: center; gap: 10px; margin: 1rem 0 0; /* Tightened margin */
    font-family: "Open Sans", sans-serif; font-size: 1.5rem; line-height: 2.2rem; color: #9EABB3;
    margin-top: auto; /* Push to bottom of flex card */
}
.author-thumb {
    width: 24px; height: 24px; border-radius: 100%; object-fit: cover;
    background-color: #e0e0e0; color: transparent; font-size: 0;
}
.post-date { margin-left: auto; padding-left: 12px; border-left: #d5dbde 1px solid; text-transform: uppercase; font-size: 1.3rem; white-space: nowrap; }

.site-footer {
    position: relative; margin: 8rem 0 0 0; padding: 0.5rem 15px;
    border-top: #EBF2F6 1px solid; font-family: "Open Sans", sans-serif;
    font-size: 1rem; line-height: 1.75em; color: #BBC7CC;
}
.site-footer a { color: #BBC7CC; font-weight: bold; }
.site-footer a:hover { color: #50585D; }
.poweredby { display: block; width: 45%; float: right; text-align: right; }
.copyright { display: block; width: 45%; float: left; }

/* 9. ANIMATIONS */
@-webkit-keyframes bounce {
    0%, 20%, 50%, 80%, 100% { -webkit-transform: translateY(0); transform: translateY(0); }
    40% { -webkit-transform: translateY(-10px); transform: translateY(-10px); }
    60% { -webkit-transform: translateY(-5px); transform: translateY(-5px); }
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { -webkit-transform: translateY(0); transform: translateY(0); }
    40% { -webkit-transform: translateY(-10px); transform: translateY(-10px); }
    60% { -webkit-transform: translateY(-5px); transform: translateY(-5px); }
}

/* 10. MEDIA QUERIES */
@media only screen and (max-width: 900px) {
    .main-nav { padding: 15px; }
    .main-header { min-height: 240px; padding: 5% 0; }
    .page-title { font-size: 4rem; letter-spacing: -1px; }
    .page-description { font-size: 1.8rem; line-height: 1.5em; }
}
@media only screen and (max-width: 500px) {
    .main-header { margin-bottom: 15px; height: auto; }
    .no-cover.main-header { height: auto; }
    .inner { width: auto; margin: 2rem auto; }
    .post { width: auto; margin-left: 16px; margin-right: 16px; font-size: 0.95em; }
    .page-title { font-size: 3rem; }
    /* Grid is flex now, so this forces single column naturally */
    .project-card { min-width: 100%; max-width: 100%; } 
}