/* =========================================================
   RESET
========================================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    color: #0f172a;
    background: #ffffff;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

img {
    max-width: 100%;
    display: block;
}


/* =========================================================
   VARIABLES
========================================================= */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;

    --dark: #0f172a;
    --dark-soft: #1e293b;

    --text: #334155;
    --muted: #64748b;

    --border: #e2e8f0;

    --light: #f8fafc;
    --white: #ffffff;

    --success: #16a34a;

    --container: 1120px;
}


/* =========================================================
   GLOBAL
========================================================= */

.container {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
}

.section {
    padding: 110px 0;
}

.section-heading {
    max-width: 720px;
    margin: 0 auto 60px;
    text-align: center;
}

.section-label {
    margin-bottom: 12px;

    color: var(--primary);

    font-size: 0.78rem;
    font-weight: 800;

    letter-spacing: 2px;
}

.section-heading h2 {
    margin-bottom: 18px;

    color: var(--dark);

    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;

    letter-spacing: -1px;
}

.section-heading p:not(.section-label) {
    color: var(--muted);
}


/* =========================================================
   HEADER
========================================================= */

.header {
    position: fixed;

    top: 0;
    left: 0;

    width: 100%;

    z-index: 1000;

    background: rgba(255, 255, 255, 0.94);

    border-bottom: 1px solid rgba(226, 232, 240, 0.8);

    backdrop-filter: blur(12px);

    transition: box-shadow 0.3s ease;
}

.header.scrolled {
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.navbar {
    width: min(1120px, calc(100% - 40px));

    min-height: 72px;

    margin: 0 auto;

    display: flex;

    align-items: center;

    justify-content: space-between;
}

.logo {
    color: var(--dark);

    font-size: 1.3rem;
    font-weight: 800;

    letter-spacing: -0.5px;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;

    align-items: center;

    gap: 34px;

    list-style: none;
}

.nav-links a {
    color: #475569;

    font-size: 0.92rem;
    font-weight: 600;

    transition:
        color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.menu-toggle {
    display: none;

    border: 0;

    background: transparent;

    color: var(--dark);

    font-size: 1.6rem;
}


/* =========================================================
   BUTTONS
========================================================= */

.btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 48px;

    padding: 0 22px;

    border-radius: 8px;

    font-size: 0.9rem;
    font-weight: 700;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: white;
    background: var(--primary);

    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    background: var(--primary-dark);

    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.25);
}

.btn-secondary {
    color: var(--dark);

    background: white;

    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}


/* =========================================================
   HERO
========================================================= */

.hero {
    min-height: 100vh;

    padding: 150px 0 100px;

    display: flex;
    align-items: center;

    background:
        radial-gradient(
            circle at 80% 20%,
            rgba(37, 99, 235, 0.08),
            transparent 28%
        ),
        #f8fafc;
}

.hero-container {
    width: min(1120px, calc(100% - 40px));

    margin: 0 auto;

    display: grid;

    grid-template-columns: 1.1fr 0.9fr;

    gap: 70px;

    align-items: center;
}

.eyebrow {
    margin-bottom: 18px;

    color: var(--primary);

    font-size: 0.8rem;
    font-weight: 800;

    letter-spacing: 2px;
}

.hero h1 {
    max-width: 680px;

    margin-bottom: 25px;

    color: var(--dark);

    font-size: clamp(3rem, 6vw, 5rem);

    line-height: 0.98;

    letter-spacing: -4px;
}

.hero h1 span {
    color: var(--primary);
}

.hero-description {
    max-width: 620px;

    margin-bottom: 32px;

    color: var(--muted);

    font-size: 1.08rem;
}

.hero-buttons {
    display: flex;

    flex-wrap: wrap;

    gap: 12px;
}

.hero-links {
    display: flex;

    align-items: center;

    gap: 12px;

    margin-top: 28px;

    color: var(--muted);

    font-size: 0.9rem;
}

.hero-links a {
    font-weight: 700;
}

.hero-links a:hover {
    color: var(--primary);
}


/* =========================================================
   TERMINAL
========================================================= */

.hero-card {
    width: 100%;
}

.terminal-window {
    overflow: hidden;

    border-radius: 12px;

    background: #0b1120;

    border: 1px solid #1e293b;

    box-shadow:
        0 30px 70px rgba(15, 23, 42, 0.18);
}

.terminal-header {
    min-height: 46px;

    padding: 0 16px;

    display: flex;

    align-items: center;

    gap: 15px;

    background: #111827;

    border-bottom: 1px solid #1e293b;
}

.terminal-header p {
    color: #94a3b8;

    font-size: 0.75rem;
}

