:root {
    --primary-color: #51d171;
    --primary-dim: rgba(81, 209, 113, 0.10);
    --primary-glow: rgba(81, 209, 113, 0.25);
    --secondary-color: #1e2035;
    --accent-color: #f3c251;
    --text-color: #eef0f7;
    --text-muted: #8892aa;
    --text-faint: #555e75;
    --background-color: #13141f;
    --surface-color: #181928;
    --border-color: rgba(255, 255, 255, 0.07);
    --border-hover: rgba(81, 209, 113, 0.30);

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;

    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.30), 0 0 0 1px var(--border-color);
    --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.40), 0 0 0 1px var(--border-hover);

    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    font-family: 'Segoe UI', system-ui, sans-serif;
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Scroll */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

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

.reveal-delay-1 {
    transition-delay: 0.10s;
}

.reveal-delay-2 {
    transition-delay: 0.20s;
}

.reveal-delay-3 {
    transition-delay: 0.30s;
}

/* HEADER & NAVIGATION */
header {
    padding: 0 60px;
    height: 64px;
    position: fixed;
    width: 100%;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    background: rgba(19, 20, 31, 0.80);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: background 0.3s var(--ease);
}

header.scrolled {
    background: rgba(19, 20, 31, 0.96);
}

nav {
    display: flex;
    align-items: center;
    gap: 36px;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: color 0.2s var(--ease);
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--primary-color);
    transition: width 0.25s var(--ease);
    border-radius: 2px;
}

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

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

/* ============================================
    MAIN CONTENT
    ============================================ */
main {
    padding-top: 64px;
}

/* ============================================
    HERO SECTION
    ============================================ */
.hero {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 60px;
    position: relative;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    width: 100%;
    gap: 80px;
}

.hero-text {
    flex: 1;
}

.accent-line {
    width: 48px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    margin-bottom: 32px;
    opacity: 0;
    animation: slide-in-line 0.6s 0.2s var(--ease) forwards;
}

@keyframes slide-in-line {
    from {
        width: 0;
        opacity: 0;
    }

    to {
        width: 48px;
        opacity: 1;
    }
}

.hero-text h1 {
    font-size: clamp(48px, 6vw, 76px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -1.5px;
    margin-bottom: 14px;
    opacity: 0;
    animation: fade-up 0.7s 0.3s var(--ease) forwards;
}

.pronouns {
    font-size: 14px;
    color: var(--text-faint);
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    opacity: 0;
    animation: fade-up 0.7s 0.4s var(--ease) forwards;
}

.subtitle {
    font-size: 18px;
    color: var(--primary-color);
    font-weight: 500;
    letter-spacing: 0.2px;
    margin-bottom: 40px;
    opacity: 0;
    animation: fade-up 0.7s 0.5s var(--ease) forwards;
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.social-icons {
    display: flex;
    gap: 12px;
    opacity: 0;
    animation: fade-up 0.7s 0.6s var(--ease) forwards;
}

.social-icons a {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 17px;
    text-decoration: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--surface-color);
    transition: color 0.2s var(--ease), border-color 0.2s var(--ease),
        background 0.2s var(--ease), transform 0.2s var(--ease-spring);
}

.social-icons a:hover {
    color: var(--primary-color);
    border-color: var(--border-hover);
    background: var(--primary-dim);
    transform: translateY(-2px);
}

/* Hero image */
.hero-image {
    flex: 0 0 auto;
    opacity: 0;
    animation: fade-in-image 0.9s 0.4s var(--ease) forwards;
}

@keyframes fade-in-image {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.image-frame {
    position: relative;
    width: 360px;
    height: 460px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-color);
}

.image-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s var(--ease);
}

.image-frame:hover img {
    transform: scale(1.03);
}

/* ============================================
    SHARED SECTION STYLES
    ============================================ */
section {
    padding: 100px 60px;
}

section:nth-child(even) {
    background-color: var(--surface-color);
}

section:nth-child(odd) {
    background-color: var(--background-color);
}

.section-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 14px;
}

/* ============================================
    ABOUT SECTION
    ============================================ */

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

.about-me h2 {
    font-size: clamp(32px, 4vw, 46px);
    font-weight: 700;
    letter-spacing: -0.8px;
    margin-bottom: 40px;
    color: var(--text-color);
    line-height: 1.15;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.about-content p {
    font-size: 17px;
    line-height: 1.85;
    color: var(--text-muted);
    font-weight: 400;
}

.about-content strong {
    color: var(--primary-color);
    font-weight: 600;
}

.about-content a {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.2s;
}

.about-content a:hover {
    text-decoration-color: var(--primary-color);
}

/* ============================================
    PROJECTS SECTION
    ============================================ */
.projects-container {
    max-width: 1200px;
    margin: 0 auto;
}

.projects h2 {
    font-size: clamp(32px, 4vw, 46px);
    font-weight: 700;
    letter-spacing: -0.8px;
    margin-bottom: 56px;
    color: var(--text-color);
}

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

.project-card {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform 0.3s var(--ease-spring), box-shadow 0.3s var(--ease);
    border: 1px solid var(--border-color);
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.project-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #1e2035;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
    filter: brightness(0.92) saturate(0.95);
}

.project-card:hover .project-image img {
    transform: scale(1.04);
    filter: brightness(1) saturate(1.05);
}

.project-info {
    padding: 28px;
}

.project-info h3 {
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.3px;
    margin-bottom: 4px;
    color: var(--text-color);
}

.project-date {
    font-size: 12px;
    color: var(--text-faint);
    letter-spacing: 0.3px;
    margin-bottom: 12px;
}

.project-info p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tag {
    background: var(--primary-dim);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(81, 209, 113, 0.15);
    transition: background 0.2s, border-color 0.2s;
}

.project-card:hover .tag {
    background: rgba(81, 209, 113, 0.15);
    border-color: rgba(81, 209, 113, 0.3);
}

.project-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.25s var(--ease);
}

