@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;800&display=swap');

:root {
  
  --accent-color: #1F3A6B;    
  --secondary-color: #0A2340; 
  --primary-color: #052033;   
  --text-color: #052033;      
  --muted-color: #5F7386;     
  --background-color: #E9F0F6; 
  --surface-color: #6D8899;   
  --success-color: #174F86;   
  --danger-color: #E74C3C;
  --shadow: 0 8px 24px rgba(6,16,28,0.12);

  --primary-rgb: 5,32,51;     
  --secondary-rgb: 10,35,64;  
  --accent-rgb: 31,58,107;    
  --success-rgb: 23,79,134;   

  --max-width: 1300px;
  --gap: 20px;
  
  --header-height: 72px;
  
  --surface-rgb: 109,136,153; 

  --gradient-1: #062636; 
  --gradient-2: #0B3453; 
  --gradient-3: #1F3A6B; 
  --gradient-4: #123A5E; 
}

.svg-shape { position: absolute; opacity: 0.12; z-index: -3; transform-origin: center; animation: rotate 40s linear infinite; }

@keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.glass-applied { background: rgba(var(--surface-rgb, 170, 188, 189), 0.06); border: 1px solid rgba(var(--accent-rgb,37,75,138), 0.03); backdrop-filter: blur(8px) saturate(120%); -webkit-backdrop-filter: blur(8px) saturate(120%); }

@media (prefers-reduced-motion: reduce) {
  .blob, .svg-shape, #particles-js { animation: none !important; }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  
  background: linear-gradient(-45deg, var(--gradient-1), var(--gradient-2), var(--gradient-3), var(--gradient-4));
  background-size: 400% 400%;
  animation: gradient 15s ease infinite;
  color: var(--text-color);
  line-height: 1.6;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  
  font-size: 18px; 
}

@keyframes gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.reveal { opacity: 0; transform: translateY(22px); transition: opacity 560ms cubic-bezier(.2,.9,.2,1), transform 560ms cubic-bezier(.2,.9,.2,1); will-change: opacity, transform; }
.reveal-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  
  .reveal { transition: none; opacity: 1 !important; transform: none !important; }
}

html, body { height: 100%; }
body { display: flex; flex-direction: column; min-height: 100vh; }

main { flex: 1 0 auto; display: flex; flex-direction: column; padding-top: var(--header-height); }

.container.main-fill { flex: 1 0 auto; display: flex; flex-direction: column; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 18px; }
.header-inner { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 0 18px; height: var(--header-height); box-sizing: border-box; }

.header-inner { position: relative; }

.site-header {
  background: transparent;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 60;
  display: flex;
  align-items: center;
  
  background: rgba(var(--surface-rgb,170,188,189), 0.06);
  border-bottom: 1px solid rgba(var(--accent-rgb,37,75,138), 0.06);
  box-shadow: 0 6px 18px rgba(11,33,56,0.06);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
}
.site-title { color: var(--primary-color); font-weight: 700; font-size: 20px; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.site-title .dot { color: var(--accent-color); margin-left: 4px; }
.site-title .brand-icon { width: 28px; height: 28px; display: inline-block; object-fit: contain; border-radius: 8px; }
.main-nav ul { list-style: none; display: flex; gap: 16px; align-items: center; }
.main-nav a { text-decoration: none; color: var(--primary-color); font-weight: 600; padding: 8px 10px; border-radius: 6px; }
.main-nav a:hover, .main-nav a:focus { background: rgba(var(--secondary-rgb), 0.08); }
.main-nav { position: relative; }
.nav-toggle { display: none; background: none; border: 1px solid transparent; font-size: 20px; padding: 8px; border-radius: 8px; }
.header-actions { display: flex; gap: 8px; align-items: center; }

.brand { flex: 0 0 auto; z-index: 70; display: flex; align-items: center; gap: 8px; }
.main-nav { flex: 1 1 auto; display: flex; justify-content: center; }
.main-nav ul { display: flex; gap: 16px; align-items: center; }
.header-actions { flex: 0 0 auto; z-index: 70; }

@media (min-width: 880px) {
  
  .header-inner { position: absolute; left: 0; right: 0; padding: 0 110px; height: var(--header-height); }
  .brand { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); }
  .header-actions { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); }
  .main-nav { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
  
  .site-title .brand-icon { width: 40px; height: 40px; }
}

@media (min-width: 1200px) {
  
    .site-title .brand-icon { width: 44px; height: 44px; }
}

section#projects .projects-container {
  display: flex !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  align-items: flex-start !important;
  padding-bottom: 12px !important;
}
section#projects .projects-grid {
  display: flex !important;
  gap: 20px !important;
  align-items: flex-start !important;
  padding: 8px 6px !important;
}
section#projects .project-item {
  flex: 0 0 520px !important;
  min-width: 480px !important;
  min-height: 520px !important;
  height: auto !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  position: relative !important;
  z-index: 60 !important;
}
section#projects .project-item .card {
  height: 520px !important;
  min-height: 480px !important;
  display: block !important;
  position: relative !important;
  z-index: 65 !important;
}
section#projects .project-item .front,
section#projects .project-item .back {
  position: absolute !important;
  inset: 0 !important;
}

.main-nav .nav-indicator {
  position: absolute;
  height: 3px;
  background: var(--accent-color);
  left: 0;
  
  bottom: -8px;
  width: 0;
  border-radius: 4px;
  transition: left 360ms cubic-bezier(.2,.9,.2,1), width 360ms cubic-bezier(.2,.9,.2,1);
  will-change: left, width;
  pointer-events: none;
  z-index: 5;
}

@media (max-width: 880px) {
  
  .main-nav .nav-indicator { bottom: -6px; height: 2px; }
}

