:root {
    --bg: #08111f;
    --bg-soft: #0e1a2f;
    --surface: rgba(12, 22, 39, 0.72);
    --surface-strong: rgba(17, 31, 54, 0.92);
    --surface-border: rgba(154, 179, 255, 0.16);
    --text: #ecf2ff;
    --muted: #a9b7d0;
    --heading: #f8fbff;
    --accent: #79a8ff;
    --accent-strong: #8d68ff;
    --accent-warm: #ff9f6e;
    --shadow: 0 24px 80px rgba(4, 10, 20, 0.45);
    --sidebar-width: 20rem;
    --radius-lg: 2rem;
    --radius-md: 1.25rem;
    --radius-sm: 0.95rem;
    --grid-line: rgba(255, 255, 255, 0.05);
}

body.light-theme {
    --bg: #f3f6fc;
    --bg-soft: #eaf0fb;
    --surface: rgba(255, 255, 255, 0.86);
    --surface-strong: rgba(255, 255, 255, 0.96);
    --surface-border: rgba(72, 98, 168, 0.14);
    --text: #23314f;
    --muted: #5c6883;
    --heading: #0c1630;
    --accent: #3b63ff;
    --accent-strong: #6f4cff;
    --accent-warm: #ff7c47;
    --shadow: 0 24px 60px rgba(35, 49, 79, 0.12);
    --grid-line: rgba(34, 58, 112, 0.06);
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: "Manrope", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(121, 168, 255, 0.16), transparent 32%),
        radial-gradient(circle at bottom right, rgba(255, 159, 110, 0.12), transparent 28%),
        linear-gradient(180deg, var(--bg-soft), var(--bg));
    color: var(--text);
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 90px 90px;
    mask-image: radial-gradient(circle at center, black, transparent 82%);
    pointer-events: none;
    z-index: -2;
}

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

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea {
    font: inherit;
}

button {
    border: none;
    background: none;
    cursor: pointer;
}

.page-shell {
    display: flex;
    min-height: 100vh;
}

.side-menu {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.25rem;
    background: var(--surface-strong);
    backdrop-filter: blur(24px);
    border-right: 1px solid var(--surface-border);
    z-index: 20;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(121, 168, 255, 0.35) transparent;
}

.side-menu::-webkit-scrollbar {
    width: 0.45rem;
}

.side-menu::-webkit-scrollbar-thumb {
    background: rgba(121, 168, 255, 0.35);
    border-radius: 999px;
}

.side-menu::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-top,
.brand-mark,
.social-icons,
.soft-skill,
.skill-label-row,
.project-links,
.hero-actions,
.hero-highlights,
.contact-points div,
.detail-item,
.timeline-card,
.image-text-column,
.section-heading,
.sidebar-footer,
.navigation-bar a,
.highlight-chip {
    display: flex;
    align-items: center;
}

.sidebar-top {
    justify-content: space-between;
}

.brand-mark {
    gap: 0.75rem;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.brand-dot {
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-warm));
    box-shadow: 0 0 24px rgba(121, 168, 255, 0.6);
}

.theme-toggle,
.menu-toggle,
.icon-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.theme-toggle {
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 999px;
    color: var(--heading);
    background: var(--surface);
    border: 1px solid var(--surface-border);
}

.theme-toggle:hover,
.menu-toggle:hover,
.icon-container:hover {
    transform: translateY(-2px);
}

.profile-card,
.glass-card,
.hero-card,
.contact-form,
.custom-modal .modal-contented {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
}

.profile-card {
    padding: 1.4rem;
    border-radius: var(--radius-lg);
}

.profile-img {
    width: 6.8rem;
    aspect-ratio: 1;
    margin-bottom: 1rem;
    border-radius: 1.6rem;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(121, 168, 255, 0.2), rgba(255, 159, 110, 0.18));
}

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

.eyebrow,
.section-kicker,
.chip-label,
.stat-label,
.timeline-year,
.project-tag {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.72rem;
}

.eyebrow,
.section-kicker,
.chip-label,
.stat-label,
.timeline-year {
    color: var(--muted);
}

.profile-card h1 {
    margin: 0.45rem 0 0.65rem;
    color: var(--heading);
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.9rem;
    line-height: 1.05;
}

