/* 
 * Modern Portfolio Styles
 * Font: Inter
 * Colors: White, Black, Dark Blue accents
 */

:root {
  /* Color Palette */
  --bg-color: #ffffff;
  --bg-light: #f9fafb; /* Very light cool grey */
  --text-main: #1f2937; /* Gray 800 */
  --text-muted: #4b5563; /* Gray 600 */
  --primary: #0f172a; /* Slate 900 - Dark Blue/Black */
  --accent: #2563eb; /* Blue 600 - Highlighting */
  --white: #ffffff;

  /* Layout */
  --container-width: 75rem;
  --nav-height: 5rem;

  /* Transitions */
  --transition: all 0.3s ease;
}

/* Base & Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px; /* Base font size kept as reference for rems */
  /* Use a negative offset relative to nav height to consume some of the section padding */
  scroll-padding-top: calc(var(--nav-height) - 2rem);
}

body {
  font-family: "Inter", sans-serif;
  color: var(--text-main);
  background-color: var(--bg-color);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Utilities */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.text-accent {
  color: var(--accent);
}

.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: 0.375rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
  border: 0.125rem solid var(--primary);
}

.btn-primary:hover {
  background-color: transparent;
  color: var(--primary);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary);
  border: 0.125rem solid var(--primary);
  margin-left: 1rem;
}

.btn-secondary:hover {
  background-color: var(--bg-light);
}

.section {
  padding: 6.25rem 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 3rem;
  color: var(--primary);
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: "";
  display: block;
  width: 3.75rem;
  height: 0.25rem;
  background-color: var(--accent);
  margin-top: 0.5rem;
  border-radius: 0.125rem;
}

.bg-light {
  background-color: var(--bg-light);
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(0.625rem);
  z-index: 1000;
  border-bottom: 0.0625rem solid rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.navbar.scrolled {
  box-shadow: 0 0.25rem 0.375rem -0.0625rem rgba(0, 0, 0, 0.1);
  height: 4.375rem;
}

.navbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.03125rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-weight: 500;
  color: var(--text-muted);
}

.nav-links a:hover {
  color: var(--primary);
}

/* Hero Section */
.hero-section {
  padding: 11.25rem 0 6.25rem;
  min-height: 90vh; /* Almost full height */
  display: flex;
  align-items: center;
  background-image: url("images/tech-desk.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-section .container {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 3rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.hero-title {
  font-size: 4rem;
  line-height: 1.1;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 1.5rem;
  letter-spacing: -0.0625rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-main); /* Darker text for better contrast against glass */
  max-width: 37.5rem;
  margin-bottom: 2.5rem;
}

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(21.875rem, 1fr));
  gap: 2.5rem;
}

.project-card {
  background: var(--white);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 0.25rem 0.375rem -0.0625rem rgba(0, 0, 0, 0.05),
    0 0.125rem 0.25rem -0.0625rem rgba(0, 0, 0, 0.03);
  transition: var(--transition);
  border: 0.0625rem solid rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-0.3125rem);
  box-shadow: 0 1.25rem 1.5625rem -0.3125rem rgba(0, 0, 0, 0.1),
    0 0.625rem 0.625rem -0.3125rem rgba(0, 0, 0, 0.04);
}

.project-image-placeholder {
  height: 13.75rem;
  width: 100%;
  /* Gradient Placeholder as requested */
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  position: relative;
  overflow: hidden;
}

/* Add a subtle visual element to placeholder */
.project-image-placeholder::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.1) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.1) 75%,
    transparent 75%,
    transparent
  );
  background-size: 1.25rem 1.25rem;
  opacity: 0.1;
}

.project-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.project-description {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  flex-grow: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-bottom: 1.5rem;
}

.project-tags li {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  background-color: rgba(37, 99, 235, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: 3.125rem;
}

.project-links {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
}

.link-item {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-main);
  position: relative;
}

.link-item::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 0.125rem;
  bottom: -0.125rem;
  left: 0;
  background-color: var(--accent);
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.3s ease-out;
}

.link-item:hover {
  color: var(--accent);
}

.link-item:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* About Section */
.about-container {
  max-width: 50rem;
}

.about-content p {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}

/* Contact Section */
.contact-container {
  text-align: center;
  max-width: 37.5rem;
}

.contact-text {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.big-btn {
  padding: 1rem 3rem;
  font-size: 1.1rem;
}

/* Footer */
.footer {
  padding: 2.5rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 0.0625rem solid rgba(0, 0, 0, 0.05);
}

/* Responsive Media Queries */
@media (max-width: 768px) {
  .section {
    padding: 3.75rem 0;
  }

  .hero-section {
    padding: 10rem 0 3rem; /* Increased top padding to offset fixed navbar for visual center */
    text-align: center;
    justify-content: center; /* Vertically center content */
    min-height: 100vh; /* full height on mobile */
  }

  /* Add margin to glass container on mobile so it doesn't touch edges */
  .hero-section .container {
    margin: 0 1rem;
    padding: 2rem 1.5rem; /* Slightly reduced padding for mobile */
    width: auto; /* Ensure it respects the margin */
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-cta {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    width: 100%;
  }

  .btn {
    width: 100%;
    max-width: 18.75rem;
    margin-left: 0;
    text-align: center;
  }

  .navbar {
    height: auto;
  }

  .navbar-content {
    flex-direction: column;
    padding: 1.5rem 0 1.5rem;
  }

  .logo {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
  }

  .nav-links {
    margin-bottom: 0.5rem;
    gap: 1.25rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .contact-container,
  .about-container {
    text-align: left;
  }
}
