/* ==========================================================================
   CSS Variables & Design Tokens
   ========================================================================== */
:root {
  --bg-color: #121417;
  --card-bg: #1a1d24;
  --card-border: #2a2e39;
  --text-main: #e1e4ea;
  --text-muted: #9aa0a6;
  --accent-color: #3b82f6;
  --accent-hover: #2563eb;
  --tag-bg: #222733;
  --max-width: 900px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-family);
  line-height: 1.6;
  padding-top: 70px; /* Offset for fixed navbar */
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

hr.divider {
  border: 0;
  height: 1px;
  background: var(--card-border);
  margin: 40px 0;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(18, 20, 23, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--card-border);
  z-index: 100;
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-main);
  text-decoration: none;
}

.logo span {
  color: var(--accent-color);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 20px;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

nav a:hover {
  color: var(--text-main);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  padding: 60px 0 20px 0;
}

.greeting {
  font-family: var(--font-mono);
  color: var(--accent-color);
  font-size: 0.95rem;
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  margin: 5px 0 10px 0;
  color: #ffffff;
}

.subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 15px;
}

.intro-text {
  max-width: 650px;
  font-size: 1.05rem;
  margin-bottom: 25px;
}

.hero-actions {
  display: flex;
  gap: 15px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background-color 0.2s ease;
}

.btn-primary {
  background-color: var(--accent-color);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
}

.btn-secondary {
  background-color: var(--card-bg);
  color: var(--text-main);
  border: 1px solid var(--card-border);
}

.btn-secondary:hover {
  background-color: var(--card-border);
}

/* ==========================================================================
   Sections General
   ========================================================================== */
.section {
  padding: 20px 0;
}

.section h2 {
  font-size: 1.6rem;
  margin-bottom: 20px;
  position: relative;
}

.about-content p {
  margin-bottom: 15px;
  color: var(--text-main);
}

/* ==========================================================================
   Projects Section
   ========================================================================== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.project-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project-header {
  margin-bottom: 12px;
}

.project-header h3 {
  font-size: 1.15rem;
  color: #ffffff;
  margin-bottom: 6px;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-color);
  background-color: var(--tag-bg);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--card-border);
}

.project-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 15px;
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.tech-list li {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background-color: var(--bg-color);
  padding: 3px 8px;
  border-radius: 4px;
  color: var(--text-main);
}

/* ==========================================================================
   Skills Section
   ========================================================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
}

.skill-group h3 {
  font-size: 1.05rem;
  color: var(--accent-color);
  margin-bottom: 12px;
}

.skill-group ul {
  list-style: none;
}

.skill-group li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 8px;
  color: var(--text-main);
  font-size: 0.95rem;
}

.skill-group li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent-color);
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 15px;
}

.contact-item {
  display: inline-block;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 12px 16px;
  border-radius: 6px;
  color: var(--text-main);
  text-decoration: none;
  max-width: fit-content;
  transition: border-color 0.2s ease;
}

.contact-item:hover {
  border-color: var(--accent-color);
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
  margin-top: 60px;
  padding: 30px 0;
  border-top: 1px solid var(--card-border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */
@media (max-width: 600px) {
  body {
    padding-top: 100px;
  }

  .nav-container {
    flex-direction: column;
    gap: 10px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero-actions {
    flex-direction: column;
  }
}