/* -------- Root & Theme Tokens -------- */
:root {
    --bg-color: #0f131a;
    --text-color: #e9eef5;
    --card-bg: #141b24;
    --primary: #ff6b4a;
    --accent: #3bc9db;

    --bg-elev-1: color-mix(in oklab, var(--bg-color) 88%, white 12%);
    --ring: hsl(210 90% 60% / .4);
    --radius: 14px;
    --shadow-1: 0 10px 25px rgba(0, 0, 0, .25);
    --shadow-2: 0 1px 0 rgba(255, 255, 255, .05) inset;

    --step--1: clamp(.86rem, .80rem + .2vw, .95rem);
    --step-0: clamp(1rem, .95rem + .3vw, 1.125rem);
    --step-1: clamp(1.25rem, 1.1rem + .8vw, 1.5rem);
    --step-2: clamp(1.6rem, 1.3rem + 1.5vw, 2.25rem);
    --step-3: clamp(2.2rem, 1.8rem + 2.5vw, 3.5rem);
}

body.light {
    --bg-color: #fdfdfd;
    --text-color: #222;
    --card-bg: #f4f4f4;
    --primary: #e94e2b;
    --accent: #0099b8;

    --bg-elev-1: color-mix(in oklab, var(--bg-color) 92%, black 8%);
    --shadow-1: 0 10px 25px rgba(0, 0, 0, .08);
    --shadow-2: 0 1px 0 rgba(0, 0, 0, .03) inset;
}

body.auto {
    /* This class indicates auto mode is active */
}

/* -------- Global Styles -------- */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    margin: 0;
    padding: 0;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background 0.4s ease, color 0.4s ease;
    font-size: var(--step-0);
}

* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--primary);
    text-decoration: none;
}

.container {
    width: 92%;
    max-width: 1100px;
    margin: auto;
    padding: 60px 0;
}

section {
    margin-bottom: 120px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

section.show {
    opacity: 1;
    transform: translateY(0);
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    background: var(--card-bg);
    color: var(--text-color);
    padding: .6rem 1rem;
    border-radius: 6px;
}

.skip-link:focus {
    left: 1rem;
    top: 1rem;
    z-index: 10000;
    outline: 2px solid var(--primary);
}

/* -------- Typography -------- */
.hero h1,
.hero h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
}

h2 {
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    font-size: var(--step-2);
    display: flex;
    align-items: center;
    gap: .6rem;
}

.section-kicker {
    margin: 0 0 6px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-size: var(--step--1);
    color: color-mix(in oklab, var(--text-color) 70%, var(--primary) 30%);
}

h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: var(--step-1);
}

/* -------- Navbar -------- */
nav {
    position: sticky;
    top: 0;
    z-index: 998;
    backdrop-filter: blur(12px);
    background: transparent;
    padding: 24px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all .3s ease;
}

nav::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--bg-color);
    opacity: 0.7;
    z-index: -1;
}

body.light nav::before {
    opacity: 0.85;
}

.nav-logo {
    font-size: var(--step-1);
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -.02em;
    transition: transform .2s ease;
    cursor: pointer;
}

.nav-logo:hover {
    transform: scale(1.05);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 40px;
    margin: 0;
    padding: 0;
}

nav ul li a {
    display: block;
    color: color-mix(in oklab, var(--text-color) 80%, transparent);
    font-weight: 500;
    font-size: var(--step-0);
    padding: 8px 0;
    transition: all .3s ease;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width .3s ease;
}

nav ul li a:hover {
    color: var(--text-color);
}

nav ul li a:hover::after {
    width: 100%;
}

@media (max-width: 900px) {
    nav {
        padding: 20px 32px;
    }

    nav ul {
        gap: 24px;
    }

    nav ul li a {
        font-size: var(--step--1);
    }
}

@media (max-width: 600px) {
    nav {
        padding: 16px 24px;
    }

    nav ul {
        display: flex;
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--card-bg);
        flex-direction: column;
        gap: 0;
        padding: 20px 0;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
        border-bottom: 1px solid rgba(255, 255, 255, .06);
        opacity: 0;
        transform: translateY(-20px);
        pointer-events: none;
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    nav ul.mobile-open {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    nav ul li {
        width: 100%;
    }

    nav ul li a {
        padding: 16px 32px;
        display: block;
        font-size: var(--step-0);
    }

    nav ul li a::after {
        display: none;
    }
}

/* -------- Mobile Menu Toggle -------- */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    transition: transform .2s ease;
}

