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

:root {
    color-scheme: light;
    --page: #f7f8fc;
    --surface: #ffffff;
    --surface-raised: #ffffff;
    --text: #172033;
    --muted: #647087;
    --border: #e3e7ef;
    --accent: #6957e8;
    --accent-hover: #5543d0;
    --accent-soft: #eeebff;
    --shadow: 0 16px 42px rgba(27, 35, 57, 0.08);
    --nav-shadow: 0 6px 24px rgba(27, 35, 57, 0.06);
    font-family: 'DM Sans', sans-serif;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --page: #10131d;
    --surface: #191e2b;
    --surface-raised: #202636;
    --text: #edf0f7;
    --muted: #a4aec1;
    --border: #30384a;
    --accent: #a497ff;
    --accent-hover: #b7adff;
    --accent-soft: #292644;
    --shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
    --nav-shadow: 0 6px 24px rgba(0, 0, 0, 0.16);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --page: #10131d;
        --surface: #191e2b;
        --surface-raised: #202636;
        --text: #edf0f7;
        --muted: #a4aec1;
        --border: #30384a;
        --accent: #a497ff;
        --accent-hover: #b7adff;
        --accent-soft: #292644;
        --shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
        --nav-shadow: 0 6px 24px rgba(0, 0, 0, 0.16);
    }
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

body {
    min-width: 320px;
    margin: 0;
    background: var(--page);
    color: var(--text);
    font-size: 1rem;
    line-height: 1.65;
    transition: background-color 200ms ease, color 200ms ease;
}

body, button, a {
    font-family: 'DM Sans', sans-serif;
}

img, video {
    max-width: 100%;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

a:hover {
    color: var(--accent-hover);
}

a:focus-visible, button:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
}

p {
    margin: 0;
    color: var(--muted);
}

h1, h2, h3 {
    margin-top: 0;
    color: var(--text);
    font-family: 'Manrope', sans-serif;
    line-height: 1.2;
}

h1, h2 {
    letter-spacing: -0.035em;
}

nav {
    position: relative;
    z-index: 5;
    display: flex;
    width: min(100% - 2rem, 76rem);
    min-height: 4.5rem;
    align-items: center;
    justify-content: space-between;
    margin: 0 auto;
}

#desktop-nav {
    display: none;
}

#hamburger-nav {
    position: sticky;
    top: 0;
    min-height: 4.25rem;
    padding: 0.5rem 0;
    background: color-mix(in srgb, var(--page) 90%, transparent);
    backdrop-filter: blur(14px);
}

.logo {
    color: var(--text);
    font-family: 'Manrope', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

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

.theme-toggle {
    display: inline-flex;
    min-height: 2.65rem;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

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

.theme-toggle-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.hamburger-menu {
    position: relative;
}

.hamburger-icon {
    display: flex;
    width: 2.65rem;
    height: 2.65rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    cursor: pointer;
}

.hamburger-icon span {
    width: 1rem;
    height: 2px;
    border-radius: 2px;
    background: var(--text);
    transition: transform 180ms ease, opacity 180ms ease;
}

.hamburger-icon.open span:first-child {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-icon.open span:nth-child(2) {
    opacity: 0;
}

.hamburger-icon.open span:last-child {
    transform: translateY(-7px) rotate(-45deg);
}

.menu-links {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    width: 13rem;
    padding: 0 1rem;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 1rem;
    background: var(--surface);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-0.4rem);
    transition: max-height 180ms ease, opacity 180ms ease, transform 180ms ease, padding 180ms ease;
    max-height: 0;
}

.menu-links.open {
    max-height: 20rem;
    padding: 0.5rem 1rem;
    border-color: var(--border);
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.menu-links ul, .nav-links {
    margin: 0;
    padding: 0;
    list-style: none;
}

.menu-links a {
    display: block;
    padding: 0.65rem 0.35rem;
    color: var(--text);
    font-weight: 600;
}

.menu-links a:hover {
    color: var(--accent);
}

main {
    overflow: clip;
}

section {
    position: relative;
    width: min(100% - 2rem, 70rem);
    margin: 0 auto;
    padding: 4.5rem 0;
    scroll-margin-top: 4.5rem;
}

.section__text__p1 {
    margin-bottom: 0.6rem;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-align: center;
    text-transform: uppercase;
}

.title {
    margin-bottom: 2rem;
    font-size: clamp(2rem, 8vw, 3.2rem);
    text-align: center;
}

#profile {
    display: flex;
    min-height: min(47rem, calc(100svh - 4.25rem));
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding-top: 2rem;
    padding-bottom: 4rem;
    text-align: center;
}

.section__pic-container {
    width: clamp(12rem, 62vw, 19rem);
    aspect-ratio: 1;
    overflow: hidden;
    border: 6px solid var(--surface);
    border-radius: 50%;
    background: var(--accent-soft);
    box-shadow: var(--shadow);
}

.section__pic-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 28%;
}

.section__text {
    max-width: 42rem;
}

#profile .section__text__p1 {
    margin-bottom: 0.4rem;
}

