/* Apple-Inspired Design System for QA Engineer Portfolio */

:root {
  /* Apple Color Palette - Light Mode */
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f7;
  --bg-tertiary: #fafafa;
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #737373;
  --accent-blue: #0071e3;
  --accent-blue-hover: #0077ed;
  --border-light: #d2d2d7;
  --border-medium: #e5e5e7;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 40px;
  --spacing-xl: 64px;
  --spacing-2xl: 120px;
  --header-height: 72px;
  --transition-fast: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-base: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  /* Cursor position variables */
  --cursor-x: 50%;
  --cursor-y: 50%;
}

html[data-theme='light'] {
  color-scheme: light;
}

html[data-theme='dark'] {
  --bg-primary: #000000;
  --bg-secondary: #1d1d1f;
  --bg-tertiary: #2c2c2e;
  --text-primary: #f5f5f7;
  --text-secondary: #a1a1a6;
  --text-tertiary: #737373;
  --accent-blue: #0a84ff;
  --accent-blue-hover: #409cff;
  --border-light: #424245;
  --border-medium: #2c2c2e;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

/* System preference fallback - applies if no data-theme is set */
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    --bg-primary: #000000;
    --bg-secondary: #1d1d1f;
    --bg-tertiary: #2c2c2e;
    --text-primary: #f5f5f7;
    --text-secondary: #a1a1a6;
    --text-tertiary: #737373;
    --accent-blue: #0a84ff;
    --accent-blue-hover: #409cff;
    --border-light: #424245;
    --border-medium: #2c2c2e;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color-scheme: light dark;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Helvetica,
    Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: -0.022em;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition:
    background-color var(--transition-base),
    color var(--transition-base);
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle 400px at var(--cursor-x, 50%) var(--cursor-y, 50%),
    rgba(0, 113, 227, 0.3) 0%,
    rgba(0, 113, 227, 0.2) 20%,
    rgba(0, 113, 227, 0.12) 40%,
    rgba(0, 113, 227, 0.06) 60%,
    rgba(0, 113, 227, 0.02) 80%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
  will-change: background;
  opacity: 1;
}

html[data-theme='dark'] body::before {
  background: radial-gradient(
    circle 400px at var(--cursor-x, 50%) var(--cursor-y, 50%),
    rgba(10, 132, 255, 0.35) 0%,
    rgba(10, 132, 255, 0.25) 20%,
    rgba(10, 132, 255, 0.15) 40%,
    rgba(10, 132, 255, 0.1) 60%,
    rgba(10, 132, 255, 0.05) 80%,
    transparent 100%
  );
}

main {
  position: relative;
  z-index: 1;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

.container {
  width: min(1400px, 94%);
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

/* Skip Link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: -9999px;
  z-index: 10000;
}

.skip-link:focus {
  left: var(--spacing-md);
  top: var(--spacing-md);
  padding: var(--spacing-xs) var(--spacing-sm);
  background: var(--accent-blue);
  color: white;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

/* Header - Apple Style */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--border-light);
  transition:
    background-color var(--transition-base),
    border-color var(--transition-base);
}

html[data-theme='dark'] .site-header {
  background: rgba(0, 0, 0, 0.8);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--spacing-md);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.019em;
  transition: opacity var(--transition-fast);
}

.logo:hover {
  opacity: 0.8;
}

.logo-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent-blue), #5ac8fa);
  color: white;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.5px;
}

.logo-text {
  font-weight: 600;
}

/* Navigation */
.site-nav ul {
  list-style: none;
  display: flex;
  gap: var(--spacing-xs);
  padding: 0;
  margin: 0;
  align-items: center;
}

.site-nav a {
  position: relative;
  color: var(--text-secondary);
  text-decoration: none;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 400;
  transition:
    color var(--transition-fast),
    border-color var(--transition-fast);
}

.site-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 80%;
  height: 2px;
  background: var(--accent-blue);
  border-radius: 1px;
  transition: transform var(--transition-base);
}

.site-nav a:hover::after,
.site-nav a.is-active::after {
  transform: translateX(-50%) scaleX(1);
}

