.loading-sequence {
  text-align: center;
}

.loading-text {
  color: var(--accent);
  animation: loadingFlash 1.5s ease-in-out 3;
}

.loading-cursor {
  color: var(--accent);
  animation: blink 1s infinite;
}

@keyframes loadingFlash {
  0%, 50% { opacity: 1; }
  25%, 75% { opacity: 0.3; }
}

.terminal-content {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0a0a0a;
  --text: #f5f5f5;
  --accent: #00d9ff;
  --card-bg: rgba(255, 255, 255, 0.03);
  --border: rgba(255, 255, 255, 0.1);
  --shadow: rgba(0, 217, 255, 0.1);
  --terminal-bg: rgba(0, 0, 0, 0.6);
  --code-bg: rgba(0, 217, 255, 0.05);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
}

.cursor-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 10000;
  mix-blend-mode: difference;
}

.cursor-outline {
  width: 30px;
  height: 30px;
  border: 2px solid rgba(0, 217, 255, 0.3);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
}

.particles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0.3;
  animation: float 6s infinite ease-in-out;
}

.particle:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { top: 50%; left: 80%; animation-delay: 1s; }
.particle:nth-child(3) { top: 70%; left: 20%; animation-delay: 2s; }
.particle:nth-child(4) { top: 30%; left: 70%; animation-delay: 3s; }
.particle:nth-child(5) { top: 80%; left: 50%; animation-delay: 4s; }
.particle:nth-child(6) { top: 10%; left: 60%; animation-delay: 5s; }

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.3; }
  33% { transform: translateY(-20px) rotate(120deg); opacity: 0.6; }
  66% { transform: translateY(10px) rotate(240deg); opacity: 0.4; }
}

/* Animated background gradient */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 80%, rgba(0, 217, 255, 0.05) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(0, 217, 255, 0.03) 0%, transparent 50%);
  z-index: -1;
  animation: gradientShift 8s ease-in-out infinite alternate;
}

@keyframes gradientShift {
  0% { opacity: 0.5; }
  100% { opacity: 0.8; }
}

header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: all 0.3s ease;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo-text {
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--accent);
  letter-spacing: 1px;
}

