/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    sans-serif;
  background: #0a0a0a;
  color: #ffffff;
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100vw;
}

/* Custom Properties */
:root {
  --primary: #66d9ed;
  --secondary: #ff6b6b;
  --accent: #4ecdc4;
  --background: #0a0a0a;
  --surface: #1a1a1a;
  --surface-light: #2a2a2a;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --border: #333333;
  --gradient-primary: linear-gradient(135deg, #66d9ed 0%, #4ecdc4 100%);
  --gradient-secondary: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.4);
  --border-radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Background Elements */
.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(
      rgba(102, 217, 237, 0.05) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(102, 217, 237, 0.05) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: -2;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition);
}

.nav.scrolled {
  background: rgba(10, 10, 10, 0.9);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1001;
}

.nav-brand {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 600;
}

.brand-bracket {
  color: var(--primary);
}

.brand-name {
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  position: relative;
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
  position: relative;
  z-index: 1001;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition);
}

/* Mobile Navigation */
.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  z-index: 1;
  margin-bottom: 2rem;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-tag {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  opacity: 0.8;
}

.tag-bracket {
  color: var(--primary);
}

.tag-text {
  color: var(--text-secondary);
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.title-line {
  display: block;
  color: var(--text-secondary);
  font-size: 0.6em;
}

.title-name {
  display: inline;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.title-cursor {
  display: inline-block;
  color: var(--primary);
  animation: blink 1s infinite;
  margin-left: 4px;
}

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

.hero-description {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 90%;
}

.hero-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 100%;
  margin-bottom: 3rem;
  gap: 1rem;
}

.stat-item {
  flex: 1;
  text-align: center;
  min-width: 0;
  max-width: calc(33.333% - 0.667rem);
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  font-family: var(--font-mono);
  line-height: 1.2;
}

.stat-label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  line-height: 1.3;
  word-break: break-word;
  hyphens: auto;
}

.hero-actions {
  display: flex;
  gap: 1rem;
}

.hero-visual {
  position: relative;
  z-index: 4;
}

.btn-primary,
.btn-secondary {
  padding: 12px 24px;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 500;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  transition: var(--transition);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--background);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary:hover {
  background: var(--primary);
  color: var(--background);
}

.btn-outline {
  padding: 12px 24px;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 500;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  transition: var(--transition);
  border: 2px solid var(--accent);
  background: transparent;
  color: var(--accent);
  position: relative;
  overflow: hidden;
}

.btn-outline:hover {
  background: var(--accent);
  color: var(--background);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Code Window */
.code-window {
  background: var(--surface);
  border-radius: var(--border-radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: float 6s ease-in-out infinite;
  position: relative;
  z-index: 2;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

.window-header {
  background: var(--surface-light);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.window-controls {
  display: flex;
  gap: 6px;
}

.control {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.control.red {
  background: #ff5f56;
}
.control.yellow {
  background: #ffbd2e;
}
.control.green {
  background: #27ca3f;
}

.window-title {
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-family: var(--font-mono);
}

.code-content {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.4;
  white-space: nowrap;
  overflow-x: auto;
}

.code-line {
  display: flex;
  align-items: flex-start;
  margin-bottom: 3px;
  min-height: 1.4em;
}

.line-number {
  color: var(--text-muted);
  width: 24px;
  margin-right: 16px;
  text-align: right;
}

.code-keyword {
  color: #ff79c6;
}
.code-variable {
  color: #8be9fd;
}
.code-operator {
  color: #ff79c6;
}
.code-property {
  color: #50fa7b;
}
.code-string {
  color: #f1fa8c;
}
.code-bracket {
  color: #bd93f9;
}
.code-comment {
  color: #6272a4;
}
.code-indent {
  color: transparent;
}

.typing-line {
  white-space: nowrap;
  overflow: hidden;
}

.typing-line .code-comment {
  display: inline-block;
  width: 0;
  animation: typewriter 4s steps(50) infinite;
  white-space: nowrap;
  overflow: hidden;
}

@keyframes typewriter {
  0% {
    width: 0;
  }
  70% {
    width: 100%;
  }
  100% {
    width: 100%;
  }
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.6;
}

.scroll-line {
  width: 2px;
  height: 40px;
  background: var(--gradient-primary);
  animation: scroll-bounce 2s infinite;
}

.scroll-text {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  writing-mode: vertical-lr;
}

@keyframes scroll-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(10px);
  }
}

/* Sections */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.title-bracket {
  color: var(--primary);
}

.title-text {
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* About Section */
.about {
  padding: 10rem 0 8rem 0;
  background: var(--surface);
  position: relative;
  z-index: 3;
}

.about-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  align-items: start;
}

.text-block {
  margin-bottom: 3rem;
}

.text-block h3 {
  color: var(--primary);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
}

.text-block p {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 1rem;
}

.obsessions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.obsession-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--surface-light);
  border-radius: 8px;
  transition: var(--transition);
}

.obsession-item:hover {
  background: rgba(102, 217, 237, 0.1);
  transform: translateX(4px);
}

.obsession-icon {
  font-size: 1.5rem;
}

.obsession-text {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.about-images {
  position: relative;
}

.image-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.image-item {
  position: relative;
}

.about-img {
  width: 100%;
  height: auto;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: var(--border-radius);
  border: 1px solid var(--border);
}

.image-caption {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 0.5rem;
  font-style: italic;
}

.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  border-style: dashed;
}

.placeholder-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.placeholder-icon {
  font-size: 2rem;
  opacity: 0.5;
}

.placeholder-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-align: center;
  font-style: italic;
}

