/* ===================================
   CYBERSECURITY PORTFOLIO
   =================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --accent: #e63946;
    --accent-dim: rgba(230, 57, 70, 0.06);
    --accent-glow: rgba(230, 57, 70, 0.15);
    --text-bright: #ffffff;
    --text-muted: #ffffff;
    --bg-dark: #000000;
    --bg-darker: #000000;
    --border: rgba(255, 255, 255, 0.12);
    --transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

html {
    scroll-behavior: smooth;
    font-size: 18px;
    scroll-snap-type: y mandatory;
}

@media (max-width: 768px) {
    html {
        scroll-snap-type: y mandatory;
        font-size: 14px;
    }
}

body {
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-bright);
    background-color: var(--bg-darker);
    overflow-x: hidden;
    position: relative;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* ===================================
   SECTION LAYOUT
   =================================== */

.hero, .about, .skills, .projects, .experience, .education, .contact {
    min-height: 100vh;
    min-height: 100dvh;
    box-sizing: border-box;
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 5rem 0 1.5rem;
    overflow: hidden;
}

@media (max-width: 768px) {
    .hero, .about, .skills, .projects, .experience, .education, .contact {
        height: 100svh;
        min-height: unset;
        overflow: hidden;
        padding: 5rem 0 1rem;
        scroll-snap-align: start;
    }
}

/* ===================================
   STARFIELD BACKGROUND
   =================================== */

.starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 3px rgba(255, 255, 255, 0.4);
    animation: twinkle infinite ease-in-out;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.4); }
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

/* ===================================
   NAVIGATION
   =================================== */

.navbar {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(12px);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 2px;
}

.terminal-bracket {
    color: var(--text-muted);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-bright);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
    font-size: 0.95rem;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-links a:hover::after {
    width: 100%;
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.6rem 0;
    }
    .navbar .container {
        flex-wrap: nowrap;
        gap: 0.25rem;
    }
    .logo {
        font-size: 0.8rem;
        letter-spacing: 1px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    .nav-links {
        gap: 0.6rem;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .nav-links::-webkit-scrollbar { display: none; }
    .nav-links a { font-size: 0.72rem; }
}

/* ===================================
   SCROLL ANIMATIONS
   =================================== */

.fade-in {
    opacity: 0;
    transform: translateY(30px);
}

.fade-in.visible {
    animation: fadeInUp 0.7s ease forwards;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===================================
   HERO SECTION
   =================================== */

.hero {
    background: #000000;
    color: var(--text-bright);
    text-align: center;
    position: relative;
    border-bottom: 1px solid var(--border);
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: var(--accent);
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-12px); }
}

.hero-content p {
    font-size: 1rem;
    margin-bottom: 2.5rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.scroll-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    animation: fadeInUp 1s ease 0.5s both;
}

.scroll-hint-text {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.scroll-arrow {
    font-size: 1.8rem;
    color: var(--accent);
    animation: bounce 1.5s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(10px); }
}

.btn {
    padding: 0.8rem 1.5rem;
    border: 1px solid var(--accent);
    border-radius: 0;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
    font-family: 'Poppins', sans-serif;
    font-size: 0.65rem;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-primary {
    background-color: transparent;
    color: var(--accent);
}

.btn-primary:hover {
    color: var(--bg-darker);
    transform: scale(1.03);
}

.btn-primary:hover::before {
    left: 0;
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-muted);
    border-color: var(--border);
}

.btn-secondary::before {
    background: var(--border);
}

.btn-secondary:hover {
    color: var(--text-bright);
    transform: scale(1.03);
}

.btn-secondary:hover::before {
    left: 0;
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 1.4rem;
        margin-bottom: 0.75rem;
    }
    .hero-content p {
        font-size: 0.82rem;
        margin-bottom: 1.25rem;
    }
    .scroll-hint { margin-top: 1rem; }
    .scroll-hint-text { font-size: 0.65rem; letter-spacing: 1px; }
    .scroll-arrow { font-size: 1.4rem; }
}

/* ===================================
   SECTION HEADINGS (shared)
   =================================== */

#about h2,
#skills h2,
#projects h2,
#experience h2,
#education h2,
#contact h2 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    text-align: center;
    color: var(--accent);
    position: relative;
    padding-bottom: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    line-height: 1.3;
}

#about h2::before,
#skills h2::before,
#projects h2::before,
#experience h2::before,
#education h2::before,
#contact h2::before {
    content: '> ';
    color: var(--accent);
}

