/* ─── CSS CUSTOM PROPERTIES ─── */
:root {
  --bg:      #f0f4f8;
  --surface: #e2eaf2;
  --card:    #ffffff;
  --accent:  #00a87a;
  --accent2: #ff2d55;
  --accent3: #5b3fd4;
  --text:    #0f172a;
  --muted:   #475569;
  --border:  rgba(0, 168, 122, 0.25);
  --glow:    0 0 20px rgba(0, 168, 122, 0.25);
}

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

html { scroll-behavior: smooth; }

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

/* ─── BACKGROUND: GRID ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 168, 122, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 168, 122, 0.1) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ─── BACKGROUND: NOISE OVERLAY ─── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  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)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* ─── NAV ─── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.2rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(12px);
  background: rgba(240, 244, 248, 0.85);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  color: var(--accent);
  letter-spacing: 3px;
  text-shadow: var(--glow);
}

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

.nav-links a {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: color 0.2s;
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

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

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── SECTIONS ─── */
section { position: relative; z-index: 1; }

/* ─── HERO ─── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 3rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero-blob {
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  animation: pulse 8s ease-in-out infinite;
}

.blob1 { background: rgba(0, 245, 196, 0.12); top: -100px; right: -100px; }
.blob2 { background: rgba(123, 97, 255, 0.1); bottom: -200px; left: -200px; animation-delay: 4s; }

.hero-content { max-width: 900px; }

.hero-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.hero-label::before {
  content: '';
  display: inline-block;
  width: 32px; height: 1px;
  background: var(--accent);
}

.hero-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(4rem, 10vw, 9rem);
  line-height: 0.9;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.hero-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.8rem);
  color: var(--muted);
  letter-spacing: 4px;
  margin-bottom: 2rem;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 560px;
  line-height: 1.8;
  font-weight: 300;
  margin-bottom: 3rem;
}

.hero-ctas { display: flex; gap: 1.2rem; flex-wrap: wrap; }

.hero-stats {
  position: absolute;
  right: 4rem;
  bottom: 4rem;
  display: flex;
  gap: 3rem;
}

.stat { text-align: right; }

.stat-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.8rem;
  color: var(--accent);
  line-height: 1;
  text-shadow: var(--glow);
}

.stat-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  color: var(--muted);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ─── BUTTONS ─── */
.btn-primary {
  background: var(--accent);
  color: #050810;
  padding: 0.9rem 2.2rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-decoration: none;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  display: inline-block;
}

.btn-primary:hover {
  background: #00ffce;
  box-shadow: 0 0 30px rgba(0, 245, 196, 0.5);
  transform: translateY(-2px);
}

.btn-outline {
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.9rem 2.2rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 2px;
  text-decoration: none;
  text-transform: uppercase;
  transition: all 0.2s;
  background: transparent;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

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

/* ─── ABOUT ─── */
#about {
  padding: 8rem 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.section-label::before { content: '//'; opacity: 0.4; }

.section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 4vw, 4rem);
  line-height: 1;
  letter-spacing: 2px;
  margin-bottom: 1.5rem;
}

.about-text {
  color: var(--muted);
  line-height: 1.9;
  font-weight: 300;
  margin-bottom: 1.5rem;
}

.about-visual { position: relative; }

.about-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 2rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.78rem;
  line-height: 1.8;
  color: var(--muted);
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
  position: relative;
}

.about-card::before {
  content: '$ whoami';
  display: block;
  color: var(--accent);
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

.about-card .line { margin-bottom: 0.4rem; }
.about-card .line .key  { color: var(--accent3); }
.about-card .line .val  { color: var(--text); }

.terminal-cursor {
  display: inline-block;
  width: 8px; height: 14px;
  background: var(--accent);
  animation: blink 1s step-end infinite;
  vertical-align: middle;
}

/* ─── SKILLS ─── */
#skills {
  padding: 8rem 3rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.skills-inner  { max-width: 1200px; margin: 0 auto; }
.skills-header { text-align: center; margin-bottom: 4rem; }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.skill-category {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 2rem;
  transition: border-color 0.3s, transform 0.3s;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
}

.skill-category:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--glow);
}

.skill-cat-title {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
}

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

