/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Meghal Shah — Portfolio Styles
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

:root {
  --bg: #080808;
  --surface: #141414;
  --surface2: #1e1e1e;
  --border: #2e2e2e;
  --accent: #e8ff47;
  --text: #ffffff;
  --muted: #999999;
  --muted2: #555555;
  --transition: 0.3s ease;
}

body.light-mode {
  --bg: #ffffff;
  --surface: #f8f9fa;
  --surface2: #f1f3f5;
  --border: #dee2e6;
  --accent: #1a1a1a;
  --text: #111111;
  --muted: #6c757d;
  --muted2: #adb5bd;
}

body {
  transition: background-color var(--transition), color var(--transition);
}

nav,
footer,
.edu-item,
.pill,
.timeline-item,
.ind-dot,
.ind-label,
.section-label::after {
  transition: all var(--transition);
}

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

html {
  scroll-behavior: smooth;
}

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

/* ── NAV ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 15px 40px 15px 40px;
  /* Increased left padding to match right */
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0.95;
}

.nav-logo {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  gap: 4px;
}

.logo-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 30px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
  line-height: 1;
}

.logo-tagline {
  font-family: 'Outfit', sans-serif;
  margin-top: 5px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  line-height: 1;
  font-weight: 500;
}

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

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

.resume-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 4px;
  transition: all 0.2s;
}

.desk-resume {
  background: var(--accent);
  color: var(--bg);
  font-weight: 500;
}

.desk-resume:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.mobile-resume {
  margin-top: 40px;
  border: 1px solid var(--accent);
  color: var(--accent);
}

.nav-links a {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
  font-weight: 500;
}

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

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

.nav-links a.active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
}

/* ── SECTION INDICATOR ── */
.section-indicator {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 100;
}

.ind-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-direction: row-reverse;
}

.ind-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted2);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.ind-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  color: var(--muted);
  opacity: 0;
  transform: translateX(8px);
  transition: all 0.25s ease;
  white-space: nowrap;
}

.ind-btn:hover .ind-label,
.ind-btn.active .ind-label {
  opacity: 1;
  transform: translateX(0);
}

.ind-btn.active .ind-dot {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  width: 8px;
  height: 8px;
}

.ind-btn:hover:not(.active) .ind-dot {
  background: var(--muted);
}

/* ── SECTIONS ── */
section {
  min-height: auto;
  padding: 25px 150px 25px 5px;
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.section-label::after {
  content: '';
  width: 48px;
  height: 1px;
  background: var(--border);
}

.section-title {
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
  line-height: 1.05;
}

/* ── HERO ── */
#hero {
  min-height: auto;
  padding-top: 110px;
  padding-bottom: 80px;
}

.hero-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  width: 100%;
}

.hero-text {
  flex: 1;
}

.hero-portrait {
  flex: 0 0 250px;
  opacity: 0;
  animation: fadeUp 0.7s 0.6s forwards;
  position: relative;
}

.hero-portrait img {
  width: 100%;
  height: auto;
  filter: grayscale(100%);
  border-radius: 4px;
  transition: transform var(--transition);
  border: 1px solid var(--border);
}

.hero-portrait:hover img {
  transform: scale(1.02);
}

.hero-portrait::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--accent);
  transform: translate(20px, 20px);
  z-index: -1;
  border-radius: 4px;
  opacity: 0.3;
  transition: transform var(--transition);
}

.hero-portrait:hover::after {
  transform: translate(10px, 10px);
}

@media (max-width: 992px) {
  .hero-container {
    flex-direction: column-reverse;
    text-align: center;
    align-items: center;
  }

  .hero-portrait {
    flex: 0 0 300px;
    width: 300px;
  }

  .hero-text {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-desc {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

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

.hero-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 16px;
  opacity: 0;
  animation: fadeUp 0.7s 0.2s forwards;
}

.hero-name {
  font-size: clamp(75px, 12vw, 110px);
  font-weight: 800;
  line-height: 0.88;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.7s 0.4s forwards;
}

.hero-name span {
  display: block;
  -webkit-text-stroke: 1.5px var(--muted);
  color: transparent;
}

.hero-desc {
  font-size: 15px;
  color: var(--muted);
  max-width: 440px;
  line-height: 1.75;
  margin-bottom: 28px;
  font-weight: 400;
  opacity: 0;
  animation: fadeUp 0.7s 0.6s forwards;
}

.hero-cta {
  display: flex;
  gap: 28px;
  align-items: center;
  opacity: 0;
  animation: fadeUp 0.7s 0.8s forwards;
  flex-wrap: wrap;
}

.hero-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

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

.hero-resume-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  width: 100%;
  justify-content: center;
  align-items: center;
  margin-top: 16px;
  font-weight: 500;
}

.hero-resume-btn:hover {
  background: rgba(232, 255, 71, 0.05);
  /* Very subtle accent tint */
  filter: brightness(1.2);
}

.hero-scroll {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp 0.7s 1.2s forwards;
  display: flex;
  align-items: center;
  gap: 14px;
}

.scroll-line {
  width: 48px;
  height: 1px;
  background: var(--muted2);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  left: -100%;
  top: 0;
  width: 100%;
  height: 100%;
  background: var(--accent);
  animation: slideAcross 2s 1.8s infinite;
}

/* ── TIMELINE ── */
.timeline {
  position: relative;
  padding-left: 20px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent) 0%, var(--muted2) 60%, transparent 100%);
}