.terminal-dots {
    display: flex;

    gap: 6px;
}

.terminal-dots span {
    width: 9px;
    height: 9px;

    border-radius: 50%;

    background: #64748b;
}

.terminal-body {
    min-height: 350px;

    padding: 28px;

    color: #e2e8f0;

    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;

    font-size: 0.83rem;

    line-height: 1.8;
}

.terminal-green {
    color: #4ade80;
}

.terminal-blue {
    color: #60a5fa;
}

.terminal-output {
    color: #94a3b8;
}

.terminal-success {
    color: #4ade80;
}


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

.about {
    background: white;
}

.about-grid {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 80px;

    align-items: start;
}

.about-text p {
    margin-bottom: 22px;

    color: var(--text);

    font-size: 1.02rem;
}

.about-focus {
    border-top: 1px solid var(--border);
}

.focus-item {
    display: grid;

    grid-template-columns: 50px 1fr;

    gap: 18px;

    padding: 24px 0;

    border-bottom: 1px solid var(--border);
}

.focus-number {
    color: var(--primary);

    font-weight: 800;

    font-size: 0.85rem;
}

.focus-item h3 {
    margin-bottom: 5px;

    color: var(--dark);

    font-size: 1rem;
}

.focus-item p {
    color: var(--muted);

    font-size: 0.9rem;
}


/* =========================================================
   SKILLS
========================================================= */

.skills-section {
    background: var(--light);
}

.skills-grid {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 20px;
}

.skill-card {
    padding: 30px;

    background: white;

    border: 1px solid var(--border);

    border-radius: 10px;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

.skill-card:hover {
    transform: translateY(-5px);

    border-color: #cbd5e1;

    box-shadow:
        0 18px 40px rgba(15, 23, 42, 0.08);
}

.skill-icon {
    width: 42px;
    height: 42px;

    margin-bottom: 22px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 8px;

    color: var(--primary);

    background: #eff6ff;

    font-weight: 800;
}

.skill-card h3 {
    margin-bottom: 10px;

    color: var(--dark);

    font-size: 1.05rem;
}

.skill-card p {
    min-height: 78px;

    margin-bottom: 20px;

    color: var(--muted);

    font-size: 0.9rem;
}

.skill-tags,
.project-tech {
    display: flex;

    flex-wrap: wrap;

    gap: 7px;
}

.skill-tags span,
.project-tech span {
    padding: 5px 9px;

    border-radius: 5px;

    background: #f1f5f9;

    color: #475569;

    font-size: 0.72rem;

    font-weight: 700;
}


/* =========================================================
   PROJECTS
========================================================= */

.projects-section {
    background: white;
}

.projects-grid {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 24px;
}

.project-card {
    padding: 35px;

    border: 1px solid var(--border);

    border-radius: 12px;

    background: white;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.project-card:hover {
    transform: translateY(-5px);

    box-shadow:
        0 20px 45px rgba(15, 23, 42, 0.08);
}

.featured-project {
    border-top: 3px solid var(--primary);
}

.project-top {
    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 22px;
}

.project-type {
    color: var(--primary);

    font-size: 0.7rem;
    font-weight: 800;

    letter-spacing: 1.5px;
}

.project-number {
    color: #cbd5e1;

    font-size: 1.2rem;
    font-weight: 800;
}

.project-card h3 {
    margin-bottom: 15px;

    color: var(--dark);

    font-size: 1.35rem;

    line-height: 1.2;
}

.project-card > p {
    margin-bottom: 22px;

    color: var(--muted);

    font-size: 0.92rem;
}

.project-details {
    margin: 0 0 25px;

    padding-left: 18px;
}

.project-details li {
    margin-bottom: 8px;

    color: var(--text);

    font-size: 0.88rem;
}


/* =========================================================
   LEARNING
========================================================= */

.learning-section {
    background: var(--dark);

    color: white;
}

.learning-content {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 80px;

    align-items: center;
}

.learning-content h2 {
    max-width: 560px;

    margin-bottom: 20px;

    color: white;

    font-size: clamp(2rem, 4vw, 3rem);

    line-height: 1.1;

    letter-spacing: -1px;
}

.learning-content > div:first-child p:last-child {
    max-width: 560px;

    color: #94a3b8;
}

.learning-list {
    border-top: 1px solid #334155;
}

.learning-list div {
    display: flex;

    align-items: center;

    gap: 20px;

    padding: 18px 0;

    border-bottom: 1px solid #334155;

    color: #e2e8f0;

    font-weight: 600;
}

.learning-list span {
    color: #60a5fa;

    font-family: monospace;
}


/* =========================================================
   CONTACT
========================================================= */

.contact-section {
    background: var(--light);
}

.contact-card {
    display: grid;

    grid-template-columns: 0.8fr 1.2fr;

    gap: 70px;

    padding: 55px;

    border-radius: 14px;

    background: white;

    border: 1px solid var(--border);

    box-shadow:
        0 20px 50px rgba(15, 23, 42, 0.06);
}

.contact-intro h2 {
    margin-bottom: 18px;

    color: var(--dark);

    font-size: clamp(2rem, 4vw, 2.8rem);

    line-height: 1.1;
}

.contact-intro > p:not(.section-label) {
    margin-bottom: 28px;

    color: var(--muted);
}

.contact-links {
    display: flex;

    flex-direction: column;

    gap: 10px;
}

.contact-links a {
    color: var(--text);

    font-size: 0.9rem;
    font-weight: 600;
}

.contact-links a:hover {
    color: var(--primary);
}

.contact-form {
    width: 100%;
}

.form-row {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 15px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;

    margin-bottom: 7px;

    color: var(--dark);

    font-size: 0.82rem;
    font-weight: 700;
}

.form-group input,
.form-group textarea {
    width: 100%;

    padding: 13px 14px;

    color: var(--dark);

    background: white;

    border: 1px solid var(--border);

    border-radius: 7px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.form-group textarea {
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.1);
}

#form-message {
    margin-top: 15px;

    font-size: 0.85rem;
    font-weight: 600;
}


/* =========================================================
   FOOTER
========================================================= */

.footer {
    padding: 55px 0 25px;

    color: #94a3b8;

    background: #020617;
}

.footer-content {
    display: flex;

    justify-content: space-between;

    gap: 50px;

    padding-bottom: 35px;

    border-bottom: 1px solid #1e293b;
}

.footer .logo {
    color: white;
}

.footer-content > div:first-child p {
    max-width: 380px;

    margin-top: 12px;

    font-size: 0.85rem;
}

.footer-nav {
    display: flex;

    gap: 25px;

    align-items: center;
}

.footer-nav a {
    font-size: 0.85rem;
}

.footer-nav a:hover {
    color: white;
}

.footer-bottom {
    padding-top: 22px;

    display: flex;

    justify-content: space-between;

    gap: 20px;

    font-size: 0.75rem;
}


/* =========================================================
   BACK TO TOP
========================================================= */

#back-to-top {
    position: fixed;

    right: 25px;
    bottom: 25px;

    width: 45px;
    height: 45px;

    display: flex;

    align-items: center;
    justify-content: center;

    border: 0;

    border-radius: 8px;

    color: white;

    background: var(--primary);

    font-size: 1.2rem;

    opacity: 0;

    visibility: hidden;

    transform: translateY(10px);

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease,
        transform 0.3s ease;
}

