:root {
    --navy-950: #031023;
    --navy-900: #071a36;
    --navy-800: #0b2a52;
    --silver-300: #b8c3d3;
    --silver-200: #d2dae6;
    --silver-100: #e9eef6;
    --text-main: #f5f8ff;
    --text-soft: #c0c9d7;
    --text-muted: #98a5ba;
    --card-bg: rgba(10, 29, 55, 0.72);
    --card-border: rgba(201, 211, 226, 0.24);
    --card-glow: rgba(195, 208, 226, 0.18);
    --shadow-deep: 0 20px 45px rgba(2, 7, 18, 0.45);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lato', sans-serif;
    background:
        radial-gradient(circle at 14% 10%, rgba(166, 184, 210, 0.2), transparent 34%),
        radial-gradient(circle at 86% 18%, rgba(208, 217, 231, 0.13), transparent 36%),
        linear-gradient(160deg, var(--navy-950), var(--navy-900) 45%, #0a2142);
    color: var(--text-main);
    line-height: 1.65;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: -12%;
    background:
        radial-gradient(circle at 18% 72%, rgba(186, 199, 218, 0.12), transparent 43%),
        radial-gradient(circle at 82% 24%, rgba(197, 211, 230, 0.1), transparent 42%);
    animation: nebulaShift 22s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.07) 0.8px, transparent 0.8px);
    background-size: 3px 3px;
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
}

nav,
section,
footer {
    position: relative;
    z-index: 1;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-main);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.2rem);
    letter-spacing: 1.5px;
}

h2 {
    font-size: clamp(2rem, 3.8vw, 3rem);
}

h3 {
    font-size: 1.35rem;
}

p {
    font-size: 1rem;
    color: var(--text-soft);
    line-height: 1.8;
}

.container {
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: 0 32px;
}

.section-subtitle {
    max-width: 640px;
    color: var(--text-muted);
    font-size: 1.06rem;
    margin-bottom: 2.6rem;
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 16px 0;
    background: rgba(3, 16, 35, 0.68);
    border-bottom: 1px solid rgba(188, 200, 217, 0.15);
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 28px rgba(3, 9, 22, 0.35);
    z-index: 1000;
    transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.navbar.scrolled {
    background: rgba(4, 15, 33, 0.88);
    border-bottom-color: rgba(198, 209, 224, 0.23);
    box-shadow: 0 14px 34px rgba(1, 7, 17, 0.5);
}

.nav-container {
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.6rem;
}

.logo h1 {
    font-size: 1.7rem;
    margin-bottom: 0;
    letter-spacing: 3px;
    color: var(--silver-100);
    text-shadow: 0 0 18px rgba(205, 217, 233, 0.35);
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    color: var(--silver-100);
    cursor: pointer;
    transition: color 0.3s ease;
}

.hamburger:hover {
    color: var(--text-main);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-menu a {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.1px;
    color: var(--silver-300);
    position: relative;
    font-weight: 700;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -7px;
    width: 0;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--silver-300), var(--silver-100));
    transition: width 0.25s ease;
}

.nav-menu a:hover {
    color: var(--silver-100);
}

.nav-menu a:hover::after {
    width: 100%;
}

section {
    padding: 96px 0;
}

.hero {
    margin-top: 74px;
    min-height: calc(100vh - 74px);
    display: flex;
    align-items: center;
    padding: 84px 0 64px;
}

.hero::before {
    content: '';
    position: absolute;
    right: -120px;
    top: 14%;
    width: clamp(220px, 36vw, 500px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(203, 214, 230, 0.25), rgba(203, 214, 230, 0));
    filter: blur(6px);
    animation: pulseGlow 5s ease-in-out infinite;
    pointer-events: none;
}

.hero-inner {
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: 0 32px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
    align-items: center;
}

.hero-content {
    max-width: 640px;
}