.site-nav a:hover {
  color: var(--accent-blue);
}

.site-nav a.is-active {
  color: var(--accent-blue);
  font-weight: 500;
}

/* Modern Dark Mode Toggle Switch */
/* Modern Dark Mode Toggle Switch */
.theme-toggle {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  background: var(--bg-secondary);
  cursor: pointer;
  transition: all var(--transition-base);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  overflow: hidden;
}

.theme-toggle:hover {
  border-color: var(--accent-blue);
  background: var(--bg-tertiary);
  transform: scale(1.05);
  color: var(--accent-blue);
}

.theme-toggle svg {
  position: absolute;
  transition:
    transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
    opacity 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.sun-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.moon-icon {
  opacity: 0;
  transform: rotate(90deg) scale(0);
}

html[data-theme='dark'] .sun-icon {
  opacity: 0;
  transform: rotate(-90deg) scale(0);
}

html[data-theme='dark'] .moon-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.theme-toggle::before {
  display: none;
  /* Remove the old toggle switch knob */
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-secondary);
  color: var(--text-primary);
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  transition: all var(--transition-fast);
  padding: 0;
  flex-shrink: 0;
}

.nav-toggle:hover {
  background: var(--bg-tertiary);
  border-color: var(--accent-blue);
  transform: scale(1.05);
  color: var(--accent-blue);
}

.nav-toggle-bar {
  width: 18px;
  height: 1.5px;
  background: currentColor;
  border-radius: 1px;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
  transform-origin: center;
}

.nav-toggle[aria-expanded='true'] .nav-toggle-bar:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}

.nav-toggle[aria-expanded='true'] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}

.nav-toggle[aria-expanded='true'] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

/* Hero Section - Two Column Layout */
.hero {
  padding: calc(var(--header-height) + var(--spacing-xl)) 0 var(--spacing-2xl);
  position: relative;
}

.hero-inner {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-card {
  /* Removed card styling for a more open, modern look */
  padding: var(--spacing-xl) 0;
  transition: transform var(--transition-base);
}

html[data-theme='dark'] .hero-card {
  background: transparent;
}

.hero-card:hover {
  /* Removed hover effects */
  transform: none;
  box-shadow: none;
  border-color: transparent;
}

.hero-content {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--spacing-2xl);
  align-items: center;
}

.hero-copy {
  text-align: left;
}

.hero-title {
  font-size: clamp(48px, 10vw, 80px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 var(--spacing-md) 0;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.011em;
  color: var(--text-secondary);
  margin: 0 0 var(--spacing-md) 0;
}

.timeline .role {
  font-size: 20px;
}

.hero-summary {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 60ch;
  margin: 0 0 var(--spacing-lg) 0;
}

.hero-cta {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: var(--spacing-lg);
}

.avatar {
  margin: 0 auto;
  width: 240px;
  height: 240px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
  background: var(--bg-secondary);
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base);
  flex-shrink: 0;
}

.avatar:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Buttons - Apple Style */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 18px;
  border-radius: 980px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition:
    background-color var(--transition-fast),
    transform var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
  border: 1px solid transparent;
  cursor: pointer;
  letter-spacing: -0.022em;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(0, 113, 227, 0.2);
  transform: translate(-50%, -50%);
  transition:
    width 0.6s,
    height 0.6s;
}

html[data-theme='dark'] .btn::after {
  background: rgba(10, 132, 255, 0.25);
}

.btn:active::after {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: var(--accent-blue);
  color: white;
  border: 1px solid var(--accent-blue);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--accent-blue-hover);
  border-color: var(--accent-blue-hover);
  transform: scale(1.05) translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: var(--bg-primary);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  transform: scale(1.05) translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

.btn-secondary:active {
  transform: translateY(0);
}

/* Sections */
.section {
  padding: var(--spacing-2xl) 0;
  scroll-margin-top: var(--header-height);
}