.skill-tag {
  background: rgba(0, 245, 196, 0.07);
  border: 1px solid rgba(0, 245, 196, 0.2);
  color: var(--text);
  font-size: 0.78rem;
  padding: 0.35rem 0.8rem;
  font-family: 'Space Mono', monospace;
  transition: all 0.2s;
}

.skill-tag:hover { background: rgba(0, 245, 196, 0.15); color: var(--accent); }

/* ─── PROJECTS ─── */
#projects { padding: 8rem 3rem; }

.projects-inner  { max-width: 1200px; margin: 0 auto; }
.projects-header { margin-bottom: 4rem; }

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

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent3));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s;
}

.project-card:hover { border-color: rgba(0, 245, 196, 0.4); transform: translateY(-6px); }
.project-card:hover::before { transform: scaleX(1); }

.project-number {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 4rem;
  color: rgba(0, 245, 196, 0.08);
  position: absolute;
  top: 1rem; right: 1.5rem;
  line-height: 1;
}

.project-type {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 3px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.project-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  letter-spacing: 2px;
  margin-bottom: 1rem;
  line-height: 1.1;
}

.project-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-weight: 300;
}

.project-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.5rem; }

.project-tag {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  padding: 0.2rem 0.6rem;
  background: rgba(91, 63, 212, 0.1);
  border: 1px solid rgba(91, 63, 212, 0.35);
  color: var(--accent3);
  letter-spacing: 1px;
}

.project-link {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 2px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: gap 0.2s;
  margin-top: auto;
  padding-top: 1rem;
}

.project-link:hover { gap: 0.8rem; }

/* ─── RESUME ─── */
#resume {
  padding: 8rem 3rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.resume-inner  { max-width: 900px; margin: 0 auto; }
.resume-header { margin-bottom: 4rem; }

.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, var(--accent), var(--accent3), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  padding-left: 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.38rem; top: 0.4rem;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent);
}

.timeline-period {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 3px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.timeline-role {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 2px;
  margin-bottom: 0.3rem;
}

.timeline-company {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.8rem;
  font-weight: 300;
}

.timeline-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
  font-weight: 300;
}

.resume-download {
  margin-top: 3rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.resume-note {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  color: var(--muted);
}

.section-divider {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.2rem;
  letter-spacing: 4px;
  color: var(--muted);
  margin: 3rem 0 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ─── CONTACT ─── */
#contact { padding: 8rem 3rem; }

.contact-inner  { max-width: 700px; margin: 0 auto; }
.contact-header { text-align: center; margin-bottom: 4rem; }

.contact-intro {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 1rem;
  font-weight: 300;
  line-height: 1.7;
}

.contact-form  { display: flex; flex-direction: column; gap: 1.2rem; }
.form-group    { display: flex; flex-direction: column; gap: 0.5rem; }
.form-row      { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }

label {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
}

input, textarea {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 1rem 1.2rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}

input:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(0, 245, 196, 0.1);
}

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

.form-submit { margin-top: 0.5rem; }

.btn-submit {
  width: 100%;
  background: var(--accent);
  color: #050810;
  padding: 1rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

.btn-submit:hover {
  background: #00ffce;
  box-shadow: 0 0 30px rgba(0, 245, 196, 0.4);
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.contact-link {
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 2px;
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
  transition: all 0.2s;
  padding-bottom: 2px;
}

.contact-link:hover { color: var(--accent); border-color: var(--accent); }

/* ─── FOOTER ─── */
footer {
  position: relative;
  z-index: 1;
  padding: 2rem 3rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface);
}

.footer-text {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 2px;
}

.footer-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.2rem;
  color: var(--accent);
  letter-spacing: 3px;
  text-shadow: var(--glow);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  nav { padding: 1rem 1.5rem; }
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.25s ease, opacity 0.2s ease;
  }
  .nav-links.open {
    max-height: 320px;
    opacity: 1;
  }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
  }
  #hero { padding: 7rem 1.5rem 3rem; }
  .hero-stats { position: static; margin-top: 3rem; justify-content: flex-start; }
  #about { grid-template-columns: 1fr; gap: 3rem; padding: 5rem 1.5rem; }
  #skills, #projects, #resume, #contact { padding: 5rem 1.5rem; }
  .form-row { grid-template-columns: 1fr; }
  footer { flex-direction: column; gap: 1rem; text-align: center; }
}
