/* Apple-style refresh: platform typography, calm materials, fast direct feedback. */

/* Light Mode Override */
[data-theme="light"] {
  --bg-dark: #f8fafc;
  --bg-panel: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;

  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(0, 0, 0, 0.05);
  /* Darker border for light mode */
  --glass-lighting: rgba(255, 255, 255, 0.8);

  --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .footer p {
  background: none;
  -webkit-text-fill-color: #1e293b;
  color: #1e293b;
}

:root {
  /* HSL Color Variables for easy theming */
  --bg-dark: #0a0a0c;
  --bg-panel: #131418;
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --accent-primary: #6366f1;
  /* Indigo */
  --accent-secondary: #ec4899;
  /* Pink */
  --accent-tertiary: #14b8a6;
  /* Teal */

  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.05);
  --glass-lighting: rgba(255, 255, 255, 0.05);

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 8px;

  --transition: transform 180ms cubic-bezier(0.23, 1, 0.32, 1), opacity 180ms cubic-bezier(0.23, 1, 0.32, 1), background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: none;
  background-attachment: fixed;
  /* Hide default cursor */
}

/* Custom Cursor Removed */

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

/* Typography */
h1,
h2,
h3,
h4 {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  letter-spacing: 0;
  color: #fff;
}

p {
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 400;
}

/* Layout */
.page-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 3rem;
  min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
  position: sticky;
  top: 2rem;
  height: calc(100vh - 4rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.profile-header {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.avatar-container {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  /* Removed grid to ensure img fills simply */
  box-shadow: 0 20px 40px rgba(99, 102, 241, 0.3);
  overflow: hidden;
}

.avatar-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  transform: scale(1.55);
  transform-origin: 52% 38%;
}

.avatar-container.show-fallback img {
  display: none;
}

.avatar-fallback {
  width: 100%;
  height: 100%;
  display: none;
  place-items: center;
  color: #fff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 3rem;
  font-weight: 700;
}

.avatar-container.show-fallback .avatar-fallback {
  display: grid;
}

.initials {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
}

.name {
  font-size: 2.25rem;
  line-height: 1.1;
  background: linear-gradient(to right, #fff, #94a3b8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tagline {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.05rem;
  line-height: 1.45;
  color: #6366f1;
  font-weight: 500;
  min-height: 4.4em;
  white-space: pre-line;
  /* Reserve space for typing effect */
}

/* Navigation / Contacts */
.contact-nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  border: 1px solid transparent;
}

.contact-link:hover {
  background: var(--glass-bg);
  border-color: var(--glass-border);
  color: #fff;
  transform: translateX(5px);
}

.contact-link i {
  width: 18px;
  height: 18px;
  stroke-width: 2px;
}

.contact-link span {
  font-size: 0.95rem;
}

/* CTA Button */
.main-cta {
  transition: var(--transition);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  /* Aligned left now */
  gap: 1rem;
  margin-top: 2rem;
}

.button.primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--accent-primary);
  color: white;
  padding: 1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.button.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px var(--accent-primary);
}

.button.secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  box-shadow: 0 10px 20px rgba(255, 255, 255, 0.05);
}

.button.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  border-color: var(--accent-primary);
}

.icon-right {
  width: 18px;
  height: 18px;
  transition: transform 180ms cubic-bezier(0.23, 1, 0.32, 1);
}

[data-feather] {
  display: inline-grid;
  place-items: center;
  font-style: normal;
  line-height: 1;
}

[data-feather]::before {
  content: '';
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
}

.section-icon[data-feather] {
  display: none;
}

[data-feather="arrow-right"]::before {
  content: "\2192";
}

[data-feather="download"]::before {
  content: "\2193";
}

[data-feather="mail"]::before {
  content: "\2709";
}

[data-feather="phone"]::before {
  content: "\260E";
}

[data-feather="map-pin"]::before {
  content: "\25CE";
}

[data-feather="linkedin"]::before {
  content: "in";
  font-size: 0.72em;
}

[data-feather="user"]::before {
  content: "\25CB";
}

[data-feather="cpu"]::before {
  content: "\2318";
  font-size: 0.72em;
}

[data-feather="code"]::before {
  content: "</>";
  font-size: 0.62em;
}

[data-feather="award"]::before {
  content: "\2605";
}

[data-feather="briefcase"]::before {
  content: "\25A1";
  font-size: 0.64em;
}

[data-feather="book-open"]::before {
  content: "\2225";
  font-size: 0.72em;
}

[data-feather="heart"]::before {
  content: "\2661";
  font-size: 0.72em;
}

[data-feather="chevron-down"]::before {
  content: "\2304";
}

[data-feather="chevron-left"]::before {
  content: "\2039";
}

[data-feather="chevron-right"]::before {
  content: "\203A";
}

[data-feather="maximize-2"]::before {
  content: "\25A1";
  font-size: 0.64em;
}

[data-feather="sun"]::before {
  content: "\25D0";
}

[data-feather="moon"]::before {
  content: "\263E";
}

[data-feather="menu"]::before {
  content: "\2630";
  font-size: 1.2em;
}

[data-feather="x"]::before {
  content: "\00D7";
}

.button.primary:hover .icon-right {
  transform: translateX(4px);
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 3000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms cubic-bezier(0.23, 1, 0.32, 1);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 1000px;
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateY(20px);
  transition: transform 220ms cubic-bezier(0.23, 1, 0.32, 1), opacity 220ms cubic-bezier(0.23, 1, 0.32, 1);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-sticky-header {
  padding: 2rem 2rem 0 2rem;
}

.modal-image-stage {
  position: relative;
}

.modal-scrollable-body {
  padding: 1rem 2rem 2rem 2rem;
}

/* Override .card.glass overflow:hidden so the modal can scroll */
.modal-content.card.glass {
  overflow-y: auto;
  padding: 0;
}

body.modal-open {
  overflow: hidden;
}



.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0.5rem;
  font-size: 2rem;
  transition: var(--transition);
  z-index: 3010;
}

