/* =====================================================================
   style.css — Savio Rodrigues Portfolio
   Includes: dark/light theme, scroll progress, filter tabs, tag pills, toast
   ===================================================================== */

/* ---- CSS VARIABLES (theme system) ----
   [data-theme="dark"]  is the default set on <html>
   [data-theme="light"] is applied when the toggle is clicked
   Every colour in the file uses these variables so one toggle
   switches the entire site instantly.
-----------------------------------------*/
:root,
[data-theme="dark"] {
    --bg:          #121826;
    --surface:     #1a202c;
    --surface2:    #222c3c;
    --text:        #ffffff;
    --muted:       #b0b3b8;
    --accent:      #6a0dad;
    --accent-glow: rgba(106, 13, 173, 0.25);
    --border:      rgba(255, 255, 255, 0.08);
    --nav-bg:      #0e1520;
    --tag-bg:      rgba(106, 13, 173, 0.18);
    --tag-color:   #c084fc;
}

[data-theme="light"] {
    --bg:          #f0eff4;
    --surface:     #ffffff;
    --surface2:    #e8e6f0;
    --text:        #111827;
    --muted:       #5c5f6e;
    --accent:      #6a0dad;
    --accent-glow: rgba(106, 13, 173, 0.15);
    --border:      rgba(0, 0, 0, 0.08);
    --nav-bg:      #ffffff;
    --tag-bg:      rgba(106, 13, 173, 0.1);
    --tag-color:   #6a0dad;
}

/* =====================================================================
   RESET & BASE
   ===================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5 {
    font-family: 'Syne', sans-serif;
}

/* =====================================================================
   SCROLL PROGRESS BAR
   A thin bar fixed at the very top of the viewport.
   Its width is set by JavaScript as the user scrolls.
   ===================================================================== */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;                              /* JS updates this */
    background: linear-gradient(90deg, #6a0dad, #00ffae);
    z-index: 9999;                          /* above everything including navbar */
    transition: width 0.1s linear;
}

/* =====================================================================
   INTRO SCREEN
   ===================================================================== */
.intro-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background-color: black;
    color: #00ffae;
    font-family: 'Courier New', monospace;
    font-size: 48px;
    letter-spacing: 2px;
    overflow: hidden;
    z-index: 9998;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
}

.hide-intro {
    animation: fadeOut 1s ease forwards;
}

@keyframes fadeOut {
    to { opacity: 0; visibility: hidden; }
}

.dud {
    opacity: 0.5;
}

/* =====================================================================
   NAVBAR
   ===================================================================== */
.navbar {
    background-color: var(--nav-bg);
    padding: 10px 20px;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    transition: background-color 0.3s ease;
}

.container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.logo {
    color: var(--text);
    font-size: 20px;
    font-weight: bold;
    font-family: 'Syne', sans-serif;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 15px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--text);
}

/* ---- DARK/LIGHT TOGGLE BUTTON ---- */
.theme-toggle {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: background 0.3s, border-color 0.3s, transform 0.2s;
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--accent);
    transform: scale(1.1);
}

/* =====================================================================
   ABOUT ME
   ===================================================================== */
.Aboutme-section {
    display: flex;
    justify-content: center;
    padding: 100px 40px 40px; /* top padding accounts for fixed navbar */
}

.Skyblue {
    color: #6a0dad;
}

.Aboutme-container {
    display: flex;
    max-width: 900px;
    gap: 40px;
    align-items: center;
}

.product-image {
    width: 320px;
    height: 400px;
    background-color: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--border);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.Features-about {
    text-align: left;
}

