:root {
    --bg: hsl(0, 0%, 5%);
    --card-bg: hsl(0, 0%, 10%);
    --bg-dark: hsl(0, 0%, 0%);
    --border: hsl(217, 33%, 17%);
    --text-main: hsl(0, 0%, 95%);
    --text-dim: hsl(0, 0%, 70%);
    --accent: hsl(199, 95%, 61%);
    --nav-gap: 2rem;
}

[data-theme="light"] {
    --bg: hsl(0, 0%, 100%);
    --card-bg: hsl(210, 40%, 98%);
    --border: hsl(214, 32%, 91%);
    --text-main: hsl(222, 47%, 11%);
    --text-dim: hsl(215, 16%, 47%);
    --accent: hsl(199, 89%, 48%);
    --bg-dark: hsl(0, 0%, 100%);
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    transition: background 0.3s ease, color 0.3s ease;
}

.view-more-link {
    display: inline-flex;
    align-items: center;
    gap: 5px; 
    text-decoration: none;
    transition: gap 0.2s ease;
}

.view-more {
    color: var(--text-main);
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: lowercase;
}

.view-more-link svg {
    width: 18px;
    height: 18px;
    color: var(--text-main);
}

.view-more-link:hover {
    gap: 12px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    max-width: 850px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    gap: 1.5rem;
}

.top-bar {
    grid-column: span 12;
    display: flex;
    justify-content: space-between; 
    align-items: center;          
    width: 100%;
}

.main-nav {
    display: flex;
    gap: var(--nav-gap);
}

.main-nav a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
}

.main-nav a:hover {
    color: var(--text-main);
}

.theme-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center; 
    justify-content: center;
    color: var(--text-main);
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.theme-toggle-btn:hover {
    transform: scale(1.1);
}

.hero {
    grid-column: span 12;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 2.5rem;
    margin: 2rem 0;
}

.hero-btns {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-top: 1.5rem;
}

.resume-btn,  .icons {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text-main);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.resume-btn {
    padding: 8px 16px;
    gap: 8px;
    font-weight: 600;
}

.icons {
    background: transparent;
    border: none;
    box-shadow: none;
    width: 42px;
    height: 42px;
    padding: 0;
    color: var(--text-dim); 
}

.icons svg {
    width: 20px;
    height: 20px;
}

.resume-btn:hover, .icons:hover {
    transform: translateY(-2px);
    background: transparent; 
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: 2.5rem;
    margin: 0 0 0.5rem 0;
}

.subtitle {
    color: var(--text-dim);
    font-weight: 600;
    margin-bottom: 1rem;
}

.single-profile-img {
    width: 200px;
    height: 200px;
    border-radius: 12px;
    object-fit: cover;
    transform: rotate(2deg);
    border: 1px solid var(--border);
}

.resume-txt {
    font-size: 1rem;
}

.toggle-bar {
    grid-column: span 12;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--card-bg); 
    border: 1px solid var(--border);
    padding: 4px;
    border-radius: 8px;
    margin: 1rem 0;
}

.toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-dim); 
    padding: 12px;
    cursor: pointer;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.toggle-btn.active {
    background: var(--bg); 
    color: var(--text-main);
    border: 1px solid var(--border);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-btn:not(.active):hover {
    color: var(--text-main);
    background: hsla(0, 0%, 100%, 0.05); 
}

.content-section {
    grid-column: span 12;
    animation: fadeIn 0.4s ease-out;
}

.hidden {
    display: none !important;
}

.timeline-item {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.org-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%; 
    object-fit: cover; 
    display: block;
}

.logo {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    
}
.item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    width: 100%;
}

.item-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.item-header h4 {
    margin-top: 0.25rem;
    color: var(--text-dim);
    font-weight: 500;
}

.achievements {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
}

.achievements li {
    font-size: 0.9rem;
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: 4px;
}

.achievements li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--text-dim);
}

.project-links {
    display: flex;
    gap: 8px;
}

.mini-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: var(--text-main);
    color: var(--bg);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
}


.date {
    color: var(--text-dim);
    font-size: 0.85rem;
}

.posts-list {
    grid-column: span 12;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.post-item {
    border: 1px solid var(--border);
    padding: 1.5rem;
    border-radius: 12px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: start;
    background-color: var(--card-bg);
}

.post-header h3 {
    font-size: 1.2rem;
    margin: 0 0 0.5rem 0;
}

.post-item p {
    color: var(--text-dim);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.post-meta {
    margin-top: 1rem;
    padding-top: 1rem;
    border: none;
}

.meta-info {
    display: flex;
    gap: 15px;
    align-items: center;
    color: var(--text-dim);
    font-size: 0.85rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dynamic-meta {
    display: flex;
    gap: 15px;
}

.meta-item svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

.dynamic-meta {
    display: flex;
    gap: 15px;
}

.post-item {
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.post-item:hover {
    transform: translateY(-2px);
}

.section-title {
    grid-column: span 12;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 3rem;
}

.projects-grid {
    grid-column: span 12;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.card-thumb {
    height: 160px;
    background: var(--border);
    overflow: hidden; 
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    display: block;
    background-color: var(--bg-dark);
    aspect-ratio: 280 / 216; 
}

.single-profile-img {
    width: 200px;
    height: 200px;
    aspect-ratio: 1 / 1;
}
.card-content {
    padding: 1.2rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tags span {
    font-size: 0.75rem;
    background: var(--card-bg);
    padding: 4px 10px;
    border-radius: 6px;
    color: var(--text-dim);
    border: 1px solid var(--border);
}

.contact-footer {
    grid-column: span 12;
    margin-top: 6rem;
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-dim);
    font-size: 0.9rem;
    border-top: 1px solid var(--border); 
}

.footer-socials {
    display: flex;
    gap: 1.5rem;
}

.footer-socials a {
    color: var(--text-dim);
    transition: color 0.2s;
}

.footer-socials a:hover {
    color: var(--text-main);
}


@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 700px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    .contact-footer {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    .hero { flex-direction: column; gap: 1.5rem; }
    .hero-visual { order: -1; }
    .projects-grid { grid-template-columns: 1fr; }
    .post-item { grid-template-columns: 1fr; }
    .post-meta { justify-items: start; text-align: left; grid-template-columns: repeat(3, auto); gap: 1rem; }
    .top-bar { gap: 1rem; flex-wrap: wrap; }
}

@media (max-width: 400px) {
    .main-nav { gap: 1rem;}
}