/* Section fade-in animation (only if JavaScript adds the class) */
.section:not(.visible) {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out;
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* If reduced motion, show sections immediately */
@media (prefers-reduced-motion: reduce) {
  .section:not(.visible) {
    opacity: 1;
    transform: translateY(0);
  }
}

.section:not(:first-of-type) {
  margin-top: 0;
}

.section h2 {
  position: relative;
  display: inline-block;
  font-size: clamp(40px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 var(--spacing-xl) 0;
  padding-bottom: var(--spacing-sm);
  color: var(--text-primary);
  text-align: center;
}

.section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
  border-radius: 2px;
}

.section-content {
  max-width: 100%;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 1;
}

/* About Section */
/* About Section */
.about-card {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base);
}

html[data-theme='dark'] .about-card {
  background: rgba(28, 28, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.about-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(0, 0, 0, 0.1);
}

html[data-theme='dark'] .about-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

#about-body {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-secondary);
  text-align: left;
  max-width: 85ch;
  margin: 0;
}

#about-body p {
  margin: 0;
}

/* Timeline - Experience */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
}

@media (min-width: 1024px) {
  .timeline {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
  }
}

.timeline-item {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base);
  display: flex;
  flex-direction: column;
  height: 100%;
}

html[data-theme='dark'] .timeline-item {
  background: rgba(28, 28, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.timeline-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.timeline-meta {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
  flex-wrap: wrap;
}

.company-logo {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  padding: 0;
  flex-shrink: 0;
  object-fit: contain;
  mix-blend-mode: multiply;
}

html[data-theme='dark'] .company-logo {
  mix-blend-mode: normal;
  opacity: 0.9;
}

.timeline-meta-content {
  flex: 1;
  min-width: 200px;
}

.timeline .role {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
  display: block;
  margin-bottom: 4px;
}

.timeline .company {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 4px;
}

.timeline .period {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-tertiary);
  display: block;
}

.highlights {
  list-style: none;
  padding: 0;
  margin: var(--spacing-md) 0 0 0;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.highlights li {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-secondary);
  padding-left: var(--spacing-md);
  position: relative;
}

.highlights li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent-blue);
  font-weight: 600;
}

.highlights-text {
  margin: var(--spacing-md) 0 0 0;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.highlights-text p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-lg);
}

.project-card {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
}

html[data-theme='dark'] .project-card {
  background: rgba(28, 28, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(0, 0, 0, 0.1);
}

html[data-theme='dark'] .project-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.project-card h3 {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 var(--spacing-sm) 0;
  color: var(--text-primary);
}

.project-card p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0 0 var(--spacing-md) 0;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
  list-style: none;
  padding: 0;
  margin: var(--spacing-md) 0 0 0;
}

.tags li {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 16px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  border: 0.5px solid var(--border-light);
  transition:
    background-color var(--transition-fast),
    transform var(--transition-fast),
    border-color var(--transition-fast);
  cursor: default;
}

.tags li:hover {
  background: var(--bg-primary);
  transform: scale(1.05) translateY(-1px);
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-sm);
}

.project-card .links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
}

.project-card .links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  flex: 0 1 auto;
  min-width: 0;
  transition:
    background-color var(--transition-fast),
    transform var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
  border: 1px solid var(--border-light);
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.project-card .links a svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.project-card .links a .link-text {
  line-height: 1;
}

.project-card .links a:first-child {
  background: var(--accent-blue);
  color: white;
  border-color: var(--accent-blue);
}

.project-card .links a:first-child:hover,
.project-card .links a:first-child:focus-visible {
  background: var(--accent-blue-hover);
  border-color: var(--accent-blue-hover);
  transform: scale(1.05) translateY(-1px);
  box-shadow: var(--shadow-md);
}

.project-card .links a:first-child:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

.project-card .links a:not(:first-child):hover,
.project-card .links a:not(:first-child):focus-visible {
  background: var(--bg-primary);
  border-color: var(--accent-blue);
  transform: scale(1.05) translateY(-1px);
  box-shadow: var(--shadow-md);
}

.project-card .links a:not(:first-child):focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* Skills - Categorized */
.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-lg);
}

.skill-category {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base);
}