.Features-about h1 {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.Features-about h2 {
    font-size: 22px;
    color: var(--text);
    font-weight: 600;
    margin-bottom: 20px;
    min-height: 30px;
}

.about-button {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.bttn1 {
    background-color: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
    padding: 12px 32px;
    border-radius: 6px;
    font-size: 16px;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    min-width: 120px;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.bttn1:hover {
    background-color: var(--accent);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--accent-glow);
}

/* Responsive About */
@media (max-width: 900px) {
    .Aboutme-container {
        flex-direction: column;
        align-items: center;
        gap: 24px;
    }
    .product-image {
        width: 80vw;
        height: auto;
        max-width: 300px;
    }
    .Features-about {
        text-align: center;
    }
    .about-button {
        justify-content: center;
    }
}

/* =====================================================================
   TEAM PROJECTS / ROLES
   ===================================================================== */
.EXp1 h2 a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.EXp1 h2 a:hover {
    color: var(--accent);
}

.features-section {
    padding: 60px 40px;
    text-align: center;
}

.features-section h1 {
    font-size: 28px;
    margin-bottom: 30px;
}

.secondSection {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.secondSection .box {
    background: var(--border);
    width: 100%;
    height: 1px;
    margin: 16px 0;
}

.EXp1 {
    background-color: var(--surface);
    padding: 24px;
    border-radius: 12px;
    text-align: left;
    border: 1px solid var(--border);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.EXp1:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
}

.EXp1 h2 { font-size: 20px; margin: 8px 0 4px; }
.EXp1 h3 { font-size: 14px; color: var(--muted); font-weight: 400; margin-bottom: 4px; }
.EXp1 h4 { font-size: 13px; color: var(--muted); font-weight: 400; margin-bottom: 10px; }
.EXp1 h5 { font-size: 13px; color: var(--accent); margin-bottom: 8px; }
.EXp1 p  { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 14px; }

/* =====================================================================
   TECH STACK TAG PILLS
   Used in both .EXp1 and .feature-card
   ===================================================================== */
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.tag {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--tag-bg);
    color: var(--tag-color);
    font-weight: 500;
    letter-spacing: 0.3px;
    border: 1px solid var(--accent-glow);
    transition: background 0.2s;
}

/* =====================================================================
   FILTER TABS
   ===================================================================== */
.filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 30px;
}

.filter-tab {
    padding: 8px 20px;
    border-radius: 999px;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    transition: all 0.2s ease;
}

.filter-tab:hover:not(.active) {
    border-color: var(--accent);
    color: var(--accent);
}

.filter-tab.active {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}

/* =====================================================================
   PROJECT CARDS
   ===================================================================== */
.features-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.feature-card {
    background-color: var(--surface);
    padding: 22px;
    border-radius: 12px;
    text-align: left;
    border: 1px solid var(--border);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.feature-card h3 {
    font-size: 16px;
    color: var(--text);
    margin-bottom: 8px;
}

.feature-card h3 a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
}

.feature-card h3 a:hover {
    color: var(--accent);
}

.feature-card p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 12px;
}

/* Icon circle */
.icon {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 166, 0, 0.12);
    color: #ff9800;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 18px;
    margin-bottom: 12px;
}

/* Card fade-in animation used by filter JS */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =====================================================================
   SKILLS GRID
   ===================================================================== */
.skills-section {
    padding: 60px 40px;
    text-align: center;
}

.skills-section h1 {
    font-size: 28px;
    margin-bottom: 30px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    max-width: 900px;
    margin: 0 auto;
}

.skill-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem 1rem;
    text-align: center;
    transition: border-color 0.2s ease, transform 0.2s ease;
    cursor: default;
}

.skill-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}

.skill-emoji {
    font-size: 32px;
    display: block;
    margin-bottom: 10px;
}

.skill-card h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 4px;
}

.skill-cat {
    font-size: 11px;
    color: var(--muted);
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.skill-bar-track {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.skill-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 1s ease;
}

@media (max-width: 600px) {
    .skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 12px;
    }
    .skills-section { padding: 40px 20px; }
}

/* =====================================================================
   CONTACT
   ===================================================================== */
.contact-me {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 60px 40px;
    position: relative;
}

