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

:root {
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --bg-elevated: #1a1a26;
  --text: #e8e8ed;
  --text-muted: #8888a0;
  --accent: #22d3ee;
  --accent-dim: rgba(34, 211, 238, 0.1);
  --accent-glow: rgba(34, 211, 238, 0.3);
  --border: #2a2a3a;
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --matrix: #00ff41;
  --matrix-dim: rgba(0, 255, 65, 0.08);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

#matrixCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
}

.page-overlay {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.navbar.scrolled {
  border-bottom-color: var(--border);
}

.navbar-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 68px;
}

.navbar-logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.navbar-logo::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  margin-left: 4px;
  vertical-align: super;
}

.navbar-menu {
  display: flex;
  list-style: none;
  gap: 32px;
}

.navbar-menu a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  padding: 4px 0;
}

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

.navbar-menu a:hover {
  color: var(--text);
}

.navbar-menu a:hover::after {
  width: 100%;
}

.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.navbar-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

.navbar-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.navbar-toggle.active span:nth-child(2) {
  opacity: 0;
}

.navbar-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Visitor Counter */
.visitor-counter {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
  backdrop-filter: blur(8px);
}

.visitor-counter svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

#visitorCount {
  color: var(--accent);
  font-weight: 700;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 120px 24px 80px;
  overflow: hidden;
  background: transparent;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.hero-badge {
  display: inline-block;
  padding: 8px 20px;
  background: var(--accent-dim);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.5px;
}

.hero-profile {
  width: 400px;
  height: 400px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--accent);
  box-shadow: 0 0 40px var(--accent-glow);
  transition: var(--transition);
}

.hero-profile:hover {
  transform: scale(1.05);
  box-shadow: 0 0 60px var(--accent-glow);
}

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

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -2px;
  color: var(--text);
  min-height: 1.2em;
}

.typewriter {
  display: inline-block;
  color: var(--text);
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.6), 0 0 30px rgba(34, 211, 238, 0.3);
  border-right: 3px solid var(--accent);
  animation: twBlink 0.7s step-end infinite;
  padding-right: 4px;
}

@keyframes twBlink {
  50% { border-color: transparent; }
}

.hero-highlight {
  background: linear-gradient(135deg, var(--accent), #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 560px;
  line-height: 1.8;
  text-align: left;
}

.desc-indent-1 {
  display: block;
  padding-left: 0;
}

.desc-indent-2 {
  display: block;
  padding-left: 4em;
}

.desc-indent-3 {
  display: block;
  padding-left: 8em;
}

.hero-tech {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-tech .tech-link {
  padding: 6px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
}

.hero-tech .tech-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 0 20px var(--accent-glow);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: heroScroll 2s ease-in-out infinite;
}

@keyframes heroScroll {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(8px); opacity: 1; }
}

/* Section Headers */
.section-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 48px;
}

.section-number {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 2px;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -1px;
}

section {
  padding: 100px 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.btn-sm {
  padding: 10px 22px;
  font-size: 0.85rem;
}

.mockup-links {
  display: flex;
  gap: 8px;
}

.mockup-links .btn {
  flex: 1;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  box-shadow: 0 0 30px var(--accent-glow);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

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

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: var(--text);
}

/* About */
.about {
  background: transparent;
}

.about-grid {
  max-width: 800px;
  margin: 0 auto;
}

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

.about-text strong {
  color: var(--accent);
  font-weight: 600;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: var(--transition);
}

.stat-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(34, 211, 238, 0.1);
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Stack */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  perspective: 1200px;
}

.stack-category {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: transform 0.05s linear, border-color 0.3s ease, box-shadow 0.3s ease;
  transform-style: preserve-3d;
  position: relative;
  cursor: default;
}

.stack-category::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--accent), transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.stack-category:hover {
  border-color: transparent;
  box-shadow: 0 20px 60px rgba(34, 211, 238, 0.12);
}

.stack-category:hover::before {
  opacity: 1;
}

.stack-category-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  letter-spacing: -0.3px;
  transform: translateZ(30px);
}

