/* ---------- Design tokens ---------- */
:root {
  --bg: #f9f9fb;
  --card-bg: #ffffff;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --radius: 12px;
  --shadow: 0 12px 32px rgba(31, 41, 55, .06);
  --border: rgba(0, 0, 0, .08);
  --transition: .35s cubic-bezier(.4, .2, .2, 1);
}

.dark {
  --bg: #1f2430;
  --card-bg: #2a2f44;
  --surface: #2a2f44;
  --text: #f0f5ff;
  --muted: #9aa3b0;
  --accent: #7c9cff;
  --accent-hover: #5a8cff;
  --border: rgba(255, 255, 255, .08);
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color .25s;
}

a:hover {
  color: var(--accent-hover);
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--surface);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 5px 18px rgba(0, 0, 0, .04);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}

/* Logo container */
.logo {
  display: inline-block;
  flex: 0 0 auto;
  line-height: 0;
}

/* Base sizing (can be earlier in the file) */
.logo {
  display: inline-block;
  flex: 0 0 auto;
  line-height: 0;
}

.logo img {
  height: 40px;
  width: auto;
  display: block;
}

@media (max-width:768px) {
  .logo img {
    height: 32px;
  }
}

/* --- Theme swap (PUT THESE AT THE END OF YOUR CSS) --- */
html:not(.dark) .logo .logo-light {
  display: block;
}

/* light mode shows dark graphic */
html:not(.dark) .logo .logo-dark {
  display: none;
}

html.dark .logo .logo-light {
  display: none;
}

html.dark .logo .logo-dark {
  display: block;
}




/* center the nav between logo (left) and right cluster */
.nav {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  justify-content: center;
}

.nav a {
  font-weight: 500;
  padding: 6px 4px;
  position: relative;
  color: var(--text);
  transition: color .25s;
}

.nav a.active,
.nav a:hover {
  color: var(--accent);
}

.nav a.active::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

/* Right side cluster: language + status pill */
.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Status pill (site-meta) */
.site-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .85rem;
  color: var(--muted);
  background: var(--surface);
  white-space: nowrap;
}

.site-meta .dot {
  opacity: .5;
}

/* ---------- Hamburger ---------- */
.hamburger {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger .bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 4px 0;
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}

.hamburger.active .bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.hamburger.active .bar:nth-child(2) {
  opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---------- Theme toggle ---------- */
.theme-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--surface);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: grid;
  place-content: center;
  box-shadow: 0 14px 40px rgba(31, 41, 55, .08);
  cursor: pointer;
  font-size: 1.2rem;
  z-index: 60;
  transition: transform .3s;
}

.theme-toggle:hover {
  transform: scale(1.05);
}

/* ---------- Hero ---------- */
.hero {
  padding: 100px 0 60px;
}

.hero .container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 48px;
  align-items: center;
}

.title {
  font-size: 2.6rem;
  line-height: 1.1;
  margin: 0 0 16px;
}

.subtitle {
  margin: 0 0 20px;
  font-size: 1.05rem;
  color: var(--muted);
}

.hero-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.4;
}

.hero-bullets li+li {
  margin-top: 4px;
}

.actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
}

.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 16px 36px rgba(59, 130, 246, .24);
}

.primary:hover {
  filter: brightness(1.05);
  transform: translateY(-2px);
}

.outline {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
}

.outline:hover {
  background: rgba(59, 130, 246, .05);
}

.btn.large {
  padding: 16px 30px;
  font-size: 1rem;
  border-radius: 10px;
  box-shadow: 0 24px 68px rgba(59, 130, 246, .3);
}

/* ---------- Sections ---------- */
.section {
  padding: 30px 0;
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 6px;
}

.section .small {
  margin: 4px 0 20px;
  font-size: .95rem;
  color: var(--muted);
}

/* ---------- About ---------- */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  align-items: start;
}

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.skill-pills span {
  background: rgba(59, 130, 246, .1);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 500;
}

/* ---------- Visual gallery (index quick cards) ---------- */
.visual-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.visual-card {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  text-align: center;
  padding: 12px;
  box-shadow: 0 18px 48px rgba(31, 41, 55, .06);
  transition: transform var(--transition), box-shadow var(--transition);
}

