/* --- Variables --- */
:root {
  --bg: #0a0e14;
  --bg-elevated: #111820;
  --bg-card: #151c26;
  --border: #1e2a3a;
  --text: #e6edf5;
  --text-muted: #8b9cb3;
  --accent: #3dd6c8;
  --accent-dim: rgba(61, 214, 200, 0.12);
  --accent-glow: rgba(61, 214, 200, 0.25);
  --warm: #f0b86e;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.2s ease;
}

/* --- Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1100px, 92vw);
  margin-inline: auto;
}

/* --- Header --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 14, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  padding: 0.45rem 1rem;
  background: var(--accent-dim);
  color: var(--accent) !important;
  border-radius: 8px;
  border: 1px solid rgba(61, 214, 200, 0.2);
}

.nav-cta:hover {
  background: rgba(61, 214, 200, 0.2);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 10px;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  box-shadow: 0 0 24px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
}

.btn-secondary:hover {
  border-color: var(--text-muted);
  background: var(--bg-elevated);
}

/* --- Hero --- */
.hero {
  padding: 6rem 0 2rem;
  min-height: auto;
  display: flex;
  align-items: center;
  background:
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(61, 214, 200, 0.06), transparent),
    radial-gradient(ellipse 40% 40% at 10% 80%, rgba(240, 184, 110, 0.04), transparent);
}

.hero-split {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: center;
  min-height: auto;
  padding: 2rem 2rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 95%;
}

.hero-image-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image-frame {
  position: relative;
  width: 100%;
  max-width: 500px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(45, 212, 191, 0.2);
  padding: 0;
  background: transparent;
}

.hero-portrait {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 20px;
  transform: scaleX(-1);
  filter: grayscale(100%) contrast(1.1);
  transition: filter 0.3s ease;
}

.hero-portrait:hover {
  filter: grayscale(0%) contrast(1);
}

.hero-content-alt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-greeting {
  font-family: var(--font-sans);
  font-size: 1.125rem;
  font-weight: 500;
  color: #94a3b8;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.hero-name {
  font-family: var(--font-sans);
  font-size: clamp(3.5rem, 7vw, 6.5rem);
  font-weight: 800;
  line-height: 1;
  color: #f1f5f9;
  margin: 0 0 1rem 0;
  letter-spacing: -0.02em;
}

.hero-name span {
  color: #2dd4bf;
}

.hero-role {
  font-family: var(--font-sans);
  font-size: 1.5rem;
  font-weight: 600;
  color: #2dd4bf;
  margin-bottom: 2rem;
}

.hero-skills-primary,
.hero-skills-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.hero-skills-primary span {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  background: rgba(45, 212, 191, 0.1);
  color: #2dd4bf;
  border: 1px solid rgba(45, 212, 191, 0.3);
  border-radius: 9999px;
  transition: all 0.2s ease;
}

.hero-skills-primary span:hover {
  background: #2dd4bf;
  color: #0f172a;
  transform: translateY(-2px);
}

.hero-skills-secondary span {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 9999px;
  transition: all 0.2s ease;
}

.hero-skills-secondary span:hover {
  background: rgba(148, 163, 184, 0.2);
  color: #f1f5f9;
}

.hero-specialty {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 600;
  color: #f1f5f9;
  margin: 1rem 0 0.75rem;
  position: relative;
  padding-top: 1.5rem;
}

.hero-specialty::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, #2dd4bf, transparent);
}

.hero-actions-alt {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
}

/* --- Sections --- */
.section {
  padding: 5rem 0;
}

.section-header {
  margin-bottom: 3rem;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.section-header h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* --- About --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.highlight-card {
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
}

.highlight-card:hover {
  border-color: rgba(61, 214, 200, 0.3);
}

.highlight-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.highlight-card h3 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.highlight-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* --- Experience Timeline --- */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
  padding-left: 2rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}

.timeline-marker {
  position: absolute;
  left: 0;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}

.timeline-item:first-child .timeline-marker {
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
  gap: 0.5rem;
}

.timeline-header h3 {
  font-size: 1.1rem;
  color: var(--text);
  margin: 0;
}

.company {
  color: var(--accent);
  font-weight: 500;
  font-size: 0.9rem;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.75rem;
}

.timeline-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.timeline-content li {
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  padding-left: 1.2rem;
  position: relative;
  font-size: 0.95rem;
}

.timeline-content li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* --- Skills --- */
.skills {
  background: var(--bg-elevated);
  border-block: 1px solid var(--border);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.skill-group h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--warm);
  margin-bottom: 1rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tags li {
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  transition: all var(--transition);
}