.tech-stack {
  background: var(--surface-light);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
}

.stack-title {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--primary);
  margin-bottom: 1rem;
  font-weight: 600;
}

.stack-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stack-item {
  background: rgba(102, 217, 237, 0.1);
  color: var(--primary);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  border: 1px solid rgba(102, 217, 237, 0.2);
}

/* Work Section */
.work {
  padding: 8rem 0;
  background: var(--background);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--surface);
  border-radius: var(--border-radius);
  padding: 2rem;
  border: 1px solid var(--border);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: block;
  text-decoration: none;
  color: inherit;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(102, 217, 237, 0.3);
}

.project-card:hover::before {
  opacity: 1;
}

.project-card.featured {
  grid-column: 1 / -1;
  background: linear-gradient(
    135deg,
    var(--surface) 0%,
    rgba(102, 217, 237, 0.1) 100%
  );
  border: 2px solid rgba(102, 217, 237, 0.3);
  transform: scale(1.02);
}

.project-card.featured::before {
  height: 4px;
  background: var(--gradient-primary);
  opacity: 1;
}

.project-card.featured .project-type {
  background: var(--gradient-primary);
  color: var(--background);
  font-weight: 600;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.project-type {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.project-links {
  display: flex;
  gap: 1rem;
}

.project-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 4px 8px;
  border-radius: 4px;
  transition: var(--transition);
}

.project-link:hover {
  color: var(--primary);
  background: rgba(102, 217, 237, 0.1);
}

.project-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.project-description {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-tag {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
}

.projects-footer {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

/* Contact Section */
.contact {
  padding: 8rem 0;
  background: var(--surface);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-top: 3rem;
}

.contact-item {
  margin-bottom: 2rem;
}

.contact-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}
#email-value {
  cursor: pointer;
}
.contact-value {
  font-size: 1.1rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
  cursor: default;
}

.contact-value:hover {
  color: var(--primary);
}

.contact-cta p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.chat-topics {
  list-style: none;
}

.chat-topics li {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1.5rem;
}

.chat-topics li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary);
}

/* Footer */
.footer {
  background: var(--background);
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-text {
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.footer-bracket {
  color: var(--primary);
}

.footer-name {
  color: var(--text-secondary);
}

.footer-year {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
    padding: 0 1rem;
  }
  .hero {
    min-height: auto;
    margin-top: 75px;
    margin-bottom: 75px;
  }

  .about {
    padding: 6rem 0 8rem 0;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .contact-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
  }

  .nav-links.active {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
  }

  .nav-links.active a {
    opacity: 1;
    transform: translateY(0);
  }

  .nav-links.active a:nth-child(1) {
    transition-delay: 0.1s;
  }
  .nav-links.active a:nth-child(2) {
    transition-delay: 0.2s;
  }
  .nav-links.active a:nth-child(3) {
    transition-delay: 0.3s;
  }
  .nav-links.active a:nth-child(4) {
    transition-delay: 0.4s;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-stats {
    gap: 1.5rem;
  }

  .code-window {
    display: none;
  }

  .hero-actions {
    justify-content: center;
  }

  .obsessions-grid {
    grid-template-columns: 1fr;
  }

  .image-gallery {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .project-links {
    flex-direction: column;
    gap: 0.5rem;
  }

  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

@media (max-width: 400px) {
  .hero {
    padding-top: 5rem;
  }

  .container {
    padding: 0 1rem;
  }

  .nav-container {
    padding: 0 1rem;
  }

  .hero-container {
    padding: 0 1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .code-window {
    margin-top: 50px;
    margin-bottom: 20px;
  }

  .code-content {
    padding: 15px;
    font-size: 0.7rem;
    line-height: 1.3;
    white-space: normal;
    overflow-x: visible;
  }

  .code-line {
    margin-bottom: 2px;
  }

  .line-number {
    width: 20px;
    margin-right: 12px;
  }
}

/* Smooth animations */
@media (prefers-reduced-motion: no-preference) {
  .hero-content > * {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
  }

  .hero-tag {
    animation-delay: 0.1s;
  }
  .hero-title {
    animation-delay: 0.2s;
  }
  .hero-description {
    animation-delay: 0.3s;
  }
  .hero-stats {
    animation-delay: 0.4s;
  }
  .hero-actions {
    animation-delay: 0.5s;
  }
  .code-window {
    animation-delay: 0.6s;
  }
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