.profile-socials {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.profile-summary,
.sidebar-note,
.hero-description,
.about-story p,
.timeline-card p,
.project-body p,
.resume-copy p,
.contact-copy p,
.contact-points span,
.form-status {
    color: var(--muted);
    line-height: 1.75;
}

.sidebar-note {
    padding-top: 0.75rem;
}

.navigation-bar {
    display: grid;
    gap: 0.45rem;
    margin-top: 0.5rem;
}

.navigation-bar a {
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 1rem;
    color: var(--muted);
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.navigation-bar a i {
    width: 1rem;
}

.navigation-bar a:hover,
.navigation-bar a.active {
    color: var(--heading);
    background: rgba(121, 168, 255, 0.12);
    transform: translateX(4px);
}

.social-icons {
    gap: 0.75rem;
}

.icon-container {
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    color: var(--heading);
}

.main-content {
    width: calc(100% - var(--sidebar-width));
    margin-left: var(--sidebar-width);
}

section {
    position: relative;
    min-height: 100vh;
    padding: 5.5rem 4.5rem;
}

.hero-section {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 2.5rem;
    align-items: center;
}

.hero-copy,
.hero-visual,
.about-grid,
.skills-layout,
.contact-layout,
.resume-panel,
.projects-container,
.timeline {
    position: relative;
    z-index: 1;
}

.hero-copy h2,
.section-heading h2 {
    font-family: "Space Grotesk", sans-serif;
    color: var(--heading);
    letter-spacing: -0.05em;
}

.hero-copy h2 {
    max-width: 12ch;
    margin: 0.8rem 0 1rem;
    font-size: clamp(3rem, 5vw, 5.2rem);
    line-height: 0.98;
}

.hero-copy h2 span {
    background: linear-gradient(135deg, var(--accent), var(--accent-warm));
    -webkit-background-clip: text;
    color: transparent;
}

.hero-description {
    max-width: 36rem;
    font-size: 1.05rem;
}

.hero-actions,
.hero-highlights,
.project-links,
.contact-points {
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-actions {
    margin: 2rem 0;
}

.primary-btn,
.ghost-btn,
.outline,
.send-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.95rem 1.4rem;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
    text-align: center;
}

.primary-btn,
.send-btn {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #fdfdff;
    box-shadow: 0 16px 30px rgba(89, 112, 255, 0.28);
}

.ghost-btn,
.outline {
    border: 1px solid var(--surface-border);
    background: rgba(255, 255, 255, 0.02);
    color: var(--heading);
}

.primary-btn:hover,
.ghost-btn:hover,
.outline:hover,
.send-btn:hover {
    transform: translateY(-2px);
}

.send-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

.highlight-chip {
    gap: 0.9rem;
    padding: 1rem 1.15rem;
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--surface-border);
    min-height: 4.35rem;
    align-items: center;
}

.highlight-chip strong {
    color: var(--heading);
}

.highlight-chip .typing {
    display: inline-block;
    min-width: 18ch;
    line-height: 1.25;
}

.hero-visual {
    min-height: 34rem;
    display: grid;
    place-items: center;
}

.hero-card {
    position: absolute;
    border-radius: 1.6rem;
}

.portrait-card {
    width: min(100%, 28rem);
    padding: 1rem;
    transform: rotate(-4deg);
    animation: floatCard 7s ease-in-out infinite;
}

.portrait-card img {
    width: 100%;
    border-radius: 1.25rem;
}

.stat-card {
    padding: 1rem 1.15rem;
    max-width: 14rem;
}

.stat-card strong {
    color: var(--heading);
    line-height: 1.4;
}

.top-card {
    top: 2rem;
    right: 0;
    animation: floatCard 5.8s ease-in-out infinite;
}

.bottom-card {
    bottom: 2rem;
    left: 0;
    animation: floatCard 6.6s ease-in-out infinite reverse;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(18px);
    opacity: 0.75;
}

.orb-one {
    top: 3rem;
    left: 1rem;
    width: 10rem;
    height: 10rem;
    background: radial-gradient(circle, rgba(121, 168, 255, 0.48), transparent 68%);
}

.orb-two {
    right: 1rem;
    bottom: 3rem;
    width: 12rem;
    height: 12rem;
    background: radial-gradient(circle, rgba(255, 159, 110, 0.32), transparent 68%);
}

.content-section {
    display: grid;
    gap: 2rem;
}

.section-heading {
    justify-content: space-between;
    gap: 2rem;
}

.section-heading h2 {
    max-width: 16ch;
    font-size: clamp(2rem, 3vw, 3.2rem);
    line-height: 1.05;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.9fr 0.9fr;
    gap: 1.5rem;
}

.glass-card {
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.about-story {
    display: grid;
    align-content: center;
    gap: 1rem;
}

.about-visual {
    display: grid;
    place-items: center;
    min-height: 25rem;
}

.about-visual img {
    max-height: 23rem;
    object-fit: contain;
}

.about-details {
    display: grid;
    gap: 1rem;
    align-content: center;
}

.detail-item {
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--surface-border);
}

.detail-item span {
    color: var(--muted);
}

.detail-item strong,
.project-body h3,
.timeline-card h3,
.contact-copy h3,
.soft-skills-icons h3,
.tools-container h3,
.modal-contented h3,
.modal-contented h4 {
    color: var(--heading);
}

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

.timeline-card {
    gap: 1rem;
    padding: 1.4rem 1.5rem;
    border-radius: var(--radius-lg);
}

.timeline-icon {
    width: 4.5rem;
    height: 4.5rem;
    flex-shrink: 0;
    border-radius: 1.3rem;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(121, 168, 255, 0.16), rgba(255, 159, 110, 0.14));
}

