@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,600;1,700&display=swap');

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #080b14;
    --bg-card: #0d1220;
    --bg-elevated: #141c2e;
    --accent: #60a5fa;
    --accent-2: #a78bfa;
    --accent-dim: rgba(96, 165, 250, 0.08);
    --accent-glow: rgba(96, 165, 250, 0.2);
    --text: #e2e8f0;
    --text-dim: #8892a4;
    --text-muted: #3a4357;
    --border: rgba(148, 163, 184, 0.07);
    --border-hover: rgba(148, 163, 184, 0.14);
    --gradient: linear-gradient(135deg, #60a5fa, #a78bfa);
    --gradient-text: linear-gradient(135deg, #38bdf8, #818cf8, #c084fc);
    --font-display: 'Poppins', sans-serif;
    --font-body: 'Poppins', sans-serif;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
}

::selection {
    background: var(--accent);
    color: var(--bg);
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--text-muted) var(--bg);
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Scroll Progress */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: var(--gradient);
    z-index: 10000;
}

/* navigation */

header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 5000;
    pointer-events: none;
    transition: background 0.4s, backdrop-filter 0.4s;
}

header.scrolled {
    background: rgba(8, 11, 20, 0.85);
    backdrop-filter: blur(24px);
}

nav {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 48px;
    pointer-events: auto;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: opacity 0.3s;
}

.logo:hover { opacity: 0.7; }

.logo-text {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}

nav ul {
    display: flex;
    gap: 48px;
    list-style: none;
}

nav ul a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: color 0.3s;
    position: relative;
}

nav ul a:hover { color: var(--text); }

nav ul a::before {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.4s var(--ease-out-expo);
}

nav ul a:hover::before { width: 100%; }

/* Mobile Nav */
.nav-toggle {
    display: none;
    border: 0;
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    padding: 0;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
}

.nav-toggle-bars {
    width: 24px;
    height: 14px;
    display: inline-block;
    position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 1px;
    background: currentColor;
    transition: transform 220ms ease, top 220ms ease;
}

.nav-toggle-bars::before { top: 0; box-shadow: 0 6px 0 currentColor; }
.nav-toggle-bars::after { top: 12px; }

nav.nav-open .nav-toggle-bars::before {
    top: 6px;
    transform: rotate(45deg);
    box-shadow: none;
}

nav.nav-open .nav-toggle-bars::after {
    top: 6px;
    transform: rotate(-45deg);
}

/* hero */

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding: 140px 48px 60px;
    overflow-x: hidden;
}

.hero-content {
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 2;
    text-align: center;
    container-type: inline-size;
}

@keyframes pulse-green {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.3); }
}

/* CV button */
.btn-cv {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 18px 32px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-dim);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s, border-color 0.3s;
}

.btn-cv:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.hero-cta {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

/* Subtitle above name */
.hero-subtitle {
    font-family: var(--font-body);
    font-size: clamp(0.75rem, 1.2vw, 0.9rem);
    font-weight: 500;
    color: var(--text-dim);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 16px;
    opacity: 0;
    animation: fadeUp 0.8s var(--ease-out-expo) 0.3s forwards;
}

/* Big Name */
.hero-title {
    margin-bottom: 40px;
}

.hero-name {
    font-family: var(--font-display);
    font-size: clamp(2rem, 30cqw, 18rem);
    font-weight: 900;
    line-height: 0.88;
    letter-spacing: -0.085em;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s var(--ease-out-expo) 0.5s forwards;
    filter: drop-shadow(0 4px 40px rgba(96, 165, 250, 0.18));
}

@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

.hero-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 32px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s var(--ease-out-expo) 1.3s forwards;
}

.hero-desc {
    max-width: 400px;
}

.hero-desc p {
    font-size: 1rem;
    color: var(--text-dim);
    line-height: 1.8;
    font-weight: 300;
}

.hero-social {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    text-decoration: none;
    padding: 10px 12px;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.hero-social a:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* Scroll hint */
.hero-scroll { display: none; }
.hero-big-number { display: none; }

/* buttons */

.btn-magnetic {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 40px;
    border: 1px solid var(--accent);
    background: transparent;
    color: var(--accent);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: color 0.4s, background 0.4s;
}

.btn-magnetic::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient);
    transform: translateY(101%);
    transition: transform 0.5s var(--ease-out-expo);
}

.btn-magnetic:hover::before {
    transform: translateY(0);
}

.btn-magnetic:hover {
    color: var(--bg);
    border-color: transparent;
}

.btn-magnetic-text,
.btn-magnetic-icon {
    position: relative;
    z-index: 1;
}

.btn-magnetic-icon svg {
    display: block;
    transition: transform 0.3s;
}

.btn-magnetic:hover .btn-magnetic-icon svg {
    transform: translate(3px, -3px);
}

/* sections */

section {
    position: relative;
    z-index: 2;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: 0 48px;
}

.section-label {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 40px;
}

