/* =============================================
   SUSHANT DUGGAL — PORTFOLIO
   Dark tech aesthetic with red accent
   Font: Space Mono (display) + DM Sans (body)
============================================= */

:root {
  --red: #ff004f;
  --red-dim: rgba(255, 0, 79, 0.15);
  --red-glow: rgba(255, 0, 79, 0.4);
  --bg: #080808;
  --bg-2: #111111;
  --bg-card: #161616;
  --bg-card-2: #1e1e1e;
  --text: #ffffff;
  --text-muted: #888888;
  --text-dim: #b0b0b0;
  --border: rgba(255,255,255,0.07);
  --mono: 'Space Mono', monospace;
  --sans: 'DM Sans', sans-serif;
  --radius: 12px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--red); border-radius: 2px; }

/* ============ UTILITY ============ */
.container { padding: 0 8%; max-width: 1400px; margin: 0 auto; }

.subtitle {
  font-family: var(--mono);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
}
.subtitle::after {
  content: '';
  position: absolute;
  left: 0; bottom: -8px;
  width: 60px; height: 3px;
  background: var(--red);
  border-radius: 2px;
}

/* ============ HEADER / HERO ============ */
#header {
  width: 100%;
  min-height: 100vh;
  background: url("images/background.png") center/cover no-repeat;
  position: relative;
  display: flex;
  flex-direction: column;
}

#header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(8,8,8,0.85) 0%,
    rgba(8,8,8,0.6) 60%,
    rgba(255,0,79,0.05) 100%
  );
}

#header > .container { position: relative; z-index: 1; padding-top: 0; flex: 1; }

/* ---- NAV ---- */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0;
  flex-wrap: wrap;
  gap: 16px;
}

.nav-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
  filter: brightness(1.1);
  transition: opacity 0.2s;
}
.nav-logo:hover { opacity: 0.85; }

nav ul {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0;
}
nav ul li { display: inline-block; }
nav ul li a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 6px 18px;
  position: relative;
  transition: color 0.3s;
}
nav ul li a::after {
  content: '';
  width: 0; height: 2px;
  background: var(--red);
  position: absolute;
  left: 18px; bottom: 0;
  transition: width 0.3s;
}
nav ul li a:hover { color: var(--text); }
nav ul li a:hover::after { width: calc(100% - 36px); }

/* ---- HERO TEXT ---- */
.header-text {
  margin-top: 15vh;
  max-width: 700px;
}

.typed-line {
  font-family: var(--mono);
  font-size: 18px;
  color: var(--red);
  margin-bottom: 16px;
  min-height: 28px;
}

.header-text h1 {
  font-family: var(--mono);
  font-size: clamp(42px, 7vw, 80px);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: 20px;
}
.header-text h1 span { color: var(--red); }

.header-sub {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 36px;
  font-weight: 400;
}

.header-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-block;
  background: var(--red);
  color: #fff;
  text-decoration: none;
  padding: 14px 36px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--red-glow);
}

.btn-outline {
  display: inline-block;
  border: 1.5px solid rgba(255,255,255,0.25);
  color: #fff;
  text-decoration: none;
  padding: 14px 36px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  transition: border-color 0.2s, background 0.2s;
}
.btn-outline:hover {
  border-color: var(--red);
  background: var(--red-dim);
}

/* ---- FLOATING TECH BADGES ---- */
.tech-float {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 60px;
  padding-bottom: 60px;
}
.tech-float span {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 100px;
  letter-spacing: 0.5px;
  transition: border-color 0.3s, color 0.3s;
}
.tech-float span:hover {
  border-color: var(--red);
  color: var(--red);
}

/* ============ ABOUT ============ */
#about {
  padding: 100px 0;
  background: var(--bg);
}

.row {
  display: flex;
  justify-content: space-between;
  gap: 60px;
  flex-wrap: wrap;
}

/* ---- PHOTO FRAME ---- */
.about-col-1 { flex-basis: 32%; min-width: 260px; }
.photo-frame {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
}
.photo-frame img {
  width: 100%;
  display: block;
  border-radius: 20px;
  filter: grayscale(10%);
  transition: filter 0.4s;
}
.photo-frame:hover img { filter: grayscale(0%); }

