/* --- Base Styles --- */
body {
    font-family: 'Inter', sans-serif;
    background-color: #0d1117; /* Dark background fallback */
    color: #c9d1d9;
    position: relative;
    z-index: 0;
    margin: 0;
}

/* -- DYNAMIC BACKGROUND EFFECT -- */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background: linear-gradient(
        125deg, 
        #ff0000, #ff7f00, #ffff00, 
        #00ff00, #0000ff, #4b0082, 
        #8f00ff
    );
    background-size: 400% 400%;
    animation: rainbow-background-animation 25s ease infinite;
    filter: blur(100px);
    opacity: 0.4;
}

@font-face {
  font-family: "FiraCode Nerd Font";
  src: url("FiraCodeNerdFont-Regular.woff2") format("woff2"),
       url("FiraCodeNerdFont-Regular.woff") format("woff");
  font-weight: normal;
  font-style: normal;
}   

@keyframes rainbow-background-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- Scroll Reveal Animation --- */
.scroll-reveal {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Gradient Divider --- */
.divider {
    height: 1px;
    background: linear-gradient(to right, transparent 0%, #38bdf8 50%, transparent 100%);
    margin: 4rem 0;
    border: 0;
    opacity: 0.5;
}

/* --- Hero Title Styles --- */
.hero-title-effect {
    animation: pulse-shadow 3s infinite alternate; /* glowing effect */
    white-space: nowrap;       /* keep text on one line */
    overflow: hidden;          /* prevent overflowing */
    text-overflow: ellipsis;   /* show "..." if text too long */
    font-size: clamp(1.5rem, 5vw, 3.5rem); /* responsive font size */
    text-align: center;
    font-weight: 700;
}

/* --- Pulse Shadow Animation --- */
@keyframes pulse-shadow {
    0% { text-shadow: 0 0 5px rgba(59, 130, 246, 0.5); }
    50% { text-shadow: 0 0 25px rgba(59, 130, 246, 0.8), 0 0 45px rgba(96, 165, 250, 0.6); }
    100% { text-shadow: 0 0 5px rgba(59, 130, 246, 0.5); }
}

/* --- Typing Cursor --- */
.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1.25em;
    background-color: #38bdf8;
    margin-left: 4px;
    animation: blink 0.7s infinite;
    vertical-align: bottom;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* --- Mobile Menu --- */
#mobile-menu {
    transition: max-height 0.3s ease-in-out;
    max-height: 0;
    overflow: hidden;
}
#mobile-menu.show {
    max-height: 300px;
}

/* --- Back to Top Button --- */
#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #1f2937;
    color: #60a5fa;
    border: 2px solid #60a5fa;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background-color 0.3s;
    z-index: 1000;
}
#back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
#back-to-top:hover {
    background-color: #60a5fa;
    color: #1f2937;
}

/* --- Typing Text Container --- */
#typed-text {
    white-space: nowrap;      /* keep typed text on a single line */
    overflow: hidden;
    display: inline-block;
    font-weight: 600;
    color: #22c55e;           /* green highlight */
    font-size: clamp(1rem, 4vw, 2rem); /* responsive text size */
    vertical-align: bottom;
}

/* --- Fix Long Skill Titles (like "Cryptocurrency") --- */
#skills h3 {
    white-space: normal;       /* allow text to wrap */
    overflow-wrap: break-word; /* break long words if needed */
    word-break: break-word;    /* extra safety for older browsers */
    line-height: 1.3;          /* better readability */
    font-size: clamp(0.9rem, 3.5vw, 1.1rem); /* responsive font size */
}
/* --- Linux Card Styles --- */
.linux-card {
    background-color: rgba(31, 41, 55, 0.8); /* equivalent to bg-gray-800/80 */
    padding: 1.5rem; /* p-6 */
    border-radius: 1rem; /* rounded-xl */
    box-shadow: 0 10px 15px rgba(0,0,0,0.3); /* shadow-xl */
    text-align: center;
    border-bottom: 4px solid #22c55e; /* border-green-500 */
    transition: background-color 0.3s ease, transform 0.3s ease; /* transition duration-300 & transform */
    transition-delay: 0ms; /* previously inline */
}

.linux-card:hover {
    background-color: rgba(55, 65, 81, 0.8); /* hover:bg-gray-700/80 */
    transform: translateY(-0.25rem); /* hover:-translate-y-1 */
}

.linux-card .icon {
    font-size: 3rem; /* text-5xl */
    margin-bottom: 0.75rem; /* mb-3 */
    display: block;
}

.linux-card h3 {
    font-size: 1.25rem; /* text-xl */
    font-weight: 600; /* font-semibold */
    color: white;
    margin-bottom: 0.25rem; /* mb-1 */
}

.linux-card p {
    font-size: 0.875rem; /* text-sm */
    color: #9ca3af; /* text-gray-400 */
}
