* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Segoe UI", sans-serif;
}

body {
min-height: 100vh;
background: linear-gradient(80deg,
    #0000ac, #101010, #400000,
    #101010, #000040, #101010, #ac0000);
background-size: 600% 600%;
animation: gradientBG 35s ease infinite;
color: #ffffff;
display: flex;
flex-direction: column;
align-items: center;
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
* {
    animation: none !important;
    transition: none !important;
}
}

header {
margin-top: 60px;
width: 90%;
max-width: 800px;
animation: fadeDown 1.5s ease forwards;
}

header h1 {
font-size: 3rem;
letter-spacing: 2px;
}

header p {
opacity: 0.8;
margin-top: 10px;
}

@media (max-width: 600px) {
header {
    text-align: center;
}
}

@keyframes fadeDown {
from { opacity: 0; transform: translateY(-30px); }
to { opacity: 1; transform: translateY(0); }
}

main {
width: 90%;
max-width: 800px;
margin-top: 60px;
animation: fadeUp 1.5s ease forwards;
}

@keyframes fadeUp {
from { opacity: 0; transform: translateY(40px); }
to { opacity: 1; transform: translateY(0); }
}

.card {
background: rgba(255, 255, 255, 0.08);
border-radius: 16px;
padding: 30px;
margin-bottom: 30px;
backdrop-filter: blur(10px);
box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.08),
    0 10px 30px rgba(0,0,0,0.25);
transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
transform: translateY(-6px);
box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.15),
    0 20px 40px rgba(0,0,0,0.35);
}

h2 {
margin-bottom: 15px;
font-size: 1.8rem;
}

nav ul {
list-style: none;
}

nav li {
padding: 10px 0;
border-bottom: 1px solid rgba(255,255,255,0.2);
}

nav li:last-child {
border-bottom: none;
}

nav a {
color: #fff;
text-decoration: none;
opacity: 0.85;
}

nav a:hover,
nav a:focus {
opacity: 1;
text-decoration: underline;
outline: none;
}

.visitor-count {
text-align: center;
font-size: 1.2rem;
}

.ascii {
font-family: monospace;
white-space: pre;
font-size: 0.95rem;
opacity: 0.9;
}

footer {
margin-top: auto;
padding: 20px;
font-size: 0.9rem;
opacity: 0.6;
}

/* Keyboard focus */
a:focus-visible {
outline: 2px solid rgba(255,255,255,0.6);
outline-offset: 4px;
}
.ascii.typing::after {
content: "▋";
animation: blink 1s steps(1) infinite;
margin-left: 4px;
}

@keyframes blink {
50% { opacity: 0; }
}
.terminal-cursor {
display: inline;
animation: blink 1s steps(1) infinite;
margin-left: 2px;
}

#password-display {
    font-size: 2rem;
    letter-spacing: 10px;
    margin-bottom: 20px;
    min-height: 2.5rem;
  }

@keyframes blink {
50% { opacity: 0; }
}
  .keypad {
    display: grid;
    grid-template-columns: repeat(3, 80px);
    gap: 15px;
    justify-content: center;
  }
  .keypad button {
    padding: 20px;
    font-size: 1.5rem;
    border:none;
    border-radius: 12px;
    background: rgba(255,255,255,0.08);
    color:#fff;
    cursor:pointer;
    transition: transform 0.2s, box-shadow 0.2s;
  }
  .keypad button:hover { transform: translateY(-4px); box-shadow:0 8px 20px rgba(0,0,0,0.3); }
  .keypad button:active { transform: translateY(0); box-shadow:0 4px 10px rgba(0,0,0,0.2); }

#submit-btn {
  height: 80px;
  font-size: 1.5rem;
}

  #submit-btn:hover { transform: translateY(-4px); box-shadow:0 8px 20px rgba(0,0,0,0.3); }

  /* Popup for wrong password */
  #popup {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,0,0,0.85);
    padding: 10px 20px;
    border-radius: 10px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, top 0.3s;
    font-weight: bold;
  }
  #popup.show { opacity:1; top:-70px; pointer-events:auto; }
/* Project grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}
.project-card {
    background: rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.project-card:hover {
    transform: translateY(-6px);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.15), 0 20px 40px rgba(0,0,0,0.35);
}
.project-card img { width: 100%; height: auto; border-radius: 12px; margin-bottom: 15px; }
.project-card h3 { font-size: 1.5rem; margin-bottom: 10px; }
.project-card p { opacity: 0.8; margin-bottom: 15px; }
.project-card a { text-decoration: none; color: #fff; font-weight: bold; }
.project-card a:hover { text-decoration: underline; }

.aboutcard{
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  -ms-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.08);
border-radius: 16px;
padding: 30px;
backdrop-filter: blur(10px);
box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.08),
    0 10px 30px rgba(0,0,0,0.25);
transition: transform 0.25s ease, box-shadow 0.25s ease;
}
html {
  animation: pageIn 0.3s ease;
}

@keyframes pageIn {
  from { opacity: 0; }
}
#title {
  display: inline-block;
  font-size: 3rem;
  cursor: default;
}

#title span {
  display: inline-block;
  transition: transform 0.15s ease-out;
  will-change: transform;
}
