:root {
    --text: #222;
    --text-light: #555;
    --bg: #fff;
    --bg-alt: #f7f7f7;
    --border: #e0e0e0;
    --accent: #444;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body.dark-mode {
    --text: #e5e5e5;
    --text-light: #a0a0a0;
    --bg: #121212;
    --bg-alt: #1e1e1e;
    --border: #333;
    --accent: #bbb;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    color: var(--text);
    line-height: 1.6;
    background: var(--bg);
    font-size: 16px;
    transition: background-color 0.3s, color 0.3s;
}

nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--bg);
    padding: 1.25rem 2rem;
    z-index: 100;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
}

.nav-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text);
    text-decoration: none;
}

nav ul {
    display: flex;
    justify-content: flex-end;
    gap: 2.5rem;
    list-style: none;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 101;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    position: relative;
    transition: background 0.2s;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--text);
    left: 0;
    transition: transform 0.3s, top 0.3s;
}

.hamburger::before {
    top: -7px;
}

.hamburger::after {
    top: 7px;
}

.nav-toggle.active .hamburger {
    background: transparent;
}

.nav-toggle.active .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle.active .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
}

nav a {
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.9rem;
    transition: color 0.2s;
}

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

.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    transition: border-color 0.2s;
}

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

section {
    padding: 6rem 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.hero {
    padding-top: 8rem;
    padding-bottom: 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.hero .title {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.hero .title a {
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: var(--border);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s;
}

.hero .title a:hover {
    text-decoration-color: var(--text);
}

.hero > p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 520px;
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--text);
    color: var(--bg);
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: 6px;
    transition: background 0.2s;
}

.btn:hover {
    background: var(--text-light);
}

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

.about {
    background: var(--bg-alt);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: start;
}

.about-image {
    width: 100%;
    max-height: 280px;
    border-radius: 8px;
    object-fit: cover;
    object-position: top;
}

.about-text p {
    margin-bottom: 1rem;
    color: var(--text-light);
    line-height: 1.7;
}

.about-text a {
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: var(--border);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s;
}

.about-text a:hover {
    text-decoration-color: var(--text);
}

/* Intro section */
.intro {
    background: var(--bg);
}

/* My Story section */
.section-title {
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 2.5rem;
}

.about .about-content {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: stretch;
}

.about .about-text {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
}

.about .about-text p {
    margin: 0;
}

.journey {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.journey-item {
    padding: 1.25rem;
    background: var(--bg);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.journey-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.journey-text {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* Skills section */
.skills {
    background: var(--bg);
}

.skills-categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.skill-category {
    background: var(--bg-alt);
    padding: 1.5rem;
    border-radius: 8px;
}

.skill-category h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text);
}

.skill-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skill-item {
    font-size: 0.9rem;
    color: var(--text-light);
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.skill-item:last-child {
    border-bottom: none;
}

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

.projects {
    background: var(--bg);
}

.project-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s;
    text-decoration: none;
    display: block;
}

.project-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.project-image {
    height: auto;
    background: var(--bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 0.9rem;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-info {
    padding: 1.25rem;
}

.project-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.project-info p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.project-image span {
    color: var(--text-light);
}

.project-link {
    color: var(--text);
    font-size: 0.9rem;
}

.project-card:hover .project-link {
    text-decoration: underline;
}

.contact {
    text-align: center;
    background: var(--bg-alt);
}

.contact p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

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

.contact-links a {
    color: var(--text);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.contact-links a:hover {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .about-content,
    .about .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-image {
        max-width: 200px;
        margin: 0 auto;
    }

    .journey {
        gap: 1rem;
    }

    .skills-categories {
        grid-template-columns: 1fr;
    }

    section {
        padding: 4rem 1.5rem;
    }

    /* Mobile navigation */
    nav {
        flex-wrap: wrap;
        padding: 1rem 1.5rem;
    }

    .nav-toggle {
        display: block;
        order: 2;
        margin-left: auto;
        margin-right: 0.75rem;
    }

    .theme-toggle {
        order: 3;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        order: 4;
        gap: 0;
        padding-top: 1rem;
        margin-top: 1rem;
        border-top: 1px solid var(--border);
    }

    .nav-links.active {
        display: flex;
    }

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

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