.stack-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stack-item,
a.stack-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform: translateZ(15px);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.stack-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--accent-dim), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stack-item:hover {
  color: var(--accent);
  transform: translateZ(25px) translateX(6px) scale(1.02);
  box-shadow: 0 8px 25px rgba(34, 211, 238, 0.1);
}

.stack-item:hover::after {
  opacity: 1;
}

.stack-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--accent);
  transition: transform 0.3s ease;
  position: relative;
  z-index: 1;
}

.stack-item:hover svg {
  transform: scale(1.2) rotate(-5deg);
}

.stack-category:nth-child(1) { --glow: rgba(34, 211, 238, 0.15); }
.stack-category:nth-child(2) { --glow: rgba(34, 211, 238, 0.15); }
.stack-category:nth-child(3) { --glow: rgba(34, 211, 238, 0.15); }
.stack-category:nth-child(4) { --glow: rgba(34, 211, 238, 0.15); }
.stack-category:nth-child(5) { --glow: rgba(34, 211, 238, 0.15); }
.stack-category:nth-child(6) { --glow: rgba(34, 211, 238, 0.15); }

.stack-item span {
  position: relative;
  z-index: 1;
}

/* Timeline / Experience */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  perspective: 1200px;
}

.mockup-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.1s linear;
  transform-style: preserve-3d;
}

.mockup-card .mockup {
  flex-shrink: 0;
}

.mockup-card .mockup-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
  transform: translateZ(15px);
}

.mockup-card .mockup-info p {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mockup {
  position: relative;
  cursor: pointer;
  transform-style: preserve-3d;
}

.mockup-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  border: 3px solid var(--border);
  border-bottom: none;
  background: var(--bg);
  transform: translateZ(20px);
  transition: border-color 0.3s ease;
}

.mockup-card:hover .mockup-screen {
  border-color: var(--accent);
}

.mockup-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.mockup-base {
  width: 105%;
  height: 18px;
  margin: 0 auto;
  background: linear-gradient(180deg, var(--border), var(--bg-card));
  border-radius: 0 0 8px 8px;
  transform: translateZ(10px);
  position: relative;
  left: -2.5%;
}

.mockup-base::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 4px;
}

.mockup-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
  transform: translateZ(15px);
}

.mockup-info h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.mockup-info p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

.mockup-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.mockup-tags span {
  padding: 3px 10px;
  background: var(--accent-dim);
  border: 1px solid rgba(34, 211, 238, 0.15);
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--accent);
}

/* Timeline / Experience */
.timeline {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-left: 60px;
  padding-bottom: 48px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px var(--bg);
}

.timeline-date {
  display: inline-block;
  padding: 4px 14px;
  background: var(--accent-dim);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
}

.timeline-badge {
  display: inline-block;
  padding: 2px 10px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-left: 8px;
}

.timeline-learned {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.timeline-learned strong {
  color: var(--accent);
}

.timeline-content p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
}

.timeline-content strong {
  color: var(--accent);
  font-weight: 600;
}

/* Timeline Sub-items */
.timeline-sub-items {
  margin-top: 16px;
  padding-left: 16px;
  border-left: 2px solid var(--accent);
}

.timeline-sub-item {
  margin-bottom: 16px;
}

.timeline-sub-item:last-child {
  margin-bottom: 0;
}

.timeline-sub-badge {
  display: inline-block;
  background: rgba(34, 211, 238, 0.15);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  vertical-align: middle;
}

.timeline-sub-badge.green {
  background: rgba(0, 255, 136, 0.15);
  color: #00ff88;
}

.timeline-sub-item h4 {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 4px;
}

.timeline-sub-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.timeline-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.timeline-link:hover {
  border-bottom-color: var(--accent);
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.4);
}

/* Strengths */
.strengths {
  background: transparent;
}

.strengths-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  position: relative;
}

.s-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 16px;
  text-align: center;
  transition: transform 0.05s linear, border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  cursor: default;
}

.s-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--card-color);
  box-shadow: 0 0 20px var(--card-color);
}