.label-text {
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* reveal */

.reveal-up {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s var(--ease-out-expo),
                transform 0.8s var(--ease-out-expo);
}

.reveal-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* about */

.section-about {
    padding: 160px 0;
    border-top: 1px solid var(--border);
}

.about-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

.about-heading {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
    letter-spacing: -0.06em;
}

.about-heading em {
    font-style: italic;
    color: var(--accent);
}

.about-text-block {
    margin-bottom: 24px;
    padding-left: 32px;
    border-left: 1px solid var(--border);
}

.about-text-block p {
    font-size: 0.95rem;
    color: var(--text-dim);
    line-height: 1.9;
    font-weight: 300;
}

/* Skill Ratings */
.skill-ratings {
    margin-top: 48px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.rating-item {
    display: flex;
    align-items: center;
    gap: 24px;
}

.rating-name {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
    width: 120px;
    flex-shrink: 0;
}

.rating-circles {
    display: flex;
    gap: 10px;
}

.circle {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid var(--text-muted);
    transition: transform 0.4s var(--ease-out-expo), border-color 0.4s, background 0.4s, box-shadow 0.4s;
}

.circle.filled {
    background: var(--accent);
    border-color: var(--accent);
    transform: scale(0);
}

.circle.filled.pop {
    transform: scale(1);
}

/* marquee */

.marquee-section {
    overflow: hidden;
    padding: 24px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.marquee-track {
    display: flex;
    width: max-content;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: transform;
}

.marquee-track span {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
    text-transform: uppercase;
}

@keyframes marquee {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

/* projects */

.section-projects {
    padding: 160px 0;
}

.projects-showcase {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 48px;
    display: flex;
    flex-direction: column;
}

.project-item {
    border-top: 1px solid var(--border);
    position: relative;
}

.project-item:last-child {
    border-bottom: 1px solid var(--border);
}

.project-link-wrap {
    display: grid;
    grid-template-columns: auto 340px 1fr auto;
    align-items: center;
    gap: 40px;
    padding: 48px 0;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.4s;
    position: relative;
    z-index: 1;
}

.project-link-wrap:hover {
    opacity: 1;
}

.projects-showcase:hover .project-link-wrap {
    opacity: 0.3;
}

.projects-showcase:hover .project-link-wrap:hover {
    opacity: 1;
}

.project-index {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-muted);
    width: 40px;
}

.project-image-cinema {
    width: 340px;
    height: 220px;
    background: var(--bg-elevated);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border);
}

.project-img-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    transition: transform 0.8s var(--ease-out-expo), filter 0.6s;
}

.project-img-inner img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.4));
}

.project-link-wrap:hover .project-img-inner {
    transform: scale(1.08);
}