#profile .title {
    margin-bottom: 0.35rem;
    font-size: clamp(2.5rem, 11vw, 4.5rem);
}

.section__text__p2 {
    margin-bottom: 1.5rem;
    color: var(--muted);
    font-size: clamp(1.15rem, 4vw, 1.55rem);
    font-weight: 500;
}

.btn-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.btn {
    display: inline-flex;
    min-height: 2.9rem;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.1rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
}

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

.btn-color-1 {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.btn-color-1:hover {
    border-color: var(--accent-hover);
    background: var(--accent-hover);
    color: #fff;
}

.btn-color-2 {
    border-color: var(--border);
}

#social_media-container {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 1.4rem;
}

#social_media-container a {
    display: grid;
    width: 2.8rem;
    height: 2.8rem;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
}

#social_media-container a:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.icon {
    display: block;
    width: 1.5rem;
    height: 1.5rem;
    object-fit: contain;
}

.section-container {
    display: grid;
    gap: 1.5rem;
}

#about .section__pic-container {
    width: min(100%, 22rem);
    aspect-ratio: 4 / 3;
    justify-self: center;
    border: 0;
    border-radius: 1.5rem;
}

#about .section__pic-container img {
    object-position: center 35%;
}

.about-details-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
}

.about-containers {
    display: grid;
    gap: 1rem;
}

.details-container {
    min-width: 0;
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(27, 35, 57, 0.035);
    text-align: center;
    transition: border-color 180ms ease, transform 180ms ease, background-color 180ms ease;
}

.details-container h3 {
    margin: 0.45rem 0 0.25rem;
    font-size: 1.02rem;
}

.details-container .icon {
    margin: 0 auto;
}

.text-details {
    color: var(--muted);
    line-height: 1.8;
}

.experience-sub-title {
    margin-bottom: 1.25rem;
    color: var(--text);
    font-size: 1.2rem;
    font-weight: 700;
}

.experience-details-container {
    display: flex;
    flex-direction: column;
}

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

.article-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr));
    gap: 0.8rem;
}

article {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem;
    border-radius: 0.8rem;
    background: var(--page);
}

article .icon {
    width: 1.2rem;
    height: 1.2rem;
    flex: 0 0 auto;
}

article h3 {
    margin: 0;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
}

article p {
    font-size: 0.76rem;
}

#projects {
    width: min(100% - 2rem, 76rem);
}

#projects .about-containers {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
    align-items: stretch;
}

#projects .details-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
}

#projects .details-container:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}

#projects .article-container {
    width: min(100%, 18rem);
    max-height: 24rem;
    margin-inline: auto;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 0.9rem;
    background: var(--page);
}

#projects .project-img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.project-title {
    margin: 0.5rem 0;
    font-size: 1.15rem;
}

#projects .btn-container {
    margin-top: auto;
    padding-top: 0.5rem;
}

.project-btn {
    flex: 1;
    min-width: 6rem;
    font-size: 0.82rem;
}

.Contact-info-upper-container {
    display: grid;
    gap: 0.25rem;
    width: fit-content;
    max-width: 100%;
    margin: 1.5rem auto 0;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.contact-info-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0;
}

.contact-info-container p {
    overflow-wrap: anywhere;
}

.contact-icon {
    width: 1.5rem;
    height: 1.5rem;
    flex: 0 0 auto;
}

footer {
    width: min(100% - 2rem, 76rem);
    margin: 0 auto;
    padding: 2rem 0 1.5rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

footer .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1.25rem;
    margin-bottom: 1rem;
}

footer .nav-links a {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
}

footer p {
    font-size: 0.82rem;
}

.section-arrow {
    position: absolute;
    right: 0;
    bottom: 1rem;
    display: grid;
    width: 2.75rem;
    height: 2.75rem;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
}

.section-arrow:hover {
    border-color: var(--accent);
    transform: translateY(2px);
}

.section-arrow img {
    width: 1rem;
    height: 1rem;
    object-fit: contain;
}

:root[data-theme="dark"] .section-arrow img {
    filter: invert(1);
}

:root[data-theme="dark"] .icon {
    filter: invert(1);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .section-arrow img {
        filter: invert(1);
    }

    :root:not([data-theme="light"]) .icon {
        filter: invert(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