.s-card:hover {
  border-color: var(--card-color);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.s-ring {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 12px;
}

.s-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.s-ring-bg {
  fill: none;
  stroke: rgba(255,255,255,0.05);
  stroke-width: 6;
}

.s-ring-fill {
  fill: none;
  stroke: var(--card-color);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 314.16;
  stroke-dashoffset: 314.16;
  transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 0 6px var(--card-color));
}

.strengths-grid.visible .s-ring-fill {
  stroke-dashoffset: calc(314.16 - (314.16 * var(--pct) / 100));
}

.s-ring-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.s-number {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--card-color);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.s-number::after {
  content: '%';
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.s-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* Building */
.building {
  background: transparent;
}

.building-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  perspective: 1200px;
}

.building-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  transition: transform 0.05s linear, border-color 0.3s ease, box-shadow 0.3s ease;
  transform-style: preserve-3d;
  position: relative;
  cursor: default;
}

.building-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--accent), transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.building-card:hover {
  border-color: transparent;
  box-shadow: 0 20px 60px rgba(34, 211, 238, 0.12);
}

.building-card:hover::before {
  opacity: 1;
}

.building-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 20px;
  background: var(--accent-dim);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateZ(30px);
}

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

.building-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  transform: translateZ(30px);
}

.building-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  transform: translateZ(15px);
}

.building-progress {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  margin-top: 12px;
  overflow: hidden;
}

.building-progress-bar {
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, var(--accent), var(--accent-glow));
  border-radius: 3px;
  animation: progressPulse 2s ease-in-out infinite;
}

.building-progress-text {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 6px;
}

@keyframes progressPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* GitHub */
.github-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.github-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.github-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  width: 100%;
  perspective: 1200px;
}

.github-stat {
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 16px;
  transition: transform 0.05s linear, border-color 0.3s ease, box-shadow 0.3s ease;
  transform-style: preserve-3d;
  position: relative;
  cursor: default;
}

.github-stat::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--accent), transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.github-stat:hover {
  border-color: transparent;
  box-shadow: 0 20px 60px rgba(34, 211, 238, 0.12);
}

.github-stat:hover::before {
  opacity: 1;
}

.github-stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  text-shadow: 0 0 20px rgba(34, 211, 238, 0.5), 0 0 40px rgba(34, 211, 238, 0.2);
  transform: translateZ(30px);
  line-height: 1;
  margin-bottom: 8px;
}

.github-stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  transform: translateZ(15px);
}

/* Contact */
.contact {
  background: transparent;
}

.contact-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.contact-text {
  font-size: 1.2rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 380px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: var(--transition);
}

.contact-link svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

.contact-link:hover {
  border-color: var(--accent);
  transform: translateX(4px);
}

/* Footer */
.footer {
  padding: 80px 0 50px;
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg) 0%, #050510 100%);
}

.footer-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.footer-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 100%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 100%, black 20%, transparent 70%);
}

.footer-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: footerPulse 6s ease-in-out infinite;
}

.footer-glow-1 {
  width: 400px;
  height: 400px;
  background: var(--accent);
  bottom: -200px;
  left: 10%;
  animation-delay: 0s;
}

.footer-glow-2 {
  width: 300px;
  height: 300px;
  background: #b44dff;
  bottom: -150px;
  right: 15%;
  animation-delay: 2s;
}

.footer-glow-3 {
  width: 250px;
  height: 250px;
  background: #06b6d4;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  animation-delay: 4s;
}

@keyframes footerPulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.15); }
}

.footer-glow-3 {
  animation-name: footerPulse3;
}

@keyframes footerPulse3 {
  0%, 100% { opacity: 0.3; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.6; transform: translateX(-50%) scale(1.15); }
}

.footer-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.footer-brand {
  font-weight: 800;
  font-size: 2.5rem;
  color: var(--text);
  letter-spacing: -1px;
  text-shadow: 0 0 30px rgba(34, 211, 238, 0.4), 0 0 60px rgba(34, 211, 238, 0.2);
}

