/* --- GOOGLE FONTS --- */
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500&family=Inter:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');

/* --- VARIABLES --- */
:root {
    /* Colors */
    --bg-color: #050810; /* Deepest blue/black */
    --surface-color: #0b1120; /* Slightly lighter surface */
    --surface-color-light: #162032; /* Card hover surface */
    --primary-color: #00e5ff; /* Cyber Cyan */
    --primary-color-alt: #00b4d8;
    --text-color: #94a3b8; /* Slate text */
    --title-color: #f8fafc; /* White/slate title */
    --border-color: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(11, 17, 32, 0.7);
    
    /* Tag Colors */
    --tag-off-bg: rgba(239, 68, 68, 0.1);
    --tag-off-color: #ef4444;
    --tag-def-bg: rgba(16, 185, 129, 0.1);
    --tag-def-color: #10b981;
    --tag-sec-bg: rgba(139, 92, 246, 0.1);
    --tag-sec-color: #8b5cf6;

    /* Fonts & Typography */
    --body-font: 'Inter', sans-serif;
    --title-font: 'Poppins', sans-serif;
    --mono-font: 'Fira Code', monospace;
    
    --biggest-font-size: 2.5rem;
    --h1-font-size: 2.25rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;
    --smaller-font-size: 0.813rem;

    /* Font Weights */
    --font-medium: 500;
    --font-semi-bold: 600;

    /* Margins */
    --mb-0-5: 0.5rem;
    --mb-0-75: 0.75rem;
    --mb-1: 1rem;
    --mb-1-5: 1.5rem;
    --mb-2: 2rem;
    --mb-2-5: 2.5rem;
    --mb-3: 3rem;

    /* z-index */
    --z-tooltip: 10;
    --z-fixed: 100;
}

/* Responsive typography */
@media screen and (min-width: 968px) {
    :root {
        --biggest-font-size: 4rem;
        --h1-font-size: 3rem;
        --h2-font-size: 2.25rem;
        --h3-font-size: 1.5rem;
        --normal-font-size: 1.125rem;
        --small-font-size: 1rem;
        --smaller-font-size: 0.875rem;
    }
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    color: var(--title-color);
    font-family: var(--title-font);
    font-weight: var(--font-semi-bold);
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

img {
    max-width: 100%;
    height: auto;
}

.text-primary {
    color: var(--primary-color);
}

/* --- REUSABLE CSS CLASSES --- */
.container {
    max-width: 1100px;
    margin-left: var(--mb-1-5);
    margin-right: var(--mb-1-5);
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.section {
    padding: 6rem 0 2rem;
}

.section__title {
    font-size: var(--h1-font-size);
    text-align: center;
}

.section__subtitle {
    display: block;
    font-size: var(--small-font-size);
    color: var(--primary-color);
    text-align: center;
    margin-bottom: var(--mb-3);
    font-family: var(--mono-font);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    column-gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: 0.3s all ease;
    font-family: var(--mono-font);
    font-size: var(--small-font-size);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--bg-color);
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--primary-color);
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.4);
}

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

.btn-outline:hover {
    background-color: rgba(0, 229, 255, 0.1);
}

/* --- HEADER & NAV --- */
.header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-fixed);
    background-color: transparent;
    transition: 0.4s;
}