.visual-card .thumb {
  border-radius: 8px;
  overflow: hidden;
}

.visual-card img {
  width: 100%;
  display: block;
  transition: transform .3s;
}

.visual-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 64px rgba(31, 41, 55, .12);
}

.visual-card:hover img {
  transform: scale(1.05);
}

.visual-card .label {
  margin-top: 8px;
  font-weight: 600;
  font-size: .9rem;
}

/* ---------- Filters ---------- */
.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.filter-btn {
  padding: 8px 16px;
  border: 1px solid var(--accent);
  background: transparent;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: background .25s, color .25s;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ---------- Project grid ---------- */
.project-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  margin-top: 8px;
}

.project-card {
  background: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(31, 41, 55, .08);
  transition: transform .35s, box-shadow .35s;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 32px 90px rgba(31, 41, 55, .14);
}

.project-card .thumb img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  transition: transform .3s;
}

.project-card:hover .thumb img {
  transform: scale(1.03);
}

.project-card .content {
  padding: 22px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

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

.badge {
  background: rgba(59, 130, 246, .1);
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: .65rem;
  font-weight: 600;
  text-transform: uppercase;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.tags span {
  background: rgba(99, 179, 255, .15);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: .65rem;
  font-weight: 600;
}

.project-card h3 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.1;
}

.project-card p {
  margin: 0;
  color: var(--muted);
  flex: 1;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 18px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 600;
  transition: filter .2s, transform .2s;
}

.link-btn .arrow {
  transition: transform .2s;
}

.link-btn:hover {
  filter: brightness(1.05);
}

.link-btn:hover .arrow {
  transform: translateX(3px);
}

/* ---------- Contact card ---------- */
.contact-wrapper {
  max-width: 900px;
  margin: 60px auto 100px;
  padding: 0 18px;
}

.card-contact {
  background: var(--surface);
  border-radius: 14px;
  padding: 40px 36px;
  box-shadow: 0 28px 68px rgba(31, 41, 55, .08);
}

.card-contact h1 {
  font-size: 2.2rem;
  margin: 0 0 8px;
}

.card-contact p.lead {
  margin: 6px 0 24px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.4;
}

.form-group {
  position: relative;
  margin-bottom: 22px;
}

.form-input {
  width: 100%;
  padding: 16px 14px 14px;
  border: 1px solid #d9dce2;
  border-radius: 8px;
  font-size: 1rem;
  background: var(--surface);
  color: var(--text);
  resize: vertical;
  transition: border .25s, box-shadow .25s;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, .18);
  outline: none;
}

.form-label {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  background: var(--surface);
  padding: 0 6px;
  color: var(--muted);
  font-size: .9rem;
  pointer-events: none;
  transition: all .25s;
}

.form-input:not(:placeholder-shown)+.form-label,
.form-input:focus+.form-label {
  top: -6px;
  font-size: .65rem;
  color: var(--accent);
  transform: none;
}

textarea.form-input {
  min-height: 140px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #fff;
  border: none;
  padding: 14px 26px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  gap: 6px;
  transition: transform .2s, filter .2s;
}

.btn-primary:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.status {
  margin-top: 14px;
  font-size: .9rem;
  min-height: 1.2em;
}

.status.success {
  color: #10b981;
}

.status.error {
  color: #f87171;
}

.extra-info {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-size: .9rem;
}

.info-block {
  flex: 1 1 200px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.socials {
  display: flex;
  gap: 18px;
  margin-top: 14px;
}

.socials a {
  position: relative;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  padding-bottom: 4px;
  transition: color .2s;
}

.socials a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width .3s;
}

.socials a:hover {
  color: var(--accent);
}

.socials a:hover::after {
  width: 100%;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 40px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: .85rem;
}

/* ---------- Reveal utility ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .8s, transform .8s;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ---------- Language switcher ---------- */
/* ---------- Language switcher (anchor version) ---------- */
.lang-switcher {
  display: flex;
  gap: 8px;
}

.lang-switcher .lang-btn {
  /* reset link look */
  text-decoration: none;
  color: var(--accent);

  /* pill button look */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 16px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  font-weight: 600;
  font-size: .8rem;
  background: transparent;
  transition:
    background .25s ease,
    color .25s ease,
    border-color .25s ease,
    box-shadow .25s ease,
    transform .15s ease;
}