.hero { padding: 40px 0; }
.hero-inner { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: center; }
.hero-copy h1 { font-size: 36px; margin-bottom: 8px; color: var(--primary-color); }
.tagline { color: var(--muted-color); margin-bottom: 16px; }
.hero-ctas { display: flex; gap: 12px; }
.profile-pic { width: 280px; height: auto; border-radius: 10px; object-fit: cover; box-shadow: var(--shadow); transition: border-radius 200ms ease, box-shadow 200ms ease; }

h2 { color: var(--primary-color); margin-bottom: 12px; }

section { margin: 16px 0; }

@media (min-width: 880px) {
  
  main > .surface { min-height: calc(100vh - 160px); display: flex; align-items: center; justify-content: center; }
  
  main > .surface > .container { margin: 0 auto; }
}

@media (min-width: 880px) {
  
  main > .surface > .container {
    background: rgba(var(--surface-rgb), 0.06);
    border-radius: 14px;
    border: 1px solid rgba(var(--accent-rgb), 0.03);
    box-shadow: 0 10px 36px rgba(11,33,56,0.04);
    backdrop-filter: blur(12px) saturate(125%);
    -webkit-backdrop-filter: blur(12px) saturate(125%);
    padding: 48px; 
    width: 100%;
    max-width: var(--max-width);
    min-height: calc(100vh - 260px); 
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  main > .surface .projects-container { align-self: stretch; }

  body.projects-page main > .surface > .container {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }
}

section.surface#projects > .container {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

@media (min-width: 880px) {
  section.surface#projects > .container {
    padding: 48px; 
    min-height: calc(100vh - 260px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start; 
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
  }
  
  section.surface#projects .projects-container { height: 100%; align-self: stretch; }
  
  section.surface#projects .section-head { align-self: flex-start; margin-bottom: 12px; }
}

.glass-applied, .stats-card, .glass-container {
  background: rgba(var(--surface-rgb), 0.06);
  border-radius: 14px;
  border: 1px solid rgba(var(--accent-rgb), 0.03);
  box-shadow: 0 10px 36px rgba(11,33,56,0.06);
  backdrop-filter: blur(12px) saturate(125%);
  -webkit-backdrop-filter: blur(12px) saturate(125%);
  padding: 28px;
  transition: background-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}

.stats-card { background: rgba(var(--surface-rgb), 0.06); border: 1px solid rgba(var(--accent-rgb), 0.03); }

.about-content { display: flex; gap: 24px; align-items: center; }
.about-text { flex: 1; }
.profile-small { width: 180px; border-radius: 10px; object-fit: cover; transition: border-radius 200ms ease, box-shadow 200ms ease; display: block; }

.about-aside { width: 400px; height: 400px; overflow: hidden; border-radius: 12px; flex: 0 0 auto; }
.about-aside .profile-small {
  
  width: 140%;
  height: 140%;
  object-fit: cover;
  object-position: center center;
  display: block;
  margin: 0;
  transform: translateY(-4%);
}
 
 .about-text p { font-size: 20px; line-height: 1.95; margin-top: 12px; }

.about-aside {
  
  width: 400px;
  height: 400px;
  padding: 6px;
  border-radius: 16px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  
  background: linear-gradient(180deg, rgba(var(--accent-rgb),0.14), rgba(var(--secondary-rgb),0.08));
  
  box-shadow: 0 14px 36px rgba(11,33,56,0.12), 0 2px 10px rgba(37,75,138,0.06);
  border: 2px solid rgba(var(--accent-rgb),0.10);
  transition: transform 220ms ease, box-shadow 220ms ease;
  will-change: transform;
  transform: translateZ(0);
  animation: floatPortrait 5.6s ease-in-out infinite;
}

.about-aside .profile-small {
  width: 180%;
  height: 180%;
  object-fit: cover;
  display: block;
  border-radius: 10px;
  
  box-shadow: inset 0 -6px 20px rgba(11,33,56,0.06);
}

.section-sub { margin-top: 32px; margin-bottom: 18px; color: var(--primary-color); font-size: 20px; line-height: 1.2; }
.dev-grid { display: flex; gap: 28px; align-items: stretch; justify-content: flex-start; flex-wrap: nowrap; margin-top: 12px; }
.dev-card {
  
  flex: 0 1 calc((100% - 56px) / 3);
  max-width: calc((100% - 56px) / 3);
  min-height: 220px;
  padding: 28px;
  border-radius: 14px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(180deg, rgba(var(--accent-rgb),0.14), rgba(var(--secondary-rgb),0.08));
  box-shadow: 0 20px 48px rgba(11,33,56,0.16);
  border: 2px solid rgba(var(--accent-rgb),0.10);
  color: var(--text-color);
}
.dev-card .dev-title { font-weight: 700; font-size: 18px; color: var(--primary-color); }
.dev-card .dev-date { margin-top: 8px; font-size: 15px; color: var(--muted-color); }

.conf-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: 12px;
  align-items: start;
}
.conf-card {
  min-height: 160px; 
  padding: 18px; 
  border-radius: 12px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(180deg, rgba(var(--accent-rgb),0.10), rgba(var(--secondary-rgb),0.06));
  box-shadow: 0 12px 30px rgba(11,33,56,0.10);
  border: 1px solid rgba(var(--accent-rgb),0.08);
  color: var(--text-color);
}
.conf-card .conf-title { font-weight: 700; font-size: 16px; color: var(--primary-color); }
.conf-card .conf-date { margin-top: 6px; font-size: 14px; color: var(--muted-color); }

