:root {
  --accent: #f34f4f;
  --accent-soft: rgb(243 108 79 / 10%);
  --accent-mild: rgb(243 108 79 / 60%);
  --accent-hover: #d1563d;
  --bg: #fdfdfd;
  --bg-gradient: radial-gradient(circle at 20% 20%, #fff 0%, #f1f3f5 100%);
  --text: #1a1d23;
  --muted: #636e72;
  --border: rgb(0 0 0 / 8%);
  --card-bg: rgb(255 255 255 / 70%);
  --skill-bg: #f1f3f5;
  --header-height: 80px;
  --radius: 16px;
  --select-bg: #fff;
  --terminal-bg: #0b1220;
  --terminal-border: #1f2b44;
  --terminal-text: #d9e5ff;
  --terminal-muted: #8ea1c9;
  --terminal-green: #6ee7b7;
}

body.dark-theme {
  --bg: #0d1117;
  --bg-gradient: radial-gradient(circle at 0% 0%, #161b22 0%, #0d1117 100%);
  --text: #f0f6fc;
  --muted: #8b949e;
  --border: rgb(240 246 252 / 10%);
  --card-bg: rgb(22 27 34 / 60%);
  --skill-bg: #21262d;
  --select-bg: #21262d;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Plus Jakarta Sans", sans-serif;
  color: var(--text);
  background: var(--bg);
  background-image: var(--bg-gradient);
  transition: background 0.5s ease;
  overflow-x: hidden;
  line-height: 1.6;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 10px;
}

/* Cursor Glow */
.cursor-glow {
  position: fixed;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--accent-soft) 25%, transparent 75%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  transition:
    width 0.3s,
    height 0.3s;
}

.layout {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header & Nav */
header {
  position: sticky;
  top: 0;
  height: var(--header-height);
  padding: 0 2.5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
  font: inherit;
}

.profile-pic-small {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 2px solid var(--accent);
  object-fit: cover;
  object-position: 5% 5%;
  transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.header-left:hover .profile-pic-small {
  transform: scaleX(-1) scale(1.3);
}

#theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: var(--accent);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.3s ease,
    color 0.3s ease;
}

#theme-toggle:hover {
  transform: rotate(15deg) scale(1.3);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-dropdown {
  position: relative;
}

.auth-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: var(--accent);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.3s ease,
    color 0.3s ease;
}

.auth-toggle:hover {
  transform: scale(1.2);
}

.login-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(360px, calc(100vw - 24px));
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
  z-index: 1300;
}

.auth-dropdown.open .login-dropdown {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Mobile Menu Button */
.hamburger-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
  padding: 10px;
  z-index: 1100;
}

nav {
  display: flex;
  gap: 10px;
  background: var(--skill-bg);
  padding: 5px;
  border-radius: 12px;
}

nav a {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  padding: 8px 20px;
  text-decoration: none;
  border-radius: 8px;
  transition: 0.3s ease;
  cursor: pointer;
  user-select: none;
}

nav a.active {
  background: var(--accent);
  color: white;
}

nav a:focus-visible,
.header-left:focus-visible,
#theme-toggle:focus-visible,
.auth-toggle:focus-visible,
.login-link:focus-visible,
.forget-password:focus-visible,
.modal-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Main Content */
main {
  flex: 1;
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: clamp(20px, 2.6vw, 34px) clamp(14px, 4vw, 56px) 80px;
  position: relative;
}

section {
  display: none;
  opacity: 0;
  transform: translateY(20px);
}

section.active {
  display: block;
  animation: slide-up 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

#about.active {
  display: grid;
  gap: clamp(24px, 5vh, 52px);
}

#about .ticker-wrap,
#about .stats-grid,
#about .skills-section {
  margin: 0;
}

@keyframes slide-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero Section */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: center;
  min-height: clamp(420px, 60vh, 660px);
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(10px, 1.6vh, 16px);
}

.hero-subtitle {
  color: var(--accent);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 3px;
  display: block;
  margin-bottom: 0;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(32px, 8vw, 64px);
  letter-spacing: -2.5px;
  line-height: 1.15;
  margin-bottom: 0;
}

.hero-description {
  font-size: 16px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 0;
  max-width: 65ch;
  text-align: left;
}

.terminal-panel {
  border: 1px solid var(--terminal-border);
  border-radius: 14px;
  background: var(--terminal-bg);
  box-shadow: 0 18px 38px rgb(8 12 23 / 45%);
  overflow: hidden;
  width: 100%;
  max-width: 520px;
  justify-self: end;
}

