/* ===== CSS VARIABLES & ROOT ===== */
:root {
    --primary: #58a6ff;         /* GitHub blue */
    --secondary: #3fb950;       /* GitHub green */
    --accent: #bc8cff;          /* tech purple */
    --dark: #0f141c;            /* Slate/Obsidian dark */
    --darker: #090d13;          /* Deep space/slate dark */
    --light: #f8f9fa;
    --text-primary: #f0f6fc;    /* Light text for dark theme */
    --text-secondary: #8b949e;  /* Muted text for dark theme */
    --border: #30363d;          /* Steel gray borders */
    --border-glow: rgba(88, 166, 255, 0.15);
    --bg-card: #161b22;         /* Dark card background */
    --bg-card-hover: #21262d;   /* Dark card hover background */
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.45);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --space: 1rem;
    --font-mono: 'Space Mono', 'Fira Code', 'Courier New', monospace;
}

[data-theme="light"] {
    --primary: #0969da;         /* Clean blue */
    --secondary: #1a7f37;       /* Clean green */
    --accent: #8250df;          /* Clean purple */
    --dark: #ffffff;
    --darker: #f6f8fa;          /* GitHub light bg */
    --text-primary: #24292f;
    --text-secondary: #57606a;
    --border: #d0d7de;          /* Light gray border */
    --border-glow: rgba(9, 105, 218, 0.08);
    --bg-card: #ffffff;
    --bg-card-hover: #f3f4f6;
}

/* ===== GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--darker);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent);
}

/* ===== ANIMATED BACKGROUND ===== */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--darker);
    z-index: -1;
    overflow: hidden;
}

.bg-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.15;
    animation: gridShift 40s linear infinite;
}

.bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.04;
    animation: float 8s ease-in-out infinite;
}

.glow-1 {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: -150px;
    left: -150px;
    animation-delay: 0s;
}

.glow-2 {
    width: 400px;
    height: 400px;
    background: var(--accent);
    top: 50%;
    right: -100px;
    animation-delay: 2.5s;
}

.glow-3 {
    width: 400px;
    height: 400px;
    background: var(--secondary);
    bottom: -150px;
    left: 40%;
    animation-delay: 5s;
}

@keyframes gridShift {
    0% { transform: translateY(0); }
    100% { transform: translateY(60px); }
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, 40px); }
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 20, 28, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: var(--transition);
}

[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.9);
}

.navbar.scrolled {
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.brand-logo {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: var(--darker);
}

.brand-text {
    color: var(--text-primary);
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: lowercase;
    color: var(--text-secondary);
    position: relative;
    display: flex;
    align-items: center;
}

.nav-link::before {
    content: ".";
    color: var(--primary);
    opacity: 0;
    margin-right: 2px;
    transition: var(--transition);
}

.nav-link:hover::before,
.nav-link.active::before {
    opacity: 1;
}

.nav-link::after {
    content: "()";
    color: var(--text-secondary);
    opacity: 0.5;
    margin-left: 1px;
}

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

.nav-action {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 34px;
    height: 34px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--bg-card-hover);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* ===== CONTAINER & UTILITIES ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    font-family: var(--font-mono);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 3.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
}

.section-title::before {
    content: '~/';
    color: var(--primary);
    margin-right: 0.2rem;
}

/* ===== BUTTONS ===== */
.btn-primary, .btn-secondary {
    padding: 0.65rem 1.75rem;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
    display: inline-block;
}

.btn-primary {
    background: var(--primary);
    color: var(--darker);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: transparent;
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--border-glow);
}

.btn-secondary {
    background: transparent;
    border-color: var(--border);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.btn-submit {
    width: 100%;
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 0 60px;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
}

.hero-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary);
    margin-bottom: 1rem;
}