.close-modal:hover {
  color: var(--accent-secondary);
  transform: scale(1.1) rotate(90deg);
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 3010;
  backdrop-filter: blur(4px);
}

.modal-nav:hover {
  background: var(--accent-primary);
  transform: translateY(-50%) scale(1.1);
}

.prev-nav {
  left: 0.75rem;
}

.next-nav {
  right: 0.75rem;
}

#modal-image {
  width: 100%;
  max-height: 55vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.2);
}

.modal-indicators {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.modal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--glass-border);
  cursor: pointer;
  transition: var(--transition);
}

.modal-dot.active {
  background: var(--accent-primary);
  transform: scale(1.2);
}

#modal-title {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: var(--accent-primary);
}

#modal-desc {
  color: var(--text-muted);
  line-height: 1.6;
}

#modal-desc h4 {
  color: #fff;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

#modal-desc ul {
  list-style-type: none;
  padding-left: 0.5rem;
  margin-bottom: 1rem;
}

#modal-desc ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.3rem;
}

#modal-desc ul li::before {
  content: "•";
  color: var(--accent-primary);
  position: absolute;
  left: 0;
  font-weight: bold;
}


.modal-detail-section {
  margin-bottom: 1.5rem;
}

.modal-main-desc {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.modal-detail-section h4 {
  font-size: 1.25rem !important;
  color: var(--accent-secondary) !important;
  margin-bottom: 0.8rem !important;
}

.tech-stack {
  font-weight: 500;
  color: var(--text-light);
  letter-spacing: 0;
}

/* Tech Stack Preview */
.tech-stack-preview {
  margin-top: auto;
  padding-top: 2rem;
}

.tech-stack-preview h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
  letter-spacing: 0;
}

.mini-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mini-tags span {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
}

/* Main Content Area */
.content {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  padding-top: 4rem;
  padding-right: 10rem;
  /* Prevent overlap with fixed buttons */
}

/* Sidebar Navigation (Scroll Spy) Removed */

/* Scroll Reveal Animation */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

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

.fade-in-up {
  opacity: 0;
  /* Initially hidden */
  animation: fadeUp 260ms cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

/* Section Header Styles */
.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  cursor: pointer;
  user-select: none;
}

.section-icon {
  color: var(--accent-primary);
  width: 24px;
  height: 24px;
}

.section h2 {
  font-size: 1.75rem;
  flex-grow: 1;
}

.chevron-icon {
  width: 24px;
  height: 24px;
  color: var(--text-muted);
  transition: transform 180ms cubic-bezier(0.23, 1, 0.32, 1);
}

.section.collapsed .chevron-icon {
  transform: rotate(-90deg);
}

.section-content {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 220ms cubic-bezier(0.23, 1, 0.32, 1);
}

.section-content>div {
  overflow: hidden;
}

.section.collapsed .section-content {
  grid-template-rows: 0fr;
}

.section.collapsed .margin-shim {
  margin: 0;
}

/* Cards (Glassmorphism) */
.card.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.card.glass:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.skill-category h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.skill-tag {
  padding: 0.6rem 1.2rem;
  background: var(--bg-panel);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: #fff;
  transition: var(--transition);
}

.skill-tag:hover {
  border-color: var(--accent-tertiary);
  color: var(--accent-tertiary);
  box-shadow: 0 0 15px rgba(20, 184, 166, 0.2);
}

/* Timeline/Experience */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
  padding-left: 2rem;
}

/* Vertical Line */
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-primary), var(--bg-panel));
}

.timeline-item {
  position: relative;
}

.timeline-marker {
  position: absolute;
  left: -2rem;
  top: 1.5rem;
  width: 12px;
  /* Center with the 2px line at left:0 */
  height: 12px;
  border-radius: 50%;
  background: var(--bg-dark);
  border: 2px solid var(--accent-primary);
  transform: translateX(-5px);
  /* -(12/2) + (2/2) = -6 + 1 = -5px to center on line */
  z-index: 2;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.timeline-header .role {
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 0.25rem;
}

.timeline-header .org {
  color: var(--accent-tertiary);
  font-size: 0.95rem;
  font-weight: 500;
}

.timeline-header .date {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .timeline-header {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* Certifications Grid */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.cert-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.cert-topline {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  align-items: center;
}

.cert-provider {
  color: var(--accent-tertiary);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.priority-cert {
  border-color: rgba(99, 102, 241, 0.3) !important;
}

.priority-cert::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(20, 184, 166, 0.04), transparent 65%);
}

.cert-card h3 {
  font-size: 1.25rem;
  line-height: 1.4;
  color: var(--accent-secondary);
  position: relative;
  z-index: 1;
}

.cert-date {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  position: relative;
  z-index: 1;
}

.cert-card p {
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}

.cert-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  position: relative;
  z-index: 1;
}

.cert-tags .skill-tag,
.project-tags .skill-tag {
  font-size: 0.78rem;
  padding: 0.45rem 0.75rem;
}

.cert-more {
  position: relative;
  z-index: 1;
}

.cert-more summary {
  color: var(--accent-primary);
  cursor: pointer;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 600;
  list-style: none;
}

.cert-more summary::-webkit-details-marker {
  display: none;
}

.cert-more p {
  margin-top: 0.75rem;
}

/* Animation Classes */
.fade-in-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 220ms cubic-bezier(0.23, 1, 0.32, 1), transform 220ms cubic-bezier(0.23, 1, 0.32, 1);
  will-change: opacity, visibility;
}

