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

/* ── Reveal on Scroll ── */
.reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 700ms ease-out, transform 700ms ease-out;
    will-change: opacity, transform;
}

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

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a25;
    --accent: #00d4ff;
    --accent-dim: rgba(0, 212, 255, 0.1);
    --accent-glow: rgba(0, 212, 255, 0.3);
    --text-primary: #e8e8f0;
    --text-secondary: #9898a8;
    --text-muted: #6a6a7a;
    --border: #2a2a38;
    --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-mono: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
}

html {
    scroll-behavior: smooth;
    touch-action: pan-x pan-y;
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    touch-action: pan-x pan-y;
}

/* NAV */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--accent);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s;
}

/* HERO */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 4rem;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    opacity: 0.15;
    pointer-events: none;
}

.hero-content {
    text-align: center;
    max-width: 750px;
    position: relative;
}

.hero-label {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

/* HERO NAME — bounce/shadow effect */
.hero-name-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
}

.hero-name {
    font-size: clamp(2rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    user-select: none;
}

.hero-name .wrapper {
    padding-left: 4px;
    padding-right: 4px;
    padding-top: 10px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.hero-name .wrapper .letter {
    transition: ease-out 0.5s;
    transform: translateY(0);
    color: var(--text-primary);
}

.hero-name .wrapper .shadow {
    transform: scaleY(-1);
    color: var(--accent);
    opacity: 0.25;
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, transparent 70%);
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, transparent 70%);
}

.hero-name .wrapper:hover .letter {
    transform: translateY(-50%) !important;
    color: var(--accent) !important;
    text-shadow: 0 0 1.5rem var(--accent-glow) !important;
}

.hero-name .wrapper:hover .shadow {
    opacity: 0 !important;
    transform: scaleY(-1) translateY(-50%) !important;
}

/* Intro animation */
@keyframes letterBounceIn {
    0% { transform: translateY(-50%); color: var(--accent); text-shadow: 0 0 1.5rem var(--accent-glow); }
    60% { transform: translateY(10%); }
    100% { transform: translateY(0); color: var(--text-primary); text-shadow: none; }
}

@keyframes shadowFadeIn {
    0% { opacity: 0; transform: scaleY(-1) translateY(-50%); }
    60% { opacity: 0.3; transform: scaleY(-1) translateY(10%); }
    100% { opacity: 0.25; transform: scaleY(-1); }
}

.hero-name .wrapper.intro .letter {
    animation: letterBounceIn 0.5s ease-out forwards;
}

.hero-name .wrapper.intro .shadow {
    animation: shadowFadeIn 0.5s ease-out forwards;
}

.hero-name .space {
    width: 0.3em;
}

.hero-title {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.hero-location {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.hero-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-scroll-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2.5rem auto 0;
    background: none;
    border: 2px solid rgba(0, 212, 255, 0.35);
    border-radius: 50%;
    width: 52px;
    height: 52px;
    cursor: pointer;
    color: var(--accent);
    transition: border-color 0.3s, background 0.3s, transform 0.3s;
    animation: heroArrowBob 2s ease-in-out infinite;
}

.hero-scroll-btn:hover {
    border-color: var(--accent);
    background: rgba(0, 212, 255, 0.08);
    animation-play-state: paused;
    transform: translateY(4px);
}

.hero-scroll-arrow {
    width: 28px;
    height: 28px;
    display: block;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
}

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

.btn-primary:hover {
    background: transparent;
    color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

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

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}


/* SECTIONS */
section {
    padding: 5rem 2rem;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

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

.section-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.divider {
    width: 60px;
    height: 3px;
    background: var(--accent);
    margin-top: 1rem;
}

/* ABOUT / SUMMARY */
#about {
    background: var(--bg-secondary);
}

.about-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 800px;
    line-height: 1.8;
}

/* SKILLS */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 2rem;
    transition: all 0.3s;
}