.header.scroll-header {
    background-color: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.nav {
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__logo {
    color: var(--title-color);
    font-weight: var(--font-semi-bold);
    font-family: var(--mono-font);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

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

.nav__logo .cursor {
    display: inline-block;
    width: 8px;
    height: 18px;
    background-color: var(--primary-color);
    margin-left: 2px;
    animation: blink 1s step-end infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.nav__toggle {
    color: var(--title-color);
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
}

.nav__list {
    display: flex;
    column-gap: 2rem;
    align-items: center;
}

.nav__link {
    color: var(--title-color);
    font-size: var(--small-font-size);
    font-family: var(--mono-font);
    transition: 0.3s;
    position: relative;
}

.nav__link:hover {
    color: var(--primary-color);
}

.nav__link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    bottom: -4px;
    left: 0;
    transition: 0.3s;
}

.nav__link:hover::after,
.active-link::after {
    width: 100%;
}

.active-link {
    color: var(--primary-color);
}

.nav__cta {
    border: 1px solid var(--primary-color);
    padding: 0.4rem 1rem;
    border-radius: 4px;
    color: var(--primary-color);
}

.nav__cta::after {
    display: none;
}

.nav__cta:hover {
    background-color: rgba(0, 229, 255, 0.1);
}

/* Mobile Nav */
@media screen and (max-width: 768px) {
    .nav__menu {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        background-color: var(--glass-bg);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        padding: 4rem 0 3rem;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav__menu.show-menu {
        display: flex;
        flex-direction: column;
    }

    .nav__list {
        flex-direction: column;
        row-gap: 1.5rem;
        align-items: center;
    }

    .nav__toggle {
        display: block;
    }

    .nav__close {
        position: absolute;
        top: 1rem;
        right: 1.5rem;
        font-size: 1.5rem;
        color: var(--title-color);
        cursor: pointer;
        display: block;
    }
}

@media screen and (min-width: 769px) {
    .nav__close { display: none; }
}

/* --- HERO --- */
.hero__container {
    padding-top: 4rem;
    align-items: center;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    column-gap: 0.5rem;
    background-color: rgba(0, 229, 255, 0.1);
    color: var(--primary-color);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: var(--smaller-font-size);
    font-family: var(--mono-font);
    margin-bottom: var(--mb-1);
    border: 1px solid rgba(0, 229, 255, 0.2);
}

.hero__title {
    font-size: var(--biggest-font-size);
    margin-bottom: var(--mb-0-5);
    line-height: 1.2;
}

.hero__subtitle {
    font-size: var(--h3-font-size);
    font-weight: var(--font-medium);
    margin-bottom: var(--mb-1-5);
    color: var(--text-color);
}

.hero__data {
    text-align: center;
}

.hero__description {
    margin-bottom: var(--mb-2);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.hero__buttons {
    display: flex;
    column-gap: 1rem;
    margin-bottom: var(--mb-2-5);
    flex-wrap: wrap;
    row-gap: 1rem;
    justify-content: center;
}

.hero__social {
    display: flex;
    column-gap: 1.25rem;
    justify-content: center;
}

.social-link {
    font-size: 1.5rem;
    color: var(--text-color);
    transition: 0.3s;
}

.social-link:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Terminal Widget */
.terminal-widget {
    background-color: var(--surface-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    font-family: var(--mono-font);
    font-size: 0.9rem;
}

.terminal-header {
    background-color: rgba(255,255,255,0.05);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
}

.dot.close { background-color: #ff5f56; }
.dot.minimize { background-color: #ffbd2e; }
.dot.maximize { background-color: #27c93f; }

.terminal-title {
    flex-grow: 1;
    text-align: center;
    color: #64748b;
    font-size: 0.8rem;
    margin-right: 42px; /* balance out the dots */
}

.terminal-body {
    padding: 1.5rem;
    color: #e2e8f0;
    line-height: 1.5;
    text-align: left;
    overflow-x: auto;
}

.terminal-line {
    margin-bottom: 0.5rem;
    word-break: break-word;
}

.terminal-output {
    color: #94a3b8;
    margin-bottom: 1rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border-color);
    word-break: break-word;
}

.terminal-body .prompt {
    color: #27c93f;
    margin-right: 0.5rem;
}

.terminal-body .highlight {
    color: var(--primary-color);
    font-weight: var(--font-semi-bold);
}

.typing-cursor {
    display: inline-block;
    width: 8px;
    height: 15px;
    background-color: #e2e8f0;
    vertical-align: middle;
    margin-left: 5px;
    animation: blink 1s step-end infinite;
}

/* --- ABOUT --- */
.about__description {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--mb-3);
    font-size: var(--h3-font-size);
    color: var(--title-color);
}

.about__cards {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 1.5rem;
}

.about__card {
    background-color: var(--surface-color);
    padding: 2rem 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: 0.3s;
}

.about__card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 229, 255, 0.3);
    background-color: var(--surface-color-light);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.about__icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: var(--mb-1);
}

.about__card-title {
    font-size: var(--h3-font-size);
    margin-bottom: var(--mb-0-5);
}

/* --- SKILLS --- */
.skills__container {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 1.5rem;
}

.skills__box {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 8px;
    transition: 0.3s;
}

.skills__box:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.05);
}

.skills__header {
    display: flex;
    align-items: center;
    margin-bottom: var(--mb-1-5);
    column-gap: 0.75rem;
}

.skills__icon {
    font-size: 1.75rem;
    color: var(--primary-color);
}

.skills__list {
    display: flex;
    flex-direction: column;
    row-gap: 1rem;
}

.skills__list li {
    display: flex;
    align-items: flex-start;
    column-gap: 0.5rem;
}

.skills__list li i {
    color: var(--primary-color);
    margin-top: 4px;
}

/* --- PROJECTS --- */
.projects__container {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 2rem;
}

.project__card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 8px;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

.project__card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--border-color);
    transition: 0.3s;
}

.project__card:hover {
    transform: translateY(-5px);
    background-color: var(--surface-color-light);
}

.project__card:hover::before {
    background-color: var(--primary-color);
}

.project__tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: var(--smaller-font-size);
    font-family: var(--mono-font);
    font-weight: var(--font-medium);
    margin-bottom: var(--mb-1);
}

