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

:root {
  --border-color: rgba(255, 255, 255, 0.12);
  --bg-color: #000000;
  --panel-bg: rgba(0, 0, 0, 0.4);
  --text-main: #ffffff;
  --text-muted: #888888;
  --apple-ease: cubic-bezier(0.25, 1, 0.5, 1);
  --apple-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --accent-blue: #ffffff;
  --accent-purple: #444444;
}

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

body, html {
  width: 100%;
  height: 100%;
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow: hidden; /* Prevent scrolling */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Base Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

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

/* Overall Layout Grid */
.app-layout {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-columns: 380px 1fr 380px;
  grid-template-rows: 80px 1fr 1fr;
  perspective: 1500px;
  background: var(--bg-color);
  overflow: hidden;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.8s var(--apple-ease), transform 0.8s var(--apple-ease);
}

body.loaded .app-layout {
  opacity: 1;
  transform: translateY(0);
}

.fade-out {
  opacity: 0 !important;
  transform: translateY(-10px) !important;
  transition: opacity 0.5s var(--apple-ease), transform 0.5s var(--apple-ease) !important;
}

/* Nebula Background Effect - Monochromatic */
.app-layout::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.01) 0%, transparent 60%);
  filter: blur(100px);
  animation: nebulaSwirl 40s infinite linear;
  z-index: -1;
}

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

/* Column Borders */
.app-layout > div {
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: relative;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: var(--panel-bg);
  transition: background 0.5s var(--apple-ease);
}

.app-layout > div:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* ------------- TOP NAVIGATION ------------- */
.nav-left {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  flex-direction: row !important;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  animation: fadeInDown 1s var(--apple-ease) forwards;
  opacity: 0;
}

.nav-center {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  animation: fadeInDown 1s var(--apple-ease) 0.1s forwards;
  opacity: 0;
}

.nav-right {
  grid-column: 3 / 4;
  grid-row: 1 / 2;
  flex-direction: row !important;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
  font-size: 0.85rem;
  font-weight: 500;
  animation: fadeInDown 1s var(--apple-ease) 0.2s forwards;
  opacity: 0;
}

.nav-left .flex-row, .nav-right .flex-row {
  transition: transform 0.3s var(--apple-spring), color 0.3s ease;
}

.nav-left .flex-row:hover, .nav-right .flex-row:hover {
  transform: scale(1.05);
  color: #fff;
}

/* ------------- LEFT PANEL ------------- */
.panel-left-top {
  grid-column: 1 / 2;
  grid-row: 2 / 3;
  padding: 40px 30px;
  justify-content: center;
  animation: fadeInLeft 1s var(--apple-ease) 0.3s forwards;
  opacity: 0;
}

.panel-left-top h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 4.5rem;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 0.95;
  letter-spacing: -3px;
  background: linear-gradient(180deg, #ffffff 0%, #888888 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-left: 20px;
}

.panel-left-bottom {
  grid-column: 1 / 2;
  grid-row: 3 / 4;
  padding: 40px 30px;
  justify-content: flex-end; 
  animation: fadeInLeft 1s var(--apple-ease) 0.4s forwards;
  opacity: 0;
}

.panel-left-bottom p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 30px;
  max-width: 250px;
  font-weight: 300;
}

.panel-left-bottom p strong {
  color: var(--text-main);
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
}

.btn-discover {
  display: inline-block;
  padding: 14px 28px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.4s var(--apple-ease);
  align-self: flex-start;
  margin-bottom: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-discover:hover {
  background: #ffffff;
  color: #000000;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 25px rgba(255, 255, 255, 0.15);
}

.btn-discover:active {
  transform: translateY(0) scale(0.98);
}

.socials {
  display: flex;
  gap: 15px;
  margin-top: auto;
}

.socials svg {
  width: 22px;
  height: 22px;
  stroke: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s var(--apple-spring);
}

.socials svg:hover {
  stroke: var(--text-main);
  transform: translateY(-3px) scale(1.1);
}

/* ------------- CENTER PANEL ------------- */
.panel-center {
  grid-column: 2 / 3;
  grid-row: 2 / 4;
  padding: 0;
  position: relative;
  background: radial-gradient(circle at center, rgba(255,255,255,0.03) 0%, transparent 80%);
  animation: scaleIn 1.5s var(--apple-ease) forwards;
  opacity: 0;
  overflow: visible;
}

spline-viewer {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  background: transparent;
  transition: transform 0.1s ease-out; /* For JS Mouse Parallax */
  filter: grayscale(1);
}

/* Glow effect behind robot */
.panel-center::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 90vh;
  height: 90vh;
  margin-top: -45vh;
  margin-left: -45vh;
  background: radial-gradient(circle, rgba(255,255,255,0.18) 0%, transparent 60%);
  filter: blur(50px);
  z-index: 0;
  pointer-events: none;
}