@media (max-width: 880px) {
  .dev-grid { flex-wrap: wrap; }
.vol-grid { display: flex; gap: 28px; align-items: stretch; justify-content: flex-start; margin-top: 14px; }
.vol-card {
  flex: 0 1 calc((100% - 56px) / 3);
  max-width: calc((100% - 56px) / 3);
  min-height: 160px;
  padding: 20px;
  border-radius: 12px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(180deg, rgba(var(--accent-rgb),0.10), rgba(var(--secondary-rgb),0.06));
  box-shadow: 0 12px 30px rgba(11,33,56,0.10);
  border: 1px solid rgba(var(--accent-rgb),0.06);
  color: var(--text-color);
}
.vol-card .vol-title { font-weight: 700; font-size: 16px; color: var(--primary-color); }
.vol-card .vol-date { margin-top: 6px; font-size: 14px; color: var(--muted-color); }

@media (max-width: 880px) {
  .vol-grid { flex-direction: column; gap: 16px; }
  .vol-card { flex: 1 1 100%; max-width: 100%; }
}
  .dev-card { flex: 1 1 100%; max-width: 100%; flex-direction: column; align-items: flex-start; }
  .dev-card .dev-date { margin-left: 0; margin-top: 8px; white-space: normal; }
  .conf-grid { grid-template-columns: 1fr; gap: 16px; }
  .conf-card { width: 100%; }
  .conf-card .conf-date { margin-top: 8px; }
}

html[data-theme="dark"] .dev-card {
  background: rgba(var(--surface-dark-rgb,13,23,36),0.28);
  border: 1px solid rgba(255,255,255,0.04);
  color: var(--text-color);
}

@keyframes floatPortrait {
  0% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .about-aside { animation: none !important; transition: none !important; }
}

.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 12px; }
.project-item { padding: 16px; border-radius: 10px; background: var(--surface-color); box-shadow: 0 6px 18px rgba(18,24,33,0.05); border: 1px solid transparent; }

.project-item.glass-applied,
.projects-grid .project-item.glass-applied {
  background: rgba(var(--surface-rgb,170,188,189), 0.06);
  border: 1px solid rgba(var(--accent-rgb,37,75,138), 0.03);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  box-shadow: 0 12px 36px rgba(11,33,56,0.05);
  transition: transform 200ms ease, box-shadow 200ms ease, background-color 180ms ease;
}
.projects-grid .project-item:hover,
.project-item.glass-applied:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 48px rgba(11,33,56,0.12);
}

.projects-grid .project-item:hover + .project-item,
.projects-grid .project-item.hover + .project-item,
.projects-grid .project-item:focus-within + .project-item {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
}

.project-link { display: block; color: inherit; text-decoration: none; }
.project-link:focus { outline: 2px solid rgba(var(--accent-rgb),0.12); outline-offset: 4px; border-radius: 10px; }

.projects-grid .project-item details summary {
  cursor: pointer;
}

.project-item { perspective: 1000px; }
.project-item .card { width: 100%; height: 100%; position: relative; border-radius: 14px; overflow: visible; box-sizing: border-box; }
.project-item .card .content {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform .7s cubic-bezier(0.4,0.2,0.2,1);
  -webkit-transform-style: preserve-3d;
}

.project-item .card:hover .content,
.project-item.hover .card .content,
.project-item .card.is-flipped .content {
  transform: rotateY(180deg);
  transition: transform .7s cubic-bezier(0.4,0.2,0.2,1);
}

.project-item .front,
.project-item .back {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 10px;
  overflow: hidden;
  
  padding: 28px;
  box-sizing: border-box;
}

.project-item .front { z-index: 2; }
.project-item .back { transform: rotateY(180deg); }

.project-item .front .inner,
.project-item .back .inner {
  
  position: relative;
  top: auto;
  left: auto;
  width: auto;
  transform: translateZ(var(--z,60px));
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  z-index: 2;
  will-change: transform;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.project-item .front::after{
  content: '';
  position: absolute;
  inset: 0;
  
  background-color: transparent;
  z-index: 1;
  transform: translateZ(var(--overlay-z,40px));
  will-change: transform, opacity;
}

.project-item .front, .project-item .back {
  
  background: rgba(var(--surface-rgb,170,188,189), 0.08);
  border: 1px solid rgba(var(--accent-rgb,37,75,138), 0.06);
  box-shadow: 0 10px 36px rgba(11,33,56,0.06);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  color: var(--primary-color);
}

.project-item,
.project-item .front,
.project-item .back,
.project-item .front .inner,
.project-item .back .inner {
  
  color: var(--primary-color);
}

.project-item .back { overflow: hidden; text-align: center; font-size: 20px; line-height: 1.9; display: flex; align-items: center; justify-content: center; }
.project-item .back .inner { width: 100%; display: flex; align-items: center; justify-content: center; text-align: center; padding: 0 10px; }
.project-item .back .inner p { margin: 0; font-size: 20px; line-height: 1.9; }

.project-item .back .inner p { color: var(--primary-color); font-size: 20px; }

.project-item .front .inner { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 100%; }
.project-item .front .project-logo { width: auto; max-width: 80%; height: auto; max-height: 260px; object-fit: contain; z-index: 3; position: relative;  transform: translateZ(var(--logo-z,90px)); will-change: transform; margin: 0 auto; display: block; }

.tech-stack {
  font-size: 14px;
  color: var(--muted-color);
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.5px;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(var(--accent-rgb,31,58,107), 0.08);
}

html[data-theme="dark"] .tech-stack {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
}

.project-item .front .inner { align-items: center; justify-content: center; text-align: center; }

@media (min-width: 1200px) {
  .project-item .front .project-logo { max-height: 300px; }
}

@media (min-width: 1200px) {
  .project-item .front .project-logo { max-height: 300px; }
}

@media (min-width: 880px) {
  
  .projects-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 12px;
    display: flex;
    align-items: flex-start; 
    justify-content: center; 
    height: 100%;
  }
  .projects-grid {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: flex-start; 
    justify-content: center; 
    padding: 8px 6px;
    scroll-snap-type: x mandatory;
    height: 100%;
  }
  
  .projects-grid .project-item {
    flex: 0 0 520px; 
    min-width: 480px;
    max-width: 560px;
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; 
    padding: 0; 
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 14px;
    align-self: center; 
    box-sizing: border-box;
    height: auto; 
    min-height: 520px; 
  }

  .projects-grid .project-item .card { height: 100%; min-height: 480px; }
  
  .projects-grid .project-item h3 { display: none; }
  .projects-grid .project-item .project-logo { margin-bottom: 12px; }
  
  .projects-grid .project-item .project-logo { max-width: 420px; margin-bottom: 18px; }
  
  .projects-grid .project-item .project-logo,
  .projects-grid .project-item img.project-logo {
    width: 100%;
    height: 240px;
    object-fit: contain;
    display: block;
    margin: 0 auto 18px;
  }
  @media (min-width: 1200px) {
    .projects-grid .project-item .project-logo,
    .projects-grid .project-item img.project-logo { height: 300px; }
  }
  .projects-grid .project-item h3 { font-size: 26px; margin-bottom: 10px; }
  .projects-grid .project-item details p { font-size: 18px; line-height: 1.8; }
  
  .projects-container::-webkit-scrollbar { height: 10px; }
  .projects-container::-webkit-scrollbar-thumb { background: rgba(11,33,56,0.12); border-radius: 8px; }
  .projects-container { scrollbar-width: thin; scrollbar-color: rgba(11,33,56,0.12) transparent; }
}
.project-logo { width: 100%; max-width: 220px; height: auto; margin: 0 auto 10px; display: block; }
.project-item h3 { color: var(--secondary-color); text-align: center; margin-bottom: 8px; }