.photo-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  border: 2px solid transparent;
  background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
              linear-gradient(135deg, var(--red), transparent) border-box;
  pointer-events: none;
  z-index: 1;
}

.photo-badge {
  position: absolute;
  bottom: 20px; left: 20px;
  background: rgba(8,8,8,0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2;
  font-size: 14px;
  font-weight: 600;
}
.photo-badge i { color: var(--red); font-size: 16px; }

/* ---- ABOUT TEXT ---- */
.about-col-2 { flex-basis: 62%; }
.about-col-2 p {
  color: var(--text-dim);
  margin: 18px 0;
  line-height: 1.8;
  font-size: 15.5px;
}
.about-col-2 p em { color: var(--text); font-style: normal; font-weight: 600; }

.tab-titles {
  display: flex;
  gap: 30px;
  margin-top: 30px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.tab-links {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  padding-bottom: 12px;
  color: var(--text-muted);
  position: relative;
  transition: color 0.3s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.tab-links::after {
  content: '';
  width: 0; height: 2px;
  background: var(--red);
  position: absolute;
  left: 0; bottom: -1px;
  transition: width 0.3s;
}
.tab-links.active-link { color: var(--text); }
.tab-links.active-link::after { width: 100%; }

.tab-contents {
  display: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s, transform 0.4s;
  margin-top: 24px;
}
.tab-contents.active-tab {
  display: block;
  opacity: 1;
  transform: translateY(0);
}
.tab-contents ul { list-style: none; }
.tab-contents ul li {
  margin: 16px 0;
  color: var(--text-dim);
  font-size: 15px;
  padding-left: 16px;
  border-left: 2px solid var(--border);
}
.tab-contents ul li span {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--red);
  font-weight: 700;
  letter-spacing: 0.3px;
  display: block;
  margin-bottom: 4px;
}
.tab-contents ul li strong { color: var(--text); }

/* ============ SERVICES ============ */
#services {
  padding: 100px 0;
  background: var(--bg-2);
}

.services-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  margin-top: 60px;
}

.services-list div {
  background: var(--bg-card);
  padding: 40px 36px;
  border-radius: 16px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.services-list div::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 0;
  background: var(--red);
  transition: height 0.4s;
  border-radius: 0 0 2px 2px;
}
.services-list div:hover::before { height: 100%; }
.services-list div:hover {
  transform: translateY(-8px);
  border-color: rgba(255,0,79,0.3);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.services-list div i {
  font-size: 40px;
  color: var(--red);
  margin-bottom: 24px;
  display: block;
}
.services-list div h2 {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 14px;
}
.services-list div p {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.75;
  margin-bottom: 20px;
}
.services-list div a {
  color: var(--red);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--mono);
  transition: letter-spacing 0.2s;
}
.services-list div a:hover { letter-spacing: 0.5px; }

/* ============ CERTIFICATIONS ============ */
#certifications {
  padding: 80px 0;
  background: var(--bg);
}

.cert-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 50px;
  max-width: 700px;
}

.cert-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 20px 28px;
  border-radius: 12px;
  transition: border-color 0.3s, transform 0.2s;
}
.cert-card:hover {
  border-color: rgba(255,0,79,0.4);
  transform: translateX(6px);
}
.cert-card > i {
  font-size: 28px;
  color: var(--red);
  flex-shrink: 0;
}
.cert-info {
  flex: 1;
}
.cert-card h3 {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}
.cert-card p {
  font-size: 13px;
  color: var(--text-muted);
}
.cert-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: 100px;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
  letter-spacing: 0.3px;
}
.cert-link i { font-size: 11px; }
.cert-link:hover {
  color: var(--red);
  border-color: var(--red);
  background: var(--red-dim);
}

/* ============ PORTFOLIO ============ */
#portfolio {
  padding: 100px 0;
  background: var(--bg-2);
}

.work-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 60px;
}

.work {
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.work img {
  width: 100%;
  display: block;
  transition: transform 0.5s;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(255,0,79,0.5) 100%);
  opacity: 0;
  transition: opacity 0.4s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  text-align: center;
}

.work:hover img { transform: scale(1.06); }
.work:hover .layer { opacity: 1; }

.layer h3 {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}
.layer p {
  font-size: 13.5px;
  color: rgba(255,255,255,0.85);
  line-height: 1.6;
  margin-bottom: 16px;
}