.offensive-tag { background: var(--tag-off-bg); color: var(--tag-off-color); }
.defensive-tag { background: var(--tag-def-bg); color: var(--tag-def-color); }
.secops-tag { background: var(--tag-sec-bg); color: var(--tag-sec-color); }

.project__title {
    font-size: var(--h3-font-size);
    margin-bottom: var(--mb-0-75);
}

.project__description {
    margin-bottom: var(--mb-1);
    font-size: var(--small-font-size);
}

.project__highlights {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.project__highlights li {
    font-size: var(--small-font-size);
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.project__highlights li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-family: var(--mono-font);
}

/* --- EXPERIENCE --- */
.experience__container {
    max-width: 800px;
    margin: 0 auto;
}

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

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

.timeline__item {
    position: relative;
    margin-bottom: var(--mb-2-5);
}

.timeline__dot {
    position: absolute;
    left: -2.35rem;
    top: 5px;
    width: 14px;
    height: 14px;
    background-color: var(--bg-color);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    transition: 0.3s;
}

.timeline__item:hover .timeline__dot {
    background-color: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}

.timeline__content {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 8px;
    transition: 0.3s;
}

.timeline__item:hover .timeline__content {
    border-color: rgba(0, 229, 255, 0.3);
    background-color: var(--surface-color-light);
}

.timeline__title {
    font-size: var(--h3-font-size);
    color: var(--title-color);
    margin-bottom: 0.25rem;
}

.timeline__company {
    display: inline-block;
    font-size: var(--small-font-size);
    color: var(--primary-color);
    font-family: var(--mono-font);
    margin-bottom: var(--mb-1);
}

.timeline__list {
    display: flex;
    flex-direction: column;
    row-gap: 0.5rem;
}

.timeline__list li {
    font-size: var(--small-font-size);
    padding-left: 1.25rem;
    position: relative;
}

.timeline__list li::before {
    content: '-';
    position: absolute;
    left: 0;
    color: var(--text-color);
}

/* --- SERVICES --- */
.services__container {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.services__card {
    text-align: center;
    padding: 2rem 1.5rem;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: 0.3s;
}

.services__card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.services__icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: var(--mb-1);
}

.services__title {
    font-size: var(--h3-font-size);
    margin-bottom: var(--mb-0-5);
}

/* --- OBJECTIVE --- */
.objective {
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 4rem 0;
}

.objective__container {
    text-align: center;
    max-width: 800px;
}

.objective__icon {
    font-size: 3rem;
    color: rgba(0, 229, 255, 0.2);
    margin-bottom: var(--mb-1);
}

.objective__text {
    font-size: var(--h2-font-size);
    color: var(--title-color);
    font-weight: var(--font-medium);
    margin-bottom: var(--mb-1-5);
    line-height: 1.4;
}

.objective__author {
    font-family: var(--mono-font);
    color: var(--primary-color);
}

/* --- CONTACT --- */
.contact__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.contact__info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 1.5rem;
    width: 100%;
}