.lang-switcher .lang-btn:hover {
  background: rgba(59, 130, 246, .08);
  box-shadow: 0 2px 8px rgba(59, 130, 246, .15);
  transform: translateY(-1px);
}

.lang-switcher .lang-btn:active {
  transform: scale(.96);
}

/* active state */
.lang-switcher .lang-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(59, 130, 246, .30);
}

/* focus ring for keyboard users */
.lang-switcher .lang-btn:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .35);
}

/* dark mode subtle tweak (so hover tint isn't too bright) */
.dark .lang-switcher .lang-btn:not(.active):hover {
  background: rgba(124, 156, 255, .15);
  box-shadow: 0 2px 8px rgba(124, 156, 255, .22);
}


/* ---------- Resume layout ---------- */
.resume-wrapper {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  align-items: flex-start;
  margin-bottom: 60px;
}

.resume-sidebar {
  background: var(--surface);
  padding: 28px 24px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.resume-main {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.profile-summary h1 {
  font-size: 1.9rem;
  margin-bottom: 6px;
}

.profile-summary .title {
  font-weight: 600;
  margin: 6px 0 12px;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section-block h2 {
  font-size: 1.8rem;
  margin: 0 0 10px;
}

.section-block h3 {
  font-size: 1.15rem;
  margin: 0 0 10px;
}

.section-block p {
  margin: 6px 0 0;
  font-size: .95rem;
  line-height: 1.45;
}

.skill-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.timeline-item {
  display: flex;
  gap: 20px;
  margin-bottom: 28px;
}

.timeline-meta {
  flex: 0 0 220px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timeline-meta .role,
.timeline-meta .degree {
  font-weight: 600;
  font-size: 1rem;
}

.timeline-meta .company,
.timeline-meta .school {
  font-size: .9rem;
  color: var(--muted);
}

.timeline-meta .period {
  font-size: .7rem;
  background: rgba(0, 0, 0, .04);
  padding: 4px 10px;
  border-radius: 8px;
  margin-top: 6px;
}

.timeline-content ul {
  padding-left: 18px;
  margin: 0;
}

.timeline-content li {
  margin-bottom: 10px;
  font-size: .95rem;
  line-height: 1.4;
}

/* ---------- Resume: Key Projects (links below text) ---------- */
.key-projects {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.key-projects li {
  margin: 0 0 18px;
}

.kp-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kp-text {
  font-size: .95rem;
  line-height: 1.5;
  color: var(--text);
}

.kp-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: 4px;
}

.btn-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .85rem;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: transform .2s ease, filter .2s ease, border-color .2s ease, color .2s ease;
  text-decoration: none;
}

.btn-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.btn-chip.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 12px 28px rgba(59, 130, 246, .18);
}

.btn-chip.primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

/* ---------- Visuals grid (projects page) ---------- */
.visuals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

.visual-item {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
  transition: transform .15s ease, box-shadow .2s ease;
}

.visual-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .08);
}

.visual-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.visual-item figcaption {
  font-size: .9rem;
  color: var(--muted);
  margin-top: 8px;
}

/* ---------- Unified image modal (projects & visuals) ---------- */
.image-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .85);
  z-index: 9999;
}

.image-modal.open {
  display: flex;
}

.image-modal .modal-content {
  max-width: min(92vw, 1200px);
  max-height: 80vh;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

.image-modal .caption {
  color: #fff;
  margin-top: 10px;
  font-size: .95rem;
  text-align: center;
  padding: 0 12px;
}

.image-modal .close {
  position: absolute;
  top: 20px;
  right: 24px;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  background: transparent;
  border: 0;
}

.image-modal .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, .45);
  border: 0;
  color: #fff;
  cursor: pointer;
  font-size: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-content: center;
}

.image-modal .nav:hover {
  background: rgba(0, 0, 0, .6);
}

.image-modal .nav.prev {
  left: 18px;
}

.image-modal .nav.next {
  right: 18px;
}

/* tighten gap above Visuals section on projects page */
#visuals.section {
  padding-top: 32px;
  padding-bottom: 60px;
}

