/* ============================================
   CSS Custom Properties
   ============================================ */
:root {
    --color-bg-light: #F5F5F5;
    --color-bg-dark: #1A1A2E;
    --color-text: #2D2D2D;
    --color-text-secondary: #6B7280;
    --color-accent: #3A8A9E;
    --color-accent-hover: #2C6F80;
    --color-white: #FFFFFF;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --max-width: 1100px;
    --section-padding: 100px;
    --nav-height: 70px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: var(--font-family);
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

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

/* ============================================
   Layout
   ============================================ */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: var(--section-padding) 0;
}

.section-dark {
    background-color: var(--color-bg-dark);
    color: var(--color-white);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 48px;
    text-align: center;
    letter-spacing: -0.02em;
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.navbar.scrolled {
    background-color: rgba(26, 26, 46, 0.95);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-white);
    letter-spacing: 0.05em;
}

.nav-menu {
    display: flex;
    gap: 32px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 400;
    transition: color 0.3s;
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: width 0.3s;
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-white);
    transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

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

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

/* ============================================
   Hero
   ============================================ */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-white);
    background-image: url('../assets/img/hero-banner.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-color: var(--color-bg-dark);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(26, 26, 46, 0.7) 0%,
        rgba(26, 26, 46, 0.85) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-photo {
    width: 180px;
    height: 180px;
    margin: 0 auto 32px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 1.15rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
}

.hero-location {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 32px;
}

.hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    color: rgba(255, 255, 255, 0.4);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-8px); }
    60% { transform: translateX(-50%) translateY(-4px); }
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 6px;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s, transform 0.2s;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn:hover {
    transform: translateY(-1px);
}

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

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

.btn-outline {
    background-color: transparent;
    color: var(--color-accent);
    border-color: var(--color-accent);
}

.btn-outline:hover {
    background-color: var(--color-accent);
    color: var(--color-white);
}

/* ============================================
   About
   ============================================ */
.about-content {
    max-width: 720px;
    margin: 0 auto 48px;
    text-align: center;
}

.about-content p {
    color: var(--color-text-secondary);
    margin-bottom: 16px;
    font-size: 1.05rem;
}

.about-stats {
    display: flex;
    justify-content: center;
    gap: 64px;
    margin-bottom: 48px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-accent);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.about-cta {
    text-align: center;
}

/* ============================================
   Parallax Banner
   ============================================ */
.parallax-banner {
    position: relative;
    height: 300px;
    background-image: url('../assets/img/about-banner.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-color: var(--color-bg-dark);
}

.parallax-overlay {
    position: absolute;
    inset: 0;
    background: rgba(26, 26, 46, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
}

.parallax-overlay h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-white);
    letter-spacing: -0.02em;
}

/* ============================================
   Timeline / Experience
   ============================================ */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #E5E7EB;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

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

.timeline-dot {
    position: absolute;
    left: -33px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--color-accent);
    border: 2px solid var(--color-bg-light);
    box-shadow: 0 0 0 3px var(--color-accent);
}

.timeline-content {
    background-color: var(--color-white);
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s;
}

.timeline-content:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 4px;
}

.timeline-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--color-accent);
    font-weight: 500;
    white-space: nowrap;
}

.timeline-company {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: 12px;
}

.timeline-content ul {
    list-style: disc;
    padding-left: 20px;
}

.timeline-content li {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: 4px;
    line-height: 1.5;
}

/* ============================================
   Skills
   ============================================ */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.skill-group h3 {
    font-size: 0.85rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 16px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    padding: 6px 16px;
    font-size: 0.85rem;
    border-radius: 100px;
    background-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: background-color 0.3s, border-color 0.3s;
}

.skill-tag:hover {
    background-color: rgba(58, 138, 158, 0.2);
    border-color: var(--color-accent);
}

/* ============================================
   Education
   ============================================ */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.education-card {
    background-color: var(--color-white);
    padding: 32px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    text-align: center;
}

.education-logo {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #1e293b;
    border-radius: 8px;
    padding: 16px;
}

.education-logo img {
    max-width: 180px;
    height: auto;
    max-height: 80px;
    object-fit: contain;
}

.education-year {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 8px;
}

.education-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.education-field {
    font-size: 1rem;
    color: var(--color-accent);
    margin-bottom: 8px;
}

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

.languages {
    text-align: center;
}

.languages h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.language-list {
    display: flex;
    justify-content: center;
    gap: 48px;
}

.language-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.language-name {
    font-weight: 700;
    font-size: 1rem;
}

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

/* ============================================
   My Journey / Story Timeline
   ============================================ */