.contact__card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.contact__card-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: var(--mb-0-5);
}

.contact__card-title,
.contact__card-data {
    display: block;
}

.contact__card-title {
    font-size: var(--h3-font-size);
    margin-bottom: 0.25rem;
}

.contact__card-data {
    font-size: var(--small-font-size);
    margin-bottom: var(--mb-0-75);
    color: var(--text-color);
}

.contact__action {
    width: 100%;
    display: flex;
    justify-content: center;
}

.contact__direct-btn {
    font-size: 1.1rem;
    padding: 1rem 2.5rem;
    border-radius: 8px;
    justify-content: center;
}

/* --- FOOTER --- */
.footer {
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 2rem;
}

.footer__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer__title {
    font-size: var(--h2-font-size);
    margin-bottom: var(--mb-1-5);
    font-family: var(--mono-font);
}

.footer__list {
    display: flex;
    column-gap: 2rem;
    margin-bottom: var(--mb-2);
}

.footer__link {
    color: var(--text-color);
}

.footer__link:hover {
    color: var(--primary-color);
}

.footer__social {
    display: flex;
    column-gap: 1.25rem;
    margin-bottom: var(--mb-2);
}

.footer__social-link {
    font-size: 1.5rem;
    color: var(--title-color);
    background-color: rgba(255,255,255,0.05);
    padding: 0.4rem;
    border-radius: 4px;
    display: inline-flex;
    transition: 0.3s;
}

.footer__social-link:hover {
    background-color: var(--primary-color);
    color: var(--bg-color);
    transform: translateY(-3px);
}

.footer__copy {
    font-size: var(--smaller-font-size);
    color: var(--text-color);
    opacity: 0.8;
}

/* --- SCROLL UP --- */
.scrollup {
    position: fixed;
    right: 1.5rem;
    bottom: -20%;
    background-color: var(--surface-color);
    opacity: 0.8;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    color: var(--title-color);
    font-size: 1.5rem;
    z-index: var(--z-tooltip);
    border: 1px solid var(--border-color);
    transition: 0.4s;
}

.scrollup:hover {
    background-color: var(--primary-color);
    color: var(--bg-color);
    opacity: 1;
}

.show-scroll {
    bottom: 3rem;
}

/* --- SCROLL BAR --- */
::-webkit-scrollbar {
    width: 8px;
    background-color: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background-color: var(--surface-color-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-color);
}

/* --- MEDIA QUERIES --- */
/* For small devices */
@media screen and (max-width: 350px) {
    .container {
        margin-left: var(--mb-1);
        margin-right: var(--mb-1);
    }
    .hero__buttons {
        flex-direction: column;
    }
}

/* For medium devices */
@media screen and (min-width: 576px) {
    /* No contact container override needed anymore */
}

@media screen and (min-width: 768px) {
    .nav {
        height: 70px;
    }
    .hero__container {
        grid-template-columns: 1fr 1fr;
        padding-top: 6rem;
    }
    .hero__data {
        text-align: left;
    }
    .hero__description {
        margin-left: 0;
        margin-right: 0;
    }
    .hero__buttons {
        justify-content: flex-start;
    }
    .hero__social {
        justify-content: flex-start;
    }
    /* Contact uses its own max-width so no override here needed */
}

/* For large devices */
@media screen and (min-width: 992px) {
    .container {
        margin-left: auto;
        margin-right: auto;
    }
    .section {
        padding: 8rem 0 2rem;
    }
    .about__description {
        font-size: 1.5rem;
    }
}

/* --- ANIMATIONS (Reveal) --- */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}
.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s ease;
}
.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s ease;
}

.reveal-up.active,
.reveal-left.active,
.reveal-right.active {
    opacity: 1;
    transform: translate(0);
}
