/* =====================================================
   0. ROOT THEME & TOKENS (DARK FIRST)
   ===================================================== */

:root {

  --first-card-gap: 1.75rem;

  /* Base surfaces */
  --page-bg: #070A12;
  --page-bg-2: #070A12;

  --card-bg: rgba(255, 255, 255, 0.06);
  --card-bg-strong: rgba(255, 255, 255, 0.08);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.70);

  /* Borders / shadows */
  --outline: rgba(255, 255, 255, 0.10);
  --outline-2: rgba(255, 255, 255, 0.16);
  --shadow: 0 18px 42px rgba(0,0,0,0.55);

  /* Brand */
  --primary: #6FE7C8;     /* mint */
  --secondary: #73A6FF;   /* soft blue */
  --accent: #FF7ACB;      /* pink */
  --danger: #ff5b6b;

  /* Radii */
  --radius-s: 12px;
  --radius-m: 18px;
  --radius-l: 24px;

  /* Glass */
  --blur: blur(14px);

  /* Transitions */
  --t-fast: .18s;
  --t-med: .32s;

  /* Compatibility with your old variable */
  --card-border: var(--outline);
}
/* the first big card under the header */
main > .container:first-child,
main > section.container:first-child,
main > section:first-child > .container:first-child,
main > section:first-child > .globe-hero:first-child {
  margin-top: var(--first-card-gap) !important;
}

/* Optional LIGHT mode when JS sets data-theme="light" */
[data-theme="light"] {
  --page-bg: #EEF1F6;
  --page-bg-2: #FFFFFF;

  --card-bg: rgba(20, 25, 35, 0.04);
  --card-bg-strong: rgba(20, 25, 35, 0.06);
  --text: #10131A;
  --muted: rgba(16, 19, 26, 0.72);

  --outline: rgba(16, 19, 26, 0.10);
  --outline-2: rgba(16, 19, 26, 0.16);
  --shadow: 0 18px 38px rgba(0,0,0,0.10);

  --primary: #2EC4B6;
  --secondary: #3D7DFF;
  --accent: #FF4FAE;
}

/* =====================================================
   1. GLOBAL RESET
   ===================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  background: var(--page-bg);
}


body {
  margin: 0;
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background:
    radial-gradient(1200px 700px at 15% -10%, rgba(115,166,255,0.18), transparent 60%),
    radial-gradient(900px 600px at 85% 10%, rgba(255,122,203,0.14), transparent 60%),
    radial-gradient(900px 700px at 50% 110%, rgba(111,231,200,0.12), transparent 65%),
    linear-gradient(180deg, var(--page-bg), var(--page-bg-2));
  color: var(--muted);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background var(--t-med), color var(--t-med);
  min-height: 100vh;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

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

/* =====================================================
   2. HEADER (GLASS GREY)
   ===================================================== */
header {
  position: sticky;
  top: 0;
  z-index: 999;

  max-width: 1100px;
  margin: 0 auto;

  display: flex;
  align-items: center;
  gap: 1.2rem;

  padding: 0.9rem 1.2rem;

  background: rgba(255,255,255,0.06);
  border: 1px solid var(--outline);
  border-top: 0;
  border-radius: 0 0 var(--radius-l) var(--radius-l);

  backdrop-filter: var(--blur);
  box-shadow: var(--shadow);
}

h1 {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0;
  white-space: nowrap;
}

#greet {
  color: var(--accent);
  font-weight: 600;
  min-width: 5.5ch;
}

header h1 strong {
  color: var(--muted);
  font-weight: 600;
}

nav { margin-left: auto; }
nav ul {
  display: flex;
  gap: 1.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: .02em;
  opacity: 0.9;
  transition: opacity var(--t-fast);
}

nav a:hover { opacity: 1; }

nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-fast) ease;
}

nav a:hover::after,
nav a[aria-selected="true"]::after {
  transform: scaleX(1);
}

#themeToggle {
  border: none;
  background: rgba(255,255,255,0.08);
  color: var(--muted);
  cursor: pointer;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  transition: transform var(--t-fast), background var(--t-fast);
  border: 1px solid var(--outline);
}

#themeToggle:hover {
  transform: rotate(10deg);
  background: rgba(255,255,255,0.12);
}

/* =====================================================
   3. PAGE CONTAINERS
   ===================================================== */
.container {
  max-width: 1100px;
  margin: 2.2rem auto;
  padding: 2.2rem 2.0rem;

  background: var(--card-bg);
  border: 1px solid var(--outline);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow);
  backdrop-filter: var(--blur);

  animation: fadeIn 0.45s ease;
}

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

/* If any legacy tab CSS exists, keep it harmless */
main > section { display: block; }

/* =====================================================
   4. TYPOGRAPHY
   ===================================================== */
