/* RESET & BASE STYLES */
:root {
    --bg-color: #0a0a0a;
    --text-color: #e0e0e0;
    --text-sub: #888;
    --accent: #fff;
    --border: #222;
    --button-border: #333;
    --card-hover: rgba(255, 255, 255, 0.05);
    --nav-text: #666;
    --nav-active: #fff;
}

body.light-mode {
    --bg-color: #ffffff;
    --text-color: #111111;
    --text-sub: #555;
    --accent: #000;
    --border: #e5e5e5;
    --button-border: #ddd;
    --card-hover: rgba(0, 0, 0, 0.03);
    --nav-text: #888;
    --nav-active: #000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    display: flex;
    justify-content: center;
    padding: 40px 20px;
}

.container {
    max-width: 700px;
    width: 100%;
    margin-top: 10vh;
}

/* --- NAVIGATION --- */
.nav-container {
    display: flex;
    align-items: center;
    gap: 20px;
    /* Reduced slightly from 25px for better mobile fit */
    margin-bottom: 60px;
    font-size: 0.95rem;
    font-weight: 400;
    flex-wrap: wrap;
    /* <--- ADD THIS: Allows items to stack if needed */
}

/* Optional: Center nav items on very small screens */
@media (max-width: 450px) {
    .nav-container {
        justify-content: center;
    }

    .theme-toggle-btn {
        margin-left: 0;
        /* Resets the "push to right" on mobile */
    }
}

.theme-toggle-btn {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--nav-text);
    font-size: 1.1rem;
    padding: 5px;
    transition: color 0.2s;
}

.theme-toggle-btn:hover {
    color: var(--accent);
}

.nav-logo-link {
    display: flex;
    margin-right: 10px;
    text-decoration: none;
}

.nav-logo-img {
    width: 36px;
    height: 36px;
    opacity: 0.9;
    transition: opacity 0.2s;
}

body.light-mode .nav-logo-img {
    filter: invert(1);
}

.nav-logo-img:hover {
    opacity: 1;
}

.nav-link {
    color: var(--nav-text);
    text-decoration: none;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--nav-active);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
}

.nav-link.disabled {
    cursor: not-allowed;
    opacity: 0.3;
}

/* --- LAYOUT & TYPOGRAPHY --- */
header {
    margin-bottom: 60px;
}

h1 {
    font-size: 3rem;
    font-weight: 600;
    letter-spacing: -1px;
    margin-bottom: 10px;
    color: var(--accent);
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-sub);
    margin-bottom: 0;
    font-weight: 300;
}

.bio {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 80px;
    color: var(--text-color);
    line-height: 1.5;
}

strong {
    color: var(--accent);
    font-weight: 500;
}

/* --- GRID SECTION --- */
.grid-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 80px;
    border-top: 1px solid var(--border);
    padding-top: 40px;
}

.card {
    padding: 10px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.card:hover {
    background-color: var(--card-hover);
}

.card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--accent);
}

.card p {
    font-size: 1rem;
    color: var(--text-sub);
}

/* Updated card-tag to remove spacing conflicts */
.card-tag {
    font-size: 0.8rem;
    color: var(--text-sub);
    font-weight: 500;
    display: inline-block;
    /* Changed from block to inline-block */
    margin-top: 0;
    /* REMOVED the 15px margin here */
}

/* --- FOOTER & BUTTONS --- */
footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Centers the button */
    gap: 2rem;
    margin-bottom: 60px;
}