.mobile-menu-toggle:hover {
    transform: scale(1.1);
}

@media (max-width: 600px) {
    .mobile-menu-toggle {
        display: block;
    }
}

/* -------- Theme Toggle -------- */
.theme-toggle-fixed {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 999;
    background: var(--card-bg);
    border: 2px solid rgba(255, 255, 255, .08);
    border-radius: 50%;
    width: 56px;
    height: 56px;
    cursor: pointer;
    color: var(--text-color);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
}

.theme-toggle-fixed:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
    border-color: var(--primary);
}

.theme-toggle-fixed:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
}

.theme-toggle-fixed svg {
    width: 24px;
    height: 24px;
    transition: transform 0.4s ease, opacity 0.3s ease;
}

.theme-toggle-fixed.switching svg {
    transform: rotate(180deg);
}

.theme-toggle-fixed:hover svg {
    transform: scale(1.1);
}

/* Tooltip */
.theme-toggle-fixed::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: var(--card-bg);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.theme-toggle-fixed:hover::before {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 600px) {
    .theme-toggle-fixed {
        bottom: 24px;
        right: 24px;
        width: 50px;
        height: 50px;
    }

    .theme-toggle-fixed svg {
        width: 22px;
        height: 22px;
    }
}

/* -------- Hero -------- */
.hero {
    min-height: 70vh;
    color: white;
    position: relative;
    overflow: clip;
    isolation: isolate;
    background: #0f141c;
    padding: 60px 0;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 80px;
    width: 92%;
    max-width: 1100px;
    margin: 0 auto;
}

body.light .hero {
    background: #e8f3ff;
    color: #111;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hero-greeting {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 300;
    margin: 0;
    color: inherit;
    letter-spacing: -.02em;
}