h2, h3, h4 {
  margin: 0 0 0.6rem 0;
  line-height: 1.25;
}

h2 { font-size: 1.55rem; }
h3 { font-size: 1.18rem; color: var(--secondary); }
p  { margin: 0 0 1rem 0; color: var(--muted); }

.section-divider {
  border-top: 1px solid var(--outline);
  margin-top: 1.25rem;
  padding-top: 1rem;
}

/* =====================================================
   5. ABOUT
   ===================================================== */
.about-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
}

.about-photo,
.about-grid img {
  width: 240px;
  height: 240px;
  object-fit: cover;
  border-radius: 999px;
  border: 1px solid var(--outline);
  box-shadow: 0 16px 34px rgba(0,0,0,0.35);
}

.about-text {
  flex: 1;
  min-width: 260px;
}

.about-text h2 {
  color: var(--secondary);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

/* LinkedIn button */
.linkedin-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;

  margin-top: 1rem;
  padding: 0.55rem 1.05rem;

  background: linear-gradient(135deg, rgba(111,231,200,0.22), rgba(115,166,255,0.18));
  border: 1px solid var(--outline-2);
  border-radius: 999px;

  color: var(--muted) !important;
  text-decoration: none;
  font-weight: 600;

  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}

.linkedin-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.35);
  background: linear-gradient(135deg, rgba(111,231,200,0.28), rgba(115,166,255,0.22));
}

/* Resume / lists */
.resume {
  margin-top: 0.75rem;
  padding-left: 1.1rem;
  list-style: square;
  font-size: 0.95rem;
  color: var(--muted);
}

.resume li { margin-bottom: 0.4rem; }

.experience-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.experience-item .logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: saturate(1.05) contrast(1.05);
}

/* =====================================================
   6. TECH STACK CHIPS
   ===================================================== */
.tech-grid {
  display: grid;
  gap: 0.85rem 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 0.5rem;
}

.tech-group h4 {
  margin: 0 0 0.45rem 0;
  font-size: 0.95rem;
  opacity: 0.9;
  color: var(--muted);
}

.chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chips li {
  font-size: 0.85rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--outline);
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.86);
}

[data-theme="light"] .chips li {
  background: rgba(16,19,26,0.05);
  color: rgba(16,19,26,0.85);
}

/* =====================================================
   7. TRAVEL (CAROUSELS)
   ===================================================== */
.travel-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 900px) {
  .travel-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .travel-grid { grid-template-columns: 1fr; }
}

.experience h3 {
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
  color: var(--secondary);
}

/* Carousel */
.carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-m);
  border: 1px solid var(--outline);
  background: rgba(255,255,255,0.03);
  box-shadow: 0 14px 28px rgba(0,0,0,0.35);
}

.carousel-track {
  display: flex;
  transition: transform .4s ease;
  will-change: transform;
}

.carousel-track figure {
  flex: 0 0 100%;
  margin: 0;
  position: relative;
}

.carousel-track img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.05);
}

.carousel-track figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,0.65));
  color: rgba(255,255,255,0.92);
  font-size: 0.78rem;
  text-align: center;
  padding: 0.65rem 0.35rem 0.35rem;
}

.carousel button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.40);
  color: rgba(255,255,255,0.92);
  font-size: 1.9rem;
  cursor: pointer;
  z-index: 3;
  transition: background var(--t-fast), transform var(--t-fast);
}

.carousel button:hover {
  background: rgba(0,0,0,0.55);
}

.carousel .prev { left: 0.55rem; }
.carousel .next { right: 0.55rem; }

/* =====================================================
   8. PROJECTS
   ===================================================== */
.projects-list {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.project-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--outline);
  border-radius: var(--radius-m);
  padding: 1.2rem;
  box-shadow: 0 14px 28px rgba(0,0,0,0.35);
  transition: transform var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.20);
  background: rgba(255,255,255,0.07);
}

.project-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 0.9rem;
  border: 1px solid rgba(255,255,255,0.10);
}

.project-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.08rem;
  color: var(--muted);
}

.project-card p {
  margin-bottom: 0.9rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.project-card a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}
.project-card a:hover { text-decoration: underline; }

.more-projects {
  margin: 0.9rem 0 0 1.1rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--muted);
}

.stacked-cards {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* =====================================================
   9. FOOTER
   ===================================================== */
footer {
  text-align: center;
  margin: 2rem auto;
  color: var(--muted);
  font-size: 0.9rem;
  opacity: 0.75;
  padding-bottom: 1rem;
}

/* =====================================================
   10. MOBILE HEADER TWEAKS
   ===================================================== */
@media (max-width: 600px) {
  header {
    flex-direction: column;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
  }
  nav ul { flex-wrap: wrap; justify-content: center; }
  h1 { font-size: 1.25rem; }
  .about-grid { flex-direction: column; align-items: center; }
}