.button {
    display: inline-block;
    padding: 12px 24px;
    border: 1px solid var(--button-border);
    color: var(--accent);
    background: transparent;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

body.light-mode .button {
    border-color: #ddd;
}

.button:hover {
    background-color: var(--accent);
    color: var(--bg-color);
}

/* SOCIAL ICONS CENTERING */
.social-links-row {
    display: flex;
    justify-content: center;
    /* Perfectly centers the icons row */
    gap: 30px;
    /* Space between icons */
}

.social-links-row a {
    color: var(--nav-text);
    font-size: 1.5rem;
    transition: color 0.2s, transform 0.2s;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.social-links-row a:hover {
    color: var(--accent);
    transform: translateY(-3px);
}

/* RESPONSIVE */
@media (min-width: 600px) {
    .grid-section {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ... (Keep all your existing CSS) ... */

/* Add this to the bottom of style.css */
.social-links-row {
    display: flex;
    justify-content: center;
    gap: 30px;
    width: 100%;
}

.social-links-row a {
    color: var(--nav-text);
    font-size: 1.5rem;
    transition: color 0.2s, transform 0.2s;
    text-decoration: none;
    display: flex;
    /* Helps vertically align icons */
}

.social-links-row a:hover {
    color: var(--accent);
    transform: translateY(-3px);
}


/* --- THOUGHTS FEED STYLES --- */

.minimal-select {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--border);
    padding: 8px 12px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    border-radius: 4px;
    cursor: pointer;
    outline: none;
}

.minimal-select option {
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* The Thought Card */
.thought-card {
    display: block;
    text-decoration: none;
    padding: 25px 0;
    border-bottom: 1px solid var(--border);
    transition: transform 0.2s ease, opacity 0.2s;
}

.thought-card:hover {
    opacity: 0.8;
}

.thought-card:hover .thought-title i {
    opacity: 1 !important;
    transform: translateX(5px) !important;
}

.thought-date {
    font-size: 0.85rem;
    color: var(--text-sub);
    font-family: monospace;
}

.thought-tag {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--nav-text);
    border: 1px solid var(--border);
    padding: 2px 6px;
    border-radius: 3px;
}

.thought-title {
    font-size: 1.4rem;
    color: var(--accent);
    margin: 5px 0 10px 0;
    font-weight: 500;
}

.thought-summary {
    font-size: 1rem;
    color: var(--text-sub);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* --- CARD TITLE LINKS --- */
.card-title-link {
    text-decoration: none;
    color: var(--accent);
    /* Inherits the header white/black */
    transition: opacity 0.2s;
    border-bottom: 1px solid transparent;
    /* invisible border for hover effect */
}

.card-title-link:hover {
    opacity: 0.8;
    border-bottom: 1px solid var(--accent);
    /* Minimal underline on hover */
}

/* Fix icon alignment */
.card-title-link i {
    transition: transform 0.2s;
}

.card-title-link:hover i {
    transform: translate(2px, -2px);
    /* Tiny move animation */
}


/* --- RESUME STYLES --- */

.resume-container {
    max-width: 100%;
}

.resume-section {
    margin-bottom: 40px;
}

.resume-category {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-sub);
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
    margin-bottom: 30px;
}

.resume-item {
    margin-bottom: 40px;
    position: relative;
    padding-left: 20px;
    border-left: 2px solid var(--border);
    /* The Timeline Line */
    transition: border-color 0.3s;
}

.resume-item:hover {
    border-left-color: var(--accent);
    /* Light up on hover */
}

.resume-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 5px;
}

.resume-role {
    font-size: 1.2rem;
    color: var(--accent);
    font-weight: 600;
}

.resume-dates {
    font-size: 0.9rem;
    color: var(--text-sub);
    font-family: monospace;
}

.resume-sub-header {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    margin-bottom: 15px;
    color: var(--nav-text);
}

.resume-summary {
    color: var(--text-color);
    margin-bottom: 10px;
}

.resume-highlights {
    list-style-type: none;
    padding-left: 0;
}

.resume-highlights li {
    position: relative;
    padding-left: 15px;
    margin-bottom: 5px;
    color: var(--text-sub);
    font-size: 0.95rem;
}

.resume-highlights li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* Skills Tags */
.skill-group {
    margin-bottom: 20px;
}

.skill-category {
    font-size: 1rem;
    color: var(--accent);
    margin-bottom: 10px;
}

.skill-tag {
    display: inline-block;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 0.85rem;
    margin-right: 8px;
    margin-bottom: 8px;
    color: var(--text-sub);
    transition: all 0.2s;
}

.skill-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
}



/* --- CLICKABLE CARD FIXES --- */
a.card {
    border: 1px solid transparent;
    /* Prepare for hover border */
    transition: transform 0.2s, border-color 0.2s, background-color 0.2s;
}

a.card:hover {
    background-color: var(--card-hover);
    transform: translateY(-2px);
    /* Subtle lift */
    border-color: var(--border);
}

a.card h3 {
    transition: color 0.2s;
}

a.card:hover h3 {
    color: var(--accent);
    /* Ensure title stays crisp on hover */
}

/* --- FILTER TAGS --- */
.filter-tag {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-sub);
    padding: 6px 16px;
    border-radius: 20px;
    /* Capsule shape */
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.filter-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.filter-tag.active {
    background-color: var(--accent);
    color: var(--bg-color);
    /* Invert colors for active state */
    border-color: var(--accent);
    font-weight: 500;
}


/* --- INVESTMENT TABLE STYLES --- */
.table-container {
    width: 100%;
    overflow-x: auto;
    /* Handles mobile scroll */
}

.investment-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.investment-table th {
    text-align: left;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
    color: var(--text-sub);
    font-weight: 500;
    font-size: 0.85rem;
}

.investment-table td {
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-color);
}