/* Refined crosshair */
.crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  border: 1px dashed rgba(255,255,255,0.05);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  transition: transform 1s var(--apple-ease);
}

/* ------------- RIGHT PANEL ------------- */
.panel-right-top {
  grid-column: 3 / 4;
  grid-row: 2 / 3;
  padding: 40px 30px;
  justify-content: center;
  align-items: center;
  position: relative;
  animation: fadeInRight 1s var(--apple-ease) 0.5s forwards;
  opacity: 0;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  align-items: flex-end; /* Align to the right edge */
}

.side-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all 0.4s var(--apple-ease);
  position: relative;
  opacity: 0.7;
}

.side-nav a::after {
  content: '';
  position: absolute;
  right: -15px; /* Tiny indicator dot to the right */
  top: 50%;
  transform: translateY(-50%) scale(0);
  width: 4px;
  height: 4px;
  background: var(--text-main);
  border-radius: 50%;
  transition: transform 0.4s var(--apple-spring);
}

.side-nav a:hover, .side-nav a.active {
  color: var(--text-main);
  opacity: 1;
  transform: translateX(-5px); /* Slide left slightly on hover */
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.side-nav a:hover::after, .side-nav a.active::after {
  transform: translateY(-50%) scale(1);
}

.panel-right-bottom {
  grid-column: 3 / 4;
  grid-row: 3 / 4;
  padding: 40px 30px;
  justify-content: center;
  align-items: flex-end;
  text-align: right;
  animation: fadeInRight 1s var(--apple-ease) 0.6s forwards;
  opacity: 0;
}

.panel-right-bottom h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.2rem;
  font-weight: 400;
  margin-bottom: 15px;
  background: linear-gradient(90deg, #fff, #888);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.panel-right-bottom p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 15px;
  font-weight: 300;
}

.socials-right {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
  justify-content: flex-end;
}

.socials-right svg {
  width: 22px;
  height: 22px;
  stroke: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s var(--apple-spring);
}

.socials-right svg:hover {
  stroke: var(--text-main);
  transform: translateY(-3px) scale(1.1);
}

.action-row {
  display: flex;
  align-items: center;
  gap: 15px;
  cursor: pointer;
  width: max-content;
}

.action-icon {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s var(--apple-spring);
  background: rgba(255,255,255,0.02);
}

.action-row:hover .action-icon {
  background: #fff;
  color: #000;
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(255,255,255,0.2);
}

.action-row:hover .action-icon svg {
  stroke: #000;
}

.action-row span {
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.85rem;
  transition: color 0.3s ease;
}

.action-row:hover span {
  color: #fff;
}

.page-indicator {
  position: absolute;
  bottom: 30px;
  left: 30px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  color: rgba(255,255,255,0.3);
  font-weight: 300;
}
.page-indicator span {
  color: #fff;
  font-weight: 400;
}

/* Generic Utilities */
.flex-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Tech circuit vines styling */
.tech-vine {
  position: absolute;
  left: -20px;
  width: 180px;
  height: 180px;
  pointer-events: none;
  z-index: 0;
  color: var(--text-main);
  animation: svgGlow 4s infinite alternate;
  opacity: 0.8;
}

.top-left-vine {
  top: 0px;
}

.bottom-left-vine {
  top: 10px;
}

.top-right-vine {
  top: 0px;
  left: auto;
  right: -20px;
  transform: scaleX(-1);
}

.bottom-right-vine {
  top: 10px;
  left: auto;
  right: -20px;
  transform: scaleX(-1);
}

@keyframes svgGlow {
  0% { filter: drop-shadow(0 0 2px rgba(255,255,255,0.1)); }
  100% { filter: drop-shadow(0 0 10px rgba(255,255,255,0.5)); }
}

/* ------------- ABOUT PAGE COMPONENT ------------- */
.about-card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 700px;
  background: rgba(10, 10, 14, 0.4);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 50px;
  z-index: 10;
  box-shadow: 
    0 40px 100px rgba(0,0,0,0.6), 
    inset 0 0 0 1px rgba(255,255,255,0.05),
    inset 0 1px 1px rgba(255,255,255,0.2);
  animation: slideUpFloat 1.2s var(--apple-spring) forwards;
  opacity: 0;
  color: var(--text-main);
  transition: transform 0.2s ease-out;
}