/* ---------- Personal message section ---------- */
.message-section .message-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 32px 28px;
  max-width: 1000px;
  margin: 0 auto;
}

.message-section .message-title {
  margin: 0 0 10px;
  font-size: 1.6rem;
  line-height: 1.2;
}

.message-section p {
  margin: 10px 0;
  font-size: 1rem;
  color: var(--text);
}

.pull-quote {
  margin: 18px 0 14px;
}

.pull-quote blockquote {
  margin: 0;
  padding: 18px 20px;
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  line-height: 1.35;
  font-weight: 700;
  font-style: italic;
  color: var(--text);
  background:
    linear-gradient(0deg, rgba(59, 130, 246, .08), rgba(59, 130, 246, .08)) padding-box,
    linear-gradient(135deg, rgba(59, 130, 246, .45), rgba(37, 99, 235, .45)) border-box;
  border: 2px solid transparent;
  border-radius: 14px;
  position: relative;
}

.pull-quote blockquote::before {
  content: "“";
  position: absolute;
  left: 10px;
  top: -18px;
  font-size: 2.6rem;
  line-height: 1;
  color: rgba(59, 130, 246, .6);
  pointer-events: none;
}

.message-section .signature {
  margin-top: 14px;
  color: var(--muted);
  font-size: .95rem;
}

.pull-quote .quote-source {
  margin-top: 6px;
  text-align: right;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 600;
}

/* index contact  */
/* Full-width band with soft gradient */
.contact-section{
  position:relative;
  padding:64px 0 84px;
  background:
    radial-gradient(1200px 280px at 50% -100px, rgba(59,130,246,.10), transparent 60%),
    linear-gradient(180deg, rgba(0,0,0,.02), rgba(0,0,0,0));
}
.dark .contact-section{
  background:
    radial-gradient(1200px 280px at 50% -100px, rgba(124,156,255,.18), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,0));
}

/* Section head */
.contact-head h2{
  font-size:2.1rem; margin:0 0 6px;
}
.contact-sub{
  margin:0 0 26px; color:var(--muted);
}

/* Two-column responsive grid */
.contact-grid{
  display:grid;
  grid-template-columns: 1.2fr 1.8fr;
  gap:28px;
  align-items:start;
}
@media (max-width: 900px){
  .contact-grid{ grid-template-columns:1fr; }
}

/* Left: CTA column */
.contact-cta{
  background: var(--surface);
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow: var(--shadow);
  padding:24px;
  display:flex; flex-direction:column; gap:14px;
}
.contact-cta .btn.large{ width:100%; justify-content:center; }
.contact-cta .micro{ margin:6px 2px 0; font-size:.8rem; color:var(--muted); }

/* Right: info panel — upgrades to your existing block */
.contact-info-panel{
  background: var(--surface);
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow: var(--shadow);
  padding:24px;
}
.contact-list{ list-style:none; padding:0; margin:0; display:grid; gap:14px; }
@media (min-width:720px){
  /* two-column list when room allows */
  .contact-list{ grid-template-columns:1fr 1fr; }
}
.contact-list li{
  display:flex; gap:12px; align-items:flex-start;
  padding:10px 12px; border-radius:12px;
  transition:background .2s, border-color .2s;
}
.contact-list li:hover{
  background: rgba(59,130,246,.06);
}
.dark .contact-list li:hover{
  background: rgba(124,156,255,.12);
}
.contact-list .icon{ font-size:1.25rem; line-height:1.25; }
.contact-list .label{ font-weight:700; font-size:.92rem; color:var(--text); opacity:.9; margin-bottom:2px; }
.contact-list a{ color:var(--accent); font-weight:600; }
.contact-list a:hover{ text-decoration:underline; }

/* socials integrated as a footer row */
.contact-info-panel .socials{
  margin-top:16px; padding-top:14px;
  border-top:1px solid var(--border);
  display:flex; gap:12px; flex-wrap:wrap;
}
.contact-info-panel .socials a{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 14px; border-radius:999px;
  border:1px solid var(--accent); color:var(--accent);
  font-weight:600; text-decoration:none;
  transition: background .2s, box-shadow .2s, transform .15s;
}
.contact-info-panel .socials a:hover{
  background: rgba(59,130,246,.08);
  box-shadow: 0 4px 12px rgba(59,130,246,.20);
  transform: translateY(-1px);
}
.dark .contact-info-panel .socials a:hover{
  background: rgba(124,156,255,.18);
}