.hero-name {
    font-size: clamp(2.6rem, 6.2vw, 4.8rem);
    font-weight: 800;
    margin: 0;
    background: linear-gradient(90deg, #ffffff, #f7b199 40%, #ff8c5c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.1;
    letter-spacing: -.01em;
}

body.light .hero-name {
    background: linear-gradient(90deg, #d94523, #e94e2b 50%, #c23d1f);
    -webkit-background-clip: text;
    background-clip: text;
}

.hero-title {
    font-size: var(--step-2);
    font-weight: 600;
    margin: 8px 0 0 0;
    color: color-mix(in oklab, white 90%, var(--primary) 10%);
}

body.light .hero-title {
    color: color-mix(in oklab, #222 85%, var(--primary) 15%);
}

.hero-description {
    font-size: var(--step-0);
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.7;
    max-width: 520px;
    margin: 16px 0 0 0;
}

body.light .hero-description {
    color: rgba(34, 34, 34, 0.75);
}

.hero-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image::before {
    content: "";
    position: absolute;
    inset: -120px;
    background: radial-gradient(circle at center, rgba(255, 107, 74, 0.28), transparent 65%),
        radial-gradient(circle at center, rgba(59, 201, 219, 0.22), transparent 70%);
    z-index: 0;
    pointer-events: none;
}

body.light .hero-image::before {
    background: radial-gradient(circle at center, rgba(255, 166, 130, 0.28), transparent 65%),
        radial-gradient(circle at center, rgba(59, 201, 219, 0.22), transparent 70%);
}

.hero-image-wrapper {
    position: relative;
    width: clamp(260px, 32vw, 370px);
    aspect-ratio: 1;
}

.hero-image-circle {
    position: absolute;
    inset: -24px;
    border: 3px solid var(--primary);
    border-radius: 50%;
    opacity: 0.32;
    animation: rotate 24s linear infinite;
    box-shadow: 0 0 40px rgba(255, 107, 74, 0.25);
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
    border: 3px solid var(--primary);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .6);
    position: relative;
    z-index: 1;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.hero-cta {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.hero-cta .btn {
    padding: 12px 28px;
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-secondary:hover {
    background: color-mix(in oklab, var(--primary) 10%, transparent);
    filter: brightness(1);
}

@media (max-width: 900px) {
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-description {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-cta {
        justify-content: center;
    }
}

/* -------- Stats -------- */
.stats {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-top: 20px;
}

.stat {
    background: var(--bg-elev-1);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 12px;
    padding: 10px 14px;
    min-width: 140px;
}

.stat .num {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: clamp(1.4rem, 1rem + 1vw, 2rem);
    line-height: 1;
}

.stat .label {
    opacity: .85;
    font-size: var(--step--1);
}

/* -------- Services / Tech Strip -------- */
.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 1.1fr;
    gap: 40px;
    align-items: start;
}

/* left vertical services list (removed – legacy styles retained for reference) */

/* right area stats row */
.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 18px;
}

.about-stats .stat {
    background: transparent;
    border: 0;
    padding: 0;
    min-width: auto;
}

.about-stats .num {
    font-size: clamp(1.8rem, 1.3rem + 1.8vw, 2.6rem);
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.about-stats .suffix {
    color: var(--primary);
    font-weight: 800;
}

.about-stats .label {
    opacity: .85;
    font-size: var(--step--1);
}

/* About + Skills two-column layout */
.about-skills {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    align-items: start;
}

@media (max-width: 900px) {
    .about-skills {
        grid-template-columns: 1fr;
    }
}

/* Technology category cards (removed) */

/* -------- Skills -------- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.skill-card {
    background: var(--bg-elev-1);
    padding: 20px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-2), var(--shadow-1);
    border: 1px solid rgba(255, 255, 255, .06);
    transition: transform .3s ease, box-shadow .3s ease;
}

.skill-card:hover {
    transform: translateY(-8px) rotateX(5deg) rotateY(5deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, .3), var(--shadow-2);
}

/* -------- Projects -------- */
.projects-toolbar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin: 14px 0 24px;
}

.chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chip {
    padding: .4rem .8rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: color-mix(in oklab, var(--bg-color) 70%, transparent);
    cursor: pointer;
    font-weight: 600;
    transition: all .2s ease;
}

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

.chip.is-active {
    outline: 2px solid var(--ring);
    border-color: color-mix(in oklab, var(--primary) 45%, transparent);
}

.search {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .35rem .6rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: color-mix(in oklab, var(--bg-color) 70%, transparent);
}

.search input {
    background: transparent;
    border: 0;
    outline: 0;
    color: var(--text-color);
    width: 220px;
}

/* Projects Grid */
.projects-list {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.project-card {
    display: grid;
    grid-template-columns: 1fr 320px;
    grid-template-rows: auto auto auto;
    align-items: start;
    gap: 32px;
    padding: 8px 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.project-card-text {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.project-card-tech {
    grid-column: 1;
    grid-row: 2;
    margin: 0;
}

.project-links {
    grid-column: 1;
    grid-row: 3;
}

.project-card-image {
    grid-column: 2;
    grid-row: 1 / -1;
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    background: linear-gradient(135deg, color-mix(in oklab, var(--primary) 20%, transparent), transparent);
    transition: transform .35s ease, box-shadow .35s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .28);
    justify-self: end;
    align-self: center;
    display: block;
}

.project-card-image:hover {
    transform: translateY(-6px) rotateX(2deg) rotateY(-3deg) scale(1.02);
    box-shadow: 0 16px 30px rgba(255, 107, 74, 0.4), 0 8px 20px rgba(0, 0, 0, .32);
}

.project-card:nth-child(even) {
    grid-template-columns: 320px 1fr;
}

.project-card:nth-child(even) .project-card-text {
    grid-column: 2;
}

.project-card:nth-child(even) .project-card-tech {
    grid-column: 2;
}

.project-card:nth-child(even) .project-links {
    grid-column: 2;
}

.project-card:nth-child(even) .project-card-image {
    grid-column: 1;
    grid-row: 1 / -1;
    justify-self: start;
}

.project-card h3 {
    margin: 0;
    text-align: left;
    letter-spacing: -.01em;
}

.project-card-text p {
    text-align: left;
    margin: 0;
    font-size: var(--step--1);
}

.project-card-tech {
    text-align: left;
}

.project-links {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

@media (max-width: 880px) {
    .project-card {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .project-card:nth-child(even) {
        display: flex;
        flex-direction: column;
    }

    .project-card-image {
        order: 1;
        width: 100%;
        max-width: 100%;
        justify-self: center;
        align-self: center;
    }

    .project-card-text {
        order: 2;
    }

    .project-card-tech {
        order: 3;
    }

    .project-links {
        order: 4;
    }
}

@media (max-width: 600px) {
    .project-card {
        gap: 16px;
        padding: 16px 0;
    }

    .project-card h3 {
        font-size: var(--step-0);
    }

    .project-card-text .project-card p {
        font-size: .9rem;
    }

    .project-card-image {
        max-width: 280px;
    }
}

.hidden-card {
    display: none !important;
}

/* -------- Career Split Table Style -------- */
.career-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 32px 0;
}

.career-item {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 40px;
    padding: 40px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    transition: all .3s ease;
    position: relative;
}

.career-item:first-child {
    padding-top: 0;
}

.career-item:last-child {
    border-bottom: none;
}

.career-item::before {
    content: "";
    position: absolute;
    left: -20px;
    top: 0;
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    transition: height .3s ease;
}

.career-item:hover::before {
    height: 100%;
}

.career-item:hover {
    padding-left: 12px;
}

.career-left {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.career-company {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: var(--step-0);
    color: var(--primary);
    margin: 0;
}

.career-role {
    font-weight: 600;
    font-size: var(--step-0);
    margin: 0;
    line-height: 1.3;
}

.career-period {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--step--1);
    color: color-mix(in oklab, var(--text-color) 70%, transparent);
    margin: 4px 0 0 0;
}

.career-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.career-description {
    color: color-mix(in oklab, var(--text-color) 88%, transparent);
    line-height: 1.65;
    margin: 0;
    font-size: var(--step-0);
}

.career-highlights {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.career-highlights li {
    display: flex;
    align-items: start;
    gap: 10px;
    color: color-mix(in oklab, var(--text-color) 82%, transparent);
    line-height: 1.5;
    font-size: var(--step--1);
    padding: 8px 12px;
    background: color-mix(in oklab, var(--primary) 5%, transparent);
    border-radius: 8px;
    border-left: 2px solid color-mix(in oklab, var(--primary) 30%, transparent);
}

.career-highlights li::before {
    content: "✓";
    color: var(--primary);
    font-weight: 800;
    flex-shrink: 0;
    margin-top: 2px;
}

.career-tech {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.career-tech .tag {
    background: transparent;
    border: 1px solid color-mix(in oklab, var(--accent) 35%, transparent);
    color: var(--accent);
    font-size: .8rem;
    padding: .25rem .65rem;
    transition: all .2s ease;
}

.career-tech .tag:hover {
    background: color-mix(in oklab, var(--accent) 15%, transparent);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .career-item {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 32px 0;
    }

    .career-highlights {
        grid-template-columns: 1fr;
    }
}

/* -------- Education Inline Flow -------- */
.education-flow {
    display: flex;
    gap: 48px;
    flex-wrap: wrap;
    align-items: start;
    justify-content: center;
    margin: 32px 0;
}

.education-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    flex: 0 1 320px;
    padding: 24px;
    transition: transform .3s ease;
}

.education-block:hover {
    transform: translateY(-8px);
}

.education-icon-large {
    width: 96px;
    height: 96px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #fff;
    box-shadow: 0 12px 28px rgba(255, 107, 74, 0.35);
    transition: all .3s ease;
    position: relative;
}

body.light .education-icon-large {
    box-shadow: 0 12px 28px rgba(0, 102, 204, 0.25);
}

.education-block:hover .education-icon-large {
    transform: rotate(-5deg) scale(1.05);
    box-shadow: 0 16px 36px rgba(255, 107, 74, 0.45);
}

.education-icon-large::after {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 28px;
    border: 2px solid color-mix(in oklab, var(--primary) 30%, transparent);
    opacity: 0;
    transition: opacity .3s ease;
}

.education-block:hover .education-icon-large::after {
    opacity: 1;
}

.education-block:nth-child(2) .education-icon-large {
    background: linear-gradient(135deg, var(--accent), var(--primary));
}

.education-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.education-degree {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: var(--step-1);
    margin: 0;
    line-height: 1.2;
}

.education-field {
    font-size: var(--step-0);
    color: color-mix(in oklab, var(--text-color) 85%, transparent);
    margin: 0;
    line-height: 1.4;
}

.education-divider-small {
    width: 40px;
    height: 2px;
    background: var(--primary);
    margin: 4px 0;
}

.education-block:nth-child(2) .education-divider-small {
    background: var(--accent);
}

.education-institution {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--primary);
    font-size: var(--step-0);
    margin: 0;
}

.education-block:nth-child(2) .education-institution {
    color: var(--accent);
}

.education-years {
    font-size: var(--step--1);
    color: color-mix(in oklab, var(--text-color) 65%, transparent);
    margin: 0;
}

@media (max-width: 768px) {
    .education-flow {
        flex-direction: column;
        gap: 32px;
        padding: 0 8px;
    }

    .education-block {
        flex: 1 1 auto;
        width: 100%;
        max-width: 100%;
        padding: 16px;
    }

    .education-icon-large {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }

    .education-icon-large::after {
        inset: -6px;
    }

    .education-degree {
        font-size: var(--step-0);
    }

    .education-field {
        font-size: var(--step--1);
    }
}

/* -------- Timeline (for Education) -------- */
.timeline {
    position: relative;
    margin: 24px 0;
    padding-left: 48px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 22px;
    top: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, color-mix(in oklab, var(--primary) 65%, #fff 35%), transparent);
}

.timeline-item {
    margin-bottom: 36px;
    position: relative;
    background: var(--bg-elev-1);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 12px;
    padding: 16px 18px 14px 18px;
    box-shadow: var(--shadow-2);
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 22px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary) 30%, transparent);
}

.timeline-item h3 {
    margin: 0;
}

@media (min-width: 900px) {
    .timeline {
        padding-left: 0;
    }

    .timeline::before {
        left: 50%;
        transform: translateX(-50%);
    }

    .timeline-item {
        display: grid;
        grid-template-columns: 1fr 24px 1fr;
        gap: 1.2rem;
        align-items: start;
    }

    .timeline-item::before {
        left: auto;
        position: relative;
        grid-column: 2;
        justify-self: center;
        top: 12px;
    }

    .timeline-item>h3,
    .timeline-item>p {
        grid-column: 1;
        text-align: right;
    }

    .timeline-item:nth-child(even)>h3,
    .timeline-item:nth-child(even)>p {
        grid-column: 3;
        text-align: left;
    }
}

/* -------- Skills Timeline (simple, no cards) -------- */
.skills-timeline {
    position: relative;
    margin: 24px 0;
    padding-left: 48px;
}

.skills-timeline-item {
    margin-bottom: 64px;
    position: relative;
    padding-left: 8px;
}

.skills-timeline-item::before {
    content: "";
    position: absolute;
    left: -34px;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary) 30%, transparent);
    z-index: 2;
}

.skills-timeline-item::after {
    content: "";
    position: absolute;
    left: -28px;
    top: 24px;
    width: 2px;
    height: calc(100% + 26px);
    background: linear-gradient(180deg, color-mix(in oklab, var(--primary) 65%, #fff 35%), transparent);
    z-index: 1;
}

.skills-timeline-item:last-child::after {
    display: none;
}

.skills-timeline-item h3 {
    margin: 0 0 12px 0;
    font-size: var(--step-0);
    color: var(--primary);
    line-height: 1.4;
}

/* -------- Contact -------- */
.contact {
    text-align: center;
}

.contact .social {
    display: flex;
    justify-content: center;
    gap: .8rem;
    flex-wrap: wrap;
    margin-top: .6rem;
}

.contact-form {
    margin: 24px auto 0;
    max-width: 720px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 16px;
    text-align: left;
}

.contact-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 600;
}

.contact-form label:has(textarea) {
    grid-column: 1 / -1;
}

.contact-form input,
.contact-form textarea {
    border: 1px solid rgba(255, 255, 255, .12);
    background: color-mix(in oklab, var(--bg-color) 75%, transparent);
    color: var(--text-color);
    border-radius: 10px;
    padding: 12px;
    font-size: var(--step-0);
    font-family: inherit;
    transition: border-color .3s ease, box-shadow .3s ease, background .3s ease;
}

body.light .contact-form input,
body.light .contact-form textarea {
    border: 1.5px solid rgba(0, 0, 0, .15);
    background: #ffffff;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary) 15%, transparent);
}

.contact-form textarea {
    min-height: 120px;
    resize: vertical;
}

.contact-form button {
    grid-column: 1 / -1;
    width: fit-content;
    justify-self: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    padding: 14px 40px;
    font-size: var(--step-0);
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 20px color-mix(in oklab, var(--primary) 35%, transparent);
}

.contact-form button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    opacity: 0;
    transition: opacity .3s ease;
}

.contact-form button:hover::before {
    opacity: 1;
}

.contact-form button iconify-icon {
    position: relative;
    z-index: 1;
}

.contact-form button:hover {
    box-shadow: 0 8px 25px color-mix(in oklab, var(--primary) 45%, transparent),
        0 0 30px color-mix(in oklab, var(--accent) 25%, transparent);
}

@media (max-width: 700px) {
    .contact-form {
        grid-template-columns: 1fr;
    }
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem .9rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: color-mix(in oklab, var(--bg-color) 70%, transparent);
    transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.icon-btn:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    background: color-mix(in oklab, var(--primary) 10%, var(--bg-color) 70%);
}

.icon-btn iconify-icon {
    transition: transform .3s ease;
}

.icon-btn:hover iconify-icon {
    animation: wiggle .5s ease;
}

@keyframes wiggle {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-10deg);
    }

    75% {
        transform: rotate(10deg);
    }
}

/* -------- Footer -------- */
footer {
    background: var(--card-bg);
    border-top: 1px solid rgba(255, 255, 255, .06);
    padding: 48px 20px 32px;
    margin-top: 80px;
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 40px;
    align-items: center;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-logo {
    font-size: var(--step-1);
    font-weight: 800;
    background: linear-gradient(90deg, #7bc9ff, #a586ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: 0;
}

.footer-tagline {
    color: color-mix(in oklab, var(--text-color) 70%, transparent);
    font-size: var(--step--1);
    margin: 0;
}

.footer-social {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.footer-social .icon-btn {
    padding: .7rem;
    font-size: 1.3rem;
}

.footer-social .icon-btn iconify-icon {
    margin: 0;
}

.footer-copyright {
    text-align: right;
    color: color-mix(in oklab, var(--text-color) 60%, transparent);
    font-size: var(--step--1);
    margin: 0;
}

@media (max-width: 900px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 32px;
    }

    .footer-copyright {
        text-align: center;
    }

    .footer-brand {
        align-items: center;
    }
}

/* Scroll progress bar */
#scrollbar {
    position: fixed;
    inset: 0 auto auto 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), #ffd266);
    z-index: 1000;
}

/* -------- Buttons -------- */
.btn {
    background: var(--primary);
    color: #fff;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 700;
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    box-shadow: 0 4px 12px rgba(77, 166, 255, .3);
    border: none;
    cursor: pointer;
}

.btn:hover {
    filter: brightness(110%);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(77, 166, 255, .4);
}

.btn:active {
    transform: translateY(-1px) scale(.98);
    box-shadow: 0 2px 8px rgba(77, 166, 255, .3);
}

.btn iconify-icon {
    transition: transform .2s ease;
}

.btn:hover iconify-icon {
    transform: scale(1.1) rotate(-5deg);
}

/* -------- Cursor Trail Effect -------- */
.cursor-trail {
    position: fixed;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    will-change: transform, opacity;
}

@media (hover: hover) and (pointer: fine) {
    .cursor-trail {
        animation: trailFade 0.5s ease-out forwards;
    }
}

@keyframes trailFade {
    0% {
        opacity: 0.25;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(0.2);
    }
}

/* -------- Tags -------- */
.tag {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .35rem .6rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: color-mix(in oklab, var(--bg-color) 70%, transparent);
    font-size: .9rem;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}