@keyframes slideUpFloat {
  0% { opacity: 0; transform: translate(-50%, -45%) scale(0.98); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.about-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.8rem;
  margin-bottom: 25px;
  background: linear-gradient(135deg, #fff 0%, #a1a1a6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
  letter-spacing: -1px;
}

.about-lead {
  font-size: 1.25rem;
  line-height: 1.6;
  font-weight: 500;
  margin-bottom: 30px;
  color: #ffffff;
}

.about-body p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 20px;
  font-weight: 300;
}

.traits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.trait-badge {
  display: flex;
  align-items: center;
  gap: 15px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 15px 20px;
  border-radius: 16px;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: all 0.4s var(--apple-spring);
  color: #e5e5ea;
}

.trait-badge svg {
  width: 20px;
  height: 20px;
  stroke: #8e8e93;
  transition: all 0.3s ease;
}

.trait-badge:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-5px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 15px 30px rgba(0,0,0,0.4);
  color: #fff;
}

.trait-badge:hover svg {
  stroke: #fff;
  filter: drop-shadow(0 0 5px rgba(255,255,255,0.5));
}

/* ------------- CIRCUIT TRACKS ------------- */
.circuit-track {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.1) 20%, rgba(255,255,255,0.1) 80%, transparent);
  z-index: 1;
}

.track-left {
  left: 60px;
}

.track-right {
  right: 60px;
}

.circuit-track::before {
  content: '';
  position: absolute;
  top: 0;
  left: -1px;
  width: 3px;
  height: 100px;
  background: linear-gradient(to bottom, transparent, #fff, transparent);
  animation: trackFlow 4s infinite linear;
}

@keyframes trackFlow {
  0% { transform: translateY(-100px); }
  100% { transform: translateY(100vh); }
}

/* Updated Tech Vine Position */
.tech-vine {
  position: absolute;
  width: 250px;
  height: auto;
  pointer-events: none;
  z-index: 0;
  color: var(--text-main);
  opacity: 0.4;
  transition: opacity 0.5s ease;
}

.top-left-vine { top: 0; left: 0; }
.bottom-left-vine { bottom: 0; left: 0; }
.top-right-vine { top: 0; right: 0; transform: scaleX(-1); }
.bottom-right-vine { bottom: 0; right: 0; transform: scaleX(-1); }

/* Glow effect refinement */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}

.orb-1 {
  width: 60vh; height: 60vh;
  top: 10%; left: 10%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
  animation: floatOrb 20s infinite alternate linear;
}

.orb-2 {
  width: 70vh; height: 70vh;
  bottom: 10%; right: 10%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
  animation: floatOrb 25s infinite alternate-reverse linear;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(50px, -50px) scale(1.1); }
  66% { transform: translate(-30px, 40px) scale(0.9); }
  100% { transform: translate(0, 0) scale(1); }
}

/* ------------- SKILLS PAGE ------------- */
.skills-card {
  max-height: 85vh;
  overflow-y: auto;
  padding: 40px;
}

.skills-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.skill-group h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 15px;
  border-left: 2px solid var(--border-color);
  padding-left: 12px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-main);
  transition: all 0.3s var(--apple-ease);
  cursor: default;
}

.skill-tag:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3);
}

.skill-context {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-main);
  opacity: 0.8;
  padding-left: 14px;
}

.skills-card::-webkit-scrollbar {
  width: 4px;
}

.skills-card::-webkit-scrollbar-track {
  background: transparent;
}

.skills-card::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

/* ------------- CERTIFICATES PAGE ------------- */
.certs-section {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 40px;
  box-sizing: border-box;
}

/* ------------- 3D CERTIFICATE CAROUSEL ------------- */
.carousel-section {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  perspective: 1500px;
}

.carousel-section h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  margin-bottom: 40px;
  color: var(--text-main);
}

.carousel-container {
  position: relative;
  width: 100%;
  max-width: 1000px;
  height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
}

.carousel-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.carousel-item {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 450px;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  opacity: 0;
  visibility: hidden;
  cursor: pointer;
}

.cert-card-3d {
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cert-img {
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  border-radius: 12px;
  background: #111;
}

.cert-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  transition: all 0.6s ease;
}

.carousel-item.active .cert-img img {
  filter: grayscale(0);
}

.cert-details {
  text-align: center;
}

.cert-details h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: var(--text-main);
}

.cert-details p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* 3D States */
.carousel-item.active {
  opacity: 1;
  visibility: visible;
  z-index: 10;
  transform: translate(-50%, -50%) scale(1) translateZ(0);
}