.terminal-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--terminal-border);
  background: rgb(255 255 255 / 2%);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red {
  background: #fb7185;
}

.dot-amber {
  background: #f59e0b;
}

.dot-green {
  background: #34d399;
}

.terminal-title {
  margin-left: 8px;
  font-size: 12px;
  color: var(--terminal-muted);
  font-weight: 600;
  letter-spacing: 0.3px;
}

.terminal-body {
  padding: 14px;
}

.terminal-line {
  color: var(--terminal-green);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.prompt {
  color: #fbbf24;
  margin-right: 6px;
}

.terminal-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0 0 0 18px;
}

.terminal-list li {
  position: relative;
  color: var(--terminal-text);
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 4px;
}

.terminal-list li::before {
  content: ">";
  position: absolute;
  left: -14px;
  color: var(--terminal-muted);
}

.terminal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.terminal-tags span {
  font-size: 11px;
  font-weight: 700;
  color: var(--terminal-text);
  border: 1px solid rgb(142 161 201 / 25%);
  background: rgb(142 161 201 / 8%);
  border-radius: 999px;
  padding: 4px 8px;
}

.terminal-line.is-live::after {
  content: "_";
  margin-left: 3px;
  animation: terminal-blink 1s steps(2, end) infinite;
}

@keyframes terminal-blink {
  50% {
    opacity: 0;
  }
}

/* Section Titles */
.section-title {
  font-size: 36px;
  margin-bottom: 40px;
}

/* Items / Cards */
.item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 32px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  transition: 0.3s ease;
}

.item:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
}

.item-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.item-date {
  color: var(--accent);
  font-weight: 700;
}

.item-badge {
  font-size: 12px;
  background: var(--skill-bg);
  padding: 4px 10px;
  border-radius: 6px;
}

.item-description {
  color: var(--muted);
  margin-top: 12px;
}

/* Experience bullets & tech tags */
.item-bullets {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
}

.item-bullets li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.item-bullets li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.item-tags span {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-mild);
}

/* Portfolio */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.project-icon {
  color: var(--accent);
}

.project-description {
  color: var(--muted);
  font-size: 15px;
  margin-top: 8px;
}

.project-toolbar {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.project-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-filter {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  background: var(--skill-bg);
  color: var(--muted);
  cursor: pointer;
  font-weight: 600;
  transition: 0.2s ease;
}

.project-filter.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.project-search-label {
  font-size: 12px;
  color: var(--muted);
}

.project-search {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.3s;
}

.project-search:focus {
  outline: none;
  border-color: var(--accent);
}

.project-results {
  min-height: 20px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
}

.project-card[hidden] {
  display: none;
}

/* Project card footer */
.project-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.project-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-card-tags span {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--skill-bg);
  color: var(--muted);
}

.project-details-btn {
  background: none;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: 0.2s ease;
  white-space: nowrap;
  font-family: inherit;
}

.project-details-btn:hover {
  background: var(--accent);
  color: white;
}

/* Contact */
.contact-section {
  padding: clamp(28px, 4vw, 48px);
  max-width: 1100px;
  margin: 0 auto;
}

.contact-title {
  font-size: clamp(32px, 5vw, 44px);
  text-align: center;
  line-height: 1.1;
}

.contact-description {
  margin: 14px auto clamp(24px, 4vh, 36px);
  color: var(--muted);
  text-align: center;
  max-width: 60ch;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(0, 1.35fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: stretch;
  text-align: left;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: flex-start;
}

.contact-info .btn {
  width: 100%;
  justify-content: space-between;
}

.contact-email-btn {
  white-space: normal;
  word-break: break-word;
  text-align: left;
}

.contact-form {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: clamp(16px, 2.5vw, 24px);
}

.contact-form .form-group {
  margin-bottom: 14px;
}

.contact-submit-btn {
  margin-top: 6px;
  width: 100%;
  justify-content: center;
}

.contact-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 140px;
  transition: border-color 0.3s;
}

.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

/* Footer */
.footer-text {
  font-size: 13px;
  letter-spacing: 0;
}

.footer-links {
  display: flex;
  gap: 20px;
}

/* Login Container */
.login-container {
  width: 100%;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 28px;
  text-align: center;
  box-shadow: 0 16px 50px rgb(0 0 0 / 18%);
}

