/* ===== CSS Variables & Theme ===== */
:root {
    /* Colors - Light Theme */
    --bg-primary: oklch(0.985 0.002 100);
    --bg-secondary: oklch(0.928 0.006 110);
    --text-primary: oklch(0.278 0.033 120);
    --text-secondary: oklch(0.45 0.02 120);
    --text-muted: oklch(0.55 0.015 120);

    /* Gradient Colors - Yellow to Green */
    --gradient-start: oklch(0.75 0.18 95);
    --gradient-end: oklch(0.65 0.2 145);
    --gradient-primary: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));

    /* UI Colors */
    --card-bg: rgba(255, 255, 255, 0.9);
    --card-border: rgba(0, 0, 0, 0.08);
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);

    --header-bg: rgba(255, 255, 255, 0.7);
    --header-blur: 10px;

    --tag-bg: rgba(100, 180, 80, 0.15);
    --tag-color: oklch(0.5 0.15 145);

    --timeline-line: rgba(0, 0, 0, 0.1);

    /* Button Colors */
    --btn-primary-bg: var(--gradient-primary);
    --btn-secondary-border: oklch(0.55 0.15 130);
    --btn-linkedin-bg: #0077b5;

    /* Spacing */
    --section-padding: 8rem 0;
    --container-max: 1200px;
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --border-radius-pill: 50px;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;
    --font-size-5xl: 3.5rem;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --bg-primary: oklch(0.15 0.01 120);
    --bg-secondary: oklch(0.2 0.015 120);
    --text-primary: oklch(0.95 0.005 120);
    --text-secondary: oklch(0.75 0.01 120);
    --text-muted: oklch(0.6 0.01 120);

    --card-bg: rgba(30, 35, 30, 0.9);
    --card-border: rgba(255, 255, 255, 0.1);
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);

    --header-bg: rgba(20, 25, 20, 0.7);

    --tag-bg: rgba(150, 220, 100, 0.2);
    --tag-color: oklch(0.75 0.18 130);

    --timeline-line: rgba(255, 255, 255, 0.1);
}


/* ===== Reset & Base Styles ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background var(--transition-normal), color var(--transition-normal);
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* ===== Container ===== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(var(--header-blur));
    -webkit-backdrop-filter: blur(var(--header-blur));
    border-bottom: 1px solid var(--card-border);
    transition: all var(--transition-normal);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-logo {
    font-size: var(--font-size-xl);
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

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

.nav-link {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 0.5rem 0;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-fast);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-toggle {
    padding: 0.5rem;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.theme-toggle:hover {
    color: var(--text-primary);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 0.5rem;
    width: 40px;
    height: 40px;
    cursor: pointer;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-normal);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

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

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--header-bg);
        backdrop-filter: blur(var(--header-blur));
        -webkit-backdrop-filter: blur(var(--header-blur));
        flex-direction: column;
        align-items: center;
        gap: 0;
        padding: 1rem 0;
        border-bottom: 1px solid var(--card-border);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-normal);
    }

    .nav-links.active {
        display: flex;
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

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

    .nav-link {
        display: block;
        padding: 1rem 2rem;
    }

    .nav-link::after {
        display: none;
    }
}



/* ===== Hero Section ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 70px;
}

.hero-bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

[data-theme="dark"] .hero-bg-grid {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    pointer-events: none;
    animation: float 10s ease-in-out infinite;
}

.hero-glow-1 {
    width: 500px;
    height: 500px;
    background: var(--gradient-start);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.hero-glow-2 {
    width: 400px;
    height: 400px;
    background: var(--gradient-end);
    bottom: -50px;
    left: -100px;
    animation-delay: -5s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, 30px);
    }
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 800px;
}

.hero-title {
    font-size: clamp(var(--font-size-3xl), 5vw, var(--font-size-5xl));
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
    /* Animation Properties */
    transition: opacity 0.5s ease, transform 0.5s ease;
    opacity: 1;
    transform: translateY(0);
}

.hero-subtitle.fade-out {
    opacity: 0;
    transform: translateY(-20px);
}

.hero-subtitle.prepare-in {
    opacity: 0;
    transform: translateY(-20px);
    transition: none;
}

[data-theme="dark"] .hero-subtitle {
    color: #ffffff;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-size: var(--font-size-sm);
    font-weight: 600;
    border-radius: var(--border-radius-pill);
    transition: all var(--transition-normal);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(100, 180, 80, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(100, 180, 80, 0.5);
}

[data-theme="dark"] .btn-primary {
    background: rgba(60, 65, 75, 0.9);
    box-shadow: none;
}

[data-theme="dark"] .btn-primary:hover {
    background: rgba(75, 80, 90, 0.95);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

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

.btn-secondary:hover {
    background: var(--tag-bg);
    transform: translateY(-2px);
}

[data-theme="dark"] .btn-secondary {
    border-color: rgba(150, 150, 150, 0.5);
}

[data-theme="dark"] .btn-secondary:hover {
    background: rgba(150, 150, 150, 0.15);
}


.btn-linkedin {
    background: var(--btn-linkedin-bg);
    color: white;
}

.btn-linkedin:hover {
    background: #005f8f;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 119, 181, 0.4);
}

.btn-email {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--btn-secondary-border);
}

.btn-email:hover {
    background: var(--tag-bg);
    transform: translateY(-2px);
}

[data-theme="dark"] .btn-email {
    border-color: rgba(150, 150, 150, 0.5);
}

[data-theme="dark"] .btn-email:hover {
    background: rgba(150, 150, 150, 0.15);
}

/* ===== Section Styles ===== */
section {
    padding: var(--section-padding);
}

.section-title {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-title-center {
    text-align: center;
}

.section-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    text-align: center;
    max-width: 600px;
    margin: 0 auto 4rem;
}

/* ===== About Section ===== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 4rem;
}

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

.about-text .highlight {
    color: var(--tag-color);
    font-weight: 600;
}

.about-image {
    display: flex;
    justify-content: center;
}

.avatar-wrapper {
    position: relative;
}

.avatar-placeholder {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 10px 40px rgba(100, 180, 80, 0.3);
}

.profile-image {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top;
    box-shadow: 0 10px 40px rgba(100, 180, 80, 0.3);
    border: 4px solid var(--card-bg);
}

/* ===== Skills Section ===== */
.skills-section {
    text-align: center;
}

.skills-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.skill-tag {
    padding: 0.5rem 1rem;
    background: var(--tag-bg);
    color: var(--tag-color);
    font-size: var(--font-size-sm);
    font-weight: 500;
    border-radius: var(--border-radius-pill);
    transition: transform var(--transition-fast);
}

.skill-tag:hover {
    transform: translateY(-2px);
}

/* ===== Projects Timeline ===== */
.projects {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--timeline-line);
    transform: translateX(-50%);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 0 40px 60px;
}