.carousel-item.left {
  opacity: 0.4;
  visibility: visible;
  z-index: 5;
  left: calc(50% - 150px);
  transform: translate(-100%, -50%) scale(0.8) translateZ(-200px) rotateY(20deg);
}

.carousel-item.right {
  opacity: 0.4;
  visibility: visible;
  z-index: 5;
  left: calc(50% + 150px);
  transform: translate(0%, -50%) scale(0.8) translateZ(-200px) rotateY(-20deg);
}

.carousel-item.hidden {
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -50%) scale(0.5) translateZ(-500px);
}

/* Nav Buttons */
.carousel-nav {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s var(--apple-ease);
  z-index: 20;
}

.carousel-nav:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.1) translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3);
}

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

/* Dots */
.carousel-dots {
  display: flex;
  gap: 15px;
  margin-top: 40px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  background: var(--text-main);
  transform: scale(1.4);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

/* Responsive */
@media (max-width: 1100px) {
  .carousel-item {
    width: 380px;
  }
}

@media (max-width: 900px) {
  .carousel-item {
    width: 320px;
  }
  .carousel-item.left {
    left: calc(50% - 120px);
  }
  .carousel-item.right {
    left: calc(50% + 120px);
  }
}

@media (max-width: 600px) {
  .carousel-item {
    width: 280px;
  }
  .carousel-item.left, .carousel-item.right {
    opacity: 0;
    visibility: hidden;
  }
  .carousel-nav {
    width: 45px;
    height: 45px;
  }
}

/* ------------- PROJECTS PAGE ------------- */
.projects-section {
  padding: 40px;
  overflow-y: auto;
  max-height: 85vh;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.project-card {
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 250px;
}

.project-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 2px;
  margin-bottom: 20px;
  display: block;
}

.project-card h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  margin-bottom: 15px;
  color: var(--text-main);
}

.project-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-tags span {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 4px;
  color: var(--text-main);
}

/* ------------- CONTACT PAGE ------------- */
.contact-card {
  max-width: 600px;
  margin: 0 auto;
  padding: 50px;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 25px;
  margin: 40px 0;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 20px;
}

.contact-item svg {
  width: 24px;
  height: 24px;
  color: var(--text-main);
  opacity: 0.6;
}

.contact-text {
  display: flex;
  flex-direction: column;
}

.contact-text span {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.contact-text a {
  color: var(--text-main);
  text-decoration: none;
  font-size: 1.1rem;
  transition: opacity 0.3s ease;
}

.contact-text a:hover {
  opacity: 0.7;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: flex;
  gap: 20px;
}

.form-row input, .contact-form textarea {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 15px;
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  width: 100%;
}

.contact-form button {
  align-self: flex-start;
  padding: 15px 40px;
}

/* Scrollbar for projects */
.projects-section::-webkit-scrollbar {
  width: 4px;
}

.projects-section::-webkit-scrollbar-track {
  background: transparent;
}

.projects-section::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

/* Base Trait Grid Adjustments */
.traits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-top: 30px;
}

/* Name Glow effect */
.name-glow {
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.5), 0 0 40px rgba(255, 255, 255, 0.2);
  animation: nameGlowPulse 3s infinite alternate ease-in-out;
}

@keyframes nameGlowPulse {
  from { text-shadow: 0 0 15px rgba(255, 255, 255, 0.4), 0 0 30px rgba(255, 255, 255, 0.1); }
  to { text-shadow: 0 0 30px rgba(255, 255, 255, 0.8), 0 0 60px rgba(255, 255, 255, 0.4); }
}

.short-message {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 10px;
  font-weight: 300;
  letter-spacing: 1px;
  animation: fadeInUp 2s ease-out;
}

/* Project Card Link styles */
.project-card {
  position: relative;
  transition: all 0.4s var(--apple-ease) !important;
}

.project-card:hover {
  transform: translateY(-5px) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4) !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

.btn-view {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.3s var(--apple-ease);
  width: max-content;
}

.btn-view:hover {
  background: #fff;
  color: #000;
  border-color: #fff;
  transform: scale(1.05);
}

.btn-view svg {
  width: 14px;
  height: 14px;
  transition: transform 0.3s ease;
}

.btn-view:hover svg {
  transform: translateX(3px);
  stroke: #000;
}

/* Project Image Styling */
.project-img {
  width: 100%;
  height: 160px;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--apple-ease);
  filter: grayscale(0.2);
}

.project-card:hover .project-img img {
  transform: scale(1.08);
  filter: grayscale(0);
}

/* Adjust project grid for 5 items */
.projects-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

@media (max-width: 1400px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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