.fade-in-section.visible {
  opacity: 1;
  transform: none;
}

/* Community Impact */
.community-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.community-list li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--text-muted);
  font-size: 0.97rem;
  line-height: 1.6;
}

.community-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-primary);
  flex-shrink: 0;
}

.community-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

[data-theme="light"] .community-list li {
  color: #334155 !important;
}

/* Footer */
.footer {
  text-align: center;
  padding: 3rem 0;
  margin-top: 2rem;
  border-top: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-size: 0.85rem;
  width: 100%;
}

.footer p {
  color: #6366f1;
  font-weight: 500;
  letter-spacing: 0;
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
  .page-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1rem;
    padding-top: 5rem;
    /* Make space for fixed buttons */
  }

  .content {
    padding-right: 0;
    margin-top: 1rem;
  }

  /* Hide Sidebar CTA on Mobile */
  .sidebar .main-cta {
    display: none;
  }

  .nav-controls {
    top: 1rem;
    right: 1rem;
  }

  .sidebar {
    position: relative;
    top: 0;
    height: auto;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 2rem;
  }

  .tech-stack-preview {
    display: none;
  }

  /* Removed fixed positioning for CTA on mobile */

  .button.primary {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    background: var(--accent-primary);
    color: white;
  }

  .overlay-content.form-layout {
    flex-direction: column;
    gap: 2rem;
    align-items: center;
    /* Center on mobile */
  }

  .contact-info-col,
  .contact-form-col {
    width: 100%;
  }

  /* Adjust Modal padding */
  .modal-content {
    padding: 1rem;
  }

  .modal-nav {
    padding: 0.5rem;
  }

  .prev-nav {
    left: 0.5rem;
  }

  .next-nav {
    right: 0.5rem;
  }

  .close-modal {
    top: 0.5rem;
    right: 0.5rem;
  }

  #modal-title {
    font-size: 1.8rem;
  }
}

/* Burger Menu */
.nav-controls {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 1000;
  display: flex;
  gap: 1rem;
}

.burger-menu {
  /* relative to nav-controls */
  position: relative;
  inset: auto;
  /* reset top/left */
  background: var(--bg-panel);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.burger-menu:hover {
  color: var(--accent-primary);
  transform: scale(1.1);
}

/* Contact Overlay */
.contact-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 12, 0.95);
  backdrop-filter: blur(20px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms cubic-bezier(0.23, 1, 0.32, 1);
  overflow-y: auto;
  /* Allow scrolling if form is tall */
}

.contact-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.overlay-content {
  text-align: center;
  width: 90%;
  max-width: 500px;
  transform: translateY(20px);
  transition: transform 220ms cubic-bezier(0.23, 1, 0.32, 1), opacity 220ms cubic-bezier(0.23, 1, 0.32, 1);
}

.overlay-content.form-layout {
  max-width: 900px;
  display: flex;
  gap: 3rem;
  text-align: left;
  align-items: flex-start;
}

.contact-info-col {
  flex: 1;
}

.contact-form-col {
  flex: 1.5;
  background: var(--bg-panel);
  /* Card-like background */
  padding: 2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
}

.contact-form-col h3 {
  margin-bottom: 1.5rem;
}

.glass-form .form-group {
  margin-bottom: 1rem;
}

.glass-form label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.glass-form input,
.glass-form textarea {
  width: 100%;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: inherit;
  transition: var(--transition);
}

.glass-form input:focus,
.glass-form textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.05);
}

