/* Robotics Engineer Portfolio — Dark, technical theme */

:root {
  --bg: #0a0c10;
  --bg-elevated: #111318;
  --bg-card: #161a22;
  --text: #e6e9ef;
  --text-muted: #8b92a0;
  --accent: #00d4aa;
  --accent-dim: rgba(0, 212, 170, 0.15);
  --border: #252a35;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --radius: 8px;
  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* Subtle grid background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 212, 170, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 170, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: #00f5c4;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 1.5rem;
  background: rgba(10, 12, 16, 0.7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition);
}

.header.scrolled {
  background: rgba(10, 12, 16, 0.95);
  border-bottom-color: var(--border);
}

.nav {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--accent);
  font-size: 1.25rem;
}

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

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

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

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

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 6rem 1.5rem 4rem;
  overflow: hidden;
}

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

.hero-content {
  position: relative;
  max-width: 640px;
}

.hero-label {
  color: var(--accent);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.hero-title {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.hero-title .highlight {
  color: var(--accent);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.hero-desc {
  color: var(--text-muted);
  margin: 0 0 2rem;
  max-width: 540px;
}

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

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}

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

.btn-primary:hover {
  background: #00f5c4;
  color: var(--bg);
}

.btn-outline {
  border-color: var(--accent);
  color: var(--accent);
  background: transparent;
}

.btn-outline:hover {
  background: var(--accent-dim);
}

.btn-large {
  padding: 1rem 1.75rem;
  font-size: 1rem;
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  border-radius: 2px;
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Sections */
.section {
  padding: 5rem 1.5rem;
  position: relative;
  z-index: 1;
}

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

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  margin: 0 0 2.5rem;
  color: var(--text);
}

.section-title .mono {
  color: var(--accent);
  margin-right: 0.5rem;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  align-items: start;
}

.about-text p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.about-text strong {
  color: var(--accent);
}

.about-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}

.about-highlights li {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.35rem 0.65rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.about-image-frame {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}

.about-image-placeholder {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.skill-card {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.skill-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-dim);
}

.skill-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--accent);
}

.skill-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Projects */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.project-card {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: center;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
}

.project-card:hover {
  border-color: var(--accent);
}

.project-card.reverse {
  direction: rtl;
}

.project-card.reverse > * {
  direction: ltr;
}

.project-card.reverse .project-info {
  text-align: right;
}

.project-card.reverse .project-tags {
  justify-content: flex-end;
}

.project-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin: 0 0 0.25rem;
}

.project-info h3 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
}

.project-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0 0 1rem;
  line-height: 1.6;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.project-tags li {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0.25rem 0.5rem;
  background: var(--bg-elevated);
  border-radius: 4px;
}

.project-links a {
  margin-right: 1rem;
  font-size: 0.9rem;
}

.project-badge {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--accent);
  font-family: var(--font-mono);
  margin-top: 0.5rem;
}

.project-image-placeholder {
  aspect-ratio: 16/10;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.project-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  display: block;
}

/* Publications */
.publications-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.publication-card {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
}

.publication-card:hover {
  border-color: var(--accent);
}

.publication-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  line-height: 1.4;
}

.publication-authors,
.publication-venue {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.publication-venue {
  margin-bottom: 0.75rem;
}

.publication-link {
  font-size: 0.9rem;
  font-family: var(--font-mono);
}

/* Experience */
.timeline {
  position: relative;
  padding-left: 2rem;
  border-left: 1px solid var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -2rem;
  top: 0.25rem;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--bg);
}

.timeline-content h3 {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
}

.timeline-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
}

.timeline-header .mono {
  color: var(--accent);
  font-size: 0.9rem;
}

.timeline-date {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}

.timeline-content p:last-child {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Contact */
.contact-box {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: 3rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.contact-text {
  color: var(--text-muted);
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
}

.contact-box .btn-large {
  margin-bottom: 0.75rem;
}

.contact-phone {
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

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

.contact-links a {
  font-size: 0.95rem;
}

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

/* Responsive */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-image {
    max-width: 240px;
  }

  .project-card,
  .project-card.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .project-card .project-info {
    text-align: left;
  }

  .project-card .project-tags {
    justify-content: flex-start;
  }

  .project-image {
    order: -1;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav.open .nav-links {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 1rem;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
  }

  .nav.open .nav-links li {
    padding: 0.75rem 0;
  }

  .hero {
    padding: 5rem 1rem 3rem;
  }

  .section {
    padding: 3.5rem 1rem;
  }

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