:root {
    --bg-color: #000000;
    --text-color: #FFFFFF;
    --accent: #FFFFFF;
    --secondary: #9A9A9A;
    --card-bg: #050505;
    --font-main: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    transition: background-color 0.5s ease, color 0.5s ease;
}



/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(3px);
    z-index: 1000;
    transition: background 0.5s ease;
}



.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Hamburger — hidden on desktop */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-color);
    margin: 5px 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hamburger active state (X shape) */
.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.7;
    transition: var(--transition);
}

.nav-links a:hover {
    opacity: 1;
    color: var(--accent);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 1rem;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.highlight {
    color: var(--accent);
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    padding: 12px 20px;
    background-color: var(--accent);
    color: var(--bg-color);
    text-decoration: none;
    font-weight: 600;
    border-radius: 0px;
    transition: var(--transition);
}

.btn:hover {
    background: var(--secondary);
    color: var(--bg-color);
}

/* Weather Widget */
.weather-widget {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 2000;
    padding: 0.6rem 1.4rem;
    border-radius: 2px;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-size: 0.85rem;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    color: var(--text-color);
}

.weather-widget.loaded {
    opacity: 1;
    transform: translateY(0);
}

.weather-icon {
    font-size: 1.3rem;
    line-height: 1;
}

.weather-info {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

#weather-temp {
    font-weight: 600;
    color: var(--accent);
}

#weather-desc {
    opacity: 0.8;
}

.weather-divider {
    opacity: 0.3;
    font-weight: 300;
}

.weather-location {
    opacity: 0.7;
    font-size: 0.8rem;
}



/* Sections */
.section {
    padding: 6rem 5% 4rem;
    padding-top: 7rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.container {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    text-align: left;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    background: var(--secondary);
}

/* About */
.about-content {
    font-size: 1.1rem;
    opacity: 0.9;
}

.skills {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.skill-tag {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 2px;
    font-size: 0.72rem;
    font-family: var(--font-mono);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Projects */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 2rem;
}

.project-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.project-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 2px;
    border: 1px solid var(--secondary);
    transition: var(--transition), background-color 0.5s ease;
}

.project-card:hover {
    border-color: var(--accent);
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

/* Contact */
.contact-links {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    /* Stack logically for name display */
    gap: 1rem;
    align-items: flex-start;
    /* Align left */
}

.contact-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.1rem;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
    /* Subtle underline effect on hover */
    padding-bottom: 2px;
}

.contact-link:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
    transform: translateX(5px);
    /* Slide right slightly on hover */
}



/* Footer */
footer {
    padding: 1.5rem 2rem;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.5;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background-color: var(--bg-color);
    transition: background-color 0.5s ease;
}

/* Scroll Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* Tabbed Layout Transitions */
.tab-content {
    display: none;
    opacity: 0;
}

.tab-content.active {
    display: flex;
    opacity: 1;
}

.tab-content.tab-slide-right {
    animation: slideInRight 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.tab-content.tab-slide-left {
    animation: slideInLeft 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Nav Active State */
.nav-links a.active {
    opacity: 1;
    color: var(--accent);
    position: relative;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent);
}

.fade-in-up.visible,
.tab-content.active .fade-in-up {
    opacity: 1;
    transform: translateY(0);
}

/* Settings Toggles (Global) */
.settings-container {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    display: flex;
    gap: 1rem;
    z-index: 2000;
}

.icon-btn {
    background: transparent;
    border: 1px solid var(--text-color);
    color: var(--text-color);
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-main);
    font-weight: 600;
}

.icon-btn:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

/* ============================================
   TIMELINE
   ============================================ */
.timeline-wrapper {
    margin-top: 3rem;
}

.timeline-wrapper h3 {
    font-size: 1.3rem;
    color: var(--accent);
    margin-bottom: 2rem;
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--secondary);
}

.timeline-item {
    position: relative;
    padding-bottom: 2.5rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 0.35rem;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 0;
    transform: translateX(-3.5px);
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--secondary);
    margin-bottom: 0.4rem;
}

.timeline-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.3rem;
}

