/* ==========================================================
   RESET
========================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #050b16;
    --bg-secondary: #091527;

    --card: #0e1d36;
    --card-hover: #132847;

    --primary: #2563eb;
    --primary-light: #60a5fa;
    --accent: #38bdf8;

    --text: #f8fafc;
    --muted: #94a3b8;

    --border: rgba(255, 255, 255, .08);

    --shadow: 0 12px 30px rgba(0, 0, 0, .25);

    --transition: .25s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 90% 5%, rgba(37, 99, 235, .22), transparent 28%),
        radial-gradient(circle at 10% 70%, rgba(56, 189, 248, .10), transparent 30%),
        var(--bg);
    line-height: 1.6;
}

/* ==========================================================
   GLOBAL
========================================================== */

section {
    padding: 80px 10%;
}

.section-dark {
    background: transparent;
}

.section-light {
    background: rgba(9, 21, 39, .72);
}

.section-header {
    max-width: 700px;
    margin: 0 auto 50px;
    text-align: center;
}

.section-tag {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: .8rem;
    font-weight: 700;
    margin-bottom: 14px;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3.3rem);
    line-height: 1.05;
    margin-bottom: 16px;
}

.section-header p {
    color: var(--muted);
    font-size: 1rem;
}

/* ==========================================================
   NAVIGATION
========================================================== */

nav {
    position: fixed;
    inset: 0 0 auto 0;
    height: 72px;
    padding: 0 10%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(16px);
    background: rgba(5, 11, 22, .82);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.logo {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -.5px;
}

.logo span {
    color: var(--primary-light);
}

nav ul {
    display: flex;
    gap: 28px;
    list-style: none;
}

nav a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

nav a:hover {
    color: var(--primary-light);
}

/* ==========================================================
   HERO
========================================================== */

.hero {
    position: relative;
    overflow: hidden;
    min-height: 92vh;
    padding-top: 120px;
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    align-items: center;
    gap: 40px;
}

.hero-glow {
    position: absolute;
    width: 500px;
    aspect-ratio: 1;
    right: 2%;
    top: 10%;
    background: radial-gradient(circle, rgba(37, 99, 235, .35), transparent 70%);
    filter: blur(30px);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 620px;
}

.hero h1 {
    font-size: clamp(3rem, 7vw, 5rem);
    line-height: .98;
    letter-spacing: -3px;
    margin-bottom: 20px;
}

.hero h1 span {
    color: var(--primary-light);
}

.hero-text {
    color: var(--muted);
    font-size: 1.05rem;
    margin-bottom: 32px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
}

.primary {
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 10px 24px rgba(37, 99, 235, .28);
}

.secondary {
    color: white;
    border: 1px solid var(--primary-light);
    background: rgba(255, 255, 255, .03);
}

.btn:hover {
    transform: translateY(-3px);
}

/* ==========================================================
   TERMINAL CARD
========================================================== */

.terminal-card {
    width: 340px;
    height: 320px;
    margin-inline: auto;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: linear-gradient(
        180deg,
        rgba(18, 37, 70, 0.92),
        rgba(10, 18, 36, 0.82)
    );
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: Consolas, "Fira Code", Monaco, monospace;
}

.terminal-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.terminal-title {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 600;
}

.terminal-body {
    padding: 18px;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text);
    flex-grow: 1;
    overflow: hidden;
}