#about h2::after,
#skills h2::after,
#projects h2::after,
#experience h2::after,
#education h2::after,
#contact h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: var(--accent);
    opacity: 0.5;
}

/* ===================================
   ABOUT SECTION
   =================================== */

#about {
    background-color: var(--bg-dark);
    border-bottom: 1px solid var(--border);
}

.about-text {
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--text-muted);
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

/* ===================================
   MODAL STYLES
   =================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(6px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #0a0a0a;
    padding: 3rem;
    border: 1px solid var(--accent);
    border-radius: 16px;
    box-shadow: 0 0 40px var(--accent-glow);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.25s ease;
}

@keyframes slideIn {
    from { transform: translateY(-30px); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}

.modal-close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
    line-height: 1;
}

.modal-close:hover {
    color: var(--accent);
}

.modal-content h2 {
    color: var(--accent);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    letter-spacing: 1px;
    padding-right: 2rem;
    line-height: 1.4;
}

.modal-subtitle {
    color: var(--text-muted);
    font-size: 0.65rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.modal-body {
    color: var(--text-muted);
}

.modal-body h3 {
    color: var(--accent);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.05rem;
}

.modal-body ul,
.modal-body .card-details {
    display: block;
    list-style: none;
    padding-left: 0;
    margin-top: 0.5rem;
}

.modal-body li {
    padding: 0.6rem 0;
    padding-left: 1.8rem;
    color: rgba(255, 255, 255, 0.6);
    position: relative;
    line-height: 1.6;
    font-size: 0.72rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-body li strong {
    color: var(--accent);
    font-style: italic;
    font-weight: 700;
}

.modal-body li:last-child {
    border-bottom: none;
}

.modal-body li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

.modal-body p {
    line-height: 1.7;
    margin: 1rem 0;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .modal-content {
        padding: 1.5rem;
        max-height: 70vh;
    }
    .modal-close {
        right: 1rem;
        top: 1rem;
    }
}

/* ===================================
   SKILLS SECTION
   =================================== */

#skills {
    background-color: var(--bg-darker);
    border-bottom: 1px solid var(--border);
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.skill-card {
    width: 280px;
    background: #0a0a0a;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--accent-dim), transparent);
    transition: left 0.5s ease;
}

.skill-card:hover::before {
    left: 100%;
}

.skill-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.skill-card h3 {
    font-size: 1.2rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
    line-height: 1.3;
}

.skill-card ul {
    list-style: none;
    position: relative;
    z-index: 1;
}

.skill-card li {
    padding: 0.2rem 0;
    color: var(--text-muted);
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.8rem;
    line-height: 1.4;
}

.skill-card li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

/* ===================================
   PROJECTS SECTION
   =================================== */

#projects {
    background-color: var(--bg-dark);
    border-bottom: 1px solid var(--border);
}

.projects-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.project-card {
    flex: 1 1 280px;
    max-width: 480px;
}

.project-card {
    background: #0a0a0a;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.project-card h3 {
    font-size: 1rem;
    color: var(--accent);
    margin-bottom: 0.4rem;
    position: relative;
    z-index: 1;
    line-height: 1.3;
}

.project-tech {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    position: relative;
    z-index: 1;
    line-height: 1.4;
}

/* Hidden details — revealed in modal */
.card-details {
    display: none;
}

/* Clickable card */
.clickable-card {
    cursor: pointer;
}

.card-hint {
    display: block;
    font-size: 0.85rem;
    color: var(--accent);
    margin-top: 0.6rem;
    opacity: 0.6;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Modal subtitle */
.modal-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* ===================================
   EXPERIENCE SECTION
   =================================== */

#experience {
    background-color: var(--bg-darker);
    border-bottom: 1px solid var(--border);
}

.experience-timeline {
    position: relative;
    max-width: 680px;
    margin: 0 auto;
}

.timeline-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    position: relative;
}

.timeline-marker {
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0.6rem;
    box-shadow: 0 0 10px var(--accent-glow);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 30px;
    width: 1px;
    height: calc(100% + 20px);
    background: var(--border);
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-content {
    background: #0a0a0a;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    flex-grow: 1;
    transition: var(--transition);
}

.timeline-content:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 20px var(--accent-glow);
    transform: translateX(6px);
}

.timeline-content h3 {
    font-size: 1rem;
    color: var(--accent);
    margin-bottom: 0.3rem;
    line-height: 1.3;
}

.experience-date {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    line-height: 1.4;
}

.experience-company {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
    line-height: 1.4;
}