.project-item .project-logo { filter: none; opacity: 1; }

.projects-grid .project-item {
  outline: none !important;
  position: relative;
  z-index: 2;
}

.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
input[type="text"], input[type="search"], input[type="email"], textarea { padding: 10px; border-radius: 8px; border: 1px solid var(--muted-color); background: var(--surface-color); color: var(--text-color); }
textarea { min-height: 120px; resize: vertical; }
.form-row { display: flex; gap: 12px; }

#contact .contact-card label,
#contact label,
.contact-card label {
  font-family: inherit; 
  font-size: 14px; 
  color: var(--muted-color);
  display: block;
  margin-bottom: 8px;
}

#contact .contact-card input,
#contact .contact-card textarea,
#contact .contact-card .btn {
  font-family: inherit; 
}

@media (min-width: 880px) {
  #contact .contact-card label { font-size: 15px; }
}

.form-popup {
  display: block;
  width: 100%;
  background: var(--accent-color);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(11, 33, 56, 0.15);
  text-align: center;
  animation: slideDown 0.3s ease-out;
  margin-bottom: 16px;
  box-sizing: border-box;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-popup.fade-out {
  animation: slideUp 0.3s ease-out forwards;
}

@keyframes slideUp {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

.btn { display: inline-block; padding: 10px 14px; background: var(--secondary-color); color: #ffffff; border: none; border-radius: 8px; text-decoration: none; font-weight: 600; }
.btn.ghost { background: transparent; color: var(--primary-color); border: 1px solid rgba(var(--primary-rgb), 0.06); }
.btn.small { padding: 6px 8px; font-size: 14px; }

.theme-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
  object-fit: contain;
  
  transform: rotate(0deg) translateY(0);
  transform-origin: center center;
  transition: transform 420ms cubic-bezier(0.2, 0.9, 0.2, 1), filter 160ms ease;
}

.typewriter {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  font-weight: 700;
}
.typewriter::after {
  content: '|';
  display: inline-block;
  margin-left: 6px;
  animation: tw-blink 1s steps(1) infinite;
}
@keyframes tw-blink { 50% { opacity: 0; } }

.surface h2 { margin-bottom: 18px; }
.typewriter { font-weight: 800; font-size: 28px; letter-spacing: -0.02em; }
.about-text { margin-top: 8px; }
.about-text p { margin-top: 12px; }

@media (min-width: 880px) {
  .typewriter { font-size: 72px; line-height: 1; margin-bottom: 14px; }
  .surface h2 { margin-bottom: 28px; }
  .about-text { margin-top: 20px; }
   .about-text p { font-size: 20px; line-height: 1.95; margin-top: 14px; }
  
  .section-sub { margin-top: 44px; margin-bottom: 20px; }
}

.skills-section { margin-top: 36px; margin-bottom: 12px; }
.skills-title { font-size: 36px; font-weight: 800; color: var(--primary-color); margin-bottom: 18px; }
.skills-sub { margin-top: 18px; margin-bottom: 12px; color: var(--primary-color); font-size: 20px; }

.skills-filter {
  display: flex;
  gap: 0.8rem;
  margin: 1.5rem 0 2rem 0;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.6rem 1.4rem;
  border: 2px solid rgba(var(--accent-rgb,31,58,107), 0.2);
  background: transparent;
  color: var(--text-color);
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.filter-btn:hover {
  border-color: rgba(var(--accent-rgb,31,58,107), 0.5);
  background: rgba(var(--accent-rgb,31,58,107), 0.05);
}

.filter-btn.active {
  background: #1a3a4a;
  color: #fff;
  border-color: #1a3a4a;
}

html[data-theme="dark"] .filter-btn {
  border-color: rgba(255,255,255,0.1);
}

html[data-theme="dark"] .filter-btn:hover {
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.05);
}

.skill-card {
  animation: fadeInSkill 0.4s ease forwards;
  transition: transform 280ms cubic-bezier(.2,.9,.2,1), box-shadow 280ms ease, background-color 180ms ease;
}

.skill-card.hidden {
  display: none;
  opacity: 0;
  pointer-events: none;
}

.skill-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 36px 76px rgba(31,58,107,0.2);
}

@keyframes fadeInSkill {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 20px; margin-top: 12px; }
.skill-card { padding: 24px; min-height: 140px; border-radius: 14px; 
  
  background: rgba(var(--surface-rgb,170,188,189), 0.06);
  border: 1px solid rgba(var(--accent-rgb,31,58,107), 0.06);
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  box-shadow: 0 18px 42px rgba(11,33,56,0.12);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--text-color);
  transition: transform 220ms cubic-bezier(.2,.9,.2,1), box-shadow 220ms ease, background-color 180ms ease;
}
.skill-card img { width: 64px; height: 64px; object-fit: contain; display: block; }
.skill-name { font-weight: 700; font-size: 18px; text-align: center; }
.skill-meta { font-size: 14px; color: var(--muted-color); }