.hero-content h2 {
    font-family: 'Lato', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 2.2px;
    text-transform: uppercase;
    color: var(--silver-300);
    margin-bottom: 0.7rem;
}

.hero-content h1 {
    margin-bottom: 0.9rem;
    color: var(--text-main);
    text-shadow: 0 8px 22px rgba(4, 9, 20, 0.4);
}

.hero-content > p {
    color: var(--text-soft);
}

.hero-role {
    margin-top: 0.4rem;
    margin-bottom: 1.2rem;
    min-height: 1.6rem;
    color: var(--silver-100);
    font-size: 1.22rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
}

.hero-role::after {
    content: '';
    width: 2px;
    height: 1.2rem;
    background: var(--silver-100);
    opacity: 0.85;
    animation: caretBlink 0.9s steps(1, end) infinite;
}

.hero-desc {
    margin: 1.3rem 0 2rem;
    max-width: 620px;
    color: var(--text-muted);
}

.hero-image {
    max-width: 430px;
    margin-left: auto;
    width: 100%;
    display: grid;
    place-items: center;
    position: relative;
}

.hero-image::before {
    content: '';
    position: absolute;
    inset: -14px;
    border-radius: 26px;
    border: 1px solid rgba(202, 214, 231, 0.35);
    box-shadow: 0 0 0 1px rgba(202, 214, 231, 0.08), inset 0 0 30px rgba(177, 195, 218, 0.12);
    animation: borderShift 5s ease-in-out infinite;
}

.hero-image img {
    width: 100%;
    border-radius: 20px;
    border: 1px solid rgba(210, 220, 233, 0.48);
    box-shadow: var(--shadow-deep);
    object-fit: cover;
    animation: floatSoft 4.8s ease-in-out infinite;
}

.buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid transparent;
    padding: 0.82rem 1.8rem;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    transition: transform 0.25s ease, box-shadow 0.3s ease, background 0.25s ease, color 0.25s ease;
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -130%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    transform: skewX(-20deg);
}

.btn:hover::after {
    animation: sheenSweep 0.9s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--silver-300), #dce4ef);
    color: #081a35;
    box-shadow: 0 14px 30px rgba(190, 205, 224, 0.22);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 34px rgba(190, 205, 224, 0.3);
}

.btn-secondary {
    background: rgba(185, 198, 216, 0.08);
    color: var(--silver-100);
    border-color: rgba(194, 206, 223, 0.48);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    background: rgba(190, 202, 220, 0.2);
    box-shadow: 0 12px 28px rgba(7, 18, 34, 0.45);
}

.about {
    background: linear-gradient(180deg, rgba(10, 29, 54, 0.72), rgba(6, 21, 42, 0.65));
}

.about-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: center;
}

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

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

.skills {
    background: linear-gradient(180deg, rgba(5, 19, 40, 0.68), rgba(6, 23, 46, 0.7));
}

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

.projects {
    background: linear-gradient(180deg, rgba(4, 18, 38, 0.84), rgba(7, 23, 47, 0.8));
}

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

.experience {
    background: linear-gradient(180deg, rgba(7, 24, 46, 0.7), rgba(5, 17, 35, 0.75));
}

.stat,
.skill-card,
.project-card,
.timeline-content {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    box-shadow: var(--shadow-deep);
    backdrop-filter: blur(8px);
    transform: perspective(900px) translateY(var(--lift, 0px)) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
    transform-style: preserve-3d;
    transition: transform 0.25s ease, box-shadow 0.28s ease, border-color 0.25s ease, background 0.25s ease;
}

.stat:hover,
.skill-card:hover,
.project-card:hover,
.timeline-content:hover {
    --lift: -8px;
    border-color: rgba(215, 224, 236, 0.52);
    box-shadow: 0 24px 44px rgba(2, 8, 20, 0.45), 0 0 22px var(--card-glow);
}

.stat {
    padding: 1.7rem;
    text-align: center;
}

