@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #0a0a0f;
  --bg-secondary: #111118;
  --surface: #1a1a24;
  --surface-hover: #22222e;
  --forge: #d8590c;
  --forge-light: #f59f00;
  --forge-glow: rgba(216, 89, 12, 0.12);
  --forge-glow-strong: rgba(216, 89, 12, 0.25);
  --text: #e8e8ee;
  --text-muted: #7a7a8a;
  --border: #2a2a38;
  --steel: #5a5a6a;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

::selection {
  background: var(--forge);
  color: #fff;
}

/* Noise overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

/* Nav */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 1rem 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo-img {
  height: 40px;
  width: auto;
}

.logo-text {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
  letter-spacing: 0.3px;
}

.nav-links a:hover {
  color: var(--forge-light);
}

.nav-cta {
  padding: 0.55rem 1.25rem !important;
  background: var(--forge);
  color: #fff !important;
  border-radius: 6px;
  font-weight: 600 !important;
  transition: background 0.2s !important;
}

.nav-cta:hover {
  background: #e06e20 !important;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  z-index: 101;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: all 0.3s;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

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

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 800px;
  height: 800px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--forge-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-logo {
  height: 200px;
  width: auto;
  margin-bottom: 2rem;
  position: relative;
  filter: drop-shadow(0 0 40px var(--forge-glow));
  animation: logo-float 4s ease-in-out infinite;
}

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

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.1;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text) 0%, var(--forge-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  white-space: nowrap;
  margin-bottom: 2.5rem;
  font-weight: 400;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(216, 89, 12, 0.1);
  border: 1px solid rgba(216, 89, 12, 0.2);
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--forge-light);
  margin-bottom: 2rem;
}

.hero-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--forge-light);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--forge-light); }
  50% { opacity: 0.4; box-shadow: 0 0 2px var(--forge-light); }
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  padding: 0.85rem 2rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.25s;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--forge);
  color: #fff;
}

.btn-primary:hover {
  background: #e06e20;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(216, 89, 12, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--forge);
  color: var(--forge-light);
  transform: translateY(-2px);
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.mouse {
  width: 22px;
  height: 34px;
  border: 2px solid var(--border);
  border-radius: 12px;
  position: relative;
}

.wheel {
  width: 3px;
  height: 7px;
  background: var(--forge);
  border-radius: 2px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll-wheel 1.5s ease-in-out infinite;
}

@keyframes scroll-wheel {
  0%, 100% { opacity: 1; top: 6px; }
  50% { opacity: 0.3; top: 14px; }
}

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 50;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--forge);
  font-size: 1.1rem;
  text-decoration: none;
  transition: all 0.2s;
}

.back-to-top a:hover {
  background: var(--surface-hover);
  border-color: var(--forge);
  transform: translateY(-3px);
}

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

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

.section-label {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  background: rgba(216, 89, 12, 0.08);
  border: 1px solid rgba(216, 89, 12, 0.15);
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--forge-light);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 1rem;
}

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

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

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

.work-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--forge), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.work-card:hover {
  border-color: rgba(216, 89, 12, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.work-icon {
  width: 48px;
  height: 48px;
  background: rgba(216, 89, 12, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1.25rem;
}

.work-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.work-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.work-tech {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.work-tech span {
  padding: 0.3rem 0.65rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.7rem;
  color: var(--steel);
  font-family: 'JetBrains Mono', monospace;
}

.work-arrow {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  color: var(--forge);
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.3s;
}

.work-card:hover .work-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.skill-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  text-align: center;
  transition: all 0.2s;
}

.skill-item:hover {
  border-color: rgba(216, 89, 12, 0.3);
  transform: translateY(-2px);
}

.skill-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.skill-level {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Contact */
.contact-section {
  padding-bottom: 4rem;
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-info h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.contact-info p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.contact-detail .icon {
  width: 36px;
  height: 36px;
  background: var(--surface);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form input,
.contact-form textarea {
  padding: 0.9rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--forge);
  box-shadow: 0 0 0 3px var(--forge-glow);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--steel);
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.form-status {
  font-size: 0.9rem;
  min-height: 1.5em;
}

/* Footer */
footer {
  text-align: center;
  padding: 3rem 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

footer .forge-mark {
  color: var(--forge-light);
}

/* Fade-in animation */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-scale {
  opacity: 0;
  transform: scale(0.95);
  transition: all 0.5s ease-out;
}

.fade-in-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Project pages (keep compatibility) */
.project-nav {
  padding: 1.5rem 2rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.project-nav a {
  color: var(--forge-light);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.project-nav a:hover {
  color: var(--text);
}

.project-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.project-header-section {
  text-align: center;
  margin-bottom: 3rem;
  margin-top: 2rem;
}

.project-icon-large {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}

.project-header-section h1 {
  font-size: 2.2rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.project-section h2 {
  color: var(--forge-light);
  font-size: 1.4rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.project-section p,
.project-section ul {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.project-section ul {
  margin-left: 1.5rem;
}

.project-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.project-tech {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.tech-tag {
  padding: 0.3rem 0.65rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--steel);
  font-family: 'JetBrains Mono', monospace;
}

.feature {
  margin-bottom: 2rem;
}

.feature h3 {
  color: var(--text);
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.feature pre {
  margin: 1rem 0;
  border-radius: 8px;
  overflow: hidden;
}

.feature code {
  font-size: 0.85rem;
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
  nav {
    padding: 1rem 1.5rem;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    height: 100vh;
    background: var(--surface);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: right 0.3s;
    border-left: 1px solid var(--border);
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links a {
    font-size: 1.1rem;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-logo {
    height: 120px;
  }

  .scroll-indicator {
    display: none;
  }

  section {
    padding: 4rem 1.5rem;
  }

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

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

@media (max-width: 480px) {
  .skills-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-logo {
    height: 90px;
  }

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

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
}