.journey-intro {
    max-width: 640px;
    margin: 0 auto 64px;
    text-align: center;
    color: var(--color-text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
}

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

.story-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 24px;
    bottom: 24px;
    width: 2px;
    transform: translateX(-50%);
    background: linear-gradient(
        to bottom,
        transparent,
        var(--color-accent) 5%,
        var(--color-accent) 95%,
        transparent
    );
}

.story-item {
    display: grid;
    grid-template-columns: 1fr 88px 1fr;
    gap: 0 8px;
    align-items: start;
    margin-bottom: 40px;
}

.story-item:last-child {
    margin-bottom: 0;
}

.story-axis {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 10px;
    position: relative;
    z-index: 1;
    gap: 8px;
}

.story-year {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--color-white);
    background: var(--color-accent);
    padding: 3px 10px;
    border-radius: 100px;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.story-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--color-accent);
    border: 3px solid var(--color-bg-light);
    box-shadow: 0 0 0 3px var(--color-accent);
    flex-shrink: 0;
}

.story-spacer {
    /* Empty column — pushes card to correct side */
}

.story-card {
    background: var(--color-white);
    border-radius: 8px;
    padding: 20px 24px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s;
}

.story-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.story-category {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 3px 10px;
    border-radius: 100px;
    margin-bottom: 10px;
}

.story-category--adventure {
    background: rgba(34, 197, 94, 0.1);
    color: #15803D;
}

.story-category--achievement {
    background: rgba(58, 138, 158, 0.12);
    color: var(--color-accent);
}

.story-category--challenge {
    background: rgba(239, 68, 68, 0.1);
    color: #B91C1C;
}

.story-category--milestone {
    background: rgba(245, 158, 11, 0.12);
    color: #92400E;
}

.story-category--joy {
    background: rgba(236, 72, 153, 0.1);
    color: #9D174D;
}

.story-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 8px;
    line-height: 1.4;
}

.story-card-image {
    margin: 12px -24px 16px;
    overflow: hidden;
}

.story-card-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.story-card p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* ============================================
   Open Source
   ============================================ */
.opensource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.opensource-card {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 32px;
    border-radius: 8px;
    transition: border-color 0.3s;
}

.opensource-logo {
    max-width: 160px;
    height: auto;
    object-fit: contain;
    margin-bottom: 16px;
    display: block;
}

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

.opensource-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.opensource-url {
    font-size: 0.85rem;
    color: var(--color-accent);
    margin-bottom: 16px;
}

.opensource-card ul {
    list-style: disc;
    padding-left: 20px;
}

.opensource-card li {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 4px;
}

/* ============================================
   Contact
   ============================================ */
.contact {
    background-color: var(--color-bg-dark);
    color: var(--color-white);
    text-align: center;
}

.contact-intro {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 48px;
}

.contact-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s;
}

.contact-link:hover {
    color: var(--color-accent);
}

.contact-link svg {
    flex-shrink: 0;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background-color: #12121F;
    color: rgba(255, 255, 255, 0.4);
    padding: 24px 0;
}

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

.footer p {
    font-size: 0.85rem;
}

.back-to-top {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    transition: color 0.3s;
}

.back-to-top:hover {
    color: var(--color-accent);
}

/* ============================================
   Scroll Reveal Animation
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    :root {
        --section-padding: 64px;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background-color: rgba(26, 26, 46, 0.98);
        flex-direction: column;
        align-items: center;
        padding: 32px 0;
        gap: 24px;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.3s, opacity 0.3s;
    }

    .nav-menu.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

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

    .hero-photo {
        width: 140px;
        height: 140px;
    }

    .about-stats {
        gap: 32px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .timeline {
        padding-left: 32px;
    }

    .timeline-header {
        flex-direction: column;
        gap: 4px;
    }

    .parallax-banner,
    .hero {
        background-attachment: scroll;
    }

    .parallax-banner {
        height: 200px;
    }

    .parallax-overlay h2 {
        font-size: 1.8rem;
    }

    .story-timeline::before {
        left: 20px;
        transform: none;
        top: 0;
        bottom: 0;
    }

    .story-item {
        display: block;
        position: relative;
        padding-left: 56px;
    }

    .story-axis {
        position: absolute;
        left: 0;
        top: 0;
        width: 42px;
        padding-top: 0;
        gap: 6px;
    }

    .story-year {
        font-size: 0.65rem;
        padding: 2px 6px;
    }

    .story-spacer {
        display: none;
    }

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

    .language-list {
        gap: 32px;
    }

    .footer .container {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .about-stats {
        flex-direction: column;
        gap: 24px;
    }

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

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