.contact-map {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.contact-form {
    background-color: var(--surface);
    padding: 32px;
    border-radius: 14px;
    width: 420px;
    max-width: 100%;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
    border: 1px solid var(--border);
    transition: background-color 0.3s ease;
}

.contact-form h2 {
    font-size: 22px;
    font-family: 'Syne', sans-serif;
    margin-bottom: 20px;
}

form {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

label {
    font-size: 13px;
    color: var(--muted);
    text-align: left;
    display: block;
    margin-bottom: 4px;
    margin-top: 10px;
}

input, textarea {
    background-color: var(--surface2);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    width: 100%;
    transition: border-color 0.2s, background-color 0.3s;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
}

textarea {
    height: 110px;
    resize: none;
}

button[type="submit"] {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 12px;
    font-size: 15px;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    border-radius: 8px;
    margin-top: 14px;
    transition: background-color 0.3s, transform 0.2s;
    width: 100%;
}

button[type="submit"]:hover {
    background-color: #4b0082;
    transform: scale(1.02);
}

button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.footer-text {
    font-size: 12px;
    color: var(--muted);
    margin-top: 14px;
}

/* =====================================================================
   TOAST NOTIFICATION
   Appears bottom-right after form submit.
   JS adds .toast-visible to trigger the fade-in.
   ===================================================================== */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 14px 22px;
    border-radius: 10px;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    color: white;
    z-index: 9999;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    max-width: 300px;
}

.toast-visible {
    opacity: 1;
    transform: translateY(0);
}

.toast-success { background-color: #6a0dad; }
.toast-error   { background-color: #dc2626; }

/* =====================================================================
   FOOTER
   ===================================================================== */
.footer {
    background-color: var(--nav-bg);
    padding: 20px 50px;
    color: var(--text);
    border-top: 1px solid var(--border);
    transition: background-color 0.3s ease;
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.footer-right {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

.social-icons a {
    color: var(--muted);
    margin: 0 10px;
    font-size: 28px;
    transition: color 0.3s, transform 0.2s;
    vertical-align: middle;
}

.social-icons a:hover {
    color: #00ffae;
    transform: scale(1.2);
}

.social-icons ion-icon {
    font-size: 28px;
    vertical-align: middle;
}

/* =====================================================================
   RESPONSIVE — GENERAL
   ===================================================================== */
@media (max-width: 600px) {
    .features-section  { padding: 40px 20px; }
    .skills-section    { padding: 40px 20px; }
    .contact-me        { padding: 40px 20px; }
    .filter-tabs       { gap: 6px; }
    .filter-tab        { font-size: 12px; padding: 6px 14px; }
    .features-container { grid-template-columns: 1fr; }
    .nav-links         { display: none; } /* collapse on mobile — add a hamburger if needed */
    .intro-screen      { font-size: 28px; }
}

.contact-glitch {
    font-family: 'Courier New', monospace;
    color: #00ffae;
    border-right: 3px solid #6a0dad;
    white-space: nowrap;
    overflow: hidden;
    width: 0;
    display: inline-block;
    animation: contactTyping 1.8s steps(14) forwards, contactBlink 0.7s step-end infinite;
    position: relative;
}

.contact-glitch::before {
    content: attr(data-text);
    position: absolute;
    left: 2px; top: 0;
    color: #6a0dad;
    clip: rect(0, 900px, 0, 0);
    animation: cGlitch1 3s infinite 2s;
}

.contact-glitch::after {
    content: attr(data-text);
    position: absolute;
    left: -2px; top: 0;
    color: #ff0040;
    clip: rect(0, 900px, 0, 0);
    animation: cGlitch2 3s infinite 2s;
}


.footer-container img {
    display: block;
    margin: 8px auto;
    opacity: 0.8;
}

@keyframes contactTyping { to { width: 11ch; } }
@keyframes contactBlink  { 50% { border-color: transparent; } }
@keyframes cGlitch1 { 0%,85%,100%{clip:rect(0,900px,0,0)} 87%{clip:rect(10px,900px,22px,0)} 90%{clip:rect(40px,900px,52px,0)} 93%{clip:rect(5px,900px,16px,0)} }
@keyframes cGlitch2 { 0%,85%,100%{clip:rect(0,900px,0,0)} 88%{clip:rect(28px,900px,42px,0)} 91%{clip:rect(0px,900px,12px,0)} 94%{clip:rect(18px,900px,32px,0)} }