.footer-dot {
  color: var(--accent);
  text-shadow: 0 0 15px rgba(34, 211, 238, 0.8), 0 0 30px rgba(201, 222, 225, 0.4);
}

.footer-copy {
  color: var(--text-muted);
  font-size: 1.5rem;
  letter-spacing: 0.5px;
  text-shadow: 0 0 10px rgba(194, 212, 214, 0.2);
}

.footer-name {
  color: var(--accent);
  font-weight: 600;
  text-shadow: 0 0 10px rgba(188, 199, 200, 0.3);
}

/* Scroll Animations */
[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].visible {
  opacity: 1;
  transform: translateY(0);
}

[data-animate="fade-right"] {
  transform: translateX(-30px);
}

[data-animate="fade-right"].visible {
  transform: translateX(0);
}

[data-animate="fade-left"] {
  transform: translateX(30px);
}

[data-animate="fade-left"].visible {
  transform: translateX(0);
}

/* Project Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  padding: 24px;
}

.modal-overlay.active {
  display: flex;
}

.project-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  cursor: default;
  animation: modalZoom 0.3s ease;
}

.project-modal-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 400px;
}

.project-modal-image {
  overflow: hidden;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.project-modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-modal-content {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-modal-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.project-modal-content p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.project-modal-content ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.project-modal-content ul li {
  color: var(--text-muted);
  font-size: 0.85rem;
  padding-left: 18px;
  position: relative;
}

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

.project-modal-stack {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.project-modal-stack span {
  padding: 4px 12px;
  background: var(--accent-dim);
  border: 1px solid rgba(34, 211, 238, 0.15);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 2rem;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1;
  z-index: 2;
}

.modal-close-btn:hover {
  color: var(--text);
  transform: rotate(90deg);
}

@keyframes modalZoom {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@media (max-width: 768px) {
  .project-modal-inner {
    grid-template-columns: 1fr;
  }
  .project-modal-image {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 220px;
  }
  .project-modal-content {
    padding: 24px;
  }
}

/* Preloader */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  z-index: 2;
}

.preloader-logo {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -1px;
  text-shadow: 0 0 30px rgba(34, 211, 238, 0.5), 0 0 60px rgba(34, 211, 238, 0.2);
  animation: preloaderPulse 2s ease-in-out infinite;
}

.preloader-dot {
  color: var(--accent);
  text-shadow: 0 0 15px rgba(34, 211, 238, 0.8), 0 0 30px rgba(201, 222, 225, 0.4);
}

.preloader-bar {
  width: 200px;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.preloader-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #06b6d4);
  border-radius: 2px;
  box-shadow: 0 0 10px var(--accent);
  animation: preloaderFill 2s ease-in-out forwards;
}

.preloader-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: preloaderBlink 1s step-end infinite;
}

.preloader-glitch {
  position: absolute;
  font-size: 8rem;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.03;
  letter-spacing: -2px;
  user-select: none;
  pointer-events: none;
}

.preloader-glitch::before,
.preloader-glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.preloader-glitch::before {
  animation: glitch1 2s infinite;
  color: var(--accent);
  clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
}

.preloader-glitch::after {
  animation: glitch2 2s infinite;
  color: #b44dff;
  clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
}

@keyframes preloaderFill {
  0% { width: 0%; }
  50% { width: 70%; }
  100% { width: 100%; }
}

@keyframes preloaderPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.02); }
}

@keyframes preloaderBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes glitch1 {
  0%, 100% { transform: translate(0); }
  20% { transform: translate(-3px, 3px); }
  40% { transform: translate(-3px, -3px); }
  60% { transform: translate(3px, 3px); }
  80% { transform: translate(3px, -3px); }
}

@keyframes glitch2 {
  0%, 100% { transform: translate(0); }
  20% { transform: translate(3px, -3px); }
  40% { transform: translate(3px, 3px); }
  60% { transform: translate(-3px, -3px); }
  80% { transform: translate(-3px, 3px); }
}

/* Certificates */
.certificates-grid {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.certificate-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  max-width: 400px;
  width: 100%;
}

.certificate-images {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 16px;
  min-height: 200px;
}