.skill-tags li:hover {
  color: var(--accent);
  border-color: rgba(61, 214, 200, 0.3);
}

/* --- Projects --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}

.project-card:hover {
  border-color: rgba(61, 214, 200, 0.25);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.project-card.featured {
  border-color: rgba(61, 214, 200, 0.3);
  grid-column: span 2;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-header h3 {
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.project-link {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  display: block;
  margin-bottom: 0.5rem;
}

.project-link:hover {
  text-decoration: underline;
}

.project-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.project-meta {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.project-type,
.project-chain {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.project-type {
  background: var(--accent-dim);
  color: var(--accent);
}

.project-chain {
  background: rgba(240, 184, 110, 0.12);
  color: var(--warm);
}

.project-card > p {
  font-size: 0.9rem;
  color: var(--text-muted);
  flex: 1;
  margin-bottom: 1rem;
}

.project-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem 0;
}

.project-list li {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  padding-left: 1rem;
  position: relative;
}

.project-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.8rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.project-tech span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  background: rgba(45, 212, 191, 0.1);
  color: var(--accent);
  border-radius: 9999px;
}

/* --- Achievements --- */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.achievement-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  transition: all var(--transition);
}

.achievement-card:hover {
  border-color: rgba(61, 214, 200, 0.3);
  transform: translateY(-2px);
}

.achievement-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.achievement-card h3 {
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.achievement-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

/* --- Education --- */
.education-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 600px;
}

.education-card h3 {
  color: var(--text);
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.education-school {
  color: var(--accent);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.education-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Contact --- */
.contact-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  padding: 3rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background-image:
    radial-gradient(ellipse at 100% 0%, rgba(61, 214, 200, 0.08), transparent 50%);
}

.contact-text h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 1rem;
}

.contact-text p {
  color: var(--text-muted);
  font-size: 1rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-link {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.contact-link:hover {
  border-color: rgba(61, 214, 200, 0.3);
  transform: translateX(4px);
}

.contact-link-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

/* --- Footer --- */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-note {
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .hero-split {
    gap: 3rem;
    padding: 5rem 1.5rem 3rem;
  }
}

@media (max-width: 968px) {
  .hero-split {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
    padding-top: 4rem;
  }
  
  .hero-content-alt {
    align-items: center;
  }
  
  .hero-specialty::before {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .hero-skills-primary,
  .hero-skills-secondary {
    justify-content: center;
  }
  
  .hero-image-frame {
    max-width: 350px;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .contact-box {
    grid-template-columns: 1fr;
  }

  .project-card.featured {
    grid-column: span 1;
  }
}

@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 0.85rem 1.5rem;
  }

  .nav-cta {
    margin: 0.5rem 1.5rem 0;
    text-align: center;
  }

  .hero-split {
    width: 100%;
    padding: 4rem 1rem 2rem;
  }
  
  .hero-name {
    font-size: 3rem;
  }
  
  .hero-actions-alt {
    flex-direction: column;
    width: 100%;
  }
  
  .hero-actions-alt .btn {
    width: 100%;
    text-align: center;
  }

  .timeline-header {
    flex-direction: column;
    gap: 0.25rem;
  }

  .footer-inner {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Projects Section Enhancements --- */
.section-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-top: 0.5rem;
}

/* Filter Buttons */
.project-filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: rgba(61, 214, 200, 0.3);
}

/* Enhanced Project Cards with Images */
.project-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
}

.project-image {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--bg-elevated);
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 14, 20, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-view {
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: all var(--transition);
}

.project-view:hover {
  box-shadow: 0 0 20px var(--accent-glow);
  transform: translateY(-2px);
}

.project-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-content h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.project-content > p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  flex: 1;
  line-height: 1.6;
}

/* Project Meta Tags */
.project-meta {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.project-type {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.project-chain,
.project-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  background: rgba(240, 184, 110, 0.12);
  color: var(--warm);
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.project-tag {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
}

/* Project Tech Stack */
.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.project-tech span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  background: rgba(61, 214, 200, 0.1);
  color: var(--accent);
  border-radius: 9999px;
  border: 1px solid rgba(61, 214, 200, 0.2);
}

/* Hide/Show for filtering */
.project-card.hidden {
  display: none;
}

/* Responsive Adjustments */
@media (max-width: 968px) {
  .project-filters {
    justify-content: center;
  }
  
  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 640px) {
  .project-image {
    height: 180px;
  }
  
  .project-filters {
    gap: 0.5rem;
  }
  
  .filter-btn {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
  }
}