.hero-title {
    font-family: 'Syne', sans-serif;
    font-size: 2rem;
    font-weight: 500;
    line-height: 1;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero-title .word {
    display: inline-block;
    margin-right: 0.2em;
    animation: wordBounce 0.6s ease-out forwards;
    animation-delay: calc(var(--i) * 0.1s);
}

@keyframes wordBounce {
    0% { transform: translateY(30px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.hero-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
}

.profile-image {
    position: relative;
    width: 320px;
    height: 380px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    animation: slideInLeft 0.8s ease-out;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.window-header {
    background: var(--bg-card);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border);
    border-radius: 12px 12px 0 0;
}

.window-header span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.window-header span:nth-child(1) { background: #ff5f56; }
.window-header span:nth-child(2) { background: #ffbd2e; }
.window-header span:nth-child(3) { background: #27c93f; }

.window-content {
    background: var(--dark);
    padding: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.7;
    color: var(--text-secondary);
    border-radius: 0 0 12px 12px;
    border: 1px solid var(--border);
    border-top: none;
    box-shadow: var(--shadow-md);
}

.code-comment { color: #6a737d; }
.code-keyword { color: #ff7b72; }
.code-var { color: #c9d1d9; }
.code-string { color: #a5d6ff; }
.code-bool { color: #ff7b72; }
.code-indent { display: block; margin-left: 1.25rem; }

/* ===== ABOUT SECTION ===== */
.about {
    padding: 100px 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-intro {
    font-size: 1.25rem;
    color: var(--text-primary);
    font-weight: 600;
}

.about-highlights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.highlight {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 1.25rem;
    border-radius: 10px;
    text-align: center;
    transition: var(--transition);
}

.highlight:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--border-glow);
}

.highlight strong {
    font-family: var(--font-mono);
    font-size: 1.6rem;
    color: var(--primary);
    display: block;
    margin-bottom: 0.5rem;
}

.profile-card {
    position: relative;
    height: 380px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 1rem;
}

@keyframes slideInLeft {
    0% { transform: translateX(-30px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

.card-avatar {
    font-size: 4rem;
    animation: float 4s ease-in-out infinite;
}

.card-inner h3 {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--primary);
}

.card-inner p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== WORK / TIMELINE SECTION ===== */
.work {
    padding: 100px 0;
}

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

.projects-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 2px;
    height: 100%;
    background: var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: block;
    transition: var(--transition);
    cursor: pointer;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.9rem;
    top: 2.3rem;
    width: 10px;
    height: 10px;
    background: var(--border);
    border: 2px solid var(--darker);
    border-radius: 50%;
    transition: var(--transition);
}

.timeline-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    transform: translateX(8px);
    box-shadow: 0 4px 20px var(--border-glow);
}

.timeline-item:hover::before {
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary);
}

.timeline-year {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.timeline-item h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.timeline-item p {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}

.tech-stack span {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    background: var(--darker);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.timeline-arrow {
    display: inline-block;
    font-weight: 700;
    color: var(--primary);
    font-size: 1.2rem;
    transition: var(--transition);
}

.timeline-item:hover .timeline-arrow {
    transform: translateX(5px);
}

/* ===== SKILLS SECTION ===== */
.skills {
    padding: 100px 0;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: 12px;
    transition: var(--transition);
}

.skill-category:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 4px 20px var(--border-glow);
}

.skill-category h4 {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.tag {
    background: var(--darker);
    color: var(--text-secondary);
    padding: 0.35rem 0.85rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: default;
}

.tag:hover {
    background: rgba(88, 166, 255, 0.1);
    color: var(--primary);
    border-color: var(--primary);
}

/* ===== STATS SECTION ===== */
.stats {
    padding: 80px 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat {
    text-align: center;
    padding: 2rem;
    background: var(--darker);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: var(--transition);
}

.stat:hover {
    transform: scale(1.03);
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--border-glow);
}

.stat-number {
    font-family: var(--font-mono);
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== MEDIUM ARTICLES SECTION ===== */
.articles {
    padding: 100px 0;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.article-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    transform: translateY(-6px);
    box-shadow: 0 4px 20px var(--border-glow);
}

.article-img-wrapper {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
    background: var(--darker);
}

.article-img-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 2.5rem;
    color: var(--border);
}

.article-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-img {
    transform: scale(1.05);
}

.article-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.article-meta {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-title {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.article-title a {
    color: var(--text-primary);
    transition: var(--transition);
}

.article-title a:hover {
    color: var(--primary);
}

.article-excerpt {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.article-tags span {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    background: var(--darker);
    color: var(--primary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--border);
}

.article-footer {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.article-read-more {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.article-read-more::after {
    content: ' ->';
    transition: var(--transition);
}

.article-card:hover .article-read-more::after {
    transform: translateX(3px);
}

.articles-loader, .articles-error-msg {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    padding: 3rem;
    text-align: center;
    color: var(--text-secondary);
    border: 1px dashed var(--border);
    border-radius: 12px;
    background: var(--bg-card);
}

.articles-loader .spinner {
    display: inline-block;
    animation: rotate 1s linear infinite;
    margin-right: 0.5rem;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

/* ===== TESTIMONIALS SECTION ===== */
.testimonials {
    padding: 100px 0;
}

.testimonials-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: 12px;
    transition: var(--transition);
}

.testimonial:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 4px 20px var(--border-glow);
}

.testimonial-stars {
    color: #ffd700;
    font-size: 1rem;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.testimonial-quote {
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.testimonial-author {
    display: flex;
    gap: 1rem;
}

.author-initial {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--darker);
    flex-shrink: 0;
}

.author-name {
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.author-role {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ===== CONTACT SECTION ===== */
.contact {
    padding: 100px 0;
}

.contact-intro {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: var(--transition);
    color: var(--text-primary);
}

.contact-link:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    transform: translateX(6px);
    box-shadow: 0 4px 12px var(--border-glow);
}

.contact-icon {
    font-size: 1.5rem;
    color: var(--primary);
    min-width: 30px;
    text-align: center;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-secondary);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    background: var(--bg-card-hover);
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--border-glow);
}

.form-group label {
    position: absolute;
    top: -1.5rem;
    left: 0;
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: none;
}

.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
    display: block;
}

.form-status {
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    display: none;
}

.form-status.success {
    display: block;
    background: rgba(63, 185, 80, 0.15);
    border: 1px solid rgba(63, 185, 80, 0.4);
    color: #3fb950;
}

.form-status.error {
    display: block;
    background: rgba(248, 81, 73, 0.15);
    border: 1px solid rgba(248, 81, 73, 0.4);
    color: #f85149;
}

/* ===== FOOTER ===== */
.footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border);
    background: var(--dark);
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.footer-links a:hover {
    color: var(--primary);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

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

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

    .hero-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .about-grid,
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-highlights {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer .container {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .section-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .nav-container {
        padding: 1rem;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-title .word {
        display: block;
    }

    .section-title {
        font-size: 1.4rem;
        margin-bottom: 2.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-highlights {
        grid-template-columns: 1fr;
    }

    .skill-category h4 {
        font-size: 1rem;
    }
}

:root {
    --primary: #c7f36b;
    --secondary: #6ee7b7;
    --accent: #ff8066;
    --dark: #111712;
    --darker: #0a0f0c;
    --text-primary: #f4f6ed;
    --text-secondary: #9aa69d;
    --border: #29342d;
    --border-glow: rgba(199, 243, 107, 0.18);
    --bg-card: #151d18;
    --bg-card-hover: #1c2820;
}

[data-theme="light"] {
    --primary: #436b14;
    --secondary: #087f5b;
    --accent: #c44f36;
    --dark: #f5f6ef;
    --darker: #e9ede3;
    --text-primary: #172018;
    --text-secondary: #58675b;
    --border: #cbd5c8;
    --border-glow: rgba(67, 107, 20, 0.14);
    --bg-card: #ffffff;
    --bg-card-hover: #f0f4eb;
}

body {
    background-color: var(--darker);
}

.animated-bg {
    background: var(--darker);
}

.bg-grid {
    background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 72px 72px;
    opacity: 0.22;
}

.bg-glow {
    filter: blur(150px);
    opacity: 0.055;
}

.glow-1 { background: var(--primary); }
.glow-2 { background: var(--accent); }
.glow-3 { background: var(--secondary); }

.navbar {
    background: rgba(10, 15, 12, 0.82);
    border-bottom-color: rgba(199, 243, 107, 0.18);
}

[data-theme="light"] .navbar {
    background: rgba(245, 246, 239, 0.86);
}

.brand-logo {
    border-radius: 50%;
    background: var(--primary);
}

.hero {
    min-height: 760px;
    padding: 140px 0 100px;
}

.hero-container {
    max-width: 1280px;
    grid-template-columns: minmax(0, 0.95fr) minmax(440px, 1.05fr);
    gap: clamp(3rem, 8vw, 8rem);
}

.hero-label,
.section-kicker {
    letter-spacing: 0.16em;
    color: var(--primary);
}

.status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 0.5rem;
    border-radius: 50%;
    background: var(--secondary);
    box-shadow: 0 0 0 4px rgba(110, 231, 183, 0.12);
    vertical-align: 1px;
}

.hero-title {
    max-width: 720px;
    margin-bottom: 1.75rem;
    font-size: clamp(3.8rem, 7vw, 7.3rem);
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.hero-title .word {
    margin-right: 0;
}

.hero-title em {
    color: var(--primary);
    font-style: normal;
    font-size: 75%;
}

.hero-desc {
    max-width: 560px;
    font-size: 1.12rem;
    line-height: 1.75;
}

.hero-actions {
    gap: 0.8rem;
    margin-bottom: 2.75rem;
}

.btn-primary,
.btn-secondary {
    border-radius: 999px;
    padding: 0.85rem 1.3rem;
}

.btn-primary span {
    display: inline-block;
    margin-left: 0.35rem;
    transition: transform 0.25s ease;
}

.btn-primary:hover span {
    transform: translate(3px, -3px);
}

.hero-proof {
    display: flex;
    gap: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.hero-proof div {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.hero-proof strong {
    font-family: var(--font-mono);
    font-size: 1.35rem;
    color: var(--text-primary);
}

.hero-proof span {
    color: var(--text-secondary);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-visual {
    min-height: 500px;
    align-items: center;
    justify-content: flex-end;
}

.pipeline-panel {
    position: relative;
    width: min(100%, 590px);
    min-height: 385px;
    padding: 1.25rem;
    background: linear-gradient(145deg, rgba(30, 45, 33, 0.94), rgba(13, 20, 15, 0.98));
    border: 1px solid #425344;
    border-radius: 18px;
    box-shadow: 18px 18px 0 rgba(199, 243, 107, 0.08), var(--shadow-lg);
    transform: rotate(2deg);
}

[data-theme="light"] .pipeline-panel {
    background: linear-gradient(145deg, #f8fbf0, #e1eade);
    border-color: #aab9a8;
}

.pipeline-topline {
    display: flex;
    justify-content: space-between;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.pipeline-live {
    color: var(--secondary);
}

.pipeline-map {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    align-items: center;
    min-height: 245px;
}

.pipeline-node {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-height: 112px;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

.pipeline-node strong {
    color: var(--text-primary);
    font-size: 1rem;
}

.pipeline-node small {
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    line-height: 1.4;
}

.node-index {
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 0.68rem;
}

.node-transform {
    transform: translateY(35px);
    border-color: var(--primary);
}

.node-insight {
    transform: translateY(-14px);
}

.pipeline-line {
    position: absolute;
    top: 50%;
    height: 1px;
    background: var(--primary);
    opacity: 0.75;
}

.line-one { left: 30%; width: 20%; }
.line-two { right: 30%; width: 20%; }

.pipeline-terminal {
    padding: 0.8rem 1rem;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.7rem;
}

.terminal-prompt,
.terminal-success {
    color: var(--primary);
}

.terminal-success { color: var(--secondary); }

.terminal-cursor {
    display: inline-block;
    width: 6px;
    height: 12px;
    margin-left: 0.25rem;
    background: var(--primary);
    vertical-align: -2px;
    animation: blink 1.1s steps(2, start) infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.hero-image-stamp {
    position: absolute;
    right: -28px;
    bottom: 8px;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.5rem;
    background: var(--primary);
    color: var(--darker);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    font-weight: 700;
    transform: rotate(-7deg);
    box-shadow: 5px 5px 0 var(--accent);
}

.hero-image-stamp img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    filter: grayscale(1) contrast(1.1);
}

.section-kicker {
    margin-bottom: 0.8rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
}

.section-intro {
    max-width: 620px;
    margin: -2rem 0 3rem;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.work .section-title {
    max-width: 700px;
    margin-bottom: 2.7rem;
}

.projects-timeline::before {
    display: none;
}

.projects-timeline {
    padding-left: 0;
    counter-reset: project;
}

.timeline-item {
    display: grid;
    grid-template-columns: 5rem minmax(0, 1fr) auto;
    gap: 1.5rem;
    align-items: start;
    margin-bottom: 0;
    padding: 2rem 0;
    background: transparent;
    border: 0;
    border-top: 1px solid var(--border);
    border-radius: 0;
    box-shadow: none;
    position: relative;
    transition: border-color 0.25s ease, padding-left 0.25s ease;
}

.timeline-item:last-child {
    border-bottom: 1px solid var(--border);
}

.timeline-item::before {
    display: none;
}

.timeline-marker {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    height: 100%;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}

.timeline-marker::before {
    counter-increment: project;
    content: '0' counter(project);
    padding-top: 0.2rem;
}

.timeline-content {
    min-width: 0;
}

.timeline-item:hover {
    background: transparent;
    border-color: var(--primary);
    transform: none;
    box-shadow: none;
    padding-left: 0.75rem;
}

.timeline-item::after {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    width: 3rem;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.timeline-item:hover::after,
.timeline-item:focus-visible::after {
    transform: scaleX(1);
}

.timeline-item:hover .timeline-marker {
    color: var(--primary);
}

.timeline-item h3 {
    font-size: 1.6rem;
    letter-spacing: -0.02em;
    margin-bottom: 0.6rem;
}

.timeline-item p {
    max-width: 760px;
    margin-bottom: 1.15rem;
}

.timeline-year {
    margin-bottom: 0.7rem;
    color: var(--primary);
}

.timeline-arrow {
    align-self: start;
    width: 2.4rem;
    height: 2.4rem;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 1rem;
    transition: color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.timeline-item:hover .timeline-arrow {
    border-color: var(--primary);
    color: var(--primary);
    transform: translate(3px, -3px);
}
@media (max-width: 768px) {
    .hero {
        min-height: auto;
        padding-top: 125px;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    .hero-title {
        font-size: clamp(3.2rem, 14vw, 5rem);
    }

    .hero-visual {
        min-height: 400px;
        justify-content: center;
    }

    .pipeline-panel {
        transform: rotate(0);
    }

    .hero-image-stamp {
        right: 0;
    }

    .timeline-item {
        grid-template-columns: 2.5rem minmax(0, 1fr) auto;
        gap: 0.75rem;
        padding: 1.5rem 0;
    }

    .timeline-item:hover {
        padding-left: 0.35rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 3rem;
    }

    .hero-proof {
        gap: 1rem;
        justify-content: space-between;
    }

    .hero-proof span {
        font-size: 0.6rem;
    }

    .pipeline-panel {
        min-height: 355px;
        padding: 0.85rem;
    }

    .pipeline-map {
        gap: 0.35rem;
    }

    .pipeline-node {
        min-height: 105px;
        padding: 0.6rem;
    }

    .pipeline-node strong {
        font-size: 0.8rem;
    }

    .pipeline-node small {
        font-size: 0.55rem;
    }

    .hero-image-stamp {
        font-size: 0.55rem;
    }
}
