/* =============================================
   Ismaile Hasan Portfolio — style.css
   Design: Editorial / Luxury Minimal
   ============================================= */

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

:root {
  --ink:     #0f0e0c;
  --ink2:    #3a3832;
  --sand:    #f5f2ed;
  --sand2:   #ece8e0;
  --sand3:   #ddd8ce;
  --accent:  #c8622a;
  --accent2: #e88a55;
  --teal:    #1d6b5e;
  --teal2:   #2a9a88;
  --serif: 'DM Serif Display', Georgia, serif;
  --mono:  'DM Mono', monospace;
  --sans:  'Manrope', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  background: var(--sand);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* =============================================
   NAVIGATION
   ============================================= */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(245, 242, 237, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--sand3);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink2);
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: color 0.2s;
}

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

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

.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink2);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

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


.nav-resume-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  background: var(--accent);
  color: #fff;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}

.nav-resume-btn i {
  font-size: 12px;
}

.nav-resume-btn:hover {
  background: var(--ink);
  transform: translateY(-1px);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: all 0.3s;
  border-radius: 2px;
}

/* =============================================
   HERO
   ============================================= */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 80% 50%, rgba(200, 98, 42, 0.07) 0%, transparent 70%);
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--sand3) 1px, transparent 1px),
    linear-gradient(90deg, var(--sand3) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.4;
  pointer-events: none;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  position: relative;
}

.hero-tag {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: fadeInUp 0.6s ease both;
}

.hero-tag::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--accent);
}

.hero-name {
  font-family: var(--serif);
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 1.0;
  color: var(--ink);
  margin-bottom: 1rem;
  animation: fadeInUp 0.7s ease 0.1s both;
}

.hero-name em {
  font-style: italic;
  color: var(--accent);
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--ink2);
  max-width: 520px;
  margin-bottom: 2.5rem;
  font-weight: 400;
  line-height: 1.8;
  animation: fadeInUp 0.7s ease 0.2s both;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 3rem;
  animation: fadeInUp 0.7s ease 0.3s both;
}

.pill {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  padding: 5px 12px;
  border: 1px solid var(--sand3);
  border-radius: 99px;
  color: var(--ink2);
  background: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.04em;
  transition: all 0.2s;
  cursor: default;
}

.pill:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: fadeInUp 0.7s ease 0.4s both;
}

.btn-primary {
  padding: 13px 28px;
  background: var(--ink);
  color: var(--sand);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--sans);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: background 0.2s;
  display: inline-block;
}

.btn-primary:hover {
  background: var(--accent);
}

.btn-outline {
  padding: 13px 28px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--sans);
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: all 0.2s;
  display: inline-block;
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-deco {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 380px;
  height: 380px;
  opacity: 0.06;
  pointer-events: none;
  animation: rotateSlow 60s linear infinite;
}

/* =============================================
   SHARED SECTION STYLES
   ============================================= */
section {
  padding: 6rem 2rem;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent);
  display: block;
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 3rem;
}

/* =============================================
   ABOUT
   ============================================= */
#about {
  background: var(--ink);
  color: var(--sand);
}

#about .section-label {
  color: var(--accent2);
}

#about .section-label::before {
  background: var(--accent2);
}

#about .section-title {
  color: var(--sand);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  color: rgba(245, 242, 237, 0.72);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  line-height: 1.9;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2rem;
}

.about-tag {
  font-family: var(--mono);
  font-size: 11px;
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 99px;
  color: rgba(245, 242, 237, 0.55);
  letter-spacing: 0.04em;
}

.qual-block {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 2rem;
}

.qual-block h3 {
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--sand);
  margin-bottom: 1rem;
}

.qual-block > p {
  color: rgba(245, 242, 237, 0.62);
  font-size: 0.9rem;
  line-height: 1.8;
}

.cert-list {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cert-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: rgba(245, 242, 237, 0.58);
}

.cert-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent2);
  flex-shrink: 0;
}

/* =============================================
   SKILLS
   ============================================= */