.stat h3 {
    margin-bottom: 0.2rem;
    color: var(--silver-100);
    font-size: 2.2rem;
}

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

.skill-card {
    padding: 1.8rem;
}

.skill-card h3 {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
    color: var(--silver-100);
}

.skill-card i {
    color: var(--silver-200);
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.skill-items span {
    border: 1px solid rgba(206, 217, 231, 0.35);
    border-radius: 999px;
    padding: 0.42rem 0.8rem;
    font-size: 0.84rem;
    color: var(--silver-200);
    background: rgba(182, 197, 217, 0.08);
    transition: transform 0.2s ease, background 0.22s ease, color 0.22s ease;
}

.skill-items span:hover {
    transform: translateY(-1px);
    background: rgba(216, 225, 236, 0.24);
    color: var(--text-main);
}

.project-card {
    padding: 1.9rem;
}

.project-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.project-header h3 {
    margin-bottom: 0;
    color: var(--silver-100);
}

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

.project-links a {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--silver-100);
    background: rgba(184, 198, 216, 0.14);
    border: 1px solid rgba(210, 220, 234, 0.35);
    transition: transform 0.2s ease, background 0.25s ease;
}

.project-links a:hover {
    transform: translateY(-2px);
    background: rgba(213, 223, 236, 0.24);
}

.project-desc {
    color: var(--text-soft);
    margin-bottom: 1.2rem;
}

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

.project-tags span {
    border: 1px solid rgba(202, 214, 230, 0.34);
    border-radius: 999px;
    padding: 0.35rem 0.72rem;
    color: var(--silver-200);
    font-size: 0.79rem;
    background: rgba(186, 200, 219, 0.08);
}

.timeline {
    max-width: 860px;
}

.timeline-item {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1.6rem;
    position: relative;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    width: 15px;
    height: 15px;
    margin-top: 1.1rem;
    border-radius: 50%;
    border: 3px solid rgba(225, 233, 243, 0.85);
    background: linear-gradient(145deg, #7f8fa6, #d9e1ed);
    box-shadow: 0 0 0 4px rgba(188, 200, 218, 0.2);
    flex-shrink: 0;
}

.timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 34px;
    width: 2px;
    height: calc(100% + 0.55rem);
    background: linear-gradient(180deg, rgba(213, 223, 235, 0.8), rgba(213, 223, 235, 0.1));
}

.timeline-content {
    padding: 1.4rem;
}

.timeline-content h3 {
    color: var(--silver-100);
    margin-bottom: 0.35rem;
}

.timeline-company {
    color: var(--silver-300);
    font-weight: 700;
    margin-bottom: 0.62rem;
    font-size: 0.95rem;
}

.timeline-content p {
    color: var(--text-soft);
    font-size: 0.95rem;
}

.contact {
    background: linear-gradient(175deg, #081b37, #040f21);
    border-top: 1px solid rgba(203, 214, 230, 0.17);
    border-bottom: 1px solid rgba(203, 214, 230, 0.17);
}

.contact h2 {
    color: var(--silver-100);
}

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

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

.info-item {
    display: flex;
    gap: 0.95rem;
    align-items: flex-start;
    background: rgba(12, 30, 56, 0.62);
    border: 1px solid rgba(198, 211, 228, 0.22);
    border-radius: 14px;
    padding: 1rem;
}

.info-item i {
    margin-top: 0.2rem;
    color: var(--silver-200);
    font-size: 1.2rem;
}

.info-item h4 {
    margin-bottom: 0.18rem;
    color: var(--silver-100);
}

.info-item p,
.info-item a {
    color: var(--text-soft);
}

.info-item a:hover {
    color: var(--silver-100);
}

.social-links h3 {
    color: var(--silver-100);
    margin-bottom: 1rem;
}

.social-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.social-icons a {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--silver-100);
    border: 1px solid rgba(214, 225, 237, 0.36);
    background: rgba(190, 204, 221, 0.11);
    transition: transform 0.22s ease, background 0.22s ease;
}

