/* ==========================================
   GLOBAL RESET & VARIABLES
   ========================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}

:root {
  --bg: #1e261e;
  --bg-dark: #16211a;
  --card: #0a3d4d;
  --accent: #00e5ff;
  --text: #ffffff;
  --muted: #dddddd;
  --danger: #ff6b6b;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

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

a {
  color: inherit;
}

/* ==========================================
   HEADER & NAVBAR
   ========================================== */
header {
  position: relative;
  z-index: 1000;
}

.navbar {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 8%;
  flex-wrap: wrap;
  gap: 20px;
}

.logo {
  font-size: 26px;
  font-weight: bold;
  color: var(--accent);
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 30px;
  flex-wrap: wrap;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-size: 15px;
  padding: 4px 0;
  position: relative;
  transition: color 0.3s;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s;
}

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

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Hamburger button (mobile only) */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 22px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--text);
  border-radius: 3px;
  transition: 0.3s;
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(9.5px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: translateY(-9.5px) rotate(-45deg);
}

/* ==========================================
   HERO (HOME PAGE)
   ========================================== */
.hero {
  min-height: 85vh;
  display: flex;
  align-items: center;
  padding: 40px 8%;
}

.hero-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 50px;
}

.hero-text {
  flex: 1;
}

.hero-text h2 {
  font-size: 40px;
  margin-bottom: 10px;
  color: var(--accent);
}

.hero-text h1 {
  font-size: 60px;
  margin-bottom: 20px;
  line-height: 1.1;
}

.hero-text p {
  max-width: 550px;
  margin-bottom: 30px;
  color: var(--muted);
}

.hero-image {
  width: 380px;
  height: 380px;
  object-fit: contain;
  object-position: center;
  border-radius: 50%;
  border: 4px solid var(--accent);
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.3);
  flex-shrink: 0;
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
  display: inline-block;
  padding: 14px 35px;
  border-radius: 30px;
  border: 2px solid white;
  background: transparent;
  color: white;
  cursor: pointer;
  font-weight: bold;
  font-size: 15px;
  transition: 0.3s;
  text-decoration: none;
  text-align: center;
}

.btn:hover {
  background: white;
  color: var(--card);
  transform: translateY(-2px);
}

/* ==========================================
   GENERAL PAGE SECTION
   ========================================== */
.page {
  padding: 80px 8%;
  text-align: center;
}

.page h1 {
  font-size: 40px;
  margin-bottom: 20px;
  color: var(--accent);
}

.page > p {
  max-width: 800px;
  margin: 0 auto 15px;
  color: var(--muted);
}

.page .btn {
  margin-top: 30px;
}

/* ==========================================
   SERVICES
   ========================================== */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.card {
  background: var(--card);
  padding: 30px;
  border-radius: 12px;
  transition: 0.3s;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.card h3 {
  color: var(--accent);
  margin-bottom: 12px;
}

.card p {
  color: var(--muted);
}

/* ==========================================
   PORTFOLIO
   ========================================== */
.portfolio {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.project1,
.project2,
.project3 {
  background: var(--card);
  padding: 25px;
  border-radius: 12px;
  transition: 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.project1:hover,
.project2:hover,
.project3:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.portfolio h2 {
  font-size: 20px;
  color: var(--accent);
  margin-bottom: 15px;
  text-align: center;
}

.portfolio img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 15px;
  transition: 0.3s;
}

.portfolio img:hover {
  transform: scale(1.03);
}

.portfolio p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 20px;
  text-align: center;
  flex-grow: 1;
}

/* ==========================================
   BLOG
   ========================================== */
.blog-post {
  max-width: 700px;
  margin: 30px auto;
  padding: 25px;
  background: var(--card);
  border-radius: 12px;
  text-align: left;
  transition: 0.3s;
}

.blog-post:hover {
  transform: translateY(-5px);
}

.blog-post h3 {
  color: var(--accent);
  margin-bottom: 10px;
}

.blog-post p {
  color: var(--muted);
}

/* ==========================================
   CONTACT FORM
   ========================================== */
form {
  display: flex;
  flex-direction: column;
  max-width: 450px;
  margin: 30px auto;
  gap: 15px;
}

input,
textarea {
  padding: 14px;
  border: none;
  border-radius: 8px;
  outline: none;
  font-size: 15px;
  font-family: inherit;
}

textarea {
  height: 140px;
  resize: vertical;
}

input:focus,
textarea:focus {
  box-shadow: 0 0 0 2px var(--accent);
}

#form-status {
  min-height: 24px;
  font-weight: bold;
  font-size: 14px;
  color: var(--accent);
}

#form-status.error {
  color: var(--danger);
}

/* ==========================================
   RESUME
   ========================================== */
.resume-section {
  max-width: 800px;
  margin: 20px auto;
  padding: 25px;
  background: var(--card);
  border-radius: 12px;
  text-align: left;
}

.resume-section h2 {
  color: var(--accent);
  margin-bottom: 10px;
  font-size: 22px;
}

.resume-section p {
  color: var(--muted);
}

.resume-section ul {
  list-style: none;
  margin-top: 10px;
}

.resume-section ul li {
  margin: 10px 0;
  padding-left: 20px;
  position: relative;
  color: var(--muted);
}

.resume-section ul li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ==========================================
   TABLET (max-width: 900px)
   ========================================== */
@media (max-width: 900px) {
  .hero-container {
    flex-direction: column;
    text-align: center;
  }

  .hero-text p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-text h1 {
    font-size: 44px;
  }

  .hero-text h2 {
    font-size: 30px;
  }

  .hero-image {
    width: 300px;
    height: 300px;
  }

  .nav-links {
    gap: 18px;
  }
}

/* ==========================================
   MOBILE (max-width: 768px)
   ========================================== */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .navbar {
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-dark);
    flex-direction: column;
    align-items: center;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
  }

  .nav-links.active {
    max-height: 420px;
  }

  .nav-links li {
    margin: 14px 0;
  }

  .hero {
    padding: 30px 5%;
    min-height: auto;
  }

  .hero-text h1 {
    font-size: 32px;
  }

  .hero-text h2 {
    font-size: 24px;
  }

  .hero-text p {
    font-size: 14px;
  }

  .hero-image {
    width: 240px;
    height: 240px;
  }

  .page {
    padding: 60px 5%;
  }

  .page h1 {
    font-size: 32px;
  }

  .btn {
    padding: 12px 25px;
    font-size: 14px;
  }

  .resume-section,
  .blog-post {
    padding: 20px;
  }
}