html[data-theme='dark'] .skill-category {
  background: rgba(28, 28, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.skill-category:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(0, 0, 0, 0.1);
}

html[data-theme='dark'] .skill-category:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.skill-category h3 {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 var(--spacing-md) 0;
  color: var(--text-primary);
}

.skills {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
}

.skills li {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 13px;
  padding: 10px 16px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  border: 0.5px solid var(--border-light);
  font-weight: 500;
  transition:
    background-color var(--transition-fast),
    transform var(--transition-fast),
    border-color var(--transition-fast);
}

.skills li:hover {
  background: var(--bg-primary);
  transform: scale(1.05) translateY(-1px);
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-sm);
}

/* Education */
.edu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.edu li {
  background: rgba(245, 245, 247, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  border: 0.5px solid var(--border-light);
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base),
    border-color var(--transition-base);
}

html[data-theme='dark'] .edu li {
  background: rgba(29, 29, 31, 0.8);
}

.edu li:hover {
  transform: translateY(-4px) scale(1.005);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-blue);
}

.edu .degree {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
  display: block;
  margin-bottom: var(--spacing-xs);
}

.edu .school {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
  display: block;
  margin-bottom: var(--spacing-xs);
}

.edu .period {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-tertiary);
  display: block;
}

/* Contact Section */
.contact-card {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base);
}

html[data-theme='dark'] .contact-card {
  background: rgba(28, 28, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(0, 0, 0, 0.1);
}

html[data-theme='dark'] .contact-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.social-intro {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  text-align: left;
  margin: 0 0 var(--spacing-md) 0;
  font-weight: 500;
}

.social {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  gap: var(--spacing-xs);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  text-decoration: none;
  border: 0.5px solid var(--border-light);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.social a:hover,
.social a:focus-visible {
  background: var(--bg-primary);
  transform: translateY(-2px);
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-md);
  color: var(--accent-blue);
}

.social a:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

.social-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.social-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
  transition: transform var(--transition-fast);
}

.social a:hover .social-icon svg {
  transform: scale(1.1);
}

.social-label {
  line-height: 1;
}

/* Footer */
.site-footer {
  padding: var(--spacing-xl) 0;
  border-top: 0.5px solid var(--border-light);
  background: var(--bg-secondary);
  margin-top: var(--spacing-2xl);
}

.site-footer p {
  text-align: center;
  font-size: 15px;
  color: var(--text-tertiary);
  margin: 0;
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Enhanced Focus Indicators */
*:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.btn:focus-visible {
  outline-offset: 4px;
}

.theme-toggle:focus-visible {
  outline-offset: 3px;
}

.site-nav a:focus-visible {
  outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 900px) {
  .project-card .links a {
    padding: 10px 14px;
    font-size: 14px;
  }
}

@media (max-width: 900px) {
  .container {
    padding: 0 var(--spacing-md);
  }

  .theme-toggle {
    width: 40px;
    height: 40px;
  }

  .header-inner {
    gap: var(--spacing-xs);
  }

  /* Ensure nav-toggle appears on the right with theme-toggle */
  .header-inner .nav-toggle {
    margin-left: auto;
  }

  /* Add small gap between nav-toggle and theme-toggle (site-nav is hidden in mobile) */
  .header-inner .theme-toggle {
    margin-left: var(--spacing-xs);
  }

  .site-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 0.5px solid var(--border-light);
    padding: var(--spacing-md);
    display: none;
    box-shadow: var(--shadow-md);
    transform: translateY(-100%);
    transition:
      transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
      opacity 0.3s ease;
    opacity: 0;
  }

  .site-nav.open {
    display: block;
    transform: translateY(0);
    opacity: 1;
  }

  .site-nav ul {
    flex-direction: column;
    gap: var(--spacing-xs);
  }

  .site-nav a {
    display: block;
    padding: var(--spacing-sm);
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding: calc(var(--header-height) + var(--spacing-lg)) 0 var(--spacing-xl);
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    text-align: center;
  }

  .hero-card {
    padding: var(--spacing-lg);
  }

  .hero-copy {
    text-align: center;
  }

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

  .avatar {
    width: 180px;
    height: 180px;
  }

  .section {
    padding: var(--spacing-lg) 0;
  }

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

  .skills-container {
    grid-template-columns: 1fr;
  }

  .timeline-meta {
    flex-direction: column;
  }

  .company-logo {
    width: 64px;
    height: 64px;
    padding: 0;
  }

  .avatar {
    width: 180px;
    height: 180px;
    margin: 0 auto;
  }

  .contact-card {
    padding: var(--spacing-lg);
  }

  .project-card .links {
    flex-wrap: wrap;
    gap: var(--spacing-xs);
  }

  .project-card .links a {
    padding: 8px 14px;
    font-size: 14px;
    min-height: 36px;
  }

  .project-card .links a svg {
    width: 14px;
    height: 14px;
  }

  .social a {
    min-height: 40px;
    padding: 10px 16px;
    font-size: 13px;
  }

  .scroll-to-top {
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    right: max(20px, env(safe-area-inset-right, 20px));
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
}

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-blue);
  color: white;
  border: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-base);
  z-index: 999;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  background: var(--accent-blue-hover);
}

