@import "./styles.css";


:root{
    --h-title-color:#3948d2;
    --page-bg: #ffffff;
    --text-color: #1f2937;
    --surface-color: #ffffff;
    --surface-alt: #f5f7ff;
    --border-color: #d9deee;
    --section-light-start: #fcfcfc;
    --section-light-end: #ffffff;
    --section-gray-start: #f0f0f0;
    --section-gray-end: #f1f1f1;
    --top-overlay: rgba(0, 0, 0, 0.5);
    --link-color: #1e1e1e;
    --link-muted: #5b6477;
    --card-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

body {
    background-color: var(--page-bg);
    color: var(--text-color);
}

body.theme-dark {
    --h-title-color: #90a0ff;
    --page-bg: #111827;
    --text-color: #e5e7eb;
    --surface-color: #182235;
    --surface-alt: #0f172a;
    --border-color: #334155;
    --section-light-start: #111827;
    --section-light-end: #1f2937;
    --section-gray-start: #172033;
    --section-gray-end: #1a2438;
    --top-overlay: rgba(0, 0, 0, 0.65);
    --link-color: #dbeafe;
    --link-muted: #cbd5e1;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.header {
    border-bottom: solid 2px var(--bs-blue);
    z-index: 10000;
    background-color: var(--surface-color);
}

.bg-bottom {
    background-color: var(--h-title-color);
}

.top-section {
    position: relative;
    padding: 10rem 0;
    background-position: center;
    background-size: cover;
    height: 25rem;
}

.top-section h2 {
    font-weight: 400;
}

.resume-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.resume-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease-in-out;
}

.resume-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

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

.top-section:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--top-overlay);
}

section header h2{
    font-family: "Kanit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important;
    color: var(--h-title-color);
    font-size: 2.3rem;
    line-height: 4rem;
}

section .main-body{
    font-size: 1.3rem;
    font-weight: 200;
    line-height: 2.4rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.pub-list {
    list-style: disc;
    padding-left: 1.4rem;
    margin-bottom: 1.2rem;
}

.pub-list li {
    margin-bottom: 0.6rem;
}

.pub-link {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.6rem;
    margin-left: 0.4rem;
    border-radius: 999px;
    border: 1px solid var(--h-title-color);
    color: var(--h-title-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease-in-out;
}

.pub-link:hover {
    background: var(--h-title-color);
    color: #ffffff;
}

#home .main-body {
    padding-top: 1.2rem;
}

#home-subtitle {
    margin-top: 1.2rem;
}


.bg-gradient-primary-to-secondary-light {
    background: linear-gradient(45deg, var(--section-light-start), var(--section-light-end)) !important;
}

.bg-gradient-primary-to-secondary-gray {
    background: linear-gradient(45deg, var(--section-gray-start), var(--section-gray-end)) !important;
}



.on-top {
    position: relative;
    z-index: 10000;
}

.top-bg {
    background-position: center;
    background-size: fill;
    width: 100%;
    height: 100%;
}

.top-bg::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
}


#avatar {
    position: relative;
    height: 0;
    top:min(-65px,max(-100px,calc(-1*100vw/12)));
    max-width: 55em;
    margin: 0 1.5rem 0 0;
    float: right;
    z-index: 9000;
}

#avatar img {
    height: max(130px,min(200px,calc(100vw/6)));
    box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.2);
}

@media screen and (max-width: 991px) {
    #avatar {
        margin: 0;
    }
}

.lang-toggle {
    border: 1px solid var(--h-title-color);
    background: transparent;
    color: var(--h-title-color);
    font-size: 0.9rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    margin-left: 0.4rem;
    transition: all 0.2s ease-in-out;
}

.lang-toggle.is-active,
.lang-toggle:hover {
    background: var(--h-title-color);
    color: #ffffff;
}

.theme-fab {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 11000;
    border: 1px solid var(--h-title-color);
    background: var(--surface-color);
    color: var(--h-title-color);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    transition: all 0.2s ease-in-out;
}

.theme-fab:hover {
    background: var(--h-title-color);
    color: #ffffff;
}

@media screen and (max-width: 991px) {
    .theme-fab {
        right: 0.9rem;
        bottom: 0.9rem;
    }
}

.portfolio-embed {
    margin: 1.5rem 0;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface-color);
    box-shadow: var(--card-shadow);
}

.portfolio-embed iframe {
    display: block;
    width: 100%;
    height: min(75vh, 780px);
    border: none;
}

.portfolio-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.portfolio-links + h4 {
    margin-top: 1.5rem;
}

.portfolio-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--link-color);
    font-weight: 600;
    transition: all 0.2s ease-in-out;
}

.portfolio-links a:hover {
    border-color: var(--h-title-color);
    color: var(--h-title-color);
}

.highlight-blue {
    background-color: rgba(120, 190, 255, 0.35);
    border-radius: 0.35rem;
    padding: 0.05rem 0.35rem;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

body.theme-dark .navbar .nav-link,
body.theme-dark .navbar-brand {
    color: var(--text-color) !important;
}

body.theme-dark #mainNav {
    background-color: var(--surface-color);
    border-bottom: 2px solid var(--border-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
}

body.theme-dark #mainNav .navbar-toggler {
    border-color: var(--border-color);
    color: var(--text-color);
}

body.theme-dark #mainNav .navbar-toggler .bi-list {
    color: var(--text-color);
}

body.theme-dark #navbarResponsive {
    background-color: var(--surface-color);
}

body.theme-dark .theme-fab {
    border-color: var(--h-title-color);
    background: var(--surface-color);
    color: var(--h-title-color);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

body.theme-dark .main-body,
body.theme-dark .main-body p,
body.theme-dark .main-body li,
body.theme-dark .main-body strong,
body.theme-dark .main-body em {
    color: var(--text-color);
}

body.theme-dark .main-body a {
    color: var(--link-color);
}

body.theme-dark .text-white-50.small {
    color: var(--link-muted) !important;
}

body.theme-dark #github-link,
body.theme-dark #license-link {
    color: #e2e8f0;
}


