/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  cursor: none;
}

:root {
  --background: oklch(0.12 0 0);
  --foreground: oklch(0.98 0 0);
  --primary: oklch(0.65 0.22 250);
  --accent: oklch(0.68 0.18 45);
  --border: oklch(0.25 0 0);
  --radius: 0.75rem;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "SF Mono", Monaco, "Cascadia Code", monospace;
}

body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  overflow: hidden;
  height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Custom Cursor */
#custom-cursor {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 10000;
  mix-blend-mode: difference;
  transition: transform 0.2s ease, opacity 0.2s ease;
  opacity: 0;
}

#custom-cursor.active {
  opacity: 1;
}

#custom-cursor.hover {
  transform: scale(1.5);
}

/* Grain Overlay */
.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='2' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.03;
  animation: grain 8s steps(10) infinite;
}

@keyframes grain {
  0%,
  100% {
    transform: translate(0, 0);
  }
  10% {
    transform: translate(-5%, -10%);
  }
  20% {
    transform: translate(-15%, 5%);
  }
  30% {
    transform: translate(7%, -25%);
  }
  40% {
    transform: translate(-5%, 25%);
  }
  50% {
    transform: translate(-15%, 10%);
  }
  60% {
    transform: translate(15%, 0%);
  }
  70% {
    transform: translate(0%, 15%);
  }
  80% {
    transform: translate(3%, 35%);
  }
  90% {
    transform: translate(-10%, 10%);
  }
}

/* Shader Background */
.shader-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
}

.shader-background.loaded {
  opacity: 1;
}

#shaderCanvas {
  width: 100%;
  height: 100%;
}

.shader-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
}

/* Main Container */
.main-container {
  position: relative;
  z-index: 10;
  height: 100vh;
  opacity: 0;
  transition: opacity 0.7s ease;
}

.main-container.loaded {
  opacity: 1;
}