.scroll-to-top:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 3px;
}

/* Loading States & Skeleton Screens */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-secondary) 0%,
    var(--bg-tertiary) 50%,
    var(--bg-secondary) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

html[data-theme='dark'] .skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-secondary) 0%,
    var(--bg-tertiary) 50%,
    var(--bg-secondary) 100%
  );
  background-size: 200% 100%;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.skeleton-text {
  height: 1em;
  margin-bottom: 0.5em;
}

.skeleton-text:last-child {
  margin-bottom: 0;
}

.skeleton-title {
  height: 2em;
  width: 60%;
  margin: 0 auto var(--spacing-md);
}

.skeleton-avatar {
  width: 240px;
  height: 240px;
  border-radius: var(--radius-xl);
  margin: 0 auto;
}

.skeleton-card {
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

html[data-theme='dark'] .skeleton-card {
  background: rgba(28, 28, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.skeleton-pill {
  height: 40px;
  width: 100px;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin: var(--spacing-xs);
}

.skeleton-button {
  height: 40px;
  width: 150px;
  border-radius: var(--radius-sm);
}

.loading-container {
  display: block;
}

.loading-container.hidden {
  display: none;
}

/* Certifications */
.credential-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--spacing-sm);
  color: var(--accent-blue);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition:
    opacity var(--transition-fast),
    transform var(--transition-fast);
}

.credential-link:hover {
  opacity: 0.8;
  transform: translateX(2px);
}

.credential-link svg {
  width: 14px;
  height: 14px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .section {
    transition: none !important;
  }

  .scroll-to-top {
    transition:
      opacity 0.01ms,
      visibility 0.01ms !important;
  }

  .skeleton {
    animation: none;
  }
}

/* Design Tokens */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f7;
  --bg-tertiary: #fafafa;
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #737373;
  --accent-blue: #0071e3;
  --accent-blue-hover: #0077ed;
  --border-light: #d2d2d7;
  --border-medium: #e5e5e7;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 34px 92px rgba(0, 0, 0, 0.1);
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 40px;
  --spacing-xl: 64px;
  --spacing-2xl: 96px;
  --header-height: 64px;
  --transition-fast: 0.18s ease;
  --transition-base: 0.28s ease;
}

html[data-theme='dark'] {
  --bg-primary: #000000;
  --bg-secondary: #1d1d1f;
  --bg-tertiary: #2c2c2e;
  --text-primary: #f5f5f7;
  --text-secondary: #a1a1a6;
  --text-tertiary: #737373;
  --accent-blue: #0a84ff;
  --accent-blue-hover: #409cff;
  --border-light: #424245;
  --border-medium: #2c2c2e;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.55);
}

body {
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'SF Pro Display',
    'SF Pro Text',
    'Segoe UI',
    Roboto,
    sans-serif;
  line-height: 1.6;
  letter-spacing: 0;
  background: var(--bg-primary);
}

body::before {
  display: none;
}

.container {
  width: 100%;
  max-width: 1180px;
  padding: 0 28px;
}