/* ---------- Responsive ---------- */
@media (max-width:900px) {
  .hero .container {
    grid-template-columns: 1fr;
  }

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

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

  .contact-text {
    margin-bottom: 20px;
  }

  .site-meta {
    display: none;
  }

  /* hide status pill on mobile to keep header clean */
}

@media (max-width:1024px) {
  .resume-wrapper {
    grid-template-columns: 1fr;
  }

  .resume-sidebar {
    order: 2;
  }

  .resume-main {
    order: 1;
  }
}

/* ===== Mobile nav drawer (phones only; desktop unchanged) ===== */
@media (max-width:768px) {
  .nav {
    display: none;
    flex: 0 0 auto;
  }

  .nav.open {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 96px 22px 28px;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 70;
    animation: navIn .2s ease;
  }

  .dark .nav.open {
    background: rgba(32, 36, 48, .94);
  }

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

    to {
      opacity: 1;
      transform: none;
    }
  }

  .nav.open a {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    line-height: 1.25;
    padding: 12px 12px;
    border-radius: 12px;
    color: var(--text);
    background: transparent;
    border: 1px solid transparent;
    transition: background .2s, border-color .2s, color .2s;
  }

  .nav.open a:hover {
    background: rgba(0, 0, 0, .04);
    border-color: var(--border);
  }

  .dark .nav.open a:hover {
    background: rgba(255, 255, 255, .06);
  }

  .nav.open a.active {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(59, 130, 246, .08);
  }

  /* simple emoji icons (no HTML changes) */
  .nav.open a[href*="index"]::before {
    content: "🏠";
  }

  .nav.open a[href*="projects"]::before {
    content: "📁";
  }

  .nav.open a[href*="resume"]::before {
    content: "🗂️";
  }

  .nav.open a[href*="contact"]::before {
    content: "✉️";
  }

  /* Contact looks like a CTA */
  .nav.open a[href*="contact"] {
    justify-content: center;
    font-weight: 700;
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(59, 130, 246, .06);
  }

  .nav.open a[href*="contact"]::after {
    content: "→";
    margin-left: 8px;
    transition: transform .2s;
  }

  .nav.open a[href*="contact"]:hover::after {
    transform: translateX(3px);
  }

  .hamburger,
  .header-right {
    position: relative;
    z-index: 80;
  }

  .timeline-item {
    flex-direction: column;
    gap: 12px;
  }

  .timeline-meta {
    flex: 0 0 auto;
  }
}

/* no scroll when mobile drawer is open */
.no-scroll {
  overflow: hidden;
}

/* Small screens: make visuals thumbs a bit taller */
@media (max-width:520px) {
  .visual-item img {
    height: 200px;
  }
}

/* ---------- Print ---------- */
@media print {

  .site-header,
  .theme-toggle,
  .lang-switcher,
  .hamburger {
    display: none;
  }

  body {
    background: #fff !important;
    color: #000 !important;
  }

  a {
    color: #000;
    text-decoration: none;
  }

  .resume-wrapper {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .resume-sidebar {
    box-shadow: none;
    border: none;
    padding: 12px 8px;
  }

  .timeline-meta .period {
    background: none;
    padding: 0;
  }

  .key-projects a::after {
    content: " (link)";
    font-size: .8rem;
  }
}

@media (max-width:768px) {

  /* show the hamburger on phones */
  .hamburger {
    display: block;
    margin-left: auto;
    /* push it to the right */
  }

  /* hide desktop nav until opened */
  .nav {
    display: none;
    flex: 0 0 auto;
  }

  /* full-screen drawer when open */
  .nav.open {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 96px 22px 28px;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 70;
    animation: navIn .2s ease;
  }

  .dark .nav.open {
    background: rgba(32, 36, 48, .94);
  }

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

    to {
      opacity: 1;
      transform: none;
    }
  }

  .nav.open a {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    line-height: 1.25;
    padding: 12px 12px;
    border-radius: 12px;
    color: var(--text);
    background: transparent;
    border: 1px solid transparent;
    transition: background .2s, border-color .2s, color .2s;
  }

  .nav.open a:hover {
    background: rgba(0, 0, 0, .04);
    border-color: var(--border);
  }

  .dark .nav.open a:hover {
    background: rgba(255, 255, 255, .06);
  }

  .nav.open a.active {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(59, 130, 246, .08);
  }

  /* cute emoji icons */
  .nav.open a[href*="index"]::before {
    content: "🏠";
  }

  .nav.open a[href*="projects"]::before {
    content: "📁";
  }

  .nav.open a[href*="resume"]::before {
    content: "🗂️";
  }

  .nav.open a[href*="contact"]::before {
    content: "✉️";
  }

  /* Contact as CTA */
  .nav.open a[href*="contact"] {
    justify-content: center;
    font-weight: 700;
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(59, 130, 246, .06);
  }

  .nav.open a[href*="contact"]::after {
    content: "→";
    margin-left: 8px;
    transition: transform .2s;
  }

  .nav.open a[href*="contact"]:hover::after {
    transform: translateX(3px);
  }

  /* keep hamburger & lang above drawer */
  .hamburger,
  .header-right {
    position: relative;
    z-index: 80;
  }

  /* resume timeline stacks on mobile */
  .timeline-item {
    flex-direction: column;
    gap: 12px;
  }

  .timeline-meta {
    flex: 0 0 auto;
  }
}