.login-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.login-form {
  width: 100%;
  max-width: none;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.input-wrapper {
  position: relative;
}

.form-group input {
  width: 100%;
  padding: 12px 40px 12px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.3s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
}

.input-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 16px;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.remember-me {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}

.remember-me input[type="checkbox"] {
  margin-right: 8px;
}

.forget-password {
  font-size: 14px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.forget-password:hover {
  text-decoration: underline;
}

.login-btn {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.3s;
  text-align: center;
  display: block;
  font-family: inherit;
}

.login-btn:hover {
  background: var(--accent-hover);
}

.login-footer {
  margin-top: 20px;
  font-size: 14px;
  color: var(--muted);
}

.login-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.login-link:hover {
  text-decoration: underline;
}

.form-status {
  min-height: 20px;
  margin-top: 10px;
  font-size: 12px;
  text-align: left;
}

.form-status[data-state="error"] {
  color: #ff4d4d;
}

.form-status[data-state="success"] {
  color: #35d07f;
}

.form-status[data-state="info"] {
  color: var(--muted);
}

.text-button {
  font: inherit;
}

/* Ticker */
.ticker-wrap {
  width: 100%;
  overflow: hidden;
  background: var(--card-bg);
  padding: 10px 0;
  margin-top: 2.5%;
  margin-bottom: 2.5%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.ticker {
  display: flex;
  white-space: nowrap;
  animation: ticker 30s linear infinite;
  width: max-content;
  cursor: pointer;
}

/* Pause ticker on hover */
.ticker:hover,
.ticker-wrap:hover .ticker {
  animation-play-state: paused;
}

.ticker span {
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 1px;
  margin-right: 75px;
  transition: color 0.3s;
}

@keyframes ticker {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* Welcome Strip — centered shimmer banner */
.welcome-strip {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 2px 20px;
}

.welcome-text {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 6px;
  text-transform: uppercase;
  background: linear-gradient(
    90deg,
    var(--accent) 0%,
    #f59e0b 35%,
    #fb7185 50%,
    #f59e0b 65%,
    var(--accent) 100%
  );
  background-size: 250% auto;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--accent); /* fallback for unsupported browsers */
  animation: welcome-shimmer 4s linear infinite;
}

@keyframes welcome-shimmer {
  0% {
    background-position: 0% center;
  }

  100% {
    background-position: 250% center;
  }
}

/* Social Icons */
.social-icon {
  display: inline-block;
  font-size: 20px;
  transition: transform 0.3s ease;
  color: var(--accent);
}

.social-icon:hover {
  transform: scale(1.25);
}

/* Stat Counter */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr));
  gap: clamp(12px, 1.8vw, 24px);
  margin: 2.5% 0;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 14px;
  text-align: center;
}

.stat-number {
  font-size: 24px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 8px;
}

.stat-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

/* Buttons */
.btn {
  padding: 16px 36px;
  background: var(--accent);
  color: white;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: 0.3s;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}

.btn:hover {
  background: var(--accent-hover);
}

.btn.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn.btn-outline:hover {
  background: var(--accent);
  color: white;
}

/* Logo */
.logo-text {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -1px;
  color: var(--text);
  line-height: 1;
  user-select: none;
}

/* Footer */
footer {
  padding: 1%;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg);
  backdrop-filter: blur(12px);
}

/* Skills Section */
.skills-section {
  margin-top: 48px;
}

.skills-title {
  font-size: clamp(24px, 3.2vw, 30px);
  margin-bottom: clamp(16px, 2.8vh, 24px);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: clamp(12px, 1.8vw, 18px);
}

.skill-group {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(16px, 1.8vw, 20px);
  height: 100%;
}

.skill-group-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 12px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--skill-bg);
  color: var(--text);
  border: 1px solid var(--border);
}

/* Project Detail Modal */
.project-detail-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgb(0 0 0 / 70%);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
  padding: 20px;
}

.project-detail-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.project-detail-content {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 540px;
  transform: scale(0.9);
  transition: transform 0.4s;
  max-height: 90vh;
  overflow-y: auto;
}

.project-detail-modal.active .project-detail-content {
  transform: scale(1);
}

.project-detail-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.project-detail-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

.project-detail-title {
  font-size: 20px;
  font-weight: 700;
}

.project-detail-description {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 24px;
}

.project-detail-meta {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-detail-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-tag {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-mild);
}

.project-detail-outcomes {
  list-style: none;
  padding: 0;
}

.project-detail-outcomes li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.project-detail-outcomes li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #34d399;
  font-weight: 700;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 90px;
  right: 20px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  box-shadow: 0 8px 24px rgb(0 0 0 / 15%);
  opacity: 0;
  transform: translateX(20px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
  pointer-events: auto;
  max-width: 320px;
}

.toast.toast-show {
  opacity: 1;
  transform: translateX(0);
}

