/*! HTML5 Boilerplate v9.0.1 | MIT License | https://html5boilerplate.com/ */

/* main.css 3.0.0 | MIT License | https://github.com/h5bp/main.css#readme */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

:root {
  /* Primary violet palette */
  --primary-color: #8f00ff;
  --primary-dark: #51008f;
  --primary-hover: #a64dff;        /* lighter for hover states */
  --primary-rgb: 143, 0, 255;      /* for rgba() usage */
  --secondary-color: #6600b4;
  --accent-color: #7500ce;

  /* Backgrounds */
  --background-color: #222;
  --background-secondary: #1f1f1f;
  --nav-background: #1a1a1a;
  --card-bg: #2a2a2a;

  /* Text */
  --text-color: #eee;
  --text-secondary: #aaa;
  --text-muted: #888;
  --text-light: #bbb;

  /* Borders & shadows */
  --border-color: #333;
  --shadow-color: rgba(0, 0, 0, 0.3);

  /* Print */
  --print-bg: #fff;
  --print-text: #000;
  --print-border: #999;
}

@font-face {
  font-family: 'Roboto';
  src: url('./fonts/Roboto.ttf') format('truetype');
}

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

html {
  font-family: Roboto, sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  font-size: 1em;
  line-height: 1.6;
  font-weight: 100;
}

body {
  margin: 0;
  padding: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.navbar {
  background-color: var(--nav-background);
  padding: 1em 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 5px var(--shadow-color);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5em;
  font-weight: 800;
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.logo:hover {
  color: var(--accent-color);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2em;
}

.nav-links a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 1em;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--accent-color);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  padding: 6em 1em;
  text-align: center;
  background: linear-gradient(135deg, var(--background-color) 0%, var(--nav-background) 100%);
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero .container {
  width: 100%;
}

.hero p {
  margin: 0.5em 0;
  line-height: 1.0;
}

.hero p.large {
  font-size: 5em;
  font-weight: 800;
  font-stretch: extra-expanded;
  margin-bottom: 0.2em;
}

.hero p.medium {
  font-size: 2.5em;
  font-weight: 400;
  margin-bottom: 0.5em;
  color: var(--accent-color);
}

.hero .subtitle {
  font-size: 1.3em;
  font-style: italic;
  color: var(--text-secondary);
  font-weight: 300;
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section {
  padding: 4em 1em;
  border-bottom: 1px solid var(--border-color);
}

.section h2 {
  font-size: 2.5em;
  font-weight: 700;
  margin-bottom: 1.5em;
  color: var(--text-color);
  text-align: center;
}

.section p {
  font-size: 1.1em;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 1em;
}

/* ==========================================================================
   Projects Section
   ========================================================================== */

.projects-section .section {
  background-color: var(--background-color);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2em;
  margin-bottom: 2em;
}

.project-card {
  background-color: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 6px var(--shadow-color);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(var(--primary-rgb), 0.3);
}

.project-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background-color: var(--border-color);   /* using #333 as a dark placeholder */
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  image-rendering: smooth;
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-content {
  padding: 1.5em;
}

.project-content h3 {
  font-size: 1.5em;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.5em;
}

.project-content p {
  font-size: 0.95em;
  color: var(--text-secondary);
  margin-bottom: 1em;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  margin-bottom: 1em;
}

.tag {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--text-color);
  padding: 0.3em 0.8em;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 500;
}

.project-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.project-link:hover {
  color: var(--primary-hover);
}

/* ==========================================================================
   Skills Section
   ========================================================================== */

.skills-section {
  background-color: var(--background-secondary);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2em;
}

.skill-category {
  background-color: var(--card-bg);
  padding: 1.5em;
  border-radius: 8px;
  box-shadow: 0 4px 6px var(--shadow-color);
}

.skill-category h3 {
  font-size: 1.3em;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 1em;
}

.skill-category ul {
  list-style: none;
}

.skill-category li {
  padding: 0.5em 0;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  padding-left: 1em;
  position: relative;
}

.skill-category li:before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--primary-color);
}

.skill-category li:last-child {
  border-bottom: none;
}

/* ==========================================================================
   Contact Section
   ========================================================================== */

.contact-section {
  background-color: var(--background-color);
  text-align: center;
}

.contact-section p {
  font-size: 1.2em;
  margin-bottom: 2em;
  color: var(--text-light);
}

.contact-links {
  display: flex;
  gap: 1em;
  justify-content: center;
  flex-wrap: wrap;
}

.contact-button {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--text-color);
  padding: 0.8em 1.5em;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease, transform 0.2s ease;
  font-size: 1em;
}

.contact-button:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  background-color: var(--nav-background);
  padding: 2em 1em;
  text-align: center;
  border-top: 1px solid var(--border-color);
}

.footer p {
  color: var(--text-muted);
  font-size: 0.9em;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid var(--border-color);
  margin: 1em 0;
  padding: 0;
}

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

textarea {
  resize: vertical;
}

.hidden,
[hidden] {
  display: none !important;
}

.visually-hidden {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

.invisible {
  visibility: hidden;
}

.clearfix::before,
.clearfix::after {
  content: "";
  display: table;
}

.clearfix::after {
  clear: both;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media only screen and (max-width: 768px) {
  .nav-links {
    gap: 1em;
    font-size: 0.9em;
  }

  .hero p.large {
    font-size: 3em;
  }

  .hero p.medium {
    font-size: 1.5em;
  }

  .hero .subtitle {
    font-size: 1em;
  }

  .section h2 {
    font-size: 1.8em;
  }

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

  .contact-links {
    flex-direction: column;
  }

  .contact-button {
    width: 100%;
  }
}

@media print {
  *,
  *::before,
  *::after {
    background: var(--print-bg) !important;
    color: var(--print-text) !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid var(--print-border);
    page-break-inside: avoid;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}