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

:root {
  --black: #000000;
  --dark: #111111;
  --dark-2: #1a1a1a;
  --dark-3: #222222;
  --gray-dark: #333333;
  --gray: #666666;
  --gray-light: #999999;
  --border: #2a2a2a;
  --border-light: #e5e5e5;
  --white: #ffffff;
  --off-white: #f8f8f8;
  --accent: #ffffff;

  --font: 'Inter', sans-serif;
  --transition: 0.3s ease;
  --transition-slow: 0.6s ease;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-dark: 0 4px 24px rgba(0,0,0,0.4);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  background: var(--white);
  color: var(--dark);
  line-height: 1.7;
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: var(--gray-dark); border-radius: 3px; }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 2000;
  padding: 1.25rem 0;
  transition: background var(--transition), padding var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  background: rgba(10, 10, 10, 0.97);
  padding: 0.85rem 0;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
  backdrop-filter: blur(10px);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--white);
  letter-spacing: -1px;
  border: 2px solid var(--white);
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
}

.nav-logo:hover {
  background: var(--white);
  color: var(--black);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  color: rgba(255,255,255,0.75);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--white);
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
}

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

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

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: var(--transition);
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  background: var(--black);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8rem 2rem 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  width: 100%;
}

.hero-greeting {
  font-size: 1rem;
  font-weight: 400;
  color: var(--gray-light);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.hero-name {
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 900;
  color: var(--white);
  letter-spacing: -2px;
  line-height: 1.05;
  margin-bottom: 0.5rem;
}

.hero-title {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 300;
  color: var(--gray-light);
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
  border-left: 2px solid var(--white);
  padding-left: 1rem;
}

.hero-desc {
  color: rgba(255,255,255,0.55);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 2.5rem;
  max-width: 480px;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.hero-social {
  display: flex;
  gap: 1.25rem;
}

.hero-social a {
  color: rgba(255,255,255,0.4);
  font-size: 1.2rem;
  transition: color var(--transition), transform var(--transition);
}

.hero-social a:hover {
  color: var(--white);
  transform: translateY(-3px);
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-img-wrapper {
  position: relative;
  width: 420px;
  max-width: 100%;
  display: block;
}

.hero-img-wrapper img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  display: block;
  opacity: 1 !important;
}

.scroll-down {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.3);
  font-size: 1.1rem;
  animation: bounce 2s infinite;
  transition: color var(--transition);
}

.scroll-down:hover { color: var(--white); }

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}

.btn-primary:hover {
  background: transparent;
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.3);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}

.btn-full { width: 100%; justify-content: center; }

/* ===== SECTIONS ===== */
.section {
  padding: 6rem 0;
}

.section-dark {
  background: var(--dark);
  color: var(--white);
}

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

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}


.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 0.75rem;
}

.section-dark .section-tag {
  color: var(--gray-light);
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: -1.5px;
  color: var(--dark);
  line-height: 1.1;
}

.section-dark .section-title {
  color: var(--white);
}

/* ===== ABOUT ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about-text p {
  color: var(--gray);
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border-light);
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: -2px;
  color: var(--dark);
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.25rem;
}

.about-image img {
  width: 100%;
  filter: grayscale(100%) contrast(1.1);
  transition: filter var(--transition-slow);
}

.about-image img:hover {
  filter: grayscale(0%) contrast(1.1);
}

/* ===== SKILLS ===== */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3rem;
}

.skill-category h3 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray-light);
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
}

.skill-info span:last-child {
  color: var(--gray-light);
}

.skill-bar {
  height: 2px;
  background: var(--dark-3);
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  background: var(--white);
  width: 0;
  transition: width 1.2s ease;
}

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

.tag {
  padding: 0.4rem 1rem;
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.05em;
  transition: all var(--transition);
}

.tag:hover {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}

/* ===== TIMELINE ===== */
.timeline {
  position: relative;
  padding-left: 3rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border-light);
}

.section-dark .timeline::before {
  background: var(--border);
}

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

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

.timeline-dot {
  position: absolute;
  left: -2.85rem;
  top: 6px;
  width: 14px;
  height: 14px;
  background: var(--white);
  border: 2px solid var(--dark);
  border-radius: 0;
  box-shadow: 0 0 0 3px var(--border-light);
}

.section-dark .timeline-dot {
  background: var(--dark);
  border-color: var(--white);
  box-shadow: 0 0 0 3px var(--border);
}

.timeline-content {
  background: var(--off-white);
  padding: 1.75rem 2rem;
  border-left: 3px solid transparent;
  transition: border-color var(--transition), transform var(--transition);
}