.certificate-images img {
  width: 120px;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: transform 0.3s ease;
}

.certificate-images img:only-child {
  width: 280px;
}

.certificate-images img:hover {
  transform: scale(1.05);
}

.certificate-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.certificate-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.cert-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.cert-modal-overlay.active {
  display: flex;
}

.cert-modal {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.cert-modal img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: var(--radius);
  object-fit: contain;
}

.cert-modal .modal-close-btn {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}

/* Tab Navigation */
.tab-content {
  display: none;
  animation: tabFadeIn 0.4s ease;
  flex: 1;
}

.tab-content.active {
  display: block;
  min-height: calc(100vh - 68px);
}

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

.navbar-menu a {
  position: relative;
}

.navbar-menu a.active {
  color: var(--accent);
}

.navbar-menu a.active::after {
  width: 100%;
  background: var(--accent);
}

/* Footer always visible */
.footer {
  margin-top: auto;
}

.tab-content {
  padding-bottom: 40px;
}

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

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

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

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

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

  .github-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .footer-content {
    gap: 12px;
  }

  section {
    padding: 64px 0;
  }
}

@media (max-width: 768px) {
  .navbar-toggle {
    display: flex;
  }

  .navbar-menu {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    border-bottom: 1px solid var(--border);
  }

  .navbar-menu.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .hero {
    padding: 100px 16px 60px;
    min-height: auto;
  }

  .hero-profile {
    width: 160px;
    height: 160px;
  }

  .hero-title {
    font-size: 2rem;
    letter-spacing: -1px;
  }

  .hero-badge {
    font-size: 0.75rem;
    padding: 6px 14px;
  }

  .hero-desc {
    font-size: 0.95rem;
  }

  .desc-indent-1,
  .desc-indent-2,
  .desc-indent-3 {
    padding-left: 0;
  }

  .hero-tech {
    gap: 6px;
  }

  .hero-tech .tech-link {
    font-size: 0.75rem;
    padding: 5px 12px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .section-number {
    font-size: 0.75rem;
  }

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

  section {
    padding: 60px 0;
  }

  .about-text p {
    font-size: 0.95rem;
  }

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

  .stack-category {
    padding: 24px;
  }

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

  .mockup-screen {
    aspect-ratio: 16 / 9;
  }

  .mockup-info h3 {
    font-size: 1rem;
  }

  .mockup-tags span {
    font-size: 0.65rem;
    padding: 2px 8px;
  }

  .strengths-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .s-card {
    padding: 20px 12px;
  }

  .s-ring {
    width: 90px;
    height: 90px;
  }

  .s-number {
    font-size: 1.2rem;
  }

  .s-label {
    font-size: 0.75rem;
  }

  .timeline {
    padding-left: 40px;
  }

  .timeline::before {
    left: 12px;
  }

  .timeline-item {
    padding-left: 40px;
  }

  .timeline-item::before {
    left: 4px;
    width: 14px;
    height: 14px;
  }

  .timeline-date {
    font-size: 0.7rem;
    padding: 3px 10px;
  }

  .timeline-content h3 {
    font-size: 0.95rem;
  }

  .timeline-content p {
    font-size: 0.85rem;
  }

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

  .building-card {
    padding: 24px 20px;
  }

  .github-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .github-stat {
    padding: 20px 12px;
  }

  .github-stat-number {
    font-size: 1.8rem;
  }

  .github-stat-label {
    font-size: 0.75rem;
  }

  .github-desc {
    font-size: 0.9rem;
  }

  .contact-text {
    font-size: 1rem;
  }

  .contact-link {
    padding: 12px 16px;
    font-size: 0.9rem;
  }

  .footer {
    padding: 50px 0 30px;
  }

  .footer-brand {
    font-size: 1.8rem;
  }

  .footer-copy {
    font-size: 0.85rem;
  }

  .footer-glow-1 {
    width: 200px;
    height: 200px;
  }

  .footer-glow-2 {
    width: 150px;
    height: 150px;
  }

  .footer-glow-3 {
    width: 120px;
    height: 120px;
  }
}
