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

:root {
    --font-body: 'Manrope', sans-serif;
    --font-display: 'Space Grotesk', sans-serif;

    --bg-main: #070b14;
    --bg-elev-1: #0d1422;
    --bg-elev-2: #111b2d;
    --bg-soft: #17253d;
    --line: #243551;
    --line-strong: #355684;

    --text-strong: #f6f8fc;
    --text-body: #ccd8eb;
    --text-muted: #96a9c7;

    --brand: #19d3e0;
    --brand-strong: #36f8c9;
    --accent: #ff844b;
    --accent-soft: #ffbd5d;

    --hero-gradient: radial-gradient(circle at 18% 22%, #1f3d8a 0%, transparent 48%),
        radial-gradient(circle at 80% 14%, #0f856d 0%, transparent 50%),
        linear-gradient(145deg, #070b14 10%, #0a1220 58%, #0f1829 100%);

    --glow-brand: 0 0 0 1px rgba(25, 211, 224, 0.32), 0 18px 50px rgba(10, 157, 174, 0.26);
    --shadow-soft: 0 16px 35px rgba(2, 8, 17, 0.42);
    --shadow-deep: 0 24px 60px rgba(1, 6, 14, 0.55);

    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 30px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-body);
    background: var(--bg-main);
    line-height: 1.7;
    overflow-x: hidden;
}

body::before,
body::after {
    content: '';
    position: fixed;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.32;
    pointer-events: none;
    z-index: -1;
    animation: driftGlow 16s ease-in-out infinite;
}

body::before {
    top: -180px;
    left: -130px;
    background: #1687ff;
}

body::after {
    right: -120px;
    bottom: -220px;
    background: #ff7a45;
    animation-delay: 4s;
}

a {
    color: inherit;
}

.container {
    width: min(1160px, calc(100% - 2.6rem));
    margin: 0 auto;
}

section {
    position: relative;
    padding: 104px 0;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(5, 10, 18, 0.62);
    border-bottom: 1px solid transparent;
    backdrop-filter: blur(18px);
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.navbar.scrolled {
    background: rgba(6, 12, 21, 0.9);
    border-color: rgba(81, 121, 173, 0.32);
    box-shadow: 0 12px 30px rgba(3, 7, 13, 0.46);
}

.nav-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 700;
    color: #f1f6ff;
    letter-spacing: 0.25px;
}

.logo i {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #02121a;
    background: linear-gradient(140deg, var(--brand), var(--brand-strong));
    box-shadow: var(--glow-brand);
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #d6e1f2;
    padding: 0.5rem 0.85rem;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.18px;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: border-color 0.22s ease, color 0.22s ease, background 0.22s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    color: #fcfeff;
    border-color: rgba(100, 189, 255, 0.45);
    background: rgba(53, 86, 132, 0.26);
}

.hamburger {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid rgba(97, 140, 196, 0.42);
    background: rgba(18, 28, 43, 0.86);
    color: #f5f9ff;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 0 auto;
    background: currentColor;
    border-radius: 6px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.hamburger span + span {
    margin-top: 5px;
}

.hamburger.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.is-active span:nth-child(2) {
    opacity: 0;
}

.hamburger.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: none;
    border-radius: 12px;
    padding: 0.78rem 1.3rem;
    font-family: var(--font-body);
    font-size: 0.93rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.22s ease, background 0.22s ease, color 0.22s ease;
}

.btn-primary {
    color: #021015;
    background: linear-gradient(140deg, var(--brand), var(--brand-strong));
    box-shadow: var(--glow-brand);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 0 1px rgba(25, 211, 224, 0.45), 0 24px 44px rgba(5, 136, 151, 0.33);
}

.btn-secondary {
    color: #e7eefb;
    background: rgba(32, 49, 76, 0.65);
    border: 1px solid rgba(115, 163, 226, 0.48);
}

.btn-secondary:hover {
    background: rgba(54, 77, 113, 0.9);
    transform: translateY(-2px);
}

.btn-small {
    border-radius: 10px;
    padding: 0.54rem 0.9rem;
    font-size: 0.82rem;
}

.btn-outline {
    background: transparent;
    color: #d9e5f8;
    border: 1px solid rgba(112, 159, 222, 0.5);
}

.btn-outline:hover {
    background: rgba(40, 63, 97, 0.55);
    color: #ffffff;
}

/* Hero */
.hero {
    margin-top: 70px;
    padding: 126px 0 96px;
    background: var(--hero-gradient);
    color: #f7fbff;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(115, 153, 207, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(115, 153, 207, 0.12) 1px, transparent 1px);
    background-size: 48px 48px;
    opacity: 0.24;
}

.hero::after {
    content: '';
    position: absolute;
    top: -120px;
    right: -150px;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(25, 211, 224, 0.3), transparent 68%);
}

.stars {
    position: absolute;
    inset: 0;
    opacity: 0.42;
    pointer-events: none;
}

.stars::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(2px 2px at 15% 18%, rgba(255, 255, 255, 0.95), transparent),
        radial-gradient(2px 2px at 80% 30%, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(1.6px 1.6px at 42% 74%, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(1.8px 1.8px at 66% 54%, rgba(255, 255, 255, 0.88), transparent),
        radial-gradient(1.4px 1.4px at 28% 42%, rgba(255, 255, 255, 0.72), transparent);
    animation: twinkle 7s ease-in-out infinite alternate;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
    align-items: center;
}

.hero-text h1 {
    max-width: 14ch;
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 4.8vw, 4.4rem);
    line-height: 1.05;
    letter-spacing: -0.7px;
    color: #ffffff;
    margin-bottom: 1rem;
}

.highlight {
    background: linear-gradient(130deg, #6be8ff 0%, #46ffcf 55%, #ffd272 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #cde2ff;
    font-size: 0.98rem;
    letter-spacing: 0.34px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.description {
    max-width: 58ch;
    color: #d8e7ff;
    margin-bottom: 2.1rem;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-bottom: 2rem;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.social-links a {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    text-decoration: none;
    border-radius: 12px;
    color: #e7f1ff;
    border: 1px solid rgba(122, 173, 238, 0.42);
    background: rgba(28, 43, 67, 0.58);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.social-links a:hover {
    transform: translateY(-3px);
    border-color: rgba(124, 251, 210, 0.72);
    background: rgba(18, 40, 48, 0.86);
}

.hero-image {
    display: flex;
    justify-content: center;
}

.floating-card {
    position: relative;
    width: min(345px, 84vw);
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-lg);
    display: grid;
    place-items: center;
    background: linear-gradient(155deg, rgba(35, 56, 89, 0.78), rgba(13, 24, 41, 0.8));
    border: 1px solid rgba(108, 160, 232, 0.4);
    box-shadow: var(--shadow-deep);
    backdrop-filter: blur(10px);
    animation: floatCard 6s ease-in-out infinite;
}

.floating-card::before,
.floating-card::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(112, 172, 245, 0.38);
}

.floating-card::before {
    width: 80%;
    height: 80%;
    animation: pulseRing 4.8s ease-in-out infinite;
}

.floating-card::after {
    width: 62%;
    height: 62%;
    animation: pulseRing 4.8s ease-in-out infinite 1s;
}

.floating-card i {
    font-size: clamp(3.6rem, 8.7vw, 5.7rem);
    color: #6de9ff;
    text-shadow: 0 10px 28px rgba(26, 210, 236, 0.35);
}

.scroll-indicator {
    position: absolute;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.22rem;
    color: rgba(225, 238, 255, 0.88);
    font-size: 0.84rem;
    letter-spacing: 0.15px;
    animation: bob 2.5s ease-in-out infinite;
}

/* Shared section heading */
.section-header {
    text-align: center;
    margin-bottom: 3.2rem;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.2vw, 3rem);
    color: #f7fbff;
    letter-spacing: -0.45px;
    margin-bottom: 0.7rem;
}

.underline {
    width: 90px;
    height: 4px;
    margin: 0 auto;
    border-radius: 999px;
    background: linear-gradient(120deg, var(--brand), var(--accent-soft));
}

/* About */
.about {
    background: linear-gradient(180deg, rgba(9, 15, 27, 0) 0%, rgba(11, 19, 34, 0.96) 24%, rgba(8, 13, 24, 1) 100%);
}

.about-content {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2.2rem;
    align-items: center;
}

.about-text p {
    color: var(--text-body);
    margin-bottom: 1rem;
}

.about-intro {
    border-radius: var(--radius-sm);
    border: 1px solid rgba(109, 170, 239, 0.38);
    background: rgba(20, 31, 49, 0.9);
    padding: 1rem 1.1rem;
    box-shadow: var(--shadow-soft);
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 1.45rem;
}

.stat {
    border-radius: var(--radius-sm);
    border: 1px solid rgba(80, 124, 183, 0.34);
    background: linear-gradient(155deg, rgba(21, 34, 53, 0.88), rgba(13, 23, 37, 0.92));
    text-align: center;
    padding: 1.1rem 0.75rem;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat:hover {
    transform: translateY(-4px);
    border-color: rgba(104, 246, 215, 0.58);
}

.stat h3 {
    font-family: var(--font-display);
    color: #22c55e;
    font-size: 1.6rem;
    line-height: 1.1;
    margin-bottom: 0.3rem;
}

.stat p {
    color: var(--text-muted);
    font-size: 0.87rem;
}

.about-image {
    display: flex;
    justify-content: center;
}

.image-placeholder {
    width: min(330px, 84vw);
    aspect-ratio: 1 / 1;
    border-radius: 26px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(111, 170, 240, 0.5);
    background: linear-gradient(145deg, rgba(26, 41, 65, 0.95), rgba(14, 22, 37, 0.95));
    box-shadow: var(--shadow-deep);
}

.image-placeholder i {
    font-size: clamp(4.6rem, 10vw, 6.8rem);
    color: #8df7d4;
    text-shadow: 0 10px 24px rgba(34, 211, 173, 0.24);
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

/* Skills */
.skills {
    background: #090f1c;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.skill-category {
    border-radius: var(--radius-md);
    border: 1px solid rgba(84, 132, 194, 0.34);
    background: linear-gradient(165deg, rgba(17, 28, 45, 0.9), rgba(10, 17, 30, 0.96));
    box-shadow: var(--shadow-soft);
    padding: 1.4rem;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: rgba(106, 240, 214, 0.6);
    box-shadow: 0 18px 40px rgba(1, 8, 18, 0.6);
}

.skill-category h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    color: #f4f8ff;
    margin-bottom: 1rem;
}

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

.skill-tag {
    border-radius: 999px;
    border: 1px solid rgba(96, 147, 214, 0.42);
    background: rgba(27, 42, 66, 0.7);
    color: #deebff;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.36rem 0.72rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.skill-tag:hover {
    transform: translateY(-2px);
    border-color: rgba(123, 246, 211, 0.75);
}

/* Projects */
.projects {
    background: linear-gradient(180deg, #090f1c 0%, #0b1423 100%);
}

.project-search-wrap {
    max-width: 740px;
    margin: 0 auto 1.55rem;
}

.project-search {
    width: 100%;
    border: 1px solid rgba(93, 140, 202, 0.48);
    border-radius: 12px;
    padding: 0.9rem 1rem;
    color: #f3f7ff;
    background: rgba(18, 30, 48, 0.84);
    font-family: var(--font-body);
    font-size: 0.93rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.project-search::placeholder {
    color: #9cb1d1;
}

.project-search:focus {
    outline: none;
    border-color: rgba(112, 246, 216, 0.72);
    box-shadow: 0 0 0 3px rgba(29, 173, 188, 0.22);
}

.search-status {
    min-height: 1.3rem;
    margin-top: 0.4rem;
    color: var(--text-muted);
    font-size: 0.86rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(286px, 1fr));
    gap: 1rem;
}

.project-card {
    border-radius: var(--radius-md);
    border: 1px solid rgba(82, 126, 186, 0.36);
    background: linear-gradient(165deg, rgba(17, 28, 45, 0.9), rgba(10, 16, 29, 0.95));
    padding: 1.2rem;
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.project-card.is-hidden {
    display: none;
}

.project-card:hover {
    transform: translateY(-6px);
    border-color: rgba(104, 241, 212, 0.64);
    box-shadow: 0 22px 44px rgba(1, 7, 16, 0.62);
}

.project-image {
    position: relative;
    width: 100%;
    height: 170px;
    border-radius: var(--radius-sm);
    display: grid;
    place-items: center;
    margin-bottom: 1rem;
    font-size: 2.3rem;
    color: #f5feff;
    background: linear-gradient(135deg, #1b365c, #1f7e7d 58%, #2d8ec5 100%);
    overflow: hidden;
}

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

.project-image.has-image i {
    display: none;
}

.project-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 15%, rgba(255, 255, 255, 0.32), transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.46s ease;
}

.project-card:hover .project-image::after {
    transform: translateX(100%);
}

.project-card h3 {
    font-family: var(--font-display);
    color: #f4f8ff;
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.project-card p {
    color: #c8d6eb;
    margin-bottom: 0.9rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.project-tags span {
    border-radius: 999px;
    border: 1px solid rgba(100, 153, 221, 0.44);
    background: rgba(26, 42, 66, 0.72);
    color: #dcebff;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 0.24rem 0.66rem;
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.52rem;
}

.project-links .btn {
    flex: 1;
    min-width: 126px;
}

/* Experience */
.experience {
    background: #0a1220;
}

.timeline {
    position: relative;
    max-width: 830px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 24px;
    width: 2px;
    background: linear-gradient(180deg, var(--brand) 0%, var(--accent) 100%);
    box-shadow: 0 0 12px rgba(45, 214, 230, 0.45);
}

.timeline-item {
    display: grid;
    grid-template-columns: 50px 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.timeline-marker {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 4px solid #0a1220;
    background: linear-gradient(135deg, var(--brand), var(--accent-soft));
    box-shadow: 0 0 0 1px rgba(118, 183, 248, 0.42), 0 10px 24px rgba(7, 20, 38, 0.6);
    z-index: 1;
}

.timeline-content {
    border-radius: var(--radius-sm);
    border: 1px solid rgba(84, 128, 189, 0.35);
    background: rgba(16, 27, 44, 0.9);
    padding: 1.08rem 1.15rem;
    box-shadow: var(--shadow-soft);
}

.timeline-content h3 {
    font-family: var(--font-display);
    color: #f4f8ff;
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.timeline-content .company {
    font-weight: 700;
    color: #91f7d7;
    margin-bottom: 0.45rem;
}

.timeline-content p {
    color: var(--text-body);
}

.timeline-item.exp-blue .timeline-content h3,
.timeline-item.exp-blue .timeline-content .company {
    color: #0e2a5a;
}

.timeline-item.exp-blue .timeline-marker {
    background: #0e2a5a;
}

.timeline-item.exp-green .timeline-content h3,
.timeline-item.exp-green .timeline-content .company {
    color: #1f5b3a;
}

.timeline-item.exp-green .timeline-marker {
    background: #1f5b3a;
}

.timeline-item.exp-brown .timeline-content h3,
.timeline-item.exp-brown .timeline-content .company {
    color: #5a3b24;
}

.timeline-item.exp-brown .timeline-marker {
    background: #5a3b24;
}

/* Contact */
.contact {
    background: linear-gradient(180deg, #0a1220 0%, #080d18 100%);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.contact-info {
    display: grid;
    gap: 0.85rem;
}

.info-card {
    border-radius: var(--radius-md);
    border: 1px solid rgba(87, 133, 195, 0.36);
    background: linear-gradient(160deg, rgba(17, 28, 45, 0.9), rgba(10, 17, 29, 0.95));
    padding: 1.4rem;
    text-align: center;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.info-card:hover {
    transform: translateY(-4px);
    border-color: rgba(109, 244, 214, 0.62);
}

.info-card i {
    color: #6fead0;
    font-size: 1.7rem;
    margin-bottom: 0.65rem;
}

.info-card h3 {
    color: #f4f8ff;
    font-family: var(--font-display);
    margin-bottom: 0.22rem;
}

.info-card p,
.info-card a {
    color: #c7d7ee;
    text-decoration: none;
}

.contact-form {
    border-radius: var(--radius-md);
    border: 1px solid rgba(92, 139, 201, 0.38);
    background: linear-gradient(165deg, rgba(17, 28, 45, 0.94), rgba(10, 16, 29, 0.97));
    box-shadow: var(--shadow-soft);
    padding: 1.3rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    border: 1px solid rgba(94, 141, 203, 0.42);
    border-radius: 10px;
    background: rgba(10, 18, 31, 0.84);
    color: #eef4ff;
    font-family: var(--font-body);
    font-size: 0.92rem;
    padding: 0.82rem 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group textarea {
    resize: vertical;
    min-height: 130px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #97abc9;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(112, 244, 217, 0.78);
    box-shadow: 0 0 0 3px rgba(17, 164, 183, 0.22);
}

/* Footer */
.footer {
    border-top: 1px solid rgba(72, 110, 160, 0.42);
    background: #050b14;
    color: #d4e1f4;
    padding: 2.7rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
    margin-bottom: 1.4rem;
}

.footer-section h3,
.footer-section h4 {
    font-family: var(--font-display);
    color: #f3f8ff;
    margin-bottom: 0.7rem;
}

.footer-section p {
    color: #a9bcd9;
}

.footer-section ul {
    list-style: none;
}

.footer-section li + li {
    margin-top: 0.36rem;
}

.footer-section a {
    text-decoration: none;
    color: #d3e1f6;
    transition: color 0.2s ease;
}

.footer-section a:hover {
    color: #73efcf;
}

.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.46rem;
}

.footer-social a {
    width: 39px;
    height: 39px;
    border-radius: 10px;
    border: 1px solid rgba(93, 139, 198, 0.42);
    background: rgba(17, 29, 45, 0.9);
    display: grid;
    place-items: center;
}

.footer-bottom {
    border-top: 1px solid rgba(73, 111, 161, 0.3);
    padding-top: 1rem;
    text-align: center;
    color: #97accc;
    font-size: 0.9rem;
}

/* Scroll top */
.scroll-top {
    position: fixed;
    right: 24px;
    bottom: 22px;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    border: 1px solid rgba(109, 167, 236, 0.54);
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    color: #041218;
    font-size: 1.12rem;
    cursor: pointer;
    box-shadow: 0 14px 36px rgba(6, 126, 141, 0.36);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.22s ease, visibility 0.22s ease, transform 0.22s ease;
    z-index: 999;
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    transform: translateY(-3px);
}

/* Reveal utility */
.reveal-ready {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal-ready.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Animations */
@keyframes twinkle {
    0% {
        opacity: 0.5;
        transform: scale(1);
    }
    100% {
        opacity: 1;
        transform: scale(1.03);
    }
}

@keyframes driftGlow {
    0%,
    100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(18px, -18px);
    }
}

@keyframes floatCard {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-14px);
    }
}

@keyframes pulseRing {
    0%,
    100% {
        transform: scale(1);
        opacity: 0.48;
    }
    50% {
        transform: scale(1.08);
        opacity: 0.18;
    }
}

@keyframes bob {
    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(7px);
    }
}

/* Responsive */
@media (max-width: 1020px) {
    .nav-links {
        position: absolute;
        top: calc(100% + 0.65rem);
        right: 0;
        width: min(300px, 94vw);
        border-radius: var(--radius-sm);
        border: 1px solid rgba(95, 143, 205, 0.44);
        background: rgba(12, 21, 34, 0.95);
        box-shadow: var(--shadow-soft);
        padding: 0.8rem;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity 0.22s ease, visibility 0.22s ease, transform 0.22s ease;
    }

    .nav-links.nav-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-links a {
        width: 100%;
        justify-content: flex-start;
        border-radius: 10px;
    }

    .hamburger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero-content,
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }

    .hero-image {
        order: -1;
    }

    .hero-text h1,
    .description {
        max-width: none;
    }
}

@media (max-width: 760px) {
    section {
        padding: 84px 0;
    }

    .hero {
        padding: 110px 0 84px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn,
    .project-links .btn {
        width: 100%;
    }

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

    .timeline::before {
        left: 19px;
    }

    .timeline-item {
        grid-template-columns: 40px 1fr;
    }

    .timeline-marker {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 520px) {
    .container {
        width: min(1160px, calc(100% - 1.55rem));
    }

    .logo span {
        display: none;
    }

    .subtitle {
        font-size: 0.86rem;
    }

    .section-header {
        margin-bottom: 2.3rem;
    }

    .skill-category,
    .project-card,
    .contact-form,
    .info-card {
        padding: 1.08rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* Theme refresh: white, dark blue, brown, yellow */
:root {
    --bg-main: #f6f3ee;
    --bg-elev-1: #ffffff;
    --bg-elev-2: #fff9e8;
    --bg-soft: #efe3d0;
    --line: #d8c3a3;
    --line-strong: #b38b5f;
    --text-strong: #192a4d;
    --text-body: #3d2f22;
    --text-muted: #6f5c46;
    --brand: #f4c430;
    --brand-strong: #ffd966;
    --accent: #0e2a5a;
    --accent-soft: #3b5f9a;
    --glow-brand: 0 0 0 1px rgba(244, 196, 48, 0.32), 0 16px 34px rgba(194, 143, 35, 0.24);
}

body {
    color: var(--text-body);
    background: linear-gradient(180deg, #f7f3ed 0%, #ffffff 44%, #f5efe5 100%);
}

body::before {
    background: #ffe27a;
    opacity: 0.4;
}

body::after {
    background: #9cb0db;
    opacity: 0.34;
}

.navbar,
.navbar.scrolled {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(168, 132, 92, 0.42);
    box-shadow: 0 8px 24px rgba(78, 56, 36, 0.12);
}

.logo,
.nav-links a {
    color: #122a57;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    color: #0e2348;
    border-color: rgba(244, 196, 48, 0.5);
    background: rgba(244, 196, 48, 0.18);
}

.hamburger {
    border: 1px solid rgba(168, 132, 92, 0.52);
    background: rgba(255, 255, 255, 0.95);
    color: #1d3669;
}

.hero {
    background: linear-gradient(135deg, #0e2a5a 0%, #1d3f7a 48%, #8b5e3c 100%);
}

.hero::before {
    background-image: linear-gradient(rgba(255, 255, 255, 0.28) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.28) 1px, transparent 1px);
}

.hero::after {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.35), transparent 68%);
}

.highlight {
    background: linear-gradient(130deg, #ffffff 0%, #ffe999 45%, #fff6d8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-primary {
    color: #112852;
    background: linear-gradient(135deg, #f4c430, #ffd966);
}

.btn-secondary {
    color: #17315f;
    background: #ffffff;
    border: 1px solid rgba(168, 132, 92, 0.55);
}

.btn-secondary:hover,
.btn-outline:hover {
    background: #fff6de;
    color: #10264f;
}

.btn-outline {
    color: #6b4a30;
    border: 1px solid rgba(168, 132, 92, 0.64);
}

.about,
.skills,
.projects,
.experience,
.contact {
    background: transparent;
}

.about-intro,
.stat,
.skill-category,
.project-card,
.timeline-content,
.info-card,
.contact-form,
.footer-social a {
    background: #ffffff;
    border-color: rgba(168, 132, 92, 0.48);
    box-shadow: 0 12px 28px rgba(78, 56, 36, 0.11);
}

.project-search,
.form-group input,
.form-group textarea {
    background: #ffffff;
    color: #3d2f22;
    border-color: rgba(168, 132, 92, 0.46);
}

.project-card h3,
.skill-category h3,
.timeline-content h3,
.info-card h3,
.section-header h2,
.footer-section h3,
.footer-section h4 {
    color: #132a55;
}

.project-card p,
.timeline-content p,
.info-card p,
.info-card a,
.footer-section p,
.footer-section a {
    color: #664a31;
}

.project-tags span,
.skill-tag {
    background: #fff9e8;
    color: #5b402b;
    border-color: rgba(177, 143, 104, 0.46);
}

.timeline::before {
    background: linear-gradient(180deg, #f4c430 0%, #0e2a5a 100%);
    box-shadow: 0 0 10px rgba(173, 130, 38, 0.28);
}

.timeline-marker,
.scroll-top {
    background: linear-gradient(135deg, #0e2a5a, #8b5e3c);
    color: #ffffff;
}

.footer {
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    background: #000000;
    color: #e8e8e8;
}

.footer-section h3,
.footer-section h4 {
    color: #ffffff;
}

.footer-section p,
.footer-section a {
    color: #d4d4d4;
}

.footer-section a:hover {
    color: #ffd966;
}

.footer-social a {
    background: #111111;
    border-color: rgba(255, 255, 255, 0.24);
    color: #f2f2f2;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: #b8b8b8;
}