.logo-bracket {
  color: var(--text);
  font-weight: 200;
  font-size: 1.2rem;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 300;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.resume-btn {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.6rem 1.2rem;
  border-radius: 30px;
  font-weight: 300;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.resume-btn:hover {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 0 20px var(--shadow);
}

.btn-icon {
  transition: transform 0.3s ease;
}

.resume-btn:hover .btn-icon {
  transform: translateX(3px);
}

/* Main content */
main {
  padding-top: 80px;
}

section {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

#hero {
  text-align: center;
  padding: 4rem 2rem;
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-content {
  max-width: 800px;
  width: 100%;
}

.terminal-window {
  background: var(--terminal-bg);
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 3rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.terminal-dots {
  display: flex;
  gap: 0.5rem;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27ca3f; }

.terminal-title {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 300;
}

.terminal-body {
  padding: 1.5rem;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
  font-size: 0.9rem;
  text-align: center;
}

.terminal-line {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: baseline;
}

.prompt {
  color: var(--accent);
  margin-right: 0.5rem;
}

.command {
  color: #9ca3af;
}

.terminal-output {
  color: var(--text);
  margin-left: 1.5rem;
  margin-bottom: 0.5rem;
}

.terminal-cursor {
  color: var(--accent);
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.typed-text {
  animation: typing 2s steps(6) 5.5s both;
  overflow: hidden;
  width: 0;
  display: inline-block;
  vertical-align: baseline;
}

@keyframes typing {
  from { width: 0; }
  to { width: 6ch; }
}

.hero-title {
  font-size: 3rem;
  font-weight: 200;
  margin-bottom: 1rem;
  letter-spacing: 2px;
}

.name-highlight {
  color: var(--accent);
  font-weight: 300;
  position: relative;
}

.hero-subtitle {
  font-size: 1.2rem;
  font-weight: 300;
  opacity: 0.8;
  margin-bottom: 2rem;
}

.floating-code {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.code-snippet {
  position: absolute;
  background: var(--code-bg);
  color: var(--accent);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 217, 255, 0.2);
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 0.8rem;
  animation: codeFloat 8s infinite ease-in-out;
  backdrop-filter: blur(10px);
}

.code-snippet:nth-child(1) {
  top: 15%;
  left: 5%;
  animation-delay: 0s;
}

.code-snippet:nth-child(2) {
  top: 25%;
  right: 8%;
  animation-delay: 1s;
}

.code-snippet:nth-child(3) {
  top: 60%;
  left: 3%;
  animation-delay: 2s;
}

.code-snippet:nth-child(4) {
  bottom: 35%;
  right: 12%;
  animation-delay: 3s;
}

.code-snippet:nth-child(5) {
  bottom: 20%;
  left: 10%;
  animation-delay: 4s;
}

.code-snippet:nth-child(6) {
  top: 75%;
  right: 5%;
  animation-delay: 5s;
}

@keyframes codeFloat {
  0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.6; }
  50% { transform: translateY(-15px) rotate(2deg); opacity: 0.8; }
}

.section-title {
  font-size: 2rem;
  font-weight: 200;
  margin-bottom: 3rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 1rem;
  letter-spacing: 1px;
}

.title-number {
  font-size: 1.2rem;
  color: var(--accent);
  font-weight: 300;
}

.title-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--accent), transparent);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  font-size: 1.1rem;
  font-weight: 300;
  opacity: 0.9;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.tech-stack h4 {
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 300;
  margin-bottom: 1rem;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.tech-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 300;
  text-align: center;
  transition: all 0.3s ease;
}

.tech-item:hover {
  border-color: var(--accent);
  background: rgba(0, 217, 255, 0.1);
}

.code-editor {
  background: var(--terminal-bg);
  border-radius: 12px;
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.editor-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.editor-tabs {
  display: flex;
}

.tab {
  background: rgba(0, 217, 255, 0.1);
  color: var(--accent);
  padding: 0.5rem 1rem;
  border-radius: 8px 8px 0 0;
  font-size: 0.9rem;
  font-weight: 300;
}

.editor-body {
  padding: 1.5rem;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 0.9rem;
}

.code-line {
  display: flex;
  margin-bottom: 0.3rem;
}

.line-number {
  color: #6b7280;
  width: 2rem;
  text-align: right;
  margin-right: 1rem;
  user-select: none;
}

.keyword { color: #f59e0b; }
.variable { color: #10b981; }
.property { color: #8b5cf6; }
.string { color: #ef4444; }
.number { color: #06b6d4; }

.project-list {
  display: grid;
  gap: 3rem;
}

.project {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.project::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.project:hover::before {
  transform: translateX(100%);
}

.project:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 20px 40px rgba(0, 217, 255, 0.1);
}

.featured-project {
  background: linear-gradient(135deg, var(--card-bg), rgba(0, 217, 255, 0.05));
  border: 1px solid rgba(0, 217, 255, 0.3);
}

.project-number {
  position: absolute;
  top: 1rem;
  right: 2rem;
  font-size: 3rem;
  font-weight: 100;
  color: rgba(0, 217, 255, 0.1);
  pointer-events: none;
}

.project h4 {
  color: var(--accent);
  font-size: 1.3rem;
  font-weight: 300;
  margin-bottom: 1rem;
  letter-spacing: 0.5px;
}

.project-links {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 300;
  transition: all 0.3s ease;
}

.project-link:hover {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 0 15px var(--shadow);
  text-shadow: none;
  transform: translateY(-2px);
}

.project p {
  font-weight: 300;
  opacity: 0.8;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-tag {
  background: rgba(0, 217, 255, 0.1);
  color: var(--accent);
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 300;
  border: 1px solid rgba(0, 217, 255, 0.3);
}

.contact-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.contact-intro {
  font-size: 1.1rem;
  font-weight: 300;
  opacity: 0.9;
  margin-bottom: 3rem;
  line-height: 1.8;
}

.contact-terminal {
  background: var(--terminal-bg);
  border-radius: 12px;
  border: 1px solid var(--border);
  margin: 3rem 0;
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  text-align: left;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.contact-line {
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
}

.contact-prompt {
  color: var(--accent);
  margin-right: 0.8rem;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
}

.contact-command {
  color: #9ca3af;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
  margin-right: 1rem;
}

.contact-output {
  margin-left: 2rem;
  margin-bottom: 1rem;
}

.contact-link {
  color: var(--accent);
  text-decoration: none;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
  transition: all 0.3s ease;
  position: relative;
}

.contact-link:hover {
  text-shadow: 0 0 10px var(--accent);
  text-decoration: underline;
}

.contact-cursor {
  color: var(--accent);
  animation: blink 1s infinite;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
}

.contact-cta {
  margin-top: 3rem;
  text-align: center;
}

.contact-cta p {
  font-size: 1.1rem;
  font-weight: 300;
  opacity: 0.8;
  margin-bottom: 2rem;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  background: linear-gradient(135deg, var(--accent), #00b8d4);
  color: var(--bg);
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(0, 217, 255, 0.3);
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(0, 217, 255, 0.4);
  text-shadow: none;
}

.cta-button svg {
  transition: transform 0.3s ease;
}

.cta-button:hover svg {
  transform: translateX(3px);
}

footer {
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 300;
  opacity: 0.6;
}

.footer-link {
  color: var(--accent);
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-link:hover {
  text-shadow: 0 0 10px var(--accent);
}

.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
}

.modal-content {
  background-color: var(--bg);
  margin: 2% auto;
  padding: 40px 20px 20px;
  border-radius: 20px;
  width: 95%;
  max-width: 1000px;
  height: 95vh;
  border: 1px solid var(--border);
  box-shadow: 0 0 50px rgba(0, 217, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.modal-content iframe {
  width: 100%;
  height: calc(100% - 20px);
  border: none;
  border-radius: 10px;
}

.close {
  color: var(--text);
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2rem;
  cursor: pointer;
  z-index: 100;
  transition: all 0.3s ease;
}

.close:hover {
  color: var(--accent);
  text-shadow: 0 0 10px var(--accent);
}

@media (max-width: 768px) {
  body {
    cursor: auto;
  }

  .cursor-dot,
  .cursor-outline {
    display: none;
  }

  nav {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  nav ul {
    gap: 1rem;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .floating-code {
    display: none;
  }

  .contact-terminal {
    margin: 2rem 0;
  }

  .contact-line {
    flex-wrap: wrap;
  }

  .contact-output {
    margin-left: 0;
    margin-top: 0.5rem;
    word-break: break-all;
  }

  .cta-button {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
  }

  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  section {
    padding: 3rem 1rem;
  }
}

html {
  scroll-behavior: smooth;
}

::selection {
  background-color: var(--accent);
  color: var(--bg);
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #00b8d4;
}