.project-link:hover {
    gap: 10px;
}

/* ============================================
    TOOLS SECTION
    ============================================ */
.tools-container {
    max-width: 1100px;
    margin: 0 auto;
}

.tools h2 {
    font-size: clamp(32px, 4vw, 46px);
    font-weight: 700;
    letter-spacing: -0.8px;
    margin-bottom: 56px;
    color: var(--text-color);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.tool-item {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 28px 16px 22px;
    text-align: center;
    font-size: 36px;
    color: var(--text-faint);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 110px;
    transition: color 0.2s var(--ease), border-color 0.2s var(--ease),
        background 0.2s var(--ease), transform 0.2s var(--ease-spring);
    position: relative;
    overflow: hidden;
}

.tool-item::after {
    content: attr(title);
    position: absolute;
    bottom: 10px;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: var(--text-faint);
    transition: color 0.2s;
}

.tool-item:hover {
    color: var(--primary-color);
    border-color: var(--border-hover);
    background: var(--primary-dim);
    transform: translateY(-3px);
}

.tool-item:hover::after {
    color: var(--primary-color);
}

/* ============================================
    FOOTER
    ============================================ */
footer {
    padding: 28px 60px;
    text-align: center;
    background: var(--secondary-color);
    border-top: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-faint);
}

/* ============================================
    MARS PLANET MODAL
    ============================================ */
.clickable-mars {
    cursor: pointer;
    color: var(--primary-color);
    transition: opacity 0.2s;
}

.clickable-mars:hover {
    opacity: 0.8;
}

.mars-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 12, 0.97);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.mars-modal.active {
    display: flex;
    animation: fadeIn 0.4s var(--ease);
}

.mars-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.mars-planet {
    position: absolute;
    left: -400px;
    top: 50%;
    transform: translateY(-50%);
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle at 38% 38%, #e07850, #b03010 50%, #5a1008 100%);
    box-shadow:
        inset -40px -40px 80px rgba(0, 0, 0, 0.5),
        0 0 80px rgba(200, 80, 50, 0.4),
        0 0 160px rgba(200, 80, 50, 0.15);
    animation:
        travelAcrossScreen 3.2s var(--ease) forwards,
        rotatePlanet 3.2s linear infinite,
        pulse 2s ease-in-out infinite;
    overflow: hidden;
}

.mars-surface {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 40%, rgba(130, 55, 15, 0.45) 5%, transparent 16%),
        radial-gradient(circle at 70% 60%, rgba(110, 40, 12, 0.35) 8%, transparent 20%),
        radial-gradient(circle at 50% 78%, rgba(95, 60, 25, 0.50) 6%, transparent 18%),
        radial-gradient(circle at 20% 68%, rgba(130, 55, 18, 0.30) 4%, transparent 13%),
        radial-gradient(circle at 78% 28%, rgba(150, 75, 40, 0.38) 7%, transparent 16%);
    animation: surfaceMove 6s linear infinite;
}

.stars {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1.5px 1.5px at 10% 20%, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(1px 1px at 18% 48%, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(1.5px 1.5px at 28% 72%, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(1px 1px at 38% 15%, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(1.5px 1.5px at 52% 60%, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(1px 1px at 63% 35%, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(1.5px 1.5px at 74% 80%, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(1px 1px at 83% 22%, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(1.5px 1.5px at 91% 55%, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(1px 1px at 6% 85%, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(1px 1px at 45% 40%, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(1.5px 1.5px at 58% 92%, rgba(255, 255, 255, 0.7), transparent);
    animation: twinkle 4s ease-in-out infinite alternate;
}

/* ============================================
    ANIMATIONS
    ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes travelAcrossScreen {
    0% {
        left: -400px;
    }

    100% {
        left: calc(100% + 120px);
    }
}

@keyframes rotatePlanet {
    from {
        transform: translateY(-50%) rotate(0deg);
    }

    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

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

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

@keyframes pulse {

    0%,
    100% {
        box-shadow:
            inset -40px -40px 80px rgba(0, 0, 0, 0.5),
            0 0 80px rgba(200, 80, 50, 0.4),
            0 0 160px rgba(200, 80, 50, 0.15);
    }

    50% {
        box-shadow:
            inset -40px -40px 80px rgba(0, 0, 0, 0.5),
            0 0 110px rgba(200, 80, 50, 0.55),
            0 0 220px rgba(200, 80, 50, 0.22);
    }
}

@keyframes twinkle {
    from {
        opacity: 0.3;
    }

    to {
        opacity: 1;
    }
}

/* ============================================
    RESPONSIVE
    ============================================ */
@media (max-width: 1024px) {
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
        gap: 48px;
    }

    .accent-line {
        margin: 0 auto 32px;
    }

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

    .image-frame {
        width: 300px;
        height: 380px;
    }
}

@media (max-width: 768px) {
    header {
        padding: 0 24px;
    }

    nav {
        gap: 24px;
    }

    nav a {
        font-size: 13px;
    }

    .hero {
        padding: 60px 24px;
    }

    section {
        padding: 72px 24px;
    }

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

    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    footer {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    nav {
        gap: 16px;
    }

    nav a {
        font-size: 12px;
    }

    .image-frame {
        width: 260px;
        height: 320px;
    }

    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}