@media (min-width: 1200px) {
  .skills-title { font-size: 44px; }
  .skill-card img { width: 72px; height: 72px; }
  .skill-name { font-size: 20px; }
  .skill-card { padding: 28px; min-height: 160px; }
}

@media (min-width: 880px) {
  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 18px;
  }

  .skill-card {
    padding: 28px;
    min-height: 180px;
    border-radius: 14px;
    box-shadow: 0 22px 48px rgba(11,33,56,0.14);
  }

  .skill-card img { width: 80px; height: 80px; }
  .skill-name { font-size: 20px; }
}

html[data-theme="dark"] .skill-card {
  background: rgba(var(--surface-dark-rgb,13,23,36), 0.28);
  border: 1px solid rgba(255,255,255,0.04);
  box-shadow: 0 12px 30px rgba(0,0,0,0.5);
  color: var(--text-color);
}

html[data-theme="dark"] .skill-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 40px 80px rgba(0,0,0,0.6);
}

@media (max-width: 880px) {
  .skills-title { font-size: 28px; }
  .skill-card { padding: 18px; min-height: 120px; }
  .skill-card img { width: 48px; height: 48px; }
}

.experience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.experience-card {
  padding: 24px;
  min-height: 140px;
  border-radius: 14px;
  background: rgba(var(--surface-rgb,170,188,189), 0.06);
  border: none;
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  box-shadow: 0 18px 42px rgba(11,33,56,0.12);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--text-color);
  transition: transform 220ms cubic-bezier(.2,.9,.2,1), box-shadow 220ms ease, background-color 180ms ease;
}

.exp-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  display: block;
  margin-bottom: 12px;
}

.exp-title {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.4;
  margin-bottom: 12px;
}

.exp-date {
  font-size: 14px;
  color: var(--muted-color);
}

.exp-logo-robonexus-light {
  display: block !important;
}

.exp-logo-robonexus-dark {
  display: none !important;
}

html[data-theme="dark"] .exp-logo-robonexus-light {
  display: none !important;
}

html[data-theme="dark"] .exp-logo-robonexus-dark {
  display: block !important;
}

html[data-theme="dark"] .experience-card {
  background: rgba(var(--surface-dark-rgb,13,23,36), 0.28);
  border: none;
  box-shadow: 0 12px 30px rgba(0,0,0,0.5);
}

.experience-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 60px rgba(11,33,56,0.16);
}

@media (min-width: 880px) {
  .experience-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
  }
  
  .experience-card {
    padding: 28px;
    min-height: 180px;
    box-shadow: 0 22px 48px rgba(11,33,56,0.14);
  }
  
  .exp-title {
    font-size: 17px;
  }
}

@media (max-width: 880px) {
  .experience-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  
  .experience-card {
    padding: 18px;
    min-height: 120px;
  }
  
  .exp-title {
    font-size: 15px;
  }
}

.experience-carousel-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 40px 0;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
  overflow: visible;
  background: transparent;
}

