/* Custom CSS Properties - HSL based */
:root {
  /* Colors */
  --clr-bg: 222 47% 11%;          /* #0f172a - Slate 900 */
  --clr-bg-light: 215 28% 17%;    /* #1e293b - Slate 800 */
  --clr-text: 210 40% 98%;        /* #f8fafc - Slate 50 */
  --clr-text-muted: 215 20% 65%;  /* #94a3b8 - Slate 400 */
  --clr-primary: 199 89% 48%;     /* #0ea5e9 - Sky 500 */
  --clr-primary-hover: 199 89% 40%; /* darker sky */
  --clr-accent: 142 71% 45%;      /* #22c55e - Green 500 */
  
  /* Typography */
  --font-main: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Transitions */
  --transition-fast: 0.2s ease-in-out;
  --transition-normal: 0.3s ease-in-out;
}

/* Reset & Basics */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background-color: hsl(var(--clr-bg));
  color: hsl(var(--clr-text));
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: hsl(var(--clr-primary));
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: hsl(var(--clr-primary-hover));
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 100px 0;
}

.section-title {
  display: flex;
  align-items: center;
  font-size: 2rem;
  margin-bottom: 2.5rem;
  color: hsl(var(--clr-text));
  white-space: nowrap;
}

.section-title::after {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  margin-left: 1.5rem;
  background-color: hsl(var(--clr-bg-light));
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.1;
  color: hsl(var(--clr-text));
}

p {
  color: hsl(var(--clr-text-muted));
  margin-bottom: 1rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.btn-outline {
  color: hsl(var(--clr-primary));
  border-color: hsl(var(--clr-primary));
  background: transparent;
}

.btn-outline:hover {
  background: hsla(var(--clr-primary), 0.1);
  color: hsl(var(--clr-primary));
}

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

.btn-primary:hover {
  background-color: hsl(var(--clr-primary-hover));
  color: hsl(var(--clr-bg));
  transform: translateY(-2px);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background-color: hsla(var(--clr-bg), 0.85);
  backdrop-filter: blur(10px);
  z-index: 100;
  transition: transform var(--transition-normal);
}

.navbar.hidden {
  transform: translateY(-100%);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: hsl(var(--clr-primary));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a:not(.btn) {
  color: hsl(var(--clr-text));
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-links a:not(.btn):hover {
  color: hsl(var(--clr-primary));
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px; /* Offset for navbar */
}

.hero-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4rem;
}

.hero-content {
  flex: 1;
}

.greeting {
  display: block;
  color: hsl(var(--clr-primary));
  margin-bottom: 1.25rem;
  font-family: monospace;
  font-size: 1rem;
}

.hero .name {
  font-size: clamp(3rem, 6vw, 5rem);
  color: hsl(var(--clr-text));
  margin-bottom: 0.5rem;
}

.hero .title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: hsl(var(--clr-text-muted));
  margin-bottom: 1.5rem;
}

.hero .bio {
  max-width: 540px;
  font-size: 1.125rem;
  margin-bottom: 2.5rem;
}

.hero-image-wrapper {
  flex: 1;
  max-width: 400px;
  position: relative;
  width: 100%;
}

.image-bg-shape {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 100%;
  height: 100%;
  border: 2px solid hsl(var(--clr-primary));
  border-radius: 10px;
  z-index: -1;
  transition: transform var(--transition-fast);
}

.hero-image {
  border-radius: 10px;
  filter: grayscale(100%) contrast(1.1);
  transition: all var(--transition-normal);
}

.hero-image-wrapper:hover .hero-image {
  filter: none;
}

.hero-image-wrapper:hover .image-bg-shape {
  transform: translate(10px, 10px);
}

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

.skills-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 200px));
  gap: 0 10px;
  margin-top: 20px;
}

.skills-list li {
  position: relative;
  margin-bottom: 10px;
  padding-left: 20px;
  font-family: monospace;
  font-size: 0.9rem;
  color: hsl(var(--clr-text-muted));
}

.skills-list li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: hsl(var(--clr-primary));
}

/* Projects Section */
.project-card {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: center;
  gap: 10px;
  margin-bottom: 100px;
}

.project-image {
  grid-column: 1 / 8;
  grid-row: 1 / -1;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px -15px hsla(var(--clr-bg), 1);
  transition: all var(--transition-fast);
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal), filter var(--transition-normal);
  filter: grayscale(100%) brightness(0.7) contrast(1.2);
}

.project-image:hover img {
  filter: none;
}

.project-info {
  grid-column: 6 / -1;
  grid-row: 1 / -1;
  position: relative;
  text-align: right;
  z-index: 2;
}

.project-card.reverse .project-image {
  grid-column: 6 / -1;
}

.project-card.reverse .project-info {
  grid-column: 1 / 8;
  text-align: left;
}

.project-overline {
  color: hsl(var(--clr-primary));
  font-family: monospace;
  font-size: 0.875rem;
  margin-bottom: 10px;
  display: block;
}

.project-title {
  font-size: 1.75rem;
  margin-bottom: 20px;
}

.project-description {
  background-color: hsl(var(--clr-bg-light));
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 10px 30px -15px hsla(var(--clr-bg), 1);
  position: relative;
  z-index: 2;
}

.project-tech-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 20px;
  margin: 25px 0 15px;
  font-family: monospace;
  font-size: 0.875rem;
  color: hsl(var(--clr-text-muted));
}

.project-card.reverse .project-tech-list {
  justify-content: flex-start;
}

.project-links {
  display: flex;
  justify-content: flex-end;
  gap: 20px;
}

.project-card.reverse .project-links {
  justify-content: flex-start;
}

.project-links a {
  color: hsl(var(--clr-text-muted));
}

.project-links a:hover {
  color: hsl(var(--clr-primary));
}

@media (max-width: 768px) {
  .section {
    padding: 60px 0;
  }

  .container {
    padding: 0 1.5rem;
  }

  .navbar {
    height: auto;
    padding: 15px 0;
  }

  .nav-container {
    flex-direction: column;
    gap: 15px;
  }

  .nav-links {
    gap: 1rem;
  }

  .nav-links a:not(.btn) {
    font-size: 0.85rem;
  }

  .hero {
    padding-top: 120px;
    text-align: center;
  }
  
  .hero-container {
    flex-direction: column;
    gap: 3rem;
  }
  
  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .hero .bio {
    text-align: center;
  }

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

  .skills-list {
    grid-template-columns: 1fr 1fr;
  }

  .project-card, .project-card.reverse {
    display: flex;
    flex-direction: column;
    margin-bottom: 60px;
  }
  
  .project-image, .project-card.reverse .project-image {
    order: 1;
    margin-bottom: 20px;
    border-radius: 8px;
  }

  .project-image img {
      filter: none;
  }

  .project-info, .project-card.reverse .project-info {
    order: 2;
    text-align: left;
  }

  .project-description {
    background: transparent;
    padding: 0;
    box-shadow: none;
  }

  .project-tech-list, .project-card.reverse .project-tech-list {
    justify-content: flex-start;
  }

  .project-links, .project-card.reverse .project-links {
    justify-content: flex-start;
  }
}

/* Contact Section */
.contact {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.contact-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 20px;
}

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

/* Footer */
footer {
  padding: 30px 0;
  text-align: center;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.social-links a {
  color: hsl(var(--clr-text-muted));
}

.social-links a:hover {
  color: hsl(var(--clr-primary));
  transform: translateY(-3px);
}

.copyright {
  font-family: monospace;
  font-size: 0.875rem;
  color: hsl(var(--clr-text-muted));
  margin: 0;
}
