@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg-color: #f7f8fb;
    --surface-color: #ffffff;
    --surface-soft: #eef2f8;
    --text-color: #172033;
    --muted-color: #667085;
    --main-color: #1d4ed8;
    --main-dark: #123a9c;
    --border-color: #d8dee9;
    --white-color: #ffffff;
    --shadow-color: rgba(15, 23, 42, 0.10);
    --card-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

.dark-mode {
    --bg-color: #0c1222;
    --surface-color: #111827;
    --surface-soft: #172033;
    --text-color: #f9fafb;
    --muted-color: #b7c0d1;
    --main-color: #60a5fa;
    --main-dark: #3b82f6;
    --border-color: #243044;
    --white-color: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.40);
    --card-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
}

html {
    font-size: 62.5%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

section {
    padding: 10rem 8% 8rem;
}

span {
    color: var(--main-color);
}

/* HEADER */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 8%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(247, 248, 251, 0.86);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid transparent;
    z-index: 1000;
    transition: 0.25s ease;
}

.dark-mode .header {
    background: rgba(12, 18, 34, 0.86);
}

.header.sticky {
    border-bottom-color: var(--border-color);
    box-shadow: 0 10px 35px var(--shadow-color);
}

.logo {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-color);
    letter-spacing: -0.04em;
}

.navbar {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.navbar a {
    position: relative;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--muted-color);
    transition: 0.25s ease;
}

.navbar a:hover,
.navbar a.active {
    color: var(--main-color);
}

.navbar a.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.8rem;
    width: 100%;
    height: 0.2rem;
    border-radius: 999px;
    background: var(--main-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.8rem;
}

#theme-toggle,
#menu-icon {
    font-size: 2.6rem;
    color: var(--text-color);
    cursor: pointer;
}

#menu-icon {
    display: none;
}

/* HERO */

.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    align-items: center;
    gap: 6rem;
    padding-top: 14rem;
}

.hero-content {
    max-width: 72rem;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 1.6rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--main-color);
    text-transform: uppercase;
    letter-spacing: 0.13em;
}

.hero h1 {
    font-size: clamp(4.4rem, 6vw, 7.4rem);
    line-height: 0.95;
    letter-spacing: -0.07em;
    color: var(--text-color);
    margin-bottom: 2.4rem;
}

.hero-description {
    max-width: 64rem;
    font-size: 1.8rem;
    line-height: 1.75;
    color: var(--muted-color);
}

.hero-buttons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.4rem;
    margin-top: 3.2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1.25rem 2.2rem;
    border-radius: 999px;
    font-size: 1.55rem;
    font-weight: 800;
    transition: 0.25s ease;
    cursor: pointer;
}

.btn-primary {
    color: var(--white-color);
    background: var(--main-color);
    box-shadow: 0 14px 25px rgba(29, 78, 216, 0.22);
}

