:root {
  --accent: #ffffff;
  --bg: #000000;
  --card: #ffffff;
  --maxw: 75rem;
  --muted: #aaaaaa;
  --pad: 22px;
  --panel: #010101;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

#about h2 {
  border-bottom: 2px solid var(--accent);
  display: inline-block;
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 4px;
}

#about p.muted {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

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

#bgcanvas {
  display: block;
  inset: 0;
  position: fixed;
  z-index: -1;
}


#about,
#contact,
#experience,
#home,
#articles,
#projects,
#section,
#skills {
  scroll-margin-top: 8rem;
}

#timeline {
  border-left: 2px solid rgba(255, 255, 255, 0.1);
  margin: 2rem auto;
  max-width: var(--maxw);
  padding-left: 2rem;
  position: relative;
}

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

.animated-gradient-text {
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientMove 6s ease infinite;
  background: linear-gradient(90deg, #ff6ec4, #7873f5, #4ade80, #fbbf24, #f43f5e);
  background-size: 300% 300%;
  font-size: 2.5rem;
  font-weight: 800;
}

.brand {
  align-items: center;
  display: flex;
  gap: 12px;
}

.brand-text .name {
  color: var(--card);
  font-size: 16px;
  font-weight: 700;
}

.brand-text .role {
  color: var(--muted);
  font-size: 12px;
}

body {
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  color: var(--card);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  height: 100%;
  margin: 0;
}

body.dark .card,
body.dark .hero-card,
body.dark .widget {
  background-color: #000000;
  color: #f0f0f0;
}

body.dark .contact-icons a {
  background-color: rgba(255, 255, 255, 0.1);
}

body.dark .contact-icons a img {
  filter: invert(1);
}

body.nav-open {
  height: 100vh;
  overflow: hidden;
}

.brand {
  cursor: pointer;
}

.brand-link {
  text-decoration: none;
  color: inherit;
}

.brand-link:hover,
.brand-link:focus,
.brand-link:active {
  text-decoration: none;
  color: inherit;
}

.btn {
  background: var(--accent);
  border: none;
  border-radius: 10px;
  color: var(--panel);
  cursor: pointer;
  padding: 10px 14px;
  text-decoration: none;
}

.btn.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--card);
}

.btn.small {
  font-size: 13px;
  padding: 6px 8px;
}

.bullets {
  padding-left: 18px;
}

.card {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(2, 6, 23, 0.6);
  margin-bottom: 18px;
  padding: 18px;
}