.timeline-icon img {
    width: 2.5rem;
    height: 2.5rem;
}

.skills-layout {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 1.5rem;
}

.skills-panel,
.soft-skills-icons,
.tools-container {
    display: grid;
    gap: 1rem;
}

.skill {
    display: grid;
    gap: 0.7rem;
}

.skill-label-row {
    justify-content: space-between;
    gap: 1rem;
}

.skill-label-row p,
.skill-label-row span {
    color: var(--heading);
    font-weight: 700;
}

.language-icons,
.inline-skill-icon {
    margin-right: 0.75rem;
}

.inline-skill-icon {
    width: 1rem;
    display: inline-block;
    vertical-align: middle;
}

.skill-bar {
    height: 0.72rem;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
}

.skill-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), var(--accent-warm));
    transition: width 1.3s ease;
}

.skills-side {
    display: grid;
    gap: 1.5rem;
}

.soft-skill {
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--surface-border);
}

.soft-skill span {
    flex: 1;
}

.soft-skill strong {
    text-align: right;
}

.soft-skill i,
.contact-points i {
    color: var(--accent);
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.image-text-column {
    flex-direction: column;
    justify-content: center;
    gap: 0.7rem;
    padding: 1rem;
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, 0.03);
    text-align: center;
}

.image-text-column img {
    width: 3.2rem;
    height: 3.2rem;
    object-fit: contain;
}

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

.project-card {
    overflow: hidden;
    padding: 1rem;
}

.project-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: contain;
    border-radius: 1.3rem;
    background: linear-gradient(135deg, rgba(121, 168, 255, 0.08), rgba(255, 159, 110, 0.08));
    padding: 1.25rem;
}

.project-body {
    padding: 1rem 0.35rem 0.25rem;
}

.project-tag {
    display: inline-block;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(121, 168, 255, 0.12);
    color: var(--accent);
    margin-bottom: 0.85rem;
}

.project-body h3 {
    margin-bottom: 0.6rem;
    font-size: 1.4rem;
}

.disabled-link {
    opacity: 0.55;
    pointer-events: none;
}

.resume-panel {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 1.5rem;
    align-items: center;
}

.resume-copy {
    display: grid;
    gap: 1.3rem;
}

.resume-preview {
    display: grid;
    place-items: center;
}

.resume-preview img {
    width: min(100%, 27rem);
    border-radius: 1.4rem;
    border: 1px solid var(--surface-border);
}

.contact-layout {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 1.5rem;
}

.contact-copy,
.contact-form {
    border-radius: var(--radius-lg);
    padding: 1.6rem;
}

.contact-copy {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.contact-points {
    display: grid;
}

.contact-points div {
    gap: 0.9rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--surface-border);
}

.input-group {
    margin-bottom: 1rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--heading);
    font-weight: 700;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 0.95rem 1rem;
    border-radius: 1rem;
    border: 1px solid var(--surface-border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    outline: none;
    transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.input-group input::placeholder,
.input-group textarea::placeholder {
    color: var(--muted);
}

.input-group input:focus,
.input-group textarea:focus {
    border-color: rgba(121, 168, 255, 0.7);
    background: rgba(255, 255, 255, 0.05);
}

.form-status {
    min-height: 1.5rem;
    margin-top: 0.9rem;
}

.custom-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(3, 8, 16, 0.72);
    z-index: 50;
}

.custom-modal.show {
    display: flex;
}

.modal-contented {
    position: relative;
    width: min(100%, 44rem);
    max-height: 88vh;
    overflow-y: auto;
    padding: 1.8rem;
    border-radius: 1.8rem;
}

.modal-contented h3 {
    margin: 0.8rem 0 1rem;
    font-size: 2rem;
}

.modal-contented h4 {
    margin: 1.25rem 0 0.6rem;
}

.modal-contented p,
.modal-contented li {
    color: var(--muted);
    line-height: 1.75;
}

.modal-img-container {
    margin: 1rem 0 1.25rem;
}

.modal-img-container img {
    width: 9rem;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1.1rem;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--heading);
    font-size: 1.6rem;
}

.menu-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 30;
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    background: var(--surface-strong);
    color: var(--heading);
    border: 1px solid var(--surface-border);
    display: none;
}

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}

@keyframes floatCard {
    0%, 100% {
        transform: translateY(0) rotate(-4deg);
    }
    50% {
        transform: translateY(-10px) rotate(-2deg);
    }
}