#back-to-top.visible {
    opacity: 1;

    visibility: visible;

    transform: translateY(0);
}


/* =========================================================
   REVEAL ANIMATION
========================================================= */

.reveal {
    opacity: 0;

    transform: translateY(25px);

    transition:
        opacity 0.7s ease,
        transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;

    transform: translateY(0);
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 900px) {

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

    .hero-content {
        text-align: center;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons,
    .hero-links {
        justify-content: center;
    }

    .hero-card {
        max-width: 650px;

        margin: 0 auto;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .learning-content {
        gap: 45px;
    }

    .contact-card {
        gap: 40px;
    }
}


@media (max-width: 700px) {

    .section {
        padding: 80px 0;
    }

    .navbar {
        position: relative;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;

        top: 72px;
        left: 0;

        width: 100%;

        padding: 20px;

        display: none;

        flex-direction: column;

        align-items: flex-start;

        gap: 18px;

        background: white;

        border-bottom: 1px solid var(--border);

        box-shadow:
            0 15px 30px rgba(15, 23, 42, 0.08);
    }

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

    .hero {
        padding-top: 125px;
    }

    .hero h1 {
        letter-spacing: -2px;
    }

    .terminal-body {
        min-height: 280px;

        padding: 20px;

        font-size: 0.72rem;
    }

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

    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-card {
        padding: 30px;
    }

    .footer-content,
    .footer-bottom {
        flex-direction: column;
    }

    .footer-nav {
        flex-wrap: wrap;
    }
}


@media (max-width: 480px) {

    .container,
    .navbar,
    .hero-container {
        width: min(100% - 28px, 1120px);
    }

    .hero h1 {
        font-size: 2.8rem;
    }

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

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

    .project-card,
    .skill-card {
        padding: 25px;
    }

    .contact-card {
        padding: 24px;
    }
}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }

    .reveal {
        opacity: 1;

        transform: none;
    }
}