:root {
    --primary-color: #0d47a1;
    --secondary-color: #1976d2;
    --background-color: #f4f7f9;
    --text-color: #333;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
}

body {
    font-family: 'Lato', sans-serif;
    line-height: 1.6;
    background-color: var(--background-color);
    background-image: linear-gradient(to bottom, #ffffff, #f4f7f9);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: color 0.3s;
}

a:hover {
    color: var(--primary-color);
}

h1,
h2,
h3 {
    font-weight: 700;
}

h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 2.5rem;
    text-align: center;
}

h3 {
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
}

ul {
    list-style: none;
}

header {
    background: var(--white);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 100;
    border-bottom: 1px solid #e0e0e0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
}

nav .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

nav ul {
    display: flex;
}

nav ul li a {
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    font-weight: 700;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

nav ul li a:hover {
    color: var(--primary-color);
    border-bottom-color: var(--secondary-color);
}

nav ul li a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

main {
    flex-grow: 1;
    padding: 4rem 2rem;
    display: grid;
    place-items: center;
    width: 100%;
}

main.intro-page {
    padding: 0;
    min-height: calc(100vh - 150px);
    display: flex;
    align-items: center;
    justify-content: center;
}

section {
    background: var(--white);
    padding: 3rem 4rem;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 1200px;
}

#intro {
    box-shadow: none;
    background: none;
    text-align: center;
}

.profile-pic {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--primary-color);
    margin-bottom: 1.5rem;
}

#intro h1 {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

#intro h2 {
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

#intro .subtitle {
    font-size: 1.2rem;
    font-weight: 300;
}

.about-flex {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.about-text {
    flex: 2;
}

.about-details {
    flex: 1;
    background: var(--background-color);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 5px solid var(--primary-color);
}

.timeline {
    max-width: 800px;
    margin: 0 auto;
}

.timeline-content {
    padding: 20px 30px;
    background-color: var(--background-color);
    border-radius: 6px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    background: var(--background-color);
    padding: 2rem;
    border-radius: 8px;
    border-bottom: 5px solid var(--secondary-color);
}

.contact-intro {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.letter-container {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
}

.letter-header {
    margin-bottom: 2rem;
}

.sender-address,
.recipient-address,
.letter-date {
    margin-bottom: 1.5rem;
}

.letter-subject {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.letter-container p {
    margin-bottom: 1rem;
}

.letter-closing {
    margin-top: 2rem;
}

.signature {
    max-width: 150px;
    margin-bottom: -0.5rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

footer {
    text-align: center;
    padding: 1rem;
    background: var(--primary-color);
    color: var(--white);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    section {
        padding: 2rem;
    }
    nav {
        flex-direction: column;
        align-items: center;
        padding: 1rem;
    }
    nav .logo {
        margin-bottom: 1rem;
    }
    nav ul {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    nav ul li {
        margin: 0.5rem 0;
        width: 100%;
        text-align: center;
    }
    main {
        padding: 2rem 1rem;
    }
    .about-flex,
    .contact-grid {
        flex-direction: column;
        grid-template-columns: 1fr;
    }
}