.btn-primary:hover {
    background: var(--main-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    color: var(--text-color);
    background: var(--surface-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--main-color);
    color: var(--main-color);
    transform: translateY(-2px);
}

.social-links {
    display: flex;
    gap: 1.2rem;
    margin-top: 3rem;
}

.social-links a {
    width: 4.4rem;
    height: 4.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 2.2rem;
    transition: 0.25s ease;
}

.social-links a:hover {
    background: var(--main-color);
    color: var(--white-color);
    border-color: var(--main-color);
    transform: translateY(-3px);
}

.hero-card {
    position: relative;
    justify-self: end;
    width: min(100%, 43rem);
}

.portrait-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 3rem;
    background: var(--surface-soft);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

.portrait-wrapper img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.hero-info-card {
    position: absolute;
    left: -4rem;
    bottom: 3rem;
    max-width: 29rem;
    padding: 1.8rem;
    border-radius: 2rem;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
}

.dark-mode .hero-info-card {
    background: rgba(17, 24, 39, 0.88);
}

.hero-info-card span {
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.hero-info-card strong {
    display: block;
    margin-top: 0.5rem;
    font-size: 1.7rem;
}

.hero-info-card p {
    margin-top: 0.5rem;
    font-size: 1.35rem;
    color: var(--muted-color);
    line-height: 1.5;
}

/* GLOBAL SECTIONS */

.section {
    min-height: auto;
}

.section-header {
    max-width: 78rem;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: clamp(3.4rem, 4vw, 5.2rem);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.secondary-header {
    margin-top: 7rem;
}

/* ABOUT */

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

.about-text {
    padding: 3rem;
    border-radius: 2.4rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
}

.about-text p {
    font-size: 1.7rem;
    line-height: 1.85;
    color: var(--muted-color);
}

.about-text p + p {
    margin-top: 2rem;
}

.about-highlights {
    display: grid;
    gap: 1.8rem;
}

.highlight-card,
.skill-card,
.project-card,
.timeline-content,
.education-card,
.contact-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
}

.highlight-card {
    padding: 2.4rem;
    border-radius: 2.2rem;
}

.highlight-card i {
    font-size: 3.4rem;
    color: var(--main-color);
    margin-bottom: 1.4rem;
}

.highlight-card h3 {
    font-size: 2rem;
    margin-bottom: 0.8rem;
}

.highlight-card p {
    font-size: 1.55rem;
    line-height: 1.65;
    color: var(--muted-color);
}

/* SKILLS */

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

.skill-card {
    padding: 2.4rem;
    border-radius: 2.2rem;
}

.skill-card h3 {
    font-size: 1.9rem;
    margin-bottom: 1.2rem;
}

.skill-card p {
    font-size: 1.5rem;
    line-height: 1.7;
    color: var(--muted-color);
    margin-bottom: 1.8rem;
}

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

.skill-tags span {
    display: inline-flex;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--text-color);
    font-size: 1.25rem;
    font-weight: 700;
}

.skill-card.wide {
    grid-column: span 2;
}

/* PROJECTS */

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

.small-projects {
    margin-top: 0;
}

.project-card {
    position: relative;
    padding: 2.6rem;
    border-radius: 2.4rem;
    overflow: hidden;
}

.project-icon {
    width: 5.8rem;
    height: 5.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1.8rem;
    background: var(--surface-soft);
    color: var(--main-color);
    font-size: 3rem;
    margin-bottom: 2rem;
}

.project-tag {
    display: inline-flex;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--main-color);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.project-card h3 {
    font-size: 2.2rem;
    line-height: 1.25;
    margin-bottom: 1.2rem;
}

.project-card p {
    font-size: 1.55rem;
    line-height: 1.75;
    color: var(--muted-color);
}

.tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 2rem;
}

.tech-list span {
    display: inline-flex;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--text-color);
    font-size: 1.25rem;
    font-weight: 700;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1.6rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--muted-color);
}

.project-link i {
    font-size: 1.6rem;
}

.project-link:hover {
    color: var(--main-color);
}

/* EXPERIENCE */

.timeline {
    display: grid;
    gap: 2.4rem;
}

.timeline-item {
    display: grid;
    grid-template-columns: 18rem 1fr;
    gap: 2rem;
}

.timeline-date {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--main-color);
    padding-top: 2.4rem;
}

.timeline-content {
    padding: 2.6rem;
    border-radius: 2.4rem;
}

.timeline-content h3 {
    font-size: 2.2rem;
    margin-bottom: 0.4rem;
}

.company {
    font-size: 1.45rem;
    color: var(--muted-color);
    font-weight: 700;
    margin-bottom: 1.6rem;
}

.timeline-content ul {
    display: grid;
    gap: 1rem;
}

.timeline-content li {
    position: relative;
    padding-left: 1.8rem;
    font-size: 1.5rem;
    line-height: 1.65;
    color: var(--muted-color);
}

.timeline-content li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.9rem;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    background: var(--main-color);
}

/* EDUCATION */

.education-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 2rem;
}