.code-block {
  background-color: var(--panel);
  color: var(--muted);
  padding: 16px 20px;
  border-radius: 10px;
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 0.95rem;
  overflow-x: auto;
  margin: 16px 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.code-block code {
  display: block;
}

.container {
  margin: 36px auto;
  max-width: var(--maxw);
  padding: 1rem 2rem 10rem 2rem;
}

.contact-icons {
  align-items: center;
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.contact-icons a {
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  display: flex;
  height: 48px;
  justify-content: center;
  text-decoration: none;
  transition: background 0.3s, color 0.3s;
  width: 48px;
}

.contact-icons a img {
  display: block;
  filter: invert(0);
  height: 24px;
  width: 24px;
}

.download-btn {
  background: var(--accent);
  color: var(--bg);
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.download-btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.download-wrapper {
  display: flex;
  justify-content: center;
  margin: 40px 0 150px;
}

.entry {
  background: rgba(255, 255, 255, 0.02);
  border-left: 4px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  padding: 14px;
}

.entry h3 {
  display: flex;
  justify-content: space-between;
  margin: 0;
}

.entry.open {
  border-left-color: var(--accent);
  transform: translateX(6px);
}

.entry p {
  color: var(--muted);
  margin: 8px 0 0;
}

.hero {
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 20px;
}

.hero-bottom {
  grid-area: bottom;
}

.hero-card {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(2, 6, 23, 0.6);
  color: var(--card);
  padding: 16px;
  width: 350px;
}

.hero-content {
  display: grid;
  flex: 1;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  grid-template-areas:
    "left right"
    "bottom bottom";
  align-items: center;
  width: 100%;
  gap: 2rem;
}

.hero-ctas {
  display: flex;
  gap: 10px;
}

.hero__img {
  width: 300px;
  height: 300px;
  background-image: url("assets/profile.png");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.3);
  animation: profile__animate 8s ease-in-out infinite;
}

.hero-left {
  grid-area: left;
}

.hero-right {
  grid-area: right;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-sub {
  color: var(--muted);
  margin: 8px 0 16px;
}

.hero-title {
  color: var(--muted);
  font-size: 50px;
  margin: 0;
}

.home-gradient-text {
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  align-items: center;
  animation: intro-gradient 1.8s ease backwards;
  animation-delay: 0.5s;
  background: linear-gradient(0deg, #042132 20%, rgba(17, 24, 28, 0) 45%), linear-gradient(90deg, #1e91dc 0%, #064871 33.333%, #3d6db0 50%, #293943 100%);
  background-clip: text;
  background-repeat: no-repeat;
  background-size: 300% 100%;
  display: flex;
  font-size: 115px;
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1;
}

html, body {
  width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

.iconBackground {
  background-color: white;
  border-radius: 10px;
}

.icon-card {
  background: transparent;
  border-radius: 16px;
  flex: 0 0 300px;
  margin-right: -180px;
  scroll-snap-align: center;
  transform-origin: center bottom;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.icon-card img {
  border-radius: 16px;
  display: block;
  height: auto;
  width: 100%;
}

.icon-card:nth-child(even) {
  transform: rotate(6deg);
}

.icon-card:nth-child(odd) {
  transform: rotate(6deg);
}

.icon-card:active,
.icon-card:focus,
.icon-card:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  transform: rotate(0deg) scale(1.05);
  z-index: 10;
}

.icon-stack {
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding: 20px;
  scroll-snap-type: x mandatory;
}

.image-center {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.image-center img {
  max-width: 100%;
  height: auto;
}

.logo {
  height: 56px;
  width: 56px;
  border-radius: 12px;
}

.menuBtn {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  display: none;
  font-size: 20px;
}

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

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

.nav a {
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  margin-left: 6px;
  padding: 8px;
  text-decoration: none;
}

.nav a.active {
  background: rgba(255, 255, 255, 0.04);
  color: var(--card);
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.6s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.section-title {
  font-size: 2rem;
  margin-bottom: 30px;
}

.site-footer {
  color: inherit;
  font-size: 13px;
  opacity: 0.5;
  padding: 10px 0;
  text-align: center;
}

.sub-container {
  /* min-height: 80rem; */
  padding-bottom: 5rem;
}

.sub-container-card {
  margin: 0 auto 4rem;
  max-width: var(--maxw);
  padding: 1rem;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  transition: box-shadow 0.3s ease, transform 0.2s ease;
  background: linear-gradient(145deg, var(--panel), var(--bg));
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
}

.sub-container-card:hover {
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35);
}

.sub-container-home {
  height: 80rem;
  padding-top: clamp(4rem, 8vh, 10rem);
}

.tab {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  padding: 8px 12px;
}

.tab.active {
  background: rgba(255, 255, 255, 0.04);
  color: var(--card);
}

.tabpanel {
  display: none;
}

.tabpanel.active {
  display: block;
}

.tabpanels {
  margin-top: 2rem;
}

.tabs {
  display: flex;
  gap: 0.5rem;
  /* margin-top: 2rem; */
}

.tab-btn {
  background: none;
  border: none;
  padding: 0.5rem 1rem;
  font-weight: 600;
  cursor: pointer;
  opacity: 0.6;
  border-bottom: 2px solid transparent;
  color: inherit;
}

.tab-btn.active {
  opacity: 1;
  border-bottom-color: currentColor;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.tech-category {
  background: linear-gradient(145deg, var(--panel), var(--bg));
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.tech-category h4 {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
  padding-bottom: 4px;
}

.tech-category li {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0.4rem;
  padding-left: 1.2rem;
  position: relative;
}

.tech-category li::before {
  color: var(--accent);
  content: "•";
  font-weight: bold;
  left: 0;
  position: absolute;
}

.tech-category ul {
  list-style: none;
  margin: 0;
  padding-left: 0;
}

.tech-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-top: 1rem;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.timeline-content {
  background: linear-gradient(145deg, var(--panel), var(--bg));
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  padding: 1.2rem 1.4rem;
  transition: all 0.3s ease;
}

.timeline-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.timeline-details li {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 0.4rem;
  position: relative;
}

.timeline-details li::before {
  color: var(--accent);
  content: "▹";
  font-weight: bold;
  left: -1rem;
  position: absolute;
}

.timeline-details ul {
  list-style: none;
  margin: 0;
  padding-left: 1rem;
}

.timeline-entry {
  cursor: pointer;
  margin-bottom: 2rem;
  position: relative;
  transition: all 0.3s ease;
}

.timeline-entry:hover {
  transform: translateY(-3px);
}

.timeline-entry.open .timeline-content {
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.timeline-entry.open .timeline-details {
  margin-top: 0.6rem;
}

.timeline-header {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.timeline-header .company {
  color: var(--card);
  font-size: 1.25rem;
  /* font-weight: 500; */
}

.timeline-header .period {
  color: var(--muted);
  font-size: 0.85rem;
}

.timeline-header h3 {
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.timeline-marker {
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--bg);
  height: 14px;
  left: -11px;
  position: absolute;
  top: 10px;
  width: 14px;
}

.toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--bg);
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.topbar {
  align-items: center;
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: space-between;
  left: 0;
  padding: 12px calc(50% - var(--maxw) / 2);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 9999;
}

.typewriter {
  color: var(--muted);
  font-size: 18px;
  margin: 10px 0;
  min-height: 28px;
}

ul li {
  padding: 5px 0;
}

.widget {
  background: linear-gradient(145deg, var(--panel), var(--bg));
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  padding: 1.4rem;
  transition: all 0.3s ease;
}

.widget h4 {
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.widget p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.widget:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transform: translateY(-6px);
}

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

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes intro-gradient {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

@keyframes profile__animate {
  0% { border-radius: 60% 40% 55% 45% / 60% 45% 55% 40%; }
  50% { border-radius: 40% 60% 45% 55% / 50% 60% 40% 55%; }
  100% { border-radius: 60% 40% 55% 45% / 60% 45% 55% 40%; }
}

@media (max-width: 520px) {
  .hero-title {
    font-size: 28px;
  }
}

@media (max-width: 900px) {
  .brand-text .name {
    font-size: 14px;
  }
  .hero {
    align-items: flex-start;
    flex-direction: column;
  }
  .hero-card {
    width: 100%;
  }
  .hero-content {
    grid-template-columns: 1fr;
    grid-template-areas:
      "left"
      "right"
      "bottom";
    align-items: start;
    justify-items: start;
    text-align: left;
    min-height: auto;
    padding-top: 6rem;
    gap: 2rem;
  }
  .hero-right {
    justify-self: auto;
  }
  .hero-bottom {
    min-height: 72px;
  }
  .menuBtn {
    display: block;
    z-index: 10002;
  }
  .nav {
    background: var(--panel);
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
    flex-direction: column;
    gap: 8px;
    left: 12px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 8px 12px;
    pointer-events: none;
    position: fixed;
    right: 12px;
    top: 64px;
    transition: max-height 320ms ease, opacity 240ms ease;
    z-index: 10001;
  }
  .nav a {
    display: block;
    margin: 0;
    padding: 10px 12px;
    width: 100%;
  }
  .nav.open {
    max-height: 420px;
    opacity: 1;
    pointer-events: auto;
  }
}

@media print {
  #bgcanvas,
  .menuBtn,
  .mobileMenu,
  .nav,
  .topbar,
  #themeToggle {
    display: none;
  }
  body {
    background: white;
    color: black;
  }
  .container {
    max-width: 100%;
  }
}

.company-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
}

.company,
.location {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
}

.company {
  font-weight: 600;
  font-size: 2rem;
  color: inherit;
}

.location {
  font-size: 0.85rem;
  color: #777;
}

.company:hover,
.location:hover {
  text-decoration: underline;
}

.icon {
  font-size: 0.85em;
  line-height: 1;
}


/* ===== Company Card ===== */
.experience-company {
  margin-bottom: 2rem;
  padding: 1rem;
  border-radius: 8px;
  background-color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: box-shadow 0.3s ease;
}

.experience-company:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

/* ===== Company Header ===== */
.company-header-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.company-header-left {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.company-name {
  font-size: 1.4rem;
  font-weight: bold;
  text-decoration: none;
  color: inherit;
}

.company-location {
  font-size: 0.95rem;
  text-decoration: none;
  opacity: 0.75;
  color: inherit;
}

.company-tenure {
  font-size: 0.85rem;
  opacity: 0.75;
  white-space: nowrap;
}

/* ===== Roles ===== */
.roles {
  margin-top: 8px;
}

.roles .role {
  cursor: pointer;
  margin-bottom: 1rem;
  padding-left: 1rem;
  border-left: 2px solid rgba(255, 255, 255, 0.3);
}

.role-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.role-header h3 {
  font-size: 1rem;
  margin: 0;
}

.role-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  color: inherit;
}

.role-period {
  font-size: 0.85rem;
  opacity: 0.75;
}

.role-bullets {
  margin-top: 0.5rem;
  padding-left: 1rem;
  list-style-type: disc;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.role-bullets a {
  color: inherit;
  text-decoration: underline;
}

.role-bullets a:hover {
  opacity: 0.85;
}

.role-bullets li {
  margin-bottom: 0.3rem;
  line-height: 1.4;
}






/* Articles CSS */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.article-card {
  display: block;
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.article-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.article-content {
  padding: 1rem;
}

.article-content h3 {
  margin-bottom: 0.5rem;
}

.article-content p {
  color: var(--muted);
  font-size: 0.9rem;
}

.article-container {
  max-width: 70rem;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.article-body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  padding-top: 30px;
}

.article-body h1, .article-body h2, .article-body h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.article-body p {
  margin-bottom: 1rem;
}

.article-body img {
  max-width: 100%;
  display: block;
  margin: 1rem 0;
}