:root {
  --primary-blue: #1bc6c4;
  --timeline-dot: #1bc6c4;
  --timeline-line: #1bc6c4;
  --card-bg: #181818;
  --text-main: #fff;
  --text-muted: #b0b0b0;
  --bg-main: #000;
  --surface: #0e0e0e;
  --border: #222;
  --shadow: #111;
  --radius: 18px; /* rounder corners */
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
}
/* Light theme */
:root[data-theme="light"] {
  --bg-main: #f6f7f9;
  --surface: #ffffff;
  --card-bg: #ffffff;
  --text-main: #0b1220;
  --text-muted: #516079;
  --border: #e5e7eb;
  --shadow: rgba(15, 23, 42, 0.08);
}
html, body {
  background: var(--bg-main);
  color: var(--text-main);
  font-family: 'Inter', Arial, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  width: 100vw;
  /* Background image */
  background-image: url('../60.png');
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
}
h1, h2, h3, h4, h5, h6, .tw-text-primary { color: var(--primary-blue); margin: 0; }
a, .link { color: var(--primary-blue); text-decoration: none; }
a:hover, .link:hover { text-decoration: underline; }
.tab-btn {
  background: none; border: none; color: var(--primary-blue); font-size: 1.1em; font-weight: 600; cursor: pointer; padding: 0.5em 1.2em; border-radius: 6px; transition: background 0.2s;
}
.tab-btn.active, .tab-btn:focus { background: #181818; color: var(--primary-blue); outline: none; }
.timeline-dot { background: var(--timeline-dot); box-shadow: 0 2px 8px 0 var(--timeline-dot); }
.section-card h3, .section-card strong { color: var(--primary-blue); }
.skills-grid .skill-card strong { color: var(--primary-blue); }
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.sidebar { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 2rem 0 1.5rem 0; gap: 0.6rem; }
.sidebar { transition: opacity 0.22s ease, transform 0.22s ease; will-change: opacity, transform; }
body.scrolling .sidebar { opacity: 0; transform: translateY(-6px); pointer-events: none; }
/* Accessibility: if user tabs into the sidebar, keep it visible */
.sidebar:focus-within { opacity: 1 !important; transform: none !important; pointer-events: auto !important; }
.profile-img {
  width: 158px; height: 158px; border-radius: 50%; overflow: hidden; margin-bottom: 1.2rem;
  border: 2.5px solid var(--primary-blue); box-shadow: 0 2px 12px 0 var(--primary-blue);
  background: #222;
}
.profile-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.name { font-size: 2.4rem; font-weight: 700; margin-bottom: 0.2em; }
.subtitle { color: var(--primary-blue); font-size: 1.1rem; margin-bottom: 1.2em; }
.socials { display: flex; gap: 2em; font-size: 1.44em; margin-bottom: 1.5em; }
.main-content { background: rgba(10, 10, 10, 0.45); color: var(--text-main); border-radius: var(--radius); box-shadow: 0 2px 24px 0 var(--shadow); padding: 2.5rem 2rem; margin-bottom: 2.5rem; border: 1px solid rgba(255,255,255,0.08); }
.tabs { display: flex; gap: 1.5em; margin-bottom: 2.5rem; justify-content:center; }
.tab-content { display: none; }
.tab-content.active { display: block; }
/* Timeline styles */
.timeline-container { width: 100%; max-width: 900px; margin: 0 auto; padding: 1.5em 0; }
.timeline { position: relative; margin-left: 2em; padding-left: 2em; border-left: 3px solid var(--timeline-line); }
.timeline-event { position: relative; margin-bottom: 2.5em; }
.timeline-dot { position: absolute; left: -2.2em; top: 0.5em; width: 1.2em; height: 1.2em; background: var(--timeline-dot); border-radius: 50%; border: none; box-shadow: 0 1px 4px 0 var(--timeline-dot); }
.timeline-content.card, .skill-card {
  color: var(--text-main);
  font-size: 1.05em;
  background: rgba(18, 18, 18, 0.42);
  border-radius: var(--radius);
  box-shadow: 0 2px 12px 0 var(--shadow);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 1.5em;
}
.timeline-content.card h3, .skill-card strong { color: var(--primary-blue); }
.timeline-content.card p, .timeline-content.card ul, .skill-card ul, .skill-card span { color: var(--text-muted); font-size: 1em; }
/* Parallax background effect */
/* Subtle overlay above background image to preserve text contrast */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to bottom, rgba(0,0,0,0.94), rgba(0,0,0,0.94))
              , radial-gradient(ellipse at 60% 20%, rgba(27,198,196,0.10) 0%, rgba(0,0,0,0.0) 70%),
                radial-gradient(ellipse at 20% 80%, rgba(27,198,196,0.08) 0%, rgba(0,0,0,0.0) 70%);
  backdrop-filter: none;
  pointer-events: none;
}