.education-card {
    padding: 2.6rem;
    border-radius: 2.4rem;
}

.education-card.main-education {
    grid-row: span 1;
}

.education-date {
    display: inline-flex;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--main-color);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.education-card h3 {
    font-size: 2.1rem;
    line-height: 1.25;
    margin-bottom: 0.8rem;
}

.education-school {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--muted-color);
    margin-bottom: 1.4rem;
}

.education-card p {
    font-size: 1.5rem;
    line-height: 1.7;
    color: var(--muted-color);
}

/* CONTACT */

.contact {
    padding-bottom: 10rem;
}

.contact-card {
    max-width: 95rem;
    margin: 0 auto;
    text-align: center;
    padding: 5rem;
    border-radius: 3rem;
}

.contact-card h2 {
    font-size: clamp(3.2rem, 4vw, 5rem);
    line-height: 1.08;
    letter-spacing: -0.05em;
    margin-bottom: 1.8rem;
}

.contact-card p {
    max-width: 68rem;
    margin: 0 auto;
    font-size: 1.7rem;
    line-height: 1.75;
    color: var(--muted-color);
}

.contact-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.4rem;
    margin-top: 3rem;
}

.contact-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 2.6rem;
}

.contact-links a {
    color: var(--muted-color);
    font-size: 1.45rem;
    font-weight: 700;
    transition: 0.25s ease;
}

.contact-links a:hover {
    color: var(--main-color);
}

/* FOOTER */

.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2.6rem 8%;
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
}

.footer p {
    font-size: 1.4rem;
    color: var(--muted-color);
}

.back-to-top {
    width: 4rem;
    height: 4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--main-color);
    color: var(--white-color);
    font-size: 2.4rem;
    transition: 0.25s ease;
}

.back-to-top:hover {
    background: var(--main-dark);
    transform: translateY(-3px);
}

/* RESPONSIVE */

@media (max-width: 1200px) {
    html {
        font-size: 58%;
    }

    section,
    .header,
    .footer {
        padding-left: 5%;
        padding-right: 5%;
    }

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

    .skill-card.wide {
        grid-column: span 2;
    }

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

@media (max-width: 980px) {
    #menu-icon {
        display: block;
    }

    .navbar {
        position: absolute;
        top: 100%;
        left: 5%;
        right: 5%;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 1.5rem;
        border-radius: 1.6rem;
        background: var(--surface-color);
        border: 1px solid var(--border-color);
        box-shadow: var(--card-shadow);
    }

    .navbar.active {
        display: flex;
    }

    .navbar a {
        width: 100%;
        padding: 1.3rem;
        border-radius: 1rem;
    }

    .navbar a:hover,
    .navbar a.active {
        background: var(--surface-soft);
    }

    .navbar a.active::after {
        display: none;
    }

    .hero {
        grid-template-columns: 1fr;
        padding-top: 13rem;
        text-align: center;
    }

    .hero-description {
        margin: 0 auto;
    }

    .hero-buttons,
    .social-links {
        justify-content: center;
    }

    .hero-card {
        justify-self: center;
        max-width: 40rem;
    }

    .hero-info-card {
        left: 50%;
        bottom: -3rem;
        transform: translateX(-50%);
        width: 90%;
    }

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

    .projects-grid,
    .small-projects {
        grid-template-columns: 1fr;
    }

    .timeline-item {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .timeline-date {
        padding-top: 0;
    }
}

@media (max-width: 640px) {
    html {
        font-size: 54%;
    }

    section {
        padding-top: 8rem;
        padding-bottom: 6rem;
    }

    .header {
        padding-top: 1.6rem;
        padding-bottom: 1.6rem;
    }

    .logo {
        font-size: 2rem;
    }

    .hero {
        padding-top: 11rem;
    }

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

    .skill-card.wide {
        grid-column: span 1;
    }

    .contact-card {
        padding: 3rem 2rem;
    }

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

@media (max-width: 420px) {
    .hero-buttons,
    .contact-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
    }
}