/* ===================================
   EDUCATION SECTION
   =================================== */

#education {
    background-color: var(--bg-dark);
    border-bottom: 1px solid var(--border);
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.education-card {
    background: #0a0a0a;
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: var(--transition);
}

.education-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.education-card h3 {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.education-school {
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    line-height: 1.6;
}

.education-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.education-list {
    list-style: none;
    padding-left: 0;
    margin-top: 0.75rem;
}

.education-list li {
    padding: 0.4rem 0;
    padding-left: 1.5rem;
    color: rgba(255, 255, 255, 0.6);
    position: relative;
    font-size: 0.85rem;
    line-height: 1.6;
}

.education-list li strong {
    color: var(--accent);
    font-style: italic;
    font-weight: 700;
}

.education-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

/* ===================================
   CONTACT SECTION
   =================================== */

#contact {
    background: #000000;
    color: var(--text-bright);
    border-top: 1px solid var(--border);
}

.contact-content {
    text-align: center;
}

.contact-info {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.contact-item {
    max-width: 650px;
    width: 100%;
    word-break: break-all;
}

.contact-item {
    background: #0a0a0a;
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: var(--transition);
}

.contact-item:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.contact-item h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--accent);
    line-height: 1.4;
}

.contact-item p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.contact-item a {
    color: var(--text-bright);
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-item a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* ===================================
   FOOTER
   =================================== */

.footer {
    background: var(--bg-darker);
    color: var(--text-muted);
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 768px) {

    /* --- Shared section headings --- */
    #about h2,
    #skills h2,
    #projects h2,
    #experience h2,
    #education h2,
    #contact h2 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
        padding-bottom: 0.4rem;
        letter-spacing: 1px;
    }

    /* --- About --- */
    .about-text { font-size: 0.82rem; line-height: 1.5; }

    /* --- Skills: 2-column compact grid --- */
    .skills-grid { gap: 0.5rem; }
    .skill-card {
        flex: 1 1 calc(50% - 0.5rem);
        max-width: calc(50% - 0.25rem);
        padding: 0.6rem 0.7rem;
    }
    .skill-card h3 { font-size: 0.8rem; margin-bottom: 0.2rem; }
    .skill-card li { font-size: 0.65rem; padding: 0.1rem 0 0.1rem 1.1rem; line-height: 1.3; }

    /* --- Projects: 2-column compact grid --- */
    .projects-grid { gap: 0.5rem; }
    .project-card {
        flex: 1 1 calc(50% - 0.5rem);
        max-width: calc(50% - 0.25rem);
        padding: 0.6rem 0.7rem;
    }
    .project-card h3 { font-size: 0.78rem; margin-bottom: 0.2rem; line-height: 1.2; }
    .project-tech { font-size: 0.62rem; margin-bottom: 0.2rem; line-height: 1.3; }
    .card-hint { font-size: 0.62rem; margin-top: 0.25rem; }

    /* --- Experience --- */
    .experience-timeline { max-width: 100%; }
    .timeline-item { gap: 0.6rem; margin-bottom: 0.5rem; }
    .timeline-marker { width: 10px; height: 10px; margin-top: 0.5rem; }
    .timeline-item::before { left: 4px; top: 22px; }
    .timeline-content { padding: 0.6rem 0.75rem; }
    .timeline-content h3 { font-size: 0.82rem; margin-bottom: 0.2rem; }
    .experience-date,
    .experience-company { font-size: 0.65rem; line-height: 1.3; }

    /* --- Education --- */
    .education-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    .education-card { padding: 0.75rem; }
    .education-card h3 { font-size: 0.95rem; margin-bottom: 0.3rem; line-height: 1.3; }
    .education-school { font-size: 0.75rem; margin-bottom: 0.2rem; }
    .education-date { font-size: 0.72rem; margin-bottom: 0.5rem; }
    .education-list { margin-top: 0.4rem; }
    .education-list li { font-size: 0.7rem; padding: 0.2rem 0 0.2rem 1.2rem; line-height: 1.3; }

    /* --- Contact --- */
    .contact-info { margin-top: 1rem; }
    .contact-item { padding: 1rem; }
    .contact-item h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
    .contact-item p { font-size: 0.8rem; }

    /* --- Modal --- */
    .modal-content {
        padding: 1.25rem;
        max-height: 80svh;
        border-radius: 10px;
        width: 94%;
    }
    .modal-close { right: 0.9rem; top: 0.9rem; font-size: 1.5rem; }
}