/* === THEME-FRIENDLY TINTS & PILLS (override block) === */

/* 1) extra tokens */
:root {
  --chip-bg: #fff;
  --chip-text: var(--muted);
  --chip-border: var(--accent);
  --chip-hover-bg: rgba(59, 130, 246, .06);

  --badge-bg: rgba(59, 130, 246, .10);
  --badge-text: var(--accent);

  --tag-bg: rgba(99, 179, 255, .15);
  --tag-text: var(--text);

  --period-bg: rgba(0, 0, 0, .04);

  --nav-active-bg: rgba(59, 130, 246, .08);
  /* mobile drawer active */
}

.dark {
  --chip-bg: rgba(255, 255, 255, .06);
  --chip-text: rgba(255, 255, 255, .85);
  --chip-border: rgba(124, 156, 255, .8);
  --chip-hover-bg: rgba(124, 156, 255, .15);

  --badge-bg: rgba(124, 156, 255, .22);
  --badge-text: #eaf0ff;

  --tag-bg: rgba(124, 156, 255, .18);
  --tag-text: var(--text);

  --period-bg: rgba(255, 255, 255, .08);

  --nav-active-bg: rgba(124, 156, 255, .18);
}

/* 2) filter pills (top of Projects) */
.filters .filter-btn {
  border: 1px solid var(--chip-border);
  background: var(--chip-bg);
  color: var(--chip-text);
}

.filters .filter-btn:not(.active):hover {
  background: var(--chip-hover-bg);
  color: var(--chip-text);
  border-color: var(--chip-border);
}

.filters .filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* 3) skill pills (About) – replace fixed rgba */
.skill-pills span {
  background: var(--tag-bg) !important;
  color: var(--tag-text);
}

/* 4) tiny "badge" on cards – replace fixed rgba */
.badge {
  background: var(--badge-bg) !important;
  color: var(--badge-text);
}

/* 5) tech tags under projects – replace fixed rgba */
.tags span {
  background: var(--tag-bg) !important;
  color: var(--tag-text);
}

/* 6) resume timeline period chip – replace fixed rgba */
.timeline-meta .period {
  background: var(--period-bg) !important;
}

/* 7) outline button hover – theme aware */
.outline:hover {
  background: var(--chip-hover-bg) !important;
}

/* 8) mobile drawer active link – theme aware */
@media (max-width:768px) {
  .nav.open a.active {
    background: var(--nav-active-bg) !important;
    border-color: var(--accent);
    color: var(--accent);
  }
}

/* Lightbox: stack image & caption vertically */
.image-modal {
  flex-direction: column;
  /* stack children top-to-bottom */
}

.image-modal .modal-content {
  margin-bottom: 12px;
  /* space between image & caption */
}

.image-modal .caption {
  max-width: min(92vw, 1200px);
  text-align: center;
  color: #fff;
  font-size: .95rem;
  line-height: 1.4;
}