.timeline-content p {
    font-size: 0.95rem;
    opacity: 0.7;
}

/* ============================================
   TECH STACK
   ============================================ */
.techstack-wrapper {
    margin-top: 3rem;
}

.techstack-wrapper h3 {
    font-size: 1.3rem;
    color: var(--accent);
    margin-bottom: 2rem;
}

.techstack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
}

.techstack-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    padding: 1.2rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    background: var(--card-bg);
    transition: var(--transition);
    cursor: default;
}

.techstack-item:hover {
    border-color: var(--accent);
}

.techstack-item:hover .techstack-icon {
    fill: var(--accent);
}

.techstack-icon {
    width: 28px;
    height: 28px;
    fill: var(--secondary);
    transition: fill 0.3s ease;
}

.techstack-name {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--secondary);
    transition: color 0.3s ease;
}

.techstack-item:hover .techstack-name {
    color: var(--accent);
}

/* ============================================
   GITHUB TERMINAL
   ============================================ */
.github-terminal-wrapper {
    margin-top: 4rem;
    width: 100%;
}

.github-terminal {
    background: #050505;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    font-family: var(--font-mono);
    color: var(--text-color);
    overflow: hidden;
    transition: var(--transition);
}

.github-terminal:hover {
    border-color: var(--accent);
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.terminal-dot {
    width: 8px;
    height: 8px;
    background: var(--text-color);
    border-radius: 0;
}

.terminal-title {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    opacity: 0.5;
}

.terminal-body {
    padding: 1.5rem;
    font-size: 0.88rem;
    line-height: 1.8;
    min-height: 180px;
    color: var(--secondary);
}

.terminal-line {
    display: block;
    margin-bottom: 0.5rem;
    word-break: break-all;
}

.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 1.2em;
    background: var(--accent);
    vertical-align: middle;
    animation: blink 1s step-end infinite;
    margin-left: 5px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ============================================
   PROJECT FILTERS
   ============================================ */
.project-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0px;
    background: transparent;
    color: var(--secondary);
    cursor: pointer;
    transition: var(--transition);
}

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

.filter-btn.active {
    background: var(--accent);
    color: var(--bg-color);
    border-color: var(--accent);
}

/* Project Tag */
.project-tag {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--secondary);
    display: inline-block;
    margin-bottom: 0.6rem;
    padding: 0.2rem 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0px;
}

/* Project card hide/show for filtering */
.project-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.project-card-link.hidden {
    opacity: 0;
    transform: scale(0.95);
    position: absolute;
    pointer-events: none;
    height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

/* ============================================
   MAGNETIC BUTTON EFFECT
   ============================================ */
.magnetic-btn {
    transition: transform 0.2s ease;
    will-change: transform;
}

/* ============================================
   RESPONSIVE — Tablet & Small Laptop
   ============================================ */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    nav {
        padding: 1rem 5%;
        flex-wrap: wrap;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    opacity 0.3s ease,
                    padding 0.3s ease;
        opacity: 0;
        padding: 0;
    }

    .nav-links.open {
        max-height: 300px;
        opacity: 1;
        padding: 1rem 0 0.5rem;
    }

    .nav-links li {
        text-align: center;
    }

    .nav-links a {
        font-size: 0.95rem;
        display: block;
        padding: 0.7rem 0;
    }

    .section {
        padding: 5rem 5% 3rem;
        padding-top: 6rem;
        min-height: auto;
    }

    h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .skills {
        gap: 0.6rem;
    }

    .contact-links {
        gap: 0.8rem;
    }

    .contact-link {
        font-size: 0.95rem;
    }

    .settings-container {
        bottom: 1rem;
        left: 1rem;
    }

    .weather-widget {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
        bottom: 1rem;
        right: 1rem;
    }

    .techstack-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .github-terminal-wrapper {
        margin-top: 2rem;
    }

    .terminal-body {
        font-size: 0.78rem;
        padding: 1rem;
        min-height: 140px;
    }
}

/* ============================================
   RESPONSIVE — Mobile
   ============================================ */