.timeline-content:hover {
  border-left-color: var(--dark);
  transform: translateX(4px);
}

.section-dark .timeline-content {
  background: var(--dark-2);
}

.section-dark .timeline-content:hover {
  border-left-color: var(--white);
}

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

.timeline-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
}

.section-dark .timeline-header h3 {
  color: var(--white);
}

.timeline-company {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray);
}

.section-dark .timeline-company {
  color: var(--gray-light);
}

.timeline-date {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--gray-light);
  letter-spacing: 0.03em;
  margin-bottom: 1rem;
}

.timeline-content ul {
  padding-left: 1rem;
  list-style: disc;
}

.timeline-content ul li {
  font-size: 0.925rem;
  color: var(--gray);
  margin-bottom: 0.4rem;
}

.section-dark .timeline-content ul li,
.section-dark .timeline-content p {
  color: rgba(255,255,255,0.6);
}

.timeline-content p {
  font-size: 0.925rem;
  color: var(--gray);
}

/* ===== PROJECTS ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.project-card {
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.project-img {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--dark);
  overflow: hidden;
}

.project-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: rgba(255,255,255,0.15);
  background: var(--dark-2);
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  opacity: 0;
  transition: opacity var(--transition);
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255,255,255,0.3);
  transition: all var(--transition);
}

.project-link:hover {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}

.project-info {
  padding: 1.5rem;
}

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

.project-tags span {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray);
  padding: 0.2rem 0.6rem;
  background: var(--off-white);
  border: 1px solid var(--border-light);
}

.project-info h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.project-info p {
  font-size: 0.875rem;
  color: var(--gray);
  line-height: 1.65;
}

/* ===== CONTACT ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 5rem;
  align-items: start;
}

.contact-info > p {
  color: rgba(255,255,255,0.6);
  margin-bottom: 2.5rem;
  font-size: 1.05rem;
  line-height: 1.8;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.contact-item i {
  width: 20px;
  color: rgba(255,255,255,0.3);
  font-size: 1rem;
  transition: color var(--transition);
}

.contact-item:hover {
  color: var(--white);
}

.contact-item:hover i {
  color: var(--white);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  background: var(--dark-2);
  border: 1px solid var(--border);
  color: var(--white);
  font-family: var(--font);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition);
  resize: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255,255,255,0.25);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: rgba(255,255,255,0.4);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--black);
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

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

.footer p {
  font-size: 0.825rem;
  color: rgba(255,255,255,0.3);
}

.footer-social {
  display: flex;
  gap: 1.25rem;
}

.footer-social a {
  color: rgba(255,255,255,0.3);
  font-size: 1rem;
  transition: color var(--transition);
}

.footer-social a:hover {
  color: var(--white);
}

/* ===== ANIMATIONS ===== */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
}

.fade-in {
  opacity: 1;
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Hero animations (triggered by JS) */
.hero-text .fade-up.animated {
  animation: fadeUp 0.8s ease forwards;
}

.hero-image .fade-in.animated {
  animation: fadeIn 1.2s ease forwards;
}

.hero-text .fade-up:nth-child(1) { animation-delay: 0.1s; }
.hero-text .fade-up:nth-child(2) { animation-delay: 0.25s; }
.hero-text .fade-up:nth-child(3) { animation-delay: 0.4s; }
.hero-text .fade-up:nth-child(4) { animation-delay: 0.55s; }
.hero-text .fade-up:nth-child(5) { animation-delay: 0.7s; }
.hero-text .fade-up:nth-child(6) { animation-delay: 0.85s; }
.hero-image .fade-in { animation-delay: 0.5s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .skills-grid {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10,10,10,0.98);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    z-index: 2050;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: 1.25rem;
  }

  .nav-toggle {
    display: flex;
    z-index: 2100;
    position: relative;
  }

  .navbar {
    background: rgba(0, 0, 0, 0.97);
  }

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 7rem;
  }

  .hero-image {
    order: -1;
    pointer-events: none;
  }

  .hero-img-wrapper {
    width: 280px;
    margin: 0 auto;
    pointer-events: none;
  }

  .hero-buttons,
  .hero-social {
    justify-content: center;
  }

  .hero-title {
    border-left: none;
    padding-left: 0;
    border-top: 2px solid var(--white);
    padding-top: 0.75rem;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-image { order: -1; }

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

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

  .footer .container {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

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

@media (max-width: 480px) {
  .section { padding: 4rem 0; }

  .about-stats {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
}