.carousel-nav {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(var(--surface-rgb, 170, 188, 189), 0.08);
  border: 1px solid rgba(var(--accent-rgb, 31, 58, 107), 0.1);
  color: var(--text-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 300ms ease;
  backdrop-filter: blur(8px);
  z-index: 10;
}

.carousel-nav:hover:not(:disabled) {
  background: rgba(var(--surface-rgb, 170, 188, 189), 0.12);
  border-color: rgba(var(--accent-rgb, 31, 58, 107), 0.15);
  transform: scale(1.08);
}

.carousel-nav:active:not(:disabled) {
  transform: scale(0.95);
}

.carousel-nav:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

html[data-theme="dark"] .carousel-nav {
  background: rgba(var(--surface-dark-rgb, 13, 23, 36), 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .carousel-nav:hover:not(:disabled) {
  background: rgba(var(--surface-dark-rgb, 13, 23, 36), 0.4);
  border-color: rgba(255, 255, 255, 0.1);
}

.experience-carousel-viewport {
  position: relative;
  width: 1160px !important;
  overflow: hidden;
  perspective: 1000px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .experience-carousel-viewport {
    width: 100% !important;
    max-width: 90vw !important;
    margin: 0 auto !important;
  }
}

.experience-carousel {
  display: flex !important;
  flex-direction: row !important;
  gap: 20px !important;
  width: auto;
  align-items: center;
  justify-content: flex-start;
  transition: transform 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

.experience-carousel .experience-card {
  position: relative;
  width: 360px;
  height: 520px;
  min-height: 520px;
  flex: 0 0 360px;
  border-radius: 26px;
  padding: 40px;
  transition: opacity 500ms ease, filter 500ms ease, transform 500ms ease;
  opacity: 0.65;
  filter: blur(0px);
  transform: scale(0.9);
  background: rgba(var(--surface-rgb, 170, 188, 189), 0.06);
  border: none;
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  box-shadow: 0 18px 42px rgba(11, 33, 56, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.experience-carousel .experience-card:nth-child(2) {
  transform: scale(1);
  opacity: 1;
  filter: blur(0px);
}

.experience-carousel .experience-card:hover {
  transform: scale(0.93);
}

.experience-carousel .experience-card:nth-child(2):hover {
  transform: scale(1.04);
  box-shadow: 0 26px 60px rgba(11, 33, 56, 0.16);
}

.experience-carousel .exp-logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  display: block;
  margin-bottom: 24px;
}

.experience-carousel .exp-title {
  font-weight: 700;
  font-size: 20px;
  line-height: 1.4;
  margin-bottom: 16px;
}

.experience-carousel .exp-date {
  font-size: 16px;
  color: var(--muted-color);
}

html[data-theme="dark"] .experience-carousel .experience-card {
  background: rgba(var(--surface-dark-rgb, 13, 23, 36), 0.28);
  border: none;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

html[data-theme="dark"] .experience-carousel .experience-card:nth-child(2) {
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
}

section#experience {
  scroll-margin-top: 120px;
}

@media (max-width: 1100px) {
  .experience-carousel-container {
    gap: 12px;
  }

  .experience-carousel {
    gap: 12px !important;
  }

  .carousel-nav {
    width: 40px;
    height: 40px;
  }

  .carousel-nav svg {
    width: 20px;
    height: 20px;
  }

  .experience-carousel .experience-card {
    min-height: 200px;
    padding: 20px;
  }

  .experience-carousel .exp-logo {
    width: 56px;
    height: 56px;
  }

  .experience-carousel .exp-title {
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  .experience-carousel-container {
    gap: 8px;
  }

  .experience-carousel {
    gap: 8px !important;
  }

  .carousel-nav {
    width: 36px;
    height: 36px;
  }

  .carousel-nav svg {
    width: 16px;
    height: 16px;
  }

  .experience-carousel .experience-card {
    min-height: 160px;
    padding: 16px;
  }

  .experience-carousel .exp-logo {
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
  }

  .experience-carousel .exp-title {
    font-size: 13px;
    margin-bottom: 6px;
  }

  .experience-carousel .exp-date {
    font-size: 12px;
  }
}

.skills-grid + .skills-grid { margin-top: 28px; }

#themeToggle {
  background: transparent;
  border: none;
  padding: 6px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: none;
  
  transform: none;
}

#themeToggle:hover { background: rgba(0,0,0,0.04); }

#themeToggle:focus-visible {
  outline: 2px solid rgba(var(--accent-rgb), 0.18);
  outline-offset: 2px;
}

.btn.is-dark .theme-icon {
  filter: brightness(1.2) invert(1);
  transform: rotate(180deg) translateY(0);
}

.btn .theme-icon { filter: none; }

.stats-card { padding: 16px; border-radius: 10px; background: var(--surface-color); }

.stats-card:hover, .btn:hover, input:hover { transform: translateY(-4px); box-shadow: 0 10px 26px rgba(18,24,33,0.08); transition: transform 0.22s ease, box-shadow 0.22s ease; }
.projects-grid .project-item:hover { transform: none; }

#ghInput { min-width: 240px; }
#ghResult { margin-top: 8px; }

.site-footer { padding: 20px 0; color: var(--muted-color); }

.muted { color: var(--muted-color); }
.visually-hidden { position: absolute !important; height: 1px; width: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

@media (max-width: 880px) {
  .hero-inner { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-flex; }
  .main-nav { display: none; }
  .main-nav.open { display: block; position: absolute; right: 16px; top: 68px; background: var(--surface-color); border-radius: 8px; box-shadow: var(--shadow); padding: 8px; }
  .main-nav.open ul { flex-direction: column; }
  .form-row { flex-direction: column; }
  .profile-pic { width: 100%; max-width: 320px; }
  
  .about-aside { width: 240px; height: 240px; padding: 6px; }
  .about-aside .profile-small { transform: scale(1.01) translateY(-2%); }
}

@media (min-width: 880px) {
  .hero-inner { grid-template-columns: 1fr 480px; }
  .profile-pic { width: 480px; max-width: 48vw; border-radius: 12px; aspect-ratio: 4 / 5; }
  .profile-small { width: 320px; border-radius: 10px; aspect-ratio: 4 / 5; }
}

@media (min-width: 880px) {
  body { font-size: 20px; }
  .hero-copy h1 { font-size: 56px; }
  h2 { font-size: 32px; }
  .project-item h3 { font-size: 22px; }
  .about-text h3 { font-size: 24px; }
  p { font-size: 18px; }
  .tagline { font-size: 18px; }
  
  .glass-applied { padding: 48px; }
  .container { max-width: var(--max-width); }
}

p, li, .muted, .tagline, .about-text p { font-size: 16px; }
@media (min-width: 880px) {
  p, li, .muted, .about-text p { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

html[data-theme="dark"] {
  --background-color: #071025; 
  --surface-color: #0d1724; 
  --text-color: #e6eef8;    
  --muted-color: #9aa9bf;   
  --primary-color: #bcd7ff; 
  --secondary-color: #9bbbe0;
  
  --accent-color: #254B8A;
  --shadow: 0 10px 30px rgba(0,0,0,0.6);

  --primary-rgb: 36,48,66;
  --secondary-rgb: 64,84,120;
  --accent-rgb: 37,75,138;
  --warm-rgb: 120,90,60;

  --surface-dark-rgb: 13,23,36;

  --gradient-1: #0B2138; 
  --gradient-2: #001233; 
  --gradient-3: #001d3d; 
  --gradient-4: #001845; 
}

html[data-theme="dark"] .main-nav .nav-indicator {
  background: var(--primary-color);
}

html[data-theme="light"] {
  --background-color: #E9F0F6; 
  --surface-color: #F7FBFF; 
  --text-color: #052033;    
  --muted-color: #6B8496;   
  --primary-color: #052033; 
  --secondary-color: #0B3453;
  --accent-color: #1F3A6B;
  --shadow: 0 8px 24px rgba(6,16,28,0.08);

  --gradient-1: #EAF6FB;
  --gradient-2: #DDEFF8;
  --gradient-3: #C9E5F4;
  --gradient-4: #A7D3F0;
}

html[data-theme="dark"] .glass-applied,
html[data-theme="dark"] .stats-card {
  background: rgba(var(--surface-dark-rgb, 13,23,36), 0.32);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  color: var(--text-color);
}

html[data-theme="dark"] .btn { background: var(--accent-color); }
html[data-theme="dark"] .btn.ghost { background: transparent; color: var(--text-color); border-color: rgba(255,255,255,0.04); }

html[data-theme="light"] #contact input,
html[data-theme="light"] #contact textarea,
html[data-theme="light"] .contact-card input,
html[data-theme="light"] .contact-card textarea {
  background: #f5f7fa !important;
  color: #052033 !important;
  border: 1px solid rgba(31,58,107,0.15) !important;
}

html[data-theme="light"] #contact input::placeholder,
html[data-theme="light"] #contact textarea::placeholder,
html[data-theme="light"] .contact-card input::placeholder,
html[data-theme="light"] .contact-card textarea::placeholder {
  color: #6B8496 !important;
}

.resume { 
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: transparent;
}

.resume > *:not(.experience-carousel-container) {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 18px;
}
.resume-header { text-align: center; margin-bottom: 20px; }
.resume-header h2 { font-size: 28px; letter-spacing: -0.02em; margin-bottom: 6px; }
.resume-contact { color: var(--muted-color); margin-bottom: 12px; }

.resume-contact a { color: inherit; text-decoration: none; }
.resume-contact a:hover, .resume-contact a:focus { text-decoration: underline; }
.resume-actions { display:flex; gap:12px; justify-content:center; margin-bottom:18px; }
.resume-body { display:block; }
.resume-section { margin-bottom: 18px; }
.resume-section h3 { margin-bottom: 8px; color: var(--primary-color); }
.resume-section h4 { margin: 8px 0 6px; font-size: 15px; }
.resume-section ul { margin-left: 18px; }
.resume-section p { margin: 0 0 8px 0; }

.edu-line { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: baseline; }

.resume-section ul li { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: start; }
.resume-section ul li .date { color: var(--muted-color); white-space: nowrap; text-align: right; }
.resume .date,
.resume-section .date { color: #ffffff !important; font-weight: 600; }

@media (max-width: 880px) {
  .edu-line { display: block; }
  .resume-section ul li { display: block; }
  .resume-section ul li .date { display: block; margin-top: 6px; min-width: 0; text-align: left; }
}

@media (min-width: 880px) {
  .resume-header h2 { font-size: 34px; }
  .resume-section p, .resume-section li { font-size: 18px; }
}

main, body, html { background-attachment: fixed; }
main > .surface,
main > .surface > .container,
section.surface,
section.surface > .container,
section > .container,
section {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

section.glass-applied,
section > .container.glass-applied,
main > .surface > .container.glass-applied {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

#canv {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  pointer-events: none; 
  z-index: -1; 
  display: block;
  background: transparent;
}

.text {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  line-height: 0.75;
  perspective: 100rem;
  opacity: 1;
}

.text i {
  display: inline-block;
  opacity: 1;
  white-space: pre-wrap;
}

.text--title {
  bottom: 75%;
  font-size: 2.2em;
  height: 1.2em;
  color: var(--text-color);
}

.text--title span {
  display: block;
}

.text--title span:first-child {
  font-size: 0.5em;
  margin-bottom: 0.2em;
}

.text--note {
  top: 87%;
  font-size: 0.8em;
  color: var(--muted-color);
}

.ui {
  pointer-events: auto;
  color: var(--text-color);
  position: relative;
  width: 100%;
  height: 100%;
}

.ui,
.ui__background,
.ui__game,
.ui__texts {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.ui__background {
  display: none;
}

.ui__background:after {
  display: none;
}

.ui__game {
  pointer-events: all;
  z-index: 2;
}

.ui__game canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.cube-container {
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: visible;
  border-radius: 0;
}

@media (max-width: 768px) {
  
  .about-content {
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
  }
  
  .about-text {
    order: 2 !important;
  }
  
  .about-aside {
    order: 1 !important;
    width: 280px !important;
    height: 280px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  
  .about-aside .profile-small {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    display: block !important;
    margin: 0 !important;
    transform: scale(1.7) !important;
    border-radius: 12px !important;
  }

  .experience-carousel-viewport {
    width: 100% !important;
    max-width: 90vw !important;
    margin: 0 auto !important;
  }
  
  .experience-carousel-container {
    justify-content: center !important;
    gap: 8px !important;
    padding: 0 12px !important;
  }
  
  .carousel-nav {
    display: flex !important;
    width: 40px !important;
    height: 40px !important;
  }
  
  .carousel-nav svg {
    width: 20px !important;
    height: 20px !important;
  }
  
  .experience-carousel {
    gap: 8px !important;
  }

  .contact-section-wrapper {
    flex-direction: column !important;
    gap: 24px !important;
    align-items: center !important;
  }

  .contact-wrapper {
    flex: 1 1 100% !important;
    min-width: auto !important;
    width: 100% !important;
    max-width: 90vw !important;
  }
  
  .cube-container {
    flex: 1 1 100% !important;
    min-width: auto !important;
    width: 100% !important;
    max-width: 90vw !important;
    min-height: 400px !important;
    display: block !important;
    background: transparent !important;
  }

  .text--title {
    font-size: 1.6em;
  }

  .projects-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
  }
  
  .project-item {
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .project-item .card {
    min-height: 300px !important;
  }

  .overview {
    padding: 0 18px !important;
  }

  .contact-card {
    padding: 40px 24px !important;
  }
  
  .contact-head h2 {
    font-size: 32px !important;
  }
  
  .form-row {
    flex-direction: column !important;
  }
  
  .form-row > div {
    width: 100% !important;
    min-width: auto !important;
  }

  .container {
    padding: 0 16px !important;
  }
}

.wrapper {
  width: 90%;
  margin: 0 auto;
  max-width: 80rem;
}

.cols {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 10rem;
}

.col {
  width: calc(50% - 2rem);
  margin: 1rem;
  cursor: pointer;
}

.container {
  transform-style: preserve-3d;
  perspective: 1000px;
}

.front,
.back {
  background-size: cover;
  box-shadow: 0 4px 8px 0 rgba(0,0,0,0.25);
  border-radius: 10px;
  background-position: center;
  transition: transform .7s cubic-bezier(0.4, 0.2, 0.2, 1);
  backface-visibility: hidden;
  text-align: center;
  min-height: 350px;
  height: auto;
  border-radius: 10px;
  color: #fff;
  font-size: 2.5rem;
}

.front {
  position: relative;
  background-color: rgba(var(--surface-rgb,170,188,189), 0.06);
  border: 1px solid rgba(var(--accent-rgb,31,58,107), 0.06);
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  box-shadow: 0 18px 42px rgba(11,33,56,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-logo-flip {
  width: auto;
  max-width: 80%;
  height: auto;
  max-height: 320px;
  object-fit: contain;
  display: block;
  z-index: 10;
  position: static;
}

html[data-theme="dark"] .front {
  background-color: rgba(var(--surface-dark-rgb,13,23,36), 0.28);
  border: 1px solid rgba(255,255,255,0.04);
  box-shadow: 0 12px 30px rgba(0,0,0,0.5);
}

.front:after {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  content: '';
  display: block;
  opacity: 0;
  background-color: transparent;
  backface-visibility: hidden;
  border-radius: 10px;
}

.back {
  background: rgba(var(--surface-rgb,170,188,189), 0.06) !important;
  border: 1px solid rgba(var(--accent-rgb,31,58,107), 0.06);
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  box-shadow: 0 18px 42px rgba(11,33,56,0.12);
}

html[data-theme="dark"] .back {
  background: rgba(var(--surface-dark-rgb,13,23,36), 0.28) !important;
  border: 1px solid rgba(255,255,255,0.04);
  box-shadow: 0 12px 30px rgba(0,0,0,0.5);
}

.container:hover .front,
.container:hover .back {
  transition: transform .7s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

.inner {
  transform: translateY(-50%) translateZ(60px) scale(0.94);
  top: 50%;
  position: absolute;
  left: 0;
  width: 100%;
  padding: 2.8rem;
  box-sizing: border-box;
  outline: 1px solid transparent;
  perspective: inherit;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.container .back {
  transform: rotateY(180deg);
  transform-style: preserve-3d;
}

.container .front {
  transform: rotateY(0deg);
  transform-style: preserve-3d;
}

.container:hover .back {
  transform: rotateY(0deg);
  transform-style: preserve-3d;
}

.container:hover .front {
  transform: rotateY(-180deg);
  transform-style: preserve-3d;
}

.col.hover .back {
  transform: rotateY(0deg);
  transform-style: preserve-3d;
}

.col.hover .front {
  transform: rotateY(-180deg);
  transform-style: preserve-3d;
}

.front .inner p {
  font-size: 2rem;
  margin-bottom: 2rem;
  position: relative;
}

.front .inner p:after {
  content: '';
  width: 4rem;
  height: 2px;
  position: absolute;
  background: #C6D4DF;
  display: block;
  left: 0;
  right: 0;
  margin: 0 auto;
  bottom: -.75rem;
}

.front .inner span {
  color: rgba(255,255,255,0.7);
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
}

.back .inner p {
  font-size: 1.4rem;
  line-height: 1.6;
}

@media screen and (max-width: 64rem) {
  .col {
    width: calc(33.333333% - 2rem);
  }
}

@media screen and (max-width: 48rem) {
  .col {
    width: calc(50% - 2rem);
  }
}

@media screen and (max-width: 32rem) {
  .col {
    width: 100%;
    margin: 0 0 2rem 0;
  }
}

.repos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.repo-card {
  background-color: rgba(var(--surface-rgb,170,188,189), 0.06);
  border: 1px solid rgba(var(--accent-rgb,31,58,107), 0.06);
  border-radius: 10px;
  padding: 1.5rem;
  backdrop-filter: blur(8px) saturate(120%);
  transition: all 0.3s cubic-bezier(0.4, 0.2, 0.2, 1);
  display: flex;
  flex-direction: column;
}

html[data-theme="dark"] .repo-card {
  background-color: rgba(var(--surface-dark-rgb,13,23,36), 0.28);
  border: 1px solid rgba(255,255,255,0.04);
  box-shadow: 0 12px 30px rgba(0,0,0,0.5);
}

.repo-card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--accent-rgb,31,58,107), 0.12);
}

html[data-theme="dark"] .repo-card:hover {
  border-color: rgba(255,255,255,0.08);
  box-shadow: 0 16px 40px rgba(0,0,0,0.6);
}

.repo-name {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--primary-color);
}

.repo-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0.5rem 0 1rem 0;
  flex-grow: 1;
  line-height: 1.5;
}

.repo-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(var(--accent-rgb,31,58,107), 0.1);
}

html[data-theme="dark"] .repo-meta {
  border-top: 1px solid rgba(255,255,255,0.05);
}

.repo-language {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.repo-language-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #40A8C6;
}

.repo-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}

.repo-link:hover {
  opacity: 0.8;
}