/* Further dim and blur the background image on browsers that support backdrop-filter */
@supports ((-webkit-backdrop-filter: blur(6px)) or (backdrop-filter: blur(6px))) {
  body::before {
    -webkit-backdrop-filter: blur(10px) brightness(0.6) contrast(0.9);
    backdrop-filter: blur(10px) brightness(0.6) contrast(0.9);
  }
  /* Reduce blur on small screens for performance */
  @media (max-width: 700px) {
    body::before {
      -webkit-backdrop-filter: blur(4px) brightness(0.65) contrast(0.9);
      backdrop-filter: blur(4px) brightness(0.65) contrast(0.9);
    }
  }
}
/* Subtle animated accent for headings and timeline dots */
.tw-text-primary, .timeline-dot, .tag { position: relative; }
/* Reduce continuous animations to improve smoothness on high refresh displays */
.tw-text-primary:hover, .tag:hover { animation: accentGlow 6s ease-in-out infinite alternate; }
@keyframes accentGlow { 0% { filter: drop-shadow(0 0 0px #1bc6c4); } 100% { filter: drop-shadow(0 0 3px #1bc6c4); } }
/* Microinteractions for social icons and project cards */
.socials a { transition: transform 0.18s, box-shadow 0.18s; }
.socials a:hover { transform: scale(1.13) translateY(-2px); box-shadow: 0 4px 12px 0 #1bc6c4; background: rgba(27,198,196,0.08); border-radius: 10px; }
.section-card { transition: box-shadow 0.18s, transform 0.18s, border-color 0.18s; border: 1px solid rgba(255,255,255,0.08); background: rgba(18,18,18,0.42); padding: 1.5em; }

.section-card:hover { box-shadow: 0 6px 24px 0 rgba(27,198,196,0.18); transform: translateY(-2px); border-color: rgba(27,198,196,0.5); }
/* Visible focus styles */
.tab-btn:focus-visible, a:focus-visible, .section-card:focus-within { outline: 2px solid var(--primary-blue); outline-offset: 3px; border-radius: 8px; }
/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } .custom-cursor { display: none !important; } }
/* Tab underline animation */
.tab-btn { position: relative; overflow: hidden; }
.tab-btn::after { content: ''; display: block; position: absolute; left: 50%; bottom: 0; width: 0; height: 2.5px; background: linear-gradient(90deg, #1bc6c4 60%, #fff 100%); border-radius: 2px; transition: width 0.3s, left 0.3s; }
.tab-btn.active::after, .tab-btn:hover::after { width: 80%; left: 10%; }
/* Custom section divider */
.section-divider { width: 100%; height: 18px; margin: 2.5em 0 2em 0; background: none; display: flex; align-items: center; justify-content: center; }
.section-divider svg { width: 90px; height: 18px; display: block; }
/* Timeline pulse for most recent event */
.timeline-event.recent .timeline-dot { animation: pulseDot 2.2s infinite alternate; }
@keyframes pulseDot { 0% { box-shadow: 0 0 0 0 #1bc6c4; } 100% { box-shadow: 0 0 10px 4px #1bc6c4; } }
/* Footer sun and coffee emoji animation */
.footer-emoji { display: inline-block; animation: footerBounce 2.5s infinite alternate; will-change: transform; }
@keyframes footerBounce { 0% { transform: translateY(0) scale(1); filter: brightness(1); } 100% { transform: translateY(-5px) scale(1.08); filter: brightness(1.2); } }
/* Custom cyan-glow cursor */
body, html { cursor: none; }
.custom-cursor { position: fixed; top: 0; left: 0; width: 22px; height: 22px; border-radius: 50%; background: rgba(27,198,196,0.85); box-shadow: 0 0 8px 2px #1bc6c4, 0 0 0 2px #1bc6c4 inset; pointer-events: none; z-index: 99999; mix-blend-mode: lighten; transition: none; opacity: 0.92; }
.custom-cursor.cursor-hover { transform: scale(1.4); opacity: 1; box-shadow: 0 0 16px 4px #1bc6c4, 0 0 0 2px #1bc6c4 inset; }
/* Hide custom cursor on touch devices for performance */
@media (pointer: coarse), (hover: none) {
  body, html { cursor: auto; }
  .custom-cursor { display: none !important; }
}
@media (max-width: 700px) {
  .container { padding: 0 0.2rem; }
  .sidebar { padding: 1.2rem 0 1rem 0; }
  .profile-img { width: 90px !important; height: 90px !important; }
  .name { font-size: 1.5rem; }
  .subtitle { font-size: 0.95rem; margin-bottom: 0.8em; }
  .socials { font-size: 1.1em; gap: 1em; margin-bottom: 1em; }
  .main-content { padding: 1.2rem 0.5rem; border-radius: 10px; }
  .tabs { flex-wrap: wrap; gap: 0.7em; font-size: 0.95em; }
  .tab-btn { font-size: 1em; padding: 0.4em 0.7em; }
  .skills-grid { grid-template-columns: 1fr; gap: 0.7em; }
  .skill-card { font-size: 0.98em; padding: 0.7em 0.7em; }
  .timeline-container { padding: 0.5em 0; }
  .timeline { margin-left: 0.2em; padding-left: 0.7em; }
  .timeline-content.card { padding: 1.05em; }
  h2, h3 { font-size: 1.1em; }
  /* Horizontal timeline for mobile */
  .timeline-container { overflow-x: auto; }
  .timeline { border-left: none; border-top: 3px solid var(--timeline-line); margin-left: 0; padding-left: 0; display: flex; flex-direction: row; gap: 1.5em; padding-top: 2em; padding-bottom: 1.5em; }
  .timeline-event { min-width: 260px; margin-bottom: 0; margin-right: 0.5em; position: relative; }
  .timeline-dot { left: 50%; top: -2.2em; transform: translateX(-50%); position: absolute; }
  .timeline-content.card { margin-top: 1.7em; }
  /* Avoid costly fixed background on mobile */
  html, body { background-attachment: scroll; }
  /* Lighter shadows on mobile for smoother frames */
  .section-card, .project-card, .timeline-content.card { box-shadow: 0 1px 8px 0 rgba(0,0,0,0.6); }
}
/* Skills grid */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.2em; margin-top: 1.2em; }
.skill-card { background: #181818; border-radius: 10px; border: 1.5px solid #222; padding: 1em 1em; color: #fff; font-size: 1.05em; box-shadow: 0 2px 8px 0 #111; }
.skill-card strong { color: var(--primary-blue); }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.7em; margin-top: 0.7em; }
.tag { background: rgba(27, 198, 196, 0.1); color: var(--primary-blue); padding: 0.4em 0.8em; border-radius: 12px; font-size: 0.9em; font-weight: 500; white-space: nowrap; }
/* Parallax effect for project cards */
.section-card.project-parallax { perspective: 900px; will-change: transform; transition: box-shadow 0.18s, transform 0.18s; }

/* Lists: visible bullets and spacing across sections */
.main-content ul { list-style: disc; padding-left: 1.2em; margin: 0.6em 0; }
.main-content ol { list-style: decimal; padding-left: 1.4em; margin: 0.6em 0; }
.main-content li { margin: 0.35em 0; }
/* Tailwind-like utility present in markup */
.tw-list-disc { list-style: disc !important; padding-left: 1.2em; }

/* Buttons */
.btn { appearance: none; border: 1px solid var(--border); background: var(--surface); color: var(--text-main); padding: 0.65em 1.1em; border-radius: 10px; font-weight: 600; cursor: pointer; transition: transform 0.15s, box-shadow 0.15s, background 0.2s, border-color 0.2s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px 0 rgba(0,0,0,0.15); }
.btn:focus-visible { outline: 2px solid var(--primary-blue); outline-offset: 3px; }
.btn-primary { background: var(--primary-blue); color: #011212; border-color: transparent; }
.btn-primary:hover { box-shadow: 0 10px 30px 0 rgba(27,198,196,0.4); }
.btn-secondary { background: transparent; border-color: var(--primary-blue); color: var(--primary-blue); }

/* Skip link */
.skip-link { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { left: 16px; top: 16px; width: auto; height: auto; background: var(--surface); color: var(--text-main); padding: 8px 12px; border-radius: 8px; z-index: 9999; border: 1px solid var(--primary-blue); }

/* Hero */
.hero { background: linear-gradient(180deg, rgba(27,198,196,0.10), rgba(0,0,0,0.06)) , rgba(18,18,18,0.42); border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius); padding: var(--space-5); margin-bottom: var(--space-5); box-shadow: 0 2px 12px 0 var(--shadow); }
.hero h1 { font-size: 1.76rem; line-height: 1.1; margin: 0 0 10px 0; color: var(--text-main); }
.hero p { color: var(--text-muted); max-width: 60ch; margin: 0 0 var(--space-4) 0; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Theme toggle */
.theme-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--text-muted); }
.theme-toggle button { display: inline-flex; align-items: center; gap: 6px; }

/* Projects grid modern cards */
.projects-grid { display: grid; grid-template-columns: 1fr; gap: 1.5em; margin-top: 1.5em; }
.project-card { display: grid; grid-template-columns: 1fr; gap: 0.9em; padding: 1.1em; border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.08); background: rgba(18,18,18,0.42); box-shadow: 0 2px 12px 0 var(--shadow); }
.project-parallax { backface-visibility: hidden; transform: translateZ(0); transform-style: preserve-3d; }
.timeline .section-card, #education .section-card { border-radius: 22px; }

/* Glassmorphism enhancement when supported */
@supports ((-webkit-backdrop-filter: blur(8px)) or (backdrop-filter: blur(8px))) {
  .main-content,
  .section-card,
  .project-card,
  .timeline-content.card,
  .hero {
    -webkit-backdrop-filter: blur(8px) saturate(120%);
    backdrop-filter: blur(8px) saturate(120%);
    background: rgba(18, 18, 18, 0.38);
    border-color: rgba(255,255,255,0.14);
  }
  /* On small screens, avoid backdrop-filter cost */
  @media (max-width: 700px) {
    .main-content,
    .section-card,
    .project-card,
    .timeline-content.card,
    .hero { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(18,18,18,0.55); }
  }
}

/* Stronger reduced-motion: remove non-essential animations and long transitions */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .footer-emoji { animation: none !important; }
  .custom-cursor { display: none !important; }
}
.project-card h3 { margin: 0; color: var(--text-main); font-size: 1.2rem; }
.project-meta { color: var(--text-muted); font-size: 0.95em; }
.project-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

@media (min-width: 800px) {
  .projects-grid { grid-template-columns: 1fr 1fr; }
}
