:root {
  --bg: #f9f9f9;
  --text: #222;
  --font: "JMH Typewriter", monospace;
  --primary: #ff5555;
  --secondary: #c62a2a;
  --button-color: #ff0000;
  --glass-light: rgba(255, 255, 255, 0.15);
  --glass-dark: rgba(30, 30, 30, 0.3);
  --box-shadowred: rgba(255, 9, 9, 0.089);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --text: #ffffff;
    --primary: #ff5555;
    --secondary: #c62a2a;
    --glass-light: rgba(30, 30, 30, 0.3);
    --glass-dark: rgba(255, 255, 255, 0.05);
    --box-shadowred: rgba(255, 9, 9, 0.089);
  }
}

html {
  scroll-behavior: smooth;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* =========================
   HEADER WITH PHOTO BACKGROUND
   ========================= */
header {
  width: 100%;
  height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
    url("/assets/Images/kirabannerheadertest.gif") center/cover no-repeat;
  background-attachment: fixed;
  color: white;
}

/* =========================
   GLASS NAVBAR
   ========================= */
.glass-nav {
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1100px;

  background: var(--glass-light);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  border-radius: 16px;
  padding: 0.75rem 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  z-index: 10;
}

@media (prefers-color-scheme: dark) {
  .glass-nav {
    background: var(--glass-light);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.05);
  }
}

.glass-nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  gap: 2rem;
}

.glass-nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.glass-nav a:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--primary);
  transform: scale(1.05);
}

/* =========================
   GLASS DROPDOWN FOR SOCIALS
   ========================= */
.glass-dropdown details {
  display: inline-block;
  text-align: center;
}

.glass-dropdown summary {
  list-style: none;
  cursor: pointer;
  background: var(--glass-light);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
  padding: 0.5rem 1rem;
  border-radius: 12px;
  font-weight: bold;
  transition: background 0.3s ease, color 0.3s ease;
}

.glass-dropdown summary:hover {
  background: rgba(255, 255, 255, 0.25);
  color: var(--primary);
}

.dropdown-content {
  display: flex;
  flex-direction: column;
  margin-top: 0.5rem;
  background: var(--glass-light);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 12px;
  min-width: 200px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.dropdown-content a {
  color: var(--text);
  padding: 0.75rem 1rem;
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease;
  border-radius: 8px;
}

.dropdown-content a:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--primary);
}

summary::-webkit-details-marker {
  display: none;
}

/* Dark mode adjustments for dropdown */
@media (prefers-color-scheme: dark) {
  .glass-dropdown summary {
    background: var(--glass-dark);
    color: var(--text);
  }

  .glass-dropdown summary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary);
  }

  .dropdown-content {
    background: var(--glass-dark);
  }

  .dropdown-content a {
    color: var(--text);
  }

  .dropdown-content a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary);
  }
}

/* =========================
   HERO SECTION
   ========================= */
.hero {
  text-align: center;
  padding: 10rem 1rem 5rem;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 5;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.5rem;
}

.typewriter {
  display: inline-block;
  overflow: hidden;
  border-right: 3px solid white;
  white-space: nowrap;
  width: 18ch;
  animation: typing 3s steps(18, end), blink 1s step-end infinite;
}

.typewriter1 {
  display: inline-block;
  overflow: hidden;
  border-right: 3px solid white;
  white-space: nowrap;
  width: 22ch;
  animation: typing 4s steps(22, end), blink 0s step-end infinite;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 18ch;
  }
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

/* =========================
   MAIN SECTIONS
   ========================= */
main {
  max-width: 1000px;
  margin: auto;
  padding: 3rem 1rem;
  display: grid;
  gap: 3rem;
}

section {
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0px 22px 70px 4px var(--box-shadowred);
  background: var(--bg);
}

.profile-img {
  display: block;
  margin: 1rem auto;
  max-width: 200px;
  border-radius: 50%;
  box-shadow: 0px 22px 70px 4px var(--box-shadowred);
}

/* Projects */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--bg);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0px 22px 70px 4px var(--box-shadowred);
  transition: transform 0.2s ease;
}

.project-card:hover {
  transform: translateY(-5px);
}

/* Contact form */
form {
  display: grid;
  gap: 1rem;
}

input,
textarea {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  background: var(--bg);
  color: var(--text);
}

input:focus,
textarea:focus {
  outline: 2px solid var(--secondary);
}

button {
  background: var(--button-color);
  color: white;
  border: none;
  padding: 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s ease, transform 0.2s ease;
}

button:hover {
  background: var(--button-color);
  transform: translateY(-2px);
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 1rem;
  background: #000000;
  color: white;
  margin-top: 2rem;
  border-radius: 12px 12px 0 0;
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 768px) {
  .glass-nav ul {
    flex-direction: row;
    gap: 1rem;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero p {
    font-size: 1.2rem;
  }
}