.work-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 16px;
}
.work-tags span {
  font-family: var(--mono);
  font-size: 11px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 4px 10px;
  border-radius: 100px;
}

.layer a {
  color: var(--red);
  text-decoration: none;
  font-size: 20px;
  background: #fff;
  width: 54px; height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.layer a i {
  font-size: 20px;
  line-height: 1;
  display: flex;
}
.layer a:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(255,0,79,0.5);
}

.btn {
  display: block;
  margin: 50px auto 0;
  width: fit-content;
  border: 1.5px solid var(--red);
  padding: 14px 44px;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  transition: background 0.3s, transform 0.2s;
}
.btn:hover {
  background: var(--red);
  transform: translateY(-2px);
}
.btn i { margin-left: 8px; }

/* ============ CONTACT ============ */
#contact {
  padding: 100px 0 0;
  background: var(--bg);
}

.contact-left { flex-basis: 38%; min-width: 260px; }
.contact-right { flex-basis: 55%; min-width: 280px; }

.contact-left p {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  color: var(--text-dim);
  font-size: 15px;
}
.contact-left p i {
  color: var(--red);
  font-size: 20px;
  flex-shrink: 0;
  width: 22px;
}
.contact-left p a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}
.contact-left p a:hover { color: var(--red); }

.social-icons {
  display: flex;
  gap: 14px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.social-icons a {
  color: var(--text-muted);
  font-size: 28px;
  text-decoration: none;
  transition: color 0.3s, transform 0.3s;
}
.social-icons a:hover {
  color: var(--red);
  transform: translateY(-4px);
}

.btn.btn2 {
  background: var(--red);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 36px 0 0;
  border: none;
  cursor: pointer;
}
.btn.btn2:hover { background: #e00045; transform: translateY(-2px); }

form input,
form textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 18px 22px;
  margin: 10px 0;
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  outline: none;
  transition: border-color 0.3s;
}
form input:focus, form textarea:focus {
  border-color: var(--red);
}
form input::placeholder, form textarea::placeholder {
  color: var(--text-muted);
}
form textarea { resize: vertical; min-height: 140px; }

form button.btn2 {
  font-family: var(--sans);
  font-size: 15px;
  padding: 16px 44px;
  margin-top: 6px;
  width: 100%;
  justify-content: center;
}

#msg {
  display: block;
  color: #4caf83;
  font-size: 14px;
  margin-top: 10px;
  font-family: var(--mono);
}

.copyright {
  text-align: center;
  padding: 28px 0;
  background: var(--bg-card);
  margin-top: 70px;
  color: var(--text-muted);
  font-size: 14px;
  border-top: 1px solid var(--border);
}
.copyright i { color: var(--red); }

/* ============ SCROLL REVEAL ============ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============ MOBILE ============ */
nav ul .phone-menu-icon,
nav > .phone-menu-icon {
  display: none;
}

@media (max-width: 900px) {
  .about-col-1, .about-col-2 { flex-basis: 100%; }
  .about-col-1 { margin-bottom: 30px; }
  .contact-left, .contact-right { flex-basis: 100%; }
}

@media (max-width: 768px) {
  #header { background-image: url(images/phone-background.png); }

  .header-text { margin-top: 100px; }
  .header-text h1 { font-size: 36px; }

  nav > .phone-menu-icon {
    display: block;
    font-size: 26px;
    cursor: pointer;
    color: #fff;
  }
  nav ul {
    background: #0f0f0f;
    border-left: 3px solid var(--red);
    position: fixed;
    height: 100vh;
    top: 0; right: -220px;
    width: 220px;
    padding-top: 60px;
    z-index: 100;
    transition: right 0.4s;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
  nav ul li {
    display: block;
    width: 100%;
  }
  nav ul li a {
    display: block;
    padding: 16px 24px;
    font-size: 16px;
  }
  nav ul .phone-menu-icon {
    display: block;
    position: absolute;
    top: 20px; right: 20px;
    font-size: 22px;
    cursor: pointer;
  }

  .subtitle { font-size: 32px; }
  .tab-titles { gap: 16px; overflow-x: auto; }
  .tab-links { font-size: 12px; white-space: nowrap; }
  .tech-float { display: none; }
  .cert-list { max-width: 100%; }
}
