:root {
  --bg: #FAFAFA;
  --bg-alt: #F1F3F5;
  --bg-surface: #FFFFFF;
  --text: #1E293B;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;
  --accent: #1E293B;
  --accent-hover: #0F172A;
  --accent-light: rgba(30,41,59,0.06);
  --border: #E2E8F0;
  --shadow: 0 4px 24px rgba(0,0,0,0.06);
  --shadow-hover: 0 8px 32px rgba(0,0,0,0.10);
  --radius: 8px;
  --radius-lg: 12px;
  --font-heading: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --max-w: 1080px;
  --max-w-wide: 1200px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

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

a:hover {
  color: var(--text-secondary);
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.container-wide {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- NAV --- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 0;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), background 0.3s, box-shadow 0.3s, padding 0.3s;
}

.nav.scrolled {
  background: rgba(250,250,250,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border);
  padding: 12px 0;
}

.nav.hidden {
  transform: translateY(-100%);
}

.nav-inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

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

.lang-toggle {
  display: flex;
  gap: 2px;
  background: var(--bg-alt);
  border-radius: 6px;
  padding: 3px;
}

.lang-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.lang-btn.active {
  background: var(--bg-surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.lang-btn:hover:not(.active) {
  color: var(--text-secondary);
}

/* Hamburger */

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

.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

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

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

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

/* Mobile menu */

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(250,250,250,0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.mobile-menu.active {
  display: flex;
}

.mobile-menu a {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.mobile-menu a:hover {
  color: var(--text);
}

.mobile-menu .lang-toggle {
  margin-top: 12px;
}

@media (max-width: 768px) {
  .nav-links, .nav-right > .lang-toggle {
    display: none;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }
}

/* --- HERO --- */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 0 60px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(2.8rem, 5.5vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin-bottom: 16px;
  color: var(--text);
}

.hero-role {
  font-size: 1.15rem;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 16px;
}

.hero-tagline {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 36px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 12px 28px;
  border-radius: 0;
  cursor: pointer;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: all 0.25s;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

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

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

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

.btn-outline:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

.hero-image {
  position: relative;
}

.hero-image img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

@media (max-width: 768px) {
  .hero {
    padding-top: 80px;
  }
}

@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .hero-image {
    order: -1;
  }
}

@media (max-width: 768px) {
  .hero-image img {
    aspect-ratio: 4/3;
    max-height: 360px;
  }
}

/* --- SECTION SHARED --- */

section {
  padding: 80px 0;
  position: relative;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  font-weight: 500;
}

.section-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 48px;
}

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

/* Diagonal cut after hero */

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--bg);
  clip-path: polygon(0 60%, 100% 0, 100% 100%, 0 100%);
  z-index: 1;
}

/* --- ABOUT --- */

.about {
  padding-top: 120px;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 18px;
  font-size: 1rem;
  line-height: 1.75;
}

.about-text p:last-child {
  margin-bottom: 0;
}

/* --- PARALLAX BANNERS --- */

.parallax-banner {
  height: 320px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.parallax-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1E293B 0%, #334155 50%, #475569 100%);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.parallax-banner .banner-overlay {
  position: absolute;
  inset: 0;
  background: rgba(30,41,59,0.4);
}

.parallax-banner .banner-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
}

.parallax-banner .banner-quote {
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 600;
  max-width: 600px;
  line-height: 1.4;
  padding: 0 24px;
}

/* Diagonal cuts for parallax */

.parallax-banner {
  margin: 0;
}

.parallax-top {
  margin-top: -1px;
  clip-path: polygon(0 40px, 100% 0, 100% 100%, 0 100%);
}

.parallax-bottom {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 40px), 0 100%);
}

@media (max-width: 768px) {
  .parallax-banner {
    height: 240px;
  }
}

@media (max-width: 768px) {
  .parallax-banner::before {
    background-attachment: scroll;
  }
}

@media (max-width: 768px) {
  .parallax-top {
    clip-path: polygon(0 24px, 100% 0, 100% 100%, 0 100%);
  }
}

@media (max-width: 768px) {
  .parallax-bottom {
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 24px), 0 100%);
  }
}

/* --- TECH STACK --- */

.tech-categories {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.tech-group-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 14px;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 0;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all 0.25s;
}

.tech-tag:hover {
  border-color: var(--text);
  color: var(--text);
}

/* --- PROJECTS --- */

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

.project-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: var(--shadow);
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.project-image {
  aspect-ratio: 16/9;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
}

.project-card:hover .project-image img {
  transform: scale(1.04);
}

.project-body {
  padding: 28px;
}

.project-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.15rem;
  margin-bottom: 10px;
  color: var(--text);
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 18px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 0;
  clip-path: polygon(4px 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%, 0 4px);
  background: rgba(30,41,59,0.06);
  color: var(--text-secondary);
}

.project-links {
  display: flex;
  gap: 16px;
}

.project-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}

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

/* Project 3 spans full width */

.project-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  max-width: 600px;
  justify-self: center;
}

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

@media (max-width: 768px) {
  .project-card:last-child:nth-child(odd) {
    max-width: none;
  }
}

/* --- CONTACT --- */

.contact-wrapper {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.contact-subtitle {
  color: var(--text-secondary);
  margin-bottom: 40px;
  font-size: 1rem;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:focus {
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(30,41,59,0.1);
}

textarea.form-input {
  resize: vertical;
  min-height: 140px;
}

.form-submit {
  width: 100%;
  margin-top: 8px;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

/* --- FOOTER --- */

.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

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

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-link {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-link:hover {
  color: var(--text);
}

@media (max-width: 768px) {
  .footer-inner {
    flex-direction: column;
    gap: 12px;
  }
}

/* --- SCROLL REVEAL --- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays for tech tags */

.reveal-delay-1 {
  transition-delay: 0.05s;
}

.reveal-delay-2 {
  transition-delay: 0.1s;
}

.reveal-delay-3 {
  transition-delay: 0.15s;
}

.reveal-delay-4 {
  transition-delay: 0.2s;
}

.reveal-delay-5 {
  transition-delay: 0.25s;
}

.reveal-delay-6 {
  transition-delay: 0.3s;
}

/* Image reveal - slide from side */

.reveal-img {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s cubic-bezier(0.4,0,0.2,1), transform 0.8s cubic-bezier(0.4,0,0.2,1);
}

.reveal-img.visible {
  opacity: 1;
  transform: translateX(0);
}

@media (max-width: 640px) {
  section {
    padding: 60px 0;
  }
}

@media (max-width: 640px) {
  .about {
    padding-top: 100px;
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: auto;
    padding-top: 80px;
    padding-bottom: 40px;
  }
}