.toast.toast-success {
  border-left: 3px solid #34d399;
}

.toast.toast-error {
  border-left: 3px solid #fb7185;
}

.toast.toast-info {
  border-left: 3px solid var(--accent);
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 80px;
  left: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    background 0.2s ease;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--accent-hover);
}

/* Modal */
.image-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgb(0 0 0 / 85%);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: 0.4s;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  font-family: inherit;
}

.image-modal .modal-close {
  background: rgb(0 0 0 / 55%);
  color: #fff;
  border-color: rgb(255 255 255 / 30%);
}

.image-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  width: 90%;
  max-width: 450px;
  border-radius: 20px;
  border: 4px solid var(--accent);
  transform: scale(0.8);
  transition: 0.4s;
}

.image-modal .modal-content {
  transform: scaleX(-1) scale(0.8);
}

.image-modal.active .modal-content {
  transform: scaleX(-1) scale(1);
}

/* Sign Up Modal */
.signup-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgb(0 0 0 / 60%);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: 0.4s;
}

.signup-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.signup-modal .modal-content {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  width: 90%;
  max-width: 400px;
  transform: scale(0.8);
  transition: 0.4s;
  text-align: center;
}

.signup-modal.active .modal-content {
  transform: scale(1);
}

.signup-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
}

.signup-form {
  width: 100%;
}

.signup-btn {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.3s;
  margin-top: 20px;
  font-family: inherit;
}

.signup-btn:hover {
  background: var(--accent-hover);
}

.signup-footer {
  margin-top: 20px;
  font-size: 14px;
  color: var(--muted);
}

.signup-footer .login-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.signup-footer .login-link:hover {
  text-decoration: underline;
}

.password-note {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
  font-style: italic;
  text-align: left;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 4px;
}

.error-message {
  color: #f44;
  font-size: 12px;
  margin-top: 5px;
  display: block;
  min-height: 18px;
}

@media (width >= 1280px) {
  #about .stats-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  #about .skills-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Mobile Responsive Logic */
@media (width <= 900px) {
  main {
    padding: 18px 16px 80px;
  }

  #about.active {
    gap: 22px;
  }

  .hamburger-btn {
    display: block;
  }

  nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: var(--bg);
    padding: 30px;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    gap: 15px;
    z-index: 999;
  }

  nav.show-menu {
    display: flex;
    animation: slide-down 0.3s ease forwards;
  }

  .login-dropdown {
    position: fixed;
    top: calc(var(--header-height) + 10px);
    left: 12px;
    right: 12px;
    width: auto;
  }

  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 0;
    min-height: auto;
    gap: 20px;
  }

  .hero-text {
    align-items: center;
    text-align: center;
    margin-bottom: 0;
  }

  .hero-description {
    text-align: center;
    max-width: 60ch;
  }

  .hero-buttons {
    justify-content: center;
    width: 100%;
  }

  .hero-buttons .btn {
    justify-content: center;
    flex: 1 1 220px;
  }

  .terminal-panel {
    text-align: left;
    max-width: none;
    justify-self: stretch;
  }

  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .skills-section {
    margin-top: 0;
  }

  .skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .contact-section {
    padding: 24px 16px;
  }

  .contact-info .btn {
    justify-content: center;
    text-align: center;
    gap: 10px;
  }

  .contact-form {
    padding: 16px;
  }

  footer {
    position: static;
    height: auto;
    padding: 16px 5%;
    margin-top: 24px;
  }

  .back-to-top,
  .toast-container {
    bottom: 20px;
  }
}

@media (orientation: landscape) and (height <= 760px) {
  #about.active {
    gap: 20px;
  }

  .hero {
    min-height: auto;
    align-items: start;
  }

  .hero-text {
    gap: 10px;
  }

  .hero-description {
    max-width: 58ch;
  }

  .stats-grid {
    gap: 12px;
  }

  .skill-group {
    padding: 16px;
  }
}

@keyframes slide-down {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .cursor-glow {
    display: none;
  }

  .ticker {
    animation: none;
  }

  .welcome-text {
    animation: none;
  }
}

/* Print Styles */
@media print {
  .cursor-glow,
  .back-to-top,
  .toast-container,
  .header-actions,
  .hamburger-btn,
  .ticker-wrap,
  footer {
    display: none !important;
  }

  header {
    position: static;
  }

  section {
    display: block !important;
    opacity: 1 !important;
    transform: none !important;
    page-break-inside: avoid;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .terminal-panel {
    display: none;
  }

  .item {
    break-inside: avoid;
  }
}