.overlay-content h2 {
  font-size: 3rem;
  margin-bottom: 3rem;
  background: linear-gradient(to right, #fff, #94a3b8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.overlay-nav {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-start;
}

.contact-link.large {
  font-size: 1.5rem;
  padding: 1.5rem 2rem;
  width: 100%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}

.contact-link.large i {
  width: 28px;
  height: 28px;
}

.close-menu {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transform: scale(1.5);
  transition: var(--transition);
}

.close-menu:hover {
  color: #fff;
  transform: scale(1.5) rotate(90deg);
}

/* Light Mode Burger & Overlay */
[data-theme="light"] .burger-menu {
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  color: #1e293b;
}

[data-theme="light"] .contact-overlay {
  background: rgba(248, 250, 252, 0.95);
}

[data-theme="light"] .overlay-content h2 {
  background: none;
  -webkit-text-fill-color: initial;
  color: #0f172a;
}

[data-theme="light"] .contact-link.large {
  background: #ffffff;
  color: #1e293b;
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .contact-link.large:hover {
  color: var(--accent-tertiary);
  border-color: var(--accent-tertiary);
}

[data-theme="light"] .close-menu {
  color: #1e293b;
}

[data-theme="light"] .close-menu:hover {
  color: var(--accent-primary);
}

.theme-toggle {
  /* relative to nav-controls */
  position: relative;
  inset: auto;
  background: var(--bg-panel);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.theme-toggle:hover {
  color: var(--accent-primary);
  transform: rotate(15deg);
}

[data-theme="light"] .theme-toggle {
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .button.primary {
  background: var(--text-main);
  /* Dark background */
  color: white;
  /* White text */
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .button.primary:hover {
  background: var(--accent-primary);
}

/* Project Gallery */
.section-intro {
  max-width: 760px;
  margin-bottom: 1.5rem;
}

.section-subtitle {
  margin-bottom: 1.25rem;
  max-width: 680px;
}

.projects-stack {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.project-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
  gap: 2rem;
  align-items: start;
}

.project-card.media-missing {
  grid-template-columns: 1fr;
}

.featured-project {
  border-color: rgba(20, 184, 166, 0.24) !important;
}

.featured-project::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(140deg, rgba(236, 72, 153, 0.08), transparent 35%, rgba(20, 184, 166, 0.07));
}

.project-copy,
.project-media {
  position: relative;
  z-index: 1;
}

.project-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.project-kicker {
  color: var(--accent-tertiary);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.project-year {
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 0.2rem 0.65rem;
  border: 1px solid var(--glass-border);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.04);
}

.project-card h3 {
  font-size: clamp(1.45rem, 2vw, 2rem);
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.project-highlights {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 1rem 0 1.25rem;
}

.project-highlights li {
  position: relative;
  padding-left: 1.4rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.project-highlights li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-primary);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.project-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1.4rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: var(--radius-sm);
  background: rgba(99, 102, 241, 0.12);
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.project-link-button:hover {
  transform: translateY(-2px);
  border-color: var(--accent-tertiary);
  color: var(--accent-tertiary);
  background: rgba(20, 184, 166, 0.1);
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 0;
}

.project-gallery.is-empty {
  display: none;
}

.project-img {
  width: 100%;
  height: 128px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  transition: var(--transition);
  cursor: pointer;
  background: rgba(0, 0, 0, 0.18);
}

.project-img.image-missing {
  display: none;
}

.project-img-hero {
  grid-column: 1 / -1;
  height: 265px;
  object-position: center;
}

.project-img:hover {
  transform: scale(1.03);
  border-color: var(--accent-primary);
  z-index: 10;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

@media (max-width: 1180px) {
  .project-card {
    grid-template-columns: 1fr;
  }

  .project-img-hero {
    height: 300px;
  }
}

@media (max-width: 640px) {
  .card.glass {
    padding: 1.4rem;
  }

  .tagline {
    font-size: 1rem;
    min-height: 4.35em;
  }

  .project-gallery {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }

  .project-img {
    height: 112px;
  }

  .project-img-hero {
    height: 210px;
  }

  .project-link-button {
    width: 100%;
  }

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

  .cert-topline {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Light Mode Specific Tweaks */
[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3 {
  color: var(--text-main);
}

[data-theme="light"] .card.glass {
  background: var(--bg-panel);
  box-shadow: var(--shadow);
  border-color: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .avatar-container {
  box-shadow: 0 10px 20px rgba(99, 102, 241, 0.2);
}

[data-theme="light"] .name {
  background: none !important;
  -webkit-text-fill-color: initial !important;
  color: #0f172a !important;
  /* Solid dark color, no clipping */
  text-shadow: none !important;
}

/* Force Light Mode Overrides (High Specificity) */
[data-theme="light"] body {
  color: #0f172a !important;
}

/* Stylish Skills for Light Mode */
[data-theme="light"] .skill-tag {
  color: #0f172a !important;
  background: #ffffff !important;
  /* White instead of grey */
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
  font-weight: 500;
}

[data-theme="light"] .section h2,
[data-theme="light"] .card h3 {
  color: #000000 !important;
}

[data-theme="light"] p {
  color: #334155 !important;
}

/* Light Mode Hover Fixes */
[data-theme="light"] .contact-link:hover {
  background: #ffffff !important;
  color: var(--accent-tertiary) !important;
  border-color: rgba(20, 184, 166, 0.3) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .skill-tag:hover {
  background: #ffffff !important;
  color: var(--accent-tertiary) !important;
  border-color: var(--accent-tertiary) !important;
  transform: translateY(-2px);
}

[data-theme="light"] .section-intro,
[data-theme="light"] .project-highlights li {
  color: #334155 !important;
}

[data-theme="light"] .project-kicker,
[data-theme="light"] .cert-provider {
  color: #0f766e;
}

[data-theme="light"] .project-year {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  color: #475569;
}

[data-theme="light"] .project-link-button {
  color: #1e293b;
  background: rgba(99, 102, 241, 0.08);
}

[data-theme="light"] .project-link-button:hover {
  color: #0f766e;
}

[data-theme="light"] .cert-card h3 {
  color: var(--accent-secondary) !important;
}

[data-theme="light"] .cert-more summary {
  color: var(--accent-primary);
}

/* Apple design refresh overrides */
:root,
[data-theme="light"] {
  color-scheme: light;
  --bg-dark: #f5f5f7;
  --bg-panel: rgba(255, 255, 255, 0.78);
  --surface-solid: #ffffff;
  --surface-muted: #ececf1;
  --text-main: #1d1d1f;
  --text-muted: #54545a;
  --text-soft: #73737a;
  --accent-primary: #006edb;
  --accent-secondary: #2f7d5c;
  --accent-tertiary: #7a6a45;
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(29, 29, 31, 0.1);
  --glass-lighting: rgba(255, 255, 255, 0.74);
  --shadow: 0 18px 55px rgba(22, 22, 26, 0.08);
  --shadow-soft: 0 8px 28px rgba(22, 22, 26, 0.07);
  --radius-lg: 8px;
  --radius-md: 8px;
  --radius-sm: 7px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --transition: transform 180ms var(--ease-out), opacity 180ms var(--ease-out), background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg-dark: #0f1014;
  --bg-panel: rgba(30, 31, 36, 0.74);
  --surface-solid: #1c1d22;
  --surface-muted: #25262c;
  --text-main: #f5f5f7;
  --text-muted: #b3b3ba;
  --text-soft: #8f8f98;
  --accent-primary: #5ac8fa;
  --accent-secondary: #30d158;
  --accent-tertiary: #ffd60a;
  --glass-bg: rgba(28, 29, 34, 0.7);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-lighting: rgba(255, 255, 255, 0.09);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 12px 34px rgba(0, 0, 0, 0.24);
}

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  font-optical-sizing: auto;
  background: var(--bg-dark);
  background-image: none;
  color: var(--text-main);
  letter-spacing: 0;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(245, 245, 247, 0) 38%),
    linear-gradient(135deg, rgba(0, 110, 219, 0.08), rgba(47, 125, 92, 0.05) 55%, rgba(122, 106, 69, 0.05));
}

[data-theme="dark"]::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(15, 16, 20, 0) 42%),
    linear-gradient(135deg, rgba(90, 200, 250, 0.08), rgba(48, 209, 88, 0.04) 60%, rgba(255, 214, 10, 0.03));
}

h1,
h2,
h3,
h4,
.name,
.tagline,
.cert-provider,
.project-kicker,
.timeline-header .date,
.tech-stack-preview h3,
.avatar-fallback,
.initials {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0;
}

h1,
h2,
h3,
h4,
.section h2,
.timeline-header .role,
.cert-card h3,
.project-card h3,
#modal-title,
#modal-desc h4,
.modal-detail-section h4,
[data-theme="light"] .section h2,
[data-theme="light"] .card h3,
[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3 {
  color: var(--text-main) !important;
}

p,
[data-theme="light"] p,
.community-list li,
.project-highlights li,
[data-theme="light"] .section-intro,
[data-theme="light"] .project-highlights li {
  color: var(--text-muted) !important;
}

.page-wrapper {
  width: calc(100% - clamp(1.5rem, 3vw, 3.5rem));
  max-width: 1640px;
  grid-template-columns: minmax(420px, 440px) minmax(0, 1fr);
  gap: clamp(1.25rem, 2.5vw, 2.5rem);
  padding: clamp(0.75rem, 1.6vw, 1.25rem);
}

.page-wrapper > * {
  min-width: 0;
}

.sidebar {
  align-self: start;
  min-height: calc(100vh - 4rem);
  height: auto;
  padding: clamp(0.9rem, 1.35vw, 1rem);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  overflow: visible;
  justify-content: flex-start;
}

.profile-header {
  gap: 1rem;
  margin-bottom: 1rem;
}

.profile-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.avatar-container {
  width: 104px;
  height: 104px;
  border-radius: var(--radius-lg);
  background: var(--surface-muted);
  box-shadow: 0 1px 0 var(--glass-lighting) inset, var(--shadow-soft);
}

.avatar-container img {
  transform: scale(1.42);
  transform-origin: 52% 38%;
}

.name,
[data-theme="light"] .name {
  max-width: none;
  font-size: clamp(2.15rem, 2.35vw, 2.45rem);
  line-height: 1.04;
  white-space: nowrap;
  background: none !important;
  -webkit-background-clip: initial;
  background-clip: initial;
  -webkit-text-fill-color: currentColor !important;
  color: var(--text-main) !important;
  text-shadow: none !important;
}

.tagline {
  min-height: 0;
  margin-top: 0.55rem;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  font-size: clamp(1.12rem, 1.4vw, 1.28rem);
  line-height: 1.42;
  font-weight: 600;
  color: var(--text-muted);
}

.section-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin: 0.65rem 0 0.65rem;
}

.section-nav a {
  min-height: 2.18rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.42);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  transition: var(--transition);
}

[data-theme="dark"] .section-nav a {
  background: rgba(255, 255, 255, 0.06);
}

.tech-stack-preview {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--glass-border);
}

.tech-stack-preview h3 {
  color: var(--text-soft);
  letter-spacing: 0;
}

.mini-tags span,
.project-year,
.timeline-header .date {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.5);
  color: var(--text-muted);
}

.sidebar-mid {
  display: grid;
  gap: 0.9rem;
  margin-top: 0;
}

.sidebar-mid .tech-stack-preview {
  margin-top: 0;
}

.sidebar-contact-card {
  padding-top: 1rem;
  border-top: 1px solid var(--glass-border);
}

.sidebar-contact-card h3 {
  margin-bottom: 0.6rem;
  color: var(--text-soft);
  font-size: 0.85rem;
  text-transform: uppercase;
}

.sidebar-contact-card .contact-nav {
  gap: 0.45rem;
}

.sidebar-contact-card .contact-link {
  min-height: 2.35rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.34);
  color: var(--text-muted);
  overflow: hidden;
}

[data-theme="dark"] .sidebar-contact-card .contact-link {
  background: rgba(255, 255, 255, 0.055);
}

.sidebar-contact-card .contact-link i {
  flex: 0 0 1rem;
  width: 1rem;
  height: 1rem;
  color: var(--accent-primary);
}

.sidebar-contact-card .contact-link span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.88rem;
}

[data-theme="dark"] .mini-tags span,
[data-theme="dark"] .project-year,
[data-theme="dark"] .timeline-header .date {
  background: rgba(255, 255, 255, 0.06);
}

.main-cta {
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

.sidebar-bottom {
  margin-top: auto;
  padding-top: 0.8rem;
  display: grid;
  gap: 0;
}

.sidebar-dock {
  padding-top: 0.8rem;
  border-top: 1px solid var(--glass-border);
}

.sidebar-dock .tech-stack-preview {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.sidebar-dock .main-cta {
  margin-top: 0;
}

.button.primary,
.button.secondary,
.project-link-button,
.contact-link.large,
.theme-toggle,
.burger-menu,
.modal-nav,
.close-modal,
.close-menu {
  transition: var(--transition);
}

.button.primary,
[data-theme="light"] .button.primary {
  min-height: 2.85rem;
  padding: 0.82rem 1rem;
  border: 1px solid rgba(0, 110, 219, 0.45);
  border-radius: var(--radius-sm);
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 10px 25px rgba(0, 110, 219, 0.18);
}

.button.secondary {
  min-height: 2.85rem;
  padding: 0.82rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.54);
  color: var(--text-main);
  box-shadow: none;
}

[data-theme="dark"] .button.secondary {
  background: rgba(255, 255, 255, 0.07);
}

.download-cv-button,
[data-theme="light"] .download-cv-button {
  border-color: rgba(0, 110, 219, 0.48);
  background: linear-gradient(180deg, #0a84ff, #006edb);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(0, 110, 219, 0.26);
}

.button.secondary.download-cv-button:hover,
.button.secondary.download-cv-button:focus-visible,
[data-theme="light"] .button.secondary.download-cv-button:hover,
[data-theme="light"] .button.secondary.download-cv-button:focus-visible {
  border-color: rgba(0, 110, 219, 0.62);
  background: linear-gradient(180deg, #2997ff, #0071e3);
  color: #ffffff;
  box-shadow: 0 14px 32px rgba(0, 110, 219, 0.32);
}

[data-theme="dark"] .download-cv-button {
  border-color: rgba(90, 200, 250, 0.55);
  background: linear-gradient(180deg, #64d2ff, #0a84ff);
  color: #06131f;
  box-shadow: 0 14px 34px rgba(90, 200, 250, 0.22);
}

[data-theme="dark"] .button.secondary.download-cv-button:hover,
[data-theme="dark"] .button.secondary.download-cv-button:focus-visible {
  border-color: rgba(100, 210, 255, 0.72);
  background: linear-gradient(180deg, #7ddcff, #2997ff);
  color: #06131f;
  box-shadow: 0 16px 36px rgba(90, 200, 250, 0.28);
}

.sidebar .button.secondary.download-cv-button,
[data-theme="light"] .sidebar .button.secondary.download-cv-button {
  border-color: rgba(0, 110, 219, 0.58) !important;
  background: linear-gradient(180deg, #0a84ff, #006edb) !important;
  color: #ffffff !important;
  box-shadow: 0 12px 28px rgba(0, 110, 219, 0.28) !important;
}

.sidebar .button.secondary.download-cv-button:hover,
.sidebar .button.secondary.download-cv-button:focus-visible,
[data-theme="light"] .sidebar .button.secondary.download-cv-button:hover,
[data-theme="light"] .sidebar .button.secondary.download-cv-button:focus-visible {
  border-color: rgba(0, 110, 219, 0.72) !important;
  background: linear-gradient(180deg, #2997ff, #0071e3) !important;
  color: #ffffff !important;
  box-shadow: 0 15px 34px rgba(0, 110, 219, 0.34) !important;
}

[data-theme="dark"] .sidebar .button.secondary.download-cv-button {
  border-color: rgba(90, 200, 250, 0.68) !important;
  background: linear-gradient(180deg, #64d2ff, #0a84ff) !important;
  color: #06131f !important;
  box-shadow: 0 14px 34px rgba(90, 200, 250, 0.26) !important;
}

[data-theme="dark"] .sidebar .button.secondary.download-cv-button:hover,
[data-theme="dark"] .sidebar .button.secondary.download-cv-button:focus-visible {
  border-color: rgba(100, 210, 255, 0.82) !important;
  background: linear-gradient(180deg, #7ddcff, #2997ff) !important;
  color: #06131f !important;
  box-shadow: 0 16px 36px rgba(90, 200, 250, 0.32) !important;
}

.button:active,
.project-link-button:active,
.contact-link.large:active,
.theme-toggle:active,
.burger-menu:active,
.close-modal:active,
.close-menu:active,
.section-header:active,
.project-img:active {
  transform: scale(0.97);
}

.modal-nav:active {
  transform: translateY(-50%) scale(0.97);
}

.content {
  gap: clamp(2rem, 4vw, 3rem);
  padding-top: 1rem;
  padding-right: clamp(0rem, 1.2vw, 1.25rem);
}

.section {
  scroll-margin-top: 1.5rem;
}

.section-header {
  min-height: 3.3rem;
  margin-bottom: 0.85rem;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  transition: var(--transition);
}

.section-icon {
  color: var(--accent-primary);
}

.section h2 {
  font-size: clamp(1.45rem, 2.2vw, 2.05rem);
  line-height: 1.12;
}

.section-content {
  transition: grid-template-rows 220ms var(--ease-out);
}

.chevron-icon {
  transition: transform 180ms var(--ease-out), color 180ms ease;
}

.card.glass,
[data-theme="light"] .card.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(22px) saturate(175%);
  -webkit-backdrop-filter: blur(22px) saturate(175%);
}

.card.glass::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: 0 1px 0 var(--glass-lighting) inset;
}

.card.glass:hover,
[data-theme="light"] .card.glass:hover {
  transform: none;
  background: var(--glass-bg);
  border-color: var(--glass-border);
  box-shadow: var(--shadow-soft);
}

.skills-grid,
.cert-grid {
  gap: 1rem;
}

.skill-category {
  padding: 1.05rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] .skill-category {
  background: rgba(255, 255, 255, 0.04);
}

.skill-category h3 {
  color: var(--text-main);
  font-size: 1rem;
}

.skill-tag,
[data-theme="light"] .skill-tag {
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border) !important;
  background: rgba(255, 255, 255, 0.55) !important;
  color: var(--text-muted) !important;
  box-shadow: none !important;
  font-weight: 600;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

[data-theme="dark"] .skill-tag {
  background: rgba(255, 255, 255, 0.07) !important;
  color: var(--text-muted) !important;
}

.skill-tag:hover,
[data-theme="light"] .skill-tag:hover {
  transform: none;
  border-color: rgba(0, 110, 219, 0.35) !important;
  color: var(--text-main) !important;
  box-shadow: none !important;
}

.section-intro,
.section-subtitle {
  max-width: 72ch;
}

.project-card {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.82fr);
  gap: clamp(1.25rem, 3vw, 2rem);
}

.featured-project,
.priority-cert {
  border-color: rgba(0, 110, 219, 0.22) !important;
}

.featured-project::before,
.priority-cert::before {
  background: linear-gradient(135deg, rgba(0, 110, 219, 0.08), rgba(47, 125, 92, 0.05), transparent 62%);
}

.project-kicker,
.cert-provider,
[data-theme="light"] .project-kicker,
[data-theme="light"] .cert-provider {
  color: var(--accent-secondary);
  letter-spacing: 0;
}

.cert-card h3,
[data-theme="light"] .cert-card h3 {
  color: var(--text-main) !important;
}

.project-link-button {
  min-height: 2.75rem;
  border-color: rgba(0, 110, 219, 0.32);
  border-radius: var(--radius-sm);
  background: rgba(0, 110, 219, 0.09);
  color: var(--accent-primary);
  font-weight: 700;
}

.project-gallery {
  gap: 0.7rem;
}

.project-img {
  height: 136px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: var(--surface-solid);
  box-shadow: 0 1px 0 var(--glass-lighting) inset;
  transition: transform 180ms var(--ease-out), border-color 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

[data-theme="dark"] .project-img {
  background: #16171b;
}

.project-img-hero {
  height: 280px;
}

.project-img:hover {
  transform: none;
  border-color: var(--glass-border);
  box-shadow: 0 1px 0 var(--glass-lighting) inset;
}

.timeline {
  gap: 1rem;
}

.timeline::before {
  width: 1px;
  background: rgba(0, 110, 219, 0.28);
}

.timeline-marker {
  width: 10px;
  height: 10px;
  background: var(--bg-dark);
  border-color: var(--accent-primary);
  transform: translateX(-4.5px);
}

.timeline-header .org,
[data-theme="light"] .project-link-button:hover,
[data-theme="light"] .contact-link:hover {
  color: var(--accent-secondary);
}

.timeline-header .date,
.cert-date {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0;
}

.community-list li::before,
.project-highlights li::before {
  background: var(--accent-primary);
}

.footer {
  border-top-color: var(--glass-border);
}

.footer p,
[data-theme="light"] .footer p {
  background: none;
  -webkit-text-fill-color: currentColor;
  color: var(--text-soft) !important;
  letter-spacing: 0;
}

.nav-controls {
  position: static;
  top: auto;
  right: auto;
  z-index: auto;
  display: flex;
  justify-content: flex-start;
  gap: 0.6rem;
  flex-shrink: 0;
}

.theme-toggle,
.burger-menu,
[data-theme="light"] .theme-toggle,
[data-theme="light"] .burger-menu {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
  color: var(--text-muted);
  border-color: var(--glass-border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
}

.contact-overlay,
.modal-overlay {
  background: rgba(245, 245, 247, 0.74);
  backdrop-filter: blur(28px) saturate(170%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  transition: opacity 220ms var(--ease-out);
}

[data-theme="dark"] .contact-overlay,
[data-theme="dark"] .modal-overlay {
  background: rgba(10, 10, 12, 0.76);
}

.overlay-content,
.modal-content {
  transition: transform 220ms var(--ease-out), opacity 220ms var(--ease-out);
}

.contact-overlay.active .overlay-content,
.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.overlay-content h2,
[data-theme="light"] .overlay-content h2 {
  margin-bottom: 1.5rem;
  background: none;
  -webkit-text-fill-color: currentColor;
  color: var(--text-main);
  letter-spacing: 0;
}

.contact-link.large,
[data-theme="light"] .contact-link.large {
  min-height: 3.6rem;
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  color: var(--text-main);
  border-color: var(--glass-border);
}

.close-menu,
.close-modal {
  color: var(--text-muted);
}

.close-modal {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  font-size: 1rem;
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
}

.close-modal:hover,
.close-menu:hover {
  color: var(--text-main);
  transform: none;
}

.modal-content {
  background: var(--glass-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

#modal-image {
  border-radius: var(--radius-sm);
  background: var(--surface-solid);
}

#modal-title {
  font-size: clamp(1.6rem, 4vw, 2.35rem);
}

.modal-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  background: rgba(84, 84, 90, 0.28);
  appearance: none;
  -webkit-appearance: none;
  transition: transform 180ms var(--ease-out), background-color 180ms ease;
}

.modal-dot.active {
  background: var(--accent-primary);
}

.fade-in-section {
  transform: translateY(8px);
  transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

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

.fade-in-up {
  animation: fadeUp 260ms var(--ease-out) forwards;
}

.button:focus-visible,
.project-link-button:focus-visible,
.section-nav a:focus-visible,
.contact-link:focus-visible,
.theme-toggle:focus-visible,
.burger-menu:focus-visible,
.close-menu:focus-visible,
.close-modal:focus-visible,
.modal-nav:focus-visible,
.section-header:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent-primary), transparent 40%);
  outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  .button.primary:hover,
  .button.secondary:hover,
  .project-link-button:hover,
  .section-nav a:hover,
  .contact-link.large:hover,
  .theme-toggle:hover,
  .burger-menu:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 110, 219, 0.32);
    box-shadow: var(--shadow-soft);
  }

  .project-img:hover {
    transform: scale(1.015);
    border-color: rgba(0, 110, 219, 0.32);
    box-shadow: var(--shadow-soft);
    z-index: 2;
  }

  .section-header:hover {
    background: rgba(255, 255, 255, 0.38);
    border-color: var(--glass-border);
  }

  [data-theme="dark"] .section-header:hover {
    background: rgba(255, 255, 255, 0.05);
  }
}

@media (prefers-reduced-transparency: reduce) {
  .sidebar,
  .card.glass,
  .contact-overlay,
  .modal-overlay,
  .theme-toggle,
  .burger-menu,
  .close-modal {
    background: var(--surface-solid) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

@media (prefers-contrast: more) {
  :root,
  [data-theme="light"],
  [data-theme="dark"] {
    --glass-border: currentColor;
  }

  .card.glass,
  .sidebar,
  .skill-tag,
  .button,
  .project-link-button,
  .theme-toggle,
  .burger-menu {
    border-width: 2px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 120ms !important;
  }

  .fade-in-section,
  .fade-in-up,
  .modal-content,
  .overlay-content,
  .project-img,
  .button,
  .section-header {
    opacity: 1 !important;
    transform: none !important;
  }
}

@media (min-width: 1025px) and (max-height: 780px) {
  .sidebar {
    min-height: calc(100vh - 4rem);
    padding: 0.85rem;
  }

  .profile-header {
    gap: 0.75rem;
    margin-bottom: 0.75rem;
  }

  .avatar-container {
    width: 88px;
    height: 88px;
  }

  .name,
  [data-theme="light"] .name {
    font-size: clamp(1.85rem, 2vw, 2.1rem);
  }

  .tagline {
    margin-top: 0.4rem;
    font-size: 1rem;
    line-height: 1.34;
  }

  .section-nav {
    gap: 0.35rem;
    margin: 0.5rem 0;
  }

  .section-nav a {
    min-height: 2rem;
    font-size: 0.82rem;
  }

  .tech-stack-preview,
  .sidebar-contact-card {
    padding-top: 0.75rem;
  }

  .tech-stack-preview h3,
  .sidebar-contact-card h3 {
    margin-bottom: 0.5rem;
  }

  .mini-tags {
    gap: 0.35rem;
  }

  .mini-tags span {
    padding: 0.35rem 0.55rem;
    font-size: 0.8rem;
  }

  .sidebar-contact-card .contact-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
  }

  .sidebar-contact-card .contact-link {
    min-height: 2.15rem;
    padding: 0.42rem 0.55rem;
    gap: 0.45rem;
  }

  .sidebar-contact-card .contact-link span {
    font-size: 0.78rem;
  }

  .sidebar-bottom,
  .sidebar-dock {
    padding-top: 0.65rem;
  }

  .button.secondary {
    min-height: 2.6rem;
    padding: 0.68rem 0.9rem;
  }
}

@media (max-width: 1180px) {
  .content {
    padding-right: 0;
  }

  .project-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .page-wrapper {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding-top: 1rem;
  }

  .sidebar {
    position: relative;
    top: 0;
    height: auto;
    overflow: visible;
  }

  .content {
    padding-right: 0;
    padding-top: 0;
  }

  .sidebar .main-cta {
    display: flex;
    margin-top: 1rem;
  }

  .sidebar-mid .tech-stack-preview {
    display: block;
  }

  .nav-controls {
    top: auto;
    right: auto;
  }
}

@media (max-width: 720px) {
  body {
    overflow-x: hidden;
  }

  .page-wrapper {
    width: min(100%, 430px);
    max-width: 430px;
    margin-inline: auto;
    padding-inline: clamp(0.85rem, 4vw, 1rem);
  }

  .nav-controls {
    right: auto;
  }

  .sidebar,
  .content,
  .section,
  .section-content,
  .section-content > div,
  .card.glass {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .sidebar,
  .card.glass {
    padding: 1rem;
  }

  .profile-header,
  .profile-info {
    align-items: center;
    text-align: center;
  }

  .profile-top-row {
    position: relative;
    width: 100%;
    justify-content: center;
    min-height: 104px;
  }

  .profile-top-row .nav-controls {
    position: absolute;
    top: 0.1rem;
    right: 0.1rem;
  }

  .name,
  .tagline,
  p,
  h1,
  h2,
  h3,
  .skill-tag,
  .button {
    overflow-wrap: anywhere;
  }

  .name,
  [data-theme="light"] .name {
    white-space: normal;
    font-size: clamp(2rem, 10vw, 2.7rem);
  }

  .section-nav {
    grid-template-columns: 1fr;
  }

  .main-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .project-gallery {
    grid-template-columns: 1fr;
  }

  .project-img,
  .project-img-hero {
    height: 220px;
  }

  .overlay-nav {
    align-items: stretch;
  }

  .contact-link.large {
    font-size: 1rem;
    padding: 1rem;
  }
}

.theme-toggle,
.theme-toggle:hover,
.theme-toggle:active,
.theme-toggle:focus,
.theme-toggle:focus-visible,
[data-theme="light"] .theme-toggle,
[data-theme="light"] .theme-toggle:hover,
[data-theme="light"] .theme-toggle:active,
[data-theme="dark"] .theme-toggle,
[data-theme="dark"] .theme-toggle:hover,
[data-theme="dark"] .theme-toggle:active {
  transform: none !important;
}

.theme-toggle {
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease !important;
}