.project-img-overlay {
    position: absolute;
    inset: 0;
    background: var(--accent-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s;
}

.project-img-overlay span {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 600;
}

.project-link-wrap:hover .project-img-overlay {
    opacity: 1;
}

.project-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.project-name {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    letter-spacing: -0.06em;
    color: var(--text);
    transition: color 0.3s;
}

.project-link-wrap:hover .project-name {
    color: var(--accent);
}

.project-desc {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.6;
    font-weight: 300;
    max-width: 400px;
}

.project-tech {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.project-tech span {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 4px 12px;
    border: 1px solid var(--border);
    transition: border-color 0.3s, color 0.3s;
}

.project-link-wrap:hover .project-tech span {
    border-color: rgba(96, 165, 250, 0.15);
    color: var(--accent);
}

.project-arrow {
    color: var(--text-muted);
    transition: color 0.3s, transform 0.4s var(--ease-out-expo);
}

.project-link-wrap:hover .project-arrow {
    color: var(--accent);
    transform: translate(4px, -4px);
}

/* Spotlight Card Effect */
.spotlight-overlay {
    position: absolute;
    inset: 0 -120px;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
    background: radial-gradient(
        900px circle at var(--spot-x, 50%) var(--spot-y, 50%),
        rgba(96, 165, 250, 0.09),
        rgba(167, 139, 250, 0.03) 45%,
        transparent 70%
    );
}

.project-item:hover .spotlight-overlay {
    opacity: 1;
}

/* contact */

.section-contact {
    padding: 160px 0;
    border-top: 1px solid var(--border);
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

.contact-heading {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
    letter-spacing: -0.06em;
    margin-bottom: 48px;
}

.contact-heading em {
    font-style: italic;
    color: var(--accent);
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.contact-link-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: padding-left 0.4s var(--ease-out-expo);
}

.contact-link-item:hover {
    padding-left: 16px;
}

.contact-link-label {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.contact-link-value {
    font-size: 0.9rem;
    color: var(--text-dim);
    transition: color 0.3s;
}

.contact-link-item:hover .contact-link-value {
    color: var(--accent);
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.form-field {
    position: relative;
}

.form-field input,
.form-field textarea {
    width: 100%;
    padding: 20px 0 12px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--text-muted);
    color: var(--text);
    font-size: 1rem;
    font-family: var(--font-body);
    outline: none;
    transition: border-color 0.4s;
}

.form-field input:focus,
.form-field textarea:focus {
    border-color: var(--accent);
}

.form-field label {
    position: absolute;
    left: 0;
    top: 20px;
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    pointer-events: none;
    transition: all 0.3s var(--ease-out-expo);
}

.form-field input:focus ~ label,
.form-field input:not(:placeholder-shown) ~ label,
.form-field textarea:focus ~ label,
.form-field textarea:not(:placeholder-shown) ~ label {
    top: 0;
    font-size: 0.65rem;
    color: var(--accent);
}

.form-field textarea {
    resize: none;
    min-height: 120px;
}

.submit-btn {
    align-self: flex-start;
}

/* footer */

footer {
    padding: 48px 48px 40px;
    border-top: 1px solid var(--border);
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 40px;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    color: var(--text-dim);
}

.footer-copy {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

.footer-nav {
    display: flex;
    gap: 32px;
    justify-content: center;
}

.footer-nav a {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-nav a:hover {
    color: var(--text);
}

.footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    padding: 8px;
    border: 1px solid var(--border);
    text-decoration: none;
    transition: color 0.3s, border-color 0.3s;
}

.footer-social a:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.back-to-top {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 0.3s;
}

.back-to-top:hover { color: var(--accent); }

.back-to-top svg {
    transition: transform 0.3s;
}

.back-to-top:hover svg {
    transform: translateY(-3px);
}

/* responsive */

@media (max-width: 1200px) {
    .container { padding: 0 40px; }
    .projects-showcase { padding: 0 40px; }
}

@media (max-width: 1024px) {
    .project-link-wrap {
        grid-template-columns: auto 240px 1fr auto;
        gap: 24px;
    }

    .project-image-cinema {
        width: 240px;
        height: 160px;
    }
}

@media (max-width: 900px) {
    .about-layout,
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .project-link-wrap {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 32px 0;
    }

    .project-index { display: none; }

    .project-image-cinema {
        width: 100%;
        height: 220px;
    }

    .project-arrow { display: none; }
}

@media (max-width: 768px) {
    nav { padding: 20px 24px; }
    .container { padding: 0 24px; }
    .projects-showcase { padding: 0 24px; }
    footer { padding: 32px 24px; }

    .hero-name { font-size: clamp(2rem, 30cqw, 9rem); }

    nav ul {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        top: calc(100% + 8px);
        flex-direction: column;
        gap: 0;
        background: rgba(8, 11, 20, 0.97);
        backdrop-filter: blur(24px);
        border: 1px solid var(--border);
    }

    nav.nav-open ul { display: flex; }

    nav ul li a {
        display: block;
        padding: 18px 24px;
    }

    .nav-toggle { display: inline-flex; }

    .hero {
        padding: 120px 24px 60px;
        overflow-x: hidden;
        overflow-y: visible;
    }

    .hero-subtitle {
        font-size: clamp(0.65rem, 2.5vw, 0.9rem);
    }

    .hero-bottom {
        flex-direction: column;
        gap: 24px;
    }

    .hero-desc p {
        font-size: 0.9rem;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
        max-width: 320px;
    }

    .hero-cta .btn-magnetic,
    .hero-cta .btn-cv {
        width: 100%;
        justify-content: center;
    }

    .hero-social {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .about-text-block {
        padding-left: 20px;
    }

    .section-about,
    .section-projects,
    .section-contact {
        padding: 80px 0;
    }

    .contact-heading {
        margin-bottom: 32px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 24px;
    }

    .footer-left { align-items: center; }

    .footer-nav { gap: 20px; flex-wrap: wrap; }

    .footer-right {
        align-items: center;
    }
}

@media (max-width: 480px) {
    nav { padding: 16px; }
    .hero { padding: 100px 16px 40px; }
    .container { padding: 0 16px; }
    .projects-showcase { padding: 0 16px; }
    footer { padding: 24px 16px; }

    .hero-name { font-size: clamp(1.8rem, 30cqw, 6.5rem); }

    .marquee-section { padding: 16px 0; }

    .hero-desc p {
        font-size: 0.875rem;
    }

    .hero-social a {
        padding: 8px 10px;
    }

    .about-heading,
    .contact-heading {
        font-size: clamp(1.6rem, 7vw, 2.5rem);
    }

    .rating-name {
        width: 80px;
        font-size: 0.7rem;
    }

    .project-image-cinema {
        height: 180px;
    }

    .contact-link-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .contact-link-value {
        font-size: 0.8rem;
        word-break: break-all;
    }

    .submit-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 360px) {
    nav { padding: 14px 12px; }
    .hero { padding: 90px 12px 32px; }
    .container { padding: 0 12px; }
    .projects-showcase { padding: 0 12px; }
    footer { padding: 20px 12px; }

    .hero-name { font-size: clamp(1.5rem, 30cqw, 5rem); }

    .hero-cta { max-width: 100%; }

    .btn-magnetic,
    .btn-cv {
        padding: 14px 24px;
        font-size: 0.75rem;
    }
}

@media (hover: none) {
    .spotlight-overlay {
        display: none;
    }
}