.terminal-body pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Syntax Highlighting Token Colors */
.t-keyword { color: var(--accent); font-weight: 700; }
.t-string { color: var(--primary-light); }
.t-func { color: #93c5fd; }
.t-comment { color: var(--muted); font-style: italic; }

/* Typing Cursor */
.cursor {
    display: inline-block;
    width: 7px;
    height: 14px;
    background: var(--accent);
    vertical-align: middle;
    margin-left: 2px;
    animation: blink 0.8s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ==========================================================
   PROJECTS (TERMINAL FRAME STYLE)
========================================================== */

.project-grid,
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
}

.project-card,
.card {
    position: relative;
    overflow: hidden;
    padding: 0;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: linear-gradient(
        180deg,
        rgba(18, 37, 70, 0.92),
        rgba(10, 18, 36, 0.82)
    );
    transition: transform .25s ease, border-color .25s ease, background .25s ease;
    box-shadow: var(--shadow);
}

.project-card {
    color: var(--text);
    text-decoration: none;
    min-height: 220px;
    display: flex;
    flex-direction: column;
}

.project-card:hover,
.card:hover {
    transform: translateY(-5px);
    border-color: rgba(96, 165, 250, .45);
    background: var(--card-hover);
}

/* Card Terminal Header */
.card-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.card-num {
    display: inline-flex;
    width: 28px;
    height: 24px;
    justify-content: center;
    align-items: center;
    border-radius: 6px;
    background: rgba(37, 99, 235, 0.15);
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 800;
}

.card-file {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    font-family: Consolas, "Fira Code", Monaco, monospace;
}

/* Card Body & Text */
.card-body {
    padding: 16px 18px;
    flex-grow: 1;
}

.card-body pre {
    margin: 0;
    font-family: Consolas, "Fira Code", Monaco, monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Tech Pills / Footer */
.project-card small {
    padding: 12px 18px 16px;
    color: var(--primary-light);
    font-weight: 700;
    letter-spacing: .4px;
    font-size: 0.8rem;
}

/* ==========================================================
   SERVICES & CAPABILITIES
========================================================== */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 22px;
}

.card {
    display: flex;
    flex-direction: column;
    min-height: 200px;
}

.card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}

.card-body p {
    color: var(--text); /* Bright white text */
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}
/* ==========================================================
   ABOUT
========================================================== */

.about {
    text-align: center;
}

.about-content {
    max-width: 720px;
    margin: auto;
}

.about-content p {
    color: var(--muted);
    margin-bottom: 18px;
    font-size: 1rem;
}

/* ==========================================================
   SOCIAL LINKS
========================================================== */

.social-links {
    margin-top: 36px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
}

.social-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    background: var(--card);
    border: 1px solid var(--border);
    transition: all .25s ease;
}

.social-links a:hover {
    transform: translateY(-3px);
    border-color: var(--primary-light);
    color: var(--primary-light);
}

.social-links img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    /* Turns the SVG icon white */
    filter: brightness(0) invert(1);
    transition: filter .25s ease;
}

/* ==========================================================
   CONTACT
========================================================== */

.contact form {
    max-width: 680px;
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

input,
textarea,
select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(11, 22, 48, .85);
    color: var(--text);
    font: inherit;
    outline: none;
    transition:
        border-color .25s ease,
        box-shadow .25s ease,
        background .25s ease;
}

textarea {
    resize: vertical;
    min-height: 150px;
}

input::placeholder,
textarea::placeholder {
    color: var(--muted);
}

select {
    cursor: pointer;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, .12);
}

button {
    cursor: pointer;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font: inherit;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    transition: transform .25s ease, box-shadow .25s ease;
    box-shadow: 0 10px 24px rgba(37, 99, 235, .25);
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 34px rgba(37, 99, 235, .35);
}

/* ==========================================================
   FOOTER
========================================================== */

footer {
    padding: 36px 10%;
    text-align: center;
    border-top: 1px solid var(--border);
    background: #030815;
}

footer h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
}

footer p {
    color: var(--muted);
    font-size: .95rem;
}

/* ==========================================================
   ANIMATIONS
========================================================== */

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(-4deg); }
    50% { transform: translateY(-12px) rotate(4deg); }
}

/* ==========================================================
   SCROLLBAR
========================================================== */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: #1b3563;
    border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ==========================================================
   RESPONSIVE MEDIA QUERIES
========================================================== */

@media (max-width: 900px) {
    nav {
        height: auto;
        padding: 18px 7%;
        flex-direction: column;
        gap: 14px;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 18px;
    }

    section {
        padding: 70px 7%;
    }

    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 50px;
        padding-top: 150px;
    }

    .hero-content {
        margin: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .terminal-card {
        width: 100%;
        max-width: 340px;
    }

    .project-grid,
    .card-grid {
        grid-template-columns: 1fr;
    }

    .social-links {
        flex-direction: column;
        align-items: center;
    }

    .social-links a {
        width: 100%;
        max-width: 320px;
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .hero h1 {
        font-size: 2.7rem;
        letter-spacing: -2px;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .btn {
        width: 100%;
    }

    .hero-buttons {
        flex-direction: column;
    }
}