.scroll-container {
  display: flex;
  height: 100vh;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.scroll-container::-webkit-scrollbar {
  display: none;
}

/* Sections */
.section {
  min-width: 100vw;
  height: 100vh;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 6rem 1.5rem 4rem;
  position: relative;
}

.section-content {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

/* Hero Section */
.hero-section {
  align-items: flex-end;
  padding-bottom: 4rem;
}

.hero-section .section-content {
  max-width: 48rem;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  white-space: pre-line;
}

.hero-description {
  font-size: clamp(1.125rem, 2vw, 1.25rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
  max-width: 36rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Section Headers */
.section-header {
  margin-bottom: 3rem;
}

.section-title {
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  line-height: 1.1;
  white-space: pre-line;
}

.section-subtitle {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

.section-subtitle::before {
  content: "/ ";
}

/* Buttons */
.magnetic-button {
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.magnetic-button.primary {
  background: var(--primary);
  color: var(--foreground);
}

.magnetic-button.primary:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 30px rgba(18, 117, 216, 0.4);
}

.magnetic-button.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--foreground);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.magnetic-button.secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

.magnetic-button.full-width {
  width: 100%;
}

/* Scroll Hint */
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.scroll-hint:hover {
  transform: translateX(-50%) scale(1.1);
}

.scroll-hint-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.scroll-hint-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
}

.scroll-hint-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 1.5rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
}

.scroll-hint-icon svg {
  color: rgba(255, 255, 255, 0.8);
}

/* Projects List */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.project-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.project-card:hover {
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

.project-main {
  display: flex;
  align-items: baseline;
  gap: 2rem;
}

.project-number {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.3);
  transition: color 0.3s ease;
}

.project-card:hover .project-number {
  color: rgba(255, 255, 255, 0.5);
}

.project-info h3 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 300;
  margin-bottom: 0.25rem;
  transition: transform 0.3s ease;
}

.project-card:hover .project-info h3 {
  transform: translateX(0.5rem);
}

.project-category {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

.project-year {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.3);
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
}

.service-card {
  transition: all 0.7s ease;
}

.service-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.service-line {
  height: 1px;
  width: 2rem;
  background: rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.service-card:hover .service-line {
  width: 3rem;
  background: rgba(255, 255, 255, 0.5);
}

.service-number {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

.service-card h3 {
  font-size: 1.5rem;
  font-weight: 300;
  margin-bottom: 0.5rem;
}

.service-card p {
  font-size: 0.875rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  max-width: 28rem;
}

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

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

.skill-card {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  padding: 2rem;
  transition: all 0.7s ease;
}

.skill-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.skill-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.skill-card h3 {
  font-size: clamp(1.875rem, 4vw, 2.25rem);
  font-weight: 300;
  transition: color 0.3s ease;
}

.skill-level {
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.25rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  transition: background 0.3s ease;
}

.skill-card:hover .skill-level {
  background: rgba(255, 255, 255, 0.15);
}

.skill-description {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.6;
}

.skill-accent {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  transform: translate(3rem, 3rem);
  transition: transform 0.5s ease;
}

.skill-card:hover .skill-accent {
  transform: translate(2rem, 2rem);
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about-paragraph {
  font-size: 1.125rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  max-width: 32rem;
}

.about-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stats-list {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.stat-item {
  display: flex;
  align-items: baseline;
  gap: 2rem;
  border-left: 1px solid rgba(255, 255, 255, 0.3);
  padding-left: 2rem;
  transition: all 0.7s ease;
}

.stat-value {
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 300;
}

.stat-label {
  font-size: 1.25rem;
  font-weight: 300;
}

.stat-sublabel {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

.about-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* Contact Section */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
  }
}

.contact-title {
  font-size: clamp(3rem, 8vw, 6rem);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 2rem;
}

.contact-item {
  text-decoration: none;
  color: inherit;
  transition: all 0.7s ease;
}

.contact-item:hover .contact-value {
  color: rgba(255, 255, 255, 0.7);
}

.contact-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.contact-label svg {
  width: 0.75rem;
  height: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

.contact-label span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

.contact-value {
  font-size: 1.5rem;
  transition: color 0.3s ease;
}

.contact-socials {
  display: flex;
  gap: 0.5rem;
  padding-top: 1rem;
  flex-wrap: wrap;
}

.contact-socials a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}

.contact-socials a:hover {
  color: rgba(255, 255, 255, 0.9);
  border-bottom-color: rgba(255, 255, 255, 0.6);
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  transition: all 0.7s ease;
}

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--foreground);
  font-size: 1rem;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.3s ease;
}

.form-input:focus {
  border-bottom-color: rgba(255, 255, 255, 0.5);
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

textarea.form-input {
  resize: vertical;
  min-height: 80px;
}

.form-submit {
  transition: all 0.7s ease;
}

.form-success {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.form-success.show {
  opacity: 1;
}

/* Animations */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.pulse-animation {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Reveal Animations */
.fade-in-bottom {
  opacity: 0;
  transform: translateY(2rem);
  animation: fadeInBottom 1s ease forwards;
}

.fade-in {
  opacity: 0;
  animation: fadeIn 1s ease forwards;
}

.delay-200 {
  animation-delay: 0.2s;
}
.delay-300 {
  animation-delay: 0.3s;
}
.delay-350 {
  animation-delay: 0.35s;
}
.delay-500 {
  animation-delay: 0.5s;
}
.delay-650 {
  animation-delay: 0.65s;
}
.delay-750 {
  animation-delay: 0.75s;
}

@keyframes fadeInBottom {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.reveal-left,
.reveal-right,
.reveal-top,
.reveal-bottom {
  opacity: 0;
  transition: all 0.7s ease;
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-bottom.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  transform: translateX(-4rem);
}
.reveal-right {
  transform: translateX(4rem);
}
.reveal-top {
  transform: translateY(-3rem);
}
.reveal-bottom {
  transform: translateY(2rem);
}

/* Responsive */
@media (max-width: 768px) {
  .section {
    padding: 5rem 1rem 3rem;
  }

  .project-main {
    gap: 1rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .stat-item {
    gap: 1rem;
    padding-left: 1rem;
  }
}
