/* ========================================
   Variables & Reset
   ======================================== */
:root {
  --bg-primary: #0a0a0b;
  --bg-secondary: #111113;
  --bg-elevated: #18181b;
  --bg-hover: #1e1e22;
  --border: #27272a;
  --border-light: #3f3f46;
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-tertiary: #71717a;
  --accent: #818cf8;
  --accent-dim: rgba(129, 140, 248, 0.12);
  --accent-hover: #a5b4fc;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --max-width: 1080px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

/* ========================================
   Navigation
   ======================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 11, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

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

.nav-logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.accent {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
}

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

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

.nav-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: var(--transition);
}

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

.mobile-menu a {
  padding: 12px 0;
  font-size: 15px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.mobile-menu a:last-child {
  border-bottom: none;
}

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

/* ========================================
   Hero
   ======================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 24px 80px;
  overflow: hidden;
}

.hero-content {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 64px;
}

.hero-text {
  flex: 1;
  max-width: 560px;
}

.hero-greeting {
  font-size: 15px;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.hero-name {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1.1;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.hero-description {
  font-size: 16px;
  color: var(--text-tertiary);
  line-height: 1.7;
  margin-bottom: 36px;
}

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

.hero-photo {
  flex-shrink: 0;
}

.photo-placeholder {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px dashed var(--border-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-tertiary);
  font-size: 14px;
  transition: border-color var(--transition);
}

.photo-placeholder:hover {
  border-color: var(--accent);
}

.hero-img {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  transition: border-color var(--transition);
}

.hero-img:hover {
  border-color: var(--accent);
}

.hero-gradient {
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #0a0a0b;
  border-color: var(--accent);
}

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

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}

.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--border-light);
  background: var(--bg-hover);
}

/* ========================================
   Sections
   ======================================== */
.section {
  padding: 100px 24px;
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 48px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 32px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

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

.about-text p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.about-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

.about-skills h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 24px;
}

.skills-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.skill-group h4 {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: all var(--transition);
}

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

/* ========================================
   Timeline / Experience
   ======================================== */
.timeline {
  position: relative;
  padding-left: 32px;
}

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

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

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

.timeline-marker {
  position: absolute;
  left: -32px;
  top: 8px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--border-light);
  transition: border-color var(--transition);
  z-index: 1;
}

.timeline-item:first-child .timeline-marker {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-dim);
}

.timeline-content {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color var(--transition);
}

.timeline-content:hover {
  border-color: var(--border-light);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 16px;
}

.timeline-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.timeline-company {
  font-size: 14px;
  color: var(--accent);
  margin-top: 2px;
}

.timeline-location {
  color: var(--text-tertiary);
  font-weight: 400;
}

.timeline-location::before {
  content: '· ';
}

.timeline-date {
  font-size: 13px;
  color: var(--text-tertiary);
  white-space: nowrap;
  flex-shrink: 0;
}

.timeline-content > p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ========================================
   Projects
   ======================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all var(--transition);
  cursor: pointer;
}

.project-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.project-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  color: var(--accent);
}

.project-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.project-card > p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}

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

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

.project-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  transition: color var(--transition);
}

.project-link-live {
  color: #34d399;
  padding: 4px 12px;
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 20px;
  font-size: 12px;
  background: rgba(52, 211, 153, 0.08);
}

.project-link-live:hover {
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.6);
  background: rgba(52, 211, 153, 0.15);
}

.project-link-yt {
  color: #f87171;
  padding: 4px 12px;
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 20px;
  font-size: 12px;
  background: rgba(248, 113, 113, 0.08);
}

.project-link-yt:hover {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.6);
  background: rgba(248, 113, 113, 0.15);
}

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

/* ========================================
   Contact
   ======================================== */
.contact-container {
  text-align: center;
  max-width: 560px;
}

.contact-text {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
}

.contact-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ========================================
   Footer
   ======================================== */
.footer {
  padding: 32px 24px;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer p {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-greeting,
.hero-name,
.hero-title,
.hero-description,
.hero-actions {
  animation: fadeInUp 0.6s ease-out both;
}

.hero-greeting { animation-delay: 0.1s; }
.hero-name { animation-delay: 0.2s; }
.hero-title { animation-delay: 0.3s; }
.hero-description { animation-delay: 0.4s; }
.hero-actions { animation-delay: 0.5s; }

.hero-photo {
  animation: fadeInUp 0.6s ease-out 0.3s both;
}

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

  .nav-hamburger {
    display: flex;
  }

  .hero {
    padding: 100px 24px 60px;
    min-height: auto;
  }

  .hero-content {
    flex-direction: column-reverse;
    text-align: center;
    gap: 40px;
  }

  .hero-actions {
    justify-content: center;
  }

  .photo-placeholder {
    width: 180px;
    height: 180px;
  }

  .hero-img {
    width: 180px;
    height: 180px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

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

  .timeline-header {
    flex-direction: column;
    gap: 4px;
  }

  .section {
    padding: 64px 20px;
  }

  .section-title {
    font-size: 26px;
  }

  .contact-links {
    flex-direction: column;
    align-items: center;
  }
}

/* ========================================
   Scroll reveal (JS-driven)
   ======================================== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ========================================
   Selection
   ======================================== */
::selection {
  background: var(--accent-dim);
  color: var(--accent);
}

/* ========================================
   Scrollbar
   ======================================== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}