#skills {
  background: var(--sand);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--sand3);
  border: 1px solid var(--sand3);
  border-radius: 12px;
  overflow: hidden;
}

.skill-card {
  background: var(--sand);
  padding: 2rem 1.5rem;
  transition: background 0.2s;
}

.skill-card:hover {
  background: var(--sand2);
}

.skill-num {
  font-family: var(--serif);
  font-size: 2.5rem;
  color: var(--accent);
  opacity: 0.22;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.skill-card h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

.skill-card p {
  font-size: 0.82rem;
  color: var(--ink2);
  line-height: 1.7;
  opacity: 0.8;
}

/* =============================================
   PROJECTS
   ============================================= */
#projects {
  background: var(--sand2);
}

.cat-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink2);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--sand3);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

.project-card {
  background: var(--sand);
  border: 1px solid var(--sand3);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(15, 14, 12, 0.08);
}

.project-head {
  padding: 1.5rem 1.5rem 0;
}

.project-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--sand2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 1rem;
  color: var(--accent);
  border: 1px solid var(--sand3);
}

.project-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 0.75rem;
}

.ptag {
  font-family: var(--mono);
  font-size: 10px;
  padding: 3px 8px;
  background: var(--sand2);
  border-radius: 4px;
  color: var(--ink2);
  letter-spacing: 0.03em;
}

.project-card > p {
  font-size: 0.82rem;
  color: var(--ink2);
  line-height: 1.7;
  padding: 0 1.5rem;
  margin-bottom: 1rem;
  opacity: 0.85;
  flex: 1;
}

.project-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--sand3);
  margin-top: auto;
}

.project-link {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  transition: color 0.2s;
}

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

/* =============================================
   CONTACT
   ============================================= */
#contact {
  background: var(--ink);
}

#contact .section-title {
  color: var(--sand);
}

#contact .section-label {
  color: var(--accent2);
}

#contact .section-label::before {
  background: var(--accent2);
}

.contact-line {
  font-size: 1rem;
  color: rgba(245, 242, 237, 0.58);
  margin-bottom: 3rem;
  max-width: 500px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 3rem;
}

.contact-card {
  background: rgba(255, 255, 255, 0.02);
  padding: 1.75rem;
  transition: background 0.2s;
}

.contact-card:hover {
  background: rgba(255, 255, 255, 0.05);
}

.contact-card i {
  color: var(--accent2);
  font-size: 20px;
  margin-bottom: 0.75rem;
  display: block;
}

.contact-card h3 {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(245, 242, 237, 0.38);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--mono);
  margin-bottom: 0.4rem;
}

.contact-card a,
.contact-card p {
  font-size: 0.9rem;
  color: rgba(245, 242, 237, 0.72);
  text-decoration: none;
  display: block;
  line-height: 1.5;
}

.contact-card a:hover {
  color: var(--accent2);
}

.socials {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.social-btn {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(245, 242, 237, 0.45);
  text-decoration: none;
  font-size: 17px;
  transition: all 0.2s;
}

.social-btn:hover {
  border-color: var(--accent2);
  color: var(--accent2);
}

/* =============================================
   FOOTER
   ============================================= */
footer {
  background: #0a0909;
  padding: 2rem;
  text-align: center;
}

.footer-inner p {
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(245, 242, 237, 0.22);
  letter-spacing: 0.04em;
}

/* =============================================
   BACK TO TOP
   ============================================= */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--sand);
  border: none;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, background 0.2s, transform 0.2s;
  z-index: 50;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rotateSlow {
  from { transform: translateY(-50%) rotate(0deg); }
  to   { transform: translateY(-50%) rotate(360deg); }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(245, 242, 237, 0.97);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 1.5rem 2rem;
    gap: 1.25rem;
    border-bottom: 1px solid var(--sand3);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: 15px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero-deco {
    display: none;
  }

  section {
    padding: 4rem 1.5rem;
  }

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

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

@media (max-width: 480px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }

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

  .hero-name {
    font-size: 3rem;
  }
}