.investment-table tr:last-child td {
    border-bottom: none;
}

.table-link {
    text-decoration: none;
    color: var(--accent);
    font-weight: 500;
    transition: opacity 0.2s;
}

.table-link:hover {
    opacity: 0.7;
    text-decoration: underline;
}

/* --- HERO CARD STYLES --- */
.hero-card {
    grid-column: 1 / -1;
    background-color: var(--card-hover);
    padding: 35px !important;
    /* Override default padding */
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.hero-card:hover {
    background-color: var(--card-hover);
    /* Keep same bg or darken slightly */
    border-color: var(--accent);
}

.hero-card .thought-title {
    color: var(--accent);
}

@media (max-width: 600px) {
    .hero-card {
        padding: 25px !important;
    }

    .hero-card .thought-title {
        font-size: 1.6rem !important;
    }
}

/* --- NEWSLETTER BOX --- */
.newsletter-box {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 30px;
    margin-top: 60px;
    margin-bottom: 0;
    background-color: rgba(255, 255, 255, 0.02);
}

@media (max-width: 500px) {
    .newsletter-box button {
        width: 100%;
        text-align: center;
    }
}

/* --- ARTICLE CONTENT STYLES (Medium-Like) --- */
.article-content {
    font-size: 1.15rem;
    line-height: 1.7;
    font-weight: 400;
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    /* Ensure clean sans-serif */
}

.article-content h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-top: 2.5em;
    margin-bottom: 0.8em;
    color: var(--accent);
    letter-spacing: -0.5px;
}

.article-content h3 {
    font-size: 1.4rem;
    font-weight: 500;
    margin-top: 2em;
    margin-bottom: 0.6em;
    color: var(--accent);
}

.article-content p {
    margin-bottom: 1.5em;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5em;
    padding-left: 1.2em;
    /* Tighter padding */
}

.article-content li {
    margin-bottom: 0.8em;
    /* Spacing between bullets */
    padding-left: 0.5em;
}

/* Custom bullet color */
.article-content ul li::marker {
    color: var(--accent);
}

.article-content strong {
    font-weight: 600;
    color: var(--accent);
}

.article-content blockquote {
    border-left: 3px solid var(--accent);
    margin: 2em 0;
    padding-left: 20px;
    font-style: italic;
    color: var(--text-sub);
    font-size: 1.25rem;
}

.article-content hr {
    border: 0;
    height: 1px;
    background: var(--border);
    margin: 3em 0;
}