.social-icons a:hover {
    transform: translateY(-3px);
    background: rgba(214, 224, 237, 0.26);
}

footer {
    text-align: center;
    padding: 1.7rem 1rem 2.2rem;
    background: #040f21;
}

.footer-content p {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin: 0.35rem 0;
}

.heart {
    color: #d7deea;
    animation: heartbeat 1.6s ease-in-out infinite;
}

.ambient-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.ambient-layer span {
    position: absolute;
    left: var(--left, 0%);
    bottom: -14vh;
    width: var(--size, 60px);
    height: var(--size, 60px);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(217, 226, 238, 0.42), rgba(217, 226, 238, 0));
    opacity: 0;
    animation: floatUp var(--duration, 26s) linear infinite;
    animation-delay: var(--delay, 0s);
}

.reveal {
    opacity: 0;
    visibility: hidden;
    filter: blur(6px);
    transition:
        opacity 0.8s ease,
        transform 0.8s ease,
        filter 0.8s ease;
    transition-delay: var(--reveal-delay, 0ms);
}

.reveal.reveal-up {
    transform: translateY(34px) scale(0.98);
}

.reveal.reveal-left {
    transform: translateX(-26px) scale(0.98);
}

.reveal.reveal-right {
    transform: translateX(26px) scale(0.98);
}

.reveal.visible {
    opacity: 1;
    visibility: visible;
    transform: translate(0, 0) scale(1);
    filter: blur(0);
}

@keyframes heartbeat {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.18);
    }
}

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

@keyframes pulseGlow {
    0%,
    100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.08);
        opacity: 1;
    }
}

@keyframes caretBlink {
    0%,
    49% {
        opacity: 1;
    }
    50%,
    100% {
        opacity: 0;
    }
}

@keyframes sheenSweep {
    0% {
        left: -130%;
    }
    100% {
        left: 150%;
    }
}

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

@keyframes nebulaShift {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(-2%, 2%);
    }
}

@keyframes floatUp {
    0% {
        transform: translateY(0) scale(0.55);
        opacity: 0;
    }
    12% {
        opacity: 0.22;
    }
    90% {
        opacity: 0.16;
    }
    100% {
        transform: translateY(-125vh) scale(1.1);
        opacity: 0;
    }
}

@media (max-width: 1024px) {
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-image {
        margin: 0 auto;
        max-width: 420px;
    }

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

@media (max-width: 768px) {
    .container,
    .nav-container,
    .hero-inner {
        padding-left: 20px;
        padding-right: 20px;
    }

    .navbar {
        padding: 12px 0;
    }

    .nav-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .hamburger {
        display: block;
        z-index: 1001;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(4, 15, 33, 0.96);
        backdrop-filter: blur(16px);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        gap: 2rem;
        border-bottom: 1px solid rgba(198, 209, 224, 0.15);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease-in-out;
    }

    .nav-menu.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
    }

    .nav-menu a {
        display: block;
        padding: 0.5rem 0;
        font-size: 1.1rem;
    }

    .hero {
        margin-top: 84px;
        padding-top: 58px;
    }

    section {
        padding: 72px 0;
    }

    .buttons {
        width: 100%;
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .projects-grid,
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    h1 {
        font-size: 2.1rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .section-subtitle {
        font-size: 0.98rem;
    }

    .stat,
    .skill-card,
    .project-card,
    .timeline-content {
        border-radius: 14px;
        padding: 1.4rem;
    }

    .hero-image {
        max-width: 280px;
    }

    .hero {
        padding-top: 40px;
    }

    .contact-info {
        gap: 1rem;
    }

    .info-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .social-icons {
        justify-content: center;
    }

    .timeline-item {
        flex-direction: column;
        gap: 0.5rem;
    }

    .timeline-item:not(:last-child)::before {
        display: none;
    }

    .timeline-marker {
        display: none;
    }
}