@media (max-width: 480px) {
    .hero {
        padding: 0 5%;
    }

    .hero h1 {
        font-size: 1.6rem;
        word-break: break-word;
    }

    .hero p {
        font-size: 0.9rem;
    }

    nav {
        padding: 0.8rem 5%;
    }

    .nav-links a {
        font-size: 0.85rem;
        padding: 0.6rem 0;
    }

    .section {
        padding: 4rem 4% 2rem;
        padding-top: 5rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    .about-content {
        font-size: 1rem;
    }

    .skills {
        gap: 0.5rem;
    }

    .skill-tag {
        font-size: 0.65rem;
        padding: 0.4rem 0.7rem;
    }

    .project-card {
        padding: 1.2rem;
    }

    .project-card h3 {
        font-size: 1.1rem;
        word-break: break-word;
    }

    .project-card p {
        font-size: 0.88rem;
    }

    .contact-link {
        font-size: 0.85rem;
    }

    .btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }

    .settings-container {
        bottom: 0.8rem;
        left: 0.8rem;
        gap: 0.5rem;
    }

    .icon-btn {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }

    .weather-widget {
        font-size: 0.72rem;
        padding: 0.4rem 0.8rem;
        gap: 0.3rem;
        bottom: 0.8rem;
        right: 0.8rem;
    }

    .weather-widget .weather-divider,
    .weather-widget #weather-desc,
    .weather-widget .weather-location {
        display: none;
    }

    .weather-icon {
        font-size: 1rem;
    }

    .techstack-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .techstack-item {
        padding: 0.8rem 0.4rem;
    }

    .techstack-icon {
        width: 22px;
        height: 22px;
    }

    .techstack-name {
        font-size: 0.58rem;
    }

    .timeline {
        padding-left: 1.5rem;
    }

    .timeline-item::before {
        left: -1.5rem;
    }

    .timeline-content h4 {
        font-size: 0.95rem;
    }

    .timeline-content p {
        font-size: 0.85rem;
    }

    .filter-btn {
        font-size: 0.62rem;
        padding: 0.35rem 0.6rem;
    }

    .terminal-body {
        font-size: 0.7rem;
        padding: 0.8rem;
        min-height: 120px;
        word-break: break-all;
    }

    .terminal-line {
        margin-bottom: 0.3rem;
    }

    .github-terminal-wrapper {
        margin-top: 2rem;
    }
}

/* ============================================
   BLOG STYLES
   ============================================ */

/* Blog Header */
.blog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.blog-header h2 {
    margin-bottom: 0;
}



/* Blog Empty State */
.blog-empty {
    text-align: center;
    padding: 4rem 2rem;
    opacity: 0.6;
}

.blog-empty-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.blog-empty p {
    font-size: 1.1rem;
    max-width: 400px;
    margin: 0 auto;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Blog Card */
.blog-card {
    background: var(--card-bg);
    border-radius: 2px;
    border: 1px solid var(--secondary);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition), background-color 0.5s ease;
}

.blog-card:hover {
    border-color: var(--accent);
}

.blog-card-thumb {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.blog-card-body {
    padding: 1.5rem;
}

.blog-card-date {
    font-size: 0.8rem;
    opacity: 0.5;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.blog-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    color: var(--accent);
    line-height: 1.3;
}

.blog-card-excerpt {
    font-size: 0.95rem;
    opacity: 0.7;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}




/* ============================================
   BLOG RESPONSIVE - Tablet
   ============================================ */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }


    .blog-card-thumb {
        height: 150px;
    }
}

/* ============================================
   BLOG RESPONSIVE - Mobile
   ============================================ */
@media (max-width: 480px) {
    .blog-header {
        flex-direction: column;
        align-items: flex-start;
    }


    .blog-card-body {
        padding: 1rem;
    }

    .blog-card-title {
        font-size: 1.1rem;
    }

    .blog-card-excerpt {
        font-size: 0.88rem;
    }


}



/* Translation Loading State */
body.translating [data-i18n] {
    opacity: 0.4;
    transition: opacity 0.2s ease;
}

body:not(.translating) [data-i18n] {
    transition: opacity 0.3s ease;
}