.timeline-item {
  position: relative;
  margin-bottom: 36px;
  opacity: 0;
  transform: translateX(-16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.timeline-item.visible {
  opacity: 1;
  transform: translateX(0);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted2);
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.timeline-item:first-child::before {
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  border-color: var(--accent);
  opacity: 0.8;
}

.timeline-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeline-duration {
  color: var(--muted);
  font-weight: 300;
  text-transform: uppercase;
  font-size: 10px;
}

.timeline-role {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}

.timeline-company {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}

.timeline-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
}

.timeline-bullets li {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  padding-left: 20px;
  position: relative;
  margin-bottom: 8px;
}

.timeline-bullets li::before {
  content: '>';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 18px;
  top: -2px;
}

/* ── TAGS ── */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border: 1px solid var(--border);
  color: var(--muted);
}

/* ── PROJECTS ── */
.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  overflow: hidden;
}

.project-card {
  background: var(--bg);
  padding: 12px 32px 12px 16px;
  position: relative;
  overflow: visible;
  /* Prevent clipping of borders during transforms */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease, background 0.25s;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.project-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
  z-index: 5;
}

.project-card:last-child::after {
  display: none;
}

.project-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.project-card:hover {
  background: var(--surface);
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  height: 0;
  background: var(--accent);
  transition: height 0.3s ease;
  z-index: 2;
}

.project-card:hover::before {
  height: 100%;
}

.project-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted2);
  margin-bottom: 10px;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 8px;
}

.project-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.2;
}

.project-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 12px 0;
}

.project-bullets li {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  padding-left: 20px;
  position: relative;
  margin-bottom: 8px;
}

.project-bullets li::before {
  content: '>';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 18px;
  top: -2px;
}

.project-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  transition: all 0.2s ease;
  width: fit-content;
}

.project-link span {
  color: #ffb700;
  /* Amber color from the image */
  font-weight: 500;
}

.project-link svg {
  color: #c9d1d9;
}

.project-link:hover {
  background: var(--surface2);
  border-color: var(--muted2);
  transform: translateY(-1px);
}

/* ── SKILLS TABLE ── */
.skills-wrap {
  border: 1px solid var(--border);
  overflow: hidden;
}

.skills-table {
  width: 100%;
  border-collapse: collapse;
}

.skills-table th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 12px 20px 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.skills-table td {
  padding: 14px 20px 14px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.skills-table tr:last-child td {
  border-bottom: none;
}

.skills-table tr:hover td {
  background: var(--surface);
}

.row-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  width: 140px;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  padding: 6px 14px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface2);
}

/* ── EDUCATION ── */
.edu-items {
  border: 1px solid var(--border);
  overflow: hidden;
}

.edu-item {
  padding: 20px 28px 20px 14px;
  background: var(--bg);
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 16px;
  align-items: start;
  transition: background 0.25s, opacity 0.5s ease, transform 0.5s ease;
  opacity: 0;
  transform: translateY(16px);
}

.edu-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.edu-item:hover {
  background: var(--surface);
}

.edu-item+.edu-item {
  border-top: 1px solid var(--border);
}

.edu-degree {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.edu-school {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.edu-desc {
  font-size: 13px;
  line-height: 1.75;
  color: var(--muted);
}

.edu-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  text-align: right;
}

.edu-year {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  padding-top: 6px;
}

.edu-cgpa {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.05em;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border: 1px solid var(--accent);
  background: rgba(232, 255, 71, 0.03);
  border-radius: 4px;
}

.edu-cgpa .highlight {
  color: var(--accent);
  font-weight: 800;
  font-size: 14px;
}

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

.footer-left {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 28px;
}

.footer-links a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s;
}

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

/* ── THEME TOGGLE ── */
.theme-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all var(--transition);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.theme-toggle:hover {
  border-color: var(--accent);
  background: var(--bg);
}

.theme-icon {
  font-size: 14px;
}

@media (max-width: 768px) {
  .theme-toggle {
    position: static;
    transform: none;
    order: 3;
    width: 100%;
    justify-content: center;
    margin-top: 20px;
  }
}

/* ── NOISE GRAIN ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.03;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── KEYFRAMES ── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideAcross {
  from {
    left: -100%;
  }

  to {
    left: 100%;
  }
}

/* ── HAMBURGER ── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 200;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text);
  transition: all 0.3s ease;
  transform-origin: center;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ── MOBILE MENU ── */
.mobile-menu {
  display: none;
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  z-index: 99;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(12px);
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
}

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

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

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav {
    padding: 18px 20px;
  }

  .nav-links,
  .desk-resume {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .mobile-menu {
    display: flex;
  }

  section {
    padding: 80px 24px 40px;
  }

  .hero-name {
    font-size: clamp(48px, 12vw, 64px);
  }

  .hero-portrait {
    flex: 0 0 auto;
    width: 100%;
    max-width: 340px;
  }

  .hero-portrait img {
    width: 100%;
    height: auto;
  }

  .project-header {
    flex-direction: column;
    gap: 12px;
  }

  .project-title {
    font-size: 20px;
  }

  .skills-table th,
  .skills-table td {
    padding: 10px 15px;
  }

  .row-label {
    width: 100px;
  }

  .edu-item {
    grid-template-columns: 1fr;
    padding: 20px;
    gap: 8px;
  }

  .edu-right {
    align-items: flex-start;
    text-align: left;
    margin-top: 8px;
  }

  .edu-year {
    padding-top: 0;
  }

  .section-indicator {
    display: none;
  }

  .hero-scroll {
    left: 24px;
  }

  footer {
    padding: 40px 24px;
    flex-direction: column;
    gap: 24px;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }

  .hero-resume-btn {
    display: flex;
    justify-content: center;
    align-items: center;
  }
}