.site-header {
  position: sticky;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.7);
  border-bottom: 1px solid var(--border-light);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
}

html[data-theme='dark'] .site-header {
  background: rgba(0, 0, 0, 0.72);
}

.header-inner {
  gap: 32px;
}

.logo {
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.logo-mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  font-size: 12px;
  letter-spacing: 0;
  background: linear-gradient(135deg, var(--accent-blue), var(--text-secondary));
}

.site-nav {
  margin-left: auto;
}

.site-nav ul {
  gap: 6px;
}

.site-nav a {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  letter-spacing: 0;
}

.site-nav a::after {
  display: none;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--text-primary);
  background: var(--bg-secondary);
  font-weight: 500;
}

.theme-toggle,
.nav-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border-light);
}

.theme-toggle:hover,
.nav-toggle:hover {
  transform: none;
  background: var(--bg-secondary);
}

.hero {
  padding: 96px 0 72px;
}

.hero-card {
  padding: 0;
}

.hero-content {
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(48px, 9vw, 120px);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  padding: 6px 12px;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-family: ui-monospace, 'SF Mono', 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-blue);
}

.hero-title {
  max-width: 18ch;
  margin-bottom: 22px;
  font-size: clamp(44px, 6.6vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.025em;
}

.hero-subtitle {
  margin-bottom: 10px;
  color: var(--text-primary);
  font-size: clamp(21px, 3vw, 28px);
  font-weight: 600;
  letter-spacing: -0.015em;
}

.hero-summary {
  max-width: 56ch;
  margin-bottom: 36px;
  color: var(--text-secondary);
  font-size: 19px;
  line-height: 1.55;
}

.hero-cta {
  gap: 12px;
  margin-top: 0;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 44px;
  color: var(--text-secondary);
  font-size: 13px;
}

.hero-meta strong {
  color: var(--text-primary);
  font-weight: 600;
}

.avatar {
  width: min(300px, 100%);
  height: auto;
  aspect-ratio: 1;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  background: var(--bg-secondary);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.06),
    0 12px 30px rgba(0, 0, 0, 0.04);
}

.avatar:hover,
.about-card:hover,
.timeline-item:hover,
.project-card:hover,
.skill-category:hover,
.edu li:hover,
.contact-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn,
.project-card .links a,
.social a {
  min-height: 42px;
  border-radius: 10px;
  padding: 11px 18px;
  font-size: 14.5px;
  letter-spacing: 0;
}

.btn::after {
  display: none;
}

.btn-primary:hover,
.btn-primary:focus-visible,
.btn-secondary:hover,
.btn-secondary:focus-visible,
.project-card .links a:first-child:hover,
.project-card .links a:not(:first-child):hover,
.social a:hover,
.social a:focus-visible {
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-light);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: var(--bg-secondary);
  border-color: var(--border-light);
  color: var(--text-primary);
}

.section {
  padding: 96px 0;
  scroll-margin-top: calc(var(--header-height) + 20px);
}

.section h2 {
  display: block;
  max-width: 22ch;
  margin: 0 0 48px;
  padding-bottom: 0;
  text-align: left;
  font-size: clamp(32px, 4.2vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.section h2::before {
  content: 'Portfolio';
  display: block;
  margin-bottom: 12px;
  color: var(--accent-blue);
  font-family: ui-monospace, 'SF Mono', 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

#experience-title::before {
  content: 'Career';
}

#projects-title::before {
  content: 'Selected work';
}

#skills-title::before {
  content: 'Toolkit';
}

#education-title::before,
#certifications-title::before {
  content: 'Credentials';
}

#contact h2::before {
  content: 'Next step';
}

.section h2::after {
  display: none;
}

.about-card,
.timeline-item,
.project-card,
.skill-category,
.edu li,
.contact-card,
.skeleton-card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html[data-theme='dark'] .about-card,
html[data-theme='dark'] .timeline-item,
html[data-theme='dark'] .project-card,
html[data-theme='dark'] .skill-category,
html[data-theme='dark'] .edu li,
html[data-theme='dark'] .contact-card,
html[data-theme='dark'] .skeleton-card {
  background: var(--bg-secondary);
  border-color: var(--border-light);
}