.timeline-left {
    left: 0;
    padding-right: 60px;
    text-align: right;
}

.timeline-right {
    left: 50%;
    padding-left: 60px;
    text-align: left;
}

.timeline-dot {
    position: absolute;
    top: 10px;
    width: 16px;
    height: 16px;
    background: var(--gradient-primary);
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 0 0 4px var(--bg-secondary);
}

.timeline-left .timeline-dot {
    right: -8px;
}

.timeline-right .timeline-dot {
    left: -8px;
}

.timeline-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: all var(--transition-normal);
}

.timeline-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .timeline-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.project-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.project-role {
    font-size: var(--font-size-sm);
    color: var(--tag-color);
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.project-description {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    justify-content: inherit;
}

.project-tag {
    padding: 0.25rem 0.75rem;
    background: var(--tag-bg);
    color: var(--tag-color);
    font-size: var(--font-size-xs);
    font-weight: 500;
    border-radius: var(--border-radius-pill);
}

.project-date {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    font-weight: 500;
}

/* ===== Articles Section ===== */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.article-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: all var(--transition-normal);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .article-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.article-source {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    font-weight: 500;
}

.article-time {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

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

.article-excerpt {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.article-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--font-size-sm);
    color: var(--tag-color);
    font-weight: 600;
    transition: gap var(--transition-fast);
}

.article-link:hover {
    gap: 0.75rem;
}

.award-issuer {
    display: block;
    font-size: var(--font-size-sm);
    color: var(--tag-color);
    font-weight: 600;
    margin-top: 0.5rem;
}

/* ===== Contact Section ===== */
.contact {
    text-align: center;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.contact-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Footer ===== */
.footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--card-border);
}

.footer p {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-image {
        order: -1;
    }

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

@media (max-width: 768px) {
    :root {
        --section-padding: 5rem 0;
    }

    .nav-links {
        display: none;
    }

    .hero-title {
        font-size: var(--font-size-3xl);
    }

    .hero-subtitle {
        font-size: var(--font-size-base);
    }

    .timeline-line {
        left: 8px;
    }

    .timeline-item {
        width: 100%;
        left: 0;
        padding-left: 40px;
        padding-right: 0;
        text-align: left;
    }

    .timeline-left,
    .timeline-right {
        left: 0;
        padding-left: 40px;
        text-align: left;
    }

    .timeline-left .timeline-dot,
    .timeline-right .timeline-dot {
        left: 0;
    }

    .timeline-left .project-tags,
    .timeline-right .project-tags {
        justify-content: flex-start;
    }

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

    .section-title {
        font-size: var(--font-size-2xl);
    }
}

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

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
    }

    .avatar-placeholder {
        width: 180px;
        height: 180px;
    }

    .contact-buttons {
        flex-direction: column;
    }

    .scroll-down-btn {
        bottom: 140px;
    }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content {
    animation: fadeInUp 0.8s ease-out;
}

.timeline-card {
    animation: fadeInUp 0.6s ease-out;
}

.article-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Staggered animation for timeline cards */
.timeline-item:nth-child(1) .timeline-card {
    animation-delay: 0.1s;
}

.timeline-item:nth-child(2) .timeline-card {
    animation-delay: 0.2s;
}

.timeline-item:nth-child(3) .timeline-card {
    animation-delay: 0.3s;
}

.timeline-item:nth-child(4) .timeline-card {
    animation-delay: 0.4s;
}

/* Staggered animation for article cards */
.article-card:nth-child(1) {
    animation-delay: 0.1s;
}

.article-card:nth-child(2) {
    animation-delay: 0.2s;
}


/* ===== Hover Animations ===== */
.hero-title .gradient-text {
    display: inline-block;
    transition: transform var(--transition-normal);
}

.hero-title .gradient-text:hover {
    transform: scale(1.05) rotate(2deg);
    filter: brightness(1.1);
}

.profile-image {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top;
    box-shadow: 0 10px 40px rgba(100, 180, 80, 0.3);
    border: 4px solid var(--card-bg);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.profile-image:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 50px rgba(100, 180, 80, 0.5);
}

/* ===== Scroll Down Button ===== */
.scroll-down-btn {
    position: absolute;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-secondary);
    animation: bounce 2s infinite;
    cursor: pointer;
    transition: color var(--transition-fast);
    padding: 10px;
}

.scroll-down-btn:hover {
    color: var(--tag-color);
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ===== Resume Button ===== */
.btn-resume {
    margin-top: 2rem;
}