.skill-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.skill-card-title {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

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

.skill-tag {
    background: var(--accent-dim);
    color: var(--text-primary);
    padding: 0.35rem 0.85rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(0, 212, 255, 0.15);
}

/* EXPERIENCE */
#experience {
    background: var(--bg-secondary);
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 2rem;
}

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.35rem;
    top: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.timeline-company {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
}

.timeline-role {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 0.25rem;
}

.timeline-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.timeline-bullets {
    list-style: none;
}

.timeline-bullets li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.timeline-bullets li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.5;
}

.highlight {
    color: inherit;
}

/* PROJECTS */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 2rem;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.project-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.project-tech {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.project-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: gap 0.3s;
}

.project-link:hover {
    gap: 0.7rem;
}

.project-link .arrow {
    transition: transform 0.3s;
}

.project-link:hover .arrow {
    transform: translateX(3px);
}

/* EDUCATION */
#education {
    background: var(--bg-secondary);
}

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

.edu-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 2rem;
}

.edu-school {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.edu-location {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.edu-focus {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.edu-dates {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent);
    margin-top: 0.75rem;
}

/* CONTACT */
.contact-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.contact-intro {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 2rem;
    text-align: center;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.form-group input,
.form-group textarea {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.85rem 1rem;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: border-color 0.3s;
    outline: none;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-group textarea {
    min-height: 140px;
}

.form-submit {
    background: var(--accent);
    color: var(--bg-primary);
    border: 2px solid var(--accent);
    border-radius: 6px;
    padding: 0.85rem 2rem;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-family: var(--font-main);
    letter-spacing: 0.5px;
}

.form-submit:hover {
    background: transparent;
    color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

.form-status {
    text-align: center;
    font-size: 0.9rem;
    min-height: 1.5rem;
}

.form-status.success {
    color: #00e676;
}

.form-status.error {
    color: #ff5252;
}

/* FOOTER */
footer {
    border-top: 1px solid var(--border);
    padding: 2rem;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(10, 10, 15, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        padding: 1.5rem 2rem;
        gap: 1.25rem;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        font-size: 1.1rem;
        padding: 0.5rem 1rem;
    }

    .hamburger {
        display: flex;
    }

    section {
        padding: 3.5rem 1.25rem;
    }

    .hero {
        padding: 5rem 1.25rem 3rem;
    }

    .hero-name .wrapper {
        padding-left: 1px;
        padding-right: 1px;
        padding-top: 6px;
    }

    .hero-name .wrapper:hover .letter {
        transform: translateY(-30%) !important;
    }

    .hero-name .wrapper:hover .shadow {
        transform: scaleY(-1) translateY(-30%) !important;
    }

    .hero-title {
        font-size: 1rem;
    }

    .hero-links {
        gap: 0.75rem;
    }

    .btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.8rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

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

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

    .skill-card,
    .project-card,
    .edu-card {
        padding: 1.5rem;
    }

    .timeline {
        padding-left: 1.5rem;
    }

    .timeline-item {
        padding-left: 1.25rem;
    }

    .timeline-bullets li {
        font-size: 0.9rem;
    }

    .hero-scroll-btn {
        display: none;
    }

    .about-text {
        font-size: 1rem;
    }

    .contact-intro {
        font-size: 0.95rem;
    }

    .footer-links {
        gap: 1.25rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 4.5rem 1rem 2.5rem;
    }

    .hero-name {
        font-size: clamp(1.5rem, 8vw, 2.5rem);
    }

    .hero-label {
        font-size: 0.75rem;
    }

    .hero-title {
        font-size: 0.9rem;
    }

    .hero-location {
        font-size: 0.75rem;
    }

    .hero-links {
        flex-direction: column;
        align-items: center;
        gap: 0.6rem;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }


    section {
        padding: 2.5rem 1rem;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .timeline-company {
        font-size: 1rem;
    }

    .timeline-meta {
        font-size: 0.8rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.75rem;
    }
}