.about-card,
.timeline-item,
.project-card,
.skill-category,
.edu li,
.contact-card {
  padding: 26px;
}

#about-body,
.highlights li,
.project-card p {
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.55;
}

.timeline,
.projects-grid,
.skills-container {
  gap: 18px;
  margin-top: 0;
}

@media (min-width: 1024px) {
  .timeline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.timeline-meta {
  gap: 14px;
  margin-bottom: 18px;
}

.company-logo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
}

.timeline-meta-content {
  min-width: 0;
}

.timeline .role,
.project-card h3,
.skill-category h3,
.edu .degree {
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.timeline .company,
.edu .school {
  color: var(--text-secondary);
  font-size: 14.5px;
}

.timeline .period,
.edu .period {
  color: var(--text-tertiary);
  font-size: 13px;
}

.highlights {
  gap: 10px;
  margin-top: 16px;
}

.highlights li {
  padding-left: 18px;
}

.projects-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card {
  min-height: 100%;
}

.project-card p {
  flex: 1;
}

.tags,
.skills {
  gap: 8px;
}

.tags li,
.skills li,
.badge {
  min-height: 0;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  background: var(--bg-primary);
  color: var(--text-secondary);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
}

.tags li:hover,
.skills li:hover {
  transform: none;
  box-shadow: none;
  background: var(--bg-primary);
  border-color: color-mix(in srgb, var(--accent-blue) 30%, var(--border-light));
  color: var(--accent-blue);
}

.project-card .links {
  gap: 10px;
  margin-top: 24px;
}

.project-card .links a {
  background: var(--bg-primary);
}

.project-card .links a:first-child {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
}

.skills-container {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.edu {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
}

.social {
  justify-content: flex-start;
}

.social-section {
  width: 100%;
}

.social a {
  background: var(--bg-primary);
}

.scroll-to-top {
  border-radius: 50%;
}

.site-footer {
  margin-top: 0;
  padding: 36px 0 56px;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-light);
}

.site-footer p {
  text-align: left;
  font-size: 13.5px;
}

@media (max-width: 1024px) {
  .projects-grid,
  .skills-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-content {
    grid-template-columns: minmax(0, 1fr) 240px;
  }
}

@media (max-width: 900px) {
  .container {
    padding: 0 20px;
  }

  .header-inner {
    gap: 8px;
  }

  .logo-text {
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .site-nav {
    top: var(--header-height);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
  }

  html[data-theme='dark'] .site-nav {
    background: rgba(0, 0, 0, 0.94);
  }

  .site-nav.open {
    display: block;
  }

  .site-nav ul {
    align-items: stretch;
  }

  .hero {
    padding: 56px 0 48px;
  }

  .hero-card {
    padding: 0;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 36px;
    text-align: left;
  }

  .hero-copy {
    text-align: left;
  }

  .hero-title {
    font-size: clamp(42px, 13vw, 58px);
  }

  .hero-subtitle {
    font-size: 21px;
  }

  .hero-summary {
    font-size: 17px;
  }

  .hero-cta {
    justify-content: flex-start;
  }

  .hero-meta {
    gap: 14px 22px;
  }

  .avatar {
    width: min(240px, 76vw);
    margin: 0;
  }

  .section {
    padding: 72px 0;
  }

  .section h2 {
    margin-bottom: 32px;
  }

  .projects-grid,
  .skills-container,
  .timeline,
  .edu {
    grid-template-columns: 1fr;
  }

  .about-card,
  .timeline-item,
  .project-card,
  .skill-category,
  .edu li,
  .contact-card {
    padding: 22px;
  }

  .timeline-meta {
    flex-direction: row;
  }
}

@media (max-width: 430px) {
  .container {
    padding: 0 18px;
  }

  .hero-title {
    font-size: 42px;
  }

  .hero-cta,
  .project-card .links {
    flex-direction: column;
    align-items: stretch;
  }

  .btn,
  .project-card .links a {
    width: 100%;
  }

  .hero-meta {
    flex-direction: column;
    gap: 8px;
  }
}
