/* New design: clean, modern, responsive */

/* Color palette */
:root {
  /* Dark theme palette */
  --primary: #1e272e;
  /* dark navy */
  --secondary: #2d3436;
  /* slightly lighter */
  --accent: #ff6b6b;
  /* vivid coral accent */
  --bg: #0d1117;
  /* main background */
  --card-bg: #1e2a33;
  /* cards background */
  --text: #e5e9f0;
  /* light text */
  --muted: #a0a8b3;
  /* muted text */
  --border: #2c3e50;
  /* subtle border */
}

/* Reset */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* Layout */
#portfolio {
  max-width: 960px;
  margin: 0 auto;
  padding: 0rem 1rem 2rem 1rem;
}

header {
  display: flex;
  align-items: center;
  text-align: center;
  background: var(--card-bg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  margin-bottom: 2rem;
  position: sticky;
  top: 0;
  width: 100%;
  height: 80px;
  margin: 0;
  border-radius: 0;
  z-index: 1000;
  flex-direction: row;
  justify-content: space-between;
}
/* Container inside header to limit content width */
.header-inner {
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
}

/* Navigation list styling */
.nav-list {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin-top: 0.5rem;
  padding: 0;
}

/* Hamburger menu button */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}

.hamburger, .hamburger::before, .hamburger::after {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--accent);
  position: relative;
}

.hamburger::before, .hamburger::after {
  content: '';
  position: absolute;
  left: 0;
}

.hamburger::before {
  top: -8px;
}

.hamburger::after {
  top: 8px;
}

.nav-list a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
}

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

#site-name {
  font-size: 2.2rem;
  font-weight: 800;
  background: var(--accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

section {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
  display: grid;
  gap: 1rem;
  scroll-margin-top: 90px;
}

section:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

/* Titles */
.app-title,
.contact-title,
.social-title {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--accent);
}

/* Cards */
.app-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  transition: background 0.2s, border-color 0.2s;
}

.app-card:hover {
  background: var(--bg);
  border-color: var(--accent);
}

.app-name {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.app-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Links */
.app-link,
.social-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.app-link:hover,
.social-link:hover {
  color: var(--accent);
}

/* Form */
.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--muted);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card-bg);
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
}

.form-control::placeholder {
  color: var(--muted);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.error {
  color: #ff6b6b;
  font-size: 0.85rem;
  display: block;
  margin-top: 0.25rem;
}

.success {
  color: #51cf66;
  font-size: 1rem;
  padding: 0.75rem;
  background: rgba(81, 207, 102, 0.1);
  border: 1px solid #51cf66;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.error-message {
  color: #ff6b6b;
  font-size: 1rem;
  padding: 0.75rem;
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid #ff6b6b;
  border-radius: 6px;
  margin-bottom: 1rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

/* .btn:hover {
  background: darken(var(--accent), 10%);
  transform: translateY(-2px);
} */

/* Social */
.social-list {
  list-style: none;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.social-item {
  flex: 1 1 50px;
}

.social-link {
  display: block;
  padding: 0.75rem;
  text-align: center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-weight: 500;
}

.social-link:hover {
  background: var(--bg);
  border-color: var(--accent);
}

/* Responsive */
@media (max-width: 768px) {
  #portfolio {
    padding: 1.5rem 1rem;
  }

  header {
    padding: 2rem 1rem;
  }

  .app-title,
  .contact-title,
  .social-title {
    font-size: 1.4rem;
  }

  .social-list {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  /* Show hamburger on mobile */
  .nav-toggle {
    display: block;
  }

  /* Hide nav list by default on mobile */
  .nav-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: var(--card-bg);
    box-shadow: 0 8px 16px -8px rgba(0,0,0,0.3);
    padding: 0;
    position: absolute;
    top: 79px;
    left: 0;
    right: 0;
    z-index: 999;
    margin: 0;
    gap: 0;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
  }

  .nav-list.show {
    max-height: 400px;
    opacity: 1;
  }

  .nav-list.show {
    display: flex;
    animation: slideDown 0.3s ease;
  }

  .nav-list li {
    text-align: center;
    border-bottom: 1px solid var(--border);
  }

  .nav-list li:last-child {
    border-bottom: none;
  }

  .nav-list a {
    display: block;
    padding: 15px 20px;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
  }

  .nav-list a:hover {
    background: var(--bg);
    color: var(--accent);
  }
}

@media (max-width: 480px) {
  #site-name {
    font-size: 1.8rem;
  }

  .app-name {
    font-size: 1.1rem;
  }
}