:root {
  --bg: #0d1b2a;
  --bg-alt: #111f33;
  --surface: #1b2838;
  --surface-hover: #243447;
  --border: #2a3a4e;
  --text: #8b9bb4;
  --bright: #d4dee8;
  --white: #e8f0f8;
  --accent: #ff6b35;
  --accent-dim: rgba(255, 107, 53, 0.12);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
  --nav-h: 70px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover {
  color: var(--accent);
  transform: translateY(-1px);
}

img { max-width: 100%; display: block; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }

.section { padding: 6rem 0; }

.section-alt { background: var(--bg-alt); }

.section-num {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 400;
  margin-right: 0.5rem;
}

.section-title {
  font-size: clamp(1.6rem, 4vw, 2rem);
  color: var(--white);
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title.center { justify-content: center; }

.section-title::after {
  content: '';
  display: block;
  height: 1px;
  width: 200px;
  background: var(--border);
  margin-left: 1rem;
  flex-shrink: 0;
}

.section-title.center::after { display: none; }

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(13, 27, 42, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
  height: var(--nav-h);
}

.nav.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}

.nav-logo {
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
  border: 2px solid var(--accent);
  border-radius: 6px;
  padding: 0.15rem 0.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-logo:hover {
  background: var(--accent);
  color: var(--bg);
  transform: rotate(-5deg) scale(1.1);
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

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

.nav-links a {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

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

.nav-links a:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

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

.nav-socials {
  display: flex;
  gap: 0.75rem;
  margin-left: 0.5rem;
  padding-left: 1rem;
  border-left: 1px solid var(--border);
}

.nav-social-link {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent) !important;
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  transition: background 0.2s, color 0.2s;
}

.nav-social-link:hover {
  background: var(--accent);
  color: var(--bg) !important;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: calc(var(--nav-h) + 2rem) 2rem 4rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 20% 50%, var(--accent-dim) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-greeting {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.hero-name {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.hero-tagline {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text);
  max-width: 540px;
  margin-bottom: 2rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.8rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--mono);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent);
  color: var(--bg);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 25px rgba(255, 107, 53, 0.35);
}

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

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.2);
}

.hero-terminal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 0.85rem;
  animation: float 6s ease-in-out infinite;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

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

.terminal-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-dot--red { background: #ff5f56; }
.terminal-dot--yellow { background: #ffbd2e; }
.terminal-dot--green { background: #27c93f; }

.terminal-title {
  color: var(--text);
  font-size: 0.75rem;
  margin-left: 0.5rem;
}

.terminal-body {
  padding: 1.25rem;
  line-height: 1.8;
}

.terminal-body p { margin-bottom: 0.2rem; }

.t-prompt { color: var(--accent); }
.t-cmd { color: var(--white); }
.t-output { color: var(--text); padding-left: 0.5rem; }
.t-true { color: var(--accent); }

.t-cursor {
  display: inline-block;
  animation: blink 1s step-end infinite;
  color: var(--accent);
}

@keyframes blink {
  50% { opacity: 0; }
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.about-initials {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 8px;
  margin-bottom: 1.5rem;
  background: var(--accent-dim);
}

.about-text p { margin-bottom: 1rem; color: var(--text); }
.about-text strong { color: var(--accent); font-weight: 500; }

.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.stat-item { text-align: center; }

.stat-number {
  display: block;
  font-family: var(--mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.8rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--accent-dim) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.4s;
}

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

.skill-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--accent);
  box-shadow: 0 12px 40px rgba(255, 107, 53, 0.15);
}

.skill-card > * {
  position: relative;
  z-index: 1;
}

.skill-icon {
  font-size: 2rem;
  margin-bottom: 0.8rem;
  color: var(--accent);
}

.skill-icon i {
  font-size: 2rem;
}

.skill-card h3 {
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.skill-card p {
  color: var(--text);
  font-size: 0.9rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.project-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--accent);
  transition: width 0.4s ease;
}

.project-card:hover::after {
  width: 100%;
}

.project-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--accent);
  box-shadow: 0 12px 40px rgba(255, 107, 53, 0.15);
}

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

.project-folder {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 700;
}

.project-gh-link {
  color: var(--text);
  transition: color 0.2s;
}

.project-gh-link:hover { color: var(--accent); }

.project-card h3 {
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
}

.project-card h3 a { color: var(--white); }
.project-card h3 a:hover { color: var(--accent); }

.project-card p {
  color: var(--text);
  font-size: 0.9rem;
  flex: 1;
  margin-bottom: 1rem;
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.project-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
}

.projects-more {
  text-align: center;
  margin-top: 3rem;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.result-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.5s;
}

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

.result-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--accent);
  box-shadow: 0 10px 35px rgba(255, 107, 53, 0.15);
}

.result-card > * {
  position: relative;
  z-index: 1;
}

.result-card h3 {
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.result-card p {
  color: var(--text);
  font-size: 0.9rem;
}

.contact-section { text-align: center; }

.contact-text {
  color: var(--text);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto 2rem;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border);
}

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

.uni-logo {
  max-width: 60px;
  height: auto;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.uni-logo:hover {
  transform: scale(1.05);
}

.result-university .uni-logo {
  max-width: 50px;
}

.about-university {
  margin-top: 1.5rem;
}

.expertise-category {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.expertise-category:first-of-type {
  margin-top: 0;
}

.featured-projects {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 3rem;
}

.featured-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  padding: 2rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.featured-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 16px 48px rgba(255, 107, 53, 0.12);
}

.featured-image {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  border-radius: 8px;
  overflow: hidden;
  min-height: 150px;
}

.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.featured-icon {
  font-size: 4rem;
  opacity: 0.7;
}

.featured-content {
  display: flex;
  flex-direction: column;
}

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

.project-badge {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.featured-desc {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  flex: 1;
}

.section-subtitle {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--bright);
  margin-bottom: 1.5rem;
}

.project-image-thumb {
  margin-bottom: 1rem;
  border-radius: 6px;
  overflow: hidden;
  max-height: 80px;
}

.project-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.result-university {
  margin-bottom: 0.8rem;
}

.result-subtitle {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.contact-email {
  font-family: var(--mono);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.contact-email a {
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.contact-email a:hover {
  border-bottom-color: var(--accent);
}

.looking-for {
  margin-top: 3rem;
  padding: 2rem;
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  border-radius: 12px;
  text-align: center;
}

.looking-for h3 {
  color: var(--accent);
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.looking-text {
  color: var(--bright);
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

.terminal-icons {
  display: flex;
  gap: 0.8rem;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
}

.terminal-icons i {
  font-size: 1.4rem;
  opacity: 0.7;
  transition: opacity 0.2s, transform 0.2s;
}

.terminal-icons i:hover {
  opacity: 1;
  transform: scale(1.2);
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.fade-in:nth-child(1) { transition-delay: 0.1s; }
.fade-in:nth-child(2) { transition-delay: 0.2s; }
.fade-in:nth-child(3) { transition-delay: 0.3s; }
.fade-in:nth-child(4) { transition-delay: 0.4s; }
.fade-in:nth-child(5) { transition-delay: 0.5s; }

@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
  }

  .hero-terminal {
    max-width: 500px;
  }

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

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

@media (max-width: 768px) {
  .featured-card {
    grid-template-columns: 1fr;
  }

  .featured-image {
    min-height: 120px;
  }

  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-socials {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
  }

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

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

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

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

  .section-title::after { display: none; }

  .hero-name { font-size: clamp(2rem, 8vw, 3rem); }
  .hero-tagline { font-size: clamp(1.3